/* Plewo — dark tech premium
   Colour carries meaning: amber = manual / friction, lime = connected / resolved, blue → cyan = Plewo.
   Motion follows Emil Kowalski's rules: strong ease-out, UI ≤ 300ms, transform/opacity/clip-path only. */

:root {
  --bg: #05080f;
  --bg-2: #0a1120;
  --bg-3: #0f1a30;
  --surface: rgba(255, 255, 255, .03);
  --surface-2: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --blue: #2764d9;
  --blue-hi: #4d8dff;
  --cyan: #3fb4ff;
  --lime: #d9ff62;
  --amber: #f0a05c;
  --text: #e8edf5;
  --strong: #fff;
  --label: var(--blue-hi);
  --icon: var(--cyan);
  --ivory: #f5f4ef;
  --ink: #111b2b;
  --muted: #8a96ab;
  --muted-2: #6b778c;

  --sans: 'Manrope', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);

  --wrap: min(1240px, calc(100% - 48px));
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--icon); outline-offset: 3px; border-radius: 6px; }

.wrap { width: var(--wrap); margin-inline: auto; }
.mono { font-family: var(--mono); font-feature-settings: 'tnum' 1; letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
section[id] { scroll-margin-top: var(--nav-h); }

.skip {
  position: fixed; left: 16px; top: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg);
  font-weight: 700; transform: translateY(-160%); transition: transform .2s var(--ease-out);
}
.skip:focus { transform: none; }

/* ------------------------------------------------------------------ icons */
.i {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.i-fill { fill: currentColor; stroke: none; }
/* .draw icons: JS animates --draw from 1 to 0; pathLength="1" on every shape makes this exact */
.i.draw { stroke-dasharray: 1; stroke-dashoffset: var(--draw, 0); }

/* ------------------------------------------------------------------ type */
h1, h2 { font-weight: 800; letter-spacing: -.045em; line-height: 1.02; text-wrap: balance; }
h2 { font-size: clamp(38px, 5.4vw, 76px); }
h3 { font-size: 22px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.label { color: var(--label); font-size: 15px; font-weight: 600; margin-bottom: 20px; }
.section { padding: clamp(96px, 14vw, 180px) 0; position: relative; }
.section p:not(.label) { color: var(--muted); }

/* split-text masks */
.split-line { overflow: clip; padding-bottom: .08em; margin-bottom: -.08em; }

/* ------------------------------------------------------------------ buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 700; letter-spacing: -.01em; cursor: pointer; white-space: nowrap;
  transition: transform .16s var(--ease-out), background-color .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn .i { width: 18px; height: 18px; transition: transform .25s var(--ease-out); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn-primary {
  background: linear-gradient(180deg, #3a7bff, var(--blue));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 10px 30px -8px rgba(39,100,217,.7);
}
.btn-ghost { border-color: var(--line-2); background: rgba(255,255,255,.02); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-light { background: var(--text); color: var(--bg); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset, 0 14px 40px -6px rgba(63,140,255,.85); }
  .btn-ghost:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.05); }
  .btn-light:hover { background: #fff; }
  .btn:hover .i:not(.i-fill) { transform: translate(2px, -2px); }
}

/* ------------------------------------------------------------------ loader */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; align-content: center; gap: 28px;
  background: var(--bg);
  /* fail-safe: if JS never dismisses it, it hides itself */
  animation: loaderFailsafe 0s linear 4s forwards;
}
.loader-mark { width: 64px; height: 64px; }
.loader-line { width: 120px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.loader-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); transform-origin: left; transform: scaleX(0); }
.loader.is-done { display: none; }
html.skip-loader .loader { display: none; }
/* hero copy waits for the intro timeline (head script removes this after 4s no matter what) */
.intro-pending .hero-inner, .intro-pending .nav-inner, .intro-pending .scroll-cue { opacity: 0; }
@keyframes loaderFailsafe { to { visibility: hidden; opacity: 0; pointer-events: none; } }

