/* ============================================================
   Opal — site.css
   One stylesheet. Tokens, layout, components, pages, motion.
   ============================================================ */

/* ---------- 1. Tokens ---------- */

:root {
  /* Light is the default ground. */
  --bg:        #F7F6F3;
  --bg-2:      #EFEDE8;
  --surface:   #FFFFFF;
  --surface-2: #FBFAF8;
  --ink:       #121314;
  --ink-2:     #3A3D41;
  --muted:     #63666B;
  --faint:     #8A8E94;
  --line:      rgba(18, 19, 20, 0.11);
  --line-2:    rgba(18, 19, 20, 0.06);
  --shadow-sm: 0 1px 2px rgba(18, 19, 20, .05), 0 2px 8px rgba(18, 19, 20, .04);
  --shadow-md: 0 2px 6px rgba(18, 19, 20, .06), 0 14px 40px rgba(18, 19, 20, .09);
  --shadow-lg: 0 4px 12px rgba(18, 19, 20, .07), 0 30px 70px rgba(18, 19, 20, .13);

  /* The one accent. Indigo reads as UI; the iridescence is decoration. */
  --accent:      #4B49D6;
  --accent-ink:  #3734B8;
  --accent-soft: rgba(75, 73, 214, 0.10);
  --on-accent:   #FFFFFF;

  /* Opal fire — used only as a gradient, never as a flat fill. */
  --fire-1: #6FD0DE;
  --fire-2: #8F7CF0;
  --fire-3: #F4A68E;
  --fire-4: #EFD489;
  --fire: linear-gradient(100deg,
            var(--fire-1) 0%, var(--fire-2) 34%,
            var(--fire-3) 66%, var(--fire-4) 100%);

  /* Type */
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;

  --step--1: clamp(0.80rem, 0.78rem + 0.10vw, 0.86rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.16vw, 1.05rem);
  --step-1:  clamp(1.12rem, 1.05rem + 0.34vw, 1.33rem);
  --step-2:  clamp(1.38rem, 1.22rem + 0.70vw, 1.85rem);
  --step-3:  clamp(1.75rem, 1.42rem + 1.45vw, 2.70rem);
  --step-4:  clamp(2.20rem, 1.60rem + 2.70vw, 4.00rem);
  --step-5:  clamp(2.70rem, 1.60rem + 4.90vw, 6.00rem);

  /* Space */
  --gut: clamp(1.15rem, 0.70rem + 2.1vw, 2.75rem);
  --max: 1320px;
  --rad: 18px;
  --rad-lg: 26px;
  --rad-sm: 10px;

  --nav-h: 66px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg:        #090A0C;
  --bg-2:      #101216;
  --surface:   #131519;
  --surface-2: #181B20;
  --ink:       #F4F4F2;
  --ink-2:     #D3D5D8;
  --muted:     #9DA2A9;
  --faint:     #878C93;   /* lifted from #767B82: at the old value every mono
                            label failed 4.5:1 on the lighter dark surfaces,
                            worst case 4.05 in the footer */
  --line:      rgba(244, 244, 242, 0.14);
  --line-2:    rgba(244, 244, 242, 0.07);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .45), 0 14px 40px rgba(0, 0, 0, .5);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .5), 0 30px 70px rgba(0, 0, 0, .6);
  --accent:      #9D9BFF;
  --accent-ink:  #BAB9FF;
  --accent-soft: rgba(157, 155, 255, 0.14);
  --on-accent:   #0B0B14;
  color-scheme: dark;
}

