/* =========================================================
   Alex Cruttenden — Design System v2
   Implementation of the Cruttenden Design System tokens
   (chartreuse accent, near-black canvas, Anton display).
   Combines colors_and_type.css + kit.css + project-page CSS.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* === SURFACES === */
  --canvas:        #0A0A0A;
  --panel:         #141414;
  --panel-2:       #1C1C1C;
  --hairline:      rgba(245, 241, 234, 0.12);
  --hairline-hi:   rgba(245, 241, 234, 0.30);

  /* === FOREGROUND === */
  --fg-1:          #F5F1EA;
  --fg-2:          rgba(245, 241, 234, 0.72);
  --fg-3:          rgba(245, 241, 234, 0.48);
  --fg-4:          rgba(245, 241, 234, 0.28);

  /* === ACCENT === */
  --accent:        #D8FE3C;
  --accent-press:  #B6DA1F;
  --accent-fg:     #0A0A0A;
  --papaya:        #FF6B1A;

  /* === SEMANTIC === */
  --positive:      #6EE7B7;
  --negative:      #F87171;
  --warning:       #FBBF24;

  /* === TYPE === */
  --font-display:  'Bebas Neue', 'Anton', 'Impact', sans-serif;
  --font-sans:     'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --t-mono-xs:     11px;
  --t-mono-sm:     12px;
  --t-label:       12px;
  --t-body-sm:     14px;
  --t-body:        16px;
  --t-body-lg:     18px;
  --t-h6:          20px;
  --t-h5:          24px;
  --t-h4:          32px;
  --t-h3:          48px;
  --t-h2:          72px;
  --t-h1:          120px;

  --tracking-display: -0.025em;
  --tracking-tight:   -0.01em;
  --tracking-wide:     0.04em;
  --tracking-label:    0.12em;

  --lh-display:    0.86;
  --lh-tight:      1.05;
  --lh-body:       1.5;

  /* === SPACING === */
  --sp-1:   4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5:   24px;  --sp-6: 32px;  --sp-7: 48px;  --sp-8: 64px;
  --sp-9:   96px;  --sp-10: 144px;
  --page-pad: 80px;
  --max-w:    1440px;

  /* === MOTION === */
  --ease:        cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --d-fast:      120ms;
  --d-base:      240ms;
  --d-slow:      600ms;
  --d-reveal:    900ms;

  --nav-h:       60px;
}

/* === RESET === */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  background: var(--canvas);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
img, svg, canvas { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-fg); }

/* === TYPE CLASSES === */
.t-display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}
h1, .t-h1 { font: 400 var(--t-h1)/var(--lh-display) var(--font-display); letter-spacing: var(--tracking-display); text-transform: uppercase; }
h2, .t-h2 { font: 400 var(--t-h2)/var(--lh-tight)   var(--font-display); letter-spacing: var(--tracking-display); text-transform: uppercase; }
h3, .t-h3 { font: 700 var(--t-h3)/var(--lh-tight)   var(--font-sans);    letter-spacing: var(--tracking-tight); }
.t-label, .eyebrow {
  font: 500 var(--t-label)/1 var(--font-mono);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--fg-3);
}
.t-mono { font: 400 var(--t-mono-sm)/1.4 var(--font-mono); color: var(--fg-2); }
p { color: var(--fg-2); text-wrap: pretty; }
.it { color: var(--accent); font-style: italic; font-family: serif; font-weight: 300; }

/* === NAV === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.nav__brand {
  font: 400 20px/1 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav__links { display: flex; gap: 28px; }
.nav__link {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding: 4px 0;
  position: relative;
  transition: color 180ms var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--fg-1); }
.nav__link.is-active::before {
  content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px; background: var(--accent); border-radius: 50%;
}
.nav__cta {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 999px;
  transition: background 180ms var(--ease);
}
.nav__cta:hover { background: var(--accent-press); }

/* Hamburger toggle (injected by main.js) — desktop hides it. */
.nav__toggle { display: none; }

/* ---- Mobile header: collapse links into a hamburger dropdown ---- */
@media (max-width: 640px) {
  .nav { padding: 0 18px; }
  .nav__brand { font-size: 16px; }

  .js-nav .nav__toggle {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 40px; height: 40px; margin-left: auto;
    background: none; border: 0; padding: 0; cursor: pointer;
  }
  .nav__toggle span {
    display: block; width: 22px; height: 2px; background: var(--fg-1); border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
  }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* The standalone CTA pill is redundant with the Contact link in the menu. */
  .js-nav .nav__cta { display: none; }

  /* Links drop down from under the bar. */
  .js-nav .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10, 10, 10, 0.94);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--hairline);
    padding: 4px 18px 12px;
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .nav.is-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .js-nav .nav__link {
    font: 500 13px/1 var(--font-mono); letter-spacing: 0.16em;
    padding: 18px 2px; border-bottom: 1px solid var(--hairline);
  }
  .js-nav .nav__link:last-child { border-bottom: 0; }
  .js-nav .nav__link.is-active::before { left: -10px; }
}

/* === GRAIN OVERLAY === */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: 0.035; mix-blend-mode: overlay;
}

/* === SIDE RAIL === */
.side-rail {
  position: fixed; left: 16px; top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  z-index: 40;
  white-space: nowrap;
}

/* === HERO === */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
}
.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 1;
}
.hero__fallback {
  position: absolute; inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(216, 254, 60, 0.18), transparent 60%),
    var(--canvas);
}
.hero__overlay {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 64px) var(--page-pad) 64px;
  pointer-events: none;
}
.hero__overlay a, .hero__overlay button { pointer-events: auto; }

