/* =====================================================================
   IDO Ecommerce — Design System
   Performance marketing company website
   No frameworks. No build step. Hand-authored.
   ---------------------------------------------------------------------
   01  Reset & base
   02  Design tokens
   03  Typography
   04  Layout primitives
   05  Buttons & controls
   06  Header & navigation
   07  Hero
   08  Cards & surfaces
   09  Process flow & timeline
   10  Specification tables
   11  Accordion
   12  Forms
   13  CTA band
   14  Footer
   15  Prose (legal pages)
   16  Motion
   17  Responsive
   ===================================================================== */


/* =====================================================================
   01  RESET & BASE
   ===================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}

/* Film grain — sits above the background, below all content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

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

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: none; cursor: pointer; }

ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: #fff; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 550;
  font-size: .9rem;
  transition: top .2s ease;
}
.skip-link:focus { top: 20px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


/* =====================================================================
   02  DESIGN TOKENS
   ===================================================================== */

:root {
  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono",
               "Roboto Mono", Menlo, Consolas, monospace;

  /* Brand — constant across themes */
  --brand-1: #3B82F6;
  --brand-2: #0EA5E9;
  --brand-3: #06B6D4;
  --brand-gradient: linear-gradient(120deg, var(--brand-1) 0%, var(--brand-2) 50%, var(--brand-3) 100%);

  /* Geometry */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --container: 1200px;
  --container-narrow: 780px;
  --header-h: 68px;

  /* Motion */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Dark theme (default paint) ---------- */
:root,
[data-theme="dark"] {
  color-scheme: dark;

  --bg:             #070B12;
  --bg-subtle:      #0A0F18;
  --surface:        #0D131E;
  --surface-2:      #121A27;
  --surface-hover:  #16202F;

  --border:         rgba(255, 255, 255, .075);
  --border-strong:  rgba(255, 255, 255, .14);
  --border-accent:  rgba(59, 130, 246, .35);

  --text:           #E9EFF7;
  --text-muted:     #94A5BC;
  --text-dim:       #64748B;

  --accent:         #4C8DF6;
  --accent-hover:   #6BA1F8;
  --accent-soft:    rgba(76, 141, 246, .12);
  --accent-glow:    rgba(76, 141, 246, .28);
  --on-accent:      #FFFFFF;

  --grain-opacity: .028;
  --glass-bg:      rgba(7, 11, 18, .72);
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
  --shadow:        0 8px 30px rgba(0, 0, 0, .45);
  --shadow-lg:     0 24px 60px rgba(0, 0, 0, .55);
  --orb-opacity:   .55;
  --grid-line:     rgba(255, 255, 255, .028);
}

/* ---------- Light theme ---------- */
[data-theme="light"] {
  color-scheme: light;

  --bg:             #FFFFFF;
  --bg-subtle:      #F7F9FC;
  --surface:        #FFFFFF;
  --surface-2:      #F4F7FB;
  --surface-hover:  #EEF3FA;

  --border:         rgba(9, 17, 30, .09);
  --border-strong:  rgba(9, 17, 30, .16);
  --border-accent:  rgba(37, 99, 235, .32);

  --text:           #0A1220;
  --text-muted:     #4B5C74;
  --text-dim:       #71829A;

  --accent:         #2563EB;
  --accent-hover:   #1D4ED8;
  --accent-soft:    rgba(37, 99, 235, .07);
  --accent-glow:    rgba(37, 99, 235, .18);
  --on-accent:      #FFFFFF;

  --grain-opacity: .016;
  --glass-bg:      rgba(255, 255, 255, .78);
  --shadow-sm:     0 1px 2px rgba(9, 17, 30, .06);
  --shadow:        0 8px 30px rgba(9, 17, 30, .07);
  --shadow-lg:     0 24px 60px rgba(9, 17, 30, .1);
  --orb-opacity:   .3;
  --grid-line:     rgba(9, 17, 30, .035);
}


/* =====================================================================
   03  TYPOGRAPHY
   ===================================================================== */

h1, h2, h3, h4, h5 {
  font-weight: 620;
  line-height: 1.14;
  letter-spacing: -.028em;
  color: var(--text);
  text-wrap: balance;
}

.display {
  font-size: clamp(2.5rem, 6.2vw, 4.5rem);
  font-weight: 640;
  letter-spacing: -.042em;
  line-height: 1.02;
}

.h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.038em; line-height: 1.06; }
.h2 { font-size: clamp(1.75rem, 3.6vw, 2.65rem); letter-spacing: -.032em; line-height: 1.12; }
.h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: -.024em; }
.h4 { font-size: 1.075rem; letter-spacing: -.016em; font-weight: 580; }

