/* ============================================================
   Needle Network — Marketing Site
   Design system tokens + full component styles.
   Aesthetic reference: Stripe, Linear, Ramp, Plaid, Cloudflare.
   ============================================================ */

/* 1. FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');


/* 2. DESIGN TOKENS
   ============================================================ */
:root {
  /* Neutral / Ink */
  --ink-0:   #ffffff;
  --ink-25:  #fafbfc;
  --ink-50:  #f5f7fa;
  --ink-100: #edf0f4;
  --ink-150: #e3e8ee;
  --ink-200: #d4dbe3;
  --ink-300: #b4bdc9;
  --ink-400: #8a95a4;
  --ink-500: #647082;
  --ink-600: #4a5563;
  --ink-700: #353e49;
  --ink-800: #232a33;
  --ink-900: #141920;
  --ink-950: #0a0d12;

  /* Emerald / Signal */
  --emerald-50:  #e7f8f0;
  --emerald-100: #c6f0dd;
  --emerald-200: #92e3c1;
  --emerald-300: #54d0a1;
  --emerald-400: #1eb681;
  --emerald-500: #0fa06a;
  --emerald-600: #0a8358;
  --emerald-700: #0a6948;

  /* Cobalt / Accent */
  --cobalt-500: #2d5cf6;
  --cobalt-600: #1f49e0;

  /* Semantic */
  --color-bg:             var(--ink-25);
  --color-bg-subtle:      var(--ink-50);
  --color-surface:        var(--ink-0);
  --color-border:         var(--ink-150);
  --color-border-strong:  var(--ink-200);
  --color-border-subtle:  var(--ink-100);
  --color-divider:        var(--ink-100);

  --text-primary:    var(--ink-900);
  --text-secondary:  var(--ink-600);
  --text-tertiary:   var(--ink-500);
  --text-disabled:   var(--ink-400);
  --text-inverse:    var(--ink-0);
  --text-link:       var(--emerald-600);
  --text-link-hover: var(--emerald-700);

  --color-brand:        var(--emerald-500);
  --color-brand-hover:  var(--emerald-600);
  --color-brand-active: var(--emerald-700);
  --color-brand-subtle: var(--emerald-50);
  --color-brand-border: var(--emerald-200);
  --color-on-brand:     var(--ink-0);
  --color-focus-ring:   rgba(15,160,106,0.38);

  /* Typography */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  --text-2xs:  0.6875rem;
  --text-xs:   0.75rem;
  --text-sm:   0.8125rem;
  --text-base: 0.9375rem;
  --text-md:   1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;
  --text-5xl:  3.75rem;
  --text-6xl:  4.75rem;

  --leading-tight:   1.15;
  --leading-snug:    1.3;
  --leading-normal:  1.5;
  --leading-relaxed: 1.65;

  --tracking-tighter: -0.035em;
  --tracking-tight:   -0.015em;
  --tracking-wide:    0.02em;
  --tracking-wider:   0.08em;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radius */
  --radius-xs:   3px;
  --radius-sm:   5px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  22px;
  --radius-full: 9999px;

  /* Shadows */
  --ring-hairline: 0 0 0 1px rgba(20,25,32,0.06);
  --shadow-xs:  0 1px 2px rgba(10,13,18,0.05);
  --shadow-sm:  0 1px 2px rgba(10,13,18,0.06), 0 2px 4px rgba(10,13,18,0.04);
  --shadow-md:  0 2px 4px rgba(10,13,18,0.05), 0 6px 16px rgba(10,13,18,0.08);
  --shadow-lg:  0 4px 8px rgba(10,13,18,0.05), 0 16px 32px rgba(10,13,18,0.10);
  --shadow-xl:  0 8px 16px rgba(10,13,18,0.06), 0 28px 64px rgba(10,13,18,0.14);
  --shadow-focus: 0 0 0 3px var(--color-focus-ring);

  /* Motion */
  --duration-fast:   140ms;
  --duration-base:   200ms;
  --duration-slow:   300ms;
  --duration-slower: 420ms;
  --ease-settle:  cubic-bezier(0.2,0,0,1);
  --ease-out:     cubic-bezier(0.16,1,0.3,1);
  --ease-in-out:  cubic-bezier(0.65,0,0.35,1);
  --transition-colors: color var(--duration-fast) var(--ease-settle),
                       background-color var(--duration-fast) var(--ease-settle),
                       border-color var(--duration-fast) var(--ease-settle),
                       box-shadow var(--duration-fast) var(--ease-settle);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast:   0ms;
    --duration-base:   0ms;
    --duration-slow:   0ms;
    --duration-slower: 0ms;
  }
}