/* ---------- 2. Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}

img, video, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.033em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 10px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px;
  transition: top .2s var(--ease);
}
.skip:focus { top: 10px; }

.vh {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. Layout primitives ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.wrap--narrow { max-width: 880px; }
.wrap--mid { max-width: 1080px; }

.section { padding-block: clamp(3.75rem, 2.2rem + 6.4vw, 8rem); }
.section--tight { padding-block: clamp(2.5rem, 1.6rem + 4vw, 5rem); }
.section--line { border-top: 1px solid var(--line); }
.section--alt { background: var(--bg-2); }
.section--page { padding-top: calc(var(--nav-h) + clamp(2rem, 1rem + 4vw, 4.5rem)); }

.grid { display: grid; gap: clamp(1rem, .5rem + 1.6vw, 1.75rem); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 4. Type helpers ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.3;
  display: flex; align-items: center; gap: .65em;
}
.eyebrow::before {
  content: ""; width: 20px; height: 1px;
  background: var(--line); flex: none;
}
.eyebrow--plain::before { display: none; }

.d1 { font-size: var(--step-5); letter-spacing: -0.042em; }
.d2 { font-size: var(--step-4); letter-spacing: -0.038em; }
.d3 { font-size: var(--step-3); }
.d4 { font-size: var(--step-2); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); color: var(--muted); }
.mono { font-family: var(--mono); font-size: var(--step--1); letter-spacing: .04em; }

.serif-it {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.sec-head {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 1.25rem 2rem;
  margin-bottom: clamp(1.75rem, 1rem + 2.4vw, 3.25rem);
}
.sec-head__text { flex: 1 1 400px; max-width: 640px; display: grid; gap: .9rem; }

/* ---------- 5. Chrome: header ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(170%) blur(16px);
  -webkit-backdrop-filter: saturate(170%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .35s var(--ease), background-color .35s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }

.nav__in {
  width: 100%; max-width: var(--max);
  margin-inline: auto; padding-inline: var(--gut);
  display: flex; align-items: center; gap: 1.25rem;
}

.brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand__name {
  font-weight: 600; letter-spacing: -0.02em;
  font-size: 1.07rem;
}
.brand__sub {
  font-family: var(--mono); font-size: .62rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--faint); padding-left: .5rem;
  border-left: 1px solid var(--line);
  margin-left: .25rem;
}
@media (max-width: 720px) { .brand__sub { display: none; } }

.nav__links { display: flex; align-items: center; gap: .15rem; }
.nav__link {
  position: relative;
  padding: .5rem .72rem;
  font-size: .92rem;
  color: var(--muted);
  border-radius: 8px;
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--line-2); }
.nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: .72rem; right: .72rem; bottom: .24rem;
  height: 2px; border-radius: 2px; background: var(--fire);
}

.nav__tools { display: flex; align-items: center; gap: .5rem; }

@media (max-width: 920px) {
  .nav__links { display: none; }
}

.burger {
  display: none;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent;
  cursor: pointer; align-items: center; justify-content: center;
}
.burger span {
  display: block; width: 16px; height: 1.5px; background: currentColor;
  position: relative; transition: transform .3s var(--ease);
}
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1.5px;
  background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease);
}
.burger span::before { top: -5px; }
.burger span::after { top: 5px; }
.burger[aria-expanded="true"] span { transform: rotate(45deg); }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(90deg); }
.burger[aria-expanded="true"] span::after { top: 0; opacity: 0; }
@media (max-width: 920px) { .burger { display: flex; } }

.drawer {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 89;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 1rem var(--gut) 1.5rem;
  display: grid; gap: .15rem;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.drawer.is-open { opacity: 1; transform: none; pointer-events: auto; }
.drawer a {
  padding: .8rem .25rem; border-bottom: 1px solid var(--line-2);
  font-size: var(--step-1); letter-spacing: -0.02em;
  display: flex; justify-content: space-between; align-items: center;
}
.drawer a span { font-family: var(--mono); font-size: .7rem; color: var(--faint); }

.theme-btn {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent;
  display: grid; place-items: center; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.theme-btn:hover { background: var(--line-2); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .ic-moon { display: none; }
:root[data-theme="dark"] .theme-btn .ic-moon { display: block; }
:root[data-theme="dark"] .theme-btn .ic-sun { display: none; }

/* ---------- 6. Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .78em 1.25em;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .94rem; font-weight: 500; letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease),
              border-color .25s var(--ease), color .25s var(--ease),
              box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { box-shadow: var(--shadow-md); }

.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-ink); }

.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--line-2); border-color: var(--ink); }

.btn--sm { padding: .55em .95em; font-size: .85rem; }

.btn__arrow { transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.tlink {
  display: inline-flex; align-items: center; gap: .4em;
  font-weight: 500; color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.tlink:hover { border-color: var(--accent); color: var(--accent); }
.tlink svg { width: 13px; height: 13px; transition: transform .3s var(--ease); }
.tlink:hover svg { transform: translate(2px, -2px); }

/* ---------- 7. Hero ---------- */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 1rem + 6vw, 6rem));
  padding-bottom: clamp(2.5rem, 1rem + 5vw, 5rem);
  overflow: clip;
}
.hero__glow {
  position: absolute; z-index: 0; pointer-events: none;
  top: -28vmax; left: 50%; width: 92vmax; height: 68vmax;
  transform: translateX(-50%);
  background: var(--fire);
  filter: blur(90px);
  opacity: .17;
}
:root[data-theme="dark"] .hero__glow { opacity: .26; }

