/* =============================================================
   site.css — freddiejiang.one production layer
   Extends the Claude Design UI kit (ui-kit.css) with the exhibit
   components (critical role, verified badge, status pill), real
   images, lightbox, and responsive rules. Tokens only, no raw hex.
   ============================================================= */

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; }
a { text-underline-offset: 3px; }
::selection { background: var(--signal); color: var(--signal-ink); }

section[id] { scroll-margin-top: 72px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 200;
  padding: 8px 12px; background: var(--signal); color: var(--signal-ink);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 1px solid var(--datum); outline-offset: 3px; }

.fg-3 { color: var(--fg-3); }
.t-datum { margin: 0; }

/* ---------- ATOMS ---------- */
.crosshair-atom { display: inline-block; position: relative; flex: none; }
.crosshair-atom > span { position: absolute; }
.crosshair-atom > span:first-child { left: 0; right: 0; top: 50%; height: 1px; transform: translateY(-50%); }
.crosshair-atom > span:last-child  { top: 0; bottom: 0; left: 50%; width: 1px; transform: translateX(-50%); }

.datum-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-4);
}
.datum-label .plus { color: var(--datum); }
.datum-label.dim { opacity: 0.7; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.4;
  background: var(--bg);
  white-space: nowrap;
}
.status-pill::before { content: ''; width: 5px; height: 5px; background: currentColor; }
.status-pill.ok    { color: var(--status-ok); }
.status-pill.live  { color: var(--signal); }
.status-pill.study { color: var(--fg-3); }
.status-pill.warn  { color: var(--status-warn); }
.status-pill.nda   { color: var(--fg-4); }

.verified-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-2); line-height: 1.4;
}
.verified-badge::before { content: ''; flex: none; width: 6px; height: 6px; background: var(--datum); }
.verified-badge.lg { font-size: 13px; color: var(--fg-1); }

/* ---------- PLATE (image or hatched placeholder) ---------- */
.plate {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.plate img { width: 100%; height: 100%; object-fit: cover; }
.plate.has-img { background: var(--bg-inset); }

/* ---------- NAV (anchors) ---------- */
.nav { background: color-mix(in oklab, var(--bg) 94%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.nav-mark, .nav-link { text-decoration: none; }
.nav-mark { color: var(--fg-1); }
.nav-link { border-bottom: 1px solid transparent; }

/* ---------- HERO ---------- */
.hero { padding-top: 64px; }
.hero-block {
  display: flex; justify-content: space-between; gap: 24px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-4);
  padding-bottom: 14px; margin-bottom: 56px;
  border-bottom: 0.5px solid var(--rule);
}
.hero-lede {
  max-width: 58ch; margin: 32px 0 0;
  font-size: 16px; line-height: 1.65; color: var(--fg-2); text-wrap: pretty;
}
.hero-meta-row { flex-wrap: wrap; row-gap: 24px; }
.hero-meta-row > div { min-width: 180px; }
.hero-cta {
  display: inline-flex; gap: 10px; margin-top: 56px;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-1); text-decoration: none;
  padding-bottom: 4px; border-bottom: 1px solid var(--rule-strong);
  transition: border-color var(--dur-2) var(--ease-mech), color var(--dur-2) var(--ease-mech);
}
.hero-cta:hover { color: var(--datum); border-bottom-color: var(--datum); }

/* ---------- WORK INDEX ---------- */
.filter-chip { background: transparent; border-radius: 2px; display: inline-flex; gap: 8px; align-items: baseline; }
.filter-chip .count { color: var(--fg-4); font-variant-numeric: tabular-nums; }
.filter-chip.active .count { color: var(--bg); opacity: 0.7; }

/* 2026.10.16 — uniform two-up grid; labels no longer sit on a gradient
   scrim over the photo. Two treatments, switched on .work-grid:
   .tiles-frame (default) — solid title-block bars above/below the photo.
   .tiles-chips (?tiles=chips) — labels on small solid tags over the photo. */
.work-tile { color: inherit; text-decoration: none; }
.work-tile .tile-frame {
  position: relative; display: flex; flex-direction: column;
  border: 0.5px solid var(--rule);
  transition: border-color var(--dur-2) var(--ease-mech);
}
.work-tile .img, .work-tile.span-6 .img { aspect-ratio: 16 / 10; border: 0; }
.work-tile:hover .img { border-color: transparent; }
.work-tile:hover .tile-frame { border-color: var(--datum); }
.work-tile .img::before, .work-tile .img::after { z-index: 3; }
.work-tile .plate img { transition: transform 900ms var(--ease-out, ease); }
.work-tile:hover .plate img { transform: scale(1.025); }
.work-tile .plate.contain img { object-fit: contain; padding: 24px; box-sizing: border-box; }
.work-tile .img-strip { z-index: 4; }
.work-tile .img-foot { z-index: 4; display: flex; align-items: center; gap: 12px; }
.work-tile .img-foot .verified-badge { font-size: 10.5px; color: var(--fg-1); }

/* frame */
.tiles-frame .work-tile .img-strip {
  position: static; background: var(--bg-inset);
  border-bottom: 0.5px solid var(--rule);
  padding: 9px 14px; color: var(--fg-3);
}
.tiles-frame .work-tile .img-foot {
  position: static; min-height: 38px; padding: 9px 14px;
  background: var(--bg-inset); border-top: 0.5px solid var(--rule);
}

/* chips */
.tiles-chips .work-tile .img::before, .tiles-chips .work-tile .img::after { display: none; }
.tiles-chips .work-tile .img-strip {
  background: none; padding: 12px; gap: 8px; color: var(--fg-2);
}
.tiles-chips .work-tile .img-strip > span,
.tiles-chips .work-tile .img-foot .verified-badge {
  background: var(--bg); border: 0.5px solid var(--rule-strong);
  padding: 4px 8px; line-height: 1.4;
}
.tiles-chips .work-tile .img-foot { position: absolute; left: 12px; right: 12px; bottom: 12px; }
.tiles-chips .work-tile .img-foot:empty { display: none; }

/* caption action row: CTA left, status right */
.work-tile .tile-act {
  grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: 12px;
}
.work-tile .tile-act .arrow { margin-top: 0; }

/* ---------- PROCESS ---------- */
.process-row { grid-template-columns: 80px 1fr 220px 150px; cursor: default; }
.process-row:hover { padding-left: 0; }
.pr-main { display: flex; flex-direction: column; gap: 4px; }
.pr-body { font-size: 14px; color: var(--fg-3); line-height: 1.5; }
.pr-tags { flex-wrap: wrap; row-gap: 4px; }

/* ---------- ABOUT ---------- */
.about-body p:first-child { font-size: 22px; }
.about-stat-list dd { line-height: 1.5; }

/* ---------- CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 720px) 1fr; gap: 64px; align-items: start; }
.field-group { cursor: text; }
.field-group input::placeholder, .field-group textarea::placeholder { color: var(--fg-4); }
.form-actions { display: flex; justify-content: flex-end; }
.btn-solid {
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 12px 24px; border: 1px solid var(--fg-1); background: var(--fg-1); color: var(--bg);
  cursor: pointer; transition: background var(--dur-2) var(--ease-mech), color var(--dur-2) var(--ease-mech);
}
.btn-solid:hover { background: transparent; color: var(--fg-1); }
.btn-signal {
  display: inline-block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 12px 22px; border: 1px solid var(--datum); color: var(--datum); text-decoration: none;
}
.btn-signal:hover { background: var(--datum); color: var(--signal-ink); }
.contact-direct { margin: 0; display: flex; flex-direction: column; gap: 24px; padding-left: 32px; border-left: 0.5px solid var(--rule); }
.contact-direct dt { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-4); }
.contact-direct dt::before { content: '+ '; color: var(--datum); }
.contact-direct dd { margin: 6px 0 0; font-size: 15px; color: var(--fg-1); line-height: 1.5; word-break: break-word; }
.sent-plate { padding: 32px; border: 0.5px solid var(--rule-strong); display: flex; align-items: center; gap: 18px; }
.sent-title { font-size: 14px; color: var(--fg-1); margin-bottom: 4px; letter-spacing: 0.04em; }
.sent-sub { font-size: 11px; letter-spacing: 0.12em; color: var(--fg-3); text-transform: uppercase; }

/* ---------- FOOTER ---------- */
.foot { flex-direction: column; gap: 16px; }
.foot-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-row.sub { color: var(--fg-4); padding-top: 16px; border-top: 0.5px solid var(--hairline-faint); align-items: center; }
.foot a.item { color: var(--fg-4); text-decoration: none; }
.foot a.item:hover { color: var(--datum); }
.theme-switch { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.theme-switch > span { margin-right: 8px; }
.theme-switch button {
  background: transparent; border: 0.5px solid var(--rule); color: var(--fg-4);
  font-size: 11px; letter-spacing: 0.1em; padding: 4px 8px; cursor: pointer; border-radius: 2px;
}
.theme-switch button:hover { color: var(--fg-1); border-color: var(--rule-strong); }
.theme-switch button.active { color: var(--fg-1); border-color: var(--datum); }

/* ---------- DETAIL ---------- */
.detail-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 0 32px; border-bottom: 0.5px solid var(--rule);
}
.detail-back { padding: 20px 0; text-decoration: none; }
.detail-bar-right { display: flex; gap: 24px; align-items: center; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-4); }
.bar-btn {
  background: transparent; border: 0.5px solid var(--rule-strong); color: var(--fg-2);
  font-size: 11px; letter-spacing: 0.1em; padding: 5px 10px; cursor: pointer; border-radius: 2px;
}
.bar-btn:hover { color: var(--datum); border-color: var(--datum); }

