/* =============================================================
   QAI Design System — Colors & Type
   "Forest Ledger AI / The Sovereign Curator"
   ============================================================= */

/* --- Webfonts (Google Fonts — substitution flagged in README) --- */

/* Material Symbols — bind class to the font so it always applies,
   and hide the literal glyph name before the font loads. */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
/* Hide the raw ligature text while the font is still loading */
.material-symbols-outlined:not(:lang(x)) {
  font-family: 'Material Symbols Outlined', 'Material Symbols Outlined Fallback';
}
@font-face {
  font-family: 'Material Symbols Outlined Fallback';
  src: local('Arial');
  size-adjust: 0%;
}

:root {
  /* ====== BRAND / PRIMARY ====== */
  --primary:                 #00361a;   /* Deepest forest — text/icon primary */
  --primary-container:       #1a4d2e;   /* The "Forest" — brand actions, CTA */
  --on-primary:              #ffffff;
  --on-primary-container:    #88bd95;
  --primary-fixed:           #b8f0c5;
  --primary-fixed-dim:       #9dd3aa;
  --on-primary-fixed:        #00210e;
  --on-primary-fixed-variant:#1d5031;
  --inverse-primary:         #9dd3aa;
  --surface-tint:            #366847;

  /* ====== SECONDARY (muted green) ====== */
  --secondary:               #4f6353;
  --secondary-container:     #cfe5d1;   /* Soft sage — chips, highlights */
  --on-secondary:            #ffffff;
  --on-secondary-container:  #536757;
  --secondary-fixed:         #d2e8d4;
  --secondary-fixed-dim:     #b6ccb8;
  --on-secondary-fixed:      #0d1f13;
  --on-secondary-fixed-variant:#384b3c;

  /* ====== TERTIARY (AI Pulse — accent red) ====== */
  --tertiary:                #4f1c26;
  --tertiary-container:      #6a323b;   /* Used sparingly for "AI Pulse" insights */
  --on-tertiary:             #ffffff;
  --on-tertiary-container:   #e89ca5;
  --tertiary-fixed:          #ffd9dd;
  --tertiary-fixed-dim:      #ffb2bb;
  --on-tertiary-fixed:       #380b15;
  --on-tertiary-fixed-variant:#6e353e;

  /* ====== SURFACE (tonal hierarchy — never borders) ====== */
  --surface:                 #f8f9fa;   /* L0 — "the desk" */
  --surface-bright:          #f8f9fa;
  --surface-dim:             #d9dadb;
  --surface-container-lowest:#ffffff;   /* L2 — primary cards ("lifted") */
  --surface-container-low:   #f3f4f5;   /* L1 — sidebars, sections */
  --surface-container:       #edeeef;
  --surface-container-high:  #e7e8e9;   /* Input backgrounds */
  --surface-container-highest:#e1e3e4;
  --surface-variant:         #e1e3e4;
  --background:              #f8f9fa;
  --inverse-surface:         #2e3132;
  --inverse-on-surface:      #f0f1f2;

  /* ====== TEXT (never pure black) ====== */
  --on-surface:              #191c1d;
  --on-surface-variant:      #414942;
  --on-background:           #191c1d;

  /* ====== OUTLINE (ghost borders only) ====== */
  --outline:                 #717971;
  --outline-variant:         #c1c9bf;   /* Use at 15% opacity only */

  /* ====== STATUS ====== */
  --error:                   #ba1a1a;
  --error-container:         #ffdad6;
  --on-error:                #ffffff;
  --on-error-container:      #93000a;
  --success:                 #1a4d2e;   /* Reuses forest */
  --success-soft:            #cfe5d1;
  --warning:                 #6a323b;
  --server-pulse:            #00ff66;   /* Sidebar SERVER status dot */

  /* ====== TYPOGRAPHY — Families ====== */
  --font-headline:  'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-body:      'Inter',   ui-sans-serif, system-ui, sans-serif;
  --font-label:     'Inter',   ui-sans-serif, system-ui, sans-serif;
  --font-mono:      ui-monospace, 'SF Mono', 'JetBrains Mono', monospace;

  /* ====== TYPE SCALE (Editorial — high contrast) ====== */
  --display-lg:     4.5rem;    /* 72px — hero stats */
  --display-md:     3.75rem;   /* 60px */
  --display-sm:     3rem;      /* 48px */
  --headline-lg:    2.25rem;   /* 36px */
  --headline-md:    1.5rem;    /* 24px — section titles */
  --headline-sm:    1.25rem;   /* 20px */
  --title-lg:       1.125rem;  /* 18px */
  --title-md:       1rem;      /* 16px */
  --body-lg:        1.125rem;  /* 18px */
  --body-md:        1rem;      /* 16px */
  --body-sm:        0.875rem;  /* 14px */
  --label-lg:       0.875rem;  /* 14px */
  --label-md:       0.75rem;   /* 12px — uppercase, tracked */
  --label-sm:       0.625rem;  /* 10px — eyebrow/caption, tracked */

  /* ====== TRACKING (editorial feel) ====== */
  --tracking-tight:    -0.02em;   /* Headlines */
  --tracking-tighter:  -0.035em;  /* Display */
  --tracking-normal:   0;
  --tracking-wide:     0.05em;
  --tracking-widest:   0.2em;     /* Uppercase eyebrows */

  /* ====== SPACING (8-pt grid) ====== */
  --space-1:  0.25rem;   /* 4  */
  --space-2:  0.5rem;    /* 8  */
  --space-3:  0.75rem;   /* 12 */
  --space-4:  1rem;      /* 16 */
  --space-5:  1.25rem;   /* 20 */
  --space-6:  1.5rem;    /* 24 */
  --space-8:  2rem;      /* 32 */
  --space-10: 2.5rem;    /* 40 */
  --space-12: 3rem;      /* 48 */
  --space-16: 4rem;      /* 64 */
  --space-20: 5rem;      /* 80 */
  --space-24: 6rem;      /* 96 */

  /* ====== RADII (cascading roundness) ====== */
  --radius-xs:    0.25rem;  /* 4  — inline */
  --radius-sm:    0.375rem; /* 6  */
  --radius-md:    0.5rem;   /* 8  — nested */
  --radius-lg:    0.75rem;  /* 12 — buttons, inputs (rounded-xl per brief) */
  --radius-xl:    1rem;     /* 16 — cards */
  --radius-2xl:   1.5rem;   /* 24 — major containers (rounded-3xl per brief) */
  --radius-full:  9999px;

  /* ====== SHADOWS (atmospheric, not structural) ====== */
  --shadow-flat:    none;
  --shadow-sm:      0 1px 2px 0 rgba(25,28,29,0.03);
  --shadow-md:      0 4px 24px rgba(0,0,0,0.03);
  --shadow-lg:      0 10px 30px -5px rgba(25,28,29,0.05);   /* canonical card lift */
  --shadow-focus:   0 8px 32px rgba(26,77,46,0.06);
  --shadow-primary: 0 10px 30px -5px rgba(26,77,46,0.20);

  /* ====== BLUR (glassmorphism) ====== */
  --blur-nav:    12px;
  --blur-modal:  20px;

  /* ====== MOTION ====== */
  --ease-out:  cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --dur-fast:  150ms;
  --dur-med:   300ms;
  --dur-slow:  700ms;

  /* ====== BACKGROUND TEXTURES ====== */
  --dot-grid-color: #cbd5e1;
  --dot-grid:
    radial-gradient(circle, var(--dot-grid-color) 1px, transparent 1px) 0 0 / 24px 24px;
  --dot-grid-subtle:
    radial-gradient(#e5e7eb 0.5px, transparent 0.5px) 0 0 / 32px 32px;
}

/* ==============================================================
   SEMANTIC TYPOGRAPHY CLASSES
   Use these on elements directly: <h1 class="q-display-lg">...
   ============================================================== */

html, body {
  font-family: var(--font-body);
  color: var(--on-surface);
  background: var(--surface);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

/* Display — hero stats, landing heroes */
.q-display-lg   { font-family: var(--font-headline); font-size: var(--display-lg); font-weight: 600; letter-spacing: var(--tracking-tighter); line-height: 1.02; }
.q-display-md   { font-family: var(--font-headline); font-size: var(--display-md); font-weight: 600; letter-spacing: var(--tracking-tighter); line-height: 1.04; }
.q-display-sm   { font-family: var(--font-headline); font-size: var(--display-sm); font-weight: 600; letter-spacing: var(--tracking-tight);   line-height: 1.05; }

/* Headlines — section titles */
.q-headline-lg  { font-family: var(--font-headline); font-size: var(--headline-lg); font-weight: 600; letter-spacing: var(--tracking-tight); line-height: 1.15; }
.q-headline-md  { font-family: var(--font-headline); font-size: var(--headline-md); font-weight: 600; letter-spacing: var(--tracking-tight); line-height: 1.25; }
.q-headline-sm  { font-family: var(--font-headline); font-size: var(--headline-sm); font-weight: 600; line-height: 1.3; }

/* Titles — card heads, component labels */
.q-title-lg     { font-family: var(--font-headline); font-size: var(--title-lg); font-weight: 600; line-height: 1.4; }
.q-title-md     { font-family: var(--font-headline); font-size: var(--title-md); font-weight: 600; line-height: 1.45; }

/* Body — prose, dense data */
.q-body-lg      { font-family: var(--font-body); font-size: var(--body-lg); font-weight: 400; line-height: 1.65; color: var(--on-surface-variant); }
.q-body-md      { font-family: var(--font-body); font-size: var(--body-md); font-weight: 400; line-height: 1.6;  color: var(--on-surface); }
.q-body-sm      { font-family: var(--font-body); font-size: var(--body-sm); font-weight: 400; line-height: 1.55; color: var(--on-surface-variant); }

/* Labels — the editorial eyebrows */
.q-label-lg     { font-family: var(--font-label); font-size: var(--label-lg); font-weight: 600; letter-spacing: 0;             }
.q-label-md     { font-family: var(--font-label); font-size: var(--label-md); font-weight: 600; letter-spacing: var(--tracking-wide);   text-transform: uppercase; }
.q-label-sm     { font-family: var(--font-label); font-size: var(--label-sm); font-weight: 600; letter-spacing: var(--tracking-widest); text-transform: uppercase; color: var(--on-surface-variant); }

/* Mono — spec codes, hex values */
.q-mono         { font-family: var(--font-mono); font-size: var(--label-md); letter-spacing: 0; color: var(--outline); }

/* Base element mapping (optional — apply q-* classes directly for control) */
h1 { font-family: var(--font-headline); font-weight: 600; letter-spacing: var(--tracking-tight); line-height: 1.1; }
h2 { font-family: var(--font-headline); font-weight: 600; letter-spacing: var(--tracking-tight); line-height: 1.15; }
h3 { font-family: var(--font-headline); font-weight: 600; line-height: 1.25; }
h4 { font-family: var(--font-headline); font-weight: 600; line-height: 1.35; }
p  { font-family: var(--font-body); line-height: 1.6; }

.material-symbols-outlined {
  /* Default variation override — bind is above in the main block */
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* =========================================================
   QAI landing page — site styles
   ========================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- Layout ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 768px) {
  .container { padding: 0 24px; }
}

.section {
  padding: 120px 0;
  position: relative;
}
.section--tight { padding: 80px 0; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--on-surface-variant);
  opacity: 0.5;
}
.eyebrow--plain::before { display: none; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(26, 77, 46, 0.08);
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary-container);
}
.status-chip__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--server-pulse);
  box-shadow: 0 0 8px var(--server-pulse);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--dot-grid-subtle);
  opacity: 0.7;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}
