/* ==========================================================================
   Novalis Innovations — main stylesheet
   ========================================================================== */

@font-face {
  font-family: 'Inter Tight';
  src: url('/assets/fonts/inter-tight-latin-wght.woff2') format('woff2-variations'), url('/assets/fonts/inter-tight-latin-wght.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('/assets/fonts/inter-tight-latin-ext-wght.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-latin-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
/* Metric-matched fallbacks keep layout shift near zero while fonts load. */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono-latin-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face { font-family: 'Inter Tight Fallback'; src: local('Arial'), local('Helvetica Neue'), local('Liberation Sans'); size-adjust: 95%; ascent-override: 100%; descent-override: 25%; line-gap-override: 0%; }
@font-face { font-family: 'Serif Fallback'; src: local('Georgia'), local('Times New Roman'), local('DejaVu Serif'); size-adjust: 88%; }

:root {
  --bg: #0d0c0a;
  --bg-2: #14120f;
  --bg-3: #1b1814;
  --line: rgba(241, 234, 219, 0.1);
  --line-2: rgba(241, 234, 219, 0.2);
  --text: #f1eadb;
  --muted: #a69d8b;
  --cream: #ece2cc;
  --kraft: #b98f62;
  --bagasse: #d6c7a5;
  --accent: #e8703f;
  --accent-ink: #160b05;

  --sans: 'Inter Tight', 'Inter Tight Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --serif: 'Instrument Serif', 'Serif Fallback', Georgia, 'Times New Roman', serif;

  --gutter: clamp(20px, 4.2vw, 72px);
  --max: 1680px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --radius: 14px;

  /* Display sizes scale with width AND height, so short laptops (1366×625) keep the fold intact. */
  --fs-display: min(clamp(3.4rem, 1.4rem + 7.4vw, 10.5rem), max(2.6rem, 16svh));
  --fs-display-md: min(clamp(2.4rem, 1.4rem + 4.4vw, 6.2rem), max(2.2rem, 11svh));
  --fs-display-lg: min(clamp(2.6rem, 1.2rem + 5.8vw, 8rem), max(2.4rem, 13svh));
  --fs-display-xl: min(clamp(3.4rem, 1rem + 10.5vw, 15rem), max(2.8rem, 20svh));
  --fs-lede: clamp(1.08rem, 0.95rem + 0.5vw, 1.42rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); color-scheme: dark; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
::selection { background: var(--cream); color: var(--bg); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: 12px; z-index: 1000; padding: 10px 16px; background: var(--cream); color: var(--bg); border-radius: 999px; transform: translateY(-160%); }
.skip:focus { transform: none; } /* instant: a sliding skip link is briefly off-screen when focused */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 0.95rem; }
.tiny { font-size: 0.8rem; }
.eyebrow { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.6rem; font-weight: 500; display: flex; align-items: center; gap: .7em; }
.lede { font-size: var(--fs-lede); line-height: 1.45; max-width: 34ch; margin: 1.6rem 0 0; letter-spacing: -0.01em; }
.display { font-size: var(--fs-display); line-height: 0.92; letter-spacing: -0.045em; font-weight: 450; margin: 0; text-wrap: balance; }
.display .split, .display .mask > span, .chapter__title, .display--md, .statement__text { text-wrap: balance; }
.display em { letter-spacing: -0.02em; font-size: 1.04em; line-height: 0.8; }
.display--md { font-size: var(--fs-display-md); line-height: 0.98; letter-spacing: -0.035em; }
.display--lg { font-size: var(--fs-display-lg); line-height: 0.95; }
.display--xl { font-size: var(--fs-display-xl); line-height: 0.88; letter-spacing: -0.05em; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; box-shadow: 0 0 0 0 rgba(232, 112, 63, .5); }
.dot--pulse, .header__meta .dot, .hero__region .dot { animation: pulse 2.6s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(232, 112, 63, .45); } 70%, 100% { box-shadow: 0 0 0 10px rgba(232, 112, 63, 0); } }

/* ---------- Grain ---------- */
.grain { position: fixed; inset: -50%; z-index: 90; 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='220' height='220'%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 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 60; max-width: var(--max); margin-inline: auto; height: var(--header-h); display: flex; align-items: center; gap: 2rem; padding-inline: var(--gutter); view-transition-name: site-header; transition: transform .6s var(--ease), background-color .4s; }
.site-header::before { content: ''; position: absolute; inset: 0 calc((100vw - 100%) / -2); background: rgba(13, 12, 10, .94); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); pointer-events: none; opacity: 0; transition: opacity .4s; }
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-110%); }
.logo { position: relative; display: inline-flex; align-items: center; gap: .6rem; font-weight: 550; letter-spacing: -0.02em; font-size: 1.12rem; }
.logo__mark { width: 28px; height: 28px; color: var(--cream); transition: transform .8s var(--ease); }
.logo:hover .logo__mark { transform: rotate(-180deg); }
.logo--lg { font-size: 1.6rem; } .logo--lg .logo__mark { width: 38px; height: 38px; }
.nav { position: relative; display: flex; gap: .4rem; margin-left: auto; }
.nav__link { position: relative; padding: .55rem .9rem; font-size: .92rem; color: var(--muted); border-radius: 999px; transition: color .3s; }
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link.is-active::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.header__meta { position: relative; display: flex; align-items: center; gap: .55rem; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-left: 1.2rem; border-left: 1px solid var(--line); }
.menu-btn { display: none; position: relative; width: 44px; height: 44px; margin-left: auto; border-radius: 50%; border: 1px solid var(--line-2); }
.menu-btn i { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--text); transition: transform .5s var(--ease); }
.menu-btn i:first-of-type { top: 18px; } .menu-btn i:last-of-type { top: 24px; }
.menu-btn[aria-expanded='true'] i:first-of-type { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded='true'] i:last-of-type { transform: translateY(-3px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 55; background: var(--bg); padding: calc(var(--header-h) + 6vh) var(--gutter) 32px; display: flex; flex-direction: column; justify-content: space-between; clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-in-out); }
.menu[hidden] { display: none; }
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu nav { display: flex; flex-direction: column; gap: .2rem; }
.menu nav a { position: relative; display: flex; align-items: baseline; gap: 14px; font-size: clamp(2.6rem, 12vw, 4.5rem); letter-spacing: -0.04em; line-height: 1.12; overflow: hidden; }
.menu nav a .menu__label { display: inline-block; transform: translateY(105%); transition: transform .8s var(--ease); }
.menu nav a small { font-size: .8rem; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .6s .2s; }
.menu nav a.is-active::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); align-self: center; margin-left: 4px; }
.menu.is-open nav a .menu__label { transform: none; }
.menu.is-open nav a small { opacity: 1; }
.menu.is-open nav a:nth-child(2) .menu__label { transition-delay: .06s; } .menu.is-open nav a:nth-child(3) .menu__label { transition-delay: .12s; } .menu.is-open nav a:nth-child(4) .menu__label { transition-delay: .18s; }
.menu__foot p { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.menu__clocks { gap: 22px !important; font-variant-numeric: tabular-nums; } .menu__clocks b { color: var(--text); font-weight: 400; margin-left: 4px; }
.menu__foot a { color: var(--text); border-bottom: 1px solid var(--line-2); }
.menu__foot { color: var(--muted); font-size: .9rem; margin: 0; }
@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .site-header::before { background: rgba(13, 12, 10, .95); }
  .nav, .header__meta { display: none; }
  .menu-btn { display: block; }
}