.hero__in { position: relative; z-index: 1; }

.hero__top {
  display: grid; gap: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: end;
}
@media (max-width: 940px) { .hero__top { grid-template-columns: minmax(0,1fr); } }

.hero h1 {
  font-size: clamp(2.5rem, 1.3rem + 4.2vw, 5.1rem);
  letter-spacing: -0.045em;
  text-wrap: nowrap;
}
@media (max-width: 560px) { .hero h1 { text-wrap: balance; } }
.hero h1 em { font-family: var(--serif); font-style: italic; letter-spacing: -0.015em; font-weight: 400; }

.hero__aside { display: grid; gap: 1.4rem; max-width: 42ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .65rem; }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  margin-top: clamp(1.75rem, 1rem + 2vw, 2.75rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: var(--step--1);
  letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
}
.hero__meta b { color: var(--ink); font-weight: 500; }

/* ---------- 7b. The ring — a horizontal carousel of live sites ---------- */

.ring-sec {
  position: relative;
  padding-bottom: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}
.ring-sec.hero { padding-top: calc(var(--nav-h) + clamp(2rem, 1rem + 4vw, 4.25rem)); }

.ring-stage {
  position: relative;
  height: clamp(276px, 36vw, 404px);
  margin-top: clamp(1.25rem, .8rem + 2vw, 2.5rem);
  perspective: 1560px;
  perspective-origin: 50% 46%;
  touch-action: pan-y;
  cursor: grab;
  /* let the far side of the ring run past the gutters */
  margin-inline: calc(var(--gut) * -1);
}
.ring-stage.is-dragging { cursor: grabbing; }

/* the elliptical track the wheel sits on */
.ring-stage::after {
  content: "";
  position: absolute; z-index: 0; pointer-events: none;
  left: 50%; top: 68%;
  width: 108%; height: 38%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%,
              rgba(18, 19, 20, .09) 0%, rgba(18, 19, 20, 0) 70%);
  filter: blur(30px);
}
:root[data-theme="dark"] .ring-stage::after {
  background: radial-gradient(ellipse at 50% 50%,
              rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 70%);
}

.ring {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  /* tipped forward a few degrees, so the far side of the wheel rides
     above the near side the way it would in a film */
  transform: rotateX(7deg) translateZ(calc(var(--r) * -1)) rotateY(var(--ry, 0deg));
  will-change: transform;
}

.ring__card {
  position: absolute;
  top: 50%; left: 50%;
  width: var(--cw);
  height: calc(var(--cw) * 0.5625);
  margin-left: calc(var(--cw) / -2);
  margin-top: calc(var(--cw) * -0.28125);
  transform: rotateY(var(--a)) translateZ(var(--r)) scale(var(--s, .9));
  transform-style: preserve-3d;
  border-radius: 14px;
  overflow: hidden;
  background: #0b0c0e;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .34);
  opacity: var(--o, .3);
  filter: saturate(var(--sat, .35)) brightness(var(--br, .62)) blur(var(--bl, 1.4px));
  padding: 0; cursor: pointer;
  transition: filter .35s var(--ease);
}
/* The poster and the film must be stacked on top of each other, not in flow —
   a static <video> appended after the poster lays out BELOW it and is clipped
   away by the card's overflow, so it plays where nobody can see it. */
.ring__card video, .ring__card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; pointer-events: none;
}
.ring__card video { z-index: 1; }
.ring__card::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 2;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  pointer-events: none;
}
.ring__card.is-front {
  border-color: rgba(255, 255, 255, .3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45),
              0 0 0 1px rgba(255, 255, 255, .12);
}
.ring__card:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

/* Readout under the ring */
.ring__hud {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(.6rem, .4rem + 1vw, 1.5rem);
  margin-top: clamp(1rem, .7rem + 1.2vw, 1.75rem);
  flex-wrap: wrap;
}
.ring__now {
  min-width: 15ch; text-align: center;
  display: grid; gap: .2rem;
}
.ring__now-name {
  font-size: var(--step-1); font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.1;
}
.ring__now-kind {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
}
.ring__btn {
  width: 42px; height: 42px; flex: none;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: all .25s var(--ease);
}
.ring__btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.ring__btn svg { width: 15px; height: 15px; }