.detail-hero { border-top: 0; overflow: hidden; }
.detail-hero .hero-grid { opacity: 0.5; }
.detail-hero-inner { position: relative; max-width: 1280px; margin: 0 auto; }
.title-strip {
  display: flex; justify-content: space-between; gap: 16px; margin-bottom: 32px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-4);
}
.detail-title {
  font-size: clamp(40px, 6vw, 72px); font-weight: 300; letter-spacing: -0.02em; line-height: 1.02;
  margin: 0; max-width: 22ch; text-wrap: balance;
}
.detail-tags { margin-top: 24px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-3); }
.detail-spec-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr 0.9fr; }
.detail-spec dd { font-size: 15px; line-height: 1.45; }
.outcome-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 0; padding: 16px 20px;
  border: 0.5px solid var(--rule); border-top: 0;
}
.detail-tags + .outcome-strip { margin-top: 40px; border-top: 0.5px solid var(--rule); }
.arrow-link {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-2); text-decoration: none; border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px;
}
.arrow-link:hover { color: var(--datum); border-bottom-color: var(--datum); }

.detail-body { max-width: 840px; }
.critical-role-block {
  background: var(--bg-inset);
  border-left: 2px solid var(--datum);
  padding: 22px 26px;
  margin: 0 0 48px;
}
.critical-role-block .label { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4); margin-bottom: 10px; }
.critical-role-block .text { margin: 0; font-size: 17px; line-height: 1.6; color: var(--fg-1); }

.detail-body .detail-lede { font-size: 20px; font-weight: 300; line-height: 1.6; color: var(--fg-1); margin: 0 0 48px; text-wrap: pretty; }
.problem-block, .outcome-block, .timeline-block { margin: 0 0 40px; }
.problem-block p, .outcome-block p { margin: 12px 0 0; font-size: 15px; }

.timeline { list-style: none; margin: 16px 0 0; padding: 0; border-left: 0.5px solid var(--rule-strong); }
.process-item { display: grid; grid-template-columns: 40px 1fr; gap: 8px; padding: 10px 0 10px 18px; position: relative; }
.process-item::before { content: ''; position: absolute; left: -3px; top: 18px; width: 5px; height: 5px; background: var(--bg); border: 1px solid var(--datum); }
.step-num { font-size: 12px; color: var(--datum); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; padding-top: 2px; }
.step-text { font-size: 14px; line-height: 1.55; color: var(--fg-2); }

.detail-figures { gap: 24px 16px; }
.detail-fig { margin: 0; aspect-ratio: auto; background: none; border: 0; display: flex; flex-direction: column; gap: 10px; }
.detail-fig::before { content: none; }
.detail-fig .plate {
  position: relative; inset: auto; aspect-ratio: 4 / 3;
  border: 0.5px solid var(--rule);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 6px, var(--hatch) 6px, var(--hatch) 7px);
  background-color: var(--bg-inset);
  overflow: hidden;
}
.detail-fig .plate::before, .detail-fig .plate::after {
  content: ''; position: absolute; width: 14px; height: 14px; z-index: 2; pointer-events: none;
}
.detail-fig .plate::before { top: 10px; left: 10px; border-top: 1px solid var(--rule-strong); border-left: 1px solid var(--rule-strong); }
.detail-fig .plate::after { bottom: 10px; right: 10px; border-bottom: 1px solid var(--rule-strong); border-right: 1px solid var(--rule-strong); }
.detail-fig.lead { grid-column: 1 / -1; }
.detail-fig.lead .plate { aspect-ratio: 16 / 9; }
.detail-fig.zoomable { cursor: zoom-in; }
.detail-fig.zoomable:hover .plate { border-color: var(--datum); }
.detail-fig .caption { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }

.gate-plate {
  padding: 40px; border: 1px solid var(--datum); background: var(--bg-inset);
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
}
.gate-plate .gate-title { margin: 0; font-size: 22px; color: var(--fg-1); }
.gate-plate .gate-body { margin: 0; font-size: 15px; }

.detail-pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule);
  border-top: 0.5px solid var(--rule);
}
.pager-link {
  background: var(--bg); padding: 32px; text-decoration: none; display: flex; flex-direction: column; gap: 8px;
  transition: background var(--dur-2) var(--ease-mech);
}
.pager-link.right { text-align: right; align-items: flex-end; }
.pager-link:hover { background: var(--bg-hover); }
.pager-link:hover .pager-title { color: var(--datum); }
.pager-title { font-size: 22px; color: var(--fg-1); transition: color var(--dur-2) var(--ease-mech); }

.not-found p { margin: 0 0 12px; }