/* Hover roll: text slides up and is replaced by a copy. */
[data-hover-roll] { position: relative; display: inline-block; overflow: hidden; vertical-align: top; }
[data-hover-roll] > .roll { display: block; transition: transform .6s var(--ease); }
[data-hover-roll] > .roll + .roll { position: absolute; inset: 0; transform: translateY(105%); }
a:hover [data-hover-roll] > .roll:first-child, button:hover [data-hover-roll] > .roll:first-child { transform: translateY(-105%); }
a:hover [data-hover-roll] > .roll + .roll, button:hover [data-hover-roll] > .roll + .roll { transform: none; }

/* ---------- Buttons ---------- */
.btn { --bg-btn: rgba(241, 234, 219, .06); position: relative; display: inline-flex; align-items: center; gap: .9rem; height: 56px; padding: 0 .6rem 0 1.5rem; border-radius: 999px; background: var(--bg-btn); border: 1px solid var(--line-2); font-size: .98rem; font-weight: 500; letter-spacing: -0.01em; overflow: hidden; isolation: isolate; transition: border-color .4s, color .4s; will-change: transform; }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--cream); border-radius: inherit; transform: translateY(101%); transition: transform .6s var(--ease); }
.btn:hover::before { transform: none; }
.btn:hover { color: var(--bg); border-color: var(--cream); }
.btn__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(241, 234, 219, .1); transition: background .4s, transform .6s var(--ease); }
.btn:hover .btn__icon { background: rgba(13, 12, 10, .1); transform: rotate(-45deg); }
.btn--primary { --bg-btn: var(--cream); color: var(--bg); border-color: var(--cream); }
.btn--primary::before { background: var(--accent); }
.btn--primary:hover { color: var(--accent-ink); border-color: var(--accent); }
.btn--primary .btn__icon { background: rgba(13, 12, 10, .08); }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.arrow { width: 18px; height: 18px; flex: none; }
.link-arrow { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem 0; color: var(--text); font-size: .98rem; border-bottom: 1px solid var(--line-2); transition: border-color .3s, gap .4s var(--ease); }
.link-arrow:hover { border-color: var(--text); gap: .85rem; }
.link-arrow[hidden] { display: none; }

