/* ==========================================================================
   CPro Solutions — "rx" design system (site rebuild, Nov 2026)
   Dark cinematic: near-black, white type, one teal accent that glows, live 3D.
   Rules live in DESIGN.md. Motion is opt-in: html.rx-motion is set by rx.js only when
   JS, GSAP and Lenis are present and reduced motion is off. html.rx-3d is set by stage.js
   once WebGL has a model on screen; until then the still images show.
   ========================================================================== */

/* One typeface, three voices (DESIGN.md §12): Archivo variable (weight 100–900, width 62–125%). SIL OFL, fonts/ARCHIVO-LICENSE.txt */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("../../fonts/archivo-variable.woff2") format("woff2-variations"), url("../../fonts/archivo-variable.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  /* ground: near-black with a navy bias, then layered charcoal panels */
  --bg: #06142a;
  --bg-1: #0b1c36;
  --bg-2: #10254a;
  --bg-3: #173160;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  /* type on dark */
  --fg: #f2f5f9;          /* 18.4:1 on --bg */
  --fg-2: #b4c2d8;        /*  9.9:1 on #06142a */
  --fg-3: #8a9bb5;        /*  6.3:1 — smallest allowed for text */
  /* the one accent */
  --accent: #6fa8ff;      /*  7.3:1 on --bg: CPro blue, lifted for dark */
  --accent-hi: #8fbcff;   /* highlights */
  --accent-glow: rgba(74, 144, 226, .35);
  --blue: #1e6fd9;        /* CPro blue as a fill (white text on it: 4.6:1); same in both themes */
  --blue-7: #1557b0; --navy: #0b2042;
  /* product light colours (3D rim light + small tags only, never body text) */
  --c-edc: #4a90e2; --c-gerbang: #19b3a8; --c-school: #f2a91d; --c-selari: #dfe6f0; --c-custom: #ff7a59;
  --danger: #ff6b6b; --success: #3ddc97;
  /* theme plumbing: overlays tint with these, so they flip with the theme */
  --fg-rgb: 242, 245, 249;
  --bg-rgb: 6, 20, 42;
  --logo-filter: brightness(0) invert(1);   /* the CPro PNG rendered white */
  --flap-seam: #000;
  --plate: #eef1f5; --plate-hover: #fff;    /* partner-logo plates */

  --font: "Archivo", "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
  --mono: "Archivo", "Helvetica Neue", Arial, sans-serif;   /* the label voice: same family, caps and tracking (.mono) */

  /* type scale: posters at the top, then a calm reading size */
  --t-poster: clamp(3.4rem, 0.6rem + 10.4vw, 12.5rem);
  --t-display: clamp(2.8rem, 1rem + 6.4vw, 8rem);
  --t-h2: clamp(2.2rem, 1.1rem + 4.2vw, 5.4rem);
  --t-h3: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem);
  --t-lead: clamp(1.1rem, 1rem + .45vw, 1.4rem);
  --t-body: 1.0625rem;
  --t-small: .9375rem;
  --t-mono: .75rem;

  --gutter: clamp(20px, 4vw, 56px);
  --container: 88rem;
  --header-h: 68px;
  --r: 4px; --r-2: 8px;

  /* motion tokens (DESIGN.md §7) */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-in: 140ms; --t-out: 200ms; --t-press: 90ms;
}

