/* Alpha Z · Website tokens
   Based on DESIGN_STANDARD.md v1.0 */

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

:root {
  /* Brand */
  --graphite: #1A1A1A;
  --bone: #F5F5F0;
  --signal-teal: #5DCAA5;

  /* Derived */
  --ink-900: #1A1A1A;
  --ink-700: #3A3A3A;
  --ink-500: #6B6B6B;
  --ink-300: #B5B5B0;
  --ink-200: #D9D9D2;
  --paper: #FAFAF7;
  --paper-tint: #F0F0EA;
  --graphite-deep: #0E0E0E;

  /* Type */
  --font-display: 'Jost', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Containers */
  --container-narrow: 720px;
  --container: 1080px;
  --container-wide: 1280px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { background: var(--paper); color: var(--ink-900); font-family: var(--font-body); font-size: 16px; line-height: 1.625; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
img, svg { display: block; }
ul { list-style: none; }

::selection { background: var(--graphite); color: var(--bone); }

:focus-visible { outline: 2px solid var(--graphite); outline-offset: 3px; }

/* ───────── Typography utilities ───────── */
.t-display-xl { font-family: var(--font-display); font-weight: 500; font-size: clamp(48px, 6.5vw, 80px); line-height: 1.05; letter-spacing: -0.025em; }
.t-display-l  { font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 4.6vw, 56px); line-height: 1.07; letter-spacing: -0.022em; }
.t-display-m  { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; }
.t-h1         { font-family: var(--font-display); font-weight: 500; font-size: 32px; line-height: 1.19; letter-spacing: -0.018em; }
.t-h2         { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1.25; letter-spacing: -0.015em; }
.t-h3         { font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 1.4; letter-spacing: -0.01em; }
.t-lead       { font-family: var(--font-body); font-weight: 400; font-size: 20px; line-height: 1.6; }
.t-body       { font-family: var(--font-body); font-weight: 400; font-size: 16px; line-height: 1.625; }
.t-body-s     { font-family: var(--font-body); font-weight: 400; font-size: 14px; line-height: 1.57; }
.t-ui         { font-family: var(--font-body); font-weight: 500; font-size: 14px; line-height: 1.43; letter-spacing: -0.005em; }
.t-label      { font-family: var(--font-mono); font-weight: 500; font-size: 12px; line-height: 1.33; letter-spacing: 0.08em; text-transform: uppercase; }
.t-meta       { font-family: var(--font-mono); font-weight: 400; font-size: 13px; line-height: 1.53; }
.t-caption    { font-family: var(--font-body); font-weight: 400; font-size: 12px; line-height: 1.5; letter-spacing: 0.01em; }

.ink-500 { color: var(--ink-500); }
.ink-700 { color: var(--ink-700); }

/* ───────── Containers ───────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }

@media (min-width: 768px) { .container, .container-wide, .container-narrow { padding-inline: 40px; } }
@media (min-width: 1024px) { .container, .container-wide, .container-narrow { padding-inline: 64px; } }

/* ───────── Nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 96px;
  transition: height 280ms var(--ease), background 280ms var(--ease);
}
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--ink-200);
  opacity: 1; transition: opacity 280ms var(--ease);
  pointer-events: none;
}
.nav.is-scrolled { height: 56px; background: rgba(250, 250, 247, 0.72); }
.nav.is-scrolled::after { opacity: 0; }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.nav-logo {
  display: block;
  position: relative;
  /* reserve space matching the lockup so swapping to mark doesn't collapse layout */
  width: 117px; height: 61px;
  transition: width 280ms var(--ease), height 280ms var(--ease);
}
.nav.is-scrolled .nav-logo { width: 28px; }
.nav-logo > span {
  display: block;
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  background-position: left center;
  background-repeat: no-repeat;
  background-size: contain;
  transition: opacity 280ms var(--ease), transform 280ms var(--ease);
}
.nav-logo-lockup {
  background-image: url("assets/lockup_light.png");
  width: 117px; height: 61px; opacity: 1;
}
.nav-logo-mark {
  background-image: url("assets/mark_light.png");
  width: 32px; height: 32px; opacity: 0;
}
.nav.is-scrolled .nav-logo { height: 28px; }
.nav.is-scrolled .nav-logo-lockup { opacity: 0; transform: translateY(-50%) scale(0.96); }
.nav.is-scrolled .nav-logo-mark   { opacity: 1; width: 28px; height: 28px; }
.nav-links { display: flex; gap: 18px; margin-left: auto; }
@media (min-width: 768px) { .nav-links { gap: 32px; } }
.nav-link {
  font-family: var(--font-body); font-weight: 500; font-size: 13px;
  color: var(--ink-900);
  padding: 4px 0; position: relative;
  transition: color 160ms var(--ease);
}
@media (min-width: 768px) { .nav-link { font-size: 14px; } }
.nav-link.active::after,
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -28px;
  height: 2px; background: var(--graphite);
}
.nav-link:hover { color: var(--ink-700); }