/* ---------- Split text reveals ---------- */
.split { display: block; }
.split + br { display: none; }
.split .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.split .line > span { display: inline-block; transform: translate3d(0, 110%, 0) rotate(2deg); transform-origin: 0 100%; transition: transform 1.2s var(--ease); transition-delay: calc(var(--li, 0) * 0.08s + var(--d, 0s)); }
.split.is-in .line > span { transform: none; }
.display .split .line { padding-top: .06em; margin-top: -.06em; }
/* Above-the-fold titles: CSS line masks, animate from first paint (LCP-friendly) */
.mask { display: block; overflow: hidden; padding: .06em 0 .1em; margin: -.06em 0 -.1em; }
.mask > span { display: block; animation: maskUp 1s var(--ease) both; animation-delay: calc(var(--intro, 0s) + var(--i, 0) * .09s + .05s); }
@keyframes maskUp { from { transform: translate3d(0, 108%, 0) rotate(1.5deg); } }
.show-intro { --intro: .72s; }
.hero__eyebrow, .hero__lede, .hero__ctas, .hero__foot { animation: fadeUp 1s var(--ease) both; animation-delay: calc(var(--intro, 0s) + var(--d, .3s)); }
.hero__eyebrow { --d: 0s; } .hero__lede { --d: .25s; } .hero__ctas { --d: .38s; } .hero__foot { --d: .55s; }
@keyframes fadeUp { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
/* scrubbed statement: words brighten with scroll */
.split--scrub .w { color: rgba(241, 234, 219, .24); transition: color .5s; }
.split--scrub .w.on { color: var(--text); }
.split--scrub .w em { color: inherit; }
html:not(.js) .split .line > span { transform: none; }

[data-reveal] { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; }
html:not(.js) [data-reveal] { opacity: 1; transform: none; }
/* Above-the-fold entrances: CSS-only, start at first paint (no JS / font wait → fast LCP). */
[data-enter] { animation: fadeUp 1s var(--ease) both; animation-delay: calc(var(--intro, 0s) + var(--d, .15s)); }
html:not(.js) [data-enter] { animation: none; }

/* ---------- Intro ---------- */
.intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); clip-path: inset(0 0 0 0); pointer-events: none; animation: introWipe .75s var(--ease-in-out) .65s forwards; }
@keyframes introWipe { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
.intro__inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.intro__word { display: flex; font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -0.04em; font-weight: 450; overflow: hidden; }
.intro__word span { display: inline-block; transform: translateY(110%); animation: introIn .7s var(--ease) forwards; animation-delay: calc(var(--i) * 0.035s); }
.intro__bar { width: 140px; height: 1px; background: var(--line-2); overflow: hidden; }
.intro__bar i { display: block; height: 100%; background: var(--cream); transform: scaleX(0); transform-origin: 0 50%; animation: introBar .6s var(--ease-in-out) .05s forwards; }
@keyframes introIn { to { transform: none; } }
@keyframes introBar { to { transform: scaleX(1); } }
/* The wipe hands off to the hero: title lines rise while the overlay lifts. */
html:not(.show-intro) .intro { display: none; }

/* ---------- Cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; mix-blend-mode: difference; }
  html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
  html.has-cursor input, html.has-cursor textarea { cursor: text; }
  .cursor__dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; }
  .cursor__ring { position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .6); display: grid; place-items: center; transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .45s, border-color .45s; }
  .cursor__ring em { font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .3s; }
  .cursor.is-link .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: rgba(255, 255, 255, .9); }
  .cursor.is-view .cursor__ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: #fff; }
  .cursor.is-view .cursor__ring em { opacity: 1; }
  .cursor.is-view .cursor__dot { opacity: 0; }
  .cursor.is-hidden { opacity: 0; }
}

/* ---------- Media (poster + lazy video) ---------- */
.media { position: relative; overflow: hidden; background: var(--bg-2); }
.media__poster, .media__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media__video { opacity: 0; transition: opacity 1.2s var(--ease); }
.media::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .12; mix-blend-mode: overlay; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero__media::after { display: none; }
.media.is-playing .media__video { opacity: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 185vh; height: 185svh; }
.hero__pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: var(--header-h); overflow: hidden; }
/* Short viewports: tighten the vertical rhythm so eyebrow → CTA always sits between header and fold. */
@media (max-height: 760px) {
  .hero__content { padding-bottom: 28px; }
  .hero .hero__foot { display: none; }
  .contact__meta > div:nth-child(2) { display: none; } /* "Region" repeats the header's UK & EU — make room for the clocks */
  .lede { margin-top: 1rem; }
  .hero__ctas { margin-top: 1.4rem; }
  .eyebrow { margin-bottom: 1rem; }
  .page-hero { padding-top: calc(var(--header-h) + 40px); padding-bottom: 40px; }
  .page-hero--tall { padding-bottom: 36px; }
  .contact { padding-top: calc(var(--header-h) + 28px); gap: 28px 64px; }
  .contact__meta { margin-top: 1.4rem; gap: 12px; }
  .contact__form { padding: 22px 28px; }
  .contact__form .form__grid { gap: 10px 20px; }
  .contact__form .field textarea { height: 4.8em; min-height: 0; }
  .contact__form .form__row { margin-top: .8rem; }
  .contact__form .field input, .contact__form .field textarea { padding: 6px 0 8px; }
  .btn { height: 50px; }
  .notfound .btn { margin-top: 1.6rem; }
  .hero__lede, .page-hero .lede { max-width: 46ch; }
  .demo__inner { padding-block: calc(var(--header-h) + 24px) 24px; }
  .boot { margin-top: 1.4rem; gap: 6px; }
  .progress { margin-top: 1.2rem; }
  .demo__note { margin-top: 1rem; }
  .demo__exit { margin-top: 1rem; }
}
@media (max-height: 640px) {
  .boot { grid-template-columns: 1fr 1fr; column-gap: 40px; max-width: 900px; }
  :root { --fs-display: min(clamp(3.4rem, 1.4rem + 7.4vw, 10.5rem), max(2.4rem, 14svh)); --fs-display-lg: min(clamp(2.6rem, 1.2rem + 5.8vw, 8rem), max(2.2rem, 11.5svh)); }
}
.hero__content, .hero__foot { opacity: calc(1 - var(--hp, 0) * 1.6); transform: translate3d(0, calc(var(--hp, 0) * -60px), 0); }
.hero__shade { opacity: calc(1 - var(--hp, 0) * .5); }
/* Hand-off: as the statement slides up over the pinned hero, the stage (stack) fades out beneath it. */
.hero__stage { opacity: calc(1 - max(0, var(--hp, 0) - .55) * 2.2); }
.hero__stage { position: absolute; inset: 0; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s var(--ease); }
.hero.is-webgl .hero__canvas { opacity: 1; }
/* 1px short of the viewport: Chrome drops exactly full-viewport images as LCP candidates (treats them as backgrounds). */
.hero__media { position: absolute; inset: 0 0 1px 0; background: var(--bg); transition: opacity 1.6s var(--ease); }
.hero__media .media__poster { object-position: 70% 50%; }
.hero.is-webgl .hero__media { opacity: 0; }
.hero__shade { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(120% 90% at 75% 45%, rgba(13, 12, 10, 0) 30%, rgba(13, 12, 10, .55) 75%, var(--bg) 100%),
  linear-gradient(90deg, rgba(13, 12, 10, .85) 0%, rgba(13, 12, 10, .35) 42%, rgba(13, 12, 10, 0) 65%),
  linear-gradient(0deg, var(--bg) 0%, rgba(13, 12, 10, 0) 28%); }