.hero__spotlight {
  position: absolute;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,77,46,0.08), transparent 65%);
  pointer-events: none;
  transition: transform 600ms var(--ease-out);
  transform: translate(-50%, -50%);
  will-change: transform;
}
.hero__inner {
  position: relative;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}
.hero__h1 {
  font-family: var(--font-headline);
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 24px 0 24px;
  color: var(--primary);
}
.hero__sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--on-surface-variant);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero__ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 9999px;
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  transition: background 200ms, transform 150ms, box-shadow 300ms;
  will-change: transform;
}
.btn--primary {
  background: var(--primary-container);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover { background: var(--primary); }
.btn--primary:active { transform: scale(0.96); }
.btn--ghost {
  background: transparent;
  color: var(--primary);
}
.btn--ghost:hover { background: rgba(26,77,46,0.06); }

/* ---------- Hero demo frame ---------- */
.demo-frame {
  margin: 72px auto 0;
  max-width: 1120px;
  background: var(--surface-container-lowest);
  border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(25,28,29,0.15), 0 0 0 1px rgba(25,28,29,0.04);
  overflow: hidden;
  position: relative;
}
.demo-frame__chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface-container-low);
  border-bottom: 1px solid rgba(25,28,29,0.04);
}
.demo-frame__dots {
  display: flex;
  gap: 6px;
}
.demo-frame__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #d1d5db;
}
.demo-frame__url {
  margin-left: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--outline);
  letter-spacing: 0.02em;
}
.demo-frame__body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 460px;
}
.demo-rail {
  background: var(--surface-container-low);
  padding: 20px 16px;
  border-right: 1px solid rgba(25,28,29,0.03);
}
.demo-rail__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.demo-rail__mark {
  width: 28px; height: 28px;
  background: var(--primary-container);
  color: #fff;
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.demo-rail__name {
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 15px;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.demo-rail__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: background 150ms, transform 200ms;
}
.demo-rail__item:hover { transform: translateX(3px); background: rgba(26,77,46,0.04); }
.demo-rail__item--active {
  background: rgba(26,77,46,0.08);
  color: var(--primary-container);
  font-weight: 600;
}
.demo-rail__item .material-symbols-outlined { font-size: 18px; }

.demo-rail__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--outline);
  margin: 20px 10px 8px;
}
.demo-rail__server {
  margin-top: 24px;
  padding: 10px 12px;
  background: var(--surface-container-lowest);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-rail__server-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--server-pulse);
  box-shadow: 0 0 8px var(--server-pulse);
  animation: pulse 2s infinite;
}
.demo-rail__server-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-surface);
}

