/* ═══════════════════════════════════════════════════════════════════
   RESET + ADAPTIVE REM GRID (Flowstate spec)
   ═══════════════════════════════════════════════════════════════════ */
* { margin: 0; box-sizing: border-box; }

/* Flowstate's adaptive rem grid, with a floor. The raw vw formulas only reach
   16px at each breakpoint's max width — at 1125px wide 1.111111vw is 12.5px,
   which drags every text size down with it. max() keeps the proportional
   scaling but stops type collapsing on ordinary 1280/1366 laptops. */
html { font-size: 16px; }
@media (max-width: 1920px) { html { font-size: max(15px, 0.833333vw); } }
@media (max-width: 1440px) { html { font-size: max(15px, 1.111111vw); } }
@media (max-width: 1024px) { html { font-size: max(15px, 1.5625vw);   } }
@media (max-width: 640px)  { html { font-size: max(15px, 4.444444vw); } }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }

:root {
  /* Flowstate base */
  --hero-base:          #04050c;
  --heading:            #eef0f6;
  --body-muted:         #b9becf;
  --on-media:           #ffffff;
  --action-inverse:     #ffffff;
  --action-inverse-fg:  #2f2f33;
  --glass-fill:         rgba(255,255,255,0.08);
  --glass-border:       rgba(255,255,255,0.16);
  --scrim:              rgba(4,5,12,0.46);
  --scrim-strong:       rgba(4,5,12,0.68);
  --scrim-soft:         rgba(4,5,12,0.12);
  --duration-fast:      150ms;
  --ease-entrance:      cubic-bezier(0.2, 0, 0, 1);

  /* Nexes surfaces + brand */
  --ink-1:              #06070f;
  --ink-2:              #0a0c18;
  --ink-3:              #0e1122;
  --hairline:           rgba(255,255,255,0.09);
  --hairline-hi:        rgba(255,255,255,0.20);
  --dim:                #79809a;
  --iris:               #7C6CFF;
  --rim:                #B9AFFF;
  --violet-text:        #cbc3ff;
  --blue:               #3b6dff;
  --blue-hi:            #86aeff;
  --flare:              #ffffff;
  --graphite:           #12141f;
  --steel-0:            #2a2e42;
  --text-hi:            #eef0f6;
  --text-low:           #8b92ab;

  --font-sans: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gut:  clamp(1.25rem, 4vw, 5rem);
  --maxw: 82rem;
}

body {
  background: var(--hero-base);
  color: var(--heading);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--iris); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   TYPE SCALE — secondary copy is deliberately large, airy and smooth
   ═══════════════════════════════════════════════════════════════════ */
/* .kicker is a direct-child <p> of .sec-head, so it must be excluded here or
   this rule (0,1,1) outranks it (0,1,0) and forces it back to thin body copy. */
.lede,
.card p,
.sec-head > p:not(.kicker),
.quote blockquote,
.node-copy {
  font-weight: 400;
  letter-spacing: -0.004em;
  line-height: 1.68;
  color: var(--body-muted);
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.032em; line-height: 1.06; }

.mono {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

/* ═══════════════════════════════════════════════════════════════════
   CHROME — progress rail, custom cursor
   ═══════════════════════════════════════════════════════════════════ */
#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--blue), var(--iris) 55%, var(--rim));
  z-index: 90; pointer-events: none;
  box-shadow: 0 0 14px rgba(124,108,255,.6);
}

#cursor, #cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 95;
  pointer-events: none; border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}
#cursor {
  width: 2.4rem; height: 2.4rem; margin: -1.2rem 0 0 -1.2rem;
  border: 1px solid rgba(185,175,255,.55);
  transition: width .28s var(--ease-entrance), height .28s var(--ease-entrance),
              margin .28s var(--ease-entrance), background .28s var(--ease-entrance),
              opacity .3s ease;
}
#cursor.is-hot {
  width: 4.2rem; height: 4.2rem; margin: -2.1rem 0 0 -2.1rem;
  background: rgba(124,108,255,.16);
  border-color: rgba(185,175,255,.9);
}
#cursor-dot {
  width: .3rem; height: .3rem; margin: -.15rem 0 0 -.15rem;
  background: var(--rim);
}
@media (hover: none), (max-width: 900px) {
  #cursor, #cursor-dot { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════════════ */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem;
  transition: background .5s var(--ease-entrance), border-color .5s var(--ease-entrance),
              backdrop-filter .5s var(--ease-entrance), padding .5s var(--ease-entrance);
  border-bottom: 1px solid transparent;
}
@media (min-width: 640px) { .nav { padding: 1.75rem 2.5rem; } }

.nav.is-scrolled {
  background: rgba(4,5,12,.66);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--hairline);
  padding-top: 1rem; padding-bottom: 1rem;
}

.brand {
  display: flex; align-items: center; gap: .7rem;
  font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em;
  color: var(--on-media);
}
@media (min-width: 640px) { .brand { font-size: 1.375rem; } }

.brand__mark {
  width: 3.2rem; height: 3.2rem; object-fit: contain;
  transition: transform .5s var(--ease-entrance);
}
@media (min-width: 640px) { .brand__mark { width: 3.6rem; height: 3.6rem; } }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.08); }
.brand__word { letter-spacing: .16em; text-transform: uppercase; font-size: .9em; font-weight: 700; }