/* ---------- TOOLS (software side projects, SEC 03) ---------- */
.tools-intro { margin: 0 0 32px; max-width: 60ch; font-size: 15px; line-height: 1.6; color: var(--fg-3); }
.tool-list { display: flex; flex-direction: column; border-top: 0.5px solid var(--rule); }
.tool-row {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px;
  padding: 40px 0; border-bottom: 0.5px solid var(--rule);
}
.tool-strip {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4);
  padding-bottom: 12px; margin-bottom: 20px; border-bottom: 0.5px solid var(--hairline-faint);
}
.tool-title {
  margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  font-size: 28px; font-weight: 400; letter-spacing: -0.01em; color: var(--fg-1);
}
.tool-title-alt { font-size: 16px; letter-spacing: 0.04em; color: var(--fg-3); }
.tool-lede { margin: 16px 0 28px; font-size: 15px; line-height: 1.6; color: var(--fg-2); text-wrap: pretty; }
.tool-decisions ol { list-style: none; margin: 12px 0 0; padding: 0; border-left: 0.5px solid var(--rule-strong); }
.tool-decisions li {
  display: grid; grid-template-columns: 32px 1fr; gap: 8px; padding: 8px 0 8px 16px;
  font-size: 14px; line-height: 1.55; color: var(--fg-2);
}
.tool-spec { margin: 28px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; align-items: center; }
.tool-spec > div { display: contents; }
.tool-spec dt { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-4); }
.tool-spec dd { margin: 0; font-size: 13px; color: var(--fg-1); }
.tool-row .arrow-link { display: inline-block; margin-top: 24px; }

.tool-screens {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 1fr);
  gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 4px;
}
.tool-screen { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tool-screen .plate {
  position: relative; inset: auto; aspect-ratio: var(--screen-aspect, 9 / 16); overflow: hidden;
  border: 0.5px solid var(--rule); background-color: var(--bg-inset);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 6px, var(--hatch) 6px, var(--hatch) 7px);
}
.tool-screen .plate img { object-position: top; }
.tool-screen .img-placeholder {
  padding: 12px; text-align: center; line-height: 1.5;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-4);
}
.tool-screen.zoomable { cursor: zoom-in; }
.tool-screen.zoomable:hover .plate { border-color: var(--datum); }
.tool-screen .caption { font-size: 10.5px; line-height: 1.4; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }

@media (max-width: 1080px) {
  .tool-row { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  .tool-row { padding: 32px 0; }
  .tool-title { font-size: 24px; }
  .tool-screens { grid-auto-columns: 42%; margin-right: -16px; padding-right: 16px; }
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: var(--scrim);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 72px 32px 80px; cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: default; border: 0.5px solid var(--rule-strong); }
.lightbox-bar, .lightbox-nav {
  position: absolute; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 32px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); cursor: default;
}
.lightbox-bar { top: 0; border-bottom: 0.5px solid var(--rule); }
.lightbox-bar .lb-cap { flex: 1; color: var(--fg-1); }
.lightbox-nav { bottom: 0; border-top: 0.5px solid var(--rule); }
.lb-btn { background: transparent; border: 0; color: var(--fg-2); font-size: 11px; letter-spacing: 0.12em; cursor: pointer; padding: 4px 0; }
.lb-btn:hover { color: var(--datum); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .t-hide-md { display: none; }
  .detail-spec-grid { grid-template-columns: repeat(3, 1fr); }
  .process-row { grid-template-columns: 72px 1fr 150px; }
  .process-row .pr-tags { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-direct { padding-left: 0; border-left: 0; flex-direction: row; flex-wrap: wrap; gap: 24px 48px; }
}

@media (max-width: 768px) {
  .t-hide-sm { display: none; }
  .ticker { padding: 8px 16px; }
  .nav { flex-wrap: wrap; padding: 14px 16px 0; row-gap: 10px; }
  .nav-status { display: none; }
  .nav-links { order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px; gap: 22px; overflow-x: auto; border-top: 0.5px solid var(--hairline-faint); }
  .nav-link { padding: 10px 0; white-space: nowrap; }
  section[id] { scroll-margin-top: 96px; }

  .hero { padding: 40px 16px 48px; }
  .hero-block { margin-bottom: 36px; }
  .hero-meta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; margin-top: 40px; }
  .hero-meta-row > div { min-width: 0; }
  .hero-meta-row dd { font-size: 14px; }
  .hero-cta { margin-top: 40px; }

  .section { padding: 48px 16px; }
  .section-head { flex-wrap: wrap; gap: 8px 16px; }
  .section-head h2 { order: -1; width: 100%; font-size: 26px; }

  .work-grid { row-gap: 48px; }
  .work-tile.span-12, .work-tile.span-8, .work-tile.span-6, .work-tile.span-4 { grid-column: 1 / -1; }
  .work-tile .caption .meta { flex-wrap: wrap; row-gap: 4px; }

  .process-row { grid-template-columns: 1fr; gap: 6px; }
  .pr-time { text-align: left; color: var(--fg-4); }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-body p:first-child { font-size: 18px; }
  .about-body p { font-size: 16px; }

  .contact-form { grid-template-columns: 1fr; }
  .contact-direct { flex-direction: column; }

  .foot { padding: 24px 16px; }
  .foot-row { flex-direction: column; gap: 10px; }

  .detail-bar { padding: 0 16px; }
  .detail-hero { padding: 40px 16px; }
  .detail-spec-grid { grid-template-columns: 1fr 1fr; }
  .detail-spec:first-child { grid-column: 1 / -1; }
  .detail-body { padding: 40px 16px; }
  .critical-role-block { padding: 18px 18px; }
  .detail-body .detail-lede { font-size: 18px; }
  .detail-figures { padding: 0 16px 48px; grid-template-columns: 1fr; }
  .detail-pager { grid-template-columns: 1fr; }
  .pager-link { padding: 24px 16px; }
  .pager-link.right { text-align: left; align-items: flex-start; }
  .lightbox { padding: 64px 12px 72px; }
  .lightbox-bar, .lightbox-nav { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; }
}

/* =============================================================
   2026.10.16 — TraceHaus alignment
   Type: Bricolage Grotesque for display + running text (industrial-design voice);
         JetBrains Mono kept for annotation only (labels, readouts, datums, nav, figs).
   Colour: lime signal glows — on datum marks, primary actions and the hero.
   ============================================================= */

/* Display */
.hero-display, .detail-title, .section-head h2, h2, .nav-mark {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-variation-settings: 'opsz' 96;
}
.hero-display { letter-spacing: -0.02em; line-height: 0.9; }
.hero-display .accent { color: var(--signal); text-shadow: 0 0 48px var(--signal-glow); }
.detail-title { letter-spacing: -0.015em; line-height: 0.95; }
.section-head h2, h2 { letter-spacing: -0.01em; line-height: 1; }
.nav-mark { letter-spacing: -0.01em; }

/* Titles */
h3, .title, .tool-title, .pager-title, .pr-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* Titles inside tiles carry their own weight in ui-kit; restate */
.work-tile .caption .title, .work-tile .title { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; }

/* Running text */
p, dd, em, li, .pr-body, .step-text, .tool-title-alt,
.field-group input, .field-group textarea {
  font-family: var(--font-body);
  font-feature-settings: normal;
}
p, .pr-body, .step-text { line-height: 1.55; }
.hero-lede, .detail-lede { font-weight: 400; letter-spacing: -0.005em; }
.about-body p:first-child, .about-body p.text { font-weight: 500; letter-spacing: -0.01em; }
.about-body em { font-style: normal; color: var(--signal); }

/* Mono stays on numbers that sit in running layouts */
.year, .step-num, .pr-num, .pr-time { font-family: var(--font-mono); }

/* Glow */
.fg-datum, .t-datum, .step-num, .status-pill.live, .hero-meta-row dt { text-shadow: 0 0 10px var(--signal-glow); }
.hero { background:
  radial-gradient(60% 55% at 50% 115%, var(--signal-wash), transparent 70%),
  var(--bg); }