.demo-chat {
  padding: 28px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  background-image: var(--dot-grid-subtle);
  overflow: hidden;
}
.demo-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}

.demo-msg {
  display: flex;
  gap: 12px;
  max-width: 680px;
}
.demo-msg__avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.demo-msg__avatar--user {
  background: var(--surface-container-high);
  color: var(--on-surface);
}
.demo-msg__avatar--ai {
  background: var(--primary-container);
  color: #fff;
  font-family: var(--font-headline);
}
.demo-msg__body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--on-surface);
  padding-top: 2px;
}
.demo-msg__specialist {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-container);
  background: rgba(26,77,46,0.06);
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

.demo-chart {
  margin-top: 16px;
  background: var(--surface-container-lowest);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow-lg);
  max-width: 560px;
}
.demo-chart__title {
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.demo-chart__title span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--outline);
  font-weight: 400;
}
.demo-chart__bars {
  display: grid;
  grid-template-columns: 130px 1fr 60px;
  gap: 10px;
  font-size: 12px;
}
.demo-chart__row {
  display: contents;
}
.demo-chart__label {
  color: var(--on-surface-variant);
  padding: 4px 0;
}
.demo-chart__bar {
  background: var(--surface-container-high);
  height: 18px;
  border-radius: 3px;
  align-self: center;
  overflow: hidden;
  position: relative;
}
.demo-chart__fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--primary-container);
  border-radius: 3px;
  transition: width 1.2s var(--ease-out);
}
.demo-chart__val {
  font-family: var(--font-mono);
  color: var(--on-surface);
  font-weight: 600;
  text-align: right;
  padding: 4px 0;
  font-size: 11px;
}

.demo-composer {
  background: var(--surface-container-lowest);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-focus);
  margin-top: 24px;
}
.demo-composer__input {
  flex: 1;
  border: 0;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--on-surface);
  background: transparent;
}
.demo-composer__tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-container-low);
  border-radius: 9999px;
  padding: 5px 12px;
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 11px;
  color: var(--primary-container);
}
.demo-composer__tools .material-symbols-outlined { font-size: 14px; }
.demo-composer__send {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-container);
  color: #fff;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.demo-composer__send .material-symbols-outlined { font-size: 16px; }

/* cursor */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: var(--primary-container);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink {
  to { visibility: hidden; }
}