.ring__dots {
  display: flex; gap: 6px; justify-content: center; align-items: center;
  margin-top: .9rem; flex-wrap: wrap;
}
.ring__dot {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%;
  background: currentColor; opacity: .2; cursor: pointer;
  transition: all .3s var(--ease);
}
.ring__dot:hover { opacity: .5; }
.ring__dot.is-on { background: var(--fire-2); opacity: 1; width: 20px; border-radius: 4px; }

.ring__hint {
  text-align: center; margin-top: 1rem;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint);
}

/* ---------- 7b-i. Phone: the wheel goes first ---------- */
/* On a phone the eyebrow, the headline, the lede and two buttons fill the
   whole viewport, so the one thing actually worth seeing — eleven real sites,
   running — starts below the fold. Flex `order` lifts the ring above the
   headline block without touching the DOM, so the h1 is still the first thing
   a crawler or a screen reader meets and the page still reads headline-first
   with styles off. z-index here because order also reorders PAINTING in a flex
   container: without it the hero glow (z-index 0, later in the DOM) would wash
   over the cards. */
.hero__ring { position: relative; z-index: 1; }
.hero__cta--under { display: none; }
.ring-intro { display: none; }

@media (max-width: 760px) {
  .ring-sec.hero {
    display: flex; flex-direction: column;
    padding-top: calc(var(--nav-h) + 1.1rem);
  }
  .ring-sec.hero > .hero__ring { order: -1; }
  .ring-stage { margin-top: 0; }

  /* the work link belongs under the thing it is pointing at, and the HUD,
     dots and hint above it are centred, so this is too */
  .hero__cta--under { display: flex; justify-content: center; margin-top: 1.35rem; }
  .hero__in .hero__cta { display: none; }

  /* the label the wheel needs when it is the first thing on the page */
  .ring-intro { display: block; margin-bottom: 1.05rem; }
  .ring-intro .eyebrow { margin-bottom: .5rem; }
  .ring-intro__t {
    font-size: clamp(1.35rem, 1.1rem + 1.4vw, 1.7rem);
    letter-spacing: -0.03em; line-height: 1.12; font-weight: 600;
  }

  /* the headline block follows the ring now, so it needs its own air */
  .hero__in { margin-top: clamp(1.75rem, 1rem + 4vw, 2.75rem); }
  .hero__meta { margin-top: 1.5rem; }
}

/* narrow enough that the two buttons cannot share a row — stack them to the
   full width rather than leaving two ragged pills */
@media (max-width: 520px) {
  .hero__cta--under .btn { width: 100%; justify-content: center; }
}

/* No-3D / reduced-motion fallback: a plain scroll rail */
.ring-stage.is-flat {
  perspective: none; height: auto; cursor: default;
  margin-inline: 0;
  display: flex; gap: .75rem; overflow-x: auto;
  padding-bottom: .75rem; scroll-snap-type: x mandatory;
}
.ring-stage.is-flat .ring {
  position: static; display: contents; transform: none;
}
.ring-stage.is-flat .ring__card {
  position: relative; top: auto; left: auto; margin: 0;
  transform: none; opacity: 1; filter: none;
  width: min(78vw, 360px); flex: none; scroll-snap-align: center;
}

/* ---------- 7c. Lightbox ---------- */