.btn-signal, .btn-solid { box-shadow: 0 0 0 transparent; transition: box-shadow var(--dur-3) var(--ease-mech); }
.btn-signal:hover, .btn-solid:hover { box-shadow: 0 0 28px var(--signal-glow); }
.status-pill.live { border-color: var(--signal); }
.critical-role-block { border-left-color: var(--signal); box-shadow: -6px 0 24px -12px var(--signal-glow); }
.filter-chip.active { box-shadow: 0 0 20px -4px var(--signal-glow); }

/* 2026.10.16 — X-Series (experimental builds, ex-Tools) */
.tool-links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 24px; }
.tool-links .arrow-link { margin-top: 0; }
.tool-row .tool-links + .arrow-link, .tool-row .arrow-link + .tool-links { margin-top: 12px; }
.tool-screens.grid { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
.tool-screens.grid .tool-screen .plate img { object-position: center; }
@media (max-width: 768px) {
  .tool-screens.grid { margin-right: 0; padding-right: 0; grid-auto-columns: auto; }
}
@media (max-width: 400px) { .nav-links { gap: 12px; } }

/* 2026.10.16 — detail figures that must show whole (deviation / bond maps) */
.detail-fig .plate.contain img { object-fit: contain; }

/* =============================================================
   2026.10.16 — Thesis rewrite: hero headline, thesis band, contact intro
   ============================================================= */
.hero-headline {
  margin: 28px 0 0; max-width: 22ch;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -0.02em;
  color: var(--fg-1); text-wrap: balance;
}
.hero-headline + .hero-lede { margin-top: 20px; font-size: 17px; }

.thesis .datum-label { font-size: 11px; letter-spacing: 0.14em; }
.thesis-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.thesis-text {
  margin: 18px 0 0; max-width: 36em;
  font-size: 22px; line-height: 1.5; font-weight: 500; letter-spacing: -0.01em; color: var(--fg-1);
  text-wrap: pretty;
}
.proof-list { list-style: none; margin: 18px 0 0; padding: 0; border-top: 0.5px solid var(--rule); }
.proof-list li {
  display: grid; grid-template-columns: 32px 1fr; gap: 8px;
  padding: 14px 0; border-bottom: 0.5px solid var(--rule);
  font-size: 15px; line-height: 1.5; color: var(--fg-2);
}
.proof-list .step-num { font-size: 12px; padding-top: 2px; }

.feature-gt {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: center;
  margin-top: 64px; padding: 32px;
  border: 0.5px solid var(--rule-strong); background: var(--bg-inset);
  color: inherit; text-decoration: none;
  transition: border-color var(--dur-2) var(--ease-mech), box-shadow var(--dur-3) var(--ease-mech);
}
.feature-gt:hover { border-color: var(--datum); box-shadow: 0 0 32px var(--signal-glow); }
.feature-strip {
  display: flex; gap: 16px; padding-bottom: 12px; margin-bottom: 20px;
  border-bottom: 0.5px solid var(--hairline-faint);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4);
}
.feature-text { margin: 0; font-size: 20px; line-height: 1.5; color: var(--fg-2); text-wrap: pretty; }
.feature-text strong { font-weight: 700; color: var(--fg-1); }
.feature-meta {
  margin: 16px 0 0; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-4);
}
.feature-link {
  display: inline-block; margin-top: 24px; padding-bottom: 4px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-1); border-bottom: 1px solid var(--rule-strong);
}
.feature-gt:hover .feature-link { color: var(--datum); border-bottom-color: var(--datum); }
.feature-img { aspect-ratio: 4 / 3; border: 0.5px solid var(--rule); background: var(--bg); overflow: hidden; }
.feature-img img { width: 100%; height: 100%; object-fit: contain; display: block; }

.contact-intro { max-width: 720px; margin: 0 0 48px; }
.contact-intro h3 { margin: 0 0 12px; font-size: clamp(26px, 3vw, 36px); line-height: 1.1; color: var(--fg-1); }
.contact-intro p { margin: 0; font-size: 17px; color: var(--fg-2); max-width: 56ch; }

@media (max-width: 1080px) {
  .thesis-grid, .feature-gt { grid-template-columns: 1fr; gap: 40px; }
  .feature-img { max-width: 520px; }
}
@media (max-width: 768px) {
  .hero-headline { font-size: 28px; margin-top: 24px; }
  .hero-headline + .hero-lede { font-size: 16px; }
  .thesis-text { font-size: 19px; }
  .feature-gt { margin-top: 48px; padding: 20px; gap: 28px; }
  .feature-text { font-size: 17px; }
  .contact-intro { margin-bottom: 32px; }
}

/* 2026.10.16 — long-form exhibit blocks: metrics strip, links, numbered sections, tables, lessons */
.detail-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.detail-link-btn {
  display: inline-block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 12px 22px; border: 0.5px solid var(--rule-strong); color: var(--fg-2); text-decoration: none;
}
.detail-link-btn:hover { border-color: var(--datum); color: var(--datum); }

.detail-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 1280px; margin: 0 auto; border-bottom: 0.5px solid var(--rule);
}
.detail-metrics .metric { padding: 28px 32px; }
.detail-metrics .metric + .metric { border-left: 0.5px solid var(--rule); }
.detail-metrics b {
  display: block; font-family: var(--font-display); font-weight: 300; font-size: clamp(36px, 4vw, 54px);
  letter-spacing: -0.03em; line-height: 1; color: var(--datum); font-variant-numeric: tabular-nums;
}
.detail-metrics b small { font-size: 0.42em; letter-spacing: 0; margin-left: 4px; color: var(--fg-2); }
.detail-metrics span { display: block; margin-top: 12px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-4); line-height: 1.6; }
.long-sec .detail-metrics { margin: 24px 0; border: 0.5px solid var(--rule); }
.long-sec .detail-metrics .metric { padding: 18px 20px; }
.long-sec .detail-metrics b { font-size: 34px; }

.detail-sections { max-width: 1280px; margin: 0 auto; padding: 0 32px 32px; }
.long-sec { padding: 56px 0; border-top: 0.5px solid var(--rule); }
.long-sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 28px; flex-wrap: wrap; }
.long-sec-num { font-size: 12px; letter-spacing: 0.14em; color: var(--datum); font-variant-numeric: tabular-nums; }
.long-sec-title { margin: 0; font-family: var(--font-display); font-weight: 300; font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.015em; line-height: 1.05; color: var(--fg-1); }
.long-sec-note { margin-left: auto; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-4); }
.long-sec-body.with-figs { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.long-sec-text { max-width: 760px; }
.long-sec-text > p { font-size: 16px; line-height: 1.7; color: var(--fg-2); margin: 0 0 16px; text-wrap: pretty; }
.long-sec-figs { display: grid; gap: 20px; }
.long-sec-figs.below { margin-top: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.long-sec-figs.below .sec-fig.wide { grid-column: 1 / -1; }
.sec-fig .plate { aspect-ratio: 4 / 3; }
.sec-fig.wide .plate { aspect-ratio: auto; }
.sec-fig.wide .plate img { height: auto; }
.sec-fig .plate.strip { aspect-ratio: 16 / 3; }

.long-ticks { list-style: none; margin: 18px 0 0; padding: 0; border-top: 0.5px solid var(--rule); }
.long-ticks li { position: relative; padding: 11px 0 11px 22px; border-bottom: 0.5px solid var(--rule); font-size: 15px; line-height: 1.55; color: var(--fg-2); }
.long-ticks li::before { content: ''; position: absolute; left: 0; top: 19px; width: 7px; height: 7px; background: var(--fg-4); }
.long-ticks.open li::before { background: none; border: 1px solid var(--fg-3); }

.detail-table-wrap { margin-top: 24px; overflow-x: auto; }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-4); font-weight: 400; text-align: left; padding: 9px 12px 9px 0; border-bottom: 0.5px solid var(--rule-strong); }
.detail-table td { font-size: 15px; color: var(--fg-2); padding: 11px 12px 11px 0; border-bottom: 0.5px solid var(--rule); vertical-align: top; }
.detail-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; padding-left: 12px; }
.detail-table td.n { color: var(--fg-1); font-size: 14px; }
.detail-table tr.hl td.n:first-of-type { color: var(--datum); }
.detail-table-note { font-size: 12px !important; line-height: 1.6 !important; color: var(--fg-4) !important; margin: 10px 0 0 !important; }