.nav-pill {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: none; height: 3rem; align-items: center; gap: 2.25rem;
  border-radius: 9999px; border: 1px solid var(--glass-border);
  background: var(--glass-fill); padding: 0 1.75rem;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
@media (min-width: 900px) { .nav-pill { display: flex; } }
.nav-pill a {
  position: relative; font-size: 1.02rem; color: var(--body-muted);
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-entrance);
}
.nav-pill a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.55rem;
  height: 1px; background: var(--rim);
  transform: scaleX(0); transform-origin: 50%;
  transition: transform .4s var(--ease-entrance);
}
.nav-pill a:hover, .nav-pill a.is-active { color: var(--heading); }
.nav-pill a.is-active::after { transform: scaleX(1); }

/* Below the desktop breakpoint the pill drops to its own full-width row
   under the brand/CTA, so the section links stay reachable on phones. */
@media (max-width: 899px) {
  .nav { flex-wrap: wrap; row-gap: .75rem; }
  .nav-pill {
    display: flex; position: static; transform: none; order: 3;
    width: 100%; height: auto;
    justify-content: space-between; gap: .5rem;
    padding: .6rem 1.1rem;
  }
  .nav-pill a { font-size: .92rem; }
}

/* Shared white pill */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.5rem; border-radius: 9999px;
  background: var(--action-inverse); padding: 0 1.125rem;
  font-size: .85rem; font-weight: 600; color: var(--action-inverse-fg);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: background var(--duration-fast) var(--ease-entrance),
              transform .35s var(--ease-entrance), box-shadow .35s var(--ease-entrance);
  will-change: transform;
}
@media (min-width: 640px) { .pill { height: 2.75rem; padding: 0 1.375rem; font-size: .95rem; } }
.pill:hover { background: rgba(255,255,255,.85); box-shadow: 0 .6rem 2rem rgba(124,108,255,.35); }
.pill:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }

.pill--ghost {
  background: var(--glass-fill); color: var(--heading);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.pill--ghost:hover { background: rgba(255,255,255,.14); }

/* ═══════════════════════════════════════════════════════════════════
   HERO — Flowstate fluid
   ═══════════════════════════════════════════════════════════════════ */
#hero {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100lvh; width: 100vw; overflow: hidden;
  background: var(--hero-base); text-align: center;
  /* top pad clears the fixed navbar so the column centres in the space
     BELOW it — otherwise the mark rides up underneath the nav */
  padding: 7rem 1.25rem 4rem;
}
@media (min-width: 640px) { #hero { padding: 7.5rem 2.5rem 4.5rem; } }

#fluid {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(115% 95% at 50% 46%,
    var(--scrim-strong) 0%, var(--scrim-strong) 24%, var(--scrim) 52%, var(--scrim-soft) 100%);
}

/* Hero lockup — the floating mark sits BESIDE the headline, and the pair
   is centred on the page as a single unit. Stacks (mark on top) on narrow
   screens, then locks up side-by-side from 760px. */
.hero-lockup {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.15rem; width: 100%;
}
@media (min-width: 760px) {
  .hero-lockup { flex-direction: row; gap: clamp(1.6rem, 3.4vw, 3.6rem); }
}

.hero-mark {
  width: 10.4rem; height: auto; flex: 0 0 auto;
  animation: markFloat 7s ease-in-out infinite;
  filter: drop-shadow(0 0 2.4rem rgba(124,108,255,.5))
          drop-shadow(0 1.1rem 2.6rem rgba(0,0,0,.55));
}
@media (min-width: 760px)  { .hero-mark { width: 13.8rem; } }
@media (min-width: 1024px) { .hero-mark { width: 17.6rem; } }
@keyframes markFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-.55rem) rotate(-1.6deg); }
}

.foot__mark {
  width: 3rem; height: auto; flex: 0 0 auto;
}

.hero-col {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 22rem;
}
@media (min-width: 640px)  { .hero-col { max-width: 40rem; } }
@media (min-width: 1024px) { .hero-col { max-width: 56rem; } }

