/* Hallmark · shape: Bento Grid · genre: modern-minimal · theme: Rim (deal 1/3, seed interactive-webgl-personal-portfolio-31c7·749e2d36·2026-11-23·r0) · job: hire · draw: a0ac93
 * hero: Index · nav: banner over a retracting bar · footer: letter close · imagery: the product (captures of the live sites, set on the plates of a WebGL plan) · signature: the work as a measured site plan, seen straight down, that tilts into a fly-through on scroll
 * axes: dark/grotesk-sans/warm · posture: committed · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: H, an Index hero with no list in it reads empty without WebGL; the eight plates carry their names and the same index follows as plain HTML rows directly below */
/* Hallmark · dismissed 19 · Nexus POS is the product's real name on mrkworld.com, not an invented one */
@import url("./tokens.css");
@import url("./base.css");

:root { --bar-h: 65px; }

/* ---------- the plan (WebGL canvas) ---------- */
#plan { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.no-webgl #plan, .no-webgl .hud { display: none; }
main, .banner, .bar, .colophon { position: relative; z-index: var(--z-base); }
.is-over-plate { cursor: pointer; }

.measure { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: var(--space-md); top: var(--space-md); z-index: var(--z-modal); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); transform: translateY(-300%); }
.skip:focus-visible { transform: none; }

/* ---------- banner over a retracting bar ---------- */
.banner { display: flex; justify-content: space-between; gap: var(--space-md); margin: 0; padding: var(--space-xs) var(--gutter); background: var(--color-paper-3); border-bottom: var(--rule-hair) solid var(--color-rule-2); color: var(--color-muted); font-size: var(--text-sm); }
.bar { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-paper); border-bottom: var(--rule-hair) solid var(--color-rule); transition: transform var(--dur-short) var(--ease-out); }
.bar.is-away { transform: translateY(-100%); }
.bar:focus-within { transform: none; }
.bar__in { display: flex; align-items: center; gap: var(--space-xl); min-height: calc(var(--bar-h) - 1px); }
.wordmark { font-weight: 500; text-decoration: none; margin-inline-end: auto; }
.bar__links { display: flex; gap: var(--space-lg); font-size: var(--text-sm); }
.bar__links a { color: var(--color-ink-2); text-decoration: none; padding-block: var(--space-xs); }
.bar__links a:hover { color: var(--color-ink); text-decoration: underline; }

/* ---------- controls ---------- */
.btn { display: inline-block; border-radius: var(--radius-pill); padding: var(--space-sm) var(--space-lg); border: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); color: var(--color-ink); font-weight: 500; font-size: var(--text-sm); text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { border-color: var(--color-ink-2); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-focus); border-color: var(--color-focus); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* ---------- hero: the index is the visual ---------- */
.hero { display: grid; grid-template-rows: auto minmax(320px, 1fr); min-height: calc(100svh - 101px); }
.hero__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-2xl); align-items: end; padding-block: var(--space-2xl) var(--space-lg); }
.hero__side { display: grid; gap: var(--space-lg); padding-bottom: var(--space-xs); }
.hero .lead { color: var(--color-ink-2); }

/* ---------- a text column beside a window onto the plan ---------- */
.work, .case, .contact { background: linear-gradient(to right, var(--color-paper) 50%, transparent 50%); border-top: var(--rule-hair) solid var(--color-rule); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split__text { border-inline-end: var(--rule-hair) solid var(--color-rule); padding-block: var(--section-gap-s); padding-inline-end: var(--space-2xl); display: grid; gap: var(--space-lg); align-content: start; }
.split__text .lead { color: var(--color-ink-2); }
.stage--side { position: sticky; top: var(--bar-h); height: calc(100svh - var(--bar-h)); }

/* ---------- the work index ---------- */
.index { list-style: none; margin: var(--space-xl) 0 0; padding: 0; }
.row { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--space-md); padding-block: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule-2); }
.row:last-child { border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.row__at { display: flex; align-items: center; gap: var(--space-xs); align-self: start; padding-top: 0.3em; color: var(--color-muted); font-size: var(--text-sm); transition: color var(--dur-short) var(--ease-out); }
.row__at::before { content: ""; width: 8px; height: 8px; background: var(--color-accent); opacity: 0; transition: opacity var(--dur-short) var(--ease-out); }
.row.is-active .row__at { color: var(--color-ink); }
.row.is-active .row__at::before { opacity: 1; }
.row__body { display: grid; gap: var(--space-xs); }
.row__body p { color: var(--color-ink-2); }
.row__links { display: flex; flex-wrap: wrap; gap: var(--space-lg); font-size: var(--text-sm); padding-top: var(--space-2xs); }
.row__links a, .contact__links a { color: var(--color-ink); text-decoration-color: var(--color-muted-2); transition: text-decoration-color var(--dur-micro) var(--ease-out); }
.row__links a:hover, .contact__links a:hover { text-decoration-color: var(--color-accent); }

/* ---------- one project opened ---------- */
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: var(--space-lg) 0; border-block: var(--rule-hair) solid var(--color-rule); }
.figures > div { display: flex; flex-direction: column-reverse; gap: var(--space-xs); padding: var(--space-lg) var(--space-lg) var(--space-lg) 0; }
.figures > div + div { border-inline-start: var(--rule-hair) solid var(--color-rule); padding-inline-start: var(--space-lg); }
.figures dt { color: var(--color-muted); font-size: var(--text-sm); }
.figures dd { margin: 0; font-variant-numeric: tabular-nums; font-size: var(--text-display-s); letter-spacing: -0.03em; line-height: 1; }
.unit { font-size: 0.5em; color: var(--color-muted); margin-inline-start: 0.15em; }
.case .split__text > p:not([class]) { color: var(--color-ink-2); }

