/* =====================================================================
   Mentoza LMS — Landing page · v2
   Theme: derived from the Mentoza logo — midnight-violet ink with the
   mark's electric spectrum (violet · cyan · magenta · amber).
   Type: Plus Jakarta Sans (echoes the geometric wordmark) + Instrument
   Serif italic for emphasis.
   Every colour lives in :root — re-theme by editing section 1 only.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------- */
:root {
  /* Logo source colours — extracted from assets/mentoza-logo.svg */
  --logo-ink: #11002D;
  --logo-violet: #D300FF;
  --logo-cyan: #39CCFF;
  --logo-pink: #E81E9C;
  --logo-amber: #FFB522;
  --logo-coral: #F42B45;
  --logo-ember: #D65927;

  /* Ink — violet-black surfaces derived from the wordmark (OKLCH, hue 294°) */
  --ink-1000: #050111;
  --ink-950: #09021B;
  --ink-900: #11002D;
  --ink-850: #190A36;
  --ink-800: #211241;
  --ink-700: #2A1B4C;
  --ink-600: #382B5C;
  --ink-500: #4D4171;

  /* Light surfaces — violet-tinted paper for light sections (OKLCH, hue 294°) */
  --light-0: #FFFFFF;
  --light-50: #FAF9FF;
  --light-100: #F2F0FC;
  --light-200: #E7E3F6;
  --light-300: #D5D0ED;
  --ink-400: #655D83;

  /* Neutrals — violet-tempered greys for text */
  --neutral-50: #F7F6FD;
  --neutral-100: #EBE9F6;
  --neutral-200: #D5D1E5;
  --neutral-300: #BBB7D0;
  --neutral-400: #9691AD;
  --neutral-500: #726D8A;

  /* Brand (logo violet) — OKLab tints → white, shades → ink */
  --brand-50: #FDF2FF;
  --brand-100: #FBE4FF;
  --brand-200: #F5C8FF;
  --brand-300: #EDA2FF;
  --brand-400: #E26EFF;
  --brand-500: #D300FF;
  --brand-600: #AC03D5;
  --brand-700: #8604AD;
  --brand-800: #5E0482;
  --brand-900: #39025A;

  /* Accent (logo cyan) */
  --accent-50: #F4FCFF;
  --accent-100: #E7F8FF;
  --accent-200: #CEF1FF;
  --accent-300: #ACE7FF;
  --accent-400: #7EDAFF;
  --accent-500: #39CCFF;
  --accent-600: #39A3D6;
  --accent-700: #357CAE;
  --accent-800: #2D5283;
  --accent-900: #222B5A;

  /* Supporting spectrum (logo magenta, amber, coral) */
  --pink-200: #FFC6E1;
  --pink-300: #FD9CCB;
  --pink-400: #F469B3;
  --pink-500: #E81E9C;
  --pink-600: #B71C85;
  --pink-700: #8D1970;
  --amber-200: #FFE9C5;
  --amber-300: #FFD89A;
  --amber-400: #FFC669;
  --amber-500: #FFB522;
  --amber-600: #D2963B;
  --amber-700: #A27444;
  --amber-800: #6E4F44;
  --coral-300: #FF9A98;
  --coral-400: #FD6A6E;
  --coral-500: #F42B45;
  --coral-600: #C02846;

  /* RGB channels for alpha use: rgb(var(--rgb-x) / .2) */
  --rgb-white: 255 255 255;
  --rgb-ink-1000: 5 1 17;
  --rgb-ink-950: 9 2 27;
  --rgb-ink-900: 17 0 45;
  --rgb-ink-850: 25 10 54;
  --rgb-ink-800: 33 18 65;
  --rgb-ink-700: 42 27 76;
  --rgb-ink-600: 56 43 92;
  --rgb-neutral-50: 247 246 253;
  --rgb-neutral-300: 187 183 208;
  --rgb-brand-300: 237 162 255;
  --rgb-brand-400: 226 110 255;
  --rgb-brand-500: 211 0 255;
  --rgb-brand-600: 172 3 213;
  --rgb-accent-300: 172 231 255;
  --rgb-accent-400: 126 218 255;
  --rgb-accent-500: 57 204 255;
  --rgb-pink-400: 244 105 179;
  --rgb-pink-500: 232 30 156;
  --rgb-amber-400: 255 198 105;
  --rgb-amber-500: 255 181 34;
  --rgb-coral-400: 253 106 110;
  --rgb-coral-500: 244 43 69;
  --rgb-brand-700: 134 4 173;
  --rgb-accent-700: 53 124 174;
  --rgb-light-50: 250 249 255;
  --rgb-light-300: 213 208 237;

  /* Demo academy themes (branded-app chapter) */
  --app-dot-answered: #16A34A; --app-dot-skipped: #F59E0B; --app-dot-marked: #8B5CF6; --app-dot-blank: #FFFFFF; --app-dot-edge: #E2E8F0; --app-dot-danger: #DC2626;
  --demo-a-1: #211241; --demo-a-2: #D300FF; --demo-a-3: #39CCFF; --demo-a-4: #09021B; --demo-a-5: #2A1B4C; --demo-a-6: #F7F6FD;
  --demo-b-1: #0E3B32; --demo-b-2: #E8D9B5; --demo-b-3: #7FD1AE; --demo-b-4: #06201B; --demo-b-5: #15493F; --demo-b-6: #F4F1E8;
  --demo-c-1: #3A0D16; --demo-c-2: #F2C57C; --demo-c-3: #FF8A7A; --demo-c-4: #1C060B; --demo-c-5: #4E1520; --demo-c-6: #FFF4EC;

  --icon-sm: 16px;
  --icon-md: 20px;
  --icon-lg: 22px;
  --chip-h: 30px;
  --tap: 44px;

  /* --- Type ---------------------------------------------------------- */
  --font-display: "Plus Jakarta Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --fs-hero: clamp(2.4rem, 0.95rem + 3.85vw, 4.7rem);
  --fs-h2: clamp(2.05rem, 1.15rem + 2.6vw, 3.7rem);
  --fs-h3: clamp(1.8rem, 1.22rem + 1.5vw, 2.65rem);
  --fs-lede: clamp(1.03rem, 0.96rem + 0.32vw, 1.2rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --tracking-display: -0.038em;
  --tracking-caps: 0.2em;

  /* --- Layout & motion ----------------------------------------------- */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(96px, 6vw + 64px, 172px);
  --head-gap: clamp(44px, 4vw + 20px, 88px);
  --nav-h: 76px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --mask: #000; /* alpha source for CSS masks — not a visible colour */

  color-scheme: dark;
}

/* Semantic roles (dark is the default; .theme-dark re-applies it inside light sections) */
:root,
.theme-dark {
  /* --- Semantic roles ------------------------------------------------ */
  --brand: var(--logo-violet);
  --accent: var(--logo-cyan);
  --bg: var(--ink-950);
  --bg-deep: var(--ink-1000);
  --bg-section: var(--ink-900);
  --text: var(--neutral-50);
  --text-muted: var(--neutral-300);   /* 10.4:1 on --bg */
  --text-dim: var(--neutral-400);     /* 6.7:1 on --bg */
  --text-brand: var(--brand-300);     /* on-dark brand text, 10.8:1 */
  --text-accent: var(--accent-300);   /* 15:1 */
  --text-pink: var(--pink-300);
  --chip-bg: rgb(var(--rgb-white) / 0.03);
  --chip-text: var(--neutral-200);
  --ghost-bg: rgb(var(--rgb-white) / 0.035);
  --ghost-ring: rgb(var(--rgb-neutral-300) / 0.2);
  --field-bg: rgb(var(--rgb-ink-1000) / 0.45);
  --focus: var(--accent-400);
  --on-brand: var(--neutral-50);      /* ≥5.4:1 on --grad-cta stops */
  --success: var(--accent-400);
  --warning: var(--amber-400);
  --danger: var(--coral-500);
  --live: var(--coral-500);
  --paper: var(--neutral-50);
  --paper-2: var(--neutral-100);
  --paper-ink: var(--ink-900);
  --paper-muted: var(--ink-500);

  --hairline: rgb(var(--rgb-brand-300) / 0.14);
  --hairline-strong: rgb(var(--rgb-brand-300) / 0.32);
  --hairline-neutral: rgb(var(--rgb-neutral-300) / 0.12);
  --hairline-accent: rgb(var(--rgb-accent-300) / 0.32);

  --grad-cta: linear-gradient(115deg, var(--brand-700) 0%, var(--brand-600) 45%, var(--pink-600) 100%);
  --grad-brand: linear-gradient(135deg, var(--brand-500) 0%, var(--pink-500) 100%);
  --grad-spectrum: linear-gradient(90deg, var(--logo-cyan), var(--logo-violet) 38%, var(--logo-pink) 68%, var(--logo-amber));
  --grad-text: linear-gradient(100deg, var(--accent-300) 0%, var(--brand-300) 38%, var(--pink-300) 70%, var(--amber-300) 100%);
  --grad-hairline: linear-gradient(90deg, transparent, rgb(var(--rgb-accent-400) / 0.45) 22%, rgb(var(--rgb-brand-400) / 0.6) 50%, rgb(var(--rgb-pink-400) / 0.45) 78%, transparent);
  --grad-bars: linear-gradient(90deg, var(--accent-500), var(--brand-500));
  --grad-number: linear-gradient(180deg, var(--neutral-50) 20%, var(--brand-200) 72%, var(--brand-400) 118%);
  --grad-card: linear-gradient(180deg, rgb(var(--rgb-ink-700) / 0.5), rgb(var(--rgb-ink-900) / 0.8));
  --grad-window: linear-gradient(180deg, var(--ink-800), var(--ink-900));
  --grad-glass: linear-gradient(180deg, rgb(var(--rgb-ink-600) / 0.62), rgb(var(--rgb-ink-850) / 0.62));

  /* --- Depth system -------------------------------------------------- */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --inner-hi: inset 0 1px 0 rgb(var(--rgb-white) / 0.07);
  --ring: inset 0 0 0 1px var(--hairline);
  --ring-strong: inset 0 0 0 1px var(--hairline-strong);
  --ring-neutral: inset 0 0 0 1px var(--hairline-neutral);
  --shadow-1: 0 1px 2px rgb(var(--rgb-ink-1000) / 0.5), 0 12px 24px -16px rgb(var(--rgb-ink-1000) / 0.7);
  --shadow-2: 0 30px 60px -32px rgb(var(--rgb-ink-1000) / 0.9), 0 12px 24px -14px rgb(var(--rgb-ink-1000) / 0.55);
  --shadow-3: 0 70px 120px -44px rgb(var(--rgb-ink-1000) / 0.95), 0 26px 50px -26px rgb(var(--rgb-ink-1000) / 0.65);
  --glow-brand: 0 18px 44px -14px rgb(var(--rgb-brand-500) / 0.55), 0 8px 20px -10px rgb(var(--rgb-pink-500) / 0.4);
  --blur: 14px;
}

/* Light sections: same component styles, re-mapped roles */
.theme-light {
  --bg: var(--light-50);
  --bg-section: var(--light-100);
  --text: var(--ink-900);            /* 18.9:1 */
  --text-muted: var(--ink-500);      /* 8.7:1 */
  --text-dim: var(--ink-400);        /* 5.8:1 */
  --text-brand: var(--brand-700);    /* 7.6:1 */
  --text-accent: var(--accent-800);  /* 7.6:1 */
  --text-pink: var(--pink-700);
  --chip-bg: rgb(var(--rgb-white) / 0.8);
  --chip-text: var(--ink-700);
  --ghost-bg: var(--light-0);
  --ghost-ring: rgb(var(--rgb-ink-900) / 0.14);
  --field-bg: var(--light-0);
  --focus: var(--brand-600);
  --success: var(--accent-800);
  --paper-muted: var(--ink-500);

  --hairline: rgb(var(--rgb-brand-700) / 0.13);
  --hairline-strong: rgb(var(--rgb-brand-700) / 0.28);
  --hairline-neutral: rgb(var(--rgb-ink-900) / 0.08);
  --hairline-accent: rgb(var(--rgb-accent-700) / 0.32);

  --grad-text: linear-gradient(100deg, var(--accent-800) 0%, var(--brand-600) 40%, var(--pink-600) 72%, var(--amber-800) 100%);
  --grad-number: linear-gradient(180deg, var(--ink-900) 25%, var(--brand-700) 100%);
  --grad-card: linear-gradient(180deg, var(--light-0), var(--light-50));
  --grad-hairline: linear-gradient(90deg, transparent, rgb(var(--rgb-accent-700) / 0.35) 22%, rgb(var(--rgb-brand-700) / 0.45) 50%, rgb(var(--rgb-pink-500) / 0.3) 78%, transparent);

  --inner-hi: inset 0 1px 0 rgb(var(--rgb-white) / 0.95);
  --shadow-1: 0 1px 2px rgb(var(--rgb-ink-900) / 0.06), 0 10px 22px -14px rgb(var(--rgb-ink-900) / 0.16);
  --shadow-2: 0 26px 50px -30px rgb(var(--rgb-brand-700) / 0.26), 0 10px 22px -14px rgb(var(--rgb-ink-900) / 0.12);
  --shadow-3: 0 50px 90px -40px rgb(var(--rgb-brand-700) / 0.32), 0 18px 36px -20px rgb(var(--rgb-ink-900) / 0.16);

  color-scheme: light;
  background: var(--bg);
  color: var(--text);
}
.theme-dark { color-scheme: dark; color: var(--text); }
.theme-light :focus-visible { box-shadow: 0 0 0 6px rgb(var(--rgb-brand-600) / 0.16); }

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* ---------------------------------------------------------------------
   2. Reset & base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent-400);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
  box-shadow: 0 0 0 6px rgb(var(--rgb-accent-500) / 0.18);
}
:focus-visible { outline-color: var(--focus); }