#hero h1 {
  margin-top: 0; max-width: 20rem;
  font-size: 2.5rem; font-weight: 700; line-height: 1.06;
  letter-spacing: -.035em; color: var(--heading);
}
@media (min-width: 640px)  { #hero h1 { max-width: 34rem; font-size: 3.9rem; } }
@media (min-width: 760px)  { .hero-lockup h1 { text-align: left; max-width: 20rem; } }
@media (min-width: 1024px) { #hero h1 { font-size: 5.4rem; } .hero-lockup h1 { max-width: 26rem; } }

.hero-sub {
  margin-top: 1.6rem; max-width: 21rem;
  font-size: 1.22rem; line-height: 1.62; color: var(--body-muted);
}
@media (min-width: 640px)  { .hero-sub { margin-top: 1.9rem; max-width: 36rem; font-size: 1.42rem; } }
@media (min-width: 1024px) { .hero-sub { max-width: 46rem; font-size: 1.58rem; } }

.hero-cue {
  position: absolute; inset-inline: 0; bottom: 1.6rem; z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .3em;
  text-transform: uppercase; color: rgba(185,190,207,.5);
  pointer-events: none;
}
.hero-cue i {
  display: block; width: 1px; height: 2.2rem;
  background: linear-gradient(var(--rim), transparent);
  animation: cueDrop 2.2s var(--ease-entrance) infinite;
}
@keyframes cueDrop {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* word-by-word reveal primitives */
.w { display: inline-block; opacity: 0; transform: translateY(26px); will-change: transform, opacity; }
.hero-sub .w { transform: translateY(14px); }
.is-in .w { opacity: 1; transform: none; }

/* headings that reveal word-by-word when scrolled into view */
[data-split-scroll] .w { transform: translateY(0.9em) rotate(2.5deg); transform-origin: 0 100%; }
[data-split-scroll].is-in .w { transform: none; }

/* hero words react to the cursor */
#hero h1 .w { transition-property: opacity, transform, color; }
#hero h1.is-in .w:hover { color: var(--rim); transform: translateY(-.09em) scale(1.04); }

/* per-character hover lift */
.ch { display: inline-block; transition: transform .4s var(--ease-entrance), color .4s var(--ease-entrance); }
.ch--space { width: .28em; }
a:hover > .ch, .post:hover .ch { transform: translateY(-.16em); color: var(--heading); }

/* scrambling kicker */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.kicker__type::after {
  content: ""; display: inline-block; width: .5em; height: 1em;
  margin-left: .35em; vertical-align: -.15em; background: var(--iris);
  animation: caret 1s steps(1) infinite;
}
.kicker.is-done .kicker__type::after { animation: none; opacity: 0; }
@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* card headings sweep a gradient on hover */
.card h3 {
  background-image: linear-gradient(100deg, var(--heading) 0 38%, var(--rim) 50%, var(--heading) 62% 100%);
  background-size: 260% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text;
  transition: background-position 1s var(--ease-entrance);
}
.card:hover h3 { color: transparent; background-position: 0 0; }

/* kinetic marquee band */
.marquee {
  position: relative; display: flex; overflow: hidden;
  border-block: 1px solid var(--hairline);
  padding: 1.5rem 0; background: var(--ink-1);
  --marquee-gap: 3.5rem;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: var(--marquee-gap);
  padding-right: var(--marquee-gap);
  flex: 0 0 auto; min-width: 100%;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
/* Soft light-white filled text, keeping the violet outline as the shadow. */
.marquee__track span {
  font-size: 1.55rem; font-weight: 700; letter-spacing: -.03em;
  color: rgba(255,255,255,.6); -webkit-text-stroke: 1px rgba(185,175,255,.45);
  white-space: nowrap; transition: color .4s var(--ease-entrance);
}
.marquee__track span:hover { color: var(--rim); }
.marquee__track i {
  width: .42rem; height: .42rem; border-radius: 50%;
  background: var(--iris); flex: 0 0 auto;
}
@keyframes marquee { to { transform: translateX(calc(-100% - var(--marquee-gap))); } }
.reveal { opacity: 0; transform: translateY(1.25rem); will-change: transform, opacity; }
.reveal.is-in { opacity: 1; transform: none; }
.nav.reveal { transform: translateY(-.75rem); }

/* ═══════════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════════ */
main { position: relative; z-index: 5; background: var(--hero-base); }

/* Scene canvases — they live INSIDE <main> so they paint above main's opaque
   background but below the sections. main creates a stacking context at
   z-index 5, so a sibling canvas could never sit between the two.

   #starfield backs section 02, whose content sits in .pipeline-pin. That pin
   is position:sticky, i.e. a z-index:auto positioned box, so it shares the
   canvas's paint step and wins only on DOM order — both canvases must stay
   above the sections in the source for the pipeline to draw over them. */
#wave, #starfield {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none; opacity: 0;
  will-change: opacity;
}

.section { position: relative; z-index: 1; padding: clamp(5rem, 11vh, 9rem) var(--gut); }

/* Sections a 3D scene plays behind must not paint their own ground:
   #testimonials + #lab sit over the wave, #process sits over the starfield. */
#testimonials, #lab, #process { background: transparent; }
.section--alt { background:
  linear-gradient(180deg, var(--hero-base), var(--ink-1) 22%, var(--ink-1) 78%, var(--hero-base)); }
.wrap { max-width: var(--maxw); margin: 0 auto; }

.sec-head { margin-bottom: clamp(3rem, 6vh, 5rem); max-width: 44rem; }
.kicker {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-mono); font-size: 1.12rem; font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase; color: var(--rim); margin-bottom: 1.4rem;
}
.kicker::before {
  content: ""; width: 1.6rem; height: 1px;
  background: linear-gradient(90deg, transparent, var(--iris));
}
.sec-head h2 { font-size: clamp(1.9rem, 4vw, 3.4rem); color: var(--heading); }
.sec-head > p:not(.kicker) { margin-top: 1.4rem; font-size: 1.3rem; }
@media (min-width: 1024px) { .sec-head > p:not(.kicker) { font-size: 1.44rem; } }

.rule { height: 1px; background: linear-gradient(90deg, var(--hairline-hi), transparent 70%); }

/* scroll reveal for content blocks */
[data-rv] { opacity: 0; transform: translateY(2rem); }
[data-rv].is-in {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease-entrance), transform .9s var(--ease-entrance);
}

/* ── Glass card with cursor spotlight ─────────────────────────────── */
.grid { display: grid; gap: 1.1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative; isolation: isolate;
  border-radius: 1.1rem; padding: clamp(1.6rem, 2.4vw, 2.4rem);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--hairline);
  overflow: hidden;
  transition: transform .55s var(--ease-entrance), border-color .55s var(--ease-entrance);
  will-change: transform;
}
.card::before {
  /* cursor-tracking spotlight */
  content: ""; position: absolute; inset: -1px; z-index: -1;
  background: radial-gradient(16rem 16rem at var(--mx, 50%) var(--my, 0%),
              rgba(124,108,255,.20), transparent 62%);
  opacity: 0; transition: opacity .45s var(--ease-entrance);
}
.card::after {
  /* gradient hairline that lights on hover */
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  padding: 1px;
  background: linear-gradient(145deg, rgba(185,175,255,.55), transparent 42%, rgba(59,109,255,.4));
  -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 .45s var(--ease-entrance);
}
.card:hover { transform: translateY(-.45rem); border-color: transparent; }
.card:hover::before, .card:hover::after { opacity: 1; }

