/* ==========================================================================
   EMH — visual system
   Direction: "black velvet with violet neon"
   Pure black canvas. Hairline graphite borders instead of shadows.
   Serif display for statements, Inter for prose, mono for machine truth.
   Violet marks code identifiers only — never decoration.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Neutrals */
  --black:      #000000;   /* page canvas + card surfaces. never off-black */
  --hairline:   #292d30;   /* THE structural line. 1px. defines every layer */
  --charcoal:   #464a4d;   /* inline code, muted labels */
  --iron:       #6e727a;   /* subtle strokes, disabled */
  --ash:        #a1a4a5;   /* badge labels, icon strokes */
  --smoke:      #abafb4;   /* links, inactive button text */
  --bone:       #f0f0f0;   /* body text, secondary headings */
  --white:      #ffffff;   /* primary headings, hero */

  /* Brand + accents. Violet is punctuation, not paint. */
  --iris:       #9281f7;
  --iris-glow:  #baa7ff;
  --iris-grad:  linear-gradient(to right bottom in oklab, rgb(146,129,247) 0%, rgb(154,84,220) 100%);
  --signal:     #3b9eff;
  --sky:        #70b8ff;
  --pulse:      #3ad389;
  --alarm:      #ff9592;

  /* Surfaces */
  --surface:    linear-gradient(rgb(27,27,27), rgb(3,3,3));

  /* Type */
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Instrument Serif', 'GT Sectra', 'Tiempos Headline', 'Playfair Display', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Commit Mono', 'Berkeley Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm — 4px base */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s7: 28px; --s8: 32px; --s10: 40px; --s12: 48px;
  --s16: 64px; --s20: 80px; --s24: 96px; --s26: 104px; --s36: 144px;

  /* Reference layout: a 1280px centred column with a 24px gutter — measured
     off resend.com (mx-auto max-w-5xl px-6). The page reads full-screen
     because the hero is viewport-height and the glow bleeds edge to edge,
     not because the content stretches. */
  --max: 1280px;
  --gutter: clamp(20px, 2.4vw, 24px);
  --section: clamp(80px, 9vw, 120px);

  /* Shape — 6px for controls, 16px cards, 24px large panels. Never mixed. */
  --r-control: 6px;
  --r-card: 16px;
  --r-panel: 24px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t: 150ms var(--ease);
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background: var(--black);
  color: var(--bone);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--smoke); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--white); }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--iris);
  outline-offset: 2px;
  border-radius: var(--r-control);
}

::selection { background: rgba(146,129,247,0.3); color: var(--white); }

/* --------------------------------------------------------------------------
   3. Type scale
   -------------------------------------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 8.2vw, 96px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--white);
}

/* The signature: 56px at weight 400 with -0.05em. The extreme negative
   tracking on a light weight is what makes these read confident, not loud. */
.h2 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  color: var(--white);
}

/* --------------------------------------------------------------------------
   Glossy icon tile
   The one place the violet gradient is allowed as a surface: the token spec
   assigns it to "icon containers and brand badges". Lit from above — a bright
   top edge, a gloss over the upper half, an occluded lower edge, and a colour
   glow beneath. The glow is light emission, not a drop shadow for elevation.
   -------------------------------------------------------------------------- */
.icon3d {
  --tile: 60px;
  width: var(--tile);
  height: var(--tile);
  border-radius: 16px;
  margin: 0 auto var(--s6);
  display: grid;
  place-items: center;
  position: relative;
  color: #fff;
  background: #9281f7;                                  /* fallback */
  background: linear-gradient(to right bottom in oklab, rgb(146,129,247) 0%, rgb(154,84,220) 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.55),              /* top edge catches the key */
    inset 0 0 0 1px rgba(255,255,255,0.14),
    inset 0 -8px 14px -8px rgba(0,0,0,0.55),             /* underside falls off */
    0 12px 34px -10px rgba(146,129,247,0.55),            /* emitted glow */
    0 2px 8px rgba(0,0,0,0.5);
}
/* gloss across the upper half */
.icon3d::before {
  content: '';
  position: absolute;
  inset: 2px 2px auto 2px;
  height: 48%;
  border-radius: 14px 14px 50% 50% / 14px 14px 22px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.40), rgba(255,255,255,0.03));
  pointer-events: none;
}
.icon3d svg {
  position: relative;
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 1px 1.5px rgba(40,10,80,0.45));
}
/* left-aligned variant for the page-head and inline uses */
.icon3d--start { margin-inline: 0; }
@media (max-width: 620px) { .icon3d { --tile: 52px; } .icon3d svg { width: 23px; height: 23px; } }

