/* RodionMordehaev.com — night sea + water-ring blue (cyan to electric blue), one scheme from top to bottom. */

:root {
  color-scheme: dark;
  --abyss: #03070d;
  --deep: #061120;
  --sea: #0a1a2c;
  --sea-2: #0e2238;
  --line: rgba(150, 190, 230, 0.14);
  --line-2: rgba(150, 190, 230, 0.3);
  --foam: #e9f0f6;
  --mist: #a3b5c8;
  --dim: #7489a0;
  --accent: #02d2f9;
  --accent-deep: #0051f3;
  --accent-grad: linear-gradient(120deg, #04eafa 0%, #017ef9 55%, #0043d4 100%);
  --accent-hi: #9bf4fb;
  --accent-glow: rgba(2, 210, 249, 0.35);
  --accent-soft: rgba(2, 210, 249, 0.12);
  --fade-text: linear-gradient(180deg, #e9f0f6 0%, rgba(233, 240, 246, 0.6) 50%, rgba(233, 240, 246, 0.14) 100%);
  --fade-mist: linear-gradient(180deg, rgba(163, 181, 200, 0.95) 0%, rgba(163, 181, 200, 0.22) 100%);

  --f-display: "Big Shoulders Display", "Big Shoulders", Impact, "Arial Narrow", sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-body: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 64px);
  --max: 1440px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--abyss);
  color: var(--foam);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-loading { overflow: hidden; }
img, video, 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; }
::selection { background: var(--accent); color: var(--abyss); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; }
.flare { color: var(--accent); }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 300; background: var(--accent); color: var(--abyss); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- fixed atmosphere ---------- */

.backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 108%, rgba(2, 210, 249, 0.13), transparent 55%),
    radial-gradient(90% 60% at 80% -10%, rgba(40, 90, 150, 0.28), transparent 60%),
    linear-gradient(180deg, var(--abyss) 0%, var(--deep) 55%, var(--abyss) 100%);
}
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(1, 3, 7, 0.72) 100%);
}
.grain {
  position: fixed; inset: -100%; z-index: 3; pointer-events: none; opacity: 0.075;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(4%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}
.letterbox { position: fixed; left: 0; right: 0; height: 9vh; background: #000; z-index: 45; pointer-events: none; transform: scaleY(0); }
.letterbox--top { top: 0; transform-origin: top; }
.letterbox--bottom { bottom: 0; transform-origin: bottom; }
.no-webgl .backdrop {
  background:
    radial-gradient(60% 40% at 70% 45%, rgba(120, 170, 230, 0.18), transparent 70%),
    radial-gradient(120% 70% at 50% 108%, rgba(2, 210, 249, 0.16), transparent 55%),
    linear-gradient(180deg, var(--abyss) 0%, var(--deep) 55%, var(--abyss) 100%);
}

/* ---------- preloader ---------- */

.preloader {
  position: fixed; inset: 0; z-index: 200; background: var(--abyss);
  display: grid; place-items: center; overflow: hidden;
}
.preloader__inner { width: min(560px, 86vw); }
.preloader__top, .preloader__bottom { display: flex; justify-content: space-between; color: var(--dim); }
.preloader__name {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase; line-height: 0.85;
  font-size: clamp(56px, 11vw, 120px); margin: 18px 0; letter-spacing: -0.01em; overflow: hidden;
}
.preloader__name span { display: inline-block; }
.preloader__bar { height: 2px; background: var(--line); position: relative; overflow: hidden; margin-bottom: 12px; }
.preloader__bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 18px var(--accent-glow); }
.preloader__count { font-variant-numeric: tabular-nums; color: var(--foam); }

/* ---------- navigation ---------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  transition: transform 0.6s var(--ease-out), background 0.4s;
}
@media (min-width: 1025px) {
  .nav { display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav > .motion-toggle { justify-self: start; }
  .nav__right { justify-self: end; }
}
.nav.is-hidden { transform: translateY(-110%); }
.nav.is-solid { background: linear-gradient(180deg, rgba(3, 7, 13, 0.85), rgba(3, 7, 13, 0)); }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { color: var(--mist); position: relative; padding: 6px 0; transition: color 0.3s; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--foam); }
.nav__links a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); }
.nav__right { display: flex; align-items: center; gap: 14px; }
.motion-toggle {
  display: inline-flex; align-items: center; gap: 8px; color: var(--mist); padding: 9px 12px; border: 1px solid var(--line); border-radius: 99px;
  transition: border-color 0.3s, color 0.3s;
}
.motion-toggle:hover { color: var(--foam); border-color: var(--line-2); }
.motion-toggle i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.motion-toggle[aria-pressed="true"] i { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.nav__burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; place-items: center; }
.nav__burger span { display: block; width: 16px; height: 1.5px; background: var(--foam); box-shadow: 0 5px 0 var(--foam); transform: translateY(-2.5px); }

/* ---------- buttons ---------- */

.btn {
  --bg: var(--accent-grad); --fg: #021226;
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 17px 26px; border-radius: 99px; background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: 16px; letter-spacing: 0.01em; overflow: hidden; isolation: isolate;
  box-shadow: 0 0 0 0 var(--accent-glow), 0 10px 40px -12px var(--accent-glow);
  transition: box-shadow 0.4s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent-hi);
  transform: translateY(101%); border-radius: inherit; transition: transform 0.5s var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { box-shadow: 0 0 0 6px var(--accent-soft), 0 16px 50px -10px var(--accent-glow); }
.btn__arrow { width: 18px; height: 18px; transition: transform 0.4s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px) rotate(-45deg); }
.btn--ghost { --bg: transparent; --fg: var(--foam); border: 1px solid var(--line-2); box-shadow: none; }
.btn--ghost::before { background: rgba(233, 240, 246, 0.08); }
.btn--ghost:hover { box-shadow: none; border-color: var(--foam); }
.btn--small { padding: 12px 18px; font-size: 14px; }