/* 3. DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --color-bg:            #0a0d12;
  --color-bg-subtle:     #0d111a;
  --color-surface:       #121720;
  --color-border:        #1e2530;
  --color-border-strong: #2c3545;
  --color-border-subtle: #171d28;
  --color-divider:       #171d28;

  --text-primary:    #eef0f4;
  --text-secondary:  #a8b4c4;
  --text-tertiary:   #6e7d90;
  --text-disabled:   #465060;
  --text-inverse:    #0a0d12;
  --text-link:       #4dd4a0;
  --text-link-hover: #7de8c4;

  --color-brand:        #1ab877;
  --color-brand-hover:  #2ad492;
  --color-brand-active: #4ee8b6;
  --color-brand-subtle: rgba(15,160,106,0.14);
  --color-brand-border: rgba(26,184,119,0.28);
  --color-on-brand:     #041408;
  --color-focus-ring:   rgba(42,212,146,0.45);

  --ring-hairline: 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.5);
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.4);
  --shadow-md:  0 2px 4px rgba(0,0,0,0.4), 0 6px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 4px 8px rgba(0,0,0,0.44), 0 16px 32px rgba(0,0,0,0.6);
  --shadow-xl:  0 8px 16px rgba(0,0,0,0.5), 0 28px 64px rgba(0,0,0,0.7);
}


/* 4. RESET + BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--color-bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  text-wrap: balance;
}

p { text-wrap: pretty; }

a {
  color: var(--text-link);
  text-decoration: none;
  transition: var(--transition-colors);
}
a:hover { color: var(--text-link-hover); }

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

::selection {
  background: var(--emerald-100);
  color: var(--emerald-700);
}

[data-theme="dark"] ::selection {
  background: rgba(15,160,106,0.25);
  color: var(--color-brand-active);
}


/* 5. LAYOUT
   ============================================================ */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.container--tight {
  max-width: 960px;
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.container--narrow {
  max-width: 680px;
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.section {
  padding-block: 80px;
}

.section--sm {
  padding-block: 56px;
}

.section--alt {
  background: var(--color-bg-subtle);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section--dark {
  background: var(--ink-950);
}

[data-theme="dark"] .section--alt {
  background: var(--color-bg-subtle);
}


/* 6. TYPOGRAPHY
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: var(--space-4);
}

.eyebrow--muted { color: var(--text-tertiary); }
.eyebrow--inv   { color: rgba(255,255,255,0.5); }

.eyebrow__line {
  display: block;
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.display-1 {
  font-size: clamp(2.75rem, 6.5vw, 4.75rem);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tighter);
  line-height: 1.0;
}

.heading-2 {
  font-size: clamp(1.75rem, 3.5vw, 2.375rem);
  letter-spacing: -0.028em;
  line-height: 1.1;
}

.heading-3 {
  font-size: var(--text-xl);
  letter-spacing: -0.018em;
  line-height: var(--leading-snug);
}

.body-lg {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--text-secondary);
}

.body-base {
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-secondary);
}

.mono { font-family: var(--font-mono); }
.mono-data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}


/* 7. COMPONENTS
   ============================================================ */

/* --- Buttons --- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-5);
  height: 40px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-settle),
              border-color var(--duration-fast) var(--ease-settle),
              box-shadow var(--duration-fast) var(--ease-settle),
              transform var(--duration-fast) var(--ease-settle);
  -webkit-user-select: none;
  user-select: none;
}

.btn:active { transform: translateY(0.5px); }

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.btn--primary {
  background: var(--color-brand);
  color: var(--color-on-brand);
  box-shadow: 0 1px 3px rgba(15,160,106,0.24), 0 1px 2px rgba(10,13,18,0.08);
}

.btn--primary:hover {
  background: var(--color-brand-hover);
  box-shadow: 0 2px 6px rgba(15,160,106,0.3), 0 1px 3px rgba(10,13,18,0.08);
  color: var(--color-on-brand);
}

.btn--primary:active { background: var(--color-brand-active); box-shadow: none; }

.btn--secondary {
  background: var(--color-surface);
  color: var(--text-primary);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-xs);
}

.btn--secondary:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-border-strong);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn--ghost:hover {
  background: var(--color-bg-subtle);
  color: var(--text-primary);
}

.btn--lg {
  height: 44px;
  padding: 0 var(--space-6);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-settle),
              color var(--duration-fast) var(--ease-settle);
}
.btn--icon:hover { background: var(--color-bg-subtle); color: var(--text-primary); }

.btn--white {
  background: var(--ink-0);
  color: var(--color-brand-active);
  font-weight: var(--weight-semibold);
  box-shadow: 0 1px 3px rgba(10,13,18,0.12);
}
.btn--white:hover {
  background: var(--emerald-50);
  color: var(--color-brand-active);
}

.btn--outline-white {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn--outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.28);
  color: #fff;
}

/* Arrow icon inside button */
.btn__arrow {
  transition: transform var(--duration-fast) var(--ease-out);
}
.btn:hover .btn__arrow { transform: translateX(2px); }


/* --- Announcement badge --- */
.announce {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 14px 4px 5px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  transition: border-color var(--duration-fast) var(--ease-settle),
              box-shadow var(--duration-fast) var(--ease-settle);
  text-decoration: none;
}
.announce:hover {
  border-color: var(--color-brand-border);
  box-shadow: 0 0 0 3px var(--color-brand-subtle);
  color: var(--text-secondary);
}

.announce__new {
  padding: 2px 8px;
  background: var(--color-brand-subtle);
  color: var(--color-brand);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.announce__arrow {
  color: var(--text-tertiary);
  transition: transform var(--duration-fast) var(--ease-out);
}
.announce:hover .announce__arrow { transform: translateX(2px); color: var(--color-brand); }


/* --- Cards --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--duration-base) var(--ease-settle),
              border-color var(--duration-base) var(--ease-settle),
              transform var(--duration-base) var(--ease-settle);
}

.card--hover:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
}

.card--feature {
  padding: var(--space-6);
  cursor: default;
  transition: box-shadow var(--duration-base) var(--ease-settle),
              border-color var(--duration-base) var(--ease-settle),
              transform var(--duration-slow) var(--ease-out);
}

.card--feature:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
}

.card--feature:hover .feature-icon {
  transform: scale(1.06);
  background: var(--color-brand-subtle);
}

.card--feature:hover .feature-icon svg {
  color: var(--color-brand);
}


/* --- Feature icon --- */
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  color: var(--text-tertiary);
  transition: background var(--duration-base) var(--ease-settle),
              transform var(--duration-base) var(--ease-settle);
  flex-shrink: 0;
}

.feature-icon--brand {
  background: var(--color-brand-subtle);
  color: var(--color-brand);
}


/* --- Status dot --- */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--color-brand);
  flex-shrink: 0;
}

.status-dot--pulse { animation: pulse-dot 2.6s ease-in-out infinite; }


/* --- Trust strip --- */
.trust-strip {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-4);
  overflow: hidden;
  background: var(--color-surface);
}