/* ------------------------------------------------------------------ grain, progress */
.grain {
  position: fixed; inset: -50%; z-index: 110; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.progress {
  position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 101; pointer-events: none;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transform-origin: left; transform: scaleX(0);
}

/* ------------------------------------------------------------------ nav */
.nav { position: fixed; inset: 14px 0 auto; z-index: 100; pointer-events: none; will-change: transform; }
.nav.is-snapping { transition: transform .4s var(--ease-out); }
.nav-inner {
  pointer-events: auto;
  width: min(1240px, calc(100% - 28px)); margin-inline: auto; height: 62px;
  display: flex; align-items: center; gap: 24px; padding: 0 10px 0 22px;
  border: 1px solid transparent; border-radius: 999px;
  transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease, width .5s var(--ease-out);
}
.nav.is-scrolled .nav-inner {
  width: min(980px, calc(100% - 28px));
  background: rgba(10, 17, 32, .62); border-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6);
}
.nav-logo img { width: 112px; height: auto; }
.nav-links { position: relative; display: flex; gap: 4px; margin-left: auto; font-size: 14px; color: var(--muted); }
.nav-links a { position: relative; z-index: 1; padding: 9px 14px; border-radius: 999px; transition: color .2s ease; }
.nav-links a.is-active { color: var(--text); }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { color: var(--text); } }
.nav-pill {
  position: absolute; z-index: 0; top: 0; height: 100%; left: 0; width: 0; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); opacity: 0;
  transition: transform .45s var(--ease-out), width .45s var(--ease-out), opacity .25s ease;
}
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(10,17,32,.6); cursor: pointer; place-items: center;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .16s var(--ease-out);
}
.nav-toggle:active { transform: scale(.95); }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; display: flex; flex-direction: column; justify-content: center; gap: 48px;
  padding: 100px 28px 40px; background: rgba(5, 8, 15, .96);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: grid; gap: 6px; }
.mobile-menu nav a { font-size: clamp(36px, 10vw, 54px); font-weight: 800; letter-spacing: -.04em; line-height: 1.15; }
.mobile-mail { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 140px 0 120px; overflow: clip; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(140,170,230,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(140,170,230,.06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 62% 45%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 70% at 62% 45%, #000 15%, transparent 72%);
}
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 72% 42%, rgba(63,180,255,.16), transparent 34%),
    radial-gradient(circle at 80% -10%, rgba(39,100,217,.4), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(39,100,217,.18), transparent 40%);
}
.hero-bg::after { content: ''; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, var(--bg)); }
.hero-orb { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.orb-ready .hero-orb { opacity: 1; }
/* Shown until (or instead of) WebGL */
.hero-fallback { position: absolute; left: 70%; top: 45%; width: min(46vw, 560px); aspect-ratio: 1; translate: -50% -50%; transition: opacity .8s ease; }
.orb-ready .hero-fallback { opacity: 0; }
.hero-fallback span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(120,170,255,.16); }
.hero-fallback span:nth-child(2) { inset: 14%; border-style: dashed; }
.hero-fallback span:nth-child(3) { inset: 30%; background: radial-gradient(circle, rgba(63,140,255,.45), transparent 70%); border: 0; }

.hero-inner { position: relative; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 8px 14px 8px 12px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(10,17,32,.5);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 14px; font-weight: 600; color: #c4d2ea;
}
.kicker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.hero-title { font-size: clamp(46px, 7.4vw, 112px); max-width: none; letter-spacing: -.055em; line-height: .98; }
.hero-title .char { display: inline-block; will-change: transform; }
.hero-lead { max-width: 520px; margin-top: 32px; color: #a9b6cb; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }


.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted);
  transition: color .2s ease, border-color .2s ease;
}
@media (hover: hover) and (pointer: fine) { .scroll-cue:hover { color: var(--text); border-color: rgba(255,255,255,.3); } }