.card__idx {
  font-family: var(--font-mono); font-size: .9rem; font-weight: 700;
  letter-spacing: .18em; color: var(--iris);
}
.card h3 { margin-top: 1.5rem; font-size: 1.5rem; font-weight: 700; color: var(--heading); }
.card p  { margin-top: 1rem; font-size: 1.16rem; }

/* Services: keep the index and title on one line — "01 AI-Powered Applications" */
#services .card__idx { vertical-align: .12em; margin-right: .55rem; }
#services .card h3 { display: inline; margin-top: 0; }
#services .card p { margin-top: 1.25rem; }
@media (min-width: 1024px) { .card p { font-size: 1.2rem; } }

/* ── Work cards ───────────────────────────────────────────────────── */
.work-card { display: flex; flex-direction: column; min-height: 21rem; }
.work-art {
  height: 8.5rem; border-radius: .7rem; margin-bottom: 1.6rem;
  background-size: 200% 200%; background-position: 0% 50%;
  transition: background-position 1.4s var(--ease-entrance), transform .6s var(--ease-entrance);
  position: relative; overflow: hidden;
}
.work-card:hover .work-art { background-position: 100% 50%; transform: scale(1.03); }
.work-art::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(0,0,0,.28) 0 2px, transparent 2px 7px);
  mix-blend-mode: overlay;
}
.a1 { background-image: linear-gradient(115deg,#0d1b4d,#3b6dff,#7C6CFF,#0d1b4d); }
.a2 { background-image: linear-gradient(115deg,#101a3a,#2f8fd6,#7C6CFF,#101a3a); }
.a3 { background-image: linear-gradient(115deg,#1a1140,#7C6CFF,#c26cff,#1a1140); }
.a4 { background-image: linear-gradient(115deg,#0b1f37,#2fb8b0,#3b6dff,#0b1f37); }
.a5 { background-image: linear-gradient(115deg,#2a1030,#ff6cab,#7C6CFF,#2a1030); }
.a6 { background-image: linear-gradient(115deg,#111c2e,#5a86ff,#B9AFFF,#111c2e); }
.work-tag {
  margin-top: auto; padding-top: 1.5rem;
  font-family: var(--font-mono); font-size: .88rem; font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase; color: var(--body-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   ANIMATION 2 (copied) — PIPELINE SET-PIECE, pinned + scrubbed
   ═══════════════════════════════════════════════════════════════════ */
#process { padding: 0; }
.pipeline-scroll { position: relative; height: 230vh; }
.pipeline-pin {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gut);
}
.pipeline-svg { width: 100%; height: auto; margin: 2rem 0 5.5rem; transform: scale(1.4); transform-origin: top center; }
.pipeline-svg .trace { stroke: var(--iris); stroke-width: 1.5; fill: none; opacity: .5; }
.pipeline-svg .wire {
  stroke: url(#wire-grad); stroke-width: 2.5; fill: none;
  filter: drop-shadow(0 0 6px rgba(124,108,255,.8));
}
.pipeline-svg .node-ring { fill: var(--graphite); stroke: var(--iris); stroke-width: 1.5; transition: stroke .4s, filter .4s; }
.pipeline-svg .node-core { fill: var(--steel-0); transition: fill .4s; }
.pipeline-svg .node.is-lit .node-ring { stroke: var(--rim); filter: drop-shadow(0 0 10px rgba(185,175,255,.7)); }
.pipeline-svg .node.is-lit .node-core { fill: var(--rim); }
.pipeline-svg .node-label {
  font-family: var(--font-sans); font-weight: 700; font-size: 22px;
  fill: var(--text-hi); text-anchor: middle; letter-spacing: .08em;
}
.pipeline-svg .node-sub {
  font-family: var(--font-mono); font-size: 15px; font-weight: 700; letter-spacing: .08em;
  fill: var(--text-low); text-anchor: middle; transition: fill .4s;
}
.pipeline-svg .node.is-lit .node-sub { fill: var(--violet-text); }
.pipeline-svg .pulse { fill: var(--flare); filter: drop-shadow(0 0 8px var(--rim)); }
.pipeline-status {
  margin-top: 1.6rem; color: var(--text-low); min-height: 1.5em;
  font-family: var(--font-mono); font-size: 1.02rem; letter-spacing: .02em;
}
.pipeline-status .ok { color: var(--violet-text); }

/* ═══════════════════════════════════════════════════════════════════
   TESTIMONIAL CAROUSEL
   ═══════════════════════════════════════════════════════════════════ */
.carousel { position: relative; }
.carousel__view { position: relative; min-height: 15rem; }
.carousel__slide {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(1.6rem) scale(.985);
  transition: opacity .7s var(--ease-entrance), transform .7s var(--ease-entrance);
  pointer-events: none;
}
.carousel__slide.is-current { opacity: 1; transform: none; pointer-events: auto; }
.carousel blockquote {
  font-size: clamp(1.25rem, 2.5vw, 2rem); line-height: 1.42;
  letter-spacing: -.022em; font-weight: 500; color: var(--heading);
  max-width: 52rem;
}
/* Each quote re-types itself word-by-word when its slide becomes current.
   opacity is restated here so the ancestor `.is-in .w` rule (the carousel is
   itself a reveal target) cannot pin the words visible and kill the replay. */
.carousel__slide .w { opacity: 0; transform: translateY(.55em); }
.carousel__slide.is-current .w { opacity: 1; transform: none; }
.carousel blockquote::before {
  content: "“"; display: block; font-size: 3.4rem; line-height: .6;
  color: var(--iris); margin-bottom: 1.2rem;
}
.carousel__ui { display: flex; align-items: center; gap: 1.1rem; margin-top: 2.6rem; }
.c-btn {
  width: 2.9rem; height: 2.9rem; border-radius: 50%;
  border: 1px solid var(--hairline); color: var(--body-muted);
  display: grid; place-items: center;
  transition: background .35s var(--ease-entrance), border-color .35s var(--ease-entrance),
              color .35s var(--ease-entrance), transform .35s var(--ease-entrance);
}
.c-btn:hover { background: var(--glass-fill); border-color: var(--hairline-hi); color: var(--heading); transform: scale(1.08); }
.c-dots { display: flex; gap: .55rem; margin-left: .4rem; }
.c-dot {
  width: 1.9rem; height: 2px; border-radius: 2px; background: rgba(255,255,255,.16);
  transition: background .4s var(--ease-entrance);
}
.c-dot.is-current { background: var(--rim); }

/* ═══════════════════════════════════════════════════════════════════
   LAB
   ═══════════════════════════════════════════════════════════════════ */
.post {
  display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 3rem);
  padding: clamp(1.6rem, 2.6vw, 2.4rem) 0;
  border-top: 1px solid var(--hairline);
  position: relative;
  transition: padding-left .5s var(--ease-entrance);
}
.post:last-of-type { border-bottom: 1px solid var(--hairline); }
.post::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--iris), var(--rim));
  transform: scaleY(0); transform-origin: 50% 0;
  transition: transform .5s var(--ease-entrance);
}
.post:hover { padding-left: 1.4rem; }
.post:hover::before { transform: scaleY(1); }
.post__k { font-family: var(--font-mono); font-size: .95rem; font-weight: 700; color: var(--body-muted); width: 3ch; flex: 0 0 auto; }
.post h3 { flex: 1; font-size: clamp(1.15rem, 2.2vw, 1.85rem); font-weight: 600; line-height: 1.28; }
.post__go { color: var(--rim); opacity: 0; transform: translateX(-.5rem); transition: all .45s var(--ease-entrance); }
.post:hover .post__go { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════════════════════
   ANIMATION 3 (copied) — CONTACT ORB
   ═══════════════════════════════════════════════════════════════════ */
#contact { position: relative; overflow: hidden; }
.contact-orb {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  opacity: .42;
}
.contact-orb canvas, .contact-orb__static {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.contact-orb__static { padding: 4vh 8vw; }
.contact-orb canvas { opacity: 0; transition: opacity 1s ease; }
.contact-orb.is-live canvas { opacity: 1; }
.contact-orb.is-live .contact-orb__static { display: none; }
#contact .wrap { position: relative; z-index: 1; }

.contact-grid {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 6rem); align-items: start;
}
.contact-meta dt {
  font-family: var(--font-sans); font-size: .95rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--body-muted); margin-top: 2rem;
}
.contact-meta dt:first-child { margin-top: 0; }
.contact-meta dd { margin: .6rem 0 0; font-size: 1.34rem; letter-spacing: -.012em; }
.contact-meta dd a { border-bottom: 1px solid var(--hairline-hi); transition: color .3s, border-color .3s; }
.contact-meta dd a:hover { color: var(--rim); border-color: var(--rim); }

form { display: grid; gap: 1.1rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: .55rem; }
.field label {
  font-family: var(--font-sans); font-size: .95rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--body-muted);
}
.field input, .field select, .field textarea {
  background: var(--glass-fill); border: 1px solid var(--glass-border);
  border-radius: .7rem; padding: .95rem 1.05rem;
  font-family: inherit; font-size: 1.12rem; color: var(--heading);
  outline: none; width: 100%;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .3s var(--ease-entrance), background .3s var(--ease-entrance),
              box-shadow .3s var(--ease-entrance);
}
.field textarea { resize: vertical; min-height: 9rem; line-height: 1.6; }
.field select { appearance: none; cursor: pointer; }
.field select option { background: var(--ink-2); color: var(--heading); }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--iris); background: rgba(255,255,255,.11);
  box-shadow: 0 0 0 3px rgba(124,108,255,.16);
}
.form-note { font-size: .96rem; line-height: 1.6; color: var(--dim); }

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--hairline);
  padding: 3rem var(--gut) 3.4rem; background: var(--ink-1);
  position: relative; z-index: 5;
}
.foot {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1.6rem;
  align-items: center; justify-content: space-between;
}
.foot__copy { font-size: 1.05rem; font-weight: 600; color: var(--body-muted);
  display: inline-flex; align-items: center; gap: .65rem; }
/* tagline phrases stack, one per row, each kept intact */
.foot__lines { display: flex; flex-direction: column; gap: .15rem; }
.foot__phrase { white-space: nowrap; }
.foot__links { display: flex; flex-wrap: wrap; gap: 1.6rem; transform: translateX(-6ch); }
.foot__links a {
  font-size: .95rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); transition: color .3s;
}
.foot__links a:hover { color: var(--rim); }

/* ═══════════════════════════════════════════════════════════════════
   NEXES ASSISTANT — pop-up chat (DeepSeek)
   ═══════════════════════════════════════════════════════════════════ */
.nx-chat {
  position: fixed; right: clamp(1rem, 2.4vw, 2rem); bottom: clamp(1rem, 2.4vw, 2rem);
  z-index: 120; font-family: var(--font-sans);
}

.nx-fab {
  position: relative; width: 4rem; height: 4rem; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 25%, rgba(124,108,255,.95), rgba(59,109,255,.85) 55%, #0e1122 120%);
  border: 1px solid var(--hairline-hi);
  box-shadow: 0 .7rem 1.8rem rgba(124,108,255,.45), inset 0 1px 1px rgba(255,255,255,.28);
  transition: transform .4s var(--ease-entrance), box-shadow .4s var(--ease-entrance);
  will-change: transform;
}
.nx-fab:hover { transform: translateY(-.2rem) scale(1.05); box-shadow: 0 1rem 2.4rem rgba(124,108,255,.62); }
.nx-fab:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(185,175,255,.6); }
.nx-fab::after {
  content: ""; position: absolute; inset: -.35rem; border-radius: 50%;
  border: 1px solid rgba(185,175,255,.55);
  animation: nxPulse 2.6s ease-out infinite; pointer-events: none;
}
@keyframes nxPulse {
  0%   { transform: scale(1);    opacity: .6; }
  70%  { transform: scale(1.4);  opacity: 0;  }
  100% { opacity: 0; }
}
.nx-fab__mark { width: 2.1rem; height: 2.1rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
  transition: opacity .3s, transform .4s var(--ease-entrance); }
.nx-fab__x {
  position: absolute; width: 1.5rem; height: 1.5rem; opacity: 0; transform: rotate(-90deg) scale(.6);
  stroke: #fff; stroke-width: 2.4; stroke-linecap: round; fill: none;
  transition: opacity .3s, transform .4s var(--ease-entrance);
}
.nx-chat.is-open .nx-fab__mark { opacity: 0; transform: scale(.6); }
.nx-chat.is-open .nx-fab__x    { opacity: 1; transform: rotate(0) scale(1); }
.nx-chat.is-open .nx-fab::after { animation: none; opacity: 0; }

.nx-panel {
  position: absolute; right: 0; bottom: 5rem;
  width: min(23.5rem, calc(100vw - 2rem));
  height: min(33rem, calc(100vh - 8.5rem));
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 1.15rem; border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(14,17,34,.93), rgba(6,7,15,.95));
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 1.6rem 4rem rgba(0,0,0,.6);
  opacity: 0; transform: translateY(1.2rem) scale(.96); transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .4s var(--ease-entrance), transform .4s var(--ease-entrance);
}
.nx-chat.is-open .nx-panel { opacity: 1; transform: none; pointer-events: auto; }

.nx-head {
  display: flex; align-items: center; gap: .7rem;
  padding: .95rem 1.05rem; border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(124,108,255,.16), transparent);
}
.nx-head__mark { width: 2.15rem; height: 2.15rem; flex: 0 0 auto;
  filter: drop-shadow(0 0 .5rem rgba(124,108,255,.6)); }
.nx-head__title { font-weight: 700; font-size: 1rem; letter-spacing: -.01em; color: var(--heading); }
.nx-close { margin-left: auto; width: 2rem; height: 2rem; border-radius: 50%;
  color: var(--body-muted); display: grid; place-items: center; transition: background .3s, color .3s; }
.nx-close:hover { background: var(--glass-fill); color: var(--heading); }

.nx-log {
  flex: 1; overflow-y: auto; padding: 1.05rem;
  display: flex; flex-direction: column; gap: .75rem;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.nx-log::-webkit-scrollbar { width: 6px; }
.nx-log::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 3px; }

.nx-msg {
  max-width: 86%; padding: .6rem .85rem; border-radius: .95rem;
  font-size: .95rem; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word;
  animation: nxRise .35s var(--ease-entrance) both;
}
@keyframes nxRise { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }
.nx-msg--bot { align-self: flex-start; background: var(--glass-fill);
  border: 1px solid var(--hairline); color: var(--body-muted); border-bottom-left-radius: .3rem; }
.nx-msg--user { align-self: flex-end; color: #fff; border-bottom-right-radius: .3rem;
  background: linear-gradient(160deg, var(--iris), var(--blue));
  box-shadow: 0 .3rem 1rem rgba(124,108,255,.35); }
.nx-msg strong { color: var(--heading); font-weight: 700; }
.nx-msg--bot a { color: var(--rim); text-decoration: underline; }

.nx-typing { align-self: flex-start; display: inline-flex; gap: .32rem; padding: .8rem .9rem; }
.nx-typing i { width: .42rem; height: .42rem; border-radius: 50%; background: var(--rim);
  animation: nxBlink 1.2s infinite; }
.nx-typing i:nth-child(2) { animation-delay: .18s; }
.nx-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes nxBlink { 0%,60%,100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-.22rem); } }