.trust-strip__inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.trust-strip__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-disabled);
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: var(--space-6);
  border-right: 1px solid var(--color-border);
}

.trust-strip__ticker {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  flex: 1;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.trust-strip__track {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  animation: ticker 28s linear infinite;
  white-space: nowrap;
  flex-shrink: 0;
}

.trust-strip__name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-300);
  text-transform: uppercase;
  flex-shrink: 0;
  transition: color var(--duration-fast) var(--ease-settle);
}

[data-theme="dark"] .trust-strip__name { color: var(--ink-600); }


/* --- Code panel --- */
.code-panel {
  background: #0c1018;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.code-panel__chrome {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #0a0e16;
}

.code-panel__dots {
  display: flex;
  gap: 6px;
}

.code-panel__dot {
  width: 11px;
  height: 11px;
  border-radius: var(--radius-full);
  background: #2a3346;
}

.code-panel__filename {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.02em;
}

.code-panel__body {
  padding: var(--space-6) var(--space-6) var(--space-8);
  overflow-x: auto;
}

pre.code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  margin: 0;
  white-space: pre;
}

.c-kw    { color: #7eb5f4; }
.c-str   { color: #7ed4a8; }
.c-prop  { color: #9fb5d0; }
.c-val   { color: #e5c97f; }
.c-num   { color: #d4a8ff; }
.c-cmt   { color: rgba(255,255,255,0.3); font-style: italic; }
.c-fn    { color: #62d2ff; }
.c-brand { color: var(--color-brand); }
.c-base  { color: rgba(255,255,255,0.75); }

/* --- Section header block --- */
.section-header {
  max-width: 580px;
  margin-bottom: var(--space-12);
}

.section-header--center {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header__h2 {
  margin-bottom: var(--space-4);
}

.section-header__body {
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-secondary);
  margin-top: var(--space-4);
}


/* 8. NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  animation: nav-enter 0.5s var(--ease-out) both;
}

.nav__inner-wrap {
  height: 60px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--duration-base) var(--ease-settle),
              border-color var(--duration-base) var(--ease-settle),
              box-shadow var(--duration-base) var(--ease-settle);
}

.nav.is-scrolled .nav__inner-wrap {
  background: rgba(250,251,252,0.9);
  border-color: var(--color-border);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(20,25,32,0.04);
}

[data-theme="dark"] .nav.is-scrolled .nav__inner-wrap {
  background: rgba(10,13,18,0.94);
  border-color: var(--color-border);
}

.nav__inner {
  height: 60px;
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo-wordmark {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  letter-spacing: -0.022em;
  color: var(--text-primary);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}

.nav__link {
  position: relative;
  padding: var(--space-2) var(--space-3);
  font-size: 14px;
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) var(--ease-settle),
              background var(--duration-fast) var(--ease-settle);
  text-decoration: none;
}

.nav__link:hover { color: var(--text-primary); background: var(--color-bg-subtle); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.nav__mobile-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
}

.nav__mobile-menu {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3);
  box-shadow: var(--shadow-lg);
  animation: slide-down-sm 0.2s var(--ease-out) both;
}

.nav__mobile-menu.is-open { display: block; }

.nav__mobile-link {
  display: block;
  padding: 10px var(--space-4);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: var(--transition-colors);
  text-decoration: none;
}
.nav__mobile-link:hover { background: var(--color-bg-subtle); color: var(--text-primary); }


/* 9. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 88px;
  padding-bottom: 0;
  border-bottom: 1px solid var(--color-border);
}

.hero__motif {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-60%);
  width: 58%;
  max-width: 740px;
  opacity: 0.38;
  pointer-events: none;
  filter: blur(0.3px);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--space-8);
  padding-bottom: 56px;
}

.hero__h1 {
  margin-bottom: var(--space-5);
}

.hero__h1 em {
  font-style: normal;
  color: var(--color-brand);
}

.hero__sub {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.hero__ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.hero__trust {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-bottom: 0;
}

.hero__trust-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}

.hero__trust-item svg { color: var(--color-brand); flex-shrink: 0; }

/* Product frame */
.hero__frame-wrap {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin-inline: auto;
  padding-inline: var(--space-8);
  margin-top: var(--space-12);
}

.hero__product-frame {
  background: var(--ink-950);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  border: 1px solid rgba(255,255,255,0.07);
  border-bottom: none;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.hero__frame-chrome {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}

.hero__chrome-dots {
  display: flex;
  gap: 6px;
}

.hero__chrome-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.12);
}

.hero__chrome-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.04em;
}

.hero__chrome-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}

.route-viz {
  width: 100%;
  height: auto;
  display: block;
}

/* Route viz SVG elements */
.rv-edge {
  stroke: rgba(255,255,255,0.07);
  stroke-width: 1;
  fill: none;
}

.rv-edge--cross {
  stroke: rgba(255,255,255,0.04);
  stroke-dasharray: 3 8;
}

.rv-edge--active {
  stroke: var(--emerald-500);
  stroke-width: 1.75;
  stroke-opacity: 0.9;
  stroke-dasharray: 6 14;
  animation: flow-dash 1.2s linear infinite;
}

.rv-node-ring {
  fill: rgba(255,255,255,0.04);
  stroke: rgba(255,255,255,0.12);
  stroke-width: 1;
  transition: all var(--duration-slow) var(--ease-settle);
}

.rv-node-dot {
  fill: rgba(255,255,255,0.22);
  transition: fill var(--duration-base) var(--ease-settle);
}

.rv-node--active .rv-node-ring {
  fill: rgba(15,160,106,0.12);
  stroke: var(--emerald-500);
  stroke-width: 1.5;
}

.rv-node--active .rv-node-dot { fill: var(--emerald-500); }

.rv-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  fill: rgba(255,255,255,0.38);
  letter-spacing: 0.04em;
}

.rv-label--sub {
  font-size: 7.5px;
  fill: rgba(255,255,255,0.22);
}

.rv-hub-glow {
  fill: var(--emerald-500);
  opacity: 0.06;
  animation: hub-glow 3.2s ease-in-out infinite;
}

.rv-hub-ring {
  fill: rgba(255,255,255,0.04);
  stroke: rgba(255,255,255,0.14);
  stroke-width: 1;
}

.rv-hub-inner {
  fill: rgba(15,160,106,0.15);
}

.rv-hub-core {
  fill: var(--emerald-500);
  animation: hub-pulse 2.8s ease-in-out infinite;
}

.rv-hub-label {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  fill: rgba(255,255,255,0.35);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rv-packet {
  fill: var(--emerald-500);
}

.rv-route-tag {
  position: absolute;
  bottom: 16px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px;
  background: rgba(10,13,18,0.82);
  border: 1px solid rgba(15,160,106,0.3);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  pointer-events: none;
}

.rv-route-tag strong {
  color: var(--emerald-400);
  font-weight: 600;
}


/* 10. FEATURES SECTION (3×2 grid)
   ============================================================ */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.feature-card__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  letter-spacing: -0.012em;
}

.feature-card__body {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--text-secondary);
}


/* 11. CODE SECTION
   ============================================================ */
.code-section__inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-16);
  align-items: center;
}