/* Two-tone headline, monochrome: the second half steps down to smoke.
   No gold anywhere on the site. */
.h2 .accent { color: var(--smoke); }

.h3 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--white);
}

.h4 { font-size: 16px; font-weight: 500; color: var(--white); letter-spacing: -0.01em; }

.lede {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.6;
  color: var(--smoke);
  max-width: 60ch;
}

.body-sm { font-size: 14px; line-height: 1.43; color: var(--smoke); }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: 0.025em;
  color: var(--ash);
  text-transform: uppercase;
}

.mono-lc { text-transform: none; letter-spacing: 0; }
.iris { color: var(--iris); }
.serif-accent { font-family: var(--font-display); font-style: italic; color: var(--iris-glow); }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }
.section--tight { padding-block: var(--s16); }
.section + .section { padding-top: 0; }

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

.section-head {
  max-width: 62ch;
  margin-inline: auto;
  margin-bottom: var(--s16);
  text-align: center;
}
.section-head .mono { margin-bottom: var(--s4); display: block; }
.section-head .lede { margin-inline: auto; }
.section-head .h2 + .lede { margin-top: var(--s5); }

/* Page heads and the hero stay left-aligned — the contrast with the centred
   section heads is what gives the page its hierarchy. */
.page-head .crumb, .page-head .lede { text-align: left; }

.rule { height: 1px; background: var(--hairline); border: 0; }

.grid { display: grid; gap: var(--s4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   5. Controls
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  height: 40px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: transparent;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--t), background var(--t), color var(--t);
}
.btn:hover { border-color: rgba(255,255,255,0.45); color: var(--white); }
.btn:active { background: rgba(255,255,255,0.04); }

.btn--lg { height: 48px; padding-inline: var(--s5); font-size: 15px; }

/* Exactly one solid button per view — the primary conversion. */
.btn--solid {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.btn--solid:hover { background: var(--bone); border-color: var(--bone); color: var(--black); }

.btn--quiet { border-color: transparent; color: var(--smoke); }
.btn--quiet:hover { border-color: var(--hairline); color: var(--white); }

.btn .arrow { transition: transform var(--t); }
.btn:hover .arrow { transform: translateX(2px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--smoke);
  font-weight: 500;
}
.link-arrow:hover { color: var(--white); }
.link-arrow svg { transition: transform var(--t); }
.link-arrow:hover svg { transform: translateX(3px); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px var(--s2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ash);
  text-transform: uppercase;
  background: var(--black);
}

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex: none;
  background: var(--pulse);
}
.dot--blue { background: var(--signal); }
.dot--iris { background: var(--iris); }
.dot--red { background: var(--alarm); }
.dot--live { box-shadow: 0 0 0 0 rgba(58,211,137,0.6); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(58,211,137,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(58,211,137,0); }
  100% { box-shadow: 0 0 0 0 rgba(58,211,137,0); }
}

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(0,0,0,0.72);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  transition: border-color var(--t), background var(--t);
}
.header.is-stuck { border-bottom-color: var(--hairline); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
  height: 64px;
}

/* The wordmark is the logo — no monogram. Size and tracking carry it. */
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.055em;
  padding-right: 0.055em;   /* balances the trailing letter-space */
}
.brand:hover { color: var(--white); }
.footer .brand { font-size: 21px; }
@media (max-width: 620px) { .brand { font-size: 21px; } }

.nav { display: flex; align-items: center; gap: var(--s5); }
.nav a {
  font-size: 14px;
  font-weight: 400;
  color: var(--bone);
  position: relative;
  padding-block: 4px;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--white); }

.header-actions { display: flex; align-items: center; gap: var(--s3); }