/* ---------- roles: a bento on a sunk band ---------- */
.roles { background: var(--color-paper-3); border-block: var(--rule-hair) solid var(--color-rule); padding-block: var(--section-gap-s); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap-columns); }
.tile { grid-column: span 4; margin: 0; padding: var(--space-xl); background: var(--color-paper-2); display: grid; gap: var(--space-md); align-content: start; }
.tile p { color: var(--color-ink-2); }
.tile--time { grid-column: span 8; gap: var(--space-xl); }
.tile--portrait { position: relative; padding: 0; min-height: 420px; }
.tile--portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: saturate(0.8) contrast(1.1); position: absolute; inset: 0; }
.tile--portrait figcaption { position: absolute; inset: auto 0 0 0; padding: var(--space-sm) var(--space-lg); background: color-mix(in oklab, var(--color-paper) 78%, transparent); color: var(--color-ink-2); font-size: var(--text-sm); }

/* the role tree: tree.js adds .has-tree once WebGL is up; without it the list stands alone */
.grove { display: grid; gap: var(--space-xl); }
.has-tree .grove { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.tree { display: none; position: relative; min-height: 420px; background: var(--color-paper); }
.has-tree .tree { display: block; }
.tree canvas { position: absolute; inset: 0 0 3.5rem; width: 100%; height: calc(100% - 3.5rem); cursor: grab; touch-action: pan-y; } /* the foot is kept for a two-line note */
.tree canvas:active { cursor: grabbing; }
.tree__note { position: absolute; inset: auto 0 0 0; margin: 0; padding: var(--space-sm) var(--space-md); color: var(--color-muted); font-size: var(--text-xs); pointer-events: none; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; }
.timeline li { border-top: var(--rule-hair) solid var(--color-rule); }
.timeline button { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: var(--space-2xs) var(--space-md); align-items: center; width: 100%; min-height: 44px; padding: var(--space-sm) 0; border: 0; background: none; color: var(--color-ink); font-size: var(--text-sm); text-align: start; cursor: pointer; }
.timeline button::before { content: ""; width: 8px; height: 8px; background: var(--color-accent-2); } /* the colour of the role's leaf */
.is-now button::before { background: var(--color-accent); }
.timeline__role { text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color var(--dur-micro) var(--ease-out); }
.timeline .is-active .timeline__role { text-decoration-color: var(--color-accent); }
.timeline .measure { color: var(--color-muted); font-size: var(--text-xs); text-align: end; }

/* ---------- the close: a letter ---------- */
.contact .split__text { min-height: calc(100svh - var(--bar-h)); align-content: center; }
.contact__mail { font-size: var(--text-3xl); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; overflow-wrap: anywhere; }
.contact__mail a { text-decoration: none; }
.contact__mail a:hover { text-decoration: underline; text-decoration-color: var(--color-accent); }
.contact__phone { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-md); color: var(--color-muted); font-size: var(--text-sm); }
.contact__phone a { color: var(--color-ink); font-size: var(--text-lg); text-decoration: none; }
.contact__phone a:hover { text-decoration: underline; }
.contact__links { display: flex; flex-wrap: wrap; gap: var(--space-lg); }
.signoff { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); font-weight: 500; }
.signoff span { color: var(--color-muted); font-weight: 400; font-size: var(--text-sm); }

.colophon { background: var(--color-paper); border-top: var(--rule-hair) solid var(--color-rule); padding-block: var(--space-lg); color: var(--color-muted); font-size: var(--text-sm); }

.hud { position: fixed; right: var(--space-lg); bottom: var(--space-md); z-index: var(--z-raised); margin: 0; padding: var(--space-2xs) var(--space-xs); background: color-mix(in oklab, var(--color-paper) 78%, transparent); color: var(--color-muted); font-size: var(--text-xs); pointer-events: none; }

/* ---------- under 60rem everything stacks; the window follows its text ---------- */
@media (max-width: 60rem) {
  .bar__links { display: none; }
  .hero__in { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); padding-block: var(--space-xl) var(--space-md); }
  .work, .case, .contact { background: none; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split__text { border-inline-end: 0; background: var(--color-paper); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); padding-block: var(--section-gap-s) var(--space-2xl); }
  .contact .split__text { min-height: 0; }
  .stage--side { position: static; height: 78vw; min-height: 300px; margin-inline: calc(-1 * var(--gutter)); border-top: var(--rule-hair) solid var(--color-rule); }
  .tile, .tile--time { grid-column: span 12; }
  .tile--portrait { min-height: 0; aspect-ratio: 4 / 5; }
  .has-tree .grove { grid-template-columns: minmax(0, 1fr); }
  .tree { min-height: 0; aspect-ratio: 4 / 5; }
  .timeline button { grid-template-columns: 8px minmax(0, 1fr); }
  .timeline button::before { align-self: start; margin-top: 0.5em; }
  .timeline .measure { grid-column: 2; text-align: start; }
  .hud { display: none; }
}