.long-callout { margin-top: 24px; background: var(--bg-inset); border-left: 2px solid var(--datum); padding: 18px 22px; }
.long-callout .label { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4); margin-bottom: 8px; }
.long-callout p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: var(--fg-1); }
.long-callout .arrow-link { display: inline-block; margin-top: 4px; }

.long-lessons { list-style: none; margin: 8px 0 0; padding: 0; border-top: 0.5px solid var(--rule); }
.long-lessons li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 18px 0; border-bottom: 0.5px solid var(--rule); }
.long-lessons h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 18px; font-weight: 500; color: var(--fg-1); letter-spacing: -0.005em; }
.long-lessons p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--fg-2); }

.detail-figures-head { grid-column: 1 / -1; padding-top: 8px; }

@media (max-width: 1080px) {
  .long-sec-body.with-figs { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .detail-metrics { grid-template-columns: 1fr 1fr; }
  .detail-metrics .metric { padding: 20px 16px; }
  .detail-metrics .metric:nth-child(3) { border-left: 0; }
  .detail-metrics .metric:nth-child(n+3) { border-top: 0.5px solid var(--rule); }
  .detail-sections { padding: 0 16px 16px; }
  .long-sec { padding: 40px 0; }
  .long-sec-note { margin-left: 0; width: 100%; }
  .long-sec-figs.below { grid-template-columns: 1fr; }
  .detail-table td, .detail-table th { font-size: 13px; }
}
.long-sec-wide { margin-top: 32px; display: grid; gap: 20px; }
.long-sec-wide .sec-fig .plate { aspect-ratio: auto; background-image: none; }
.long-sec-wide .sec-fig .plate img { height: auto; object-fit: contain; }

/* 2026.10.16 — before/after compare slider */
.detail-compare { max-width: 1280px; margin: 0 auto; padding: 40px 32px 8px; }
.compare-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.compare-hint { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--fg-4); }
.compare-plate {
  position: relative; overflow: hidden; background: var(--bg-inset); border: 0.5px solid var(--rule);
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.compare-plate img { display: block; width: 100%; height: auto; pointer-events: none; }
.compare-plate .compare-top { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: inset(0 0 0 var(--cut, 50%)); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 1px; margin-left: -0.5px; background: var(--datum); pointer-events: none; box-shadow: 0 0 12px var(--signal-glow, transparent); }
.compare-handle::after {
  content: '↔'; position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 14px; color: var(--datum);
  border: 1px solid var(--datum); border-radius: 50%; background: rgba(10, 10, 10, 0.78);
}
.compare-tag { position: absolute; top: 18px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--fg-3); pointer-events: none; }
.compare-tag.l { left: 20px; }
.compare-tag.r { right: 20px; color: var(--datum); }
.compare-plate input[type=range] {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none;
}
.compare-plate:focus-within { outline: 1px solid var(--datum); outline-offset: 3px; }
.compare-cap { display: flex; justify-content: space-between; gap: 24px; padding-top: 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--fg-4); }
@media (max-width: 768px) {
  .detail-compare { padding: 28px 16px 4px; }
  .compare-cap { flex-direction: column; gap: 6px; }
  .compare-tag { top: 10px; } .compare-tag.l { left: 12px; } .compare-tag.r { right: 12px; }
  .compare-handle::after { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
}
/* =============================================================
   2026.10.16 — Hero v3: thesis statement replaces the name wordmark,
   Ground Truth scan-to-CAD sweep fills the right column.
   ============================================================= */
.hero-block { margin-bottom: 40px; }
.hero { padding-bottom: 56px; }
.hero-statement {
  margin: 0;
  font-family: var(--font-display); font-weight: 800; text-transform: none;
  font-variation-settings: 'opsz' 96;
  font-size: clamp(42px, 6.9vw, 104px); line-height: 1; letter-spacing: -0.022em;
  color: var(--fg-1);
}
.hero-statement .accent { color: var(--signal); text-shadow: 0 0 48px var(--signal-glow); }
.hero-split {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px;
  align-items: start; margin-top: 56px;
}
.hero-copy .hero-lede { margin: 0; font-size: 17px; max-width: 40ch; }
.hero-copy .hero-meta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 24px; margin-top: 40px; }
.hero-copy .hero-meta-row > div { min-width: 0; }
.hero-copy .hero-meta-row .span-2 { grid-column: 1 / -1; }
.hero-copy .hero-cta { margin-top: 40px; }

/* Sweep */
.sweep { margin: 0; }
.sweep-head {
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4);
  padding-bottom: 10px; border-bottom: 0.5px solid var(--rule);
}
.sweep-state { position: relative; display: inline-grid; justify-items: end; }
.sweep-state > span { grid-area: 1 / 1; animation: sweep-state 10s linear infinite; }
.sweep-state .s-cad { color: var(--fg-1); animation-name: sweep-state-cad; }
.sweep-stage { position: relative; aspect-ratio: 1600 / 927; margin-top: 8px; }
.sweep-stage::before, .sweep-stage::after {
  content: ''; position: absolute; width: 12px; height: 12px; pointer-events: none;
}
.sweep-stage::before { left: 0; top: 0; border-left: 1px solid var(--rule-strong); border-top: 1px solid var(--rule-strong); }
.sweep-stage::after { right: 0; bottom: 0; border-right: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }
.sweep-cad, .sweep-points, .sweep-points canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sweep-cad { object-fit: contain; }
.sweep-points { animation: sweep-clip 10s cubic-bezier(.45,0,.25,1) infinite; }
.sweep-line {
  position: absolute; top: -4%; bottom: -4%; left: 0; width: 1px;
  background: var(--signal); box-shadow: 0 0 12px 1px var(--signal-glow), 0 0 40px 6px var(--signal-glow);
  animation: sweep-line 10s cubic-bezier(.45,0,.25,1) infinite;
}
@keyframes sweep-clip {
  0%, 12%  { clip-path: inset(0 0 0 0); opacity: 1; }
  58%, 84% { clip-path: inset(0 0 0 100%); opacity: 1; }
  84.01%   { clip-path: inset(0 0 0 0); opacity: 0; }
  100%     { clip-path: inset(0 0 0 0); opacity: 1; }
}
@keyframes sweep-line {
  0%, 9%   { left: 0; opacity: 0; }
  12%      { left: 0; opacity: 1; }
  58%      { left: 100%; opacity: 1; }
  62%, 100%{ left: 100%; opacity: 0; }
}
@keyframes sweep-state     { 0%, 50% { opacity: 1; } 56%, 86% { opacity: 0; } 92%, 100% { opacity: 1; } }
@keyframes sweep-state-cad { 0%, 50% { opacity: 0; } 56%, 86% { opacity: 1; } 92%, 100% { opacity: 0; } }