/* ---------- custom cursor ---------- */

.cursor { position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; opacity: 0; transition: opacity 0.4s; }
.has-cursor .cursor.is-ready { opacity: 1; }
.cursor__ring {
  position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  border: 1px solid rgba(155, 244, 251, 0.7); transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), margin 0.35s var(--ease-out), background 0.35s, border-color 0.35s;
  display: grid; place-items: center;
}
.cursor__label { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--abyss); opacity: 0; transition: opacity 0.2s; text-transform: uppercase; }
.cursor.is-link .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(2, 210, 249, 0.12); border-color: var(--accent); }
.cursor.is-label .cursor__ring { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--accent); border-color: var(--accent); }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor__dot { position: absolute; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--accent-hi); }

/* ---------- HUD ---------- */

.hud-speed {
  position: fixed; left: var(--gutter); bottom: 22px; z-index: 30; color: var(--dim);
  display: flex; gap: 18px; pointer-events: none;
}
.hud-speed b { color: var(--foam); font-weight: 500; font-variant-numeric: tabular-nums; }
.hud-speed { transition: opacity 0.4s; }
/* The gauge and the speed readout fade in by CSS when the loading screen lifts (GSAP must not animate them too). */
.is-loading .gauge, .is-loading .hud-speed { opacity: 0; }
.hud-speed.is-hidden { opacity: 0; pointer-events: none; }
/* ---------- the scroll gauge: a voyage instead of a scrollbar ---------- */

html { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }
.gauge { position: fixed; right: 10px; top: 12vh; bottom: 12vh; width: 190px; z-index: 35; pointer-events: none; transition: opacity 0.5s; }
.gauge__window {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 76%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 76%, transparent 100%);
}
.gauge__route { position: absolute; right: 18px; top: 0; width: 2px; border-radius: 2px; background: var(--line-2); pointer-events: auto; cursor: grab; }
.gauge__route::before { content: ""; position: absolute; inset: 0 -12px; }
.gauge__wake { position: absolute; left: 0; top: 0; width: 100%; border-radius: inherit; background: linear-gradient(180deg, rgba(0, 67, 212, 0.2), #017ef9 60%, #04eafa); box-shadow: 0 0 10px var(--accent-glow); }
.gauge__tick { position: absolute; left: -5px; width: 12px; height: 2px; margin-top: -1px; padding: 0; border-radius: 2px; background: var(--line-2); pointer-events: auto; transition: background 0.3s, width 0.3s, left 0.3s; }
.gauge__tick::before { content: ""; position: absolute; inset: -7px -6px; }
.gauge__tick span { position: absolute; right: 20px; top: 50%; transform: translate(6px, -50%); white-space: nowrap; color: var(--mist); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.3s var(--ease-out); }
.gauge__tick:hover { background: var(--foam); width: 16px; left: -7px; }
.gauge__tick:hover span { opacity: 1; transform: translate(0, -50%); }
.gauge__tick.is-passed { background: var(--accent); }
.gauge__ship { position: absolute; right: 11px; top: 50%; width: 16px; height: 30px; margin-top: -15px; pointer-events: auto; cursor: grab; touch-action: none; filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 16px var(--accent-glow)); }
.gauge__ship svg { width: 100%; height: 100%; display: block; overflow: visible; }
.gauge__ship .hull { fill: var(--accent-hi); }
.gauge__ship .deck { fill: rgba(3, 7, 13, 0.55); }
.gauge__ship .bridge { fill: #fff; }
.gauge.is-dragging .gauge__ship, .gauge.is-dragging .gauge__route { cursor: grabbing; }
.gauge__read { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; gap: 3px; pointer-events: none; }
.gauge__pct { font-size: 13px; font-weight: 500; color: var(--foam); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(3, 7, 13, 0.9); }
.gauge__label { color: var(--mist); white-space: nowrap; opacity: 0; transform: translateX(6px); transition: opacity 0.3s, transform 0.4s var(--ease-out); text-shadow: 0 0 12px rgba(3, 7, 13, 0.9); }
.gauge.is-scrolling .gauge__label, .gauge.is-dragging .gauge__label, .gauge__ship:hover .gauge__label { opacity: 1; transform: none; }
.gauge:hover .gauge__tick span { opacity: 0.55; transform: translate(0, -50%); }
.gauge:hover .gauge__tick:hover span { opacity: 1; }

/* ---------- shared section bits ---------- */

main { position: relative; z-index: 10; }
.kicker { display: inline-flex; align-items: center; gap: 12px; color: var(--mist); }
.kicker::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.h2 {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase; line-height: 0.88;
  font-size: clamp(48px, 7.2vw, 120px); letter-spacing: -0.005em; margin: 18px 0 0;
}
.h2 .serif { text-transform: none; font-size: 0.92em; color: var(--accent-hi); }
.lead { font-size: clamp(21px, 2.15vw, 33px); line-height: 1.32; letter-spacing: -0.01em; font-weight: 500; max-width: 26ch; margin: 0; }
.lead .w { opacity: 0.16; transition: none; }
.motion-off .lead .w { opacity: 1; }
.body-text { color: var(--mist); max-width: 52ch; }

.mask { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.mask > span { display: inline-block; }
.char { display: inline-block; }
.word { display: inline-block; white-space: nowrap; }
/* No lonely last words: headings and short lines break into even lines. */
.lead, .lesson__text, .h2, .manifesto__text, .contact__sub, .svc__promise, .finale__line, .prologue__line, .body-text { text-wrap: balance; }

/* ---------- hero ---------- */

.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 120px 0 150px; overflow-x: clip; }
.hero__kicker { margin-bottom: 26px; }
.hero__name {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase; line-height: 0.8;
  font-size: clamp(76px, 16.2vw, 300px); letter-spacing: -0.015em; margin: 0;
}
.hero__name .line { display: block; overflow: hidden; padding-top: 0.04em; }
.hero__name.is-open .line { overflow: visible; }
.hero__name .line--2 { padding-left: 0.12em; color: rgba(233, 240, 246, 0.6); }
.hero__name .line--2 .char, .contact__title .o, .p-hero__title .line--2 .char {
  color: transparent; background: var(--fade-text); -webkit-background-clip: text; background-clip: text;
  padding-block: 0.1em; margin-block: -0.1em;
}
.flare-dot {
  display: inline-block; width: 0.15em; height: 0.15em; margin-left: 0.05em; border-radius: 50%; background: var(--accent-hi);
  box-shadow: 0 0 0.12em var(--accent), 0 0 0.45em var(--accent), 0 0 1.1em var(--accent-glow); animation: flare 2.6s ease-in-out infinite;
}
@keyframes flare { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: 0.82; transform: scale(0.88); } 50% { opacity: 1; transform: scale(1.08); } }
.motion-off .flare-dot { animation: none; }
.hero__foot { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 32px; align-items: end; margin-top: 40px; }
.hero__sub, .hero__quote, .hero__kicker { text-shadow: 0 1px 14px rgba(3, 7, 13, 0.9), 0 0 2px rgba(3, 7, 13, 0.8); }
.hero__sub { font-size: clamp(18px, 1.5vw, 22px); color: var(--mist); max-width: 34ch; margin: 0; }
.hero__sub b { color: var(--foam); font-weight: 500; }
.hero__quote { font-family: var(--f-serif); font-style: italic; font-size: clamp(22px, 2vw, 30px); line-height: 1.2; max-width: 22ch; margin: 0; color: var(--foam); }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.hero__scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--dim); }
.hero__scroll i { width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent); animation: drip 2.2s var(--ease-io) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- prologue: trailer title cards ---------- */