/* Language switch */
.lang {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  overflow: hidden;
  height: 30px;
}
.lang button {
  border: 0;
  background: transparent;
  color: var(--charcoal);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding-inline: var(--s2);
  cursor: pointer;
  transition: color var(--t), background var(--t);
}
.lang button:hover { color: var(--bone); }
.lang button[aria-pressed="true"] { color: var(--white); background: rgba(255,255,255,0.07); }
.lang button + button { border-left: 1px solid var(--hairline); }

/* Mobile menu */
.burger { display: none; width: 36px; height: 36px; align-items: center; justify-content: center;
  border: 1px solid var(--hairline); border-radius: var(--r-control); background: transparent; cursor: pointer; }
.burger span { display: block; width: 14px; height: 1px; background: var(--bone); position: relative; transition: background var(--t); }
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; width: 14px; height: 1px; background: var(--bone); transition: transform var(--t); }
.burger span::before { top: -4px; }
.burger span::after { top: 4px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-4px) rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--hairline);
  background: var(--black);
  padding: var(--s4) 0 var(--s6);
}
.mobile-nav.is-open { display: block; }
/* :not(.btn) keeps the link styling off the CTA — otherwise it would
   override .btn--solid's black-on-white and render invisible. */
.mobile-nav a:not(.btn) {
  display: block;
  padding: var(--s3) 0;
  font-size: 18px;
  color: var(--bone);
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--hairline);
}
.mobile-nav .btn { margin-top: var(--s5); width: 100%; justify-content: center; }

@media (max-width: 880px) {
  .nav, .header-actions .btn { display: none; }
  .burger { display: inline-flex; }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
/* The hero fills the viewport and the light bleeds past the column — that,
   not a stretched content width, is what makes the page feel full-screen. */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  padding-block: var(--s16) var(--s20);
  isolation: isolate;
}
@media (min-width: 768px) {
  .hero { min-height: calc(100svh - 64px); }
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--s12);
  align-items: center;
  width: 100%;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s12); }
}

/* Atmosphere. Full-bleed, sits behind everything, never intercepts a click. */
.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hero-glow i { position: absolute; display: block; }

/* key light, upper right, behind the object */
.hero-glow .glow-wash {
  top: -30%; right: -18%;
  width: 78vw; height: 110%;
  background:
    radial-gradient(closest-side at 62% 42%, rgba(146,129,247,0.13), transparent 72%),
    radial-gradient(closest-side at 48% 55%, rgba(180,190,210,0.07), transparent 70%);
  filter: blur(30px);
}
/* the low streak the scene throws across the floor */
.hero-glow .glow-streak {
  left: -12%; right: -12%; bottom: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent 4%, rgba(255,255,255,0.14) 26%,
              rgba(186,167,255,0.42) 52%, rgba(255,255,255,0.10) 74%, transparent 96%);
  filter: blur(2px);
  transform: rotate(-1.4deg);
}
/* soft floor bounce so the bottom edge isn't a hard cut */
.hero-glow .glow-floor {
  left: 10%; right: 0; bottom: 0;
  height: 42%;
  background: radial-gradient(ellipse at 62% 100%, rgba(146,129,247,0.09), transparent 66%);
  filter: blur(40px);
}
@media (max-width: 768px) {
  .hero-glow .glow-wash { width: 130vw; right: -30%; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ash);
  text-transform: uppercase;
  margin-bottom: var(--s6);
}

.hero .display { margin-bottom: var(--s6); max-width: 14ch; }  /* 14ch keeps both EN and SR on two lines */
.hero .lede { margin-bottom: var(--s8); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

.hero-meta {
  position: relative;
  z-index: 1;                    /* the 3D object must never paint over it */
  margin-top: var(--s10);
  padding-top: var(--s5);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s6) var(--s8);
}
.hero-meta div { display: flex; flex-direction: column; gap: 2px; }
.hero-meta dt { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--charcoal); }
.hero-meta dd { font-size: 14px; color: var(--bone); }

/* --------------------------------------------------------------------------
   Hero object — the interactive stack
   Four slabs in isometric perspective: the tiers we actually build. The whole
   assembly tilts toward the pointer; hovering a slab or its chip raises that
   tier and lights its edge. Pure CSS 3D — no canvas, no library.
   -------------------------------------------------------------------------- */