p { text-wrap: pretty; }

.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.6;
  color: var(--text-muted);
  letter-spacing: -.011em;
}

.body-lg { font-size: 1.075rem; line-height: 1.7; color: var(--text-muted); }
.body    { font-size: .975rem; line-height: 1.72; color: var(--text-muted); }
.body-sm { font-size: .9rem;   line-height: 1.65; color: var(--text-muted); }

.mono {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
}

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-strong { color: var(--text); font-weight: 550; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 18px;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  opacity: .6;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: var(--surface);
  font-size: .8rem;
  font-weight: 480;
  color: var(--text-muted);
  letter-spacing: -.005em;
}
.badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-3);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex: none;
}


/* =====================================================================
   04  LAYOUT PRIMITIVES
   ===================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4.5vw, 40px);
  position: relative;
  z-index: 2;
}

.container-narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(68px, 9vw, 118px); position: relative; }
.section-sm { padding-block: clamp(52px, 6vw, 78px); }
.section-subtle { background: var(--bg-subtle); }

.section-line { border-top: 1px solid var(--border); }

.section-head { max-width: 660px; margin-bottom: clamp(40px, 5vw, 62px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .h2 + p { margin-top: 18px; }

.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: start;
}
.split-wide { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.split-toc  { grid-template-columns: minmax(0, 1fr) 240px; }

.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 26px; }

.hairline { height: 1px; background: var(--border); border: 0; }

/* Faint engineering grid, used behind select sections */
.grid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 78%);
}


/* =====================================================================
   05  BUTTONS & CONTROLS
   ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: .935rem;
  font-weight: 530;
  letter-spacing: -.011em;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .18s var(--ease-out),
              border-color .18s var(--ease-out),
              transform .18s var(--ease-out),
              box-shadow .18s var(--ease-out),
              color .18s var(--ease-out);
}
.btn:active { transform: translateY(0) scale(.985); }

.btn svg { flex: none; transition: transform .22s var(--ease-out); }
.btn:hover svg.arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 6px 20px -8px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 12px 28px -8px var(--accent-glow);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-dim);
  transform: translateY(-1px);
}

.btn-ghost { color: var(--text-muted); padding-inline: 14px; }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

.btn-sm { padding: 9px 17px; font-size: .875rem; border-radius: 9px; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 11px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .92rem;
  font-weight: 520;
  color: var(--accent);
  letter-spacing: -.01em;
  transition: gap .2s var(--ease-out), color .2s;
}
.link-arrow:hover { gap: 11px; color: var(--accent-hover); }


/* =====================================================================
   06  HEADER & NAVIGATION
   ===================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease-out),
              border-color .3s var(--ease-out),
              backdrop-filter .3s var(--ease-out);
}
.site-header.scrolled {
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.0125rem;
  letter-spacing: -.028em;
  color: var(--text);
  flex: none;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  flex: none;
  transition: transform .3s var(--ease);
}
.brand-name { white-space: nowrap; }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
}
.nav-desktop a {
  position: relative;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .915rem;
  font-weight: 470;
  letter-spacing: -.011em;
  color: var(--text-muted);
  transition: color .18s, background-color .18s;
}
.nav-desktop a:hover { color: var(--text); background: var(--surface-2); }
.nav-desktop a[aria-current="page"] { color: var(--text); font-weight: 520; }
.nav-desktop a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--brand-gradient);
}

.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  transition: background-color .18s, color .18s, border-color .18s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }

.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }

.nav-toggle { display: none; }
.nav-toggle .bar {
  display: block;
  width: 17px; height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle .bar + .bar { margin-top: 4.5px; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  background: var(--bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: 28px clamp(20px, 5vw, 40px) 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .26s var(--ease-out), transform .26s var(--ease-out), visibility .26s;
  overflow-y: auto;
}
.mobile-nav.open { opacity: 1; visibility: visible; transform: none; }
.mobile-nav a.m-link {
  padding: 15px 4px;
  font-size: 1.35rem;
  font-weight: 560;
  letter-spacing: -.028em;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color .18s, padding-left .22s var(--ease-out);
}
.mobile-nav a.m-link:hover { color: var(--accent); padding-left: 10px; }
.mobile-nav a.m-link[aria-current="page"] { color: var(--accent); }
.mobile-nav .m-foot { margin-top: 26px; display: grid; gap: 10px; }

body.nav-open { overflow: hidden; }


/* =====================================================================
   07  HERO
   ===================================================================== */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(64px, 10vw, 118px));
  padding-bottom: clamp(56px, 8vw, 96px);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--orb-opacity);
  will-change: transform;
}
.orb-1 {
  width: 620px; height: 620px;
  top: -280px; left: 48%;
  background: radial-gradient(circle, rgba(59,130,246,.5), transparent 68%);
  animation: drift-a 22s ease-in-out infinite alternate;
}
.orb-2 {
  width: 460px; height: 460px;
  top: -120px; left: 2%;
  background: radial-gradient(circle, rgba(6,182,212,.34), transparent 68%);
  animation: drift-b 27s ease-in-out infinite alternate;
}
.orb-3 {
  width: 380px; height: 380px;
  top: 200px; right: -110px;
  background: radial-gradient(circle, rgba(14,165,233,.3), transparent 70%);
  animation: drift-a 31s ease-in-out infinite alternate-reverse;
}
@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-60px, 46px, 0) scale(1.12); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(70px, 36px, 0) scale(1.08); }
}