/* ---------- Problem section ---------- */
.problem {
  background: var(--surface-container-low);
  padding: 140px 0;
  text-align: center;
}
.problem__quote {
  font-family: var(--font-headline);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--primary);
  max-width: 900px;
  margin: 0 auto;
}
.problem__quote em {
  font-style: normal;
  color: var(--on-surface-variant);
  font-weight: 500;
}
.problem__flow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 48px auto 36px;
  flex-wrap: wrap;
  max-width: 900px;
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface-container-lowest);
  border-radius: 9999px;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  text-decoration: line-through;
  text-decoration-color: rgba(186, 26, 26, 0.4);
  text-decoration-thickness: 2px;
}
.flow-step .material-symbols-outlined { font-size: 16px; color: var(--outline); }
.flow-arrow { color: var(--outline); font-size: 14px; }
.flow-step--new {
  background: var(--primary-container);
  color: #fff;
  text-decoration: none;
  padding: 12px 20px;
  box-shadow: var(--shadow-primary);
}
.flow-step--new .material-symbols-outlined { color: #fff; font-size: 18px; }

/* ---------- Feature strip (§3) ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 64px;
}
@media (max-width: 900px) {
  .features { grid-template-columns: 1fr; }
}
.feature {
  padding: 36px 36px 40px;
  background: var(--surface-container-lowest);
  border-radius: 14px;
  transition: transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--outline);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.feature__title {
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--primary);
  margin: 0 0 16px;
  line-height: 1.2;
}
.feature__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--on-surface-variant);
  margin: 0;
}

.section-head {
  max-width: 780px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head--left {
  text-align: left;
  margin-left: 0;
}
.section-head h2 {
  font-family: var(--font-headline);
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--primary);
  margin: 16px 0 16px;
}
.section-head p {
  font-size: 18px;
  line-height: 1.55;
  color: var(--on-surface-variant);
  margin: 0;
}

/* ---------- Specialists (§4) — DARK cinematic ---------- */
.specialists {
  background: #0a0f0c;
  color: #e7eae7;
  padding: 140px 0 160px;
  position: relative;
  overflow: hidden;
}
.specialists__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.15), transparent),
    radial-gradient(1px 1px at 45% 80%, rgba(255,255,255,0.18), transparent),
    radial-gradient(1px 1px at 85% 20%, rgba(255,255,255,0.12), transparent),
    radial-gradient(1px 1px at 10% 70%, rgba(255,255,255,0.16), transparent),
    radial-gradient(1px 1px at 60% 10%, rgba(255,255,255,0.14), transparent),
    radial-gradient(1px 1px at 30% 55%, rgba(255,255,255,0.13), transparent);
}
.specialists__glow {
  position: absolute;
  width: 900px; height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,77,46,0.3), transparent 60%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: blur(40px);
}
.specialists .eyebrow { color: rgba(231,234,231,0.6); }
.specialists .eyebrow::before { background: rgba(231,234,231,0.4); }
.specialists .section-head h2 { color: #fff; }
.specialists .section-head p { color: rgba(231,234,231,0.7); }

.specialists__stage {
  position: relative;
  height: 600px;
  margin: 60px auto 0;
  max-width: 1100px;
  perspective: 1400px;
  transform-style: preserve-3d;
}
.specialists__scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 800ms var(--ease-out);
}
.orb {
  position: absolute;
  width: 170px; height: 170px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 600ms var(--ease-out), filter 400ms, opacity 400ms;
  transform-style: preserve-3d;
  will-change: transform;
}
.orb__inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
}
.orb__code {
  font-family: var(--font-headline);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: #fff;
}
.orb__name {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}
.orb::before {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orb-glow), transparent 65%);
  opacity: 0.6;
  z-index: -1;
  filter: blur(20px);
}
.orb:hover { filter: brightness(1.15); }
.orb:hover .orb__inner { transform: scale(1.06); }
.orb--fi { background: radial-gradient(circle at 35% 30%, #2b7d4e, #0d3a21); --orb-glow: #2b7d4e; }
.orb--co { background: radial-gradient(circle at 35% 30%, #b89a4a, #3d2f14); --orb-glow: #b89a4a; }
.orb--mm { background: radial-gradient(circle at 35% 30%, #6b7d7b, #1e2a29); --orb-glow: #6b7d7b; }
.orb--sd { background: radial-gradient(circle at 35% 30%, #8a4553, #2a141a); --orb-glow: #8a4553; }
.orb--hr { background: radial-gradient(circle at 35% 30%, #b8b4a8, #3d3b34); --orb-glow: #b8b4a8; }
.orb--conductor {
  width: 70px; height: 70px;
  background: radial-gradient(circle at 35% 30%, #ffd484, #8a5c14);
  --orb-glow: #ffd484;
  animation: conductor-orbit 18s linear infinite;
}
.orb--conductor .orb__code { font-size: 20px; }
.orb--conductor .orb__name { display: none; }

@keyframes conductor-orbit {
  from { transform: rotate(0deg) translateX(300px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(300px) rotate(-360deg); }
}

.specialists__threads {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.thread {
  stroke: rgba(255,255,255,0.1);
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 2 4;
  animation: thread-breathe 6s ease-in-out infinite;
}
@keyframes thread-breathe {
  0%, 100% { stroke-opacity: 0.08; }
  50% { stroke-opacity: 0.22; }
}

/* Specialist detail card */
.sp-detail {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 15, 12, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms;
}
.sp-detail.is-open { opacity: 1; pointer-events: auto; }
.sp-detail__card {
  background: #12181a;
  border-radius: 14px;
  padding: 48px;
  max-width: 640px;
  width: calc(100% - 48px);
  color: #e7eae7;
  position: relative;
  transform: translateY(16px) scale(0.98);
  transition: transform 400ms var(--ease-out);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  max-height: 85vh;
  overflow-y: auto;
}
.sp-detail.is-open .sp-detail__card { transform: translateY(0) scale(1); }
.sp-detail__close {
  position: absolute;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sp-detail__eye {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(231,234,231,0.5);
  margin-bottom: 16px;
}
.sp-detail__title {
  font-family: var(--font-headline);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 8px;
}
.sp-detail__sub {
  font-size: 15px;
  color: rgba(231,234,231,0.6);
  margin: 0 0 24px;
  font-family: var(--font-label);
  font-weight: 500;
}
.sp-detail__brief {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(231,234,231,0.85);
  margin: 0 0 28px;
}
.sp-detail__q-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(231,234,231,0.5);
  margin-bottom: 12px;
}
.sp-detail__q {
  display: block;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  font-size: 14px;
  color: #d7dfd9;
  font-style: italic;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 150ms, transform 200ms;
}
.sp-detail__q:hover { background: rgba(255,255,255,0.06); transform: translateX(4px); }
.sp-detail__try {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 9999px;
  background: var(--primary-container);
  color: #fff;
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 13px;
  border: 0;
  cursor: pointer;
}
.sp-detail__try:hover { background: #235c3c; }

/* Layout variant: arc */
.specialists__stage[data-layout="arc"] .orb--fi { transform: translate(-400px, 100px) !important; }
.specialists__stage[data-layout="arc"] .orb--co { transform: translate(-200px, -40px) !important; }
.specialists__stage[data-layout="arc"] .orb--mm { transform: translate(0, -100px) !important; }
.specialists__stage[data-layout="arc"] .orb--sd { transform: translate(200px, -40px) !important; }
.specialists__stage[data-layout="arc"] .orb--hr { transform: translate(400px, 100px) !important; }

.specialists__stage[data-layout="grid"] .orb { transform: none !important; }
.specialists__stage[data-layout="grid"] .specialists__threads { display: none; }
.specialists__stage[data-layout="grid"] .orb--conductor { display: none; }
.specialists__stage[data-layout="grid"] {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  height: auto;
  perspective: none;
  align-items: center;
  justify-items: center;
  padding: 80px 0;
}
.specialists__stage[data-layout="grid"] .orb {
  position: relative;
  width: 140px; height: 140px;
}

/* ---------- Use-case gallery (§5) ---------- */
.gallery {
  padding: 120px 0;
  background: var(--surface);
  position: relative;
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
@media (max-width: 1040px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .gallery__grid { grid-template-columns: 1fr; }
}
.uc-card {
  background: var(--surface-container-lowest);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
  cursor: pointer;
}
.uc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.uc-card__preview {
  aspect-ratio: 4/3;
  background: var(--surface-container-low);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.uc-card__body {
  padding: 22px 24px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.uc-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  align-self: flex-start;
  margin-bottom: 12px;
}
.uc-card__status--live {
  background: rgba(26,77,46,0.1);
  color: var(--primary-container);
}
.uc-card__status--rolling {
  background: rgba(184, 154, 74, 0.15);
  color: #7a6020;
}
.uc-card__status--next {
  background: rgba(25, 28, 29, 0.06);
  color: var(--on-surface-variant);
}
.uc-card__status--roadmap {
  background: rgba(25, 28, 29, 0.04);
  color: var(--outline);
}
.uc-card__status-dot {
  width: 5px; height: 5px; border-radius: 50%;
}
.uc-card__status--live .uc-card__status-dot {
  background: var(--server-pulse);
  box-shadow: 0 0 6px var(--server-pulse);
  animation: pulse 2s infinite;
}
.uc-card__status--rolling .uc-card__status-dot { background: #b89a4a; }
.uc-card__status--next .uc-card__status-dot { background: var(--on-surface-variant); }
.uc-card__status--roadmap .uc-card__status-dot { background: var(--outline); }

.uc-card__title {
  font-family: var(--font-headline);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--primary);
  margin: 0 0 10px;
  line-height: 1.25;
}
.uc-card__body-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--on-surface-variant);
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.uc-card__expand {
  margin-top: auto;
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-container);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 200ms;
}
.uc-card:hover .uc-card__expand { transform: translateX(4px); }

/* gallery strip */
.gallery__strip {
  margin-top: 64px;
  text-align: center;
  padding: 40px 24px;
  background: var(--surface-container-low);
  border-radius: 14px;
}
.gallery__strip strong {
  font-family: var(--font-headline);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.01em;
  font-size: 20px;
}

/* ---------- §6 30min→30sec ---------- */
.morph {
  padding: 160px 0;
  text-align: center;
  background: var(--surface-container-low);
  position: relative;
  overflow: hidden;
}
.morph__numeral {
  font-family: var(--font-headline);
  font-size: clamp(120px, 18vw, 220px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--primary);
  position: relative;
  display: inline-block;
}
.morph__numeral-old {
  color: var(--outline);
  opacity: 0.25;
  text-decoration: line-through;
  text-decoration-thickness: 6px;
  font-size: 0.55em;
  vertical-align: baseline;
  margin-right: 24px;
}
.morph__numeral-old[data-state="morphed"] {
  opacity: 0.15;
}
.morph__arrow {
  display: inline-block;
  transform: translateY(-24px);
  font-size: 0.3em;
  color: var(--outline);
  margin: 0 16px;
}
.morph__sub {
  font-size: 20px;
  color: var(--on-surface-variant);
  font-style: italic;
  margin-top: 12px;
  letter-spacing: -0.005em;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 80px;
  padding: 0 24px;
}
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat {
  text-align: center;
}
.stat__num {
  font-family: var(--font-headline);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--primary);
  line-height: 1;
}
.stat__label {
  font-size: 13px;
  color: var(--on-surface-variant);
  margin-top: 10px;
  letter-spacing: 0.01em;
}

/* ---------- §7 Before/After ---------- */
.compare {
  padding: 120px 0;
  background: var(--surface);
}
.compare__stage {
  margin: 56px auto 0;
  max-width: 1120px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  cursor: ew-resize;
  user-select: none;
  box-shadow: 0 30px 80px -20px rgba(25,28,29,0.2);
}
.compare__side {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.compare__side--left { background: #f0f2ed; }
.compare__side--right {
  clip-path: inset(0 0 0 50%);
  background: var(--surface-container-lowest);
}
.compare__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 2px 10px rgba(0,0,0,0.25);
  z-index: 10;
  transform: translateX(-1px);
}
.compare__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  color: var(--primary);
}
.compare__label {
  position: absolute;
  top: 24px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.65);
  color: #fff;
  backdrop-filter: blur(8px);
}
.compare__label--left { left: 24px; }
.compare__label--right { right: 24px; }

/* SAP GUI side */
.sap-screen {
  position: absolute;
  inset: 0;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #2a2f26;
  overflow: hidden;
  background:
    linear-gradient(180deg, #e8e8df 0%, #e0e0d4 100%);
}
.sap-screen__tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.sap-screen__tab {
  padding: 4px 10px;
  background: #d1d1c3;
  border: 1px solid #a0a08e;
  font-size: 9px;
  color: #3d4136;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.sap-screen__tab--active { background: #c2c2b2; }
.sap-screen__grid {
  background: #fff;
  border: 1px solid #a0a08e;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 9px;
  line-height: 1.6;
}
.sap-screen__grid > div {
  padding: 2px 4px;
  border-right: 1px solid #e0e0d4;
  border-bottom: 1px solid #e8e8df;
  color: #2a2f26;
}
.sap-screen__grid > div:nth-child(7n) { border-right: 0; }
.sap-screen__grid .hdr { background: #e8e8df; font-weight: 600; color: #3d4136; }
.sap-screen__excel {
  position: absolute;
  bottom: 40px;
  right: 20px;
  width: 60%;
  height: 45%;
  background: #fff;
  border: 2px solid #1f7246;
  font-size: 8px;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.sap-screen__excel-header {
  background: #1f7246;
  color: #fff;
  padding: 3px 8px;
  font-size: 9px;
}
.sap-screen__excel-rows {
  padding: 4px;
  display: grid;
  grid-template-columns: 60px repeat(4, 1fr);
  gap: 1px;
  font-size: 8px;
}
.sap-screen__excel-rows > div {
  background: #f5f5f5;
  padding: 2px 4px;
  color: #444;
}
.sap-screen__excel-rows > div.c { background: #dfe9dc; }

/* QAI side */
.qai-screen {
  position: absolute;
  inset: 0;
  padding: 32px 40px;
  background: var(--surface-container-lowest);
  background-image: var(--dot-grid-subtle);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.qai-screen .demo-msg__body { font-size: 13px; }

/* ---------- §8 Model tabs ---------- */
.models {
  padding: 120px 0;
  background: var(--surface-container-low);
}
.models__tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 48px 0 32px;
  flex-wrap: wrap;
}
.models__tab {
  padding: 10px 20px;
  border-radius: 9999px;
  background: var(--surface-container-lowest);
  color: var(--on-surface-variant);
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: all 200ms var(--ease-out);
}
.models__tab:hover { background: var(--surface-container); }
.models__tab--active {
  background: var(--primary-container);
  color: #fff;
}
.models__panel {
  background: var(--surface-container-lowest);
  border-radius: 14px;
  padding: 40px 48px;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  min-height: 320px;
}
.models__question {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 10px;
}
.models__question-text {
  font-family: var(--font-headline);
  font-size: 18px;
  color: var(--on-surface);
  margin-bottom: 28px;
  font-style: italic;
}
.models__response {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--on-surface);
  white-space: pre-line;
  transition: opacity 300ms;
}
.models__footline {
  max-width: 600px;
  margin: 40px auto 0;
  text-align: center;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--on-surface-variant);
}

/* ---------- §9 Trust cards ---------- */
.trust {
  padding: 120px 0;
  background: var(--surface);
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
@media (max-width: 900px) {
  .trust__grid { grid-template-columns: 1fr; }
}
.trust-card {
  padding: 36px 32px 40px;
  background: var(--surface-container-lowest);
  border-radius: 14px;
  transition: transform 300ms var(--ease-out);
}
.trust-card:hover { transform: translateY(-4px); }
.trust-card__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(26, 77, 46, 0.08);
  color: var(--primary-container);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.trust-card__icon .material-symbols-outlined { font-size: 22px; }
.trust-card__title {
  font-family: var(--font-headline);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--primary);
  margin: 0 0 10px;
}
.trust-card__body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--on-surface-variant);
  margin: 0;
}

/* ---------- §10 Who it's for ---------- */
.audience {
  padding: 120px 0;
  background: var(--surface-container-low);
}
.audience__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 56px;
}
@media (max-width: 900px) {
  .audience__grid { grid-template-columns: repeat(2, 1fr); }
}
.audience-col {
  padding: 8px 0;
}
.audience-col__label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary-container);
  padding-bottom: 16px;
  margin-bottom: 20px;
  display: block;
  position: relative;
}
.audience-col__label::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--primary-container);
}
.audience-col__title {
  font-family: var(--font-headline);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--primary);
  margin: 0 0 12px;
  line-height: 1.2;
}
.audience-col__body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--on-surface-variant);
  margin: 0;
}
.audience__partner {
  margin-top: 72px;
  padding: 28px 36px;
  background: var(--surface-container-lowest);
  border-radius: 14px;
  text-align: center;
  font-size: 15px;
  line-height: 1.55;
  color: var(--on-surface-variant);
}
.audience__partner strong {
  color: var(--primary);
  font-weight: 600;
}

/* ---------- §11 Roadmap ---------- */
.roadmap {
  padding: 120px 0;
  background: var(--surface);
}
.roadmap__timeline {
  margin-top: 64px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .roadmap__timeline { grid-template-columns: 1fr; }
}
.roadmap__timeline::before {
  content: "";
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--primary-container), var(--outline-variant) 70%, transparent);
}
@media (max-width: 900px) {
  .roadmap__timeline::before { display: none; }
}
.roadmap-step {
  padding: 16px 0;
  position: relative;
}
.roadmap-step__dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary-container);
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--surface);
}
.roadmap-step--future .roadmap-step__dot {
  background: var(--surface);
  border: 2px solid var(--outline-variant);
  box-shadow: 0 0 0 4px var(--surface);
}
.roadmap-step__label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary-container);
  margin-bottom: 8px;
}
.roadmap-step--future .roadmap-step__label { color: var(--on-surface-variant); }
.roadmap-step__body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--on-surface);
  margin: 0;
}