/* Nothing in here is text you would want to select. Tapping a tier on a phone
   was starting a selection and flashing the tap highlight. */
.hero-object {
  display: grid;
  gap: var(--s6);
  justify-items: center;
  width: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.stack3d {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.62;
  display: grid;
  place-items: center;
  perspective: 1100px;
  perspective-origin: 50% 42%;
}

.stack3d-scene {
  --tx: 0deg;
  --ty: 0deg;
  position: relative;
  width: min(320px, 68%);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateX(calc(57deg + var(--tx))) rotateZ(calc(-40deg + var(--ty)));
  transition: transform 500ms var(--ease);
}

.slab {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--i) * var(--sep, 46px)));   /* fixed — never animates */
}

/* Invisible hit target pinned to the tier's resting position. The browser does
   the 3D hit testing, so a tier lights the instant the cursor is over its
   exposed sliver — and because this never moves, a raised plate cannot pull
   itself out from under the pointer. */
.slab-hit {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;    /* not inherited — kills double-tap zoom here */
}

.slab-face {
  position: absolute;
  inset: 0;
  pointer-events: none;                 /* the .slab-hit sibling takes input */
  transform: translateZ(var(--lift, 0px));
  transition: transform 260ms var(--ease), border-color var(--t), box-shadow var(--t), opacity var(--t);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.19);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.022) 44%, rgba(0,0,0,0.62) 100%),
    #07070a;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),      /* the lit leading edge */
    0 26px 52px -28px rgba(0,0,0,0.95);
  overflow: hidden;
}
.slab.is-active .slab-face {
  border-color: rgba(186,167,255,0.75);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 26px 52px -28px rgba(0,0,0,0.95),
    0 0 40px -4px rgba(146,129,247,0.6);
}
.slab.is-dim .slab-face { opacity: 0.45; }

/* Surface textures — each tier reads as itself, not as a generic pane. */
.tex { position: absolute; inset: 13%; border-radius: 8px; }

.tex--ui { inset: 16%; display: grid; grid-template-rows: 22% 1fr; gap: 9%; }
.tex--ui i { border: 1px solid rgba(255,255,255,0.22); border-radius: 5px; display: block; }
.tex--ui .tex-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 9%; }

.tex--api {
  background-image: repeating-linear-gradient(180deg,
    rgba(255,255,255,0.17) 0 1px, transparent 1px 14px);
  -webkit-mask-image: linear-gradient(105deg, #000 52%, transparent 92%);
          mask-image: linear-gradient(105deg, #000 52%, transparent 92%);
}
.tex--data {
  background-image: radial-gradient(rgba(255,255,255,0.26) 1.3px, transparent 1.3px);
  background-size: 15px 15px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 88%);
          mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 88%);
}
.tex--infra {
  background-image:
    linear-gradient(rgba(255,255,255,0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.13) 1px, transparent 1px);
  background-size: 17px 17px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 86%);
          mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 86%);
}

/* a packet crossing the data tier keeps the object alive while idle */
.scan {
  position: absolute;
  left: 10%; right: 10%;
  top: 20%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(186,167,255,0.95), transparent);
  animation: scan 4.2s var(--ease) infinite;
}
@keyframes scan {
  0%   { top: 20%; opacity: 0; }
  14%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { top: 76%; opacity: 0; }
}

.stack-legend { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.stack-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  padding: 4px 10px;
  cursor: pointer;
  touch-action: manipulation;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.stack-chip:hover { color: var(--bone); border-color: var(--iron); }
.stack-chip[aria-pressed="true"] {
  color: var(--iris-glow);
  border-color: rgba(146,129,247,0.5);
  background: rgba(146,129,247,0.09);
}
.stack-cap { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .stack3d-scene, .slab-face { transition: none; }
  .scan { animation: none; opacity: 0.7; top: 48%; }
  .dot--live { animation: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 980px) {
  /* aspect-ratio 1/1 plus a smaller scene and tighter stacking keeps the
     projection inside its box — it was overlapping the hero meta above it. */
  .stack3d { aspect-ratio: 1 / 0.75; }
  .stack3d-scene { width: min(230px, 50%); --sep: 34px; }
}
@media (max-width: 420px) {
  .stack3d-scene { width: min(200px, 52%); --sep: 30px; }
}

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.card {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--black);
  padding: var(--s8);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  transition: border-color var(--t), background var(--t);
  position: relative;
}
a.card:hover, .card--hover:hover { border-color: rgba(255,255,255,0.24); background: rgba(255,255,255,0.015); }

.card--lift { background: var(--surface); }

.card-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  margin-bottom: var(--s2);
  color: var(--bone);
}
.card-icon svg { width: 16px; height: 16px; }