.code-section__content {}

.code-section__content .heading-2 {
  margin-bottom: var(--space-4);
}

.code-section__content .body-base {
  margin-bottom: var(--space-6);
}


/* 12. SOLUTION SECTION
   ============================================================ */
.solution__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.solution__pillars {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.solution__pillar {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-border);
}

.solution__pillar:last-child { border-bottom: 1px solid var(--color-border); }

.solution__pillar-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-brand);
  padding-top: 2px;
  flex-shrink: 0;
  width: 18px;
}

.solution__pillar-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
  letter-spacing: -0.01em;
}

.solution__pillar-body {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Route scoring panel */
.scoring-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.scoring-panel__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px var(--space-5);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.scoring-panel__title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scoring-panel__body {
  padding: var(--space-4) var(--space-5);
}

.score-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  border: 1px solid transparent;
}

.score-row--best {
  background: var(--color-brand-subtle);
  border-color: var(--color-brand-border);
}

.score-row__rank {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  width: 16px;
  flex-shrink: 0;
}

.score-row--best .score-row__rank { color: var(--color-brand); }

.score-row__name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

.score-row--best .score-row__name { color: var(--text-primary); }

.score-row__bar-wrap {
  flex: 1.2;
  height: 3px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-row__bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--ink-300);
}

.score-row--best .score-row__bar { background: var(--color-brand); }