.lb {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  padding: clamp(.75rem, .5rem + 2vw, 2.5rem);
  opacity: 0; pointer-events: none;
  transition: opacity .32s var(--ease);
}
.lb.is-open { opacity: 1; pointer-events: auto; }
.lb__back {
  position: absolute; inset: 0;
  background: rgba(5, 6, 8, .74);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 0; padding: 0; cursor: zoom-out;
}
.lb__card {
  position: relative;
  width: min(1060px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: var(--rad-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .55);
  transform: scale(.955) translateY(10px);
  transition: transform .4s var(--ease-out);
}
.lb.is-open .lb__card { transform: none; }

.lb__media {
  position: relative; aspect-ratio: 128 / 61;
  background: #0b0c0e; overflow: hidden;
}
.lb__media video, .lb__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.lb__close {
  position: absolute; z-index: 3; top: .8rem; right: .8rem;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(10,11,13,.6); color: #fff;
  display: grid; place-items: center; cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background-color .25s var(--ease);
}
.lb__close:hover { background: rgba(10,11,13,.9); }
.lb__close svg { width: 14px; height: 14px; }

/* the title card */
.lb__title {
  padding: clamp(1.1rem, .8rem + 1.4vw, 2rem);
  display: grid; gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  align-items: start;
}
@media (max-width: 760px) { .lb__title { grid-template-columns: minmax(0,1fr); } }
.lb__head { display: grid; gap: .55rem; }
.lb__name { font-size: var(--step-3); }
.lb__row {
  display: flex; flex-wrap: wrap; gap: .4rem .9rem;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint);
}
.lb__row b { color: var(--ink); font-weight: 500; }
.lb__side { display: grid; gap: 1rem; align-content: start; }
.lb__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.lb__seq {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 clamp(1.1rem, .8rem + 1.4vw, 2rem)
                      clamp(1.1rem, .8rem + 1.4vw, 2rem);
}
.lb__seq button {
  background: none; border: 0; cursor: pointer; padding: .3rem 0;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.lb__seq button:hover { color: var(--ink); }

body.lb-open { overflow: hidden; }

/* ---------- 7d. The four promises (media-free screen) ---------- */

.promises {
  display: grid; gap: 0;
  border-top: 1px solid var(--line);
  max-width: 62ch;
}
.promise {
  display: grid; grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 1rem; align-items: baseline;
  padding-block: clamp(1.1rem, .8rem + 1.2vw, 1.9rem);
  border-bottom: 1px solid var(--line);
}
.promise__n {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em;
  color: var(--faint);
}
.promise__t {
  font-size: var(--step-2); font-weight: 500; letter-spacing: -0.03em;
  line-height: 1.2;
}

/* ---------- 7e. Integrations strip ---------- */

.ints {
  display: grid; gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  overflow: hidden;
}
@media (max-width: 860px) { .ints { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .ints { grid-template-columns: minmax(0,1fr); } }
.int {
  background: var(--surface);
  padding: clamp(1.05rem, .8rem + .9vw, 1.6rem);
  display: grid; gap: .4rem; align-content: start;
  transition: background-color .35s var(--ease);
}
.int:hover { background: var(--surface-2); }
.int__n {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .16em;
  color: var(--faint);
}
.int h3 { font-size: 1.02rem; letter-spacing: -0.02em; }
.int p { font-size: .9rem; color: var(--muted); }

/* ---------- 8. Marquee ---------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden; padding-block: .9rem;
  background: var(--surface-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex; width: max-content; gap: 0;
  animation: slide 46s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; }
.marquee__group span {
  display: flex; align-items: center; gap: 1.6rem;
  padding-inline: .8rem;
  font-family: var(--mono); font-size: var(--step--1);
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.marquee__group span::after {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--fire-2); opacity: .7;
}
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- 9. Cards ---------- */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  overflow: hidden;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out),
              border-color .4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line); }
.card__body { padding: clamp(1.1rem, .8rem + .8vw, 1.6rem); display: grid; gap: .6rem; }

/* Project card */
.pcard { display: grid; }
.pcard__media {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.pcard__media video, .pcard__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease-out);
}
.pcard:hover .pcard__media video, .pcard:hover .pcard__media img { transform: scale(1.04); }
.pcard__tag {
  position: absolute; z-index: 2; top: .7rem; left: .7rem;
  padding: .28em .7em; border-radius: 999px;
  font-family: var(--mono); font-size: .6rem;
  letter-spacing: .12em; text-transform: uppercase;
  background: rgba(10,10,12,.62); color: #fff;
  backdrop-filter: blur(6px);
}
.pcard__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.pcard__head h3 { font-size: var(--step-1); }
.pcard__kind { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); text-align: right; }
.pcard__lede { color: var(--muted); font-size: .95rem; }
.pcard__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: .3rem; padding-top: .8rem;
  border-top: 1px solid var(--line-2);
}
.pcard__place { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); flex: 1 1 auto; min-width: 0; }
.pcard__go { display: inline-flex; align-items: center; gap: .35em; font-size: .85rem; font-weight: 500; color: var(--accent); flex: 0 0 auto; white-space: nowrap; }
.pcard__go svg { width: 12px; height: 12px; transition: transform .3s var(--ease); }
.pcard:hover .pcard__go svg { transform: translateX(3px); }
.pcard__stretch { position: absolute; inset: 0; z-index: 4; }