.nx-form {
  border-top: 1px solid var(--hairline); padding: .7rem;
  display: flex; align-items: flex-end; gap: .55rem; background: rgba(6,7,15,.55);
}
.nx-input {
  flex: 1; resize: none; max-height: 6rem; min-height: 1.4rem;
  background: var(--glass-fill); border: 1px solid var(--glass-border);
  border-radius: .8rem; padding: .6rem .8rem; color: var(--heading);
  font-family: inherit; font-size: .95rem; line-height: 1.4; outline: none;
  transition: border-color .3s, box-shadow .3s;
}
.nx-input::placeholder { color: var(--dim); }
.nx-input:focus { border-color: var(--iris); box-shadow: 0 0 0 3px rgba(124,108,255,.16); }
.nx-send {
  flex: 0 0 auto; width: 2.45rem; height: 2.45rem; border-radius: .7rem;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, var(--iris), var(--blue));
  box-shadow: 0 .3rem .9rem rgba(124,108,255,.4);
  transition: transform .3s var(--ease-entrance), opacity .3s, box-shadow .3s;
}
.nx-send:hover { transform: translateY(-.1rem) scale(1.05); }
.nx-send:disabled { opacity: .38; cursor: not-allowed; transform: none; box-shadow: none; }
.nx-send svg { width: 1.15rem; height: 1.15rem; }