.sweep-readouts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  margin-top: 16px; padding-top: 14px; border-top: 0.5px solid var(--rule);
}
.sweep-readout { display: flex; flex-direction: column; gap: 4px; }
.sweep-value {
  font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: -0.02em;
  color: var(--fg-1); font-variant-numeric: tabular-nums;
}
.sweep-value small { font-size: 0.55em; font-weight: 500; margin-left: 3px; color: var(--fg-3); }
.sweep-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--fg-4); }

@media (prefers-reduced-motion: reduce) {
  .sweep-points { animation: none; clip-path: inset(0 0 0 50%); }
  .sweep-line { animation: none; left: 50%; opacity: 1; }
  .sweep-state > span { animation: none; }
  .sweep-state .s-cad { opacity: 0; }
}
@media (max-width: 1080px) {
  .hero-split { grid-template-columns: 1fr; gap: 48px; margin-top: 40px; }
  .hero-statement { text-wrap: balance; }
  .hero-statement .br-lg { display: none; }
}
@media (max-width: 768px) {
  .hero-statement { font-size: 42px; letter-spacing: -0.03em; }
  .hero-copy .hero-lede { font-size: 16px; }
  .sweep-value { font-size: 22px; }
  .sweep-label { font-size: 9.5px; letter-spacing: 0.08em; }
}
.hero-copy { padding-top: 36px; }
@media (max-width: 1080px) { .hero-copy { padding-top: 0; } }

/* Hero v3.1 — clean orthographic renders + CAD edge linework (revealed with the CAD) */
.sweep-reveal { position: absolute; inset: 0; animation: sweep-reveal 10s cubic-bezier(.45,0,.25,1) infinite; }
@keyframes sweep-reveal {
  0%, 12%  { clip-path: inset(0 100% 0 0); opacity: 1; }
  58%, 84% { clip-path: inset(0 0 0 0); opacity: 1; }
  100%     { clip-path: inset(0 0 0 0); opacity: 0; }
}
.sweep-edges {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--signal); opacity: 0;
  animation: sweep-edges 10s linear infinite;
  -webkit-mask: url(../hero/hero-edges.webp) center / contain no-repeat;
          mask: url(../hero/hero-edges.webp) center / contain no-repeat;
}
@keyframes sweep-edges { 0%, 56% { opacity: 0; } 64% { opacity: 0.95; } 74%, 84% { opacity: 0.45; } 92%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .sweep-reveal { animation: none; clip-path: inset(0 50% 0 0); }
  .sweep-edges { animation: none; opacity: 0.45; }
}

/* =============================================================
   2026.10.16 — Motion pass. Quiet and mechanical: one typed label, words
   that rise into place, hairlines that draw, content that fades up once.
   Everything is gated on html.motion (absent for reduced motion / no JS).
   ============================================================= */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }

/* Typed label + caret */
.typed .caret {
  display: inline-block; width: 0.55em; height: 1.05em; margin-left: 3px; vertical-align: -0.2em;
  background: var(--signal); box-shadow: 0 0 10px var(--signal-glow);
  animation: caret-blink 1.05s steps(1) infinite; transition: opacity 400ms var(--ease-out);
}
.typed .caret.off { opacity: 0; }
html:not(.motion) .typed .caret { display: none; }
@keyframes caret-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.typed .caret.off { animation: none; }

/* Statement: each word rises out of its own clip box */
.hero-statement .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.hero-statement .w > span { display: inline-block; }
html.motion .hero-statement .w > span {
  transform: translateY(108%);
  animation: word-rise 900ms var(--ease-out) both;
  animation-delay: calc(700ms + var(--wi) * 70ms);
}
@keyframes word-rise { to { transform: translateY(0); } }
/* "the people." lands in ink, then lights up */
html.motion .hero-statement .accent { color: var(--fg-1); text-shadow: none; animation: light-up 900ms var(--ease-out) 1.75s both; }
@keyframes light-up {
  from { color: var(--fg-1); text-shadow: 0 0 0 transparent; }
  to   { color: var(--signal); text-shadow: 0 0 48px var(--signal-glow); }
}

/* Hero hairline draws; copy and sweep fade up after the statement */
.hero-block { position: relative; }
html.motion .hero-block { border-bottom-color: transparent; }
html.motion .hero-block::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -0.5px; height: 0.5px; background: var(--rule);
  transform-origin: left; transform: scaleX(0); animation: draw-x 1400ms var(--ease-out) 150ms both;
}
@keyframes draw-x { to { transform: scaleX(1); } }
html.motion .hero-copy > * { animation: fade-up 900ms var(--ease-out) both; }
html.motion .hero-copy > :nth-child(1) { animation-delay: 1.45s; }
html.motion .hero-copy > :nth-child(2) { animation-delay: 1.6s; }
html.motion .hero-copy > :nth-child(3) { animation-delay: 1.75s; }
html.motion .hero .sweep { animation: fade-up 1100ms var(--ease-out) 1.25s both; }
html.motion .hero .sweep-head { position: relative; border-bottom-color: transparent; }
html.motion .hero .sweep-head::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -0.5px; height: 0.5px; background: var(--rule);
  transform-origin: left; transform: scaleX(0); animation: draw-x 1200ms var(--ease-out) 1.5s both;
}
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Scroll reveals */
html.motion [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
html.motion [data-reveal].is-in { opacity: 1; transform: none; }
/* section-head rules draw in with their head */
html.motion .section-head[data-reveal] { position: relative; border-bottom-color: transparent; }
html.motion .section-head[data-reveal]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -0.5px; height: 0.5px; background: var(--rule);
  transform-origin: left; transform: scaleX(0); transition: transform 1400ms var(--ease-out) 150ms;
}
html.motion .section-head[data-reveal].is-in::after { transform: scaleX(1); }
/* proof rows: the rule under each row draws as it arrives */
html.motion .proof-list li[data-reveal] { transform: translateX(-10px); }
html.motion .proof-list li[data-reveal].is-in { transform: none; }
/* featured card image settles */
html.motion .feature-gt[data-reveal] .feature-img img { transform: scale(1.04); transition: transform 1600ms var(--ease-out) 200ms; }
html.motion .feature-gt[data-reveal].is-in .feature-img img { transform: none; }

@media print {
  html.motion [data-reveal], html.motion .hero-copy > *, html.motion .hero .sweep { opacity: 1 !important; transform: none !important; animation: none !important; }
}
/* hold the sweep loop until the intro has landed, so the scan beat is seen first */
html.motion .hero .sweep-points,
html.motion .hero .sweep-line,
html.motion .hero .sweep-reveal,
html.motion .hero .sweep-edges,
html.motion .hero .sweep-state > span { animation-delay: 1.8s; animation-fill-mode: both; }