/* ───────── Buttons ───────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; font-family: var(--font-body); font-weight: 500; font-size: 14px; letter-spacing: -0.005em; border-radius: 0; transition: background 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease); white-space: nowrap; }
.btn-primary { background: var(--graphite); color: var(--bone); border: 1px solid var(--graphite); }
.btn-primary:hover { background: var(--graphite-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink-900); border: 1px solid var(--ink-900); }
.btn-ghost:hover { background: var(--ink-900); color: var(--paper); }
.btn-arrow { transition: transform 200ms var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ───────── Section label ───────── */
.section-label-wrap { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.section-label-rule { width: 64px; height: 1px; background: var(--ink-200); }
.section-label { color: var(--ink-500); }

/* ───────── Section spacing ───────── */
.section { padding-block: 64px; }
@media (min-width: 768px) { .section { padding-block: 96px; } }
@media (min-width: 1024px) { .section { padding-block: 128px; } }

.section-tight { padding-block: 48px; }
@media (min-width: 1024px) { .section-tight { padding-block: 80px; } }

/* ───────── Hero ───────── */
.hero-section {
  position: relative;
  overflow: hidden;
  padding-block: 64px;
  min-height: 460px;
  display: flex;
  align-items: center;
}
@media (min-width: 768px) { .hero-section { padding-block: 80px; min-height: 540px; } }
@media (min-width: 1024px) { .hero-section { padding-block: 96px; min-height: 620px; } }

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-bg svg { width: 100%; height: 100%; display: block; }

/* Desktop / tablet: wide HeroFigure fills the hero. Mobile override below. */
.hero-bg-wide { position: absolute; inset: 0; }

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-headline {
  max-width: 14ch;
  font-weight: 500;
}
.hero-lead {
  max-width: 48ch;
  margin-top: 28px;
  color: var(--ink-700);
}

/* ───────── Hero figure (Alpha Z mark · α → Z trajectory) ───────── */
.hero-figure { width: 100%; height: 100%; display: block; }

/* Cells — all visible at rest; lit/dim state drives the sequence */
.hf-empty { fill: var(--ink-200); }
.hf-ext   { fill: var(--ink-200); }
.hf-path  { fill: var(--graphite); }
.hf-off   { fill: var(--graphite); opacity: 0.32; }
.hf-alpha { fill: var(--signal-teal); }
.hf-omega { fill: var(--signal-teal); }

/* Cell-group dim/lit — fade in as path advances */
.hf-cell-grp { transition: opacity 280ms cubic-bezier(0.2, 0, 0, 1); }
.hf-cell-grp.is-dim { opacity: 0.12; }
.hf-cell-grp.is-lit { opacity: 1; }

/* Cell number labels */
.hf-num {
  font-family: var(--font-mono);
  font-size: 3.2px;
  font-weight: 500;
  letter-spacing: 0;
  pointer-events: none;
  user-select: none;
}
.hf-num.is-light { fill: var(--bone); }
.hf-num.is-dark  { fill: var(--ink-900); }

@media (prefers-reduced-motion: reduce) {
  .hf-cell-grp { transition: none; }
  .hf-cell-grp.is-dim { opacity: 1; }
}

/* ───────── §2 What ───────── */
/* Left-aligned per brand: "Asymmetric, left-aligned narrative layouts. Not centered hero stacks." */
.layers-title {
  max-width: 24ch;
  margin: 0 0 56px;
}
@media (min-width: 1024px) { .layers-title { margin-bottom: 72px; } }

.layers-doc {
  max-width: 920px;
  margin: 0;
  border-top: 1px solid var(--ink-900);
  border-bottom: 1px solid var(--ink-900);
}
.layer-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 40px;
  padding: 22px 8px;
  align-items: center;
}
.layer-row + .layer-row { border-top: 1px solid var(--ink-200); }
@media (max-width: 720px) {
  .layer-row { grid-template-columns: 1fr; gap: 12px; padding: 20px 4px; }
  .layer-row .layer-meta { flex-direction: row; align-items: baseline; gap: 12px; }
}
.layer-meta {
  display: flex; flex-direction: column; gap: 4px;
}
.layer-role {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 500;
  letter-spacing: -0.012em; line-height: 1.1;
  color: var(--ink-900);
}
.layer-body { display: flex; flex-direction: column; gap: 6px; }
.layer-name {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500;
  letter-spacing: -0.015em; line-height: 1.2;
}
.layer-body p { color: var(--ink-700); max-width: 60ch; }
.layer-body .emph { color: var(--ink-900); font-weight: 500; }