.hero__content { position: relative; z-index: 2; padding-top: 24px; padding-bottom: clamp(40px, 9vh, 130px); }
.hero__title { max-width: 14ch; }
.hide-sm { display: inline; }
@media (max-width: 480px) { .hide-sm { display: none; } }
.hero__lede { max-width: 31ch; }
.hero__ctas { display: flex; align-items: center; flex-wrap: wrap; gap: 1.2rem 2rem; margin-top: 2.4rem; }
.hero__foot { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding-bottom: 28px; font-size: .82rem; color: var(--muted); }
.hero__region { display: flex; align-items: center; gap: .6rem; margin: 0; letter-spacing: .02em; }
.hero__scroll { display: flex; align-items: center; gap: .8rem; margin: 0; letter-spacing: .18em; text-transform: uppercase; font-size: .7rem; }
.hero__scroll i { position: relative; width: 1px; height: 40px; background: var(--line-2); overflow: hidden; }
.hero__scroll i::after { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 45%; background: var(--cream); animation: scrollLine 2.2s var(--ease-in-out) infinite; }
@keyframes scrollLine { 0% { transform: translateY(-100%); } 100% { transform: translateY(240%); } }
@media (max-width: 820px) {
  .hero__shade { background: radial-gradient(120% 70% at 50% 30%, rgba(13, 12, 10, .1) 0%, rgba(13, 12, 10, .6) 70%, var(--bg) 100%), linear-gradient(0deg, var(--bg) 8%, rgba(13, 12, 10, .2) 60%); }
  .hero__scroll { display: none; }
}

