/* ==========================================================================
   Home — page layout only (tokens/components come from core.css)
   ========================================================================== */

/* ---------- 00 Hall: hero + crane (sticky WebGL stage) -------------------- */
.hall { position: relative; }
.hall__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; z-index: 0; background: var(--bg-0); }
.hall__content { position: relative; z-index: 2; margin-top: -100svh; }
.hall__poster, .hall__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hall__poster { object-fit: cover; object-position: 64% 50%; opacity: 0.9; }
.hall__canvas { opacity: 0; transition: opacity 1.8s var(--ease-move); }
.hall.is-live .hall__canvas { opacity: 1; }
.hall.is-live .hall__poster { opacity: 0; transition: opacity 0.6s linear 1.4s; }
.hall__scrim { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 12, 16, 0.88) 0%, rgba(10, 12, 16, 0.56) 32%, rgba(10, 12, 16, 0) 60%),
    linear-gradient(0deg, rgba(10, 12, 16, 0.92) 0%, rgba(10, 12, 16, 0) 34%),
    linear-gradient(180deg, rgba(10, 12, 16, 0.55) 0%, rgba(10, 12, 16, 0) 18%); }
.hall__scrim--now { opacity: 0; background:
    linear-gradient(90deg, rgba(10, 12, 16, 0.94) 0%, rgba(10, 12, 16, 0.8) 38%, rgba(10, 12, 16, 0.15) 70%, rgba(10, 12, 16, 0) 100%); }
.hall__frame { position: absolute; inset: calc(var(--header-h) + 16px) var(--margin) 20px; pointer-events: none; }
.hall__frame span { position: absolute; width: 14px; height: 14px; border: 0 solid rgba(233, 235, 238, 0.32); }
.hall__frame span:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hall__frame span:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hall__frame span:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hall__frame span:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.hall__readout { position: sticky; z-index: 3; top: calc(100svh - 64px); height: 0; display: flex; justify-content: flex-end; align-items: flex-start; gap: 18px; padding-inline: var(--margin); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tx-3); pointer-events: auto; }
.hall__readout .stamp { color: var(--tx-3); }
.hall__pause { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; color: var(--tx-2); font: inherit; letter-spacing: inherit; text-transform: inherit; }
.hall__pause:hover { color: var(--tx-1); }
.hall__pause svg { width: 10px; height: 10px; }