.prologue { position: relative; height: 340vh; }
.prologue__stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; text-align: center; padding: 0 var(--gutter); }
.prologue__line {
  grid-area: 1 / 1; margin: 0; font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: clamp(38px, 6.4vw, 104px); line-height: 1.02; max-width: 16ch; opacity: 0;
}
.prologue__line em { font-style: normal; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; letter-spacing: -0.005em; color: var(--accent); }
.motion-off .prologue { height: auto; }
.motion-off .prologue__stage { position: relative; height: auto; padding: 18vh var(--gutter); gap: 6vh; grid-auto-flow: row; }
.motion-off .prologue__line { grid-area: auto; opacity: 1; }

/* ---------- marquee ---------- */

.marquee { position: relative; overflow: hidden; padding: 26px 0; border-block: 1px solid var(--line); background: rgba(3, 7, 13, 0.4); backdrop-filter: blur(4px); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__item {
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(40px, 6vw, 92px); line-height: 1;
  display: flex; align-items: center; gap: 0.4em; padding-right: 0.4em; white-space: nowrap;
}
.marquee__item .o { color: transparent; background: var(--fade-mist); -webkit-background-clip: text; background-clip: text; padding-block: 0.1em; }
.marquee__item svg { width: 0.42em; height: 0.42em; color: var(--accent); flex: none; }

/* ---------- chapters ---------- */

.chapter { position: relative; }
.ch-head-wrap { position: relative; height: 210vh; }
.ch-head { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: flex-end; padding: 0 var(--gutter) 13vh; }
.ch-num {
  position: absolute; top: 50%; margin-top: -0.375em; font-family: var(--f-display); font-weight: 900; line-height: 0.75;
  font-size: clamp(260px, 48vw, 820px); color: rgba(150, 190, 230, 0.07); letter-spacing: -0.04em;
  pointer-events: none; user-select: none;
}
.chapter[data-side="right"] .ch-num { right: -2vw; }
.chapter[data-side="left"] .ch-num { left: -2vw; }
.ch-head__text { position: relative; width: 100%; max-width: var(--max); margin: 0 auto; }
.chapter[data-side="left"] .ch-head__text { text-align: right; }
.ch-kicker { display: flex; gap: 18px; color: var(--mist); margin-bottom: 14px; }
.chapter[data-side="left"] .ch-kicker { justify-content: flex-end; }
.ch-kicker b { color: var(--accent); font-weight: 500; }
.ch-title {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase; line-height: 0.8; margin: 0;
  font-size: clamp(80px, 15vw, 264px); letter-spacing: -0.01em;
}
.ch-title .line { display: block; overflow: hidden; padding-top: 0.05em; }
@media (min-width: 721px) { .ch-title .line { white-space: nowrap; } }
.ch-hud { display: flex; gap: 26px; color: var(--dim); margin-top: 22px; flex-wrap: wrap; }
.chapter[data-side="left"] .ch-hud { justify-content: flex-end; }
.ch-hud span b { color: var(--foam); font-weight: 500; }

.ch-body { position: relative; padding: 4vh 0 14vh; }
.ch-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.ch-copy { grid-column: 1 / span 6; display: flex; flex-direction: column; gap: 56px; }
.chapter[data-side="left"] .ch-copy { grid-column: 7 / span 6; }
.lesson { display: flex; flex-direction: column; gap: 10px; padding-top: 26px; border-top: 1px solid var(--line); max-width: 520px; }
.lesson__tag { color: var(--accent); }
.lesson__text { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(30px, 3.4vw, 52px); line-height: 0.95; margin: 0; }

.photo {
  position: relative; aspect-ratio: 4 / 5; width: min(360px, 100%); border-radius: 18px; overflow: hidden;
  border: 1px dashed var(--line-2); background: repeating-linear-gradient(135deg, rgba(150, 190, 230, 0.05) 0 12px, transparent 12px 24px), var(--sea);
  display: grid; place-items: center; text-align: center; color: var(--mist); padding: 20px;
}
.photo--wide { aspect-ratio: 16 / 10; width: min(520px, 100%); }
.photo__label { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.photo__label svg { width: 30px; height: 30px; color: var(--accent); }
.photo img { position: absolute; inset: 0; width: 100%; height: 120%; object-fit: cover; }

/* sea: the photo is screened like a security ID - a scan line turns it from cold blue to full colour */
.scan { --p: 0; --lo: 0; position: relative; margin: 0; width: min(400px, 100%); aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: var(--sea); isolation: isolate; border: 1px solid var(--line-2); }
.scan img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan__base { filter: grayscale(1) sepia(1) hue-rotate(175deg) saturate(1.5) brightness(0.55) contrast(1.15); }
.scan__color { z-index: 1; clip-path: inset(0 0 calc((1 - var(--p)) * 100%) 0); }
.scan__line { position: absolute; left: 0; right: 0; top: calc(var(--p) * 100%); height: 2px; margin-top: -1px; z-index: 2; opacity: var(--lo); background: var(--accent-hi); box-shadow: 0 0 12px var(--accent), 0 0 40px 6px var(--accent-glow); }
.scan__line::before { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 70px; background: linear-gradient(to top, rgba(2, 210, 249, 0.28), transparent); }
.scan__corners {
  position: absolute; inset: 14px; z-index: 3; pointer-events: none; --c: var(--accent);
  background:
    linear-gradient(var(--c), var(--c)) top left / 24px 2px no-repeat, linear-gradient(var(--c), var(--c)) top left / 2px 24px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 24px 2px no-repeat, linear-gradient(var(--c), var(--c)) top right / 2px 24px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 24px 2px no-repeat, linear-gradient(var(--c), var(--c)) bottom left / 2px 24px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 24px 2px no-repeat, linear-gradient(var(--c), var(--c)) bottom right / 2px 24px no-repeat;
}
.scan__status { position: absolute; left: 26px; top: 26px; z-index: 3; color: var(--accent-hi); padding: 6px 10px; border-radius: 6px; background: rgba(3, 7, 13, 0.6); transition: opacity 0.4s; animation: flicker 1.2s steps(2) infinite; }
.scan__tag {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px;
  border-radius: 12px; background: rgba(3, 7, 13, 0.74); backdrop-filter: blur(8px); border: 1px solid rgba(2, 210, 249, 0.4); color: var(--foam);
  opacity: 0; transform: translateY(14px); transition: opacity 0.5s, transform 0.6s var(--ease-out);
}
.scan__tag b { color: #8fe3b0; font-weight: 500; }
.scan.is-done .scan__tag { opacity: 1; transform: none; }
.scan.is-done .scan__status { opacity: 0; }
.scan--small { width: min(240px, 100%); margin-top: 34px; }
.scan--wide { aspect-ratio: 4 / 3; width: min(560px, 100%); }
.motion-off .scan { --p: 1; }
.motion-off .scan__line, .motion-off .scan__status { display: none; }
.motion-off .scan__tag { opacity: 1; transform: none; transition: none; }

/* game: character stats */
.stats { width: min(460px, 100%); border: 1px solid var(--line-2); border-radius: 16px; padding: 22px 22px 18px; background: rgba(6, 17, 32, 0.6); backdrop-filter: blur(8px); }
.stats__head { display: flex; justify-content: space-between; color: var(--mist); margin-bottom: 18px; }
.stats__head b { color: var(--accent-hi); font-weight: 500; }
.stat { display: grid; grid-template-columns: 112px 1fr 46px; gap: 14px; align-items: center; padding: 8px 0; }
.stat__bar { height: 8px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 calc(10% - 3px), transparent calc(10% - 3px) 10%); position: relative; overflow: hidden; }
.stat__bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--v, 0)); background: repeating-linear-gradient(90deg, var(--accent) 0 calc(10% - 3px), transparent calc(10% - 3px) 10%); }
.stat__val { text-align: right; color: var(--foam); }
.stat--sleep .stat__val { color: var(--accent); animation: flicker 1.4s steps(2) infinite; }
@keyframes flicker { 50% { opacity: 0.3; } }