::selection { background: rgb(var(--rgb-brand-500) / 0.35); color: var(--text); }

/* Lenis (smooth scroll) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--grad-cta);
  color: var(--on-brand);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* Grain overlay (static, composited once) */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background-image: url("/lp/assets/noise.svg");
  background-size: 200px 200px;
  opacity: 0.04;
  contain: strict;
}

/* Scroll progress — the logo spectrum */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--grad-spectrum);
  box-shadow: 0 0 14px rgb(var(--rgb-brand-500) / 0.6);
}

/* Cursor accent (fine pointers only) */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 130;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor.is-active { opacity: 1; }
.cursor__ring {
  display: block;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-brand-300) / 0.55);
  transition: transform 0.5s var(--ease-out), background-color 0.35s, box-shadow 0.35s;
}
.cursor.is-hover .cursor__ring {
  transform: scale(1.65);
  background: rgb(var(--rgb-brand-500) / 0.08);
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-accent-300) / 0.8);
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------------------------------------------------------------------
   3. Shared type & layout
   --------------------------------------------------------------------- */
.section-head,
.chapter__inner,
.bento,
.stats__inner,
.apps__inner,
.footer__inner,
.footer__base {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.section-head { margin-bottom: var(--head-gap); }
.section-head--center { text-align: center; }
.section-head--center .lede { margin-inline: auto; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-brand);
}
.kicker::before,
.section-head--center .kicker::after,
.stats__head .kicker::after,
.final .kicker::after {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-400));
  transform-origin: right center;
  transition: transform 0.9s var(--ease-out) 0.1s;
}
.section-head--center .kicker::after,
.stats__head .kicker::after,
.final .kicker::after {
  background: linear-gradient(90deg, var(--brand-400), transparent);
  transform-origin: left center;
}
.motion-ready .kicker:not(.is-in)::before,
.motion-ready .kicker:not(.is-in)::after { transform: scaleX(0); }

.h2, .h3, .hero__title, .final__title, .pillar__title {
  font-family: var(--font-display);
  font-weight: 650;
  color: var(--text);
  text-wrap: balance;
}
.h2 {
  margin: 0 0 20px;
  font-size: var(--fs-h2);
  line-height: 1.04;
  letter-spacing: var(--tracking-display);
}
.h3 {
  margin: 0 0 18px;
  font-size: var(--fs-h3);
  line-height: 1.08;
  letter-spacing: -0.032em;
}

/* Serif italic emphasis in the logo spectrum */
.hero__title em, .h2 em, .h3 em, .final__title em {
  font-family: var(--font-serif);
  font-size: 1.08em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.012em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em;
}

.lede {
  margin: 0;
  max-width: 600px;
  font-size: var(--fs-lede);
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* Word-split masked reveal */
.is-split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.06em 0.04em 0.16em 0;
  margin: -0.06em -0.04em -0.16em 0;
}
.is-split .wi { display: inline-block; }
.is-split .w--em { padding-right: 0.12em; margin-right: -0.12em; }

/* Shared chip */
.tags li,
.mini-tags li,
.qtypes li,
.pv-apps__platforms li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: var(--chip-h);
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  box-shadow: var(--ring);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  color: var(--chip-text);
  white-space: nowrap;
}

/* Shared icon tile */
.bento__icon,
.platforms__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgb(var(--rgb-brand-500) / 0.22), rgb(var(--rgb-accent-500) / 0.06));
  box-shadow: var(--ring-strong), var(--inner-hi);
  color: var(--text-brand);
}
.bento__icon .ico,
.platforms__icon .ico { width: var(--icon-md); height: var(--icon-md); }

/* Section dividers — spectrum hairline */
.institutes::before,
.stats::before,
.footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--grad-hairline);
  opacity: 0.8;
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   4. Buttons
   --------------------------------------------------------------------- */
.btn {
  --bh: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--bh);
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-pill);
  font: 650 15px/1 var(--font-body);
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  isolation: isolate;
  transition: box-shadow 0.5s var(--ease-out), background-color 0.3s, color 0.3s, filter 0.3s;
}
.btn__label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.btn .ico { width: 18px; height: 18px; transition: transform 0.45s var(--ease-out); }
.btn:hover .btn__label > .ico { transform: translateX(3px); }
.btn--sm { --bh: 42px; padding: 0 18px; font-size: 14px; }
.btn--lg { --bh: 56px; padding: 0 28px; font-size: 16px; }
.btn--xl { --bh: 64px; padding: 0 34px; font-size: 17px; }
.btn--block { width: 100%; }

.btn--primary {
  color: var(--on-brand);
  background: var(--grad-cta);
  box-shadow: inset 0 1px 0 rgb(var(--rgb-white) / 0.28), inset 0 -1px 0 rgb(var(--rgb-ink-1000) / 0.3), var(--glow-brand);
}
/* spectrum light travelling around the border */
.btn--primary::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  z-index: 1;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), transparent 0 52%, var(--accent-300) 64%, var(--brand-300) 74%, var(--pink-300) 82%, var(--amber-300) 90%, transparent 97%);
  -webkit-mask: linear-gradient(var(--mask) 0 0) content-box, linear-gradient(var(--mask) 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-spin 4s linear infinite;
  pointer-events: none;
}
/* hover glow */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 0 40px 4px rgb(var(--rgb-brand-500) / 0.5), 0 0 90px 10px rgb(var(--rgb-pink-500) / 0.22);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
.btn--primary:hover { filter: brightness(1.08) saturate(1.05); }
.btn--primary:hover::after,
.btn--primary:focus-visible::after { opacity: 1; }

.btn--ghost {
  color: var(--text);
  background: var(--ghost-bg);
  box-shadow: inset 0 0 0 1px var(--ghost-ring), var(--inner-hi);
}
.btn--ghost:hover {
  background: rgb(var(--rgb-brand-500) / 0.1);
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-brand-300) / 0.5), 0 12px 32px -16px rgb(var(--rgb-brand-500) / 0.6);
}

.btn__play {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: -6px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--hairline-accent);
  color: var(--text-accent);
}
.btn__play svg { width: 11px; height: 11px; fill: currentColor; }

@keyframes border-spin { to { --angle: 360deg; } }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-accent);
  transition: color 0.3s;
}
.link-arrow:hover { color: var(--accent-200); }
.link-arrow .ico { width: var(--icon-sm); height: var(--icon-sm); transition: transform 0.4s var(--ease-out); }
.link-arrow:hover .ico { transform: translateX(4px); }

@media (pointer: coarse) {
  .btn--sm { --bh: var(--tap); }
  .link-arrow { min-height: var(--tap); }
}