.hall__hero { position: relative; z-index: 2; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(48px, 9svh, 104px); padding-top: calc(var(--header-h) + 48px); }
.hall__eyebrow { margin-bottom: clamp(20px, 3vw, 32px); }
.hall__hero h1 { max-width: 15ch; }
.hall__sub { margin-top: clamp(20px, 2.4vw, 30px); max-width: 46ch; }
.hall__cta { margin-top: clamp(28px, 3vw, 40px); display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.hall__scroll { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: none; }

.hall__now { position: relative; z-index: 2; min-height: 125svh; display: flex; align-items: center; padding-block: 18svh 22svh; }
.hall__now-inner { max-width: 640px; }
.hall__now h2 { margin-top: var(--s-5); max-width: 17ch; }
.hall__now h2 .d-block { display: block; }
.hall__now p.t-lead { margin-top: var(--s-5); }
.hall__now .tblock { margin-top: clamp(32px, 4vw, 48px); background: rgba(10, 12, 16, 0.55); }
.hall__now .link-arrow { margin-top: var(--s-5); }

@media (max-width: 767px) {
  .hall__scrim { background: linear-gradient(0deg, rgba(10, 12, 16, 0.95) 0%, rgba(10, 12, 16, 0.8) 44%, rgba(10, 12, 16, 0.1) 74%), linear-gradient(180deg, rgba(10, 12, 16, 0.6) 0%, rgba(10, 12, 16, 0) 20%); }
  .hall__scrim--now { background: rgba(10, 12, 16, 0.82); }
  .hall__readout { top: calc(var(--header-h) + 8px); }
  .hall__frame { display: none; }
  .hall__now { min-height: 110svh; align-items: flex-end; padding-bottom: 12svh; }
}
html.reduce-motion .hall__stage { position: absolute; inset: 0 0 auto; height: 100svh; }
html.reduce-motion .hall__content { margin-top: 0; }
html.reduce-motion .hall__now { min-height: 0; padding-block: var(--section); background: var(--bg-0); }

/* ---------- 02 The stack ---------------------------------------------- */
.stack-sec { position: relative; background: var(--bg-0); }
.stack-sec__grid { align-items: start; }
.stack-sec__head { grid-column: 1 / span 7; }
.stack-sec__head h2 { max-width: 14ch; }
.stack-sec__head p { margin-top: var(--s-5); }
.stack-sec__fig { grid-column: 1 / span 6; position: sticky; top: calc(var(--header-h) + 4svh); height: calc(100svh - var(--header-h) - 8svh); display: flex; align-items: center; justify-content: center; }
.stack-sec__fig svg { width: 100%; height: 100%; max-height: 640px; overflow: visible; }
.stack-sec__list { grid-column: 8 / span 5; list-style: none; padding: 0; padding-block: 18svh 22svh; }
.layer { min-height: 42svh; display: grid; align-content: center; gap: 10px; padding-block: 24px; border-top: 1px solid var(--line-1); transition: opacity 400ms var(--ease-soft); }
.layer__code { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tx-3); display: flex; gap: 10px; }
.layer__code b { color: var(--tx-2); font-weight: 500; }
.layer h3 { font-size: var(--t-h3); line-height: 1.12; letter-spacing: -0.015em; }
.layer p { max-width: 40ch; }
/* Inactive layers dim by colour, not opacity, so text keeps ≥ 8:1 contrast */
.stack-sec.is-scrubbing .layer h3, .stack-sec.is-scrubbing .layer p { color: var(--tx-3); transition: color 400ms var(--ease-soft); }
.stack-sec.is-scrubbing .layer.is-active h3 { color: var(--tx-1); }
.stack-sec.is-scrubbing .layer.is-active p { color: var(--tx-2); }
.stack-sec.is-scrubbing .layer.is-active .layer__code { color: var(--tx-2); }
.layer.is-active .layer__code b { color: var(--tx-1); }
.stack-sec.teams-on .plate.is-active .plate__node { fill: var(--tx-1); }
.plate__callout { font-size: 10px; }

/* plates */
.plate { transition: opacity 500ms var(--ease-soft); }
.plate__face { fill: var(--bg-0); stroke: var(--line-2); stroke-width: 1; }
.plate__art { stroke: var(--tx-3); stroke-width: 0.75; fill: none; stroke-opacity: 0.45; }
.plate__art .fill { fill-opacity: 0.45; }
.plate.is-active .plate__art { stroke-opacity: 1; } .plate.is-active .plate__art .fill { fill-opacity: 1; }
.plate__art .fill { fill: var(--tx-3); stroke: none; }
.plate__label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; fill: var(--tx-3); text-transform: uppercase; }
.plate__edge { stroke: var(--line-2); stroke-width: 1; }
.stack-sec.is-scrubbing .plate { opacity: 0.38; }
.stack-sec.is-scrubbing .plate.is-active { opacity: 1; }
.plate.is-active .plate__face { stroke: var(--tx-1); fill: var(--bg-1); }
.plate.is-active .plate__art { stroke: var(--tx-1); opacity: 1; }
.plate.is-active .plate__art .fill { fill: var(--tx-1); }
.plate.is-active .plate__label { fill: var(--tx-1); }
.plate.is-active .plate__node { fill: var(--accent); }
.plate__node { fill: var(--tx-3); }
.dim-line { stroke: var(--tx-3); stroke-width: 0.75; fill: none; }
.dim-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; fill: var(--tx-2); }
.stack-sec.teams-on .dim-line { stroke: var(--accent); }
.stack-sec.teams-on .dim-label { fill: var(--accent); }
.layer--teams { min-height: 34svh; }

@media (max-width: 1023px) {
  .stack-sec__head, .stack-sec__fig, .stack-sec__list { grid-column: 1 / -1; }
  .stack-sec__fig { position: relative; top: 0; height: auto; margin-block: var(--s-6); }
  .stack-sec__fig svg { max-height: 460px; }
  .stack-sec__list { padding-block: 0; }
  .layer { min-height: 0; padding-block: 28px; }
}