/* chess: the board */
.board { width: min(400px, 100%); aspect-ratio: 1; display: grid; grid-template-columns: repeat(8, 1fr); border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; perspective: 900px; }
.board i { background: rgba(10, 26, 44, 0.75); transform-style: preserve-3d; position: relative; }
.board i.d { background: rgba(150, 190, 230, 0.1); }
.board i.hl { background: rgba(2, 210, 249, 0.55); box-shadow: inset 0 0 18px rgba(155, 244, 251, 0.6); }
.board i.mv { background: rgba(2, 210, 249, 0.18); }
.board i.mv::after { content: ""; position: absolute; inset: 38%; border-radius: 50%; background: var(--accent-hi); }
.notation { overflow: hidden; width: min(520px, 100%); border-block: 1px solid var(--line); padding: 12px 0; color: var(--mist); white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.notation__track { display: inline-flex; gap: 22px; animation: ticker 28s linear infinite; }
.notation b { color: var(--accent-hi); font-weight: 500; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* office: clock + task list */
.desk { display: flex; gap: 36px; align-items: center; flex-wrap: wrap; }
.clock { width: 150px; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line-2); position: relative; flex: none;
  background: repeating-conic-gradient(from -1deg, var(--line-2) 0 2deg, transparent 2deg 30deg); }
.clock::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--deep); }
.clock i { position: absolute; left: 50%; bottom: 50%; width: 2px; margin-left: -1px; transform-origin: bottom; z-index: 1; border-radius: 2px; }
.clock .h { height: 30%; background: var(--foam); }
.clock .m { height: 40%; background: var(--accent); width: 1.5px; }
.clock b { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--accent); z-index: 2; }
.tasks { list-style: none; margin: 0; padding: 0; min-width: 260px; flex: 1; max-width: 380px; }
.tasks li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--mist); position: relative; }
.tasks li::before { content: ""; width: 14px; height: 14px; border: 1px solid var(--line-2); border-radius: 3px; flex: none; }
.tasks li s { text-decoration: none; position: relative; }
.tasks li s::after { content: ""; position: absolute; left: -2px; right: -2px; top: 54%; height: 1.5px; background: var(--accent); transform-origin: left; transform: scaleX(var(--strike, 0)); }
.tasks__repeat { color: var(--accent); margin-left: auto; }