/* ---------- light theme: html[data-theme="light"] (set before paint by the inline script in the layout) ----------
   Paper-white ground, near-black ink, a deeper teal so it passes AA on white. Ratios are on --bg (#f4f5f7). */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #eceef1;
  --bg-1: #ffffff;
  --bg-2: #e2e5ea;
  --bg-3: #d8dadd;
  --line: rgba(11, 22, 38, .12);
  --line-2: rgba(11, 22, 38, .2);
  --fg: #0b1626;          /* 15.9:1 on #eceef1 */
  --fg-2: #39465a;        /*  8.6:1 */
  --fg-3: #56637a;        /*  5.5:1 */
  --accent: #1557b0;      /*  6.0:1: CPro blue, deepened for text on paper */
  --accent-hi: #1e6fd9;   /*  4.3:1: large type, fills and highlights only */
  --accent-glow: rgba(30, 111, 217, .2);
  --c-selari: #6b7a90;
  --danger: #c0262d; --success: #08765a;
  --fg-rgb: 11, 22, 38;
  --bg-rgb: 236, 238, 241;
  --logo-filter: brightness(0);              /* the CPro PNG rendered black */
  --flap-seam: rgba(11, 18, 32, .28);
  --plate: #ffffff; --plate-hover: #ffffff;
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-padding-top: calc(var(--header-h) + 12px); }
html:not(.rx-motion) { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: var(--font); font-size: var(--t-body); line-height: 1.6; color: var(--fg-2); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--fg); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong, b { color: var(--fg); font-weight: 700; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 2px; animation: rx-focus var(--t-out) var(--ease-out); }
@keyframes rx-focus { from { outline-offset: 6px; } }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 300; padding: 10px 14px; background: var(--fg); color: var(--bg); border-radius: var(--r); font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- layout ---------- */
.w { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.w--narrow { max-width: calc(52rem + var(--gutter) * 2); }
/* one section = one screen (or a pinned run of screens) */
.s { position: relative; z-index: 2; background: var(--bg); padding-block: clamp(6rem, 4rem + 10vh, 12rem); }
.s--screen { min-height: 100vh; min-height: 100svh; display: grid; align-content: center; }
.s--clear { background: transparent; }      /* lets the 3D stage show through */
.s--panel { background: var(--bg-1); }
.s--line { border-top: 1px solid var(--line); }
.grid { display: grid; gap: clamp(1rem, .5rem + 2vw, 2.5rem); }
@media (min-width: 48rem) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 48rem) and (max-width: 63.99rem) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- type ---------- */
.mono { font-family: var(--mono); font-size: var(--t-mono); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); line-height: 1.5; }
.mono--accent { color: var(--accent); }
.mono b { color: var(--fg); font-weight: 600; }
.poster { font-size: var(--t-poster); font-weight: 800; letter-spacing: -.055em; line-height: .86; text-transform: uppercase; color: var(--fg); }
.display { font-size: var(--t-display); font-weight: 800; letter-spacing: -.05em; line-height: .9; }
.h2 { font-size: var(--t-h2); font-weight: 800; letter-spacing: -.045em; line-height: .95; }
.h3 { font-size: var(--t-h3); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--fg-2); max-width: 34rem; }
.small { font-size: var(--t-small); }
.dim { color: var(--fg-3); }
.hi { color: var(--accent); }
.glow { color: var(--accent-hi); text-shadow: 0 0 .5em var(--accent-glow); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.line { display: block; }
.mask { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.prose { max-width: 40rem; color: var(--fg-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { margin-top: 2em; font-size: var(--t-h3); }
.prose ul { padding-left: 1.1em; list-style: square; }
.prose li + li { margin-top: .4em; }
.prose a, .a { color: var(--fg); background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size var(--t-out) var(--ease-out), color var(--t-out); }
.prose a:hover, .a:hover { color: var(--accent-hi); background-size: 0 1px; }

/* split letters (kinetic type) */
.w-word { display: inline-block; white-space: nowrap; }
.ch { display: inline-block; }
html.rx-motion .ch { will-change: transform, opacity, filter; }

/* ---------- buttons ---------- */
.b { --b-bg: var(--fg); --b-fg: var(--bg); --b-bd: var(--fg); display: inline-flex; align-items: center; gap: .7em; min-height: 48px; padding: .8rem 1.25rem; border: 1px solid var(--b-bd); border-radius: var(--r); background: var(--b-bg); color: var(--b-fg); font-weight: 700; font-size: .95rem; letter-spacing: -.005em; cursor: pointer; transition: background var(--t-out) var(--ease-out), color var(--t-out) var(--ease-out), border-color var(--t-out) var(--ease-out), translate var(--t-out) var(--ease-out); }
.b:hover { --b-bg: var(--accent-hi); --b-bd: var(--accent-hi); translate: 0 -1px; transition-duration: var(--t-in); }
.b:active { translate: 0 1px; transition-duration: var(--t-press); }
.b--ghost { --b-bg: transparent; --b-fg: var(--fg); --b-bd: var(--line-2); }
.b--ghost:hover { --b-bg: rgba(var(--fg-rgb),.06); --b-bd: var(--fg); --b-fg: var(--fg); }
.b--sm { min-height: 40px; padding: .55rem .95rem; font-size: .875rem; }
.b .arr { transition: translate var(--t-out) var(--ease-out); }
.b:hover .arr { translate: 3px 0; }
.b-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.arrow-link { display: inline-flex; align-items: center; gap: .55em; color: var(--fg); font-weight: 700; }
.arrow-link .arr { transition: translate var(--t-out) var(--ease-out); }
.arrow-link:hover { color: var(--accent-hi); }
.arrow-link:hover .arr { translate: 3px 0; }

/* ---------- header ---------- */
.hd { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h); transition: background var(--t-out), border-color var(--t-out), backdrop-filter var(--t-out); border-bottom: 1px solid transparent; }
.hd.is-scrolled { background: rgba(var(--bg-rgb), .72); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--line); }
.hd .w { height: 100%; display: flex; align-items: center; gap: 2rem; }
.logo { display: block; flex: none; }
.logo img { width: 96px; height: auto; filter: var(--logo-filter); }
.nav { display: none; gap: 1.6rem; margin-left: auto; }
.nav a { font-family: var(--mono); font-size: var(--t-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); padding: .5rem 0; position: relative; transition: color var(--t-out); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .2rem; height: 1px; background: var(--accent-hi); transform: scaleX(0); transform-origin: right; transition: transform var(--t-out) var(--ease-out); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.hd__cta { display: none; }
.menu-btn { margin-left: auto; display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; padding: 0 .2rem; background: none; border: 0; cursor: pointer; font-family: var(--mono); font-size: var(--t-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg); }
.menu-btn i { position: relative; width: 22px; height: 10px; }
.menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform var(--t-out) var(--ease-out), top var(--t-out) var(--ease-out); }
.menu-btn i::before { top: 0; } .menu-btn i::after { top: 8px; }
.menu-btn[aria-expanded="true"] i::before { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] i::after { top: 4px; transform: rotate(-45deg); }
@media (min-width: 64rem) { .nav, .hd__cta { display: flex; } .hd__cta { margin-left: .5rem; } .menu-btn { display: none; } }

/* full-screen menu (phones/tablets) */
.menu { position: fixed; inset: 0; z-index: 90; display: grid; align-content: center; padding: calc(var(--header-h) + 2rem) var(--gutter) 2rem; background: var(--bg); visibility: hidden; opacity: 0; transition: opacity var(--t-out) var(--ease-out), visibility 0s linear var(--t-out); }
.menu.is-open { visibility: visible; opacity: 1; transition: opacity var(--t-out) var(--ease-out); }
.menu__links a { display: block; font-size: clamp(2.4rem, 1rem + 8vw, 4.5rem); font-weight: 800; letter-spacing: -.05em; line-height: 1.05; color: var(--fg); padding: .15rem 0; }
.menu__links a:hover { color: var(--accent-hi); }
.menu__foot { margin-top: 2.5rem; display: grid; gap: .4rem; }

/* ---------- footer ---------- */
.ft { position: relative; z-index: 2; background: var(--bg); border-top: 1px solid var(--line); padding: clamp(4rem, 3rem + 4vw, 7rem) 0 2rem; }
.ft__top { display: grid; gap: 3rem; }
@media (min-width: 64rem) { .ft__top { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.ft__brand p { max-width: 24rem; margin-top: 1.2rem; font-size: var(--t-small); }
.ft__brand .logo img { width: 120px; }
.ft h2 { font-family: var(--mono); font-size: var(--t-mono); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 1rem; }
.ft li + li { margin-top: .55rem; }
.ft li a { color: var(--fg-2); font-size: var(--t-small); transition: color var(--t-out); }
.ft li a:hover { color: var(--fg); }
.ft__word { margin: clamp(3rem, 2rem + 4vw, 6rem) 0 1.5rem; font-size: clamp(5rem, 1rem + 19vw, 22rem); font-weight: 800; letter-spacing: -.07em; line-height: .78; color: var(--bg-2); user-select: none; }
.ft__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.ft__bottom nav { display: flex; gap: 1.2rem; }
.ft__md { display: flex; align-items: center; gap: .7rem; margin-top: 1.4rem; }
.ft__md img { width: 54px; height: auto; border-radius: 3px; }

/* ---------- 3D stage ---------- */
.stage { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .8s var(--ease-out); }
html.rx-3d .stage { opacity: 1; }
/* stills show until (unless) the live stage takes over */
.still { pointer-events: none; user-select: none; }
html.rx-3d .still { visibility: hidden; }

/* ---------- reveals (only with motion) ---------- */
html.rx-motion [data-reveal] { opacity: 0; }

/* ---------- shared kit ---------- */
.tag { display: inline-flex; align-items: center; gap: .5rem; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px 1px var(--accent-glow); }
.hair { height: 1px; background: var(--line); border: 0; margin: 0; }
.card { position: relative; display: block; padding: clamp(1.4rem, 1rem + 1.2vw, 2rem); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg-1); transition: border-color var(--t-out) var(--ease-out), background var(--t-out) var(--ease-out), translate var(--t-out) var(--ease-out); }
a.card:hover { border-color: var(--line-2); background: var(--bg-2); translate: 0 -2px; transition-duration: var(--t-in); }
.card h3 { font-size: 1.35rem; letter-spacing: -.025em; line-height: 1.15; }
.card p { margin-top: .6rem; font-size: var(--t-small); }
.card .mono { display: block; margin-bottom: 1.4rem; }
.stat__n { display: block; font-size: clamp(2.6rem, 1.6rem + 3vw, 4.4rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--fg); font-variant-numeric: tabular-nums; }
.stat__l { display: block; margin-top: .6rem; font-size: var(--t-small); max-width: 16rem; }
.rows > a, .rows > div { display: grid; gap: .4rem 2rem; padding: clamp(1.2rem, 1rem + 1vw, 2rem) 0; border-bottom: 1px solid var(--line); }
.rows > :first-child { border-top: 1px solid var(--line); }
@media (min-width: 48rem) { .rows > a, .rows > div { grid-template-columns: 8rem 1fr auto; align-items: baseline; } }
.rows .row__t { font-size: clamp(1.4rem, 1rem + 1.8vw, 2.8rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; color: var(--fg); transition: color var(--t-out); }
.rows a:hover .row__t { color: var(--accent-hi); }
.rows .row__v { font-size: clamp(1.2rem, 1rem + 1vw, 2rem); font-weight: 800; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.page-hero { padding-top: calc(var(--header-h) + clamp(4rem, 2rem + 10vh, 9rem)); padding-bottom: clamp(3rem, 2rem + 6vh, 6rem); }
.page-hero .display { margin-top: 1.4rem; max-width: 16ch; }
.page-hero .lead { margin-top: 1.6rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; }
.crumbs a:hover { color: var(--fg); }
/* partner logos keep their own colours (brand rules; many files have solid white backgrounds), so each sits on a
   light plate — a row of "badges" on the dark page */
.logo-wall { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.logo-wall li { display: grid; place-items: center; height: 76px; padding: 0 26px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--plate); transition: translate var(--t-out) var(--ease-out), background var(--t-out); }
.logo-wall li:hover { translate: 0 -2px; background: var(--plate-hover); transition-duration: var(--t-in); }
.logo-wall img { height: 38px; width: auto; max-width: 150px; object-fit: contain; }

/* forms */
.field { display: grid; gap: .45rem; }
.field label { font-family: var(--mono); font-size: var(--t-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: .8rem 1rem; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-1); color: var(--fg); transition: border-color var(--t-out), background var(--t-out); }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-hi); background: var(--bg-2); }
.field .err { color: var(--danger); font-size: var(--t-small); }
.notice { padding: 1rem 1.2rem; border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--r); background: var(--bg-1); color: var(--fg); }
.notice--err { border-left-color: var(--danger); }

/* details/summary FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.3rem 0; cursor: pointer; list-style: none; color: var(--fg); font-weight: 700; font-size: 1.1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); transition: rotate var(--t-out) var(--ease-out); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details > div { padding: 0 0 1.4rem; max-width: 46rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- shared closing CTA (rx/cta.blade.php) ---------- */
.rx-cta { border-top: 1px solid var(--line); background: radial-gradient(70% 60% at 50% 110%, rgba(25,179,168,.16), transparent 70%), var(--bg); }
.rx-cta__t { margin-top: 1.6rem; }
.rx-cta__routes { margin-top: clamp(3rem, 2rem + 4vw, 5rem); }
.rx-cta .card p { color: var(--fg); font-weight: 700; margin-top: 1.4rem; }

/* ---------- inner-page hero (rx/page-hero.blade.php) ---------- */
.page-hero__k { margin-top: 1.6rem; }
.page-hero .crumbs + .display, .page-hero .mono + .display { margin-top: 1.4rem; }
.page-hero--3d { min-height: 100vh; min-height: 100svh; display: grid; align-content: center; cursor: grab; touch-action: pan-y; }
.page-hero--3d.is-dragging { cursor: grabbing; }
@media (min-width: 900px) { .page-hero--3d .display, .page-hero--3d .lead { max-width: min(46vw, 40rem); } }
@media (max-width: 899px) { html.rx-3d .page-hero--3d { align-content: start; padding-bottom: 38vh; } }

/* ---------- scene mode (scenes.js; html.rx-scenes) — the page doesn't scroll, scenes change ---------- */
html.rx-scenes, html.rx-scenes body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.rx-scenes .scene { position: fixed; inset: 0; z-index: 2; height: 100vh; height: 100svh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; visibility: hidden; will-change: clip-path; }
html.rx-scenes .scene::-webkit-scrollbar { display: none; }
html.rx-scenes .scene.s--screen, html.rx-scenes .scene.s { display: grid; align-content: safe center; } /* safe: a scene taller than the screen starts at the top instead of overflowing above it */
html.rx-scenes footer.scene { display: flex; flex-direction: column; justify-content: flex-end; }
html.rx-scenes .menu { z-index: 120; }
html.rx-scenes .hd { z-index: 110; }
/* progress rail */
.sc-nav { position: fixed; right: clamp(12px, 2vw, 28px); top: 50%; translate: 0 -50%; z-index: 60; }
.sc-nav ol { display: grid; gap: 4px; }
.sc-nav button { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: .8rem; width: 34px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.sc-nav i { width: 6px; height: 6px; border-radius: 3px; background: var(--fg-3); transition: height var(--t-out) var(--ease-out), background var(--t-out); }
.sc-nav button[aria-current] i { height: 22px; background: var(--accent-hi); box-shadow: 0 0 10px var(--accent-glow); }
.sc-nav .mono { position: absolute; right: 22px; white-space: nowrap; opacity: 0; translate: 6px 0; pointer-events: none; color: var(--fg); transition: opacity var(--t-out), translate var(--t-out) var(--ease-out); }
.sc-nav button:hover .mono, .sc-nav button:focus-visible .mono { opacity: 1; translate: 0 0; }
.sc-hint { position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: .5rem; color: var(--fg-2); transition: opacity .5s; pointer-events: none; }
.sc-hint i { width: 1px; height: 34px; background: linear-gradient(var(--accent-hi), transparent); transform-origin: top; animation: sc-hint 1.8s var(--ease-io) infinite; }
@keyframes sc-hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.sc-hint.is-off { opacity: 0; }
@media (max-width: 899px) { .sc-nav .mono { display: none; } .sc-nav { right: 8px; } .sc-hint { display: none; } }
html.rx-scenes .scene.s { padding-block: calc(var(--header-h) + 3vh) 5vh; }

/* ---------- film grain (whole page, motion only): a fixed SVG-noise layer that jitters ---------- */
html.rx-motion body::after { content: ""; position: fixed; inset: -50%; z-index: 250; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: rx-grain .9s steps(6) infinite; }
@keyframes rx-grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* ---------- custom cursor (rx.js; a real mouse only) ---------- */
html.rx-cursor, html.rx-cursor a, html.rx-cursor button, html.rx-cursor [data-drag], html.rx-cursor summary, html.rx-cursor label { cursor: none; }
html.rx-cursor input, html.rx-cursor textarea, html.rx-cursor select { cursor: auto; }
.cur { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; }
.cur__dot { position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 10px var(--accent-glow); }
.cur__ring { position: absolute; width: 38px; height: 38px; margin: -19px; border-radius: 50%; border: 1px solid rgba(var(--fg-rgb),.45); display: grid; place-items: center; transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background .35s, border-color .35s; }
.cur__ring b { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .16em; color: var(--bg); opacity: 0; transition: opacity .2s; }
.cur.is-link .cur__ring { width: 64px; height: 64px; margin: -32px; border-color: var(--accent-hi); background: rgba(63,224,210,.12); }
.cur.is-label .cur__ring { width: 84px; height: 84px; margin: -42px; border-color: transparent; background: var(--accent-hi); box-shadow: 0 0 30px var(--accent-glow); }
.cur.is-label .cur__ring b { opacity: 1; }
.cur.is-label .cur__dot, .cur.is-text .cur__ring { opacity: 0; }
/* the press squeeze lives in rx.js (in the same transform as the position: a CSS `scale` here would also scale the translate and throw the ring toward the top-left) */
.cur.is-hidden { opacity: 0; }

/* ---------- scene-change effects (scenes.js) ---------- */
/* the light line riding the wipe edge */
.sc-sweep { position: fixed; left: 0; right: 0; top: 0; z-index: 70; height: 2px; margin-top: -1px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--accent-hi) 20%, #fff 50%, var(--accent-hi) 80%, transparent);
  box-shadow: 0 0 18px 4px var(--accent-glow), 0 0 60px 10px rgba(63,224,210,.18); }
/* headline lands with a chromatic split that snaps back */
.rgb-hit { animation: rgb-hit .7s var(--ease-out) .35s both; }
@keyframes rgb-hit { 0% { text-shadow: -.06em 0 rgba(255,46,99,.85), .06em 0 rgba(63,224,210,.85); } 60% { text-shadow: -.015em 0 rgba(255,46,99,.5), .015em 0 rgba(63,224,210,.5); } 100% { text-shadow: 0 0 transparent, 0 0 transparent; } }
.glow.rgb-hit, .rgb-hit .glow { animation: none; }
/* split-flap board */
.is-flap { display: flex; gap: .045em; letter-spacing: 0; perspective: 900px; }
.flap { position: relative; display: inline-block; min-width: .62em; padding: .02em .05em; border-radius: .055em; text-align: center; transform-origin: 50% 50%;
  background: linear-gradient(var(--bg-2) 0 49.4%, var(--flap-seam) 49.4% 50.6%, var(--bg-1) 50.6%); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 .03em .08em rgba(0,0,0,.5); }
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.65); }