/* typed label: ghost holds the final width/height, live text types over it */
.typed { position: relative; display: inline-block; }
.typed-ghost { visibility: hidden; }
.typed-live { position: absolute; inset: 0; }
html:not(.motion) .typed-live { display: none; }
html:not(.motion) .typed-ghost { visibility: visible; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 2026.10.16 — product cards (Munchkin): full-height media panel, uncropped on white */
.long-sec.product-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch;
  padding: 0; margin: 0 0 24px; border: 0.5px solid var(--rule); background: var(--bg-inset); overflow: hidden;
}
.long-sec.product-card + .long-sec.product-card { border-top: 0.5px solid var(--rule); }
.product-card.flip .product-text { order: 2; }
.product-card.no-media { grid-template-columns: 1fr; }
.product-card.no-media .product-text { max-width: 760px; }
.product-text { padding: 44px 44px 40px; display: flex; flex-direction: column; }
.product-text .long-sec-head { margin-bottom: 22px; }
.product-text .long-sec-note { margin-left: 0; width: 100%; }
.product-text > p { font-size: 16px; line-height: 1.7; color: var(--fg-2); margin: 0 0 16px; text-wrap: pretty; }
.product-text .long-ticks { margin-bottom: 8px; }
.product-link { margin-top: auto; padding-top: 24px; align-self: flex-start; }
.product-media {
  position: relative; margin: 0; min-height: 440px; background: #fff;
  display: flex; align-items: center; justify-content: center; cursor: zoom-in;
}
.product-media img { width: 100%; height: 100%; max-height: 560px; object-fit: contain; display: block; padding: 28px; box-sizing: border-box; transition: transform 900ms var(--ease-out, ease); }
.product-media:hover img { transform: scale(1.025); }
.product-media figcaption {
  position: absolute; left: 16px; bottom: 14px; right: 16px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #6B6F75;
}
.product-media figcaption span { color: #121418; }
@media (max-width: 900px) {
  .long-sec.product-card { grid-template-columns: 1fr; }
  .product-card.flip .product-text { order: 0; }
  .product-media { order: -1; min-height: 0; aspect-ratio: 1 / 1; }
  .product-text { padding: 28px 22px 28px; }
}

/* ── Product card process strip (2026-10-16, v2) ──────────────────────
   Full-bleed cells on the card's own grid: 2 cells line up with the
   text | media split above. Each image is pre-composed to the cell aspect
   with the subject centred, so nothing is cropped by CSS. */
.product-strip { grid-column: 1 / -1; order: 3; border-top: 0.5px solid var(--rule); }
.product-strip-label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--fg-3); padding: 14px 44px; border-bottom: 0.5px solid var(--rule); }
.product-strip-grid { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
.product-strip-fig { position: relative; margin: 0; cursor: zoom-in; overflow: hidden; background: var(--bg-inset); }
.product-strip-fig > img, .product-strip-fig > video { background: #fff; }
.product-strip-fig + .product-strip-fig { border-left: 0.5px solid var(--rule); }
.product-strip-fig img, .product-strip-fig video { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 900ms var(--ease-out, ease); }
.product-strip-fig:hover img, .product-strip-fig:hover video { transform: scale(1.02); }
.product-strip-fig figcaption {
  background: var(--bg-inset); padding: 12px 16px 14px; border-top: 0.5px solid var(--rule);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3);
}
.product-strip-fig figcaption span { color: var(--signal); }

@media (max-width: 900px) {
  .product-strip-label { padding: 12px 22px; }
  .product-strip-grid { grid-template-columns: 1fr; }
  .product-strip-fig + .product-strip-fig { border-left: 0; border-top: 0.5px solid var(--rule); }
}
.long-sec-wide.cols-2 { grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 760px) { .long-sec-wide.cols-2 { grid-template-columns: 1fr; } }
.long-sec-wide.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 14px; }
.long-sec-wide.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 14px; }
@media (max-width: 1000px) { .long-sec-wide.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .long-sec-wide.cols-3 { grid-template-columns: 1fr; } }

/* 2026.10.16 — natural-aspect plates: whole image, no crop (work.figs_natural or fig.fit 'natural') */
.detail-fig .plate.natural, .detail-fig.lead .plate.natural, .sec-fig .plate.natural { aspect-ratio: auto; background-image: none; }
.detail-fig .plate.natural img { height: auto; display: block; object-fit: contain; }
.detail-figures { align-items: start; }

/* 2026.10.18 — silent loop inside a section figure (IRKO revision loop, print timelapse) */
.sec-fig .plate.video { aspect-ratio: auto; }
.sec-fig .plate.video video, .sec-fig .plate.video img { display: block; width: 100%; height: auto; object-fit: contain; }

/* 2026.10.20 — TraceHaus entry points (about body, practice, contact, footer) */
.about-body p a { color: inherit; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color var(--dur-2) var(--ease-mech); }
.about-body p a:hover { color: var(--signal); }

/* ============================================================
   2026.10.21 — Stories: home feature slot, reading mode, How I work.
   Reading mode is quiet on purpose: sentence-case titles, one ~680px
   prose column, mono only for labels and numbers, hover = colour only.
   ============================================================ */
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 40px; }
.hero-ctas .hero-cta { margin-top: 0; }
.hero-cta.quiet { color: var(--fg-3); }

/* How I work */
.principles { list-style: none; margin: 18px 0 0; padding: 0; border-top: 0.5px solid var(--rule); }
.principles li {
  display: grid; grid-template-columns: 32px 1fr; gap: 8px;
  padding: 16px 0; border-bottom: 0.5px solid var(--rule);
  font-size: 15px; line-height: 1.55; color: var(--fg-3);
}
.principles li b { display: block; margin-bottom: 4px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--fg-1); }
.principles .step-num { font-family: var(--font-mono); font-size: 12px; padding-top: 4px; color: var(--datum); }
html.motion .principles li[data-reveal] { transform: translateX(-10px); }
html.motion .principles li[data-reveal].is-in { transform: none; }

/* Home: stories slot */
.stories { padding-top: 24px; }
.stories-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 14px; margin-bottom: 24px; border-bottom: 0.5px solid var(--rule);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--fg-4);
}
.story-card {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0;
  border: 0.5px solid var(--rule-strong); color: inherit; text-decoration: none;
  transition: border-color var(--dur-2) var(--ease-mech);
}
.story-card:hover { border-color: var(--datum); }
.story-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-inset); border-right: 0.5px solid var(--rule); }
.story-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-card-body { display: flex; flex-direction: column; padding: 32px; background: var(--bg-inset); }
.story-kicker { margin: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-4); }
.story-card-title { margin: 20px 0 0; font-size: 40px; line-height: 1.05; font-weight: 700; letter-spacing: -0.025em; text-transform: none; color: var(--fg-1); text-wrap: balance; }
.story-card-dek { margin: 16px 0 0; font-size: 17px; line-height: 1.55; color: var(--fg-2); text-wrap: pretty; }
.story-card-cta {
  margin-top: auto; padding-top: 32px; align-self: flex-start;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-1); border-bottom: 1px solid var(--rule-strong); padding-bottom: 4px;
  transition: color var(--dur-2) var(--ease-mech), border-color var(--dur-2) var(--ease-mech);
}
.story-card:hover .story-card-cta { color: var(--datum); border-bottom-color: var(--datum); }
.stories .feature-gt { margin-top: 24px; }