/* ai: terminal */
.terminal { width: min(560px, 100%); border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: rgba(3, 7, 13, 0.82); backdrop-filter: blur(8px); box-shadow: 0 30px 80px -30px rgba(2, 210, 249, 0.35); }
.terminal__bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--dim); }
.terminal__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.terminal__bar i:first-child { background: var(--accent); }
.terminal__bar span { margin-left: 10px; }
.terminal__body { padding: 20px 18px 24px; font-family: var(--f-mono); font-size: 14px; line-height: 1.75; min-height: 210px; color: var(--mist); }
.terminal__body .p { color: var(--accent-hi); }
.terminal__body .ok { color: #8fe3b0; }
.terminal__body .you { color: var(--foam); }
.caret { display: inline-block; width: 8px; height: 1.1em; background: var(--accent); vertical-align: -0.2em; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- manifesto ---------- */

.manifesto { padding: 26vh 0; text-align: center; }
.manifesto__text { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(46px, 7.6vw, 132px); line-height: 0.9; margin: 22px auto 0; max-width: 14ch; }
.manifesto__text .serif { text-transform: none; color: var(--accent-hi); font-size: 1.02em; }
.manifesto__text .w { opacity: 0.12; }
.motion-off .manifesto__text .w { opacity: 1; }

/* ---------- services ---------- */

.services { padding: 8vh 0 14vh; }
.services__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 8vh; flex-wrap: wrap; }
.services__head .body-text { margin: 0; }
.svc-stack { display: flex; flex-direction: column; gap: 6vh; }
.svc {
  position: sticky; top: calc(96px + var(--i) * 22px);
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; min-height: min(560px, 74vh);
  padding: clamp(24px, 3.4vw, 52px); border-radius: 28px; overflow: hidden;
  background: linear-gradient(160deg, rgba(14, 34, 56, 0.96), rgba(6, 17, 32, 0.98));
  border: 1px solid var(--line-2); box-shadow: 0 -30px 80px -40px rgba(0, 0, 0, 0.9);
  transform-origin: 50% 0;
}
.svc__top { display: flex; justify-content: space-between; color: var(--mist); }
.svc__left { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.svc__title { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(54px, 7vw, 116px); line-height: 0.85; margin: 14px 0 0; }
.svc__promise { font-family: var(--f-serif); font-style: italic; font-size: clamp(24px, 2.4vw, 36px); line-height: 1.1; margin: 16px 0 0; color: var(--accent-hi); }
.svc__desc { color: var(--mist); margin: 0; max-width: 44ch; }
.svc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.svc__list li { padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 14px; color: var(--foam); }
.svc__foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.svc__price { color: var(--mist); }
.svc__price b { font-family: var(--f-display); font-weight: 800; font-size: 40px; color: var(--foam); letter-spacing: 0; margin-left: 6px; vertical-align: -4px; }
.svc__visual { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--abyss); min-height: 300px; }
.svc__tag { position: absolute; left: 16px; bottom: 16px; z-index: 2; padding: 8px 12px; border-radius: 99px; background: var(--accent); color: var(--abyss); font-weight: 600; font-size: 13px; }

/* visual: a website building itself */
.mock { position: absolute; inset: 0; display: flex; flex-direction: column; }
.mock__bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.mock__bar span { margin-left: 12px; flex: 1; max-width: 220px; height: 9px; border-radius: 9px; background: var(--line); }
.mock__page { flex: 1; padding: 22px; display: grid; grid-template-rows: auto auto 1fr; gap: 14px; }
.mock__h { height: 52px; width: 76%; border-radius: 6px; background: linear-gradient(90deg, var(--foam), rgba(233, 240, 246, 0.4)); animation: build 5s var(--ease-out) infinite; transform-origin: left; }
.mock__p { height: 10px; width: 52%; border-radius: 10px; background: var(--line-2); box-shadow: 0 18px 0 var(--line), 0 36px 0 var(--line); animation: build 5s 0.3s var(--ease-out) infinite; transform-origin: left; }
.mock__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-self: end; }
.mock__cards i { height: 110px; border-radius: 10px; border: 1px solid var(--line-2); background: linear-gradient(160deg, rgba(2, 210, 249, 0.25), transparent 70%); animation: rise 5s var(--ease-out) infinite; }
.mock__cards i:nth-child(2) { animation-delay: 0.15s; } .mock__cards i:nth-child(3) { animation-delay: 0.3s; }
@keyframes build { 0%, 8% { transform: scaleX(0); } 30%, 88% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes rise { 0%, 20% { transform: translateY(30px); opacity: 0; } 45%, 88% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.svc__visual video, .svc__visual img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc__visual--video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3, 7, 13, 0.6), transparent 40%); }
/* visual: automation flow */
.flow { position: absolute; inset: 0; }
.flow svg { width: 100%; height: 100%; }
.flow .path { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.flow .pulse { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 22 400; animation: flowdash 3s linear infinite; filter: drop-shadow(0 0 6px var(--accent)); }
.flow .pulse.b { animation-delay: 1s; } .flow .pulse.c { animation-delay: 2s; }
@keyframes flowdash { from { stroke-dashoffset: 422; } to { stroke-dashoffset: 0; } }
.flow .node rect { fill: rgba(10, 26, 44, 0.95); stroke: var(--line-2); }
.flow .node text { fill: var(--foam); font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; }
.flow .node.hot rect { stroke: var(--accent); fill: rgba(2, 210, 249, 0.14); }

/* ---------- work: sideways ride ---------- */

.work { position: relative; }
.work__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.work__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 4vh; }
.work__head .h2 { font-size: clamp(42px, 5.4vw, 92px); }
.work__count { color: var(--mist); }
.work__count b { color: var(--foam); font-weight: 500; }
.work__track { display: flex; gap: 3vw; padding: 0 var(--gutter); width: max-content; will-change: transform; }
.work-card { width: min(48vw, 760px, calc((100vh - 440px) * 16 / 9)); min-width: min(420px, 84vw); flex: none; display: flex; flex-direction: column; gap: 18px; }
.work-card__media { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-2); background: var(--sea); }
.work-card__media video, .work-card__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.2s var(--ease-out); }
.work-card:hover .work-card__media video, .work-card:hover .work-card__media img { transform: scale(1); }
.work-card__play {
  position: absolute; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 99px;
  background: rgba(3, 7, 13, 0.7); backdrop-filter: blur(8px); border: 1px solid var(--line-2); font-weight: 600; font-size: 14px;
}
.work-card__play svg { width: 14px; height: 14px; color: var(--accent); }
.work-card__meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.work-card__title { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(34px, 3.4vw, 58px); line-height: 0.9; margin: 0; overflow-wrap: anywhere; }
.work-card__title .serif { text-transform: none; color: var(--accent-hi); font-size: 0.6em; display: block; margin-top: 6px; }
.work-card__desc { color: var(--mist); margin: 0; max-width: 40ch; font-size: 16px; }
.work-card__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.work-card__tags span { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 13px; color: var(--mist); }
.work-card--end { width: min(42vw, 600px); justify-content: center; align-items: flex-start; gap: 26px; padding: 40px; border: 1px dashed var(--line-2); border-radius: 22px; aspect-ratio: auto; }
.work-card--end h3 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(44px, 5vw, 84px); line-height: 0.88; margin: 0; }
.work__progress { position: relative; flex: none; margin: 5vh var(--gutter) 0; height: 1px; background: var(--line); }
.work__progress i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.site-shot { position: absolute; inset: 0; overflow: hidden; background: #0b0a08; }
.site-shot img { position: absolute; left: 0; top: 0; width: 100%; height: auto; transform: none; }
.work-card:hover .site-shot img { transform: none; }

/* ---------- how: the route ---------- */

.how { padding: 16vh 0 10vh; position: relative; }
.how__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.how__head .scan--small { margin: 0; flex: none; }
.route { position: relative; margin-top: 8vh; }
.route svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.route .track { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 3 9; }
.route .drawn { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 6px var(--accent-glow)); }
.steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { position: relative; padding-top: 70px; }
.step:nth-child(even) { margin-top: 120px; }
.step__dot { position: absolute; top: 18px; left: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--abyss); display: grid; place-items: center; transition: border-color 0.4s, background 0.4s, box-shadow 0.4s; }
.step__dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); transition: background 0.4s; }
.step.is-lit .step__dot { border-color: var(--accent); background: rgba(2, 210, 249, 0.15); box-shadow: 0 0 0 8px rgba(2, 210, 249, 0.08); }
.step.is-lit .step__dot::after { background: var(--accent); }
.step__n { color: var(--accent-hi); }
.step h3 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(34px, 3vw, 50px); line-height: 0.92; margin: 10px 0 12px; }
.step p { color: var(--mist); margin: 0; font-size: 16px; max-width: 30ch; }
.for { margin-top: 18vh; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.for__card { padding: clamp(24px, 3vw, 44px); border-radius: 24px; border: 1px solid var(--line-2); background: linear-gradient(160deg, rgba(14, 34, 56, 0.7), rgba(6, 17, 32, 0.5)); backdrop-filter: blur(6px); }
.for__card h3 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(36px, 3.6vw, 58px); line-height: 0.9; margin: 16px 0 14px; }
.for__card p { color: var(--mist); margin: 0; max-width: 42ch; }