/* Coda — locked closing copy, left-aligned, two-beat */
.layers-coda {
  max-width: 920px;
  margin: 56px 0 0;
}
@media (min-width: 1024px) { .layers-coda { margin-top: 72px; } }
.layers-coda p { color: var(--ink-900); }
.layers-coda p + p { color: var(--ink-500); margin-top: 2px; }

/* ───────── §3 How it works ───────── */
.how-head { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: end; }
@media (min-width: 1024px) { .how-head { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 96px; } }
.pullquote { border-left: 2px solid var(--graphite); padding-left: 24px; color: var(--ink-500); max-width: 28ch; }
.steps { display: grid; gap: 48px; margin-top: 64px; grid-template-columns: 1fr; border-top: 1px solid var(--ink-200); padding-top: 48px; }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.step { display: flex; flex-direction: column; gap: 24px; position: relative; }
.step + .step { border-top: 1px solid var(--ink-200); padding-top: 32px; }
@media (min-width: 1024px) { .step + .step { border-top: none; padding-top: 0; border-left: 1px solid var(--ink-200); padding-left: 24px; } }

/* B1 · Tablet / split-screen (768–1023): 2×2 grid for §3.
   Reset the linear ".step + .step" border-top, then re-apply per grid position. */
@media (min-width: 768px) and (max-width: 1023px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px; column-gap: 40px; }
  .step + .step { border-top: none; padding-top: 0; }
  .step:nth-child(2) { border-left: 1px solid var(--ink-200); padding-left: 32px; }
  .step:nth-child(3),
  .step:nth-child(4) { border-top: 1px solid var(--ink-200); padding-top: 32px; }
  .step:nth-child(4) { border-left: 1px solid var(--ink-200); padding-left: 32px; }
}
.step-name { font-family: var(--font-display); font-weight: 500; font-size: 28px; letter-spacing: -0.018em; }
.step-body { color: var(--ink-700); }
.axis-line { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--graphite); display: none; grid-template-columns: repeat(4, 1fr); gap: 32px; }
@media (min-width: 1024px) { .axis-line { display: grid; } }
.axis-tick { display: flex; flex-direction: column; gap: 6px; padding-left: 24px; position: relative; color: var(--ink-500); }
.axis-tick:first-child { padding-left: 0; }
.axis-tick::before { content: ""; position: absolute; top: -17px; left: 24px; width: 1px; height: 8px; background: var(--graphite); }
.axis-tick:first-child::before { left: 0; }