.score-row__score {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  width: 30px;
  text-align: right;
}

.score-row--best .score-row__score { color: var(--color-brand); }

.score-row__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.scoring-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--space-5);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.scoring-panel__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scoring-panel__stat-val {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.scoring-panel__stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
}


/* 13. HOW IT WORKS
   ============================================================ */
.hiw__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-12);
  align-items: start;
}

.hiw__steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hiw__step {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius-lg);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--duration-base) var(--ease-settle),
              border-color var(--duration-base) var(--ease-settle),
              box-shadow var(--duration-base) var(--ease-settle);
}

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

.hiw__step.is-active {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.hiw__step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-disabled);
  padding-top: 2px;
  flex-shrink: 0;
  transition: color var(--duration-base) var(--ease-settle);
}

.hiw__step.is-active .hiw__step-num { color: var(--color-brand); }

.hiw__step-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
  color: var(--text-secondary);
  letter-spacing: -0.012em;
  transition: color var(--duration-base) var(--ease-settle);
}

.hiw__step.is-active .hiw__step-title { color: var(--text-primary); }

.hiw__step-body {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--text-tertiary);
}

.hiw__panel {
  position: sticky;
  top: 80px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  min-height: 320px;
}

.hiw__panel-view {
  display: none;
  padding: var(--space-6);
}