/* ---------- finale: the particles spell YOU ---------- */

.finale { position: relative; height: 190vh; }
.finale__stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 14px; padding: 0 var(--gutter) 12vh; text-align: center; }
.finale__line { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(40px, 5.4vw, 92px); line-height: 0.9; margin: 0; }
.finale__line .serif { text-transform: none; color: var(--accent-hi); }
.motion-off .finale { height: auto; }
.motion-off .finale__stage { position: relative; height: 70vh; }

/* ---------- contact ---------- */

.contact { position: relative; padding: 18vh 0 14vh; min-height: 100vh; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: start; }
.contact__title { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; line-height: 0.82; font-size: clamp(64px, 9vw, 160px); margin: 18px 0 22px; }

.contact__sub { color: var(--mist); font-size: 19px; max-width: 38ch; margin: 0 0 38px; }
.contact__promise { display: flex; flex-direction: column; gap: 10px; color: var(--mist); margin-top: 30px; }
.contact__promise span { display: flex; gap: 10px; align-items: center; }
.contact__promise svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* ---------- the chat (replaces the form) ---------- */

.chat {
  display: flex; flex-direction: column; height: min(560px, 72vh); border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line-2); background: rgba(6, 17, 32, 0.86); backdrop-filter: blur(14px);
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9);
}
.chat__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.chat__avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--accent-hi); border: 1px solid var(--line-2); background: radial-gradient(circle, rgba(2, 210, 249, 0.18), transparent 70%); }
.chat__avatar svg { width: 11px; height: 21px; filter: drop-shadow(0 0 6px var(--accent)); }
.chat__who { display: flex; flex-direction: column; line-height: 1.3; flex: 1; }
.chat__who b { font-weight: 600; }
.chat__who span { color: var(--mist); }
.chat__close { display: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--mist); }
.chat__close:hover { color: var(--foam); border-color: var(--foam); }
.chat.is-floating .chat__close { display: grid; place-items: center; }
.chat__plan { display: flex; gap: 10px; align-items: center; margin: 0; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.chat__plan[hidden] { display: none; }
.chat__plan span { color: var(--accent-hi); }
.chat__plan b { font-weight: 600; }
.chat__log { flex: 1; overflow-y: auto; padding: 20px 18px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; scrollbar-width: thin; }
.msg { margin: 0; max-width: 86%; padding: 12px 15px; border-radius: 18px; font-size: 16px; line-height: 1.45; animation: msg-in 0.45s var(--ease-out); overflow-wrap: anywhere; }
.msg--bot { align-self: flex-start; background: var(--sea-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg--me { align-self: flex-end; background: var(--accent-grad); color: #021226; font-weight: 500; border-bottom-right-radius: 6px; }
.msg--note { align-self: stretch; max-width: none; font-size: 14px; color: var(--mist); background: transparent; border: 1px dashed var(--line-2); }
.msg--typing { display: inline-flex; gap: 5px; padding: 15px 16px; }
.msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--mist); animation: typing 1s infinite ease-in-out; }
.msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.msg--typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.chat__chips { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-end; justify-content: flex-end; animation: msg-in 0.45s var(--ease-out); }
.chat__chip { padding: 11px 16px; border-radius: 99px; border: 1px solid var(--accent); color: var(--accent-hi); font-size: 15px; transition: background 0.25s, color 0.25s; }
.chat__chip:hover, .chat__chip:focus-visible { background: var(--accent); color: var(--abyss); }
.chat__chips--skip .chat__chip { border-color: var(--line-2); color: var(--mist); }
.chat__form { display: flex; gap: 10px; align-items: center; padding: 14px; border-top: 1px solid var(--line); position: relative; }
.chat__form[hidden] { display: none; }
.chat__input { flex: 1; min-width: 0; padding: 14px 16px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(3, 7, 13, 0.6); color: var(--foam); font: inherit; font-size: 16px; }
.chat__input::placeholder { color: var(--dim); }
.chat__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chat__send { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-grad); color: #021226; box-shadow: 0 8px 30px -10px var(--accent-glow); }
.chat__send svg { width: 20px; height: 20px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.motion-off .msg, .motion-off .chat__chips { animation: none; }

/* floating panel, opened from the bar */
.chat-float { position: fixed; z-index: 120; left: 50%; bottom: 22px; width: min(400px, calc(100vw - 24px)); transform: translateX(-50%); }
.chat-float[hidden] { display: none; }
.chat.is-floating { height: min(560px, calc(100vh - 120px)); }

/* the bar at the bottom of the screen */
.dock { position: fixed; z-index: 70; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: opacity 0.4s, transform 0.5s var(--ease-out); }
.dock.is-away { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; }
.dock__btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px 14px 16px; border-radius: 99px; font-weight: 600; font-size: 16px;
  color: var(--foam); background: rgba(3, 7, 13, 0.82); backdrop-filter: blur(12px); border: 1px solid var(--line-2);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(2, 210, 249, 0.08);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.dock__btn:hover { border-color: var(--accent); box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.9), 0 0 30px -6px var(--accent-glow); }
.dock__btn svg { width: 18px; height: 18px; color: var(--accent-hi); }
.dock__drop { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 10px var(--accent), 0 0 22px var(--accent-glow); animation: flare 2.6s ease-in-out infinite; }
.dock__toast {
  margin: 0; display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 16px; border-radius: 99px; font-size: 14px; color: var(--mist);
  background: rgba(14, 34, 56, 0.9); backdrop-filter: blur(10px); border: 1px solid var(--line-2);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 0.4s, transform 0.5s var(--ease-out);
}
.dock__toast.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.dock__toast button { padding: 7px 14px; border-radius: 99px; background: var(--foam); color: var(--abyss); font-weight: 600; font-size: 13px; }
.motion-off .dock__drop { animation: none; }

/* ---------- footer ---------- */

.footer { position: relative; z-index: 10; padding: 10vh 0 30px; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(3, 7, 13, 0.9)); overflow: hidden; }
.footer__big { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(54px, 11.4vw, 230px); line-height: 0.8; letter-spacing: -0.015em; margin: 0 0 6vh; white-space: nowrap; overflow: hidden; padding-top: 0.06em; }
.footer__row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; color: var(--dim); }
.footer__links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer__links a { color: var(--mist); }
.footer__links a:hover { color: var(--foam); }
.to-top { display: inline-flex; align-items: center; gap: 10px; color: var(--foam); }
.to-top svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------- video modal ---------- */