/* ───────── §4 Applications ───────── */
.apps-grid { display: grid; gap: 0; border-top: 1px solid var(--ink-200); margin-top: 64px; }
@media (min-width: 768px) { .apps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .apps-grid { grid-template-columns: repeat(3, 1fr); } }
.app-card {
  display: block; padding: 32px; border-bottom: 1px solid var(--ink-200);
  position: relative;
  transition: background 200ms var(--ease);
}
@media (min-width: 768px) { .app-card { border-right: 1px solid var(--ink-200); } .app-card:nth-child(2n) { border-right: none; } }
@media (min-width: 1024px) { .app-card { border-right: 1px solid var(--ink-200); } .app-card:nth-child(2n) { border-right: 1px solid var(--ink-200); } .app-card:nth-child(3n) { border-right: none; } }
.app-card:hover { background: var(--paper-tint); }
.app-card-label { color: var(--ink-500); margin-bottom: 16px; }
.app-card-title { margin-bottom: 12px; }
.app-card-desc { color: var(--ink-700); max-width: 36ch; }
.app-card-cta { margin-top: 32px; display: inline-flex; align-items: center; gap: 8px; color: var(--ink-900); font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.app-card:hover .btn-arrow { transform: translateX(3px); }

/* ───────── §5 Stance ───────── */
.stance-grid { display: grid; gap: 64px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .stance-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 96px; } }
.stance-body p { color: var(--ink-700); }
.stance-body .emph { color: var(--ink-900); font-weight: 500; }

/* ───────── §6 Careers chip ───────── */
.careers-chip { border-top: 1px solid var(--ink-200); padding-top: 64px; display: grid; gap: 64px; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 1024px) { .careers-chip { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 96px; } }
.careers-chip-body { color: var(--ink-700); max-width: 48ch; margin-top: 16px; }

/* ───────── Footer ───────── */
.footer { background: var(--graphite-deep); color: var(--bone); padding: 96px 0 48px; margin-top: 96px; }
.footer-grid { display: grid; gap: 64px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.footer-lockup-img {
  display: block;
  width: 117px; height: 61px;
  background-image: url("assets/lockup_dark.png");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: contain;
}
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(245,245,240,0.5); margin-bottom: 20px; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 15px; color: var(--bone); transition: color 160ms var(--ease); }
.footer-col a:hover { color: rgba(245,245,240,0.7); }

/* Social link · icon + text · used for LinkedIn / X / etc. in footer */
.footer-col .social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  line-height: 1;
}
.footer-col .social-link svg {
  display: block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.footer-signature { margin-top: 80px; padding-top: 32px; border-top: 1px solid rgba(245,245,240,0.12); display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-signature .meta { color: rgba(245,245,240,0.5); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }

/* ───────── Side index ───────── */
.side-index {
  position: fixed; right: 16px; top: 50%; transform: translateY(-50%);
  z-index: 30; display: none; flex-direction: column; gap: 12px;
  padding: 14px 10px;
}
@media (min-width: 1440px) { .side-index { display: flex; } }
.side-index a { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-300); transition: color 160ms var(--ease); }
.side-index a:hover { color: var(--ink-900); }
.side-index a.active { color: var(--ink-900); }
.side-index .tick { width: 8px; height: 1px; background: currentColor; flex-shrink: 0; transition: width 200ms var(--ease); }
.side-index a.active .tick { width: 20px; }
.side-index .num { width: 14px; }
.side-index .label { display: none; }
.side-index a.active .label { display: inline; }

/* Scroll progress on right edge */
.scroll-progress { position: fixed; top: 0; right: 0; bottom: 0; width: 2px; z-index: 40; pointer-events: none; }
.scroll-progress::before { content: ""; position: absolute; inset: 0; background: var(--ink-200); }
.scroll-progress-bar { position: absolute; top: 0; left: 0; right: 0; background: var(--graphite); transform-origin: top; }
.scroll-progress-meta { position: fixed; bottom: 24px; right: 24px; z-index: 40; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--ink-500); text-transform: uppercase; pointer-events: none; }

/* ───────── Application detail ───────── */
.app-detail { padding-block: 80px; }

/* Detail page header — back link on the left, position indicator on the right. */
.app-detail .app-detail-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-bottom: 40px;
}
.app-detail .crumb { color: var(--ink-500); }
.app-detail .back-link {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-700);
  transition: color 160ms var(--ease);
}
.app-detail .back-link:hover { color: var(--ink-900); }
.app-detail .back-link .back-arrow {
  display: inline-block;
  transition: transform 200ms var(--ease);
}
.app-detail .back-link:hover .back-arrow { transform: translateX(-2px); }