/* ---------------------------------------------------------------------
   5. Navigation
   --------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 110;
  padding-top: env(safe-area-inset-top, 0px);
}
/* Frosted surface lives on a pseudo-element: a backdrop-filter on .nav itself would become the
   containing block for the fixed .mobile-menu and collapse it to the height of the bar. */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(var(--rgb-ink-950) / 0);
  pointer-events: none;
  transition: background-color 0.45s;
}
.nav::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--grad-hairline);
  opacity: 0;
  transition: opacity 0.45s;
}
.nav.is-scrolled::before,
.nav.is-open::before {
  background: rgb(var(--rgb-ink-950) / 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}
.nav.is-open::before { background: rgb(var(--rgb-ink-950) / 0.96); }
.nav.is-scrolled::after,
.nav.is-open::after { opacity: 0.55; }

/* the bar height never changes (no layout jump); it only gains a surface on scroll */
.nav__inner {
  position: relative;
  width: min(100% - 2 * var(--gutter), 1320px);
  height: var(--nav-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__logo { display: flex; align-items: center; min-height: var(--tap); }
.nav__logo img { width: auto; height: 28px; }

.nav__links {
  position: absolute;
  left: 50%;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius-pill);
  transform: translateX(-50%);
  transition: background-color 0.45s, box-shadow 0.45s;
}
.nav.is-scrolled .nav__links { background: rgb(var(--rgb-white) / 0.03); box-shadow: var(--ring); }
.nav__links a {
  position: relative;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 550;
  color: var(--text-muted);
  transition: color 0.25s, background-color 0.25s;
}
.nav__links a:hover { color: var(--text); background: rgb(var(--rgb-white) / 0.05); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-400);
  box-shadow: 0 0 10px var(--brand-500);
  transform: translateX(-50%) scale(0);
  transition: transform 0.45s var(--ease-out);
}
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after { transform: translateX(-50%) scale(1); }

.nav__actions { display: flex; align-items: center; gap: 10px; }

.nav__toggle {
  display: none;
  position: relative;
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: 50%;
  background: rgb(var(--rgb-white) / 0.05);
  box-shadow: var(--ring);
  cursor: pointer;
}
.nav__toggle span {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  height: 1.5px;
  margin-top: -0.75px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.45s var(--ease-out);
}
.nav__toggle span:first-child { transform: translateY(-4px); }
.nav__toggle span:last-child { transform: translateY(4px); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  height: calc(100vh - var(--nav-h) - env(safe-area-inset-top, 0px));
  height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(80% 50% at 100% 0%, rgb(var(--rgb-brand-500) / 0.16), transparent 70%),
    radial-gradient(60% 40% at 0% 100%, rgb(var(--rgb-accent-500) / 0.08), transparent 70%),
    var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}
.mobile-menu.is-visible { opacity: 1; }
.mobile-menu nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out), color 0.25s;
}
.mobile-menu nav a:active { color: var(--text-brand); }
.mobile-menu.is-visible nav a { opacity: 1; transform: none; }
.mobile-menu.is-visible nav a:nth-child(2) { transition-delay: 0.04s; }
.mobile-menu.is-visible nav a:nth-child(3) { transition-delay: 0.08s; }
.mobile-menu.is-visible nav a:nth-child(4) { transition-delay: 0.12s; }
.mobile-menu.is-visible nav a:nth-child(5) { transition-delay: 0.16s; }
.mobile-menu nav a::after { content: "→"; font-size: 1rem; color: var(--text-brand); }
.mobile-menu .btn { flex: none; opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease-out) 0.2s, transform 0.6s var(--ease-out) 0.2s; }
.mobile-menu.is-visible .btn { opacity: 1; transform: none; }
.no-js .mobile-menu { opacity: 1; }

@media (max-width: 1000px) {
  :root { --nav-h: 64px; }
  .nav__links { display: none; }
  .nav__toggle { display: inline-block; }
}
@media (max-width: 440px) {
  .nav__actions .btn { display: none; }
}

/* ---------------------------------------------------------------------
   6. Hero
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 40px) 0 110px;
  overflow: hidden;
}
.motion-ready .hero { height: 100vh; height: 100svh; min-height: 0; }

.hero__bg { position: absolute; inset: 0; z-index: -3; pointer-events: none; }

.glow { position: absolute; border-radius: 50%; pointer-events: none; }
.glow--gold {
  width: 78vw;
  height: 78vw;
  max-width: 1200px;
  max-height: 1200px;
  right: -20vw;
  top: -18vw;
  background: radial-gradient(closest-side, rgb(var(--rgb-brand-500) / 0.24), rgb(var(--rgb-pink-500) / 0.08) 52%, transparent 74%);
}
.glow--navy {
  width: 90vw;
  height: 90vw;
  left: -36vw;
  bottom: -54vw;
  background: radial-gradient(closest-side, rgb(var(--rgb-accent-500) / 0.16), rgb(var(--rgb-ink-600) / 0.2) 52%, transparent 74%);
}
.hero__lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(var(--rgb-neutral-300) / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--rgb-neutral-300) / 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 70% 45%, var(--mask) 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 55% at 70% 45%, var(--mask) 15%, transparent 72%);
}

.hero__stage { position: absolute; inset: 0; z-index: -2; }
.hero__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}
.hero.is-3d .hero__canvas { opacity: 1; }
.hero__css3d, .hero__css3d-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* CSS laptop: shown before WebGL loads and whenever 3D isn't available; plays the same screen tour */
.hero__device {
  position: absolute;
  top: 50%;
  right: max(var(--gutter), 3vw);
  width: min(38vw, 560px);
  transform: translateY(-46%) perspective(1600px) rotateY(-16deg) rotateX(7deg);
  transition: opacity 0.8s ease, visibility 0.8s, transform 1.2s var(--ease-out), width 1.2s var(--ease-out), right 1.2s var(--ease-out), top 1.2s var(--ease-out), bottom 1.2s var(--ease-out);
  pointer-events: none;
}
.hero.is-touring .hero__device {
  right: max(var(--gutter), 5vw);
  width: min(60vw, 960px);
  transform: translateY(-50%) perspective(1600px) rotateY(0deg) rotateX(0deg);
}
.hero.is-3d .hero__device { opacity: 0; visibility: hidden; }
.css-laptop { position: relative; }
.css-laptop__lid {
  padding: 1.4% 1.4% 2.8%;
  border-radius: 22px 22px 8px 8px;
  background: linear-gradient(180deg, var(--ink-500), var(--ink-800));
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-white) / 0.1), var(--shadow-3), 0 0 140px -40px rgb(var(--rgb-brand-500) / 0.55);
}
.css-laptop__screen { position: relative; aspect-ratio: 1280 / 800; overflow: hidden; border-radius: 10px; background: var(--ink-1000); }
.css-laptop__screen .lms-plane { position: absolute; top: 0; left: 0; transform-origin: 0 0; transform: scale(var(--lms-s, 0.5)); }
.css-laptop__base {
  position: relative;
  height: 16px;
  margin: 0 -8%;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(180deg, var(--ink-500), var(--ink-900));
  box-shadow: 0 34px 60px -24px rgb(var(--rgb-ink-1000) / 0.9);
}
.css-laptop__base span { position: absolute; top: 0; left: 50%; width: 16%; height: 6px; border-radius: 0 0 10px 10px; background: rgb(var(--rgb-ink-1000) / 0.5); transform: translateX(-50%); }
.lms-plane { width: 1280px; height: 800px; }

/* scrim keeps copy readable over the 3D object */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgb(var(--rgb-ink-950) / 0.78) 0%, rgb(var(--rgb-ink-950) / 0.34) 42%, transparent 62%);
  transition: opacity 0.8s ease;
}
.hero.is-touring::before { opacity: 0.25; }
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 200px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero__content {
  position: relative;
  width: min(100% - 2 * var(--gutter), 1320px);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin: 0 0 28px;
  padding: 8px 16px 8px 12px;
  border-radius: var(--radius-pill);
  background: rgb(var(--rgb-ink-800) / 0.6);
  box-shadow: var(--ring), var(--inner-hi);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
}
.eyebrow__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 0 4px rgb(var(--rgb-brand-500) / 0.18), 0 0 14px rgb(var(--rgb-brand-500) / 0.8);
}

.hero__title {
  max-width: 15.5em;
  margin: 0 0 26px;
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.042em;
}
.br-desk { display: none; }
@media (min-width: 1000px) and (orientation: landscape) { .br-desk { display: inline; } }

.hero__sub {
  max-width: 560px;
  margin: 0 0 38px;
  font-size: var(--fs-lede);
  line-height: 1.6;
  color: var(--text-muted);
}

.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.trust {
  display: flex;
  flex-wrap: wrap;
  row-gap: 12px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--text-muted);
}
.trust li { display: flex; align-items: baseline; gap: 7px; padding: 0 22px; border-left: 1px solid var(--hairline-strong); }
.trust li:first-child { padding-left: 0; border-left: 0; }
.trust strong {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* JS-driven entrance: hide only when motion is going to run */
.js:not(.motion-off):not(.reduced) [data-hero-in] { opacity: 0; }

/* Glass chips */

.live-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--coral-400);
  animation: pulse 1.8s var(--ease-out) infinite;
}
@keyframes pulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: var(--tap);
  transform: translateX(-50%);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.scroll-cue__line {
  position: relative;
  width: 1px;
  height: 46px;
  overflow: hidden;
  background: rgb(var(--rgb-neutral-300) / 0.18);
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 50%;
  background: linear-gradient(180deg, transparent, var(--brand-400));
  animation: cue 2.2s var(--ease-out) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(220%); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* Stacked layout (portrait, tablets; must match STACKED in js/hero-laptop.js):
   copy on top, the laptop rises from below as the tour begins */
@media (max-aspect-ratio: 11/10), (max-width: 1023px) and (min-height: 521px) {
  .hero { align-items: flex-start; padding-top: calc(var(--nav-h) + 22px); }
  .hero::before { background: linear-gradient(180deg, rgb(var(--rgb-ink-950) / 0.85) 0%, rgb(var(--rgb-ink-950) / 0.5) 48%, transparent 72%); }
  .hero__device { top: auto; right: 50%; bottom: -7vh; width: min(92vw, 660px); transform: translateX(50%) perspective(1400px) rotateX(20deg); }
  .hero.is-touring .hero__device { right: 50%; bottom: 58%; width: min(94vw, 760px); transform: translate(50%, 50%) perspective(1400px) rotateX(0deg); }
  .trust { display: none; }
  .scroll-cue { display: none; }
  .hero::after { transition: height 0.8s var(--ease-out); }
  .hero.is-touring::after { height: 46%; background: linear-gradient(180deg, transparent, rgb(var(--rgb-ink-950) / 0.82) 45%, var(--bg)); }
}
@media (max-width: 480px) {
  .hero__ctas .btn--ghost { display: none; }
}
@media (orientation: portrait) and (max-height: 700px) {
  .hero__sub { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .hero { align-items: center; padding: calc(var(--nav-h) + 16px) 0 40px; }
  .hero__content { padding-right: 46vw; }
  .hero__title { font-size: clamp(1.8rem, 1rem + 2.6vw, 2.5rem); }
  .hero__sub, .trust, .eyebrow { display: none; }
  .hero__title { margin-bottom: 18px; }
  .hero__ctas .btn--ghost { display: none; }
  .scroll-cue { display: none; }
}

/* ---------------------------------------------------------------------
   7. Institutes marquee
   --------------------------------------------------------------------- */
.institutes {
  position: relative;
  padding: 34px 0 40px;
  background: linear-gradient(180deg, rgb(var(--rgb-ink-900) / 0.7), rgb(var(--rgb-ink-950) / 0.95));
}
.institutes::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--hairline);
}
.institutes__label {
  margin: 0 0 16px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, var(--mask) 10%, var(--mask) 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, var(--mask) 10%, var(--mask) 90%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 44s linear infinite;
  will-change: transform;
}
.gsap-marquee .marquee__track { animation: none; }
.marquee__list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.marquee__list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 30px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 0.95rem + 1.8vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--text);
}
.marquee__list li:nth-child(even) {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 1.05rem + 2vw, 2.8rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}
.marquee__list li::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-left: 16px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--grad-brand);
  box-shadow: 0 0 14px rgb(var(--rgb-brand-500) / 0.6);
}
.marquee__list li:nth-child(4n + 2)::after { background: linear-gradient(135deg, var(--accent-400), var(--accent-600)); box-shadow: 0 0 14px rgb(var(--rgb-accent-500) / 0.55); }
.marquee__list li:nth-child(4n + 3)::after { background: linear-gradient(135deg, var(--amber-300), var(--amber-500)); box-shadow: 0 0 14px rgb(var(--rgb-amber-500) / 0.5); }
.marquee__list li span {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  box-shadow: var(--ring-strong);
  font-family: var(--font-body);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0.1em;
  color: var(--text-accent);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------------
   8. The four pillars
   --------------------------------------------------------------------- */
.pillars {
  position: relative;
  padding: var(--section-y) 0;
  background:
    radial-gradient(50% 40% at 85% 30%, rgb(var(--rgb-brand-500) / 0.08), transparent 70%),
    radial-gradient(40% 40% at 10% 80%, rgb(var(--rgb-accent-500) / 0.05), transparent 70%);
}
.pillars__pin { position: relative; }
.pillars__track {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  display: grid;
  gap: 24px;
}
.pillars__intro { margin-bottom: 24px; }
.pillars__hint {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 34px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-brand);
}
.pillars__hint .ico { width: 18px; height: 18px; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }

.pillar {
  position: relative;
  display: grid;
  gap: 32px;
  padding: clamp(24px, 3.6vw, 52px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 90% at 100% 0%, rgb(var(--rgb-brand-500) / 0.1), transparent 55%),
    var(--grad-card);
  box-shadow: var(--ring), var(--inner-hi), var(--shadow-3);
  overflow: hidden;
}
.pillar::before {
  content: "";
  position: absolute;
  inset: 0 10% auto;
  height: 1px;
  background: var(--grad-hairline);
}
.pillar__text { position: relative; z-index: 1; }
.pillar__num {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 2.5rem + 3.4vw, 6.6rem);
  font-weight: 200;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgb(var(--rgb-brand-300) / 0.55);
}
.pillar__title {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.pillar p { max-width: 460px; margin: 0 0 22px; color: var(--text-muted); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }

.pillar__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 42%, rgb(var(--rgb-brand-500) / 0.14), transparent 62%),
    rgb(var(--rgb-ink-1000) / 0.45);
  box-shadow: var(--ring-neutral), inset 0 20px 40px -30px rgb(var(--rgb-ink-1000) / 0.8);
  overflow: hidden;
}

@media (min-width: 900px) {
  .pillar { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: stretch; }
  .pillar__text { align-self: center; }
}

/* Horizontal (pinned) mode — enabled by JS on wide screens */
.pillars.is-horizontal { padding: 0; }
.pillars.is-horizontal .pillars__pin {
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.pillars.is-horizontal .pillars__track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  margin: 0;
  padding: 0 var(--gutter) 0 max(var(--gutter), calc((100vw - var(--container)) / 2));
  will-change: transform;
}
.pillars.is-horizontal .pillars__intro { flex: none; width: min(32vw, 460px); margin: 0 44px 0 0; }
.pillars.is-horizontal .pillars__hint { display: inline-flex; }
.pillars.is-horizontal .pillar {
  flex: none;
  width: min(74vw, 1060px);
  height: min(72vh, 640px);
  margin-top: 4vh;
}
@media (max-width: 1180px) {
  
  
  
  .pillars.is-horizontal .pillar { width: min(84vw, 1060px); }
  .pillars.is-horizontal .pillars__intro { width: min(40vw, 420px); }
}
.pillars__progress { display: none; }
.pillars.is-horizontal .pillars__progress {
  position: absolute;
  left: 50%;
  bottom: 4.5vh;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.pillars__count { white-space: nowrap; }
.pillars__count b { color: var(--text); font-weight: 700; }
.pillars__bar {
  width: 220px;
  height: 2px;
  border-radius: 2px;
  background: rgb(var(--rgb-neutral-300) / 0.16);
  overflow: hidden;
}
.pillars__bar i {
  display: block;
  height: 100%;
  background: var(--grad-spectrum);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* --- Pillar visual: exam --- */
.pv-exam { display: grid; justify-items: center; gap: 26px; width: 100%; }
.pv-exam__ring { position: relative; width: min(236px, 62vw); aspect-ratio: 1; }
.pv-exam__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-ticks { fill: none; stroke: rgb(var(--rgb-brand-300) / 0.3); stroke-width: 7; stroke-dasharray: 0.18 0.82; }
.ring-track { fill: none; stroke: rgb(var(--rgb-neutral-300) / 0.1); stroke-width: 9; }
.ring-fill {
  fill: none;
  stroke: var(--accent-400);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 26;
  filter: drop-shadow(0 0 6px rgb(var(--rgb-accent-500) / 0.5));
  animation: ring-drain 16s linear infinite alternate;
}
@keyframes ring-drain { from { stroke-dashoffset: 14; } to { stroke-dashoffset: 40; } }
.pv-exam__time {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
}
.pv-exam__time small { font-size: 10.5px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.pv-exam__time strong { font-size: 2.05rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.pv-exam__time em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--text-accent); }

/* Question palette (shared) */
.palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.palette--mini { grid-template-columns: repeat(12, 1fr); width: min(100%, 380px); gap: 5px; }
.palette > * {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 5px;
  background: rgb(var(--rgb-neutral-300) / 0.07);
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-neutral-300) / 0.16);
  transition: background-color 0.35s, box-shadow 0.35s;
}
.palette > .a { background: var(--grad-brand); box-shadow: inset 0 1px 0 rgb(var(--rgb-white) / 0.25); }
.palette > .m { background: rgb(var(--rgb-amber-500) / 0.12); box-shadow: inset 0 0 0 1.5px var(--amber-400); }
.palette > .m::after {
  content: "";
  position: absolute;
  top: 18%;
  right: 18%;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: var(--amber-400);
}
.palette > .c { background: rgb(var(--rgb-white) / 0.1); box-shadow: inset 0 0 0 1.5px var(--neutral-50), 0 0 0 3px rgb(var(--rgb-accent-500) / 0.35); }

/* --- Pillar visual: live --- */
.pv-live { width: 100%; max-width: 470px; }
.pv-live__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pv-tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--ink-700), var(--ink-900));
  box-shadow: var(--ring-neutral);
}
.pv-tile .ico { position: absolute; right: 8px; bottom: 8px; width: 14px; height: 14px; color: var(--text-dim); }
.pv-tile--main {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 8.6;
  place-items: stretch;
  background: linear-gradient(140deg, var(--paper), var(--paper-2));
  overflow: hidden;
}
.pv-tile__slide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  padding: 0 14% 0 8%;
  color: var(--paper-ink);
}
.pv-tile__slide b { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.03em; }
.pv-tile__slide i { display: block; width: 78%; height: 6px; border-radius: 4px; background: rgb(var(--rgb-ink-900) / 0.12); }
.pv-tile__slide i.short { width: 48%; }
.pv-tile--main .pill--live { position: absolute; top: 12px; left: 12px; }
.pv-tile--main .pill--rec { position: absolute; top: 12px; right: 12px; }
.pv-tile__name {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgb(var(--rgb-ink-950) / 0.8);
  font-size: 10.5px;
  color: var(--text);
}
.pv-live__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgb(var(--rgb-ink-900) / 0.85);
  box-shadow: var(--ring);
  font-size: 12.5px;
  color: var(--text-muted);
}
.pv-live__bar .ico { width: var(--icon-sm); height: var(--icon-sm); color: var(--text-accent); }
.pv-live__bar .sep { width: 1px; height: 14px; background: var(--hairline-strong); }

.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-300), var(--brand-400));
  transform-origin: 50% 100%;
  animation: eq 1.1s ease-in-out infinite;
}
.eq i:nth-child(2) { animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-delay: -0.6s; }
.eq i:nth-child(4) { animation-delay: -0.15s; }
.eq i:nth-child(5) { animation-delay: -0.45s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill .live-dot { width: 6px; height: 6px; }
.pill--live { background: rgb(var(--rgb-ink-950) / 0.88); color: var(--coral-300); box-shadow: inset 0 0 0 1px rgb(var(--rgb-coral-400) / 0.45); }
.pill--rec { background: rgb(var(--rgb-ink-950) / 0.88); color: var(--text); box-shadow: var(--ring-neutral); }
.pill--rec::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); }

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink-500), var(--ink-700));
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-brand-300) / 0.3);
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
}

/* --- Pillar visual: apps --- */
@property --dev-c1 { syntax: "<color>"; inherits: true; initial-value: transparent; }
.pv-apps { display: grid; justify-items: center; gap: 30px; width: 100%; }
.pv-apps__devices { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 220px; }
.pv-dev {
  position: relative;
  background: linear-gradient(160deg, var(--ink-700), var(--ink-950));
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-brand-300) / 0.3), var(--shadow-2);
  animation: theme-cycle 9s ease-in-out infinite;
}
.pv-dev--desk { width: 260px; height: 168px; padding: 24px 14px 14px; border-radius: var(--radius-md); }
.pv-dev--phone { width: 94px; height: 194px; margin-left: -34px; padding: 24px 9px 10px; border-radius: 20px; animation-delay: -3s; }
.pv-dev--alt { width: 84px; height: 170px; margin-left: 14px; animation-delay: -6s; }
.pv-dev__bar {
  position: absolute;
  top: 9px;
  left: 12px;
  width: 30px;
  height: 6px;
  background: radial-gradient(circle at 3px 3px, rgb(var(--rgb-neutral-300) / 0.4) 2.4px, transparent 3px) 0 0 / 10px 6px repeat-x;
}
.pv-dev__notch { position: absolute; top: 9px; left: 50%; width: 26px; height: 5px; border-radius: 3px; background: rgb(var(--rgb-ink-1000) / 0.8); transform: translateX(-50%); }
.pv-dev__body { display: grid; grid-template-rows: 1.3fr 1fr 1fr; gap: 7px; height: 100%; }
.pv-dev__body i { border-radius: var(--radius-xs); background: rgb(var(--rgb-neutral-300) / 0.08); }
.pv-dev__body i:first-child { background: linear-gradient(135deg, var(--dev-c1), rgb(var(--rgb-white) / 0.06)); }
@keyframes theme-cycle {
  0%, 28% { --dev-c1: var(--brand-500); }
  36%, 62% { --dev-c1: var(--accent-500); }
  70%, 94% { --dev-c1: var(--amber-500); }
  100% { --dev-c1: var(--brand-500); }
}
.pv-apps__platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; margin: 0; padding: 0; list-style: none; }
.pv-apps__platforms .ico { width: var(--icon-sm); height: var(--icon-sm); color: var(--text-accent); }