/* ---------- intro (intro.js; home, once per session) ---------- */
html.is-intro .sc-nav, html.is-intro .sc-hint, html.is-intro .hd { opacity: 0; }
.hd, .sc-nav { transition: opacity .6s var(--ease-out); }
.intro { position: fixed; inset: 0; z-index: 280; cursor: pointer; }
.intro__half { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: var(--bg); }
.intro__half--t { top: 0; } .intro__half--b { bottom: 0; }
.intro__word { position: absolute; left: 0; right: 0; text-align: center; font-size: clamp(6rem, 2rem + 22vw, 26rem); font-weight: 800; letter-spacing: -.07em; line-height: 1; color: var(--fg); opacity: 0; }
.intro__half--t .intro__word { bottom: 0; translate: 0 50%; }
.intro__half--b .intro__word { top: 0; translate: 0 -50%; }
.intro__half--t::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent-hi); box-shadow: 0 0 16px 3px var(--accent-glow); opacity: 0; transition: opacity .3s; }
.intro.is-split .intro__half--t::after { opacity: .9; }
.intro__core { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .4rem; }
.intro__clay { width: min(70vw, 400px); height: auto; -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent); mask-image: radial-gradient(closest-side, #000 72%, transparent); }
.intro__n { font-size: clamp(3rem, 2rem + 4vw, 5.5rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--fg); margin-top: .4rem; }
.intro__line { min-height: 1.5em; color: var(--fg-2); }
.intro__skip { position: absolute; left: 50%; bottom: 24px; translate: -50% 0; color: var(--fg-3); }
.sc-flash { position: fixed; inset: 0; z-index: 75; pointer-events: none; opacity: 0; background: radial-gradient(60% 60% at 70% 50%, #fff 0%, #bff8f2 25%, rgba(63,224,210,.55) 55%, rgba(var(--bg-rgb),0) 85%); }

/* ---------- theme toggle (rx.js) + the intro always opens dark ---------- */
.theme-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border: 1px solid var(--line-2); border-radius: 50%; background: transparent; color: var(--fg); cursor: pointer; transition: border-color var(--t-out), background var(--t-out), rotate .5s var(--ease-out); }
.theme-btn:hover { border-color: var(--fg); background: rgba(var(--fg-rgb), .06); }
.theme-btn svg { width: 18px; height: 18px; grid-area: 1 / 1; transition: opacity .3s, scale .4s var(--ease-out), rotate .5s var(--ease-out); }
.theme-btn .i-sun { opacity: 0; scale: .5; rotate: -90deg; }
html[data-theme="light"] .theme-btn .i-sun { opacity: 1; scale: 1; rotate: 0deg; }
html[data-theme="light"] .theme-btn .i-moon { opacity: 0; scale: .5; rotate: 90deg; }
.hd .w > .theme-btn + .hd__cta, .hd .w > .theme-btn + .menu-btn { margin-left: 0; }
.hd .nav { margin-right: .5rem; }
@media (min-width: 64rem) { .theme-btn { margin-left: 0; } }
@media (max-width: 63.99rem) { .menu-btn { margin-left: .6rem; } }
/* theme switch: colours cross-fade briefly (not on first paint) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color .45s var(--ease-out), color .45s var(--ease-out), border-color .45s var(--ease-out), fill .45s, stroke .45s !important; }
.intro { --bg: #05070b; --fg: #f2f5f9; --fg-2: #a9b4c5; --fg-3: #7d899b; --accent-hi: #3fe0d2; --accent-glow: rgba(47, 216, 203, .35); color-scheme: dark; }
/* Geist Mono reads wider than the old system mono: a touch less tracking and a lighter weight */
.mono, .nav a, .menu-btn, .field label, .ft h2 { letter-spacing: .1em; font-weight: 450; }