@media (max-width: 600px) {
  .app-detail .app-detail-header { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 32px; }
}
.app-detail h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; max-width: 24ch; margin-bottom: 64px; }
.app-detail section { border-top: 1px solid var(--ink-200); padding-top: 32px; margin-top: 48px; }
.app-detail section:first-of-type { margin-top: 0; }
.app-detail section h2 { font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.012em; margin-bottom: 24px; }
.app-detail p { color: var(--ink-700); margin-block: 1em; }
.app-detail .adjacent { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 24px; }
@media (min-width: 600px) { .app-detail .adjacent { grid-template-columns: 1fr 1fr; gap: 24px; } }
.app-detail .adjacent a { display: block; border: 1px solid var(--ink-200); padding: 24px; transition: border-color 200ms var(--ease); }
.app-detail .adjacent a:hover { border-color: var(--ink-900); }
.app-detail .adjacent .label { color: var(--ink-500); margin-bottom: 8px; }

/* ───────── Careers ───────── */
.careers-hero { padding-block: 96px 48px; }
.careers-hero h1 { max-width: 22ch; }
.careers-hero p.lead { color: var(--ink-700); margin-top: 32px; max-width: 52ch; }

.roles-list { border-top: 1px solid var(--ink-200); margin-top: 64px; }
.role-row { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 32px 0; border-bottom: 1px solid var(--ink-200); }
@media (min-width: 1024px) { .role-row { grid-template-columns: minmax(0, 0.45fr) minmax(0, 1fr); gap: 64px; align-items: start; } }
.role-row h3 { font-family: var(--font-display); font-weight: 500; font-size: 24px; letter-spacing: -0.015em; }

/* When the whole row is a link to /careers/<slug> · adds hover + link reset.
   Grid layout inherited from .role-row above; the `<a>` carries both classes. */
a.role-row-link {
  color: inherit;
  text-decoration: none;
  transition: background 160ms var(--ease);
}
a.role-row-link:hover { background: var(--paper-tint); }
.role-row-body {
  display: flex; flex-direction: column; gap: 12px;
}
.role-row-cta {
  color: var(--ink-500);
  transition: color 160ms var(--ease);
}
a.role-row-link:hover .role-row-cta { color: var(--ink-900); }

/* ───────── /careers/<slug> detail page ─────────
   Reuses .app-detail container + header. Adds bulleted role lists
   and tracked technical-expertise sub-sections. */
.role-detail .role-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.role-detail .role-list li {
  position: relative;
  padding-left: 20px;
  margin: 14px 0;
  color: var(--ink-700);
}
.role-detail .role-list li::before {
  content: "·";
  position: absolute; left: 4px; top: -2px;
  font-family: var(--font-mono);
  color: var(--ink-500);
  font-size: 18px;
  line-height: 1.5;
}
.role-detail .role-track {
  margin-top: 32px;
}
.role-detail .role-track:first-child {
  margin-top: 0;
}
.role-detail .role-track-h {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 8px 0 4px;
}
.role-detail .contact-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 24px;
  align-items: baseline;
}
.role-detail .contact-row dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.role-detail .contact-row dd { color: var(--ink-700); }
.role-row p { color: var(--ink-700); max-width: 60ch; }
.role-row .num { color: var(--ink-500); margin-bottom: 12px; }

.principles { margin-top: 64px; }
.principles ol { list-style: none; counter-reset: principle; }
.principles li { counter-increment: principle; padding: 24px 0; border-top: 1px solid var(--ink-200); display: grid; grid-template-columns: 56px 1fr; gap: 24px; align-items: baseline; }
.principles li::before { content: counter(principle, decimal-leading-zero); color: var(--ink-500); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; }
.principles li:last-child { border-bottom: 1px solid var(--ink-200); }
.principles .closing { margin-top: 48px; color: var(--ink-500); max-width: 52ch; border-top: none; padding-left: 0; }