/* Horizon line under the hero */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 22%, var(--border-strong) 78%, transparent);
  z-index: 1;
}

.hero-inner { max-width: 860px; }
.hero .display { margin-top: 22px; }
.hero .lede { margin-top: 24px; max-width: 620px; }
.hero .btn-row { margin-top: 38px; }

/* Test → Measure → Optimize → Scale */
.loop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.loop-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: -.008em;
  color: var(--text);
  transition: border-color .3s, transform .3s var(--ease-out), background-color .3s;
}
.loop-item:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.loop-item .n {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--accent);
  letter-spacing: .06em;
}
.loop-sep { color: var(--text-dim); flex: none; }

/* Compact page hero for interior pages */
.page-hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(52px, 7vw, 84px));
  padding-bottom: clamp(38px, 5vw, 58px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  isolation: isolate;
}
.page-hero .orb-1 { width: 520px; height: 520px; top: -300px; left: 55%; }
.page-hero .orb-2 { width: 380px; height: 380px; top: -200px; left: 5%; }
.page-hero-inner { max-width: 720px; }
.page-hero .lede { margin-top: 20px; }


/* =====================================================================
   08  CARDS & SURFACES
   ===================================================================== */

.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color .28s var(--ease-out),
              transform .28s var(--ease-out),
              box-shadow .28s var(--ease-out),
              background-color .28s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--accent-glow), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .32s var(--ease-out);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card:hover::before { opacity: 1; }

.card-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  margin-bottom: 20px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
}
.card-icon svg { width: 19px; height: 19px; }

.card .h4 { margin-bottom: 9px; }
.card p { font-size: .925rem; line-height: 1.68; color: var(--text-muted); }
.card .link-arrow { margin-top: 16px; }

.card-index {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--text-dim);
  margin-bottom: 16px;
}

/* Numbered belief / principle block */
.belief { padding: 26px 0; border-top: 1px solid var(--border); }
.belief:first-child { border-top: 0; padding-top: 0; }
.belief-label {
  display: flex;
  align-items: baseline;
  gap: 13px;
  margin-bottom: 10px;
}
.belief-label .n {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--accent);
  letter-spacing: .1em;
  flex: none;
}
.belief p { font-size: .96rem; line-height: 1.72; color: var(--text-muted); }