.modal { position: fixed; inset: 0; z-index: 180; display: none; place-items: center; padding: var(--gutter); background: rgba(1, 3, 7, 0.9); backdrop-filter: blur(10px); }
.modal.is-open { display: grid; }
.modal__box { width: min(1200px, 100%); }
.modal video { width: 100%; border-radius: 16px; border: 1px solid var(--line-2); background: #000; max-height: 80vh; }
.modal__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; color: var(--mist); }
.modal__close { display: inline-flex; gap: 10px; align-items: center; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 99px; }

/* ---------- motion off: everything readable, nothing moving ---------- */

.motion-off .grain { animation: none; }
.motion-off .hero__scroll i, .motion-off .notation__track,
.motion-off .mock__h, .motion-off .mock__p, .motion-off .mock__cards i, .motion-off .flow .pulse, .motion-off .stat--sleep .stat__val { animation: none; }
.motion-off .ch-head-wrap { height: auto; }
.motion-off .ch-head { position: relative; height: auto; min-height: 80vh; }
.motion-off .work { height: auto !important; }
.motion-off .work__pin { position: relative; height: auto; padding: 14vh 0; }
.motion-off .work__track { width: auto; flex-direction: column; gap: 60px; }
.motion-off .work-card, .motion-off .work-card--end { width: 100%; max-width: 900px; }
.motion-off .svc { position: relative; top: auto; }
.motion-off .stat__bar i { transform: scaleX(var(--to)); }
.motion-off .tasks li s::after { transform: scaleX(1); }