/* ------------------------------------------------------------------ marquee */
.marquee { position: relative; overflow: clip; padding: 30px 0; border-block: 1px solid var(--line); background: var(--bg-2); }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-group { display: flex; align-items: center; gap: 44px; padding-right: 44px; }
.marquee span { font-size: clamp(30px, 4.4vw, 60px); font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.marquee span.outline { color: transparent; -webkit-text-stroke: 1.2px rgba(232,237,245,.5); }
.marquee i { width: 14px; height: 14px; border-radius: 4px; background: var(--blue-hi); transform: rotate(45deg); flex-shrink: 0; }
/* CSS fallback loop; JS replaces it with a velocity-aware loop */
.marquee-track { animation: marquee 40s linear infinite; }
.has-gsap .marquee-track { animation: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------ showreel */
.reel-section { padding: clamp(96px, 12vw, 150px) 0 0; position: relative; }
.reel-head { margin-bottom: 56px; }
.reel-head h2 { max-width: 13ch; }
.reel-stage { width: min(1360px, calc(100% - 32px)); margin: 0 auto; }
.reel {
  position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-lg);
  background: var(--bg-2); border: 1px solid var(--line-2);
  box-shadow: 0 60px 120px -40px rgba(39,100,217,.45), 0 0 0 1px rgba(63,180,255,.05);
  transform-origin: 50% 0;
}
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel-ui {
  position: absolute; inset: auto 0 0; display: flex; align-items: center; gap: 16px;
  padding: 56px 24px 22px; background: linear-gradient(transparent, rgba(5,8,15,.8));
}
.reel-toggle {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .16s var(--ease-out), background-color .2s ease;
}
.reel-toggle:active { transform: scale(.94); }
.reel-toggle .i { width: 18px; height: 18px; }
.reel-toggle .i-pause, .reel-toggle[data-state="playing"] .i-play { display: none; }
.reel-toggle[data-state="playing"] .i-pause { display: block; }
.reel-progress { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.reel-progress i { display: block; height: 100%; background: var(--lime); transform-origin: left; transform: scaleX(0); transition: transform .3s linear; }
.reel-time { font-size: 13px; color: #c4d2ea; }

/* ------------------------------------------------------------------ cards / spotlight */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, -20%), rgba(63,180,255,.55), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s ease;
}
.spot::after {
  content: ''; position: absolute; inset: 0; z-index: -2; border-radius: inherit;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, -20%), rgba(63,180,255,.07), transparent 60%);
  opacity: 0; transition: opacity .3s ease;
}
@media (hover: hover) and (pointer: fine) { .spot:hover::before, .spot:hover::after { opacity: 1; } }

.card {
  padding: 32px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  overflow: hidden;
}
.card h3 { margin: 28px 0 12px; }
.card p { font-size: 16px; }
.card-icon, .service-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  color: var(--icon); background: color-mix(in srgb, var(--icon) 9%, transparent); border: 1px solid color-mix(in srgb, var(--icon) 22%, transparent);
}
.card-icon .i, .service-icon .i { width: 24px; height: 24px; }

/* ------------------------------------------------------------------ focus */
.focus-head { max-width: 980px; margin-bottom: 72px; }
.focus-head h2 { font-size: clamp(36px, 5vw, 70px); }
.scrub-words .word { transition: none; }
.focus-sub { max-width: 560px; margin-top: 28px; font-size: 18px; }
.bento { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.bento-a { grid-row: span 2; display: flex; flex-direction: column; }
.bento-a .flow-viz { margin-top: auto; padding-top: 48px; }
.flow-viz { display: flex; gap: 8px; align-items: flex-end; height: 140px; }
.flow-viz span { flex: 1; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, rgba(63,180,255,.35), rgba(39,100,217,.06)); transform-origin: bottom; }
.flow-viz span:nth-child(1) { height: 100%; }
.flow-viz span:nth-child(2) { height: 78%; }
.flow-viz span:nth-child(3) { height: 58%; }
.flow-viz span:nth-child(4) { height: 40%; }
.flow-viz span:nth-child(5) { height: 26%; background: linear-gradient(180deg, rgba(217,255,98,.6), rgba(217,255,98,.06)); }
.link-viz { width: 100%; max-width: 260px; margin-top: 28px; overflow: visible; }
.link-viz path { fill: none; stroke: var(--cyan); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: var(--draw, 0); opacity: .7; }
.link-viz circle { fill: var(--bg); stroke: var(--cyan); stroke-width: 1.5; }
.link-viz circle:last-of-type { stroke: var(--lime); }

/* ------------------------------------------------------------------ ops console */
.ops { padding-block: clamp(80px, 10vw, 140px); background: linear-gradient(180deg, var(--bg), var(--bg-2) 30%, var(--bg-2) 70%, var(--bg)); }
.ops-pin { min-height: 100svh; display: flex; align-items: center; }
.ops-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.ops-copy h2 { font-size: clamp(36px, 4.6vw, 64px); max-width: 10ch; }
.ops-copy > p:not(.label) { margin-top: 22px; max-width: 400px; }
.ops-note { margin-top: 18px; font-size: 13px; color: var(--muted-2) !important; }
.ops-switch {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; margin-top: 36px; padding: 5px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(5,8,15,.6);
}
.ops-switch button {
  position: relative; z-index: 1; min-width: 132px; padding: 11px 20px; border: 0; border-radius: 999px; background: none;
  font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; transition: color .25s ease, transform .16s var(--ease-out);
}
.ops-switch button:active { transform: scale(.97); }
.ops-switch button[aria-pressed="true"] { color: var(--text); }
.ops-switch-pill {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px;
  background: rgba(240,160,92,.16); border: 1px solid rgba(240,160,92,.35);
  transition: transform .4s var(--ease-out), background-color .4s ease, border-color .4s ease;
}
.ops-switch[data-mode="after"] .ops-switch-pill { transform: translateX(100%); background: rgba(39,100,217,.45); border-color: rgba(77,141,255,.6); }