/* ---------- §12 Ticker ---------- */
.ticker {
  background: var(--primary);
  color: #d9e5dc;
  padding: 20px 0;
  overflow: hidden;
  position: relative;
}
.ticker__track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
  will-change: transform;
}
.ticker__item {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(231, 234, 231, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 56px;
}
.ticker__item::after {
  content: "·";
  color: rgba(255,255,255,0.3);
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- §13 Final CTA ---------- */
.final-cta {
  background: #0a0f0c;
  color: #fff;
  padding: 160px 0 140px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-cta__glow {
  position: absolute;
  width: 1000px;
  height: 1000px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,77,46,0.45), transparent 60%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(60px);
  pointer-events: none;
}
.final-cta__inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}
.final-cta__h {
  font-family: var(--font-headline);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: #fff;
  margin: 20px 0 24px;
}
.final-cta__sub {
  font-size: 18px;
  line-height: 1.55;
  color: rgba(231, 234, 231, 0.7);
  margin: 0 auto 40px;
  max-width: 620px;
}
.magnetic {
  display: inline-block;
  transition: transform 300ms var(--ease-out);
  will-change: transform;
}
.btn--cta-large {
  background: #fff;
  color: var(--primary);
  padding: 18px 32px;
  font-size: 15px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 20px 40px rgba(255,255,255,0.12);
}
.btn--cta-large:hover { background: #fff; color: var(--primary-container); }

.final-cta__logos {
  margin-top: 96px;
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
  opacity: 0.4;
}
.final-cta__logo-ph {
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.05em;
  color: rgba(231,234,231,0.5);
}
.final-cta__logos-label {
  margin-top: 96px;
  margin-bottom: 24px;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(231,234,231,0.35);
}

/* ---------- motion reduce ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .orb--conductor { animation: none; }
}


/* =========================================================
   v2 additions — rotating word, ambient orbs, reveal anims,
   density modes, dark mode, grain, anim-speed wiring
   ========================================================= */

:root {
  --anim-speed: 1;
  --scale: 1;
}

/* Animation speed wiring — multiply duration vars used by animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Page-wide global content scaling via CSS custom property (subtle) */
.hero__h1, .section-head h2, .stat__num, .morph__numeral { zoom: var(--scale); }

/* ----- Rotating word ----- */
.rot-word {
  display: inline-flex;
  align-items: baseline;
  position: relative;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rot-word__text {
  display: inline-block;
  background: linear-gradient(120deg, currentColor 0%, currentColor 50%, color-mix(in oklch, currentColor 60%, transparent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.rot-word__cursor {
  display: inline-block;
  width: 0.06em;
  height: 0.85em;
  background: currentColor;
  margin-left: 0.04em;
  animation: rotCursor calc(0.95s / var(--anim-speed)) steps(2) infinite;
  vertical-align: -0.05em;
  border-radius: 1px;
}
@keyframes rotCursor { 50% { opacity: 0; } }

/* ----- Ambient orbs in hero ----- */
.hero__orbs {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  mix-blend-mode: multiply;
}
.hero__orb--a {
  width: 520px; height: 520px;
  background: radial-gradient(circle, color-mix(in oklch, var(--primary-container) 65%, white) 0%, transparent 70%);
  top: -10%; left: -8%;
  animation: orbDrift1 calc(22s / var(--anim-speed)) ease-in-out infinite alternate;
}
.hero__orb--b {
  width: 420px; height: 420px;
  background: radial-gradient(circle, color-mix(in oklch, var(--primary-container) 35%, #cfe5d1) 0%, transparent 70%);
  bottom: -8%; right: -6%;
  animation: orbDrift2 calc(28s / var(--anim-speed)) ease-in-out infinite alternate;
}
.hero__orb--c {
  width: 360px; height: 360px;
  background: radial-gradient(circle, color-mix(in oklch, var(--primary-container) 25%, #ffe9b8) 0%, transparent 70%);
  top: 30%; right: 20%;
  animation: orbDrift3 calc(34s / var(--anim-speed)) ease-in-out infinite alternate;
}
@keyframes orbDrift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(60px, 80px) scale(1.15); } }
@keyframes orbDrift2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-80px, -50px) scale(0.9); } }
@keyframes orbDrift3 { from { transform: translate(0,0) scale(1); } to { transform: translate(-40px, 60px) scale(1.1); } }

body[data-animations="0"] .hero__orb,
body[data-animations="0"] .rot-word__cursor,
body[data-animations="0"] .ticker__track,
body[data-animations="0"] .specialists__threads .thread,
body[data-animations="0"] .orb,
body[data-animations="0"] *::before,
body[data-animations="0"] *::after { animation: none !important; }

/* ----- Reveal animations ----- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: revealIn calc(0.8s / var(--anim-speed)) cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s forwards;
}
@keyframes revealIn {
  to { opacity: 1; transform: translateY(0); }
}

.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity calc(0.7s / var(--anim-speed)) cubic-bezier(0.2,0.8,0.2,1),
              transform calc(0.7s / var(--anim-speed)) cubic-bezier(0.2,0.8,0.2,1);
}
.reveal-up.is-in { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity calc(0.7s / var(--anim-speed)) cubic-bezier(0.2,0.8,0.2,1),
              transform calc(0.7s / var(--anim-speed)) cubic-bezier(0.2,0.8,0.2,1);
}
.reveal-stagger > *.is-in { opacity: 1; transform: translateY(0); }
.reveal-stagger > *:nth-child(1) { transition-delay: 0.0s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.4s; }

body[data-animations="0"] .reveal { opacity: 1; transform: none; animation: none; }
body[data-animations="0"] .reveal-up,
body[data-animations="0"] .reveal-stagger > * { opacity: 1; transform: none; transition: none; }

/* ----- Hover lift utilities applied site-wide ----- */
.feature, .uc-card, .trust-card, .audience-col, .roadmap-step, .stat {
  transition: transform 350ms cubic-bezier(0.2,0.8,0.2,1), box-shadow 350ms cubic-bezier(0.2,0.8,0.2,1);
}
.feature:hover, .trust-card:hover, .audience-col:hover, .stat:hover {
  transform: translateY(-3px);
}

/* ----- Density modes ----- */
body[data-density="compact"] .section { padding: 80px 0; }
body[data-density="compact"] .section-head { margin-bottom: 56px; }
body[data-density="compact"] .hero__inner { padding-top: 100px; }

body[data-density="airy"] .section { padding: 160px 0; }
body[data-density="airy"] .section-head { margin-bottom: 96px; }
body[data-density="airy"] .hero__inner { padding-top: 180px; }

/* ----- Headline weight wiring ----- */
.hero__h1, h1, h2, h3 { font-weight: var(--headline-weight, 800); }
.section-head h2 { font-weight: var(--headline-weight, 700); }

/* ----- Stronger hover on buttons ----- */
.btn--primary { transition: transform 200ms var(--ease-out), background 200ms, box-shadow 250ms; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px color-mix(in oklch, var(--primary-container) 60%, transparent); }
.btn--ghost { transition: transform 200ms var(--ease-out), background 200ms, border-color 200ms; }
.btn--ghost:hover { transform: translateY(-2px); }

/* Status chip pulse */
.status-chip__dot { animation: chipPulse calc(2s / var(--anim-speed)) ease-in-out infinite; }
@keyframes chipPulse {
  0%,100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--primary-container) 60%, transparent); }
  50%     { box-shadow: 0 0 0 6px transparent; }
}

/* (Removed: gradient background was painting over headlines) */

/* Card border-shimmer on hover */
.feature, .uc-card, .trust-card { position: relative; overflow: hidden; }
.feature::before, .uc-card::before, .trust-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent 30%, color-mix(in oklch, var(--primary-container) 35%, transparent) 50%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 350ms;
  pointer-events: none;
}
.feature:hover::before, .uc-card:hover::before, .trust-card:hover::before { opacity: 1; }


/* =========================================================
   v3 — Hero demo specialist switcher + horizontal gallery
   ========================================================= */

/* Routing pulse between Q and A */
.demo-routing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 8px 44px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--primary-container);
  background: rgba(26,77,46,0.06);
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  width: fit-content;
  animation: routingIn 0.3s var(--ease-out) both;
}
@keyframes routingIn { from { opacity: 0; transform: translateY(-4px); } }
.demo-routing__dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--primary-container);
  animation: routingDot calc(0.9s / var(--anim-speed)) ease-in-out infinite;
}
.demo-routing__dot:nth-child(2) { animation-delay: 0.15s; }
.demo-routing__dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes routingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* Active rail item gets a side bar */
.demo-rail__item--btn { position: relative; }
.demo-rail__pulse {
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  border-radius: 2px;
  background: var(--primary-container);
  box-shadow: 0 0 12px color-mix(in oklch, var(--primary-container) 60%, transparent);
}