/* Glass panel */
.panel {
  padding: clamp(26px, 3.4vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.panel-glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.panel-accent { border-color: var(--border-accent); background: var(--accent-soft); }

/* Checklist */
.checklist { display: grid; gap: 13px; }
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: .945rem;
  line-height: 1.62;
  color: var(--text-muted);
}
.checklist svg { flex: none; margin-top: 4px; color: var(--accent); width: 15px; height: 15px; }
.checklist .no svg { color: var(--text-dim); }


/* =====================================================================
   09  PROCESS FLOW & TIMELINE
   ===================================================================== */

/* Horizontal chain — homepage */
.flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  counter-reset: flow;
}
.flow-step {
  position: relative;
  padding: 0 16px 0 0;
  counter-increment: flow;
}
.flow-step::before {
  content: "";
  position: absolute;
  top: 7px; left: 15px; right: 0;
  height: 1px;
  background: var(--border-strong);
}
.flow-step:last-child::before { display: none; }
.flow-node {
  position: relative;
  z-index: 2;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.flow-node::after {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.flow-step h4 {
  font-size: .94rem;
  font-weight: 550;
  letter-spacing: -.016em;
  margin-bottom: 7px;
}
.flow-step p { font-size: .83rem; line-height: 1.6; color: var(--text-muted); padding-right: 8px; }
.flow-step .idx {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .1em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 5px;
}

/* Vertical timeline — process page */
.timeline { position: relative; padding-left: 0; }
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 36px);
  padding-bottom: 34px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before {
  content: "";
  position: absolute;
  top: 46px; bottom: -34px; left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, var(--border-strong), var(--border));
}
.tl-item:last-child .tl-rail::before { display: none; }
.tl-marker {
  position: relative;
  z-index: 2;
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 550;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 0 5px var(--bg);
  flex: none;
  transition: background-color .3s, color .3s, transform .3s var(--ease-out);
}
.tl-item:hover .tl-marker {
  background: var(--accent);
  color: var(--on-accent);
  transform: scale(1.06);
}
.tl-body { padding-top: 3px; }
.tl-body .h3 { margin-bottom: 11px; }
.tl-body > p { max-width: 62ch; }
.tl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tag {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tl-out {
  margin-top: 18px;
  padding: 14px 18px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.tl-out strong { color: var(--text); font-weight: 550; }


/* =====================================================================
   10  SPECIFICATION TABLES
   ===================================================================== */

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.spec-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.spec-table th,
.spec-table td {
  padding: 15px 22px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.spec-table tr:last-child th,
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table th {
  width: 33%;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--surface-2);
  white-space: nowrap;
}
.spec-table td { color: var(--text-muted); line-height: 1.62; }
.spec-table td strong { color: var(--text); font-weight: 550; }


/* =====================================================================
   11  ACCORDION
   ===================================================================== */

.accordion { border-top: 1px solid var(--border); }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  cursor: pointer;
  list-style: none;
  font-size: 1.02rem;
  font-weight: 530;
  letter-spacing: -.018em;
  color: var(--text);
  transition: color .18s;
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary:hover { color: var(--accent); }
.acc-icon {
  flex: none;
  width: 20px; height: 20px;
  position: relative;
  color: var(--text-dim);
  transition: color .2s;
}
.acc-icon::before,
.acc-icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: currentColor;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform .3s var(--ease);
}
.acc-icon::before { width: 12px; height: 1.5px; }
.acc-icon::after  { width: 1.5px; height: 12px; }
.acc-item[open] .acc-icon { color: var(--accent); }
.acc-item[open] .acc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc-body { padding: 0 4px 24px; max-width: 68ch; }
.acc-body p { font-size: .945rem; line-height: 1.72; color: var(--text-muted); }
.acc-body p + p { margin-top: 12px; }


/* =====================================================================
   12  FORMS
   ===================================================================== */

.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field { display: grid; gap: 7px; }
.field label {
  font-size: .84rem;
  font-weight: 520;
  letter-spacing: -.008em;
  color: var(--text);
}
.field label .req { color: var(--accent); margin-left: 2px; }

.input, .textarea, .select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-subtle);
  color: var(--text);
  font-size: .94rem;
  transition: border-color .18s, background-color .18s, box-shadow .18s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { min-height: 132px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394A5BC' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.form-note { font-size: .82rem; color: var(--text-dim); line-height: 1.6; }
.form-note a { color: var(--accent); }

.form-status {
  display: none;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: .9rem;
  line-height: 1.55;
}
.form-status.show { display: block; }
.form-status.ok  { background: var(--accent-soft); border: 1px solid var(--border-accent); color: var(--text); }
.form-status.err { background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-muted); }