/* --- Pillar visual: batch --- */
.pv-batch { position: relative; width: min(100%, 400px); aspect-ratio: 1; }
.pv-batch__lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.pv-batch__lines line { stroke: rgb(var(--rgb-brand-300) / 0.42); stroke-width: 1; stroke-dasharray: 3 6; animation: dash-flow 3s linear infinite; }
.pv-batch__lines .orbit { fill: none; stroke: rgb(var(--rgb-accent-300) / 0.12); stroke-width: 1; }
@keyframes dash-flow { to { stroke-dashoffset: -54; } }
.pv-batch__core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 28%, var(--brand-300), var(--brand-600) 58%, var(--brand-800));
  box-shadow: 0 0 0 10px rgb(var(--rgb-brand-500) / 0.1), 0 0 0 22px rgb(var(--rgb-brand-500) / 0.05), 0 0 70px rgb(var(--rgb-brand-500) / 0.45), inset 0 1px 0 rgb(var(--rgb-white) / 0.35);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--on-brand);
}
.pv-node {
  position: absolute;
  top: var(--y);
  left: var(--x);
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  transform: translate(-50%, -50%);
  background: rgb(var(--rgb-ink-900) / 0.95);
  box-shadow: var(--ring-strong), var(--shadow-1);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.pv-node:nth-of-type(odd) { box-shadow: inset 0 0 0 1px var(--hairline-accent), var(--shadow-1); }

@media (max-width: 560px) {
  .pillar__visual { min-height: 280px; padding: 18px; }
  .pv-apps__devices { height: 150px; }
  .pv-dev--desk { width: 150px; height: 100px; padding: 18px 9px 9px; }
  .pv-dev--phone { width: 62px; height: 130px; margin-left: -22px; padding: 18px 6px 7px; border-radius: 14px; }
  .pv-dev--alt { width: 54px; height: 112px; margin-left: 8px; }
  .pv-node { padding: 5px 9px; font-size: 10.5px; }
  .pv-batch__core { width: 80px; height: 80px; font-size: 1rem; }
}

/* ---------------------------------------------------------------------
   9. Chapters (deep dives)
   --------------------------------------------------------------------- */
.chapters {
  position: relative;
  padding: var(--section-y) 0 40px;
  background:
    radial-gradient(60% 30% at 90% 8%, rgb(var(--rgb-brand-500) / 0.07), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-section) 10%, var(--bg-section) 90%, var(--bg));
}
.chapters::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--hairline) 10%, var(--hairline) 90%, transparent);
  pointer-events: none;
}

.chapter { position: relative; padding: clamp(56px, 8vw, 110px) 0; }
.chapter__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; align-items: center; }
.chapter__text, .chapter__visual { min-width: 0; }

@media (min-width: 1024px) {
  .chapter__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(48px, 6vw, 96px); }
  .chapter--flip .chapter__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .chapter--flip .chapter__text { order: 2; }
}

/* pinned mode (desktop): each chapter fills the viewport while it scrubs */
@media (max-height: 860px) {
  .is-pinned-mode .qtypes { display: none; }
  .is-pinned-mode .chapter__label { margin-bottom: 14px; }
  .is-pinned-mode .chapter__lede { margin-bottom: 18px; font-size: 1rem; }
  .is-pinned-mode .bullets { gap: 10px; }
  .is-pinned-mode .bullets li { font-size: 14px; line-height: 1.5; }
  .is-pinned-mode .callout { margin-top: 18px; padding: 12px 16px; }
  .is-pinned-mode .chapter__visual { scale: 0.88; }
}
@media (max-height: 760px) {
  .is-pinned-mode .h3 { font-size: clamp(1.7rem, 1.1rem + 1.4vw, 2.3rem); }
  .is-pinned-mode .chapter__visual { scale: 0.8; }
}
.chapter.is-pinned-mode {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: calc(var(--nav-h) + 8px) 0 36px;
  background:
    radial-gradient(45% 50% at var(--glow-x, 78%) 50%, rgb(var(--rgb-brand-500) / 0.07), transparent 70%),
    var(--bg-section);
}
.chapter--flip.is-pinned-mode { --glow-x: 22%; }

.chapter__label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}
.chapter__label span { padding-right: 14px; border-right: 1px solid var(--hairline-strong); color: var(--text-brand); }
.chapter__lede { max-width: 520px; margin: 0 0 26px; font-size: 1.05rem; line-height: 1.6; color: var(--text-muted); }

.bullets { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.bullets li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  transition: color 0.4s;
}
.bullets .ico {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  padding: 4.5px;
  border-radius: 50%;
  background: rgb(var(--rgb-brand-500) / 0.14);
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-brand-300) / 0.3);
  color: var(--text-brand);
  stroke-width: 2.4;
  transition: background 0.4s, color 0.4s, box-shadow 0.4s;
}
.bullets b { font-weight: 650; color: var(--text); }
/* while scrubbing, bullets light up in sequence */
.is-pinned-mode .bullets li { color: rgb(var(--rgb-neutral-300) / 0.55); }
.is-pinned-mode .bullets li b { color: rgb(var(--rgb-neutral-50) / 0.6); transition: color 0.4s; }
.is-pinned-mode .bullets li.is-lit { color: var(--text-muted); }
.is-pinned-mode .bullets li.is-lit b { color: var(--text); }
.is-pinned-mode .bullets li.is-lit .ico { background: var(--grad-brand); color: var(--on-brand); box-shadow: 0 0 16px rgb(var(--rgb-brand-500) / 0.5); }

.callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 26px 0 0;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgb(var(--rgb-brand-500) / 0.14), rgb(var(--rgb-accent-500) / 0.04));
  box-shadow: var(--ring-strong), var(--inner-hi);
  font-size: 15px;
  color: var(--text-muted);
}
.callout .ico { width: var(--icon-lg); height: var(--icon-lg); margin-top: 1px; color: var(--text-accent); }
.callout b { color: var(--text); font-weight: 650; }

.chapter__visual { position: relative; }

/* ---------- Product-surface mockups (shared) ---------- */
.mock { position: relative; font-size: 13px; line-height: 1.4; color: var(--text); }

.win {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--grad-window);
  box-shadow: var(--ring), var(--inner-hi), var(--shadow-3);
  overflow: hidden;
}

.panel {
  position: relative;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--grad-window);
  box-shadow: var(--ring), var(--inner-hi), var(--shadow-3);
}

.st {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgb(var(--rgb-neutral-300) / 0.12);
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
  color: var(--text-muted);
  white-space: nowrap;
}

.bars { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.bars li { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 8px; font-size: 10.5px; color: var(--text-muted); }
.bars i { position: relative; height: 5px; border-radius: 3px; background: rgb(var(--rgb-neutral-300) / 0.14); overflow: hidden; }
.bars i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--grad-bars);
  transform: scaleX(var(--w, 0.5));
  transform-origin: 0 50%;
}

/* ---------- Exam mock ---------- */
.exam { display: grid; grid-template-columns: minmax(0, 1fr) 176px; }

.frac { display: inline-flex; flex-direction: column; align-items: center; font-size: 14px; line-height: 1.25; }
.frac > span:first-child { padding: 0 4px 1px; border-bottom: 1px solid currentColor; }

.opts { display: grid; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.opt {
  display: flex;
  width: 100%;
  text-align: left;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  box-shadow: var(--ring-neutral);
  font-size: 12.5px;
  color: var(--text-muted);
  transition: box-shadow 0.35s, background-color 0.35s, color 0.35s;
}
.opts i {
  position: relative;
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1.5px rgb(var(--rgb-neutral-300) / 0.4);
  transition: background 0.35s, box-shadow 0.35s;
}
.opts i::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--on-brand);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.3s var(--ease-out);
}

.score { display: flex; align-items: baseline; gap: 5px; }
.score b { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.score span { color: var(--text-dim); }

.ready { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; }
.ready svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.ready .t, .ring .t { fill: none; stroke: rgb(var(--rgb-neutral-300) / 0.14); stroke-width: 6; }
.ready .f, .ring .f { fill: none; stroke: var(--accent-400); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 100; }
.ready b { display: block; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.ready small { font-size: 10.5px; color: var(--text-dim); }

.qtypes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 34px 0 0 200px; padding: 0; list-style: none; }

/* ---------- Live mock ---------- */

.live { display: grid; grid-template-columns: minmax(0, 1fr) 178px; }

.watermark {
  position: absolute;
  top: 44%;
  left: 10%;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: rgb(var(--rgb-ink-900) / 0.22);
  pointer-events: none;
  animation: watermark 16s ease-in-out infinite alternate;
}
@keyframes watermark {
  0% { transform: translate(0, 0); }
  25% { transform: translate(140%, -190%); }
  50% { transform: translate(230%, 70%); }
  75% { transform: translate(50%, 170%); }
  100% { transform: translate(180%, -70%); }
}

.switches { display: grid; gap: 11px; margin: 0 0 20px; padding: 0; list-style: none; }
.switches li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.sw { position: relative; flex: none; width: 30px; height: 17px; border-radius: var(--radius-pill); background: rgb(var(--rgb-neutral-300) / 0.22); transition: background 0.35s; }
.sw::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--neutral-50);
  box-shadow: 0 1px 3px rgb(var(--rgb-ink-1000) / 0.5);
  transition: transform 0.35s var(--ease-out);
}
.sw.is-on { background: var(--grad-brand); }
.sw.is-on::after { transform: translateX(13px); }

/* ---------- Security mock ---------- */
.mock--sec { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 28px; }

.phone {
  position: relative;
  width: 232px;
  aspect-ratio: 9 / 19;
  padding: 10px;
  border-radius: 38px;
  background: linear-gradient(145deg, var(--ink-600), var(--ink-1000));
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-brand-300) / 0.3), inset 0 0 0 3px rgb(var(--rgb-ink-1000) / 0.6), var(--shadow-3);
}

.player { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-md); overflow: hidden; background: linear-gradient(135deg, var(--ink-600), var(--ink-900)); }

.blocked {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 3px;
  padding: 8px;
  text-align: center;
  background: rgb(var(--rgb-ink-1000) / 0.94);
  transition: opacity 0.45s;
}
.blocked .ico { width: var(--icon-lg); height: var(--icon-lg); margin-bottom: 2px; color: var(--text-brand); }
.blocked b { font-size: 11px; }
.blocked small { font-size: 9px; color: var(--text-dim); }