/* ---------- Statement ---------- */
.statement { position: relative; z-index: 3; margin-top: -32vh; padding-block: 0 clamp(80px, 14vh, 180px); }
html.reduced .statement { margin-top: 0; padding-top: clamp(90px, 16vh, 200px); }
@media (max-width: 820px) {
  .hero { height: auto; }
  .hero__pin { position: relative; height: 100vh; height: 100svh; }
  .hero__content, .hero__foot, .hero__shade, .hero__stage { opacity: 1; transform: none; }
  .statement { margin-top: -3vh; padding-top: 28px; }
  .statement::before { content: ''; position: absolute; inset: -14vh 0 auto; height: 18vh; background: linear-gradient(to bottom, rgba(13, 12, 10, 0), var(--bg)); z-index: -1; }
}
.statement__bg { position: absolute; inset: -10% 0 -10% 0; z-index: -1; opacity: .08; background: transparent;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 60% 50%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 60% 55% at 60% 50%, #000 30%, transparent 75%); }
.statement__bg::after { display: none; }
.page-hero__aside, .contact__aside { display: none; }
@media (min-width: 1680px) and (min-height: 760px) {
  .page-hero--tall { position: relative; }
  .page-hero.page-hero--tall > .page-hero__aside { display: block; position: absolute; right: var(--gutter); top: calc(var(--header-h) + 16vh); bottom: auto; width: min(30vw, 520px); margin: 0; z-index: 2; transform: translate3d(0, calc(var(--py, 0) * 1px), 0); }
  main .contact { grid-template-columns: 1.1fr 1fr .5fr; }
  .contact__aside { display: block; padding-top: .6rem; order: 3; }
  .contact__meta > div:last-child { display: none; }
  .tz--stacked { grid-template-columns: 1fr; row-gap: 18px; margin: 0; border-top: 0; }
  .tz--stacked li { padding: 0 0 14px; border-bottom: 1px solid var(--line); }
  .tz--stacked b { font-size: 2.2rem; }
  .contact__aside-note { margin-top: 2rem; font-size: 1.05rem; line-height: 1.5; }
}
.statement__text { font-size: clamp(1.9rem, 1rem + 3.3vw, 4.6rem); line-height: 1.08; letter-spacing: -0.035em; max-width: 22ch; margin: 0; font-weight: 420; }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 26px 0; }
.marquee__track { display: flex; align-items: center; gap: 2.4rem; width: max-content; animation: marquee 48s linear infinite; will-change: transform; }
.marquee.is-driven .marquee__track { animation: none; }
.marquee span { font-family: var(--serif); font-style: italic; font-size: clamp(1.8rem, 1rem + 2.6vw, 3.4rem); color: var(--bagasse); white-space: nowrap; letter-spacing: -0.01em; }
.marquee i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--muted); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Chapters ---------- */
.chapters { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 120px); padding-block: clamp(100px, 16vh, 200px); }
.chapters__sticky { position: sticky; top: calc(var(--header-h) + 4vh); }
.chapters__frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg);
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 58%, transparent 100%); }
.chapters__frame .media { background: var(--bg); }
.chapters__frame .media--frame { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; opacity: 0; transform: scale(1.04); transition: opacity .6s var(--ease), transform 1.2s var(--ease); }
.chapters__frame .media--frame.is-active { opacity: 1; transform: none; z-index: 1; }
.chapters__frame .media--frame.was-active { opacity: 1; transform: none; z-index: 0; }
.chapters__frame .media--frame:not(.is-active):not(.was-active) { visibility: hidden; transition: opacity .6s var(--ease), transform 1.2s var(--ease), visibility 0s .6s; }
.chapters__list { position: relative; padding-left: 28px; }
.chapters__rail { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.chapters__rail i { position: absolute; left: 0; top: 0; width: 1px; height: 100%; background: var(--accent); transform-origin: 0 0; transform: scaleY(var(--rail, 0)); }
.chapter .chapter__title { opacity: .5; transition: opacity .7s var(--ease); }
.chapter .chapter__text { transition: color .7s var(--ease); }
.chapter:not(.is-active) .chapter__text { color: #8f8778; } /* dim by colour: ≈4.6:1, stays AA */
@media (max-width: 820px) { .chapter .chapter__title, .chapter .chapter__text { opacity: 1; } }
.chapter.is-active .chapter__title, .chapter.is-active .chapter__text { opacity: 1; }
html.reduced .chapter .chapter__title { opacity: 1; }
.media--frame { aspect-ratio: 4 / 5; border-radius: var(--radius); }
.caption { margin: 14px 0 0; font-size: .8rem; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.chapter { min-height: 55vh; display: flex; flex-direction: column; justify-content: center; border-top: 1px solid var(--line); padding-block: 48px; }
.chapter:first-child { border-top: 0; }
.chapter__num { display: flex; gap: 1rem; align-items: baseline; margin: 0 0 1.4rem; font-size: .8rem; color: var(--muted); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.chapter__num span { text-transform: uppercase; color: var(--kraft); }
.chapter__title { font-size: clamp(2rem, 1rem + 3vw, 4.1rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 440; margin: 0; max-width: 14ch; }
.chapter__text { font-size: var(--fs-lede); max-width: 30ch; margin: 1.4rem 0 0; }
@media (max-width: 900px) {
  .chapters { grid-template-columns: 1fr; }
  .chapters__sticky { position: relative; top: 0; }
  .chapters__frame { aspect-ratio: 16 / 11; }
  .chapters__media { position: sticky; top: var(--header-h); z-index: 2; background: var(--bg); padding-bottom: 12px; }
  .chapters__list { padding-left: 18px; }
  .chapter { min-height: 0; padding-block: 56px; }
}

/* ---------- Feature (AI teaser) ---------- */
.feature { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-content: center; overflow: hidden; }
.console--mini { max-width: 560px; margin: 3rem 0 0; background: rgba(13, 12, 10, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.console--mini .console__body { padding: 22px 24px 26px; }
.console--mini .console__q { font-size: 1.05rem; margin-bottom: 1.2rem; }
.console [data-type].is-typing::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.stats { padding-bottom: clamp(70px, 12vh, 140px); }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--line); }
.stats__grid div { padding: 28px 0 0; }
.stats__grid dt { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.stats__grid dd { margin: 14px 0 0; font-size: clamp(3rem, 1.5rem + 5vw, 7rem); letter-spacing: -0.05em; line-height: .9; font-variant-numeric: tabular-nums; }
.stats__grid dd sup { font-size: .4em; color: var(--kraft); vertical-align: top; margin-left: 4px; }
.stats__grid .stats__words { font-size: clamp(2rem, 1rem + 3vw, 4.4rem); letter-spacing: -0.035em; }
@media (max-width: 600px) {
  .stats__grid { grid-template-columns: 1fr; border-top: 0; }
  .stats__grid div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
  .stats__grid dd { margin: 0; }
  .stats__grid .stats__words { font-size: clamp(1.4rem, 6.4vw, 1.8rem); text-align: right; }
}
.noscript { margin-top: 1.4rem; } .noscript a { text-decoration: underline; }
.feature__bg { position: absolute; inset: 0; }
.feature__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(13, 12, 10, .3) 30%, rgba(13, 12, 10, .3) 70%, var(--bg) 100%), linear-gradient(90deg, rgba(13, 12, 10, .8), rgba(13, 12, 10, 0) 70%); }
.feature__inner { position: relative; z-index: 2; padding-block: 120px; }
.feature .btn { margin-top: 2.4rem; }

/* ---------- Region ---------- */
.region { padding-block: clamp(110px, 18vh, 220px); }
.region__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; }
.tz { list-style: none; padding: 0; margin: 2.6rem 0 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; column-gap: clamp(1.25rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.tz--compact { margin: 0; border-top: 0; column-gap: 1.25rem; }
.tz--compact li { padding: 0; }
.tz--compact b { font-size: 1.1rem; }
.tz li { padding: 18px 0; display: flex; flex-direction: column; gap: 4px; }
.tz span { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.tz b { font-weight: 400; font-size: 1.5rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .region__grid { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta { padding-block: clamp(90px, 14vh, 180px) clamp(110px, 18vh, 220px); border-top: 1px solid var(--line); }
.cta__link { position: relative; display: inline-block; transition: color .5s, transform .7s var(--ease); will-change: transform; }
.cta__link::after { content: ''; position: absolute; left: 0; right: 0; bottom: .02em; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .8s var(--ease); }
.cta__link:hover::after, .cta__link:focus-visible::after { transform: scaleX(1); }
.cta__link em { display: inline-block; transition: transform .6s var(--ease); }
.cta__link:hover { color: var(--bagasse); }
.cta__row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; margin-top: 2.8rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px var(--gutter) 32px; max-width: var(--max); margin-inline: auto; }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: flex-start; }
.footer__line { margin: 0; font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.3; text-align: right; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; margin-top: 72px; font-size: .86rem; }
.footer__bottom nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__bottom nav a { color: var(--muted); transition: color .3s; }
.footer__bottom nav a:hover { color: var(--text); }
.footer__bottom p { margin: 0; }
@media (max-width: 640px) { .footer__line { text-align: left; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; padding-top: calc(var(--header-h) + clamp(80px, 16vh, 200px)); padding-bottom: clamp(60px, 10vh, 120px); }
.page-hero--tall { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(64px, 12vh, 140px); }
.page-hero > *:not(.page-hero__media) { position: relative; z-index: 2; }
.page-hero__media { position: absolute; top: var(--header-h); right: 0; width: min(52vw, 860px); height: calc(100% - var(--header-h)); z-index: 0; opacity: .75; -webkit-mask-image: radial-gradient(ellipse at 62% 42%, #000 40%, transparent 72%); mask-image: radial-gradient(ellipse at 62% 42%, #000 40%, transparent 72%); background: transparent; }
.page-hero__media--full { inset: 0; width: 100%; height: 100%; opacity: .85; -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.25), #000 60%); mask-image: linear-gradient(90deg, rgba(0,0,0,.25), #000 60%); }
.page-hero__media--full::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg), rgba(13, 12, 10, 0) 45%); }
@media (max-width: 820px) { .page-hero__media { width: 100%; opacity: .4; } }

/* ---------- Tiles ---------- */
.tiles { padding-bottom: clamp(80px, 14vh, 180px); }
.tiles__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tile { position: relative; background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tile::before { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .tile::before { background: var(--still) center / cover no-repeat; } }
.tile:hover::before { opacity: .2; }
.tile--cta::before { display: none; }
/* Reveal the tile's content, not the tile — the grid lines are always there (no grey slab). */
.tile[data-reveal] { opacity: 1; transform: none; }
.tile[data-reveal] .tile__link > * { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity 1s var(--ease), transform 1s var(--ease), stroke .3s; transition-delay: var(--d, 0s); }
.tile[data-reveal].is-in .tile__link > * { opacity: 1; transform: none; }
.tile[data-reveal].is-in .tile__glyph { opacity: .45; }
.tile[data-reveal].is-in:hover .tile__glyph { opacity: 1; }
html:not(.js) .tile .tile__link > * { opacity: 1; transform: none; }
.tile__link { position: relative; display: flex; flex-direction: column; min-height: clamp(200px, 17vw, 250px); padding: clamp(24px, 2.4vw, 40px); isolation: isolate; height: 100%; }
.tile__link::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--kraft); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease); }
.tile:hover .tile__link::after, .tile__link:focus-visible::after { transform: scaleX(1); }
.tile__title, .tile__text { transition: transform .6s var(--ease); }
.tile[data-reveal].is-in:hover .tile__title, .tile[data-reveal].is-in:hover .tile__text { transform: translateY(-6px); }
.tile__glyph { position: absolute; top: clamp(20px, 2.2vw, 36px); right: clamp(20px, 2.2vw, 36px); width: 44px; height: 44px; fill: none; stroke: var(--bagasse); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; opacity: .45; transition: opacity .5s; }
.tile__glyph * { stroke-dasharray: 120; stroke-dashoffset: 0; }
.tile:hover .tile__glyph { opacity: 1; }
.tile:hover .tile__glyph * { animation: drawStroke 1.1s var(--ease) both; }
@keyframes drawStroke { from { stroke-dashoffset: 120; } }
.tile--cta .tile__link { background: linear-gradient(135deg, rgba(185, 143, 98, .10), rgba(185, 143, 98, 0) 60%); }
.tile--cta .tile__title em { color: var(--bagasse); }
.tile__link::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .6s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(214, 199, 165, .13), transparent 60%); }
.tile:hover .tile__link::before { opacity: 1; }
.tile__num { font-size: .78rem; color: var(--muted); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.tile__title { margin: auto 0 0; font-size: clamp(1.45rem, 1rem + 1.1vw, 2.1rem); font-weight: 450; letter-spacing: -0.03em; line-height: 1.08; max-width: 14ch; }
.tile__text { margin: .7rem 0 0; color: var(--muted); font-size: 1rem; }
.tile__arrow { position: absolute; bottom: clamp(24px, 2.4vw, 40px); right: clamp(24px, 2.4vw, 40px); opacity: 0; transform: translate(-8px, 8px) rotate(-45deg); transition: opacity .5s, transform .6s var(--ease); }
a.tile__link:hover .tile__arrow { opacity: 1; transform: rotate(-45deg); }
a.tile__link .tile__arrow { opacity: .5; transform: none; }
@media (min-width: 601px) { .tile--cta { grid-column: span 2; } }
@media (max-width: 1000px) { .tiles__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tiles__grid { grid-template-columns: 1fr; } .tile__link { min-height: 180px; } }

.engage { padding-bottom: clamp(80px, 14vh, 180px); }
.engage__list { list-style: none; padding: 0; margin: 0; }
.engage__list li { display: flex; align-items: baseline; gap: clamp(16px, 4vw, 64px); border-top: 1px solid var(--line); padding: 20px 0; font-size: var(--fs-display-md); letter-spacing: -0.04em; line-height: 1; }
.fill { position: relative; display: inline-block; color: #7a7263; }
.fill::after { content: attr(data-text); position: absolute; left: 0; top: 0; color: var(--text); white-space: nowrap; clip-path: inset(0 calc((1 - var(--fill, 0)) * 100%) 0 0); pointer-events: none; }
html.reduced .fill, html:not(.js) .fill { color: var(--text); }
.engage__list li { font-size: var(--fs-display-lg) !important; }
.engage__list li > span:first-child { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--muted); min-width: 2.4em; letter-spacing: 0; }

/* ---------- AI page ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); margin-block: clamp(40px, 8vh, 100px); }
.pillar { border-block: 1px solid var(--line); padding: clamp(28px, 3vw, 48px) clamp(20px, 2.6vw, 44px) clamp(36px, 4vw, 64px); }
.pillar:first-child { padding-left: 0; }
.pillar + .pillar { border-left: 1px solid var(--line); }
.pillar__num { font-size: .78rem; color: var(--muted); letter-spacing: .14em; }
.pillar__title { font-size: clamp(1.6rem, 1rem + 1.6vw, 2.6rem); font-weight: 450; letter-spacing: -0.03em; margin: 2.4rem 0 .6rem; }
.pillar p { margin: 0; max-width: 30ch; }
@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; } .pillar { padding-left: 0; } .pillar + .pillar { border-left: 0; border-top: 0; } }

.console-wrap { padding-block: clamp(40px, 8vh, 100px); }
.console { max-width: 900px; margin-inline: auto; border: 1px solid var(--line-2); border-radius: 18px; background: linear-gradient(180deg, rgba(241, 234, 219, .04), rgba(241, 234, 219, .01)); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(241, 234, 219, .06); overflow: hidden; }
.console__bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .74rem; letter-spacing: .1em; color: var(--muted); }
.console__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.console__bar span { margin-left: auto; }
.console__body { padding: clamp(24px, 4vw, 48px); }
.console__q { font-size: clamp(1.1rem, .9rem + .8vw, 1.6rem); letter-spacing: -0.02em; margin: 0 0 1.8rem; }
.console__q span { color: var(--accent); margin-right: .5rem; }
.console__a { display: grid; gap: 12px; filter: blur(0.4px); }
.console__a i { display: block; height: 12px; width: var(--w); border-radius: 6px; background: linear-gradient(90deg, rgba(241, 234, 219, .1), rgba(241, 234, 219, .22), rgba(241, 234, 219, .1)); background-size: 200% 100%; animation: shimmer 2.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.console__lock { display: flex; align-items: center; gap: .6rem; margin: 2rem 0 0; font-size: .86rem; color: var(--muted); }

/* ---------- AI pinned sequence: pillars drive the answer being assembled ---------- */
.ai-seq { position: relative; height: 320vh; margin-bottom: 12vh; }
.ai-seq__pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 110px); align-items: center; padding-top: var(--header-h); }
.ai-seq__steps { list-style: none; margin: 0; padding: 0; position: relative; }
.ai-step { position: relative; padding: 22px 0 22px 28px; border-top: 1px solid var(--line); }
.ai-step:last-child { border-bottom: 1px solid var(--line); }
.ai-step::before { content: ''; position: absolute; left: 0; top: -1px; bottom: 0; width: 1px; background: var(--accent); transform: scaleY(0); transform-origin: 0 0; transition: transform .7s var(--ease); }
.ai-step.is-active::before { transform: scaleY(1); }
.ai-step .pillar__title { margin: .6rem 0 .4rem; font-size: clamp(1.6rem, 1rem + 1.9vw, 2.9rem); opacity: .5; transition: opacity .6s var(--ease); }
.ai-step.is-active .pillar__title { opacity: 1; }
.ai-step__text { margin: 0; max-width: 34ch; color: #8f8778; transition: color .6s var(--ease); }
.ai-step.is-active .ai-step__text { color: var(--text); }
.console--seq { width: 100%; margin: 0; }
.console__ans { display: grid; gap: 18px; }
.ans small { display: block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ans i { display: block; height: 10px; border-radius: 5px; background: rgba(241, 234, 219, .07); overflow: hidden; margin-top: 8px; }
.ans i + i { width: 72%; }
.ans b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--bagasse), var(--cream)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.ans i + i b { transform: scaleX(calc(var(--p, 0) * 1.4 - .4)); opacity: .7; }
.ans.is-done small { color: var(--bagasse); }
@media (max-width: 900px) {
  .ai-seq { height: auto; }
  .ai-seq__pin { position: relative; height: auto; grid-template-columns: 1fr; padding-block: 40px 80px; }
  .ai-step .pillar__title { opacity: 1; } .ai-step__text { color: var(--muted); }
}
html.reduced .ai-seq, html:not(.js) .ai-seq { height: auto; }
html:not(.js) .ai-seq__pin { position: relative; height: auto; padding-block: 60px; }
html:not(.js) .ai-step .pillar__title { opacity: 1; }
html:not(.js) .ai-step__text { color: var(--muted); }
/* Short laptops: compress the pinned sequence; below 640px tall, unpin and stack. */
@media (min-width: 901px) and (max-height: 760px) {
  .ai-step { padding: .8rem 0 .8rem 24px; }
  .ai-step .pillar__title { font-size: clamp(1.5rem, 3.2svh + 1rem, 2.3rem); margin: .3rem 0 .2rem; }
  .ai-step__text { max-height: 4em; overflow: hidden; transition: max-height .5s var(--ease), opacity .5s var(--ease), color .6s var(--ease); }
  .ai-step:not(.is-active) .ai-step__text { max-height: 0; opacity: 0; }
  .console--seq .console__body { padding: 1.25rem; }
  .console--seq .console__q { font-size: 1.05rem; margin-bottom: 1rem; }
  .console--seq .console__ans { gap: 10px; }
  .console--seq .console__lock { margin-top: 1rem; }
}
@media (min-width: 901px) and (max-height: 640px) {
  .ai-seq { height: auto; }
  .ai-seq__pin { position: relative; height: auto; padding-block: 48px 64px; }
  .ai-step:not(.is-active) .ai-step__text { max-height: 4em; opacity: 1; }
}
html.reduced .ai-seq__pin { position: relative; height: auto; padding-block: 60px; }
html.reduced .ans b, html.reduced .ans i + i b { transform: none; }
html.reduced .ai-step .pillar__title { opacity: 1; }
html:not(.js) .ans b { transform: none; }

/* ---------- Modal ---------- */
.modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line-2); border-radius: 22px; background: #15130f; color: var(--text); box-shadow: 0 60px 160px -30px rgba(0, 0, 0, .9); overflow: auto; }
.modal::backdrop { background: rgba(8, 7, 6, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal[open] { animation: modalIn .7s var(--ease); }
.modal[open]::backdrop { animation: fadeIn .5s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@media (max-width: 600px) {
  .modal { width: 100%; max-width: 100%; margin: auto 0 0; inset: auto 0 0 0; border-radius: 22px 22px 0 0; border-bottom: 0; max-height: 92dvh; padding: 32px 20px calc(24px + env(safe-area-inset-bottom)); }
  .modal[open] { animation: sheetIn .55s var(--ease); }
  .modal .form__row { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); margin-inline: -20px; padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(to top, #15130f 72%, rgba(21, 19, 15, 0)); z-index: 2; }
  .modal .form { margin-top: 1rem; }
  .modal .form__grid { gap: 12px 16px; }

  .modal .field textarea { min-height: 0; height: 4.6em; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
}
@keyframes fadeIn { from { opacity: 0; } }
.modal__close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--muted); transition: color .3s, background .3s; }
.modal__close:hover { color: var(--text); background: rgba(241, 234, 219, .06); }
.modal__title { font-size: clamp(1.9rem, 1.2rem + 2vw, 2.8rem); font-weight: 440; letter-spacing: -0.035em; line-height: 1.02; margin: 0 0 .8rem; }
.modal__step[hidden] { display: none; }
.modal__step:not([hidden]) { animation: stepIn .6s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } }
.loader-line { display: block; height: 1px; margin-top: 2rem; background: var(--line-2); overflow: hidden; }
.loader-line i { display: block; height: 100%; width: 40%; background: var(--cream); animation: loadLine 1.2s var(--ease-in-out) infinite; }
@keyframes loadLine { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- Forms ---------- */
.form { margin-top: 1.8rem; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); color: var(--text); font: inherit; font-size: 1.08rem; padding: 10px 0 12px; border-radius: 0; transition: border-color .3s; resize: vertical; }
.field { position: relative; }
.field::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease); pointer-events: none; }
.field:focus-within::after { transform: scaleX(1); }
.field label { transition: color .3s, transform .4s var(--ease); transform-origin: 0 50%; }
.field:focus-within label { color: var(--text); transform: translateY(-2px); }
.field input:focus, .field textarea:focus { border-color: var(--line-2); outline: none; }

.field input:focus-visible, .field textarea:focus-visible { outline: none; box-shadow: 0 1px 0 0 var(--accent); }
.field input[aria-invalid='true'], .field textarea[aria-invalid='true'] { border-color: var(--accent); }
#demo-code { font-size: 1.5rem; letter-spacing: .12em; text-transform: uppercase; }
.form__row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.8rem; margin-top: 1.6rem; }
.form__msg { min-height: 1.4em; margin: 1rem 0 0; font-size: .95rem; color: var(--bagasse); }
.form__msg.is-error { color: #f3a07c; }
.modal .form__msg { min-height: 0; max-height: 0; margin: 0; overflow: hidden; transition: max-height .3s var(--ease), margin .3s var(--ease); }
.modal .form__msg:not(:empty) { max-height: 6em; margin-top: 1rem; }
.field input.shake { animation: shake .36s var(--ease-in-out); }
@keyframes shake { 0%, 100% { transform: none; } 16%, 50%, 83% { transform: translateX(-6px); } 33%, 66% { transform: translateX(6px); } }
.field input[aria-invalid='true'] { border-color: #e2583a; }
.form__msg:empty { margin: 0; min-height: 0; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .form__grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 140px); padding-top: calc(var(--header-h) + clamp(70px, 14vh, 180px)); padding-bottom: clamp(90px, 16vh, 200px); align-items: start; }
.contact__meta { margin: 3rem 0 0; display: grid; gap: 22px; }
.contact__meta dt { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.contact__meta dd { margin: 0; font-size: 1.1rem; }
.contact__meta a { border-bottom: 1px solid var(--line-2); transition: border-color .3s; word-break: break-all; }
.contact__meta a:hover { border-color: var(--text); }
.contact__form { margin-top: .6rem; padding: clamp(24px, 3vw, 44px); border: 1px solid var(--line); border-radius: 20px; background: rgba(241, 234, 219, .015); }
.contact__form .form__row .tiny a, .modal .tiny a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Prose ---------- */
.prose { max-width: 820px; padding-top: calc(var(--header-h) + clamp(70px, 14vh, 160px)); padding-bottom: clamp(90px, 16vh, 180px); }
.prose h2 { font-size: 1.35rem; font-weight: 500; letter-spacing: -0.02em; margin: 3rem 0 .8rem; }
.prose p, .prose li { color: #d6cebf; font-size: 1.05rem; line-height: 1.7; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .6rem; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 550; }
.prose .display { margin-bottom: 1.2rem; }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: var(--header-h); }
.notfound .btn { margin-top: 2.6rem; }

/* ---------- Demo ---------- */
.demo { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.demo__bg { position: absolute; inset: 0; opacity: .6; }
.demo__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 10%, rgba(13, 12, 10, .4) 70%); }
.demo__inner { position: relative; z-index: 2; padding-block: calc(var(--header-h) + 40px) 60px; }
.boot { list-style: none; padding: 0; margin: 3rem 0 0; font-family: var(--mono); letter-spacing: 0; font-size: .86rem; color: var(--muted); display: grid; gap: 10px; max-width: 560px; }
.boot li { display: flex; gap: 12px; opacity: 0; transform: translateY(6px); transition: opacity .5s, transform .5s var(--ease); }
.boot li.is-on { opacity: 1; transform: none; }
.boot li::before { content: attr(data-line); }
.boot li::after { content: '…'; margin-left: auto; color: var(--muted); }
.boot li.is-ok::after { content: 'ready'; color: var(--bagasse); }
.progress { max-width: 560px; height: 1px; background: var(--line-2); margin-top: 2rem; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--cream); transform-origin: 0 50%; transform: scaleX(0); transition: transform .8s var(--ease); }
.demo__note { margin-top: 2rem; font-size: 1.1rem; }
.demo__note:not([hidden]) { animation: stepIn .8s var(--ease); }
.demo__exit { margin-top: 2.4rem; }