.console {
  --accent: var(--amber);
  position: relative; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background: linear-gradient(160deg, rgba(20,34,62,.9), rgba(8,14,28,.95));
  box-shadow: 0 50px 100px -40px rgba(0,0,0,.8), 0 0 0 1px rgba(63,180,255,.04) inset;
  transition: border-color .5s ease, box-shadow .5s ease;
}
.console[data-state="after"] {
  --accent: var(--lime);
  border-color: rgba(77,141,255,.4);
  box-shadow: 0 50px 120px -40px rgba(39,100,217,.55), 0 0 0 1px rgba(63,180,255,.08) inset;
}
.console-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.console-brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.console-badge {
  padding: 6px 12px; border-radius: 999px; font-size: 12px; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  transition: color .4s ease, border-color .4s ease, background-color .4s ease;
}
.console-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.metric { padding: 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.metric-label { display: block; font-size: 13px; color: var(--muted); }
.metric-value { display: block; margin: 10px 0 2px; font-size: clamp(34px, 3.6vw, 48px); font-weight: 500; letter-spacing: -.03em; color: var(--text); transition: color .4s ease; }
.console[data-state="after"] .metric-value { color: var(--lime); }
.metric-note { display: block; min-height: 22px; font-size: 13px; color: var(--muted); }
.metric-bar { display: block; height: 4px; margin-top: 14px; border-radius: 4px; background: var(--line); overflow: hidden; }
.metric-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transform-origin: left; transition: background-color .4s ease; }
.console-tasks { margin-top: 12px; padding: 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.tasks-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 14px; font-size: 14px; }
.tasks-head span { font-size: 12px; color: var(--muted); }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255,255,255,.025);
}
.task-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); transition: color .4s ease, background-color .4s ease; }
.task-icon .i { width: 18px; height: 18px; }
.task b { display: block; font-size: 14px; font-weight: 700; }
.task small { display: block; font-size: 12px; color: var(--muted); }
.task em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--accent); white-space: nowrap; transition: color .4s ease; }
.console-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; color: #b9c5d8; }
.state-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; transition: background-color .5s ease, box-shadow .5s ease; }
.console .state-dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
/* swap: content blurs out, text changes, blurs back in (Emil: blur masks the crossfade) */
.console [data-c].is-swapping, .task-list.is-swapping { opacity: 0; filter: blur(4px); transform: translateY(-3px); }
.console [data-c], .task-list { transition: opacity .18s ease, filter .18s ease, transform .25s var(--ease-out), color .4s ease; }

/* ------------------------------------------------------------------ services */
.services { overflow: clip; }
.services-head { display: grid; grid-template-columns: 1.4fr .6fr; gap: 48px; align-items: end; margin-bottom: 48px; }
.services-head h2 { max-width: 20ch; font-size: clamp(36px, 4.2vw, 60px); }
.services-head > p { max-width: 380px; }
.services-track-wrap {
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: max(24px, calc((100% - 1240px) / 2));
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.services-track-wrap::-webkit-scrollbar { display: none; }
.services-track { display: flex; gap: 20px; width: max-content; padding-inline: max(24px, calc((100vw - 1240px) / 2)); }
.service {
  width: min(540px, 38vw); min-height: 400px; padding: 36px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  display: flex; flex-direction: column; overflow: hidden; scroll-snap-align: start;
}
.service-icon { width: 64px; height: 64px; border-radius: 20px; }
.service-icon .i { width: 30px; height: 30px; }
.service-tag { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--label) !important; }
.service h3 { margin: 10px 0 14px; font-size: clamp(26px, 2.4vw, 32px); letter-spacing: -.035em; }
.service p:last-child { font-size: 16px; }
.services-progress { margin-top: 40px; }
.services-progress span { display: block; height: 2px; max-width: 280px; border-radius: 2px; background: var(--line); overflow: hidden; }
.services-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); transform-origin: left; transform: scaleX(.25); }