/* ---------- 03 Products (component styles in products.css) ------------ */
.products-sec .section-head h2 { max-width: 16ch; }

/* ---------- 04 Record ------------------------------------------------- */
.record-sec .record { margin-top: var(--s-4); }
.record-note { margin-top: var(--s-5); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- 05 General notes (paper sheet) ----------------------------- */
.notes { padding-block: var(--section); }
.notes__sheet { position: relative; border: 1px solid var(--ink-3); padding: clamp(28px, 5vw, 72px); }
.notes__sheet::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--paper-line); pointer-events: none; }
.notes__zones { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.06em; }
.notes__zones span { position: absolute; }
.notes__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s-5); padding-bottom: var(--s-6); border-bottom: 1px solid var(--paper-line); }
.notes__head h2 { color: var(--ink-1); }
.notes__list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); counter-reset: note; }
.notes__list li { counter-increment: note; display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding: 32px 0; border-bottom: 1px solid var(--paper-line); }
.notes__list li::before { content: counter(note); width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--ink-1); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--ink-1); margin-top: 2px; }
.notes__list h3 { font-size: var(--t-h4); line-height: 1.25; color: var(--ink-1); font-weight: 520; letter-spacing: -0.01em; }
.notes__list p { margin-top: 8px; color: var(--ink-2); max-width: 44ch; }
.notes__tblock { margin-top: var(--s-6); display: flex; justify-content: flex-end; }
.notes__tblock dl { display: grid; grid-template-columns: repeat(3, auto); border: 1px solid var(--ink-3); }
.notes__tblock dl > div { padding: 8px 14px; border-left: 1px solid var(--paper-line); }
.notes__tblock dl > div:first-child { border-left: 0; }
.notes__tblock dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }
.notes__tblock dd { font-size: 13px; color: var(--ink-1); }
@media (max-width: 767px) { .notes__list { grid-template-columns: 1fr; } .notes__zones { display: none; } .notes__tblock dl { grid-template-columns: 1fr; } .notes__tblock dl > div { border-left: 0; border-top: 1px solid var(--paper-line); } .notes__tblock dl > div:first-child { border-top: 0; } }

/* ---------- 06 Offices ------------------------------------------------ */
.offices-sec h2 { max-width: 14ch; }
.offices-sec .offices { margin-top: clamp(40px, 5vw, 64px); }
.span-line { margin-top: var(--s-5); font-family: var(--font-mono); font-size: 13px; color: var(--tx-3); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.span-line b { color: var(--tx-1); font-weight: 500; }

/* ---------- 07 People ------------------------------------------------- */
.people { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-7); }
.people__head { grid-column: 1 / span 5; }
.people__head h2 { max-width: none; }
.people .person { margin: 0; align-content: start; }
.people .person figcaption { display: grid; gap: 4px; }
.people .person:nth-of-type(1) { grid-column: 7 / span 3; }
.people .person:nth-of-type(2) { grid-column: 10 / span 3; }
@media (max-width: 1023px) { .people__head { grid-column: 1 / -1; } .people .person:nth-of-type(1) { grid-column: 1 / span 6; } .people .person:nth-of-type(2) { grid-column: 7 / span 6; } }

/* ---------- 08 Close -------------------------------------------------- */
.close { position: relative; overflow: hidden; padding-block: clamp(120px, 16vw, 240px); border-top: 1px solid var(--line-1); }
.close h2 { font-size: var(--t-display); line-height: 0.98; letter-spacing: -0.032em; font-stretch: 92%; max-width: 20ch; }
.close p { margin-top: var(--s-5); }
.close__actions { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: 12px; }
.stack-svg * { vector-effect: non-scaling-stroke; }
.hall__stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 24%; background: linear-gradient(0deg, var(--bg-0) 0%, rgba(10, 12, 16, 0) 100%); pointer-events: none; }

.person__photo { position: relative; }
.person__photo img[src*="caleb"] { transform: scale(1.14); transform-origin: 50% 30%; }
.person__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,16,.38) 0%, rgba(10,12,16,0) 38%); pointer-events: none; }