/* ---------- View transitions ---------- */
@view-transition { navigation: auto; }
/* Old page lifts away; the new page is wiped up from the bottom over it (no double exposure). */
::view-transition-old(root) { animation: vtOut .35s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vtWipe .7s cubic-bezier(.76, 0, .24, 1) both; }
::view-transition-group(site-header) { animation-duration: .6s; }
::view-transition-old(site-header), ::view-transition-new(site-header) { animation: none; mix-blend-mode: normal; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-4vh); } }
::view-transition-group(page-title) { animation-duration: .7s; animation-timing-function: cubic-bezier(.76, 0, .24, 1); }
::view-transition-old(page-title) { animation: vtTitleOut .3s var(--ease-in-out) both; }
::view-transition-new(page-title) { animation: vtTitleIn .7s var(--ease) .12s both; }
@keyframes vtTitleOut { to { opacity: 0; transform: translateY(-24px); } }
@keyframes vtTitleIn { from { opacity: 0; transform: translateY(28px); } }
@keyframes vtWipe { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
/* Fallback for browsers without cross-document view transitions */
.page-leave main, .page-leave .site-footer { opacity: 0; transform: translateY(-12px); transition: opacity .35s var(--ease-in-out), transform .35s var(--ease-in-out); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .grain { animation: none; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .split .line > span, [data-reveal] { transform: none !important; opacity: 1 !important; }
  .split--scrub .w { color: var(--text); }
  @view-transition { navigation: none; }
  .hero { height: auto; }
  .hero__pin { position: relative; min-height: 100svh; height: auto; }
  .intro { display: none; }
}
html.reduced .split .line > span, html.reduced [data-reveal] { transform: none !important; opacity: 1 !important; transition: none !important; }

@media (min-width: 2000px) {
  html { font-size: 18px; }
}