.hiw__panel-view.is-active { display: block; }

.hiw__panel-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

/* TX card inside HIW */
.tx-card {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tx-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px var(--space-4);
}

.tx-row + .tx-row { border-top: 1px solid var(--color-border); }

.tx-key {
  font-size: 12px;
  color: var(--text-tertiary);
}

.tx-val {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

/* Route list item */
.route-chip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-2);
  animation: slide-in-left 0.25s var(--ease-out) both;
}

.route-chip:nth-child(2) { animation-delay: 60ms; }
.route-chip:nth-child(3) { animation-delay: 120ms; }
.route-chip:nth-child(4) { animation-delay: 180ms; }

.route-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--ink-300);
  flex-shrink: 0;
}

.route-chip__name {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.route-chip__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Settled card */
.settled-card {
  text-align: center;
  padding: var(--space-6) var(--space-4);
}

.settled-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-brand-subtle);
  border: 1px solid var(--color-brand-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: var(--space-4);
  color: var(--color-brand);
}

.settled-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.settled-stat {
  padding: var(--space-3);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.settled-stat__val {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.settled-stat__key {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}


/* 14. NETWORK SECTION
   ============================================================ */
.network {
  position: relative;
  overflow: hidden;
}

.network__canvas-wrap {
  position: relative;
  max-width: 880px;
  margin-inline: auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow-xl);
}

.network__canvas { display: block; width: 100%; height: auto; }

.network__overlay-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px;
  background: rgba(10,13,18,0.82);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.45);
}

.network__route-info {
  position: absolute;
  bottom: 14px;
  right: 14px;
  padding: 8px 14px;
  background: rgba(10,13,18,0.82);
  border: 1px solid rgba(15,160,106,0.28);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.45);
}

.network__route-info strong {
  display: block;
  color: var(--emerald-400);
  font-size: var(--text-sm);
  margin-bottom: 2px;
}


/* 15. METRICS BAND
   ============================================================ */
.metrics-band {
  background: var(--ink-950);
  padding-block: 64px;
}

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

.metric-item {
  padding: var(--space-2) var(--space-8) var(--space-2) 0;
}

.metric-item + .metric-item {
  border-left: 1px solid rgba(255,255,255,0.07);
  padding-left: var(--space-8);
  padding-right: 0;
}

.metric-item__val {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 4vw, var(--text-4xl));
  font-weight: var(--weight-semibold);
  letter-spacing: -0.04em;
  color: var(--ink-0);
  display: block;
  margin-bottom: 6px;
  line-height: 1;
}

.metric-item__label {
  font-size: var(--text-sm);
  color: var(--ink-500);
  line-height: 1.4;
}

.metric-item__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-700);
  margin-top: var(--space-2);
}


/* 16. PARTNER SECTION
   ============================================================ */
.partner__benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.benefit-card {
  padding: var(--space-6);
}

.benefit-card__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--color-brand-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--color-brand);
  transition: transform var(--duration-base) var(--ease-settle);
}

.benefit-card:hover .benefit-card__icon { transform: scale(1.08); }

.benefit-card__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  letter-spacing: -0.012em;
}

.benefit-card__body {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--text-secondary);
}

.partner__types {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--color-surface);
  transition: border-color var(--duration-fast) var(--ease-settle),
              background var(--duration-fast) var(--ease-settle),
              color var(--duration-fast) var(--ease-settle);
}

.type-chip:hover {
  border-color: var(--color-brand-border);
  color: var(--color-brand);
  background: var(--color-brand-subtle);
}

.type-chip__dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--ink-300);
}

.type-chip:hover .type-chip__dot { background: var(--color-brand); }


/* 17. CTA BAND
   ============================================================ */
.cta-band {
  background: var(--emerald-700);
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/motif-network.svg') center/110% no-repeat;
  opacity: 0.05;
  pointer-events: none;
}

.cta-band__inner {
  position: relative;
  z-index: 1;
  padding: 72px var(--space-8);
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.cta-band__h2 {
  font-size: clamp(1.75rem, 3.5vw, var(--text-4xl));
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink-0);
  margin-bottom: var(--space-4);
}