@media (max-width: 640px) {
  .nx-panel { width: calc(100vw - 1.6rem); height: min(72vh, calc(100vh - 7rem)); }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  /* scale the pipeline down on narrower screens so 1.4 never clips the edges */
  .pipeline-svg { transform: scale(1.25); }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .pipeline-scroll { height: 170vh; }
  .pipeline-svg { transform: scale(1.05); margin-bottom: 2.4rem; }
  .work-card { min-height: 0; }

  /* footer: one left-aligned column — copy, links and social all stacked */
  .foot { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .foot__copy { flex-wrap: wrap; font-size: 1rem; }
  .foot__links, .foot__social {
    flex-direction: column; align-items: flex-start;
    transform: none; gap: .9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
      transition-duration: .001ms !important; }
  .w, .reveal, [data-rv] { opacity: 1 !important; transform: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   DJANGO INTEGRATION — everything above this line is the V2 landing page
   design as authored. Below: the pieces a multi-page, CMS-driven site
   needs that a single static page never did — sub-page furniture, long-form
   prose, form validation states, and empty states for unpopulated models.
   Same tokens, same motion vocabulary, no new primitives.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Accessibility ────────────────────────────────────────────────── */
.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 200;
  transform: translateY(-160%);
  padding: .7rem 1.1rem; border-radius: .6rem;
  background: var(--action-inverse); color: var(--action-inverse-fg);
  font-size: .95rem; font-weight: 700;
  transition: transform .3s var(--ease-entrance);
}
.skip-link:focus-visible { transform: none; outline: 2px solid var(--rim); outline-offset: 2px; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--rim); outline-offset: 3px; border-radius: .35rem;
}

/* ── Landing-page adjustments ─────────────────────────────────────── */
/* Replaces an inline style="margin-bottom:0" so the CSP can refuse inline CSS. */
.sec-head--flush { margin-bottom: 0; }

.kicker--center { justify-content: center; }

.work-art--img { background: var(--graphite); }
.work-art--img img { width: 100%; height: 100%; object-fit: cover; }

/* Work cards became links once case studies existed; strip the anchor defaults. */
a.card { display: block; color: inherit; }
a.work-card, a.post-card { display: flex; flex-direction: column; }

.quote-cite {
  margin-top: 1.6rem;
  font-family: var(--font-mono); font-size: .92rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
}

.lab-more { margin-top: 3rem; }

.foot__social { display: flex; gap: 1.4rem; }
.foot__social a {
  font-size: .95rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); transition: color .3s;
}
.foot__social a:hover { color: var(--rim); }