/* ------------------------------------------------------------------ principles */
.principles-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.principles-sticky { position: sticky; top: calc(var(--nav-h) + 60px); }
.principles-sticky h2 { font-size: clamp(36px, 4.6vw, 64px); }
.principles-sticky > p:not(.label) { margin: 24px 0 36px; max-width: 460px; }
.principle-list { list-style: none; margin: 0; padding: 0; }
.principle {
  display: grid; grid-template-columns: 52px 1fr; gap: 20px; padding: 40px 0; border-top: 1px solid var(--line);
  opacity: .35; transition: opacity .5s ease;
}
.principle:last-child { border-bottom: 1px solid var(--line); }
.principle.is-active, .no-motion .principle { opacity: 1; }
.principle > .i { width: 52px; height: 52px; padding: 13px; border-radius: 16px; color: var(--cyan); background: rgba(63,180,255,.08); border: 1px solid rgba(63,180,255,.18); }
.principle h3 { font-size: 24px; margin-bottom: 8px; }

/* ------------------------------------------------------------------ process */
.process-head { max-width: 760px; margin-bottom: 80px; }
.process-head > p:not(.label) { margin-top: 24px; max-width: 520px; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline-line { position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; background: var(--line); }
.timeline-line i { display: block; height: 100%; width: 100%; background: linear-gradient(180deg, var(--blue), var(--cyan) 70%, var(--lime)); transform-origin: top; transform: scaleY(1); }
.step { position: relative; display: grid; grid-template-columns: 56px 140px 1fr 1.3fr; gap: 28px; align-items: center; padding: 32px 0; }
.step-node {
  position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--muted);
  transition: color .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.step-node .i { width: 22px; height: 22px; }
.step.is-active .step-node, .no-motion .step-node { color: var(--icon); border-color: color-mix(in srgb, var(--icon) 50%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--icon) 7%, transparent), 0 0 30px color-mix(in srgb, var(--icon) 25%, transparent); }
.step-num { font-size: 13px; color: var(--label); }
.step h3 { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.035em; }

/* ------------------------------------------------------------------ banner */
.banner { position: relative; padding: clamp(110px, 14vw, 190px) 0; overflow: clip; isolation: isolate; border-block: 1px solid var(--line); }
.banner-glow {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px circle at var(--gx, 70%) var(--gy, 40%), rgba(39,100,217,.55), transparent 60%),
    radial-gradient(900px circle at 10% 110%, rgba(63,180,255,.18), transparent 60%),
    var(--bg-2);
}
.banner-inner { max-width: 1240px; }
.banner h2 { max-width: 15ch; }
.banner h2 { font-size: clamp(42px, 7vw, 104px); letter-spacing: -.055em; }
.banner p { max-width: 560px; margin: 30px 0 40px; color: #b6c3d8; font-size: 18px; }

/* ------------------------------------------------------------------ faq */
.faq-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; }
.faq-layout h2 { font-size: clamp(36px, 4.4vw, 60px); }
.faq-layout > div:first-child > p:not(.label) { margin-top: 20px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item h3 { font-size: inherit; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 0;
  border: 0; background: none; text-align: left; cursor: pointer; font-size: 18px; font-weight: 700; letter-spacing: -.015em;
}
.faq-q .i { width: 22px; height: 22px; color: var(--icon); transition: transform .32s var(--ease-out); }
.faq-item.is-open .faq-q .i { transform: rotate(45deg); }
@media (hover: hover) and (pointer: fine) { .faq-q:hover span { color: var(--strong); } }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--ease-out); }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 40px 26px 0; font-size: 16px; opacity: 0; transform: translateY(-6px); transition: opacity .22s ease, transform .32s var(--ease-out); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-item.is-open .faq-a p { opacity: 1; transform: none; transition-delay: .06s; }