.log { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.log li {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgb(var(--rgb-ink-1000) / 0.35);
  box-shadow: var(--ring-neutral);
  font-size: 11.5px;
  transition: opacity 0.45s, transform 0.45s var(--ease-out);
}

/* ---------- Branded-app mock ---------- */
.mock--brand {
  --app-primary: var(--demo-a-1);
  --app-secondary: var(--demo-a-2);
  --app-accent: var(--demo-a-3);
  --app-bg: var(--demo-a-4);
  --app-surface: var(--demo-a-5);
  --app-text: var(--demo-a-6);
}
.mock--brand { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 28px; }

.app { display: flex; flex-direction: column; gap: 9px; padding: 42px 12px 12px; background: var(--app-bg); color: var(--app-text); }

/* ---------- Batch & fees mock ---------- */

.ledger { padding: 14px 16px 16px; }

.currency { display: flex; margin-left: auto; padding: 3px; border-radius: var(--radius-sm); background: rgb(var(--rgb-ink-1000) / 0.45); box-shadow: var(--ring-neutral); }
.currency button { padding: 3px 8px; border-radius: var(--radius-xs); font-size: 10.5px; font-style: normal; color: var(--text-dim); }
.currency .is-on { background: rgb(var(--rgb-brand-500) / 0.22); color: var(--text-brand); }

.transfer { display: flex; align-items: center; gap: 8px; margin: 10px 0; }

/* ---------- People & control mock ---------- */
.mock--people { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; }

.parent { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ring { position: relative; flex: none; width: 80px; height: 80px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .t, .ring .f { stroke-width: 7; }
.ring > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring b { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.ring small { font-size: 9px; color: var(--text-dim); }

.matrix { display: grid; grid-template-columns: auto repeat(5, minmax(0, 1fr)); align-items: center; gap: 8px 4px; font-size: 10.5px; }

.matrix > i,
.matrix > button {
  position: relative;
  justify-self: center;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-neutral-300) / 0.22);
}
.matrix > .y { background: var(--grad-brand); box-shadow: 0 0 10px -2px rgb(var(--rgb-brand-500) / 0.6); }
.matrix > .y::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--on-brand);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Motion-ready initial states (static/no-JS pages show everything) */
.motion-ready .log li:not(.is-on) { opacity: 0; transform: translateY(8px); }

.motion-ready .blocked:not(.is-on) { opacity: 0; }

/* ---------- Chapter responsiveness ---------- */
@media (max-width: 1023px) {
  .chapters::before { display: none; }
  .chapter { padding-block: clamp(40px, 6vw, 72px); }
  .chapter + .chapter .chapter__inner { padding-top: clamp(48px, 7vw, 80px); border-top: 1px solid var(--hairline); }
  .chapter__visual { width: 100%; max-width: 720px; margin-inline: auto; }
  
  
  
  
  .qtypes { justify-content: center; margin: 96px 0 0; }
}
@media (max-width: 640px) {
  .exam { grid-template-columns: 1fr; }
  
  
  
  
  
  .qtypes { justify-content: center; margin: 24px 0 0; }
  .live { grid-template-columns: 1fr; }
  
  
  .mock--sec, .mock--brand { grid-template-columns: 1fr; justify-items: center; }
  .mock--sec .panel, .mock--brand .panel { width: 100%; }
  .mock--people { grid-template-columns: 1fr; }
  
  
  .log li { grid-template-columns: 52px minmax(0, 1fr) auto; }
  
  
  
  
  
}
@media (max-width: 380px) {
  .phone { width: 210px; }
  
  
}

/* ---------------------------------------------------------------------
   10. Everything included (bento)
   --------------------------------------------------------------------- */
.included {
  position: relative;
  padding: var(--section-y) 0 clamp(80px, 8vw, 128px);
  background: radial-gradient(50% 40% at 50% 10%, rgb(var(--rgb-accent-500) / 0.05), transparent 70%);
}
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.bento__card,
.plan {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.bento__card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--grad-card);
  box-shadow: var(--ring), var(--inner-hi), var(--shadow-2);
  transition: box-shadow 0.5s var(--ease-out), transform 0.6s var(--ease-out);
}
.bento__card--wide { grid-column: span 2; }
.bento__card::before,
.plan::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(var(--rgb-brand-500) / 0.16), transparent 46%);
  opacity: 0;
  transition: opacity 0.45s;
  pointer-events: none;
}
.bento__card:hover { box-shadow: var(--ring-strong), var(--inner-hi), var(--shadow-3); transform: translateY(-4px); }
.bento__card:hover::before,
.plan:hover::before { opacity: 1; }
.bento__icon { margin-bottom: 22px; }
.bento__card h3 { margin: 0 0 8px; font-size: 1.2rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.025em; }
.bento__card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-muted); }
.mini-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.bento__card:nth-child(3n + 2) .bento__icon { color: var(--text-accent); background: linear-gradient(135deg, rgb(var(--rgb-accent-500) / 0.2), rgb(var(--rgb-brand-500) / 0.05)); box-shadow: inset 0 0 0 1px var(--hairline-accent), var(--inner-hi); }
.bento__card:nth-child(3n) .bento__icon { color: var(--text-pink); background: linear-gradient(135deg, rgb(var(--rgb-pink-500) / 0.2), rgb(var(--rgb-brand-500) / 0.05)); }
@media (max-width: 1100px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .bento__card--wide { grid-column: auto; } .bento__card { padding: 24px; } }

/* ---------------------------------------------------------------------
   11. Stats band
   --------------------------------------------------------------------- */
.stats {
  position: relative;
  padding: var(--section-y) 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 45% at 50% 0%, rgb(var(--rgb-brand-500) / 0.14), transparent 70%),
    radial-gradient(ellipse 40% 35% at 90% 72%, rgb(var(--rgb-accent-500) / 0.07), transparent 70%),
    linear-gradient(180deg, var(--bg-section), var(--bg));
}
.stats__head { margin-bottom: var(--head-gap); text-align: center; }
.stats__head .lede { margin-inline: auto; }
.stats__group + .stats__group { margin-top: 36px; }
.stats__label {
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.stats__grid { display: grid; margin: 0; padding: 0; list-style: none; }
.stats__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 12px; padding: 34px 28px 32px; border-right: 1px solid var(--hairline); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 1.9rem + 4.2vw, 6.2rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-variant-numeric: lining-nums tabular-nums;
  background: var(--grad-number);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label { font-size: 14px; font-weight: 500; color: var(--text-muted); }
@media (max-width: 760px) {
  .stats__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat, .stat:first-child { padding: 24px 8px 22px; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .stats__grid--3 .stat { padding-inline: 4px; }
  .stats__grid--3 .stat__num { font-size: clamp(2.2rem, 1rem + 5vw, 3rem); }
  .stats__grid--3 .stat__label { font-size: 12.5px; }
}

/* ---------------------------------------------------------------------
   12. Apps showcase
   --------------------------------------------------------------------- */
.apps { position: relative; padding: var(--section-y) 0; overflow: hidden; }
.apps__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(40px, 6vw, 90px); }
.apps__text { min-width: 0; }
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 36px 0 0; padding: 0; list-style: none; }
.platforms li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--grad-card);
  box-shadow: var(--ring), var(--inner-hi);
  transition: box-shadow 0.4s, transform 0.5s var(--ease-out);
}
.platforms li:hover { box-shadow: var(--ring-strong), var(--inner-hi), var(--shadow-2); transform: translateY(-2px); }
.platforms b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.platforms small { font-size: 12.5px; color: var(--text-dim); }

.laptop { position: relative; width: min(100%, 640px); margin-left: auto; }

