/* ===== RESET & BOX MODEL ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== THEME TRANSITIONS ===== */
*, *::before, *::after {
  transition: background-color 200ms ease, border-color 200ms ease, color 150ms ease;
}
.btn-primary,
.btn-secondary,
.theme-toggle {
  transition: background 150ms ease, box-shadow 150ms ease, color 150ms ease,
              border-color 150ms ease;
}

/* ===== DESIGN TOKENS ===== */
:root {
  /* Brand tokens, never change with theme */
  --color-primary:        #14B8A6;
  --color-primary-dark:   #0D9488;
  --color-gold:           #F59E0B;
  --color-heart:          #EF4444;
  --color-xp:             #8B5CF6;

  /* Semantic */
  --color-success:        #22C55E;
  --color-warning:        #F59E0B;
  --color-danger:         #EF4444;

  /* Typography */
  --font-display: 'Nunito', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing scale (8-pt grid) */
  --space-1:   4px;  --space-2:   8px;  --space-3:  12px;
  --space-4:  16px;  --space-5:  20px;  --space-6:  24px;
  --space-8:  32px;  --space-10: 40px;  --space-12: 48px;
  --space-16: 64px;  --space-20: 80px;

  /* Radii */
  --radius-sm:   6px;  --radius-md:  12px;
  --radius-lg:  18px;  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Hero glow */
  --hero-glow-opacity: 0.12;
}

/* ===== DARK THEME (default) ===== */
:root,
[data-theme="dark"] {
  --color-bg:             #0F172A;
  --color-surface:        #1E293B;
  --color-surface-raised: #334155;
  --color-border:         #475569;
  --color-text:           #F1F5F9;
  --color-text-muted:     #94A3B8;
  --color-text-subtle:    #64748B;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 20px rgba(20,184,166,0.35);

  --hero-glow-opacity: 0.12;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --color-bg:             #F8FAFC;
  --color-surface:        #FFFFFF;
  --color-surface-raised: #F1F5F9;
  --color-border:         #E2E8F0;
  --color-text:           #0F172A;
  --color-text-muted:     #475569;
  --color-text-subtle:    #94A3B8;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-glow: 0 0 20px rgba(20,184,166,0.25);

  --hero-glow-opacity: 0.06;
}

/* Icon visibility by theme */
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="dark"]  .icon-moon { display: none; }
:root:not([data-theme]) .icon-moon { display: none; }

/* ===== BASE ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 9999;
  transition: top 150ms ease;
}
.skip-link:focus {
  top: var(--space-2);
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-8);
  border: none;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-glow);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-secondary:hover {
  background: rgba(20,184,166,0.10);
}
.btn-secondary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* ===== FOCUS STYLES ===== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, backdrop-filter 200ms ease,
              background-color 200ms ease;
}
header[data-scrolled] {
  border-bottom-color: var(--color-border);
  backdrop-filter: blur(12px);
  background: rgba(15,23,42,0.85);
}
[data-theme="light"] header[data-scrolled] {
  background: rgba(248,250,252,0.85);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  gap: var(--space-4);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  object-fit: contain;
}
.nav-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-text);
}

.nav-links {
  display: none;
  list-style: none;
  gap: var(--space-8);
}
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 150ms ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  padding: var(--space-2);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 99;
  padding: var(--space-6);
  flex-direction: column;
  gap: var(--space-4);
}
.mobile-nav.nav-open {
  display: flex;
}
.mobile-nav a {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}
.mobile-nav a:last-child {
  border-bottom: none;
}
.mobile-nav a:hover {
  color: var(--color-primary);
}

/* ===== MAIN ===== */
main {
  padding-top: 64px;
}

/* ===== SECTION FADE-IN ===== */
.fade-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== HERO ===== */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%,
      rgba(20,184,166,var(--hero-glow-opacity)) 0%,
      transparent 70%),
    var(--color-bg);
  padding: var(--space-20) var(--space-6) var(--space-16);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  gap: var(--space-12);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.hero-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-text);
  max-width: 18ch;
}