/* ---------- tablets and phones ---------- */

@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  .nav.menu-open .nav__links {
    display: flex; position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 20px; background: rgba(3, 7, 13, 0.97); z-index: -1;
  }
  .nav.menu-open .nav__links a { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: 54px; letter-spacing: 0; color: var(--foam); }
  .hero__foot { grid-template-columns: 1fr; gap: 22px; }
  .hero__cta { justify-content: flex-start; }
  .svc { grid-template-columns: 1fr; min-height: 0; }
  .svc__visual { min-height: 240px; order: -1; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .step:nth-child(even) { margin-top: 0; }
  .route svg { display: none; }
  .contact__grid { grid-template-columns: 1fr; }
  .work-card { width: 80vw; }
  .work-card--end { width: 70vw; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { padding: 14px var(--gutter); }
  .motion-toggle span { display: none; }
  .nav__right .btn { display: none; }
  .hero { padding: 100px 0 96px; }
  .hero__name { font-size: clamp(64px, 21vw, 140px); }
  .hero__name .line--2 { padding-left: 0; }
  .hud-speed { display: none; }
  .dock { bottom: 14px; }
  .chat-float { bottom: 12px; }
  .chat { height: min(520px, 70vh); }
  .gauge { right: 0; top: 18vh; bottom: 18vh; width: 110px; }
  .gauge__route { right: 12px; }
  .gauge__tick span, .gauge__label { display: none; }
  .gauge__ship { right: 7px; width: 10px; height: 19px; margin-top: -9.5px; }
  .gauge__read { right: 19px; }
  .gauge__pct { font-size: 12px; }
  .ch-head { padding-bottom: 12vh; align-items: flex-end; }
  .ch-num { font-size: 92vw; top: 34%; }
  .chapter[data-side] .ch-head__text { text-align: left; }
  .chapter[data-side] .ch-kicker, .chapter[data-side] .ch-hud { justify-content: flex-start; }
  .ch-title { font-size: clamp(76px, 23vw, 150px); }
  .ch-copy, .chapter[data-side="left"] .ch-copy { grid-column: 1 / -1; gap: 40px; }
  .ch-body .ch-copy > * { position: relative; }
  .ch-body { padding-top: 0; }
  .lead { padding: 22px; margin: 0 -6px; border-radius: 18px; background: rgba(3, 7, 13, 0.62); backdrop-filter: blur(10px); max-width: none; }
  .stat { grid-template-columns: 92px 1fr 40px; }
  .desk { flex-direction: column; align-items: flex-start; }
  .svc { top: calc(76px + var(--i) * 14px); padding: 20px; border-radius: 22px; gap: 22px; }
  .svc__title { font-size: 58px; }
  .svc__visual { min-height: 190px; }
  .work-card, .work-card--end { width: 84vw; }
  .work-card--end { padding: 26px; }
  .work-card__meta { grid-template-columns: 1fr; gap: 10px; }
  .steps { grid-template-columns: 1fr; }
  .how__head { flex-direction: column; align-items: flex-start; gap: 30px; }
  .for { grid-template-columns: 1fr; }
  .footer__big { font-size: 21vw; white-space: normal; line-height: 0.86; }
  .hero__scroll { display: none; }
  .log li { grid-template-columns: 62px 1fr; }
}