@media (max-width: 1023px) {
  
  .apps__inner { grid-template-columns: minmax(0, 1fr); }
  
  .laptop { width: 88%; }
}
@media (max-width: 640px) {
  .platforms { grid-template-columns: 1fr 1fr; gap: 10px; }
  .platforms li { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  
  
  
  .laptop { width: 90%; margin: 0; }
  
  
  
  
}

/* ---------------------------------------------------------------------
   13. Pricing
   --------------------------------------------------------------------- */
.pricing {
  position: relative;
  padding: var(--section-y) 0;
  background: radial-gradient(50% 45% at 50% 60%, rgb(var(--rgb-brand-500) / 0.08), transparent 70%);
}
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
  width: min(100% - 2 * var(--gutter), 1120px);
  margin-inline: auto;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 34px 30px 30px;
  border-radius: var(--radius-xl);
  background: var(--grad-card);
  box-shadow: var(--ring), var(--inner-hi), var(--shadow-2);
}
.plan--featured {
  background:
    radial-gradient(90% 60% at 50% 0%, rgb(var(--rgb-brand-500) / 0.2), transparent 70%),
    linear-gradient(180deg, rgb(var(--rgb-ink-600) / 0.85), rgb(var(--rgb-ink-850) / 0.95));
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-brand-400) / 0.5), var(--inner-hi), 0 40px 90px -40px rgb(var(--rgb-brand-500) / 0.55);
}
@media (min-width: 901px) { .plan--featured { top: -14px; } } /* offset, not transform — reveal tweens own transform */
.plan--featured::after {
  content: "";
  position: absolute;
  inset: 0 8% auto;
  height: 1px;
  background: var(--grad-spectrum);
}
.plan__badge {
  position: absolute;
  top: 24px;
  right: 22px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--grad-cta);
  box-shadow: inset 0 1px 0 rgb(var(--rgb-white) / 0.25), var(--glow-brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--on-brand);
}
.plan__head h3 { margin: 0 0 8px; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; }
.plan__head p { min-height: 3.1em; margin: 0; font-size: 14.5px; color: var(--text-muted); }
.plan__cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 26px 0 22px; padding-bottom: 24px; border-bottom: 1px solid var(--hairline); }
.plan__upto { width: 100%; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.plan__num { font-size: 3.8rem; font-weight: 300; line-height: 1; letter-spacing: -0.055em; }
.plan--featured .plan__num { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan__unit { font-size: 15px; color: var(--text-muted); }
.plan__list { display: grid; flex: 1; align-content: start; gap: 12px; margin: 0 0 30px; padding: 0; list-style: none; }
.plan__list li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.plan__list .ico { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: rgb(var(--rgb-brand-500) / 0.14); color: var(--text-brand); stroke-width: 2.4; }
.pricing__note { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; margin: 46px auto 0; padding: 0 var(--gutter); font-size: 14px; color: var(--text-muted); }
.pricing__note span { display: inline-flex; align-items: center; gap: 10px; }
.pricing__note span::before { content: ""; width: 6px; height: 6px; border-radius: 1px; transform: rotate(45deg); background: var(--grad-brand); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 480px; } }

/* ---------------------------------------------------------------------
   14. Final CTA
   --------------------------------------------------------------------- */
.final { position: relative; isolation: isolate; padding: clamp(130px, 15vw, 220px) 0; overflow: hidden; text-align: center; }
.final__bg { position: absolute; inset: 0; z-index: -1; display: grid; place-items: center; perspective: 1200px; pointer-events: none; }
.glow--final {
  top: 50%;
  left: 50%;
  width: 92vw;
  max-width: 1200px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgb(var(--rgb-brand-500) / 0.22), rgb(var(--rgb-accent-500) / 0.07) 48%, transparent 72%);
}
.seal { width: min(96vw, 760px); aspect-ratio: 1; opacity: 0.42; transform-style: preserve-3d; }
.seal svg { width: 100%; height: 100%; overflow: visible; }
.seal__spin { transform-box: fill-box; transform-origin: center; animation: spin 70s linear infinite; }
.seal__ring { fill: none; stroke: url(#sealSpectrum); stroke-width: 1.2; }
.seal__ring--in { opacity: 0.45; }
.seal__ticks { fill: none; stroke: rgb(var(--rgb-brand-300) / 0.35); stroke-width: 10; stroke-dasharray: 0.35 2.65; }
.seal__text { fill: rgb(var(--rgb-brand-300) / 0.6); font-family: var(--font-body); font-size: 16px; font-weight: 650; letter-spacing: 8px; }
.seal__mark { opacity: 0.2; }
.seal-stop-1 { stop-color: var(--logo-cyan); }
.seal-stop-2 { stop-color: var(--logo-violet); }
.seal-stop-3 { stop-color: var(--logo-pink); }
.seal-stop-4 { stop-color: var(--logo-amber); }
@keyframes spin { to { transform: rotate(360deg); } }

.final__content { position: relative; width: min(100% - 2 * var(--gutter), 1100px); margin-inline: auto; }
.final__title { margin: 0 0 24px; font-size: clamp(2.5rem, 1.2rem + 4.4vw, 5.3rem); font-weight: 700; line-height: 1; letter-spacing: -0.045em; }
.final .lede { margin: 0 auto 42px; }
.final__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ---------------------------------------------------------------------
   15. Footer
   --------------------------------------------------------------------- */
.footer { position: relative; padding: 90px 0 0; overflow: hidden; background: linear-gradient(180deg, var(--bg), var(--bg-deep)); }
.footer__inner { display: grid; grid-template-columns: 1.1fr 2fr; gap: 60px; }
.footer__brand img { width: auto; height: 30px; margin-bottom: 22px; }
.footer__brand p { max-width: 360px; margin: 0 0 26px; font-size: 15px; color: var(--text-muted); }
.footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.footer__h { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-brand); }
.footer__cols a { display: flex; align-items: center; min-height: 36px; font-size: 14.5px; color: var(--text-muted); transition: color 0.25s; }
.footer__cols a:hover { color: var(--text); }
.footer__word {
  margin: 80px 0 -0.16em;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 19vw, 18rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.07em;
  text-align: center;
  color: transparent;
  background: linear-gradient(180deg, rgb(var(--rgb-brand-400) / 0.22), rgb(var(--rgb-brand-500) / 0.04) 70%, transparent);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}
.footer__base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 26px 0 calc(26px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--text-dim);
}
.footer__base p { margin: 0; }
.footer__base b { font-weight: 600; color: var(--text-muted); }
@media (pointer: coarse) { .footer__cols a { min-height: var(--tap); } }
@media (max-width: 900px) { .footer__inner { grid-template-columns: 1fr; gap: 44px; } }
@media (max-width: 560px) {
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .footer__cols > div:last-child { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------------
   16. 3D feature models (Blender → glTF, see blender/mentoza_models.py)
   --------------------------------------------------------------------- */
.model3d {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.model3d > img,
.model3d > .phone {
  grid-area: 1 / 1;
  transition: opacity 0.6s ease;
}
.model3d > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 22px 26px rgb(var(--rgb-ink-1000) / 0.4));
  animation: float-y 7s ease-in-out infinite;
}
.model3d__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.model3d.is-live > img,
.model3d.is-live > .phone { opacity: 0; }
.model3d.is-live > .model3d__canvas { opacity: 1; }
.model3d[data-spin] { pointer-events: auto; cursor: grab; touch-action: pan-y; }
.model3d[data-spin]:active { cursor: grabbing; }

.model3d--pillar { position: absolute; top: 2%; right: 1%; z-index: 3; width: clamp(150px, 15vw, 240px); }

.model3d--float { position: absolute; z-index: 6; width: clamp(140px, 13vw, 210px); }
.model3d--exam { left: -20%; top: 4%; }
.model3d--live { right: -12%; top: -6%; }
.model3d--sec { right: -8%; bottom: -12%; }
.model3d--brand { right: -10%; bottom: -12%; }
.model3d--batch { right: -9%; top: -14%; }
.model3d--people { right: -12%; top: -16%; }

/* ---------------------------------------------------------------------
   17. Interactive demos
   --------------------------------------------------------------------- */
html:not(.demos-ready) .try-badge,
html:not(.demos-ready) .plan-finder { display: none; }

.try-badge {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  padding: 7px 14px 7px 11px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgb(var(--rgb-brand-500) / 0.2), rgb(var(--rgb-accent-500) / 0.08));
  box-shadow: var(--ring-strong), var(--inner-hi);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--text);
}
.try-badge__dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-400); }
.try-badge__dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--accent-400);
  animation: pulse 1.8s var(--ease-out) infinite;
}

:where(.mock) button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
:where(.mock) button:disabled { cursor: not-allowed; }
.mock button:focus-visible,
.mock input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.opt { transition: transform 0.2s var(--ease-out), filter 0.25s, box-shadow 0.3s, background-color 0.3s, color 0.3s; }

.opt:active { transform: scale(0.97); }

/* exam */
.opt:hover { color: var(--text); box-shadow: inset 0 0 0 1px rgb(var(--rgb-brand-400) / 0.45); }
.opt > span { flex: 1; }

.palette > button { cursor: pointer; }
.palette > button:hover { box-shadow: inset 0 0 0 1.5px var(--brand-300); }

/* live */
.sw { cursor: pointer; }
.sw:hover { filter: brightness(1.15); }

@keyframes speak { 50% { box-shadow: inset 0 0 0 2px var(--accent-300), 0 0 28px rgb(var(--rgb-accent-500) / 0.65); } }

/* security */

@keyframes flash { from { opacity: 0.85; } to { opacity: 0; } }
.log li.is-new { animation: log-in 0.6s var(--ease-out); }
@keyframes log-in { from { opacity: 0; transform: translateY(-10px); background: rgb(var(--rgb-brand-500) / 0.3); } }

/* brand */

/* batch */

.currency button:hover:not(.is-on) { color: var(--text); }

/* people */

.matrix > button { cursor: pointer; transition: background 0.3s, box-shadow 0.3s; }
.matrix > button:hover { box-shadow: inset 0 0 0 1.5px var(--brand-300); }
.matrix > button[aria-disabled="true"] { cursor: default; }

/* ---------------------------------------------------------------------
   18. Light sheets, plan finder
   --------------------------------------------------------------------- */
.sheet {
  position: relative;
  z-index: 1;
  margin-inline: clamp(8px, 1.3vw, 20px);
  border-radius: clamp(26px, 3.2vw, 52px);
  overflow: hidden;
  overflow: clip;
  transform-origin: 50% 0;
  box-shadow: 0 -40px 90px -50px rgb(var(--rgb-brand-500) / 0.45);
}

.plan-finder {
  width: min(100% - 2 * var(--gutter), 680px);
  margin: 0 auto clamp(40px, 5vw, 60px);
  padding: 22px 26px 20px;
  border-radius: var(--radius-xl);
  background: var(--grad-card);
  box-shadow: var(--ring), var(--inner-hi), var(--shadow-2);
}
.plan-finder__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 6px; }
.plan-finder label { font-size: 15px; font-weight: 650; color: var(--text); }
.plan-finder output { font-size: 1.75rem; font-weight: 750; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--text-brand); }
.plan-finder input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 32px;
  margin: 4px 0;
  background: linear-gradient(90deg, var(--brand-600), var(--pink-500) var(--fill, 35%), var(--light-200) var(--fill, 35%)) center / 100% 8px no-repeat;
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
}
.plan-finder input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--light-0);
  box-shadow: 0 0 0 2px var(--brand-600), 0 8px 18px -6px rgb(var(--rgb-brand-700) / 0.55);
  transition: transform 0.2s var(--ease-out);
}
.plan-finder input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--light-0);
  box-shadow: 0 0 0 2px var(--brand-600), 0 8px 18px -6px rgb(var(--rgb-brand-700) / 0.55);
}
.plan-finder input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.plan-finder input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--brand-600), 0 0 0 7px rgb(var(--rgb-brand-600) / 0.22); }
.plan-finder__hint { margin: 8px 0 0; font-size: 14.5px; color: var(--text-muted); }
.plan-finder__hint b { color: var(--text); }

.plan { transition: box-shadow 0.5s var(--ease-out); }
.plan__fit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  margin: 0 0 12px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: rgb(var(--rgb-accent-500) / 0.14);
  box-shadow: inset 0 0 0 1px var(--hairline-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-accent);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s, transform 0.45s var(--ease-out);
}
.plan__fit::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.plan.is-fit .plan__fit { opacity: 1; transform: none; }
.plan.is-fit:not(.plan--featured) { box-shadow: inset 0 0 0 2px var(--brand-600), var(--inner-hi), var(--shadow-3); }
.plan--featured.is-fit { box-shadow: inset 0 0 0 2px var(--brand-400), var(--inner-hi), 0 40px 90px -40px rgb(var(--rgb-brand-500) / 0.6); }