/* Specialist scene tabs at bottom of demo */
.demo-dots {
  display: flex;
  gap: 6px;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(25,28,29,0.05);
  background: rgba(248,249,250,0.6);
  justify-content: center;
}
.demo-dot {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 5px 10px;
  border-radius: 9999px;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: all 200ms;
  overflow: hidden;
}
.demo-dot:hover { background: rgba(26,77,46,0.06); color: var(--primary-container); }
.demo-dot--active {
  background: rgba(26,77,46,0.1);
  color: var(--primary-container);
}
.demo-dot__progress {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.demo-dot__progress::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; height: 2px;
  background: var(--primary-container);
  border-radius: 2px;
  width: 0;
  animation: dotProgress calc(8s / var(--anim-speed)) linear forwards;
}
@keyframes dotProgress { to { width: 100%; } }

/* Animate chat-message swap when scene changes */
.demo-chat__messages > * {
  animation: msgIn 0.4s var(--ease-out) both;
}
.demo-chat__messages > *:nth-child(2) { animation-delay: 0.05s; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }

/* =========================================================
   Horizontal gallery
   ========================================================= */
.gallery--scroll { padding: 120px 0; }
.gallery--scroll .gallery__strip { margin-top: 48px; }

.gallery__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.gallery__filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gallery__nav {
  display: flex;
  gap: 8px;
}
.gallery__nav button {
  width: 40px; height: 40px;
  border-radius: 9999px;
  border: 1px solid rgba(25,28,29,0.1);
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 200ms;
}
.gallery__nav button:hover {
  background: var(--primary-container);
  color: white;
  border-color: var(--primary-container);
  transform: translateY(-2px);
}
.gallery__nav button:active { transform: translateY(0); }
.gallery__nav button .material-symbols-outlined { font-size: 20px; }