/* Filter row */
.filters {
  display: flex; flex-wrap: wrap; gap: .45rem;
  margin-bottom: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
}
.chip {
  padding: .5em 1em; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  font-size: .87rem; color: var(--muted); cursor: pointer;
  transition: all .25s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--bg);
}

.pgrid__empty { padding: 3rem 0; color: var(--muted); }

/* ---------- 10. Feature rows ---------- */

.frow {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
}
.frow + .frow { margin-top: clamp(3rem, 2rem + 4vw, 6rem); }
.frow:nth-child(even) .frow__media { order: -1; }
@media (max-width: 880px) {
  .frow { grid-template-columns: minmax(0,1fr); }
  .frow:nth-child(even) .frow__media { order: 0; }
}
.frow__text { display: grid; gap: 1rem; align-content: start; }
.frow__media {
  position: relative; overflow: hidden;
  border-radius: var(--rad-lg);
  border: 1px solid var(--line);
  background: var(--bg-2);
  aspect-ratio: 128 / 61;
  box-shadow: var(--shadow-md);
}
.frow__media video, .frow__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}

/* ---------- 11. Numbered list / process ---------- */

.steps { display: grid; gap: 0; border-top: 1px solid var(--line); }
.step {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(1rem, .6rem + 1.6vw, 2.5rem);
  padding-block: clamp(1.6rem, 1rem + 2vw, 2.75rem);
  border-bottom: 1px solid var(--line);
  transition: background-color .4s var(--ease);
}
.step:hover { background: var(--surface-2); }
@media (max-width: 820px) {
  .step { grid-template-columns: 3rem minmax(0,1fr); }
  .step__aside { grid-column: 2; }
}
.step__n {
  font-family: var(--mono); font-size: var(--step--1);
  letter-spacing: .1em; color: var(--faint); padding-top: .4rem;
}
.step__main { display: grid; gap: .75rem; }
.step__main h3 { font-size: var(--step-2); }
.step__aside { display: grid; gap: .9rem; align-content: start; padding-top: .3rem; }
.step__kv { display: grid; gap: .2rem; }
.step__kv dt {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
}
.step__kv dd { margin: 0; font-size: .92rem; color: var(--ink-2); }

/* ---------- 12. Capability lists ---------- */

.caps-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.cap { display: grid; gap: 1.1rem; align-content: start; }
.cap__group {
  font-family: var(--mono); font-size: var(--step--1);
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  padding-bottom: .9rem; border-bottom: 1px solid var(--ink);
}
.cap__list { display: grid; gap: 0; }
.cap__item {
  padding-block: .95rem;
  border-bottom: 1px solid var(--line-2);
  display: grid; gap: .3rem;
}
.cap__item h4 { font-size: 1rem; letter-spacing: -0.015em; }
.cap__item p { font-size: .9rem; color: var(--muted); }

/* ---------- 13. Figures / proof ---------- */

.figs {
  display: grid; gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  overflow: hidden;
}
.figs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .figs--3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .figs { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.fig {
  background: var(--surface); padding: clamp(1.1rem, .8rem + 1vw, 1.9rem);
  display: grid; gap: .35rem; align-content: start;
}
.fig__n {
  font-size: var(--step-3); font-weight: 600; letter-spacing: -0.04em;
  line-height: 1;
}
.fig__l { font-size: .88rem; color: var(--muted); }

/* ---------- 14. Accordion ---------- */

.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn {
  width: 100%; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem .25rem; text-align: left;
  font-size: var(--step-1); font-weight: 500; letter-spacing: -0.02em;
  color: var(--ink);
}
.acc__btn:hover { color: var(--accent); }
.acc__ic { flex: none; width: 15px; height: 15px; position: relative; }
.acc__ic::before, .acc__ic::after {
  content: ""; position: absolute; inset: 50% 0 auto 0;
  height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform .3s var(--ease);
}
.acc__ic::after { transform: rotate(90deg); }
.acc__btn[aria-expanded="true"] .acc__ic::after { transform: rotate(0); }
.acc__panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease);
}
.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; }
.acc__panel p {
  padding: 0 0 1.4rem; max-width: 68ch; color: var(--muted);
}

/* ---------- 15. Quote / pull ---------- */