.card p { font-size: 14px; line-height: 1.6; color: var(--smoke); max-width: 54ch; }

.card-list { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s2); }
.card-list li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--charcoal);
  display: flex;
  gap: var(--s2);
  align-items: baseline;
}
.card-list li::before { content: '—'; color: var(--iron); }

.card-index {
  position: absolute;
  top: var(--s6); right: var(--s7);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--charcoal);
}

/* Bordered matrix — cells separated by hairlines, no gaps */
.matrix {
  display: grid;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
}
.matrix > * {
  padding: var(--s7);
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.matrix-3 { grid-template-columns: repeat(3, 1fr); }
.matrix-3 > *:nth-child(3n) { border-right: 0; }
.matrix-3 > *:nth-last-child(-n+3) { border-bottom: 0; }
.matrix-4 { grid-template-columns: repeat(4, 1fr); }
.matrix-4 > *:nth-child(4n) { border-right: 0; }
.matrix-4 > *:nth-last-child(-n+4) { border-bottom: 0; }
@media (max-width: 900px) {
  .matrix-3, .matrix-4 { grid-template-columns: repeat(2, 1fr); }
  .matrix > * { border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
  .matrix-3 > *:nth-child(2n), .matrix-4 > *:nth-child(2n) { border-right: 0; }
  .matrix-3 > *:nth-last-child(-n+2), .matrix-4 > *:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 560px) {
  .matrix-3, .matrix-4 { grid-template-columns: 1fr; }
  .matrix > * { border-right: 0 !important; border-bottom: 1px solid var(--hairline) !important; }
  .matrix > *:last-child { border-bottom: 0 !important; }
}

.stat { display: flex; flex-direction: column; gap: var(--s2); }
.stat b {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
}
.stat span { font-size: 13px; line-height: 1.5; color: var(--smoke); max-width: 46ch; }

/* --------------------------------------------------------------------------
   Logo strip
   Monochrome marks paired with wordmarks: recognition never depends on the
   drawing alone, and one colour keeps the row cohesive against the black.
   -------------------------------------------------------------------------- */
.logos { border-block: 1px solid var(--hairline); padding-block: var(--s12); }
.logos-cap { text-align: center; margin-bottom: var(--s8); }
.logos-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--s6) var(--s10);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--bone);
  opacity: 0.55;
  transition: opacity var(--t);
}
.logo:hover { opacity: 1; color: var(--bone); }
.logo svg { width: 22px; height: 22px; flex: none; }
.logo span { font-size: 15px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
@media (max-width: 620px) {
  .logos-row { gap: var(--s5) var(--s6); }
  .logo span { font-size: 13px; }
  .logo svg { width: 18px; height: 18px; }
}

/* --------------------------------------------------------------------------
   9. Code window
   -------------------------------------------------------------------------- */
.window {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--black);
  overflow: hidden;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--hairline);
}
.window-lights { display: flex; gap: 6px; }
.window-lights i { width: 8px; height: 8px; border-radius: 50%; background: var(--hairline); display: block; }
.window-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--charcoal);
  margin-left: auto;
}
.window-tabs { display: flex; gap: var(--s1); }
.window-tabs button {
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--charcoal);
  padding: 3px var(--s2);
  border-radius: var(--r-control);
  cursor: pointer;
  transition: color var(--t), background var(--t);
}
.window-tabs button:hover { color: var(--bone); }
.window-tabs button[aria-selected="true"] { color: var(--white); background: rgba(255,255,255,0.07); }