.gallery__rail-wrap {
  position: relative;
  margin-top: 8px;
}
.gallery__rail-wrap::before,
.gallery__rail-wrap::after {
  content: "";
  position: absolute;
  top: 0; bottom: 16px;
  width: 80px;
  pointer-events: none;
  z-index: 2;
}
.gallery__rail-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--surface), transparent);
}
.gallery__rail-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--surface), transparent);
}

.gallery__rail {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 0 16px;
  scrollbar-width: none;
}
.gallery__rail::-webkit-scrollbar { display: none; }

.gallery__rail-pad-l, .gallery__rail-pad-r {
  flex: 0 0 max(48px, calc((100vw - 1280px) / 2 + 48px));
}

.gallery__rail .uc-card {
  flex: 0 0 380px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .gallery__rail .uc-card { flex-basis: 320px; }
  .gallery__rail-pad-l, .gallery__rail-pad-r { flex-basis: 24px; }
}

/* Hide the old grid if it's still rendered */
.gallery__grid { display: none; }

/* Make sure card preview area doesn't grow uncontrollably */
.uc-card { min-height: 460px; }
.uc-card__preview { aspect-ratio: 16/10; flex: 0 0 auto; }

/* Headline weight wiring fix — restore visible text (the gradient was hiding it) */
.section-head h2,
.hero__h1,
.morph__numeral,
.final-cta__h {
  -webkit-text-fill-color: currentColor;
  background: none;
}