.contact-row { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 24px; }
@media (min-width: 600px) { .contact-row { grid-template-columns: auto 1fr; gap: 64px; align-items: baseline; } }
.contact-row dt { color: var(--ink-500); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-row dd { font-family: var(--font-mono); font-size: 16px; }

/* ───────── Loading splash ───────── */
.splash { position: fixed; inset: 0; z-index: 9999; background: var(--paper); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 32px; transition: opacity 400ms var(--ease); }
.splash.gone { opacity: 0; pointer-events: none; }
.splash svg { width: 96px; height: 96px; }
.splash-caption { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--ink-500); text-transform: uppercase; }
.splash-caption .dot { display: inline-block; width: 4px; height: 4px; background: var(--ink-300); margin: 0 6px 1px; vertical-align: middle; animation: dot-pulse 1200ms linear infinite; }
.splash-caption .dot:nth-child(2) { animation-delay: 200ms; }
.splash-caption .dot:nth-child(3) { animation-delay: 400ms; }
@keyframes dot-pulse { 0%, 100% { background: var(--ink-300); } 50% { background: var(--graphite); } }

@keyframes square-pulse {
  0%, 100% { opacity: 0.18; }
  50%      { opacity: 1; }
}
@keyframes endpoint-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}

/* The 9 graphite squares cycle along the α→Z optimal path order */
.splash svg .sq { fill: var(--graphite); opacity: 0.18; animation: square-pulse 2200ms var(--ease) infinite; }
.splash svg .sq.s0 { animation-delay:    0ms; }
.splash svg .sq.s1 { animation-delay:  140ms; }
.splash svg .sq.s2 { animation-delay:  280ms; }
.splash svg .sq.s3 { animation-delay:  420ms; }
.splash svg .sq.s4 { animation-delay:  560ms; }
.splash svg .sq.s5 { animation-delay:  700ms; }
.splash svg .sq.s6 { animation-delay:  840ms; }
.splash svg .sq.s7 { animation-delay:  980ms; }
.splash svg .sq.s8 { animation-delay: 1120ms; }
.splash svg .ep { animation: endpoint-pulse 2200ms var(--ease) infinite; }
.splash svg .ep.alpha { animation-delay: 0ms; }
.splash svg .ep.omega { animation-delay: 1260ms; }

/* ───────── Hero mark + α→Z path animation ───────── */
.mark { width: 100%; height: 100%; }
.mark .path {
  fill: none;
  stroke: var(--signal-teal);
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-dasharray: 108;
  stroke-dashoffset: 108;
}
.mark.animate .path { animation: mark-draw 1200ms var(--ease) 320ms forwards; }
@keyframes mark-draw { to { stroke-dashoffset: 0; } }

.mark .lattice { fill: var(--ink-200); }
.mark .lattice.hot { fill: var(--graphite); }
.mark .ep { fill: var(--signal-teal); }

@media (prefers-reduced-motion: reduce) {
  .mark .path { stroke-dashoffset: 0; animation: none; }
  .splash svg .sq, .splash svg .ep { animation: none; opacity: 1; }
  .splash svg .sq { opacity: 1; }
  .splash-caption .dot { animation: none; }
}

/* ───────── Lattice mini (step diagrams) ───────── */
.mark-step { width: 64px; height: 64px; }
.mark-step rect.dim { fill: var(--ink-200); }
.mark-step rect.hot { fill: var(--graphite); }
.mark-step rect.ep { fill: var(--signal-teal); }
.mark-step .stroke { fill: none; stroke: var(--graphite); stroke-width: 1.6; stroke-linecap: square; }
.mark-step .stroke-teal { fill: none; stroke: var(--signal-teal); stroke-width: 1.6; stroke-linecap: square; }

/* What page — layer lattices */
.layer-lattice { width: 56px; height: 56px; flex-shrink: 0; }
.layer-lattice rect.dim { fill: var(--ink-200); }
.layer-lattice rect.hot { fill: var(--graphite); }
.layer-lattice rect.ep { fill: var(--signal-teal); }

/* Misc */
hr { border: none; border-top: 1px solid var(--ink-200); margin: 0; }
.divider { height: 1px; background: var(--ink-200); }
.kicker { color: var(--ink-500); }