.window pre {
  margin: 0;
  padding: var(--s6);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--bone);
  tab-size: 2;
}
@media (max-width: 560px) { .window pre { font-size: 11.5px; padding: var(--s4); } }
.window pre[hidden] { display: none; }

.tok-key { color: var(--sky); }
.tok-str { color: var(--iris); }
.tok-com { color: var(--charcoal); }
.tok-fn  { color: var(--white); }
.tok-ok  { color: var(--pulse); }
.tok-num { color: var(--iris-glow); }

/* --------------------------------------------------------------------------
   10. Process
   -------------------------------------------------------------------------- */
.steps { display: grid; gap: 0; border-top: 1px solid var(--hairline); }
.step {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--s6);
  padding-block: var(--s7);
  border-bottom: 1px solid var(--hairline);
  align-items: start;
  transition: background var(--t);
}
.step:hover { background: rgba(255,255,255,0.012); }
.step-no { font-family: var(--font-mono); font-size: 12px; color: var(--iris); padding-top: 4px; }
.step p { font-size: 14px; line-height: 1.6; color: var(--smoke); max-width: 68ch; }
.step-out { display: flex; flex-wrap: wrap; gap: 6px; align-content: start; }
@media (max-width: 860px) {
  .step { grid-template-columns: 56px 1fr; gap: var(--s4); }
  .step-out { grid-column: 2; }
}

/* --------------------------------------------------------------------------
   11. Work
   -------------------------------------------------------------------------- */
.work-item {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--s12);
  padding-block: var(--s16);
  border-bottom: 1px solid var(--hairline);
  align-items: center;
}
.work-item:first-of-type { border-top: 1px solid var(--hairline); }
.work-item p { max-width: 64ch; }
.work-item .h3 { max-width: 22ch; }
@media (max-width: 900px) { .work-item { grid-template-columns: 1fr; gap: var(--s8); padding-block: var(--s12); } }

.work-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s2); }

.result-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s8);
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid var(--hairline);
}
.result-row div { display: flex; flex-direction: column; gap: 2px; }
.result-row b {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--white);
  line-height: 1;
}
.result-row span { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--charcoal); }

/* Abstract project visual — hairline schematic instead of a fake screenshot */
.schematic {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: var(--s6);
  display: grid;
  gap: var(--s3);
  min-height: 280px;
  align-content: start;
}
.schematic-row { display: flex; gap: var(--s3); align-items: center; }
.schematic-bar { height: 8px; border-radius: 2px; background: var(--hairline); flex: 1; }
.schematic-bar.is-iris { background: linear-gradient(90deg, var(--iris), rgba(146,129,247,0.15)); flex: 0 0 34%; }
.schematic-bar.is-short { flex: 0 0 18%; }
.schematic-box { border: 1px solid var(--hairline); border-radius: var(--r-control); height: 56px; flex: 1; }
.schematic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }

/* --------------------------------------------------------------------------
   12. Accordion (FAQ)
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding-block: var(--s6);
  display: flex;
  gap: var(--s4);
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 500;
  color: var(--bone);
  letter-spacing: -0.01em;
  transition: color var(--t);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--white); }
.faq summary::after {
  content: '';
  width: 10px; height: 10px;
  flex: none;
  border-right: 1px solid var(--iron);
  border-bottom: 1px solid var(--iron);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--t);
}
.faq details[open] summary { color: var(--white); }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-body { padding-bottom: var(--s6); max-width: 72ch; }
.faq-body p { font-size: 14px; line-height: 1.7; color: var(--smoke); }
.faq-body p + p { margin-top: var(--s3); }

/* --------------------------------------------------------------------------
   13. CTA band
   -------------------------------------------------------------------------- */
.cta {
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  padding: clamp(32px, 6vw, 80px);
  background: var(--surface);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  top: -40%; left: 50%;
  width: 520px; height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(146,129,247,0.14), transparent 68%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta .display { font-size: clamp(34px, 5.4vw, 64px); margin-bottom: var(--s5); }
.cta .lede { margin-inline: auto; margin-bottom: var(--s8); }
.cta-actions { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   14. Forms
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--s5); }
.field { display: grid; gap: 6px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ash);
}
.field .req { color: var(--iris); }
.field input, .field textarea, .field select {
  background: var(--black);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  padding: 10px var(--s3);
  font-size: 14px;
  color: var(--white);
  width: 100%;
  transition: border-color var(--t);
  font-family: var(--font-sans);
}
.field textarea { min-height: 132px; resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--charcoal); }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--iron); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--iris);
  box-shadow: 0 0 0 3px rgba(146,129,247,0.12);
}
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236e727a'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.field select option { background: #0a0a0a; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