.hero-subheadline {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-text-muted);
  max-width: 46ch;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.hero-trust {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: center;
}
.hero-trust-sep {
  color: var(--color-border);
}

/* Hero visual */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-screenshot {
  width: 100%;
  max-width: 392px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

/* ===== SECTION SHARED ===== */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-20) var(--space-6);
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section-heading {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section-subheading {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 52ch;
  line-height: 1.7;
}

/* ===== VALUE PROPS ===== */
#value-props {
  background: var(--color-bg);
}

.value-props-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

.value-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.value-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.value-card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-raised);
  border-radius: var(--radius-md);
  color: var(--color-primary);
}
.value-card-icon svg {
  width: 24px;
  height: 24px;
}
.value-card h3 {
  font-size: 1.25rem;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.value-card p {
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== HOW IT WORKS ===== */
#how-it-works {
  background: var(--color-surface);
}

.steps-grid {
  display: grid;
  gap: var(--space-10);
  position: relative;
}

.step {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
}

.step-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
  text-align: center;
}

.step-content h3 {
  font-size: 1.25rem;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.step-content p {
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== SKILLS PREVIEW ===== */
#skills-preview {
  background: var(--color-bg);
}

.skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.skill-chip {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-5);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  transition: border-color 150ms ease, background 150ms ease;
  cursor: default;
}
.skill-chip:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
}

.skills-more {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface-raised);
  border-radius: var(--radius-lg);
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-subtle);
  position: relative;
  overflow: hidden;
}
.skills-more::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, var(--color-surface-raised));
  pointer-events: none;
}

/* ===== SOCIAL PROOF ===== */
#social-proof {
  background: var(--color-surface);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  text-align: center;
}

.stat-item {}
.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-gold);
  display: block;
  line-height: 1;
  margin-bottom: var(--space-2);
}
.stat-suffix {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-gold);
  display: inline;
  line-height: 1;
}
.stat-label {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.stat-desc {
  font-size: 0.875rem;
  color: var(--color-text-subtle);
  margin-top: var(--space-1);
}

/* ===== CTA BAND ===== */
#cta-band {
  background: var(--color-primary) !important;
  padding: var(--space-20) var(--space-6);
  text-align: center;
}

.cta-band-inner {
  max-width: 700px;
  margin: 0 auto;
}

#cta-band h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: #fff;
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-weight: 800;
}

#cta-band p {
  color: rgba(255,255,255,0.8);
  font-size: 1.0625rem;
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

#cta-band .btn-primary {
  background: #fff;
  color: var(--color-primary);
  font-size: 1.0625rem;
  padding: var(--space-4) var(--space-10);
}
#cta-band .btn-primary:hover {
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 30px rgba(0,0,0,0.2);
}

.cta-disclaimer {
  margin-top: var(--space-6);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

/* ===== FOOTER ===== */
#footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) var(--space-6) var(--space-8);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

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

.footer-brand .nav-logo {
  margin-bottom: var(--space-3);
}
.footer-tagline {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 28ch;
}

.footer-nav-title {
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-subtle);
  margin-bottom: var(--space-4);
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-nav-list a {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 150ms ease;
}
.footer-nav-list a:hover {
  color: var(--color-primary);
}

.footer-social-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-copyright {
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
}
.footer-copyright p {
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
}
.footer-copyright-links {
  display: flex;
  gap: var(--space-4);
}
.footer-copyright-links a {
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
  transition: color 150ms ease;
}
.footer-copyright-links a:hover {
  color: var(--color-primary);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  .value-props-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    position: relative;
  }

  .steps-grid::before {
    content: '';
    position: absolute;
    top: 24px;
    left: calc(16.67% + 24px);
    right: calc(16.67% + 24px);
    height: 1px;
    border-top: 1px dashed var(--color-border);
    z-index: 0;
  }

  .step {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .step-number {
    width: auto;
    text-align: center;
  }
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }

  .hamburger {
    display: none;
  }

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

  .hero-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1280px) {
  .section-inner,
  .nav-inner {
    padding-left: 0;
    padding-right: 0;
  }
}