.fadein { animation: fadein 600ms var(--ease) backwards; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ───────── Tweaks panel adjustments (override starter rounded) ───────── */
.tweaks-panel, .tp-card, .tp-section, .tp-control { border-radius: 0 !important; }

/* ═════════════════════════════════════════════════════════════════════
   MOBILE-NATIVE PASS
   - Touch targets ≥ 48px (Apple HIG)
   - Drawer nav under 768px (replaces inline 4-link row)
   - Decorative hero figure dimmed (legibility over decoration)
   - §3 axis fold-in as per-step inline note
   - Desktop chrome (Tweaks, ScrollProgress) hidden on small viewports
   - Heavy borders softened on mobile
   ═════════════════════════════════════════════════════════════════════ */

/* ───── §3 per-step artifact note (mobile/tablet) ───── */
.step-artifact {
  margin-top: 16px;
  color: var(--ink-500);
  display: block;
}
.step-artifact .arrow { color: var(--ink-900); }
@media (min-width: 1024px) {
  .step-artifact { display: none; }
}

/* ───── Mobile nav drawer · <details>-based, no JS state ───── */
.nav-mobile { display: none; position: relative; margin-left: auto; }
.nav-mobile summary {
  list-style: none;
  cursor: pointer;
  padding: 0 4px;
  min-height: 48px;
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--ink-900);
  -webkit-tap-highlight-color: transparent;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary::marker { display: none; content: ""; }
.nav-mobile-bars {
  display: inline-flex; flex-direction: column; gap: 4px;
  width: 18px;
}
.nav-mobile-bars span {
  display: block; height: 1.5px; width: 100%;
  background: var(--ink-900);
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}
.nav-mobile[open] .nav-mobile-bars span:first-child {
  transform: translateY(2.75px) rotate(45deg);
}
.nav-mobile[open] .nav-mobile-bars span:last-child {
  transform: translateY(-2.75px) rotate(-45deg);
}

.nav-mobile-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  display: flex; flex-direction: column;
  padding: 4px 0;
  z-index: 60;
}
.nav-mobile-link {
  display: flex; align-items: center;
  min-height: 48px;
  padding: 0 20px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-900);
  border-bottom: 1px solid var(--ink-200);
  transition: background 160ms var(--ease);
}
.nav-mobile-link:last-child { border-bottom: none; }
.nav-mobile-link:hover, .nav-mobile-link:focus-visible { background: var(--paper-tint); }
.nav-mobile-link.active { font-weight: 600; }

/* ───── Breakpoint swap: nav links ↔ drawer ───── */
@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-mobile { display: block; }

  /* Mobile hero: keep the wide lattice but park it as a right-side watermark.
     Vertical position aligned so the 5×5 mark center sits on the same row as
     the word "making." in the headline. Box shifted ~2 cells off the right
     edge so the 5×5 mark center moves rightward (the trailing ext-fade cells
     slip past the viewport, clipped by .hero-section overflow:hidden).
     Dimmed heavily — it's a watermark, not a foreground figure.
     (Animation is already off on mobile.) */
  .hero-bg-wide {
    inset: auto;
    top: 80px;
    right: -40px;
    width: 55%;
    height: 220px;
    opacity: 0.22;
    transform: scale(1.2);
    transform-origin: right center;
  }

  /* Tighter hero rhythm */
  .hero-lead { font-size: 17px; line-height: 1.55; max-width: 100%; }
  .hero-headline { max-width: 18ch; }

  /* §2 layers-doc: ink-900 borders feel too heavy at phone scale */
  .layers-doc {
    border-top-color: var(--ink-200);
    border-bottom-color: var(--ink-200);
  }
  .layers-title { max-width: 100%; }

  /* Touch targets ≥ 48px */
  .btn { padding: 16px 24px; min-height: 48px; }

  /* Footer link rows breathe */
  .footer-col a {
    display: inline-flex; align-items: center;
    min-height: 40px;
  }

  /* §4 cards: 32px is generous; 24px reclaims vertical space */
  .app-card { padding: 24px; }

  /* Desktop chrome: hide on small viewports */
  .twk-panel,
  .scroll-progress,
  .scroll-progress-meta { display: none !important; }

  /* Section padding-block slightly tighter to reduce scroll fatigue */
  .section { padding-block: 56px; }
}

/* ───── Even smaller phones (≤ 380px) — defensive ───── */
@media (max-width: 380px) {
  .nav-mobile-panel { min-width: calc(100vw - 48px); }
  .hero-headline { font-size: 44px; }
}