/* 3D device morph (Three.js) — right side of the hero, layered above the WebGL. */
.hero__device {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: clamp(4px, 2.5vw, 64px);
  transform: translateY(-50%);
  width: clamp(380px, 38vw, 580px);
  aspect-ratio: 1 / 1.04;
  pointer-events: none;
}
.hero__device-canvas { display: block; width: 100%; height: 100%; }
/* Desktop only — the stacked hero leaves no room beside it on tablet/mobile. */
@media (max-width: 900px) { .hero__device { display: none; } }

.hero__eyebrow {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex; align-items: center; gap: 8px;
}
.pulse {
  flex: 0 0 8px;            /* never shrink — stays a circle when the eyebrow wraps */
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(216, 254, 60, 0.6);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0  rgba(216, 254, 60, 0.6); }
  70%  { box-shadow: 0 0 0 14px rgba(216, 254, 60, 0); }
  100% { box-shadow: 0 0 0 0  rgba(216, 254, 60, 0); }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 11vw, 180px);
  line-height: 0.86;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: auto 0;
  text-wrap: balance;
}
.hero__title .it { color: var(--accent); font-style: italic; font-family: serif; font-weight: 300; }
.hero__title-l1 { display: block; margin-bottom: 8px; }

.hero__foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px;
}
.hero__bio {
  max-width: 460px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-2);
}
.hero__cta {
  display: flex; gap: 14px; flex-wrap: wrap; flex-shrink: 0; align-items: center;
}

/* "Look" switch — recolour the accent + WebGL aurora from the hero (desktop) */
.look-switch {
  display: inline-flex; align-items: center; gap: 10px; margin-right: 4px;
}
.look-switch__label {
  font: 500 10px/1 var(--font-mono); letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-3);
}
.look-dots { display: inline-flex; gap: 8px; }
.look-dot {
  width: 14px; height: 14px; padding: 0; border: 0; border-radius: 50%;
  background: var(--c); cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.look-dot:hover, .look-dot:focus-visible {
  transform: scale(1.4); outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}
.look-dot.is-on { box-shadow: 0 0 0 2px var(--canvas), 0 0 0 3.5px var(--c); }
@media (max-width: 720px) { .look-switch { display: none; } }
.hero__meta {
  font: 500 11px/1.6 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-align: right;
  display: flex; flex-direction: column; gap: 6px;
}

@media (max-width: 720px) {
  /* Center the hero content as one group — equal space above and below */
  .hero__overlay { padding: calc(var(--nav-h) + 32px) 24px 32px; justify-content: center; gap: 22px; }
  .hero__title { margin: 0; }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero__meta { text-align: left; }
  .nav { padding: 0 16px; }
  :root { --page-pad: 24px; }
}

/* === PAGE / SECTION === */
.page {
  padding: calc(var(--nav-h) + 96px) var(--page-pad) 96px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.section {
  padding: 96px var(--page-pad);
  max-width: var(--max-w);
  margin: 0 auto;
}
.section--bleed { padding: 96px 0; max-width: none; }
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 64px;
  flex-wrap: wrap; gap: 16px;
}
.section-title {
  font: 400 clamp(38px, 6vw, 84px)/0.9 var(--font-display);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}

/* === WORK STRIP (selected work — featured cards) === */
.work-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  padding: 0 var(--page-pad);
  max-width: var(--max-w);
  margin: 0 auto 96px;
}
@media (max-width: 720px) { .work-strip { grid-template-columns: 1fr; } }

.work-card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 240ms var(--ease);
}
.work-card:hover { border-color: var(--hairline-hi); }
.work-card__thumb {
  aspect-ratio: 16/9;
  background: var(--panel-2);
  border: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
}
.work-card__bg {
  position: absolute; inset: 0;
  transition: transform 600ms var(--ease);
  background-size: cover; background-position: center;
}
.work-card:hover .work-card__bg { transform: scale(1.04); }