/* Shown only when a model has no published rows — points the owner at the admin. */
.empty-note {
  grid-column: 1 / -1;
  padding: 2.2rem; border-radius: 1.1rem;
  border: 1px dashed var(--hairline-hi); background: rgba(255,255,255,.02);
  font-size: 1.1rem; line-height: 1.6; color: var(--dim);
}
.empty-note strong { color: var(--body-muted); font-weight: 600; }

/* ── Form states ──────────────────────────────────────────────────── */
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #ff7a8a; background: rgba(255,122,138,.05); }

.field-error { font-size: .95rem; line-height: 1.5; color: #ff9aa7; }
.form-note.is-error { color: #ff9aa7; }

.form-sent {
  padding: clamp(1.8rem, 3vw, 2.6rem);
  border-radius: 1.1rem; border: 1px solid var(--hairline-hi);
  background: linear-gradient(180deg, rgba(124,108,255,.10), rgba(255,255,255,.015));
}
.form-sent h3 { font-size: 1.6rem; color: var(--heading); }
.form-sent p { margin-top: .9rem; font-size: 1.14rem; line-height: 1.65; color: var(--body-muted); }

/* ── Sub-page furniture (blog, case studies, errors) ──────────────── */
/* The navbar is fixed, so any page without the full-height hero has to
   reserve its own clearance. */
.page-head {
  position: relative; z-index: 1;
  padding: clamp(9rem, 18vh, 13rem) var(--gut) clamp(2.5rem, 5vh, 4rem);
  background: linear-gradient(180deg, var(--ink-2), var(--hero-base));
  border-bottom: 1px solid var(--hairline);
}
.page-head h1 {
  font-size: clamp(2.2rem, 5.5vw, 4.2rem); color: var(--heading); max-width: 22ch;
}
.page-head .lede { margin-top: 1.5rem; font-size: clamp(1.16rem, 2vw, 1.44rem); max-width: 60ch; }

.wrap--reading { max-width: 52rem; }

.section--tight { padding-top: clamp(3rem, 7vh, 5rem); }

.breadcrumb {
  display: flex; flex-wrap: wrap; gap: .5rem;
  font-size: .92rem; letter-spacing: .06em; color: var(--dim); margin-bottom: 1.8rem;
}
.breadcrumb a { color: var(--body-muted); transition: color .3s; }
.breadcrumb a:hover { color: var(--rim); }

.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem;
  font-size: .92rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 1.6rem;
}
.post-meta .cat { color: var(--rim); font-weight: 700; }

.post-cover {
  margin: clamp(2.5rem, 5vh, 4rem) 0 0;
  border-radius: 1.1rem; overflow: hidden; border: 1px solid var(--hairline);
}
.post-cover img { width: 100%; height: auto; }

.page-foot { padding: clamp(3rem, 6vh, 5rem) 0 clamp(5rem, 11vh, 9rem); }

/* ── Long-form prose (Markdown post bodies) ───────────────────────── */
.prose {
  margin-top: clamp(2.5rem, 5vh, 4rem);
  font-size: 1.2rem; line-height: 1.78; color: var(--body-muted);
}
.prose > * + * { margin-top: 1.5rem; }
.prose h2 {
  margin-top: 3.2rem; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--heading);
  letter-spacing: -.028em;
}
.prose h3 { margin-top: 2.6rem; font-size: clamp(1.3rem, 2.2vw, 1.6rem); color: var(--heading); }
.prose a { color: var(--violet-text); border-bottom: 1px solid var(--hairline-hi); transition: color .3s, border-color .3s; }
.prose a:hover { color: var(--rim); border-color: var(--rim); }
.prose strong { color: var(--heading); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .6rem; }
.prose li::marker { color: var(--iris); }
.prose blockquote {
  padding-left: 1.5rem; border-left: 2px solid var(--iris);
  color: var(--heading); font-weight: 500;
}
.prose img { border-radius: .9rem; border: 1px solid var(--hairline); }
.prose hr { border: 0; height: 1px; background: var(--hairline); margin: 3rem 0; }
.prose code {
  font-family: var(--font-mono); font-size: .9em;
  padding: .15em .4em; border-radius: .35rem;
  background: rgba(124,108,255,.13); color: var(--violet-text);
}
.prose pre {
  padding: 1.4rem; border-radius: .9rem; overflow-x: auto;
  background: var(--ink-3); border: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: .95rem; line-height: 1.65;
}
.prose pre code { padding: 0; background: none; color: var(--body-muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 1.02rem; }
.prose th, .prose td { padding: .8rem 1rem; border-bottom: 1px solid var(--hairline); text-align: left; }
.prose th { color: var(--heading); font-weight: 600; }

/* ── Case study ───────────────────────────────────────────────────── */
.case-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1.6rem;
  margin: clamp(2.5rem, 5vh, 4rem) 0 0;
  padding: 1.8rem 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.case-meta dt {
  font-family: var(--font-mono); font-size: .82rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--dim);
}
.case-meta dd { margin: .55rem 0 0; font-size: 1.14rem; color: var(--heading); }