.cta-band__sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

.cta-band__btns {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}


/* 18. FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding-top: var(--space-12);
  padding-bottom: var(--space-8);
}

.footer__main {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  margin-bottom: var(--space-4);
}

.footer__brand-name {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  letter-spacing: -0.022em;
  color: var(--text-primary);
}

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: 1.65;
  max-width: 220px;
  margin-bottom: var(--space-5);
}

.footer__contact {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.footer__contact a { color: var(--color-brand); }
.footer__contact a:hover { color: var(--color-brand-hover); }

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
}

.footer__link {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: 5px 0;
  transition: color var(--duration-fast) var(--ease-settle);
  text-decoration: none;
}

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

.footer__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}

.footer__disclaimer {
  font-size: 12px;
  color: var(--text-disabled);
  max-width: 520px;
  line-height: 1.65;
}

.footer__copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-disabled);
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}

.footer__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 11px;
  color: var(--text-tertiary);
}


/* 19. SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 60ms; }
.reveal--delay-2 { transition-delay: 120ms; }
.reveal--delay-3 { transition-delay: 180ms; }
.reveal--delay-4 { transition-delay: 240ms; }
.reveal--delay-5 { transition-delay: 300ms; }


/* 20. KEYFRAMES
   ============================================================ */
@keyframes nav-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes flow-dash {
  to { stroke-dashoffset: -40; }
}

@keyframes hub-glow {
  0%, 100% { opacity: 0.05; transform: scale(1); }
  50%       { opacity: 0.12; transform: scale(1.18); }
}

@keyframes hub-pulse {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 1; }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.72); }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slide-down-sm {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* 21. HERO STAGGER ANIMATIONS
   ============================================================ */
.hero__announce   { animation: fade-up 0.5s var(--ease-out) 0.1s both; }
.hero__h1         { animation: fade-up 0.5s var(--ease-out) 0.18s both; }
.hero__sub        { animation: fade-up 0.5s var(--ease-out) 0.26s both; }
.hero__ctas       { animation: fade-up 0.5s var(--ease-out) 0.34s both; }
.hero__trust      { animation: fade-up 0.5s var(--ease-out) 0.42s both; }
.hero__frame-wrap { animation: fade-up 0.6s var(--ease-out) 0.5s both; }


/* 22. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .solution__inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .scoring-panel { order: -1; }

  .hiw__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .hiw__panel { position: static; }

  .code-section__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

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

  .metrics-band__grid { grid-template-columns: repeat(2, 1fr); }

  .metric-item:nth-child(3) {
    border-left: none;
    padding-left: 0;
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255,255,255,0.07);
  }
  .metric-item:nth-child(4) {
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255,255,255,0.07);
  }

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

@media (max-width: 768px) {
  .section { padding-block: 56px; }

  .container,
  .container--tight,
  .container--narrow { padding-inline: var(--space-5); }

  .nav__links { display: none; }
  .nav__actions .btn--secondary { display: none; }
  .nav__mobile-btn { display: inline-flex; }

  .hero { padding-top: 64px; }
  .hero__content { padding-inline: var(--space-5); }
  .hero__frame-wrap { padding-inline: var(--space-5); }

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

  .metrics-band__grid { grid-template-columns: 1fr 1fr; }

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

  .footer__main {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
  .footer__brand-col { grid-column: span 2; }

  .footer__bottom { flex-direction: column-reverse; gap: var(--space-4); }
  .footer__copy { align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero__ctas { flex-direction: column; align-items: center; }
  .hero__trust { gap: var(--space-4); }

  .metrics-band__grid { grid-template-columns: 1fr; }
  .metric-item + .metric-item {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: var(--space-5);
  }

  .settled-stats { grid-template-columns: 1fr; }
  .cta-band__btns { flex-direction: column; align-items: center; }
  .footer__main { grid-template-columns: 1fr; }
  .footer__brand-col { grid-column: span 1; }
}


/* ============================================================
   MODAL
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,13,18,0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: modal-fade 0.22s var(--ease-out) both;
}

.modal__card {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: modal-up 0.28s var(--ease-out) both;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.modal__card::-webkit-scrollbar { width: 4px; }
.modal__card::-webkit-scrollbar-track { background: transparent; }
.modal__card::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 2px; }

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-surface);
  z-index: 2;
}

.modal__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.modal__sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 340px;
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  margin-top: 2px;
  transition: background var(--duration-fast) var(--ease-settle),
              color var(--duration-fast) var(--ease-settle),
              border-color var(--duration-fast) var(--ease-settle);
}

.modal__close:hover {
  background: var(--color-bg-subtle);
  color: var(--text-primary);
  border-color: var(--color-border-strong);
}

.modal__form {
  padding: var(--space-5) var(--space-6) var(--space-6);
}

/* Success state */
.modal__success {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  animation: fade-up 0.35s var(--ease-out) both;
}

.modal__success-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--color-brand-subtle);
  border: 1px solid var(--color-brand-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: var(--space-5);
  color: var(--color-brand);
}