/* Per-project gradient thumbs (placeholder visuals) */
.thumb--mil    { background: linear-gradient(135deg, #1d2017 0%, #2a3122 50%, #d8fe3c 110%); }
.thumb--aether { background: linear-gradient(135deg, #2a1e10 0%, #4a3422 40%, #ff6b1a 110%); }
.thumb--alture { background: linear-gradient(135deg, #14141c 0%, #1c1c2a 50%, #6E8CDC 120%); }
.thumb--orbit  { background: radial-gradient(circle at 30% 30%, #2a2a30, #0a0a0a 70%); }

.work-card__meta {
  display: flex; justify-content: space-between; align-items: center;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.work-card__title {
  font: 400 48px/0.95 var(--font-display);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--fg-1);
}
.work-card__role { font-size: 14px; color: var(--fg-2); }
.work-card__arrow {
  position: absolute; top: 28px; right: 28px;
  color: var(--fg-3); font-size: 18px;
  transition: color 240ms var(--ease), transform 240ms var(--ease);
}
.work-card:hover .work-card__arrow {
  color: var(--accent);
  transform: translate(4px, -4px);
}

/* === INDEX LIST (full work list) === */
.index-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--hairline);
}
.index-row {
  display: grid;
  grid-template-columns: 60px 1fr 220px 100px 40px;
  gap: 32px;
  padding: 28px var(--page-pad);
  align-items: baseline;
  border-bottom: 1px solid var(--hairline);
  transition: padding 240ms var(--ease), background 240ms var(--ease);
}
.index-row:hover {
  background: linear-gradient(90deg, transparent, rgba(216, 254, 60, 0.04), transparent);
}
.index-row:hover .idx-title { color: var(--accent); }
.idx-num   { font: 500 12px/1 var(--font-mono); color: var(--fg-3); letter-spacing: 0.08em; }
.idx-title {
  font: 400 56px/1 var(--font-display);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transition: color 240ms var(--ease);
}
.idx-role, .idx-year, .idx-arrow {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.idx-arrow { color: var(--fg-3); text-align: right; }
@media (max-width: 720px) {
  .index-row { grid-template-columns: 32px 1fr 24px; padding: 16px 24px; gap: 12px; }
  .idx-title { font-size: 32px; }
  .idx-role, .idx-year { display: none; }
}

/* === MARQUEE === */
.marquee {
  display: flex; overflow: hidden; white-space: nowrap;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-1);
}
.marquee__track {
  display: flex;
  /* 6 copies, so -50% lands on exactly 3 copies (seamless). Duration scaled to
     keep the original ~34px/s scroll speed. */
  animation: marquee 84s linear infinite;
  flex-shrink: 0;
}
.marquee__track span {
  display: inline-flex; align-items: center; gap: 36px;
  padding-right: 36px;            /* spacing lives inside each copy, not between */
  flex-shrink: 0;
}
.marquee__dot { color: var(--accent); font-size: 0.7em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 22px;
  transition: all 180ms var(--ease);
  border-radius: 999px;
}
.btn--primary { background: var(--accent); color: var(--accent-fg); }
.btn--primary:hover { background: var(--accent-press); transform: translateY(-1px); }
.btn--ghost {
  background: transparent; color: var(--fg-1);
  border: 1px solid var(--hairline-hi);
}
.btn--ghost:hover { background: var(--fg-1); color: var(--canvas); border-color: var(--fg-1); }

/* === ABOUT === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-bottom: 96px;
}
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }

.about-bio {
  font-size: 22px;
  line-height: 1.5;
  color: var(--fg-1);
  text-wrap: pretty;
}
.about-bio p + p { margin-top: 16px; }
.about-side { display: flex; flex-direction: column; gap: 32px; }
.about-side h6 {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 8px;
}
.about-side ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.about-side li {
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
}
.about-side .yr {
  font: 500 12px/1 var(--font-mono);
  color: var(--fg-3);
}

/* === CONTACT === */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px;
}
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }

.contact-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 36px; align-self: start; }
.contact-cta__lede {
  margin: 0;
  max-width: 24ch;
  font: 400 clamp(22px, 2.6vw, 30px)/1.4 var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--fg-2);
}

.contact-form { display: flex; flex-direction: column; gap: 32px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.field input, .field textarea {
  background: transparent;
  color: var(--fg-1);
  border: 0;
  border-bottom: 1px solid var(--hairline-hi);
  padding: 12px 0;
  font: 400 18px/1.4 var(--font-sans);
  outline: 0;
  transition: border-color 180ms var(--ease);
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-4); }

.contact-meta { display: flex; flex-direction: column; gap: 40px; }
.contact-meta h6 {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 8px;
}
.contact-meta a, .contact-meta .line {
  display: block;
  font: 400 clamp(28px, 3.5vw, 40px)/1.1 var(--font-display);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--fg-1);
  transition: color 180ms var(--ease);
}
.contact-meta a:hover { color: var(--accent); }

/* === FOOTER === */
.footer {
  padding: 96px var(--page-pad) 40px;
  border-top: 1px solid var(--hairline);
}
.footer__display {
  font: 400 clamp(72px, 11vw, 180px)/0.88 var(--font-display);
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin-bottom: 64px;
}
.footer__row {
  display: flex; justify-content: space-between; align-items: center;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  flex-wrap: wrap; gap: 16px;
}
.footer__row a:hover { color: var(--accent); }

/* === PROJECT DETAIL === */
.project-hero {
  padding: calc(var(--nav-h) + 64px) var(--page-pad) 64px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Full-bleed WebGL background for each project. Each project page
   sets its own shader via `data-shader="hero-{name}"` on the canvas. */
.project-hero__bg {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: block;
  /* Soft mask: keep upper-left area dark for type readability,
     full intensity on the right where the shader lives. */
  mask-image: radial-gradient(ellipse 90% 100% at 70% 55%, #000 30%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 90% 100% at 70% 55%, #000 30%, transparent 95%);
}

/* Scrim under the title so type reads well over the shader */
.project-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(10, 10, 10, 0.78) 0%,
    rgba(10, 10, 10, 0.52) 35%,
    rgba(10, 10, 10, 0.20) 60%,
    rgba(10, 10, 10, 0.00) 85%);
}
/* Keep the WebGL canvas absolutely positioned (out of flow). Without the
   :not(), this rule's `position: relative` overrides .project-hero__bg's
   `position: absolute` (equal specificity, later in source), which drops the
   canvas INTO the flex column as a ~640px block and shoves the hero text far
   down the page. Excluding it keeps the text high and immediately visible. */
.project-hero > *:not(.project-hero__bg) { position: relative; }
.project-hero__title { text-shadow: 0 2px 30px rgb(0 0 0 / 0.55); }
.project-hero__lede  { text-shadow: 0 1px 14px rgb(0 0 0 / 0.65); }

/* Spinning 3D Acorns logo, right of the Acorns hero text (desktop only).
   Selector outscopes `.project-hero > *:not(.project-hero__bg)`, which would
   otherwise force position: relative. */
.project-hero .hero-acorn {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(24px, 8vw, 150px);
  transform: translateY(-50%);
  width: clamp(180px, 18vw, 300px);
  aspect-ratio: 1 / 1.18;
  pointer-events: none;
}
.hero-acorn-canvas { display: block; width: 100%; height: 100%; }
@media (max-width: 820px) { .hero-acorn { display: none; } }

/* Elevate hero phone — the same 3D WebGL iPhone used below, holding the app
   preview video. Absolutely positioned to the right of the hero text. */
.project-hero .hero-phone {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(24px, 7vw, 130px);
  transform: translateY(-50%);
  pointer-events: none;
}
.project-hero .hero-phone .dev3d--phone { width: clamp(190px, 19vw, 280px); }
@media (max-width: 820px) { .hero-phone { display: none; } }

@media (max-width: 720px) {
  .project-hero__bg {
    mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  }
  .project-hero::after {
    background: linear-gradient(180deg,
      rgba(10, 10, 10, 0.20) 0%,
      rgba(10, 10, 10, 0.65) 60%,
      rgba(10, 10, 10, 0.85) 100%);
  }
}
.project-hero__crumbs {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 32px;
}
.project-hero__crumbs a { color: inherit; transition: color 180ms var(--ease); }
.project-hero__crumbs a:hover { color: var(--accent); }

.project-hero__title {
  font: 400 clamp(56px, 9vw, 140px)/0.88 var(--font-display);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  margin-bottom: 32px;
  text-wrap: balance;
}
.project-hero__title .it { color: var(--accent); font-style: italic; font-family: serif; font-weight: 300; }

.project-hero__lede {
  font-size: 20px; line-height: 1.5;
  color: var(--fg-2);
  max-width: 56ch;
  margin-bottom: 64px;
}
.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project-meta .col { display: flex; flex-direction: column; gap: 8px; }
.project-meta .lbl { color: var(--fg-3); font-size: 10px; }
.project-meta .val { color: var(--fg-1); }
.project-meta .val a { color: var(--accent); }

/* Inline links inside body copy — accent underline so they read as links
   without shouting; turn fully accent on hover. */
.project-body__copy a,
.project-hero__lede a,
.about-bio a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color 180ms var(--ease);
}
.project-body__copy a:hover,
.project-hero__lede a:hover,
.about-bio a:hover { color: var(--accent); }