/* ---- EIS overrides: Quatelio type, QAI look ---- */
:root{--font-headline:'Geist',ui-sans-serif,system-ui,sans-serif;--font-body:'Geist',ui-sans-serif,system-ui,sans-serif;--font-label:'Geist',ui-sans-serif,system-ui,sans-serif;--font-mono:'Geist Mono',ui-monospace,Menlo,monospace;--headline-weight:700}
.hero{padding:96px 0 80px}
.hero__h1,.section-head h2,.final-cta__h,.morph__numeral,.stat__num{letter-spacing:-0.045em}

/* ===== Quatelio site harmonisation (matches the rest of the website) ===== */
:root{--surface:#FAFAF8;--surface-bright:#FAFAF8;--background:#FAFAF8;--surface-container-low:#F4F4F1;
--font-headline:'Geist',system-ui,sans-serif;--font-body:'Geist',system-ui,sans-serif;--font-label:'Geist',system-ui,sans-serif;--font-mono:'Geist Mono',ui-monospace,monospace}
.section{padding:104px 0}
.eyebrow{font-family:'Geist Mono',ui-monospace,monospace;font-size:12.5px;font-weight:400;letter-spacing:.08em;color:#6B6B66}
.eyebrow::before{display:none}
h1,h2,h3{font-weight:600}
.hero__h1{font-size:clamp(42px,5.6vw,72px);font-weight:600;letter-spacing:-0.045em;line-height:1.03}
.section-head h2{font-size:clamp(30px,3.8vw,48px);font-weight:600;letter-spacing:-0.035em;line-height:1.07}
.final-cta__h{font-size:clamp(32px,4.4vw,54px);font-weight:600;letter-spacing:-0.035em}
.problem__quote{font-weight:600;letter-spacing:-0.035em}
.stat__num{font-weight:600;letter-spacing:-0.04em}
.btn{border-radius:9px;height:48px;padding:0 22px;box-sizing:border-box;font-family:'Geist',system-ui,sans-serif;font-size:15px;font-weight:500}
.btn--primary,.btn--primary:hover,.btn--cta-large{box-shadow:none}
.btn--cta-large{border-radius:9px}
.feature,.uc-card,.trust-card,.audience-col,.models__panel{border:1px solid #E3E3DE;box-shadow:none}
.feature:hover,.uc-card:hover,.models__panel:hover{box-shadow:none;border-color:#C9C9C2}
.demo-frame,.compare__stage{border-radius:20px;border:1px solid #E3E3DE;box-shadow:0 1px 2px rgba(0,0,0,.04),0 24px 48px -28px rgba(0,0,0,.14)}
.demo-chart{box-shadow:0 1px 2px rgba(0,0,0,.04);border:1px solid #E3E3DE}
.hero__orb,.hero__spotlight{display:none}