/* Story page */
.story { padding: 96px 24px 128px; }
.story-head, .story-body, .story-foot { max-width: 680px; margin-left: auto; margin-right: auto; }
.story-title {
  margin: 24px 0 0; font-size: 64px; line-height: 1.02; font-weight: 700;
  letter-spacing: -0.03em; text-transform: none; color: var(--fg-1); text-wrap: balance;
}
.story-dek { margin: 24px 0 0; font-size: 22px; line-height: 1.45; color: var(--fg-2); text-wrap: pretty; }
.story-byline { margin: 24px 0 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--fg-4); }
.story-hero { max-width: 1200px; margin: 64px auto 0; }
.story-body { margin-top: 64px; }
.story-body > p { margin: 0 0 28px; font-size: 20px; line-height: 1.65; color: var(--fg-1); text-wrap: pretty; }
.story-body > p.story-open { font-size: 28px; line-height: 1.35; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 36px; }
.story-pull {
  margin: 48px 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--datum);
  font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; color: var(--fg-1);
}
.story-media { margin: 48px 0; }
.story-media.wide, .story-media.pair { width: min(1080px, calc(100vw - 48px)); position: relative; left: 50%; transform: translateX(-50%); }
.story-media.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.story-fig { margin: 0; }
.story-plate { border: 0.5px solid var(--rule); background: var(--bg-inset); }
.story-plate .plate { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: auto; border: 0; background-image: none; }
.story-plate img, .story-plate video { display: block; width: 100%; height: auto; object-fit: contain; }
.story-fig figcaption { margin-top: 10px; font-family: var(--font-mono); font-size: 11px; line-height: 1.5; letter-spacing: 0.02em; color: var(--fg-3); }
.story-fig-id { color: var(--datum); margin-right: 8px; }
.story-metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 48px 0;
  border-top: 0.5px solid var(--rule-strong); border-bottom: 0.5px solid var(--rule-strong);
}
.story-metrics > div { padding: 20px 16px 20px 0; }
.story-metrics > div + div { padding-left: 16px; border-left: 0.5px solid var(--rule); }
.story-metrics dt { font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; color: var(--fg-1); }
.story-metrics dd { margin: 10px 0 0; font-family: var(--font-mono); font-size: 11px; line-height: 1.45; color: var(--fg-3); }
.story-foot { margin-top: 80px; border-top: 0.5px solid var(--rule-strong); }
.story-link {
  display: flex; justify-content: space-between; gap: 24px; align-items: baseline;
  padding: 20px 0; border-bottom: 0.5px solid var(--rule); color: inherit; text-decoration: none;
}
.story-link-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--fg-4); white-space: nowrap; }
.story-link-text { font-size: 18px; font-weight: 600; color: var(--fg-1); text-align: right; transition: color var(--dur-2) var(--ease-mech); }
.story-link:hover .story-link-text { color: var(--datum); }

@media (max-width: 1080px) {
  .story-card { grid-template-columns: 1fr; }
  .story-card-img { border-right: 0; border-bottom: 0.5px solid var(--rule); }
}
@media (max-width: 768px) {
  .story { padding: 56px 16px 96px; }
  .story-title { font-size: 40px; }
  .story-dek { font-size: 19px; }
  .story-body { margin-top: 40px; }
  .story-body > p { font-size: 18px; }
  .story-body > p.story-open { font-size: 23px; }
  .story-pull { font-size: 24px; margin: 36px 0; }
  .story-media.wide, .story-media.pair { width: calc(100vw - 32px); }
  .story-media.pair { grid-template-columns: 1fr; }
  .story-metrics { grid-template-columns: 1fr 1fr; }
  .story-metrics > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .story-metrics > div:nth-child(n+3) { border-top: 0.5px solid var(--rule); }
  .story-metrics dt { font-size: 32px; }
  .story-card-body { padding: 20px; }
  .story-card-title { font-size: 30px; }
  .story-link { flex-direction: column; gap: 6px; }
  .story-link-text { text-align: left; }
}
.story-title, .story-card-title, .story-dek, .story-card-dek, .story-body > p, .story-pull, .story-metrics dt, .story-link-text, .principles li b { font-family: var(--font-display); }

/* 2026.10.21 — Stories v2: three stories, compact row, n-up figure strips */
.story-media.pair.cols-3 { grid-template-columns: repeat(3, 1fr); }
.story-media.pair.cols-4 { grid-template-columns: repeat(4, 1fr); }
.story-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.story-mini {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  border: 0.5px solid var(--rule-strong); background: var(--bg-inset); color: inherit; text-decoration: none;
  transition: border-color var(--dur-2) var(--ease-mech);
}
.story-mini:hover { border-color: var(--datum); }
.story-mini:hover .story-card-cta { color: var(--datum); border-bottom-color: var(--datum); }
.story-mini-img { overflow: hidden; border-right: 0.5px solid var(--rule); background: var(--bg); min-height: 220px; }
.story-mini-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-mini-body { display: flex; flex-direction: column; padding: 20px 24px; }
.story-mini-title { margin: 14px 0 0; font-family: var(--font-display); font-size: 24px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; text-transform: none; color: var(--fg-1); text-wrap: balance; }
.story-mini-dek { margin: 10px 0 0; font-family: var(--font-display); font-size: 14px; line-height: 1.5; color: var(--fg-3); text-wrap: pretty; }
.story-mini .story-card-cta { padding-top: 20px; }
@media (max-width: 1080px) {
  .story-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .story-media.pair.cols-3, .story-media.pair.cols-4 { grid-template-columns: 1fr 1fr; }
  .story-mini { grid-template-columns: 1fr; }
  .story-mini-img { border-right: 0; border-bottom: 0.5px solid var(--rule); min-height: 0; aspect-ratio: 16 / 10; }
}

/* 2026.10.21 — Stories v3: archive page, fixed home slot, story links on tiles + sheets */
.stories-all { color: var(--fg-3); text-decoration: none; transition: color var(--dur-2) var(--ease-mech); }
.stories-all:hover { color: var(--datum); }
.story-back {
  display: inline-block; margin-bottom: 32px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--fg-4); text-decoration: none;
}
.story-back:hover { color: var(--datum); }

.stories-index { padding: 96px 24px 128px; max-width: 1080px; margin: 0 auto; }
.stories-index-head { max-width: 680px; }
.stories-index-head .story-title { margin-top: 16px; }
.stories-list { list-style: none; margin: 64px 0 0; padding: 0; border-top: 0.5px solid var(--rule-strong); }
.stories-item {
  display: grid; grid-template-columns: 140px minmax(0, 1fr) 280px; gap: 32px; align-items: start;
  padding: 28px 0; border-bottom: 0.5px solid var(--rule); color: inherit; text-decoration: none;
}
.stories-item-meta { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--fg-4); }
.stories-item-meta span:first-child { color: var(--datum); }
.stories-item-text { display: flex; flex-direction: column; gap: 10px; }
.stories-item-title { font-family: var(--font-display); font-size: 32px; line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; color: var(--fg-1); text-wrap: balance; transition: color var(--dur-2) var(--ease-mech); }
.stories-item-dek { font-family: var(--font-display); font-size: 17px; line-height: 1.5; color: var(--fg-2); text-wrap: pretty; }
.stories-item-img { aspect-ratio: 16 / 10; overflow: hidden; border: 0.5px solid var(--rule); background: var(--bg-inset); }
.stories-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stories-item:hover .stories-item-title { color: var(--datum); }

.work-tile .tile-ctas { display: inline-flex; flex-wrap: wrap; gap: 8px 20px; }
.work-tile .caption .tile-story { color: var(--datum); cursor: pointer; }
.work-tile .caption .tile-story:hover { text-decoration: underline; text-underline-offset: 4px; }
.tile-story-tag { color: var(--datum); }

.detail-story {
  display: inline-block; margin-top: 16px; padding: 10px 14px;
  border: 0.5px solid var(--rule-strong); background: var(--bg-inset);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--fg-1); text-decoration: none;
  transition: border-color var(--dur-2) var(--ease-mech), color var(--dur-2) var(--ease-mech);
}
.detail-story:hover { border-color: var(--datum); color: var(--datum); }

@media (max-width: 900px) {
  .stories-item { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .stories-item-meta { flex-direction: row; gap: 16px; }
  .stories-item-img { order: -1; }
}
@media (max-width: 768px) {
  .stories-index { padding: 56px 16px 96px; }
  .stories-item-title { font-size: 26px; }
  .stories-item-dek { font-size: 16px; }
}