/* ---------------------------------------------------------------------
   19. Responsive: models, demos, sideways pillars on phones
   --------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .model3d--float { top: -44px; right: -4px; bottom: auto; left: auto; width: 112px; }
  
}

@media (max-width: 899px) {
  .pillars.is-horizontal .pillars__pin { align-items: flex-start; padding-top: calc(var(--nav-h) + 12px); }
  .pillars.is-horizontal .pillars__track { gap: 14px; padding: 0 var(--gutter); }
  .pillars.is-horizontal .pillars__intro { align-self: center; width: 82vw; margin: 0 6px 0 0; }
  .pillars.is-horizontal .pillar {
    width: 84vw;
    height: calc(100vh - var(--nav-h) - 80px);
    height: calc(100svh - var(--nav-h) - 80px);
    margin-top: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 16px 16px 18px;
  }
  .pillars.is-horizontal .pillar__visual { order: -1; min-height: 0; padding: 10px; }
  .pillars.is-horizontal .pillar__visual > :not(.model3d) { display: none; }
  .pillars.is-horizontal .model3d--pillar { position: relative; inset: auto; width: 100%; height: 100%; aspect-ratio: auto; }
  .pillars.is-horizontal .pillar__num { margin-bottom: 6px; font-size: 2.3rem; }
  .pillars.is-horizontal .pillar__title { margin-bottom: 8px; font-size: 1.4rem; }
  .pillars.is-horizontal .pillar p { margin-bottom: 8px; font-size: 14px; line-height: 1.5; }
  .pillars.is-horizontal .tags { display: none; }
  .pillars.is-horizontal .pillars__progress { bottom: 20px; }
}

@media (max-width: 640px) {
  .try-badge { font-size: 12px; }
  
  .plan-finder { padding: 18px 18px 16px; }
  .plan-finder label { font-size: 14px; }
  
}

/* Touch screens: demo controls get comfortable 44px tap targets (visuals unchanged where possible) */
@media (pointer: coarse) {
  .opt { min-height: 44px; }
  
  
  .sw,
.currency button,
.matrix > button { position: relative; }
  .sw::before,
.currency button::before,
.matrix > button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, 44px);
    height: max(100%, 44px);
    transform: translate(-50%, -50%);
  }
  
  .model3d[data-spin] { touch-action: pan-y; }
}

/* ---------------------------------------------------------------------
   21. Hero tour — the real product in a browser (1280 × 800 design px)
   The screens themselves are css/product.css; these rules only stage them.
   --------------------------------------------------------------------- */
.lms { position: absolute; inset: 0; width: 1280px; height: 800px; }
.lms::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 110;
  pointer-events: none;
  background: linear-gradient(118deg, rgb(var(--rgb-white) / 0.07) 0%, rgb(var(--rgb-white) / 0.02) 34%, transparent 46%);
}
/* resting frame without JS / motion: the admin dashboard */
.lms [data-lms-page]:not([data-lms-page="admin"]),
.lms .lv:not([data-lms-view="dashboard"]) { opacity: 0; visibility: hidden; }
.lms .lv { position: absolute; top: 24px; right: 28px; left: 28px; }
.lms .lv--fill { bottom: 18px; }
.lms .lms-min0 { min-width: 0; }
.lms .lms-grow { flex: 1; min-width: 0; }
.lms .side-logout { padding: 7px; font-size: 13px; text-align: center; }
.lms .lms-urlcaret { display: none; width: 1.5px; height: 15px; margin-left: -6px; background: var(--ink-900); }
.lms .lms-urlcaret.is-on { display: inline-block; animation: pui-blink 1s steps(1) infinite; }
.lms .lms-dot-a { background: var(--app-dot-answered); }
.lms .lms-dot-s { background: var(--app-dot-skipped); }
.lms .lms-dot-m { background: var(--app-dot-marked); }
.lms .lms-dot-n { background: var(--app-dot-blank); box-shadow: inset 0 0 0 1.5px var(--app-dot-edge); }
.lms .lms-submit-now { background: var(--app-dot-danger); color: var(--app-dot-blank); }
.lms .lms-saved { height: 0; margin: 0; padding-block: 0; border-width: 0; overflow: hidden; opacity: 0; }
.lms .lms-badges { display: inline-grid; justify-items: end; }
.lms .lms-badges > * { grid-area: 1 / 1; }
.lms [data-lms-st="verify"], .lms [data-lms-st="paid"] { opacity: 0; }
.lms .lms-verify, .lms .lms-paiddate { display: none; }
.lms .lms-verify.is-on { display: block; }
.lms .lms-paiddate.is-on { display: inline; }
.lms .fee-invoice { height: 0; }
.lms .lms-file { margin-right: 8px; padding-right: 8px; border-right: 1px solid var(--app-dot-edge); color: var(--ink-900); }
.lms .pcur { opacity: 0; }
.lms .sec-row.is-new td { transition: background 1.2s ease; }
.lms .lk-tools { gap: 6px; }
.lms .lk-hbtn { padding: 9px 11px; }

/* the student app beside the laptop at the branding step (CSS-laptop fallback; 3D mode mounts it in the scene) */
.tour-phone { pointer-events: none; }
.hero__device .tour-phone {
  position: absolute;
  right: -5%;
  bottom: -8%;
  width: 21%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12%) scale(0.94);
  transition: opacity 0.6s var(--ease-out), transform 0.9s var(--ease-out), visibility 0s linear 0.6s;
}
.hero.is-brand .hero__device .tour-phone { opacity: 1; visibility: visible; transform: none; transition: opacity 0.6s var(--ease-out), transform 0.9s var(--ease-out); }
.hero__device .tour-phone { aspect-ratio: 300 / 632; }
.hero__device .tour-phone .aui--static { transform: scale(var(--tp-s, 0.5)); transform-origin: 0 0; }
.hero__css3d .tour-phone { width: 300px; }

/* ---------------------------------------------------------------------
   22. Hero tour — captions, outro, skip
   --------------------------------------------------------------------- */
.tour, .tour__outro, .tour__skip { display: none; }
.motion-ready .tour, .motion-ready .tour__outro, .motion-ready .tour__skip { display: block; }
.tour {
  position: absolute;
  top: 50%;
  left: max(var(--gutter), calc((100vw - 1320px) / 2));
  z-index: 3;
  width: min(25vw, 360px);
  transform: translateY(-50%);
  pointer-events: none;
}
.tour__caps { position: relative; min-height: 200px; margin: 0; padding: 0; list-style: none; }
.tour__cap { position: absolute; top: 0; left: 0; right: 0; opacity: 0; transform: translateY(22px); transition: opacity 0.5s var(--ease-out), transform 0.8s var(--ease-out); }
.tour__cap.is-past { transform: translateY(-22px); }
.tour__cap.is-on { opacity: 1; transform: none; }
.tour__num { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 12px; font-weight: 700; letter-spacing: 0.22em; color: var(--text-brand); }
.tour__num::after { content: ""; width: 30px; height: 1px; background: linear-gradient(90deg, var(--brand-400), transparent); }
.tour__title { margin: 0 0 12px; font-size: clamp(1.6rem, 0.9rem + 1.6vw, 2.5rem); font-weight: 700; line-height: 1.06; letter-spacing: -0.04em; color: var(--text); text-wrap: balance; }
.tour__text { margin: 0; font-size: 1.02rem; line-height: 1.6; color: var(--text-muted); }
.tour__rail { display: flex; align-items: center; gap: 14px; margin-top: 28px; font-size: 12px; letter-spacing: 0.12em; color: var(--text-dim); opacity: 0; transition: opacity 0.5s; }
.tour.is-on .tour__rail { opacity: 1; }
.tour__count b { font-weight: 700; color: var(--text); }
.tour__bar { width: 150px; height: 2px; overflow: hidden; border-radius: 2px; background: rgb(var(--rgb-neutral-300) / 0.16); }
.tour__bar i { display: block; height: 100%; background: var(--grad-spectrum); transform: scaleX(0); transform-origin: 0 50%; }

.tour__outro {
  position: absolute;
  top: 50%;
  left: max(var(--gutter), calc((100vw - 1320px) / 2));
  z-index: 3;
  width: min(34vw, 460px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-40%);
  transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out), visibility 0s linear 0.6s;
}
.tour__outro.is-on { opacity: 1; visibility: visible; transform: translateY(-50%); transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out); }
.tour__outro-kicker { margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-brand); }
.tour__outro-title { margin: 0 0 28px; font-size: clamp(2rem, 1rem + 2.4vw, 3.4rem); font-weight: 700; line-height: 1.04; letter-spacing: -0.045em; text-wrap: balance; }
.tour__outro-title em { font-family: var(--font-serif); font-size: 1.08em; font-weight: 400; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tour__outro-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.tour__skip {
  position: absolute;
  right: max(var(--gutter), calc((100vw - 1320px) / 2));
  bottom: 26px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: rgb(var(--rgb-ink-950) / 0.6);
  box-shadow: var(--ring);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s, color 0.25s, box-shadow 0.25s;
}
.motion-ready .tour__skip { display: inline-flex; }
.tour__skip.is-on { opacity: 1; visibility: visible; }
.tour__skip:hover { color: var(--text); box-shadow: var(--ring-strong); }
.tour__skip .ico { width: 16px; height: 16px; transform: rotate(90deg); }

@media (max-aspect-ratio: 11/10), (max-width: 1023px) and (min-height: 521px) {
  .tour { top: auto; right: var(--gutter); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: var(--gutter); width: auto; transform: none; text-align: center; }
  .tour__caps { min-height: 136px; }
  .tour__num { margin-bottom: 8px; }
  .tour__num::after { display: none; }
  .tour__title { margin-bottom: 6px; font-size: clamp(1.35rem, 1rem + 1.8vw, 1.9rem); }
  .tour__text { max-width: 460px; margin-inline: auto; font-size: 0.95rem; }
  .tour__rail { justify-content: center; margin-top: 14px; }
  .tour__outro { top: auto; right: var(--gutter); bottom: calc(26px + env(safe-area-inset-bottom, 0px)); left: var(--gutter); width: auto; text-align: center; transform: translateY(14px); }
  .tour__outro.is-on { transform: none; }
  .tour__outro-title { margin-bottom: 20px; font-size: clamp(1.7rem, 1rem + 3vw, 2.4rem); }
  .tour__outro-ctas { justify-content: center; }
  .tour__skip { top: calc(var(--nav-h) + 12px + env(safe-area-inset-top, 0px)); right: var(--gutter); bottom: auto; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .tour { top: calc(50% + var(--nav-h) / 2); width: min(31vw, 300px); }
  .tour__caps { min-height: 150px; }
  .tour__num { margin-bottom: 8px; }
  .tour__title { margin-bottom: 8px; font-size: 1.25rem; }
  .tour__text { font-size: 0.84rem; line-height: 1.5; }
  .tour__rail { margin-top: 12px; }
  .tour__outro { top: calc(50% + var(--nav-h) / 2); width: min(46vw, 440px); }
  .tour__outro-kicker { margin-bottom: 8px; }
  .tour__outro-title { margin-bottom: 16px; font-size: 1.75rem; }
  .tour__outro-ctas { flex-wrap: nowrap; gap: 10px; }
  .tour__outro-ctas .btn--lg { min-height: 46px; padding-inline: 18px; font-size: 0.95rem; }
  .tour__skip { bottom: 14px; }
}

/* ---------------------------------------------------------------------
   20. Motion fallbacks & reduced motion
   --------------------------------------------------------------------- */
.motion-off [data-hero-in] { opacity: 1 !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { width: auto; }
  .marquee__list { flex-wrap: wrap; justify-content: center; row-gap: 6px; }
  .marquee__list[aria-hidden="true"] { display: none; }
  .btn--primary::before { display: none; }
}
