/* Traka Website - Design System & Shared Styles */

/* Reset / Normalize */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* Lenis smooth scroll */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .mobile-nav,
  .overlay {
    transition: none;
  }

  .menu-toggle span {
    transition: none;
  }
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  opacity: 0.9;
}

/* CSS Variables */
:root {
  --bg-main: #161616;
  --bg-page: #1a1a1a;
  --bg-card: #282828;
  --bg-card-hover: #2e2e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent: #1cdbdb;
  --accent-hover: #1ae5e5;
  --positive: #22c55e;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --transition: 0.2s ease;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

.section--sm {
  padding: var(--space-2xl) 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: var(--space-md);
}

.text-secondary {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.text-accent {
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--primary {
  background-color: var(--accent);
  color: var(--bg-main);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn--outline:hover {
  background-color: rgba(28, 219, 219, 0.1);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* Header / Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.header__logo {
  display: flex;
  align-items: center;
}

.header__logo img {
  height: 32px;
  width: auto;
}

.nav {
  display: none;
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
  }
}

.nav__link {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav__link:hover,
.nav__link--active {
  color: var(--text-primary);
}

.nav__link--active {
  color: var(--accent);
}

.nav__ctas {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Mobile menu button */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background-color: var(--bg-main);
  padding: var(--space-2xl) var(--space-lg);
  z-index: 99;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.mobile-nav.is-open {
  transform: translateX(0);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mobile-nav__link {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  padding: var(--space-sm) 0;
}

.mobile-nav__link--active {
  color: var(--accent);
}

.mobile-nav__link:focus-visible,
.footer__links-column a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mobile-nav__ctas {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: background-color var(--transition);
}

.card:hover {
  background-color: var(--bg-card-hover);
}

.card--stat {
  text-align: center;
  padding: var(--space-lg);
}

.card__stat {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.card__label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 {
  grid-template-columns: 1fr 1fr;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1023px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* Checkmark list */
.check-list {
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: var(--space-md);
}

.check-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--positive);
  font-weight: bold;
}

/* Bullet list */
.bullet-list {
  list-style: none;
}

.bullet-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: var(--space-sm);
}

.bullet-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Footer */
.footer {
  background-color: var(--bg-main);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer__brand {
  max-width: 280px;
}

.footer__logo {
  margin-bottom: var(--space-md);
}

.footer__logo img {
  height: 36px;
  width: auto;
}

.footer__tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
}

.footer__links-column h4 {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.footer__links-column ul {
  list-style: none;
}

.footer__links-column li {
  margin-bottom: var(--space-sm);
}

.footer__links-column a {
  color: var(--text-secondary);
}

.footer__links-column a:hover {
  color: var(--accent);
}

.footer__bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Announcement banner */
.announcement-banner {
  background: linear-gradient(90deg, rgba(28, 219, 219, 0.15), rgba(28, 219, 219, 0.05));
  border-bottom: 1px solid rgba(28, 219, 219, 0.3);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  text-align: center;
}

.announcement-banner__text {
  font-weight: 500;
  color: var(--text-primary);
}

.announcement-banner__close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-xs);
  font-size: 1.25rem;
  line-height: 1;
  transition: color var(--transition);
}

.announcement-banner__close:hover {
  color: var(--text-primary);
}

.announcement-banner__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hero */
.hero {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.hero__logo {
  margin-bottom: var(--space-xl);
}

.hero__logo img {
  height: 48px;
  max-width: 100%;
  width: auto;
  margin: 0 auto;
}

.hero__tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: var(--space-xs);
}

.hero__value-props {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* How it works flow */
.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}

.flow-diagram__step {
  background-color: var(--bg-card);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 140px;
}

.flow-diagram__arrow {
  color: var(--accent);
  font-size: 1.5rem;
}

/* Tabs (Value page) */
.tabs {
  margin-bottom: var(--space-2xl);
}

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-xl);
}

.tabs__tab {
  padding: var(--space-md) var(--space-lg);
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}

.tabs__tab:hover {
  color: var(--text-primary);
}

.tabs__tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tabs__tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tabs__panel {
  display: none;
}

.tabs__panel--active {
  display: block;
}

/* Before/After comparison */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin: var(--space-xl) 0;
}

@media (max-width: 639px) {
  .comparison {
    grid-template-columns: 1fr;
  }
}

.comparison__side {
  padding: var(--space-xl);
  border-radius: var(--radius-md);
}

.comparison__side--before {
  background-color: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.comparison__side--after {
  background-color: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.comparison__title {
  font-size: 1.125rem;
  margin-bottom: var(--space-md);
}

.comparison__side--before .comparison__title {
  color: #f87171;
}

.comparison__side--after .comparison__title {
  color: var(--positive);
}

/* ROI Calculator */
.calculator {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
}

.calculator__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (max-width: 639px) {
  .calculator__row {
    grid-template-columns: 1fr;
  }
}

.calculator__field label {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.calculator__field input,
.calculator__field select {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bg-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
}

.calculator__result {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background-color: var(--bg-main);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
}

.calculator__result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

/* Section headers */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
}

.section-header__title {
  margin-bottom: var(--space-md);
}

/* Two-column layout */
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

@media (max-width: 639px) {
  .two-columns {
    grid-template-columns: 1fr;
  }
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: var(--space-3xl) 0;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
}

.cta-section__title {
  margin-bottom: var(--space-md);
}

.cta-section__subtitle {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--accent);
  color: var(--bg-main);
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-md);
}