.check { display: flex; gap: var(--s3); align-items: flex-start; }
.check input { width: 16px; height: 16px; margin-top: 2px; flex: none; accent-color: var(--iris); }
.check label { font-family: var(--font-sans); font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--smoke); line-height: 1.5; }
.check a { color: var(--smoke); text-decoration: underline; text-underline-offset: 2px; }

.form-note { font-size: 12px; color: var(--charcoal); line-height: 1.6; }
.form-status {
  display: none;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  padding: var(--s3) var(--s4);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--pulse);
  align-items: center;
  gap: var(--s2);
}
.form-status.is-visible { display: flex; }

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--hairline); margin-top: var(--s24); padding-block: var(--s16) var(--s10); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: var(--s10) var(--s6);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  font-weight: 400;
  margin-bottom: var(--s4);
}
.footer-links { display: grid; gap: var(--s3); }
.footer-links a, .footer-links span { font-size: 14px; color: var(--smoke); }
.footer-brand p { font-size: 14px; color: var(--smoke); max-width: 34ch; margin-top: var(--s4); }

.legal {
  margin-top: var(--s16);
  padding-top: var(--s5);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s6);
  justify-content: space-between;
  align-items: center;
}
.legal p, .legal a { font-family: var(--font-mono); font-size: 11px; color: var(--charcoal); letter-spacing: 0.02em; }
.legal a:hover { color: var(--smoke); }
.legal-ids { display: flex; flex-wrap: wrap; gap: var(--s4); }

/* --------------------------------------------------------------------------
   16. Page header (interior pages)
   -------------------------------------------------------------------------- */
.page-head { padding-top: var(--s20); padding-bottom: var(--s12); border-bottom: 1px solid var(--hairline); }
.page-head .display { font-size: clamp(40px, 6.4vw, 77px); margin-bottom: var(--s5); }
.crumb { font-family: var(--font-mono); font-size: 12px; color: var(--charcoal); margin-bottom: var(--s6); display: flex; gap: var(--s2); }
.crumb a { color: var(--charcoal); }
.crumb a:hover { color: var(--smoke); }

/* Prose (legal pages) */
.prose { max-width: 72ch; }
.prose h2 { font-size: 24px; font-weight: 500; color: var(--white); letter-spacing: -0.02em; margin-top: var(--s12); margin-bottom: var(--s4); }
.prose h3 { font-size: 16px; font-weight: 500; color: var(--white); margin-top: var(--s6); margin-bottom: var(--s2); }
.prose p, .prose li { font-size: 15px; line-height: 1.75; color: var(--smoke); }
.prose p + p { margin-top: var(--s4); }
.prose ul { margin: var(--s4) 0; display: grid; gap: var(--s2); }
.prose ul li { padding-left: var(--s5); position: relative; }
.prose ul li::before { content: '—'; position: absolute; left: 0; color: var(--iron); }
.prose a { color: var(--iris); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--iris-glow); }
.prose code { font-family: var(--font-mono); font-size: 13px; color: var(--charcoal); }
.prose strong { color: var(--bone); font-weight: 500; }

/* --------------------------------------------------------------------------
   17. Utilities + motion
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--white); color: var(--black);
  padding: var(--s2) var(--s4); border-radius: var(--r-control); font-size: 14px;
}
.skip:focus { left: var(--s4); top: var(--s4); color: var(--black); }

.stack-sm { display: grid; gap: var(--s2); }
.stack { display: grid; gap: var(--s4); }
.stack-lg { display: grid; gap: var(--s8); }
.center { text-align: center; }
.mt-8 { margin-top: var(--s8); }
.mt-12 { margin-top: var(--s12); }
.mt-16 { margin-top: var(--s16); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
[hidden] { display: none !important; }