.modal__success-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.018em;
  margin-bottom: var(--space-3);
}

.modal__success-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 300px;
  margin-inline: auto;
  margin-bottom: var(--space-6);
}


/* ============================================================
   FORM ELEMENTS
   ============================================================ */

:root {
  --color-danger: #e5534b;
  --color-danger-subtle: #fef0ef;
  --color-danger-border: #f4a19d;
}

[data-theme="dark"] {
  --color-danger: #f87171;
  --color-danger-subtle: rgba(229,83,75,0.15);
  --color-danger-border: rgba(229,83,75,0.35);
}

.form-row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: var(--space-4);
}

.form-field:last-of-type { margin-bottom: var(--space-5); }

.form-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  letter-spacing: 0.005em;
}

.form-label__opt {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-disabled);
  letter-spacing: 0.04em;
  font-weight: 400;
}

.form-input {
  height: 40px;
  padding: 0 12px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-primary);
  width: 100%;
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-settle),
              box-shadow var(--duration-fast) var(--ease-settle),
              background var(--duration-fast) var(--ease-settle);
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder { color: var(--text-disabled); }

.form-input:hover { border-color: var(--color-border-strong); background: var(--color-surface); }

.form-input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  background: var(--color-surface);
}

.form-input.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(229,83,75,0.2);
}

.form-input.is-invalid:focus {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(229,83,75,0.25);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a95a4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  min-height: 86px;
  line-height: 1.55;
}

.form-error {
  font-size: 11px;
  color: var(--color-danger);
  margin-top: -2px;
  display: none;
}

.form-field.has-error .form-error { display: block; }
.form-field.has-error .form-input { border-color: var(--color-danger); }

@media (max-width: 420px) {
  .form-row--2 { grid-template-columns: 1fr; }
}


/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */

.lang-switcher {
  position: relative;
}

.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-settle),
              color var(--duration-fast) var(--ease-settle),
              border-color var(--duration-fast) var(--ease-settle);
}

.lang-switcher__btn:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-border-strong);
  color: var(--text-primary);
}

.lang-switcher__btn.is-open {
  border-color: var(--color-brand);
  color: var(--text-primary);
  background: var(--color-bg-subtle);
}

.lang-switcher__chevron {
  transition: transform var(--duration-fast) var(--ease-settle);
  color: var(--text-disabled);
}

.lang-switcher__btn.is-open .lang-switcher__chevron {
  transform: rotate(180deg);
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 168px;
  padding: var(--space-1);
  z-index: 50;
  animation: slide-down-sm 0.16s var(--ease-out) both;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 7px var(--space-3);
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-align: left;
  transition: background var(--duration-fast) var(--ease-settle),
              color var(--duration-fast) var(--ease-settle);
}

.lang-option:hover {
  background: var(--color-bg-subtle);
  color: var(--text-primary);
}

.lang-option.is-active {
  color: var(--color-brand);
  font-weight: var(--weight-medium);
}

.lang-option.is-active::after {
  content: '';
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-brand);
  flex-shrink: 0;
}

.lang-option__flag {
  font-size: 15px;
  line-height: 1;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.lang-option__name {
  flex: 1;
}

/* Theme toggle button visual improvement */
.btn--icon {
  border: 1px solid var(--color-border);
}

.btn--icon:hover {
  border-color: var(--color-border-strong);
}


/* ============================================================
   MODAL KEYFRAMES
   ============================================================ */

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-up {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