/* ------------------------------------------------------------------ contact */
.contact { background: radial-gradient(800px circle at 85% 100%, rgba(39,100,217,.25), transparent 60%); }
.contact-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 80px; align-items: end; }
.contact h2 { font-size: clamp(44px, 7vw, 100px); letter-spacing: -.055em; }
.contact-layout > div:first-child > p:not(.label) { margin-top: 28px; max-width: 520px; font-size: 18px; }
.contact-card { padding: 34px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.015)); overflow: hidden; }
.contact-kicker { font-size: 12px; color: var(--lime) !important; }
.contact-card h3 { margin: 16px 0 10px; font-size: 26px; }
.contact-card > p:not(.contact-kicker) { margin-bottom: 28px; font-size: 16px; }
.contact-card .btn { width: 100%; }
.contact-mail { display: block; margin-top: 16px; text-align: center; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ footer */
.footer { position: relative; overflow: clip; padding: 40px 0 32px; border-top: 1px solid var(--line); }
.footer-word {
  display: flex; justify-content: center; gap: .01em; padding: 0 16px; margin-bottom: 24px;
  font-size: clamp(90px, 25vw, 380px); font-weight: 800; letter-spacing: -.07em; line-height: .8;
  color: transparent; -webkit-text-stroke: 1px rgba(120,160,230,.28);
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent);
  user-select: none;
}
.footer-word span { display: inline-block; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 14px; color: var(--muted); }
.footer-logo img { width: 104px; height: auto; }
.footer-links { display: flex; gap: 24px; }
@media (hover: hover) and (pointer: fine) { .footer-links a { transition: color .2s ease; } .footer-links a:hover { color: var(--text); } }


/* ------------------------------------------------------------------ ivory sections
   Two grounds: night blue (default) and the ivory from the original site.
   Ivory sections are sheets with rounded corners laid over the dark page. */
.theme-light {
  --bg: var(--ivory);
  --text: var(--ink);
  --strong: #05080f;
  --muted: #5d687b;
  --muted-2: #7a8597;
  --line: rgba(11, 29, 53, .1);
  --line-2: rgba(11, 29, 53, .16);
  --label: var(--blue);
  --icon: var(--blue);
  background: var(--ivory);
  color: var(--text);
  border-radius: clamp(28px, 4vw, 56px);
  position: relative;
  z-index: 1;
}
.theme-light ::selection { background: var(--blue); color: #fff; }
.theme-light .card,
.theme-light .service {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(11,29,53,.04), 0 24px 48px -28px rgba(11,29,53,.22);
}
.theme-light .spot::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, -20%), rgba(39,100,217,.55), transparent 60%); }
.theme-light .spot::after { background: radial-gradient(500px circle at var(--mx, 50%) var(--my, -20%), rgba(39,100,217,.05), transparent 60%); }
.theme-light .flow-viz span { background: linear-gradient(180deg, rgba(39,100,217,.32), rgba(39,100,217,.04)); }
.theme-light .flow-viz span:nth-child(5) { background: linear-gradient(180deg, #b6e320, rgba(182,227,32,.08)); }
.theme-light .link-viz path, .theme-light .link-viz circle { stroke: var(--blue); }
.theme-light .link-viz circle:last-of-type { stroke: #8fb800; }
.theme-light .timeline-line i { background: linear-gradient(180deg, var(--blue), var(--cyan)); }
.theme-light .step-node { background: var(--ivory); }
.theme-light .services-progress span { background: var(--line-2); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: grid; }
  .step { grid-template-columns: 56px 1fr; row-gap: 6px; column-gap: 20px; }
  .step-num { grid-column: 2; }
  .step h3, .step p { grid-column: 2; }
  .step-node { grid-row: 1 / span 3; align-self: start; }
}
@media (max-width: 900px) {
  .hero { padding: 120px 0 80px; flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .hero-fallback { left: 70%; top: 70%; width: 90vw; }
  .scroll-cue { display: none; }
  .services-head, .ops-layout, .principles-layout, .faq-layout, .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .bento { grid-template-columns: 1fr; }
  .bento-a { grid-row: auto; }
  .ops-pin { min-height: 0; }
  .principles-sticky { position: static; }
  .principle { opacity: 1; }
  .services-track-wrap { scroll-padding-inline: calc((100% - var(--wrap)) / 2); }
  .services-track { padding-inline: calc((100vw - var(--wrap)) / 2); gap: 14px; }
  .service { width: min(82vw, 420px); min-height: 360px; }
  .services-head h2 { max-width: 14ch; }
  .service-tag { margin-top: 36px; }
  .services-progress { margin-top: 28px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  :root { --wrap: calc(100% - 32px); }
  body { font-size: 16px; }
  .hero-lead { font-size: 17px; }
  .hero-actions .btn { width: 100%; }
  .console { padding: 14px; }
  .console-metrics { gap: 8px; }
  .metric { padding: 14px; }
  .task { grid-template-columns: 34px 1fr; }
  .task em { grid-column: 2; }
  .ops-switch button { min-width: 0; }
  .card, .service, .contact-card { padding: 26px; }
}

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .grain { display: none; }
}
html.force-reduced .grain { display: none; }