.project-body {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 64px;
  padding: 96px var(--page-pad);
  max-width: var(--max-w);
  margin: 0 auto;
}
@media (max-width: 720px) { .project-body { grid-template-columns: 1fr; gap: 32px; padding: 64px 24px; } }
.project-body__head h3 {
  font: 400 32px/1.05 var(--font-display);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.project-body__head .eyebrow { display: block; margin-bottom: 16px; }
.project-body__copy p { font-size: 18px; margin-bottom: 24px; color: var(--fg-2); line-height: 1.6; }
.project-body__copy p:last-child { margin-bottom: 0; }

.media-block {
  aspect-ratio: 16/9;
  margin: 0 var(--page-pad) 96px;
  background: linear-gradient(135deg, #1c1c1c, #0a0a0a);
  border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-4);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.media-block--mil    { background: linear-gradient(135deg, #0d1110, #2a3122 60%, #1d2017); }
.media-block--aether { background: linear-gradient(135deg, #1d1108, #4a3422 60%, #2a1e10); }
.media-block--alture { background: linear-gradient(135deg, #14141c, #1c1c2a 60%, #14141c); }
.media-block--orbit  { background: radial-gradient(circle at 50% 50%, #1a1a20, #050507 80%); }

.next-project {
  border-top: 1px solid var(--hairline);
  padding: 64px var(--page-pad);
}
.next-project a {
  display: flex; justify-content: space-between; align-items: center;
  gap: 32px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.next-project__label {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 16px;
}
.next-project__title {
  font: 400 clamp(40px, 6vw, 80px)/0.95 var(--font-display);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  transition: color 240ms var(--ease);
}
.next-project a:hover .next-project__title { color: var(--accent); }
.next-project__arrow {
  font: 400 32px/1 var(--font-display);
  color: var(--fg-3);
  transition: color 240ms var(--ease), transform 240ms var(--ease);
}
.next-project a:hover .next-project__arrow {
  color: var(--accent); transform: translate(8px, -8px);
}

/* === REVEAL (text intro) === */
.reveal { overflow: hidden; display: inline-block; vertical-align: top; }
.reveal > * {
  display: inline-block;
  transform: translateY(110%);
  transition: transform var(--d-reveal) var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.is-in > * { transform: translateY(0); }

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

/* =========================================================
   PRODUCT UI PRIMITIVES — Cruttenden-DS native.
   Used to build the per-project mockups that replace
   placeholder gradients on home + project-page media blocks.
   ========================================================= */

.ui-screen {
  position: absolute;
  inset: 0;
  background: var(--canvas);
  display: flex; flex-direction: column;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--fg-2);
  overflow: hidden;
}
.ui-screen__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.015);
  flex-shrink: 0;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--fg-3);
}
.ui-screen__bar strong { color: var(--fg-1); font-weight: 500; }
.ui-screen__bar-group { display: inline-flex; align-items: center; gap: 10px; }
.ui-screen__body {
  flex: 1;
  position: relative;
  display: grid;
  padding: 12px;
  min-height: 0;
}
.ui-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(216, 254, 60, 0.6);
}
.ui-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 6px;
  font: 500 8px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  color: var(--fg-3);
}
.ui-pill--lime  { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.ui-pill--ok    { color: var(--positive); }
.ui-pill--warn  { color: var(--warning); }
.ui-pill--accent { color: var(--accent); }

.ui-row {
  display: flex; justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed var(--hairline);
  font-size: 10px;
}
.ui-row:last-child { border-bottom: 0; }
.ui-row__l { color: var(--fg-3); }
.ui-row__v { color: var(--fg-1); }

/* === MIL — tactical HUD primitives === */
.mil-stage {
  position: relative; inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(216, 254, 60, 0.06), transparent 60%),
    linear-gradient(135deg, #0c0e0a, #16190f);
  color: var(--accent);
  overflow: hidden;
}
.mil-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(216, 254, 60, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 254, 60, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000 30%, transparent 80%);
}
.mil-reticle {
  position: absolute;
  left: 50%; top: 50%;
  width: 28%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.mil-reticle::before, .mil-reticle::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0.7;
}
.mil-reticle::after { inset: -22%; border-style: dashed; opacity: 0.35; }
.mil-reticle__cross {
  position: absolute; inset: 0;
  background:
    linear-gradient(var(--accent), var(--accent)) center/1px 100% no-repeat,
    linear-gradient(var(--accent), var(--accent)) center/100% 1px no-repeat;
  opacity: 0.65;
}
.mil-bracket {
  position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--accent);
}
.mil-bracket--tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.mil-bracket--tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.mil-bracket--bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.mil-bracket--br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.mil-panel {
  position: absolute;
  background: rgba(10, 10, 10, 0.78);
  border: 1px solid rgba(216, 254, 60, 0.32);
  padding: 10px;
  font-size: 10px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.mil-panel h6 {
  margin: 0 0 6px;
  font: 500 8px/1 var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(216, 254, 60, 0.65);
  display: flex; justify-content: space-between;
}

.mil-track {
  position: absolute;
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 8px/1 var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--accent);
}
.mil-track__sym {
  width: 14px; height: 14px;
  border: 1.4px solid currentColor;
  background: rgba(10, 10, 10, 0.55);
}
.mil-track--friendly .mil-track__sym { border-radius: 50%; }
.mil-track--hostile { color: var(--negative); }
.mil-track--hostile .mil-track__sym {
  width: 14px; height: 14px;
  transform: rotate(45deg);
}
.mil-track--unknown { color: var(--warning); }
.mil-track--unknown .mil-track__sym {
  border-radius: 7px 7px 7px 7px / 5px 5px 5px 5px;
  border-top: 0; border-bottom: 0;
}

.mil-progress {
  height: 3px;
  background: rgba(216, 254, 60, 0.18);
  position: relative; overflow: hidden;
  margin-top: 3px;
}
.mil-progress > span {
  position: absolute; inset: 0;
  width: var(--v, 50%);
  background: var(--accent);
  box-shadow: 0 0 6px rgba(216, 254, 60, 0.6);
}
.mil-progress--warn > span { background: var(--warning); box-shadow: 0 0 6px var(--warning); }

/* === AETHER — type playground primitives === */
.ae-stage {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 35% 50%, rgba(216, 254, 60, 0.04), transparent 60%),
    linear-gradient(135deg, #0a0a0a, #141414);
  display: grid;
  grid-template-columns: 1fr 200px;
  overflow: hidden;
}
.ae-canvas {
  position: relative;
  display: grid; place-items: center;
  padding: 24px;
  border-right: 1px solid var(--hairline);
}
.ae-word {
  font-family: 'Mona Sans', var(--font-sans);
  font-size: clamp(48px, 9vw, 120px);
  color: var(--fg-1);
  letter-spacing: -0.05em;
  line-height: 0.9;
  font-variation-settings: 'wght' 580, 'wdth' 112;
}
.ae-word .it {
  color: var(--accent);
  font-style: italic;
  font-family: serif;
  font-weight: 300;
}
.ae-caption {
  position: absolute;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.ae-caption--tl { top: 14px; left: 14px; }
.ae-caption--br { bottom: 14px; right: 14px; color: var(--accent); }

.ae-controls {
  padding: 18px 16px;
  display: flex; flex-direction: column;
  gap: 18px;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.10em;
}
.ae-slider { display: grid; gap: 6px; }
.ae-slider__head { display: flex; justify-content: space-between; }
.ae-slider__l { color: var(--fg-3); letter-spacing: 0.18em; text-transform: uppercase; }
.ae-slider__v { color: var(--fg-1); font-feature-settings: "tnum"; }
.ae-slider__track {
  height: 3px;
  background: var(--hairline);
  position: relative;
}
.ae-slider__fill {
  position: absolute; inset: 0;
  width: var(--v, 60%);
  background: var(--accent);
}
.ae-slider__thumb {
  position: absolute; top: 50%;
  left: var(--v, 60%);
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(216, 254, 60, 0.5);
}

/* === ALTURE — dashboard primitives === */
.al-stage {
  position: absolute; inset: 0;
  background: var(--canvas);
  padding: 18px 22px;
  display: flex; flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.al-headline { display: flex; justify-content: space-between; align-items: flex-end; }
.al-headline__label {
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 6px;
}
.al-headline__num {
  font: 400 clamp(40px, 5.5vw, 64px)/0.95 var(--font-display);
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--fg-1);
}
.al-headline__delta {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.10em;
  color: var(--positive);
  margin-top: 4px;
}
.al-headline__right {
  text-align: right;
  font: 500 10px/1.4 var(--font-mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.al-alloc { display: flex; flex-direction: column; gap: 6px; }
.al-alloc__label {
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.al-alloc__bar {
  display: flex; height: 8px;
  border: 1px solid var(--hairline);
}
.al-alloc__bar span { display: block; }
.al-alloc__legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  font: 500 9px/1.4 var(--font-mono);
  letter-spacing: 0.10em;
  color: var(--fg-3);
}
.al-alloc__legend span { display: inline-flex; align-items: center; gap: 5px; }
.al-alloc__legend i {
  width: 7px; height: 7px;
  display: inline-block;
}

.al-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
}
.al-stat {
  padding: 12px 10px;
  border-right: 1px solid var(--hairline);
  display: grid; gap: 4px;
}
.al-stat:last-child { border-right: 0; }
.al-stat__l {
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.al-stat__v {
  font: 400 22px/1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--fg-1);
}
.al-stat__sub { font: 500 9px/1 var(--font-mono); color: var(--fg-2); letter-spacing: 0.08em; }
.al-stat__sub--up   { color: var(--positive); }
.al-stat__sub--down { color: var(--negative); }

.al-table {
  border-top: 1px solid var(--hairline);
  font: 400 11px/1.5 var(--font-mono);
}
.al-table__row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 0.6fr;
  padding: 8px 4px;
  border-bottom: 1px dashed var(--hairline);
  color: var(--fg-2);
}
.al-table__row--head { color: var(--fg-3); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; }
.al-table__row:last-child { border-bottom: 0; }
.al-table__pos { color: var(--fg-1); }
.al-table__num { text-align: right; font-feature-settings: "tnum"; }
.al-table__num--up { color: var(--positive); }
.al-table__num--down { color: var(--negative); }

/* === ORBIT — ops console primitives === */
.ob-stage {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, #16161c, #0a0a0a 80%);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  overflow: hidden;
}
.ob-schedule {
  position: relative;
  display: flex; flex-direction: column;
  gap: 10px;
}
.ob-schedule__head {
  display: flex; justify-content: space-between;
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.ob-track {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  align-items: center;
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.ob-track__bar {
  position: relative;
  height: 16px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 1px;
}
.ob-pass {
  position: absolute; top: 1px; bottom: 1px;
  background: rgba(216, 254, 60, 0.20);
  border: 1px solid rgba(216, 254, 60, 0.5);
  padding: 0 4px;
  font-size: 8px;
  display: flex; align-items: center;
  color: var(--fg-1);
}
.ob-pass--live { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
.ob-pass--queued { background: rgba(216, 254, 60, 0.10); border-color: rgba(216, 254, 60, 0.30); }
.ob-pass--done { background: transparent; border-color: var(--hairline); color: var(--fg-3); opacity: 0.6; }
.ob-now {
  position: absolute; top: 0; bottom: 0;
  width: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.ob-detail {
  border-left: 1px solid var(--hairline);
  padding-left: 18px;
  display: flex; flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.ob-detail__name {
  font: 400 24px/1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--fg-1);
}
.ob-globe {
  width: 100%; max-width: 140px;
  aspect-ratio: 1;
  margin: 4px 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a2f30, #0a0a0a 80%);
  position: relative;
  border: 1px solid var(--hairline);
}
.ob-globe svg { width: 100%; height: 100%; }
.ob-globe__sat {
  position: absolute;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transform: translate(-50%, -50%);
}

/* =========================================================
   THUMB-SCALE wrapper — scales any .ui-screen contents to fit
   a 16:9 work-card thumb gracefully. Body shrinks gracefully.
   ========================================================= */
.thumb-fit {
  position: absolute; inset: 0;
}
.thumb-fit .al-stage      { padding: 14px 16px; gap: 10px; }
.thumb-fit .al-headline__num { font-size: clamp(28px, 4vw, 40px); }
.thumb-fit .al-stat__v    { font-size: 16px; }
.thumb-fit .al-stat       { padding: 8px 6px; }
.thumb-fit .al-table__row { padding: 5px 2px; font-size: 9px; }
.thumb-fit .mil-stage     { font-size: 9px; }

/* =========================================================
   MOBILE APP MOCKS — phone frames for Acorns / Blast.
   Stays within DS tokens; each app sets --app-accent.
   ========================================================= */

.phone-row {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(16px, 3vw, 40px);
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 90% at 50% 50%, rgba(255,255,255,0.02), transparent 70%),
    linear-gradient(160deg, #16161a, #0a0a0a);
  overflow: hidden;
}
.phone {
  --app-accent: var(--accent);
  --app-accent-fg: var(--accent-fg);
  height: 90%;
  aspect-ratio: 9 / 19;
  background: #000;
  border-radius: 26px;
  border: 1px solid var(--hairline-hi);
  padding: 6px;
  position: relative;
  box-shadow: 0 24px 80px -24px rgba(0,0,0,0.9);
  flex-shrink: 0;
}
.phone--back { height: 78%; opacity: 0.55; transform: translateY(6%); }
.phone__screen {
  width: 100%; height: 100%;
  border-radius: 21px;
  overflow: hidden;
  background: #0c0d10;
  display: flex; flex-direction: column;
  position: relative;
  font-family: var(--font-sans);
}
.phone__notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 32%; height: 5px; border-radius: 999px;
  background: rgba(255,255,255,0.18);
  z-index: 5;
}

/* App scaffolding */
.app {
  flex: 1;
  display: flex; flex-direction: column;
  padding: 26px 16px 0;
  min-height: 0;
  overflow: hidden;
}
.app__bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.app__wordmark {
  font: 400 16px/1 var(--font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg-1);
}
.app__wordmark b { color: var(--app-accent); }
.app__avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--app-accent);
}
.app__label {
  font: 500 8px/1 var(--font-mono);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 5px;
}
.app__balance {
  font: 400 clamp(30px, 6vw, 44px)/0.95 var(--font-display);
  letter-spacing: -0.02em; color: var(--fg-1);
}
.app__delta {
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.08em; color: var(--positive);
  margin-top: 4px;
}
.app__chart { width: 100%; height: 56px; margin: 14px 0; display: block; }
.app__tile {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.app__tile-l { display: flex; flex-direction: column; gap: 3px; }
.app__tile-title { font: 600 12px/1 var(--font-sans); color: var(--fg-1); }
.app__tile-sub { font: 500 9px/1.3 var(--font-mono); letter-spacing: 0.06em; color: var(--fg-3); }
.app__tile-v { font: 400 18px/1 var(--font-display); color: var(--app-accent); letter-spacing: -0.01em; }
.app__pill {
  font: 600 8px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  background: var(--app-accent); color: var(--app-accent-fg);
}
.app__cta {
  margin: auto 0 0;
  text-align: center;
  font: 600 11px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 13px; border-radius: 999px;
  background: var(--app-accent); color: var(--app-accent-fg);
}
.app__tabbar {
  display: flex; justify-content: space-around;
  padding: 12px 8px calc(12px + env(safe-area-inset-bottom, 8px));
  border-top: 1px solid var(--hairline);
  background: rgba(0,0,0,0.4);
  flex-shrink: 0;
}
.app__tab {
  font: 500 7.5px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-4);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.app__tab::before {
  content: ''; width: 14px; height: 14px; border-radius: 4px;
  border: 1.5px solid currentColor;
}
.app__tab--active { color: var(--app-accent); }

/* Blast game grid */
.app__games { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.app__game {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.app__game-art {
  aspect-ratio: 16/10; border-radius: 5px;
  background: linear-gradient(135deg, var(--app-accent), #1c1c1c);
}
.app__game-name { font: 600 10px/1 var(--font-sans); color: var(--fg-1); }
.app__game-earn { font: 500 8px/1 var(--font-mono); letter-spacing: 0.08em; color: var(--app-accent); }
.app__progress {
  height: 5px; border-radius: 999px; background: var(--hairline); position: relative; overflow: hidden;
  margin-top: 5px;
}
.app__progress > span { position: absolute; inset: 0; width: var(--v, 50%); background: var(--app-accent); }

/* Thumb-scale tweaks for phones inside work cards */
.thumb-fit .phone-row { padding: 14px; gap: 14px; }
.thumb-fit .phone { height: 96%; }

/* =========================================================
   3D DEVICE PLACEHOLDERS (rendered by js/device3d.js).
   Each reserves layout space; the <img> is the flat fallback
   (hidden once the 3D renderer takes over). A single fixed
   WebGL canvas draws the rotating device into each rect.
   ========================================================= */
.dev-stage {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  gap: clamp(18px, 4vw, 64px);
  padding: clamp(40px, 6vw, 88px) clamp(20px, 4vw, 48px);
  max-width: 1320px; margin: 0 auto;
}
.dev3d {
  position: relative;
  flex: 0 0 auto;
}
.dev3d--phone   { width: clamp(216px, 25vw, 310px); aspect-ratio: 0.60; }
/* Two desktop devices side by side per row (half the stage minus the gap). */
.dev3d--desktop { width: calc(50% - clamp(9px, 2vw, 32px)); max-width: 620px; aspect-ratio: 1.60; }
.dev3d > img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}
/* Flat <video> fallback (shown only if WebGL is unavailable). */
.dev3d > video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 30px;
}
.dev3d__cap {
  position: absolute; left: 0; right: 0; bottom: 2px;
  text-align: center;
  font: 600 9px/1 var(--font-mono);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  pointer-events: none;
}
.dev3d__cap span { color: var(--fg-3); }
/* Desktop captions sit lower — the monitor + stand leave room below. */
.dev3d--desktop .dev3d__cap { transform: translateY(48px); }

/* Sound toggle pill (e.g. under the Acorns app-preview phone). */
.sound-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--hairline-hi);
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg-2);
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.sound-toggle:hover { background: rgba(255, 255, 255, 0.08); color: var(--fg-1); }
.sound-toggle.is-on { border-color: var(--accent); color: var(--accent); background: rgba(255, 255, 255, 0.05); }
.sound-toggle__icon { font-size: 13px; line-height: 1; }

/* Acorns app-preview: a short App Store note on the left, 3D phone + sound
   pill on the right (DOM order is phone-first, so row-reverse puts the copy
   left on desktop; mobile stacks phone-first via column). */
.acorns-preview { gap: clamp(28px, 6vw, 80px); flex-wrap: wrap; flex-direction: row-reverse; }
.acorns-preview .preview-phone {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  flex: 0 0 auto;
}
.acorns-preview .preview-copy { flex: 1 1 360px; max-width: 430px; text-align: left; }
.acorns-preview .preview-copy .eyebrow { margin: 0 0 14px; }
.acorns-preview .preview-copy__text {
  margin: 0;
  font: 400 clamp(16px, 1.5vw, 19px)/1.6 var(--font-sans);
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--fg-2);
}
@media (max-width: 760px) {
  .acorns-preview { flex-direction: column; }
  .acorns-preview .preview-copy { max-width: 48ch; text-align: center; flex-basis: auto; }
}

/* Acorns HQ photography (shot on-site) — overlapping, uncropped collage. */
.hq-collage {
  position: relative;
  width: min(1180px, calc(100% - 2 * clamp(20px, 4vw, 48px)));
  margin: clamp(28px, 5vw, 64px) auto clamp(72px, 9vw, 120px);
  aspect-ratio: 16 / 9;
}
.hq-collage figure {
  position: absolute;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 64px -26px rgba(0, 0, 0, 0.82);
}
.hq-collage img { display: block; width: 100%; height: auto; }   /* uncropped */
.hq-collage .c1 { width: 46%; left: 2%;  top: 4%;  transform: rotate(-2.5deg); z-index: 4; }
.hq-collage .c2 { width: 35%; left: 44%; top: 2%;  transform: rotate(2.5deg);  z-index: 2; }
.hq-collage .c3 { width: 37%; left: 30%; top: 44%; transform: rotate(-1.5deg); z-index: 3; }
.hq-collage .c4 { width: 34%; right: 1%; top: 32%; transform: rotate(3deg);    z-index: 1; }
.hq-collage .c5 { width: 22%; left: 2%;  top: 44%; transform: rotate(-4deg);   z-index: 5; }
@media (max-width: 760px) {
  .hq-collage { aspect-ratio: auto; display: block; padding-bottom: 32px; }
  .hq-collage figure { position: relative; width: 84% !important; left: auto !important;
    right: auto !important; top: auto !important; margin: 0 0 -9%; }
  .hq-collage figure:nth-child(odd)  { margin-left: 0;   transform: rotate(-1.5deg); }
  .hq-collage figure:nth-child(even) { margin-left: 16%; transform: rotate(1.5deg); }
}

/* Mobile: bigger 3D devices; keep the fixed device aspect so the WebGL frames
   correctly. Desktop devices stack one per row (two would be too small). */
@media (max-width: 760px) {
  .dev3d--phone   { width: min(74vw, 360px); }
  .dev3d--desktop { width: 100%; max-width: 560px; }
  /* Stacked desktop monitors: the caption sits 48px below each, so add room
     above the next one or its top clips into that caption text. */
  .dev-stage .dev3d--desktop { margin-top: 40px; }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Work list — name on the left, picture on the right.
   (Replaces the old featured cards + text index.)
   ============================================================ */
.work-list {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px var(--page-pad) 48px;
}
.work-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  padding: clamp(30px, 4vw, 60px) 0;
  border-top: 1px solid var(--hairline);
  text-decoration: none;
  color: inherit;
}
.work-list .work-row:last-of-type { border-bottom: 1px solid var(--hairline); }

.work-row__info { display: flex; flex-direction: column; gap: 16px; }
.work-row__name {
  margin: 0;
  font: 400 clamp(34px, 5.4vw, 84px)/0.92 var(--font-display);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  transition: color 240ms var(--ease);
}
.work-row:hover .work-row__name { color: var(--accent); }
.work-row__role { margin: 0; font-size: 15px; line-height: 1.5; color: var(--fg-2); max-width: 40ch; }
.work-row__tag {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3);
}
.work-row__pill {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--hairline-hi);
  background: rgba(245, 241, 234, 0.03);
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2);
}
.work-row__pill::before {
  content: ""; flex: 0 0 6px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
}

.work-row__pic {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--hairline);
}
.work-row__pic img {
  display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  transition: transform 600ms var(--ease);
}
.work-row:hover .work-row__pic img { transform: scale(1.04); }

.work-row__arrow {
  position: absolute; top: clamp(48px, 7vw, 92px); right: clamp(16px, 2.5vw, 32px);
  font-size: 20px; color: var(--fg-3);
  transition: transform 240ms var(--ease), color 240ms var(--ease);
}
.work-row:hover .work-row__arrow { color: var(--accent); transform: translate(4px, -4px); }

/* "More work" divider before the concept pieces */
.work-list__divider {
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding-top: 4px;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-3);
}

/* Bottom-tier "pictures" — abstract brand tiles (no photo available) */
.work-row__pic--grad {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  display: grid; place-items: center;
}
.work-row__pic--mil    { background: radial-gradient(130% 130% at 72% 18%, #2c360a 0%, #0b0c08 70%); }
.work-row__pic--aether { background: radial-gradient(130% 130% at 72% 18%, #3a1d0b 0%, #0c0a08 70%); }
.work-row__pic--orbit  { background: radial-gradient(130% 130% at 72% 18%, #0a2740 0%, #07090c 70%); }
.work-row__pic-label {
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: 0.24em; text-transform: uppercase; color: rgba(245, 241, 234, 0.5);
}

@media (max-width: 760px) {
  .work-row { grid-template-columns: 1fr; gap: 18px; padding: 28px 0; }
  .work-row__name { font-size: clamp(40px, 12vw, 60px); }
  .work-row__arrow { position: static; align-self: start; }
}