/* =====================================================================
   13  CTA BAND
   ===================================================================== */

.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}
.cta-band::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: 760px; height: 500px;
  left: 50%; top: 100%;
  transform: translate(-50%, -55%);
  background: radial-gradient(ellipse, rgba(59,130,246,.24), transparent 66%);
  filter: blur(70px);
  opacity: var(--orb-opacity);
  pointer-events: none;
}
.cta-inner { text-align: center; max-width: 640px; margin-inline: auto; }
.cta-inner .btn-row { justify-content: center; margin-top: 32px; }
.cta-inner .lede { margin-top: 18px; }


/* =====================================================================
   14  FOOTER
   ===================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding-block: clamp(48px, 6vw, 68px) 30px;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 2fr);
  gap: clamp(32px, 6vw, 72px);
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-brand p {
  margin-top: 16px;
  font-size: .9rem;
  line-height: 1.68;
  color: var(--text-muted);
  max-width: 34ch;
}
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer-col a,
.footer-col span {
  display: block;
  font-size: .895rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  transition: color .16s;
  overflow-wrap: anywhere;
}
.footer-col a:hover { color: var(--accent); }

.footer-disclosure {
  margin-top: 30px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  font-size: .81rem;
  line-height: 1.68;
  color: var(--text-dim);
}
.footer-disclosure strong { color: var(--text-muted); font-weight: 550; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  font-size: .82rem;
  color: var(--text-dim);
}


/* =====================================================================
   15  PROSE (legal pages)
   ===================================================================== */

.prose { max-width: 72ch; }
.prose h2 {
  font-size: 1.32rem;
  letter-spacing: -.024em;
  margin: 44px 0 14px;
  scroll-margin-top: 100px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.03rem; font-weight: 560; margin: 26px 0 10px; }
.prose p { font-size: .965rem; line-height: 1.78; color: var(--text-muted); margin-bottom: 15px; }
.prose ul { margin: 0 0 18px; display: grid; gap: 9px; }
.prose ul li {
  position: relative;
  padding-left: 20px;
  font-size: .955rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: 11px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .65;
}
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 560; }

.callout {
  margin: 26px 0;
  padding: 20px 22px;
  border: 1px solid var(--border-accent);
  border-left-width: 2px;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
}
.callout p { margin-bottom: 0; font-size: .93rem; }

.toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  align-self: start;
}
.toc h5 {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
  font-weight: 500;
}
.toc a {
  display: block;
  padding: 6px 0 6px 13px;
  border-left: 1.5px solid var(--border);
  font-size: .86rem;
  color: var(--text-muted);
  transition: color .16s, border-color .16s;
}
.toc a:hover { color: var(--text); border-left-color: var(--accent); }


/* =====================================================================
   16  MOTION
   ===================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .72s var(--ease), transform .72s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .orb { animation: none; }
}


/* =====================================================================
   17  RESPONSIVE
   ===================================================================== */

@media (max-width: 1080px) {
  .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 34px; }
  .flow-step:nth-child(4)::before { display: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 62px; }

  .nav-desktop { display: none; }
  .nav-toggle { display: grid; place-items: center; }

  .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split-wide, .split-toc { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
  .flow-step::before { display: none; }
  .spec-table th, .spec-table td { padding: 13px 16px; }
  .spec-table { font-size: .885rem; }
  .spec-table th { width: 38%; white-space: normal; }
}

@media (max-width: 560px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .card { padding: 24px; }
  .btn-row .btn { width: 100%; }
  .tl-item { grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
  .tl-marker { width: 38px; height: 38px; border-radius: 11px; font-size: .72rem; }
  .tl-rail::before { top: 40px; }
  .loop { gap: 8px; }
  .loop-sep { display: none; }
}

@media print {
  .site-header, .mobile-nav, .cta-band, .orb, .hero-bg { display: none !important; }
  body { background: #fff; color: #000; }
}