.case-body { margin-top: clamp(3rem, 6vh, 4.5rem); }
.case-section + .case-section { margin-top: clamp(2.8rem, 5vh, 4rem); }
.case-section h2 {
  display: flex; align-items: baseline; gap: 1rem;
  font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--heading);
}
.case-section .num {
  font-family: var(--font-mono); font-size: .95rem; font-weight: 700;
  letter-spacing: .16em; color: var(--iris);
}
.case-section p { margin-top: 1.3rem; font-size: 1.2rem; line-height: 1.78; color: var(--body-muted); }

.case-gallery { display: grid; gap: 1.1rem; margin-top: clamp(3rem, 6vh, 4.5rem); }
.case-gallery figure { border-radius: 1.1rem; overflow: hidden; border: 1px solid var(--hairline); }
.case-gallery img { width: 100%; height: auto; }

.related { margin-top: clamp(4rem, 9vh, 7rem); padding-top: clamp(2.5rem, 5vh, 4rem); border-top: 1px solid var(--hairline); }
.related h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--heading); margin-bottom: 2rem; }

/* ── Error pages ──────────────────────────────────────────────────── */
.error-page {
  min-height: 78vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 1.4rem;
  padding: clamp(9rem, 18vh, 13rem) var(--gut) clamp(5rem, 11vh, 9rem);
}
.error-code {
  font-size: clamp(4.5rem, 16vw, 10rem); font-weight: 700; line-height: 1;
  letter-spacing: -.05em;
  background: linear-gradient(180deg, var(--rim), var(--iris) 45%, #2b2550);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-page h1 { font-size: clamp(1.8rem, 4vw, 3rem); color: var(--heading); }
.error-page .lede { max-width: 46ch; font-size: 1.2rem; }
.error-page .pill { margin-top: 1rem; }

@media (max-width: 640px) {
  .case-meta { grid-template-columns: 1fr 1fr; }
  .prose { font-size: 1.14rem; }
}