.pull {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: var(--step-3); line-height: 1.22; letter-spacing: -0.015em;
  max-width: 24ch;
}

.callout {
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: clamp(1.25rem, 1rem + 1.4vw, 2.25rem);
  background: var(--surface);
  display: grid; gap: .8rem;
}
.callout--fire { position: relative; overflow: hidden; }
.callout--fire::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--fire);
}

/* ---------- 16. Footer ---------- */

.foot {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding-block: clamp(2.5rem, 1.6rem + 3vw, 4.5rem) 1.75rem;
}
.foot__top {
  display: grid; gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, .7fr));
}
@media (max-width: 900px) { .foot__top { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .foot__top { grid-template-columns: minmax(0,1fr); } }
.foot__col { display: grid; gap: .55rem; align-content: start; }
.foot__h {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: .35rem;
}
.foot__col a { color: var(--muted); font-size: .92rem; width: fit-content; }
.foot__col a:hover { color: var(--ink); }
.foot__bottom {
  margin-top: clamp(2rem, 1.4rem + 2vw, 3.5rem);
  padding-top: 1.25rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: .66rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.foot__note { max-width: 60ch; color: var(--muted); font-size: .9rem;
  font-family: var(--sans); letter-spacing: 0; text-transform: none; }

/* ---------- 17. Project detail page ---------- */

.pdetail__hero {
  padding-top: calc(var(--nav-h) + clamp(1.75rem, 1rem + 3vw, 3.5rem));
}
.pdetail__crumb {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint);
  margin-bottom: 1.4rem;
}
.pdetail__crumb a:hover { color: var(--ink); }
.pdetail__title { display: grid; gap: 1rem; max-width: 32ch; }
.pdetail__stage {
  margin-top: clamp(1.75rem, 1rem + 2.5vw, 3rem);
  position: relative; overflow: hidden;
  border-radius: var(--rad-lg);
  border: 1px solid var(--line);
  background: var(--bg-2);
  aspect-ratio: 128 / 61;
  box-shadow: var(--shadow-lg);
}
.pdetail__stage video, .pdetail__stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.pdetail__cols {
  display: grid; gap: clamp(1.75rem, 1rem + 3vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
}
@media (max-width: 880px) { .pdetail__cols { grid-template-columns: minmax(0,1fr); } }

.spec { display: grid; gap: 0; border-top: 1px solid var(--line); }
.spec__row {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem; padding-block: .8rem;
  border-bottom: 1px solid var(--line-2);
  align-items: baseline;
}
@media (max-width: 520px) { .spec__row { grid-template-columns: minmax(0,1fr); gap: .15rem; } }
.spec__k {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
}
.spec__v { font-size: .94rem; color: var(--ink-2); }

.ticks { display: grid; gap: .7rem; }
.tick { display: grid; grid-template-columns: 1.1rem 1fr; gap: .7rem; align-items: start; }
.tick__dot {
  width: 7px; height: 7px; border-radius: 50%; margin-top: .55em;
  background: var(--fire); flex: none;
}
.tick p { font-size: .94rem; color: var(--ink-2); }

.pnav {
  display: flex; justify-content: space-between; gap: 1.5rem;
  padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-top: 1px solid var(--line);
}
.pnav a { display: grid; gap: .3rem; max-width: 46%; }
.pnav a:last-child { text-align: right; }
.pnav__dir { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.pnav__name { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; }
.pnav a:hover .pnav__name { color: var(--accent); }

/* ---------- 18. Contact form ---------- */

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field > label,
.field > .field__label {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
}
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem .9rem;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--rad-sm);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 130px; resize: vertical; }
.field__hint { font-size: .8rem; color: var(--faint); }
.form__row { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 620px) { .form__row { grid-template-columns: minmax(0,1fr); } }

.pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.pill {
  padding: .45em .9em; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); font-size: .85rem; color: var(--muted);
  background: transparent; transition: all .22s var(--ease);
}
.pill[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.form__status {
  font-size: .9rem; color: var(--muted);
  border-left: 2px solid var(--accent); padding-left: .9rem;
}

/* ---------- 19. Reveal motion ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

.no-js [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .marquee__track { animation: none; }
  .hero__glow { filter: blur(70px); }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- 20. Scroll progress ---------- */

.prog {
  position: fixed; top: 0; left: 0; z-index: 95;
  height: 2px; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: var(--fire);
  pointer-events: none;
}
