/* Hallmark · shape: Manifesto · genre: editorial · theme: Sport (deal 1/3, seed personal-graham-cooke-fractional-6ba2·ba042f06·2026-11-15·r0) · job: hire · draw: 9d23a5
 * hero: Corridor · nav: edge-aligned, wordmark and one action · footer: mast · imagery: photographs, the user's portrait 1, duotone · signature: the revenue figure at poster scale, then changing in place on a pinned results sheet
 * axes: light/display-condensed/chromatic-volt · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V5 · weakest: S, one unnamed client is thin proof; led with its real figure at poster scale and cut every claim without a source */
/* Hallmark · dismissed F8 · one pinned chapter: the sheet rows, the bar and the figure all read the single --case timeline */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --text-poster: clamp(4rem, min(25vw, 19dvh), 10.5rem);
  --text-mast: clamp(3rem, 9vw, 8rem);
  --text-split: clamp(3.5rem, 8vw, 7.5rem);
  --nav-h: 72px;
  --color-ink-rule: color-mix(in oklab, var(--color-paper) 24%, var(--color-ink));
  --color-accent-hover: color-mix(in oklab, var(--color-accent) 86%, var(--color-ink));
}

h1, h2, h3 { text-transform: uppercase; line-height: 1.02; }
a:hover { text-decoration-color: var(--color-accent-deep); text-decoration-thickness: 2px; }

.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-lg); border: var(--rule-bar) solid transparent; border-radius: var(--radius-card); font: var(--display-weight) var(--text-lg)/1 var(--font-display); text-transform: uppercase; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn--primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-accent-hover); }
.btn--secondary { border-color: var(--color-ink); background: transparent; color: var(--color-ink); }
.btn--secondary:hover { background: var(--color-paper-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }

/* nav: edge-aligned, a wordmark and one action */
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: var(--nav-h); }
.wordmark { font: var(--display-weight) var(--text-xl)/1 var(--font-display); letter-spacing: var(--tracking-display); text-transform: uppercase; text-decoration: none; white-space: nowrap; }

/* hero: Corridor, the figure stacked at poster scale */
.hero { display: grid; align-items: center; min-height: calc(100dvh - var(--nav-h)); padding-block: var(--space-xl) var(--space-2xl); }
.hero__col { display: grid; justify-items: start; gap: var(--space-lg); width: fit-content; max-width: 100%; margin-inline: auto; }
.hero h1 { max-width: none; font-size: var(--text-poster); }
.hero h1 span { display: block; white-space: nowrap; }
.hero .lead { max-width: 32ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin-top: var(--space-md); }
.hero h1 span, .hero .lead, .hero .actions { animation: settle var(--dur-long) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes settle { from { opacity: 0; transform: translateY(8px); } }

/* shared head block */
.head { display: grid; gap: var(--space-lg); margin-bottom: var(--space-2xl); }

/* the case: a results sheet pinned while three facts pass it */
.case { padding-block: var(--section-gap-s) var(--section-gap); }
.case__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-3xl); align-items: start; }
.sheet { position: sticky; top: var(--space-xl); z-index: var(--z-base); padding: var(--space-xl); background: var(--color-paper-2); border-top: var(--rule-bar) solid var(--color-rule-2); border-bottom: var(--rule-bar) solid var(--color-rule-2); }
.sheet dl { margin: 0; }
.sheet dt { font-size: var(--text-md); font-weight: 500; color: var(--color-muted); }
.sheet dd { margin: 0; }
.sheet__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: var(--space-xl); padding-bottom: var(--space-xl); }
.sheet__lead { display: grid; align-content: space-between; justify-items: start; gap: var(--space-sm); }
.split { counter-reset: rev var(--rev); font: 500 var(--text-split)/1 var(--font-outlier); font-variant-numeric: tabular-nums; }
.chart { display: grid; gap: var(--space-sm); width: 232px; margin: 0; }
.chart__plot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: var(--space-md); height: 300px; border-bottom: var(--rule-bar) solid var(--color-rule-2); }
.chart__bar { display: block; border-radius: var(--radius-card) var(--radius-card) 0 0; }
.chart__bar--was { height: 15%; background: var(--color-rule-2); }
.chart__bar--now { height: 100%; background: var(--color-accent); transform-origin: bottom; }
.chart__key { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.chart__key span { display: grid; gap: var(--space-3xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.chart__key b { font: 500 var(--text-lg)/1.2 var(--font-outlier); font-variant-numeric: tabular-nums; color: var(--color-ink); }
.sheet__row { position: relative; isolation: isolate; display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-lg); min-height: 64px; padding-block: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); }
.sheet__row::before { content: ""; position: absolute; inset: 0 calc(-1 * var(--space-md)); z-index: -1; background: var(--color-paper-3); opacity: 0; }
.sheet__row dd { font-size: var(--text-lg); font-weight: 500; text-align: right; }
.panels { display: grid; }
.panel { display: grid; align-content: center; gap: var(--space-md); min-height: 70svh; }
.panel h3 { max-width: 12ch; font-size: var(--text-display-s); line-height: 1.02; }
.panel p { font-size: var(--text-lead); line-height: 1.45; max-width: 30ch; }

/* the rules: the one ink band */
.rules { padding-block: var(--section-gap-s); background: var(--color-ink); color: var(--color-paper); }
.rules__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); align-items: baseline; padding-block: var(--space-xl); border-top: var(--rule-hair) solid var(--color-ink-rule); }
.rules__row:last-child { border-bottom: var(--rule-hair) solid var(--color-ink-rule); }
.rules__row h3 { grid-column: 1 / span 7; max-width: none; font-size: var(--text-display-s); line-height: 1.02; }
.rules__row p { grid-column: 8 / -1; font-size: var(--text-lead); line-height: 1.45; }

/* what I run: two by two under the bar rule */
.run { padding-block: var(--section-gap-l) var(--section-gap-s); }
.run__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: var(--rule-bar) solid var(--color-rule-2); }
.run__cell { display: grid; align-content: space-between; gap: var(--space-xl); min-height: 240px; padding: var(--space-lg) var(--space-xl) var(--space-xl); border-bottom: var(--rule-hair) solid var(--color-rule); }
.run__cell:nth-child(odd) { padding-left: 0; }
.run__cell:nth-child(even) { padding-right: 0; border-left: var(--rule-hair) solid var(--color-rule); }
.run__cell h3 { max-width: none; font-size: var(--text-display-s); line-height: 1.02; }
.run__cell p { font-size: var(--text-lead); line-height: 1.45; }

/* fit: a head beside rows */
.fit { padding-block: var(--space-2xl) var(--section-gap); }
.fit__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); align-items: start; }
.fit__grid .head { grid-column: 1 / span 4; margin-bottom: 0; }
.fit__rows { grid-column: 5 / -1; margin: 0; padding: 0; list-style: none; border-top: var(--rule-bar) solid var(--color-rule-2); }
.fit__rows li { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-lg); min-height: 80px; padding-block: var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule); font-size: var(--text-xl); }
.fit__rows b { font: var(--display-weight) var(--text-xl)/1 var(--font-display); letter-spacing: var(--tracking-display); text-transform: uppercase; white-space: nowrap; }
.fit__rows .no b { color: var(--color-muted); }

/* close: the action again, and a plain address */
.close { padding-block: var(--section-gap-s); background: var(--color-paper-2); border-top: var(--rule-bar) solid var(--color-rule-2); }
.close .actions { gap: var(--space-lg); margin-top: var(--space-xl); }
.close .head { margin-bottom: 0; }
.close h2 { font-size: var(--text-display); }
.close__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: end; gap: var(--space-3xl); }
.portrait { aspect-ratio: 4 / 5; margin: 0; border-radius: var(--radius-card); }
.portrait > img { object-position: 50% 100%; }
.caption { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-2); }

/* footer: a mast */
.foot { padding-block: var(--space-3xl) var(--space-xl); }
.foot__mark { display: block; font: var(--display-weight) var(--text-mast)/1 var(--font-display); letter-spacing: var(--tracking-display); text-transform: uppercase; }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-xl); margin: var(--space-xl) 0 0; padding: var(--space-lg) 0 0; list-style: none; border-top: var(--rule-hair) solid var(--color-rule); }
.foot small { display: block; margin-top: var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); }

/* the one scroll pattern: the bar grows to scale and the figure follows it; pinned on a --case timeline from 60rem, on the sheet's own entry below that */
@property --rev { syntax: "<integer>"; inherits: false; initial-value: 100; }
@keyframes row-a { 0%, 22% { opacity: 1; } 30%, 100% { opacity: 0; } }
@keyframes row-b { 0%, 22% { opacity: 0; } 30%, 70% { opacity: 1; } 78%, 100% { opacity: 0; } }
@keyframes row-c { 0%, 70% { opacity: 0; } 78%, 100% { opacity: 1; } }
@keyframes bar-grow { from { transform: scaleY(0.15); } to { transform: none; } }
@keyframes rev-count { from { --rev: 15; } to { --rev: 100; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 60rem) {
    .case__grid { view-timeline: --case block; }
    .sheet__row--a::before { animation: row-a linear both; animation-timeline: --case; animation-range: contain 0% contain 100%; }
    .sheet__row--b::before { animation: row-b linear both; animation-timeline: --case; animation-range: contain 0% contain 100%; }
    .sheet__row--c::before { animation: row-c linear both; animation-timeline: --case; animation-range: contain 0% contain 100%; }
    .chart__bar--now { animation: bar-grow linear both; animation-timeline: --case; animation-range: contain 0% contain 85%; }
    .split { animation: rev-count linear both; animation-timeline: --case; animation-range: contain 0% contain 85%; }
  }
  @media (prefers-reduced-motion: no-preference) and (max-width: 59.99rem) {
    .sheet { view-timeline: --sheet block; }
    .chart__bar--now { animation: bar-grow linear both; animation-timeline: --sheet; animation-range: cover 15% cover 55%; }
    .split { animation: rev-count linear both; animation-timeline: --sheet; animation-range: cover 15% cover 55%; }
  }
  @media (prefers-reduced-motion: no-preference) {
    .split__now { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .split::after { content: "$" counter(rev) "K"; }
  }
}

@media (max-width: 80rem) {
  .sheet__top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 60rem) {
  .hero { min-height: 0; padding-block: var(--space-2xl); }
  .case__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); }
  .sheet { position: static; padding: var(--space-lg); }
  .sheet__top { grid-template-columns: minmax(0, 1fr); }
  .chart { width: 100%; max-width: 320px; }
  .chart__plot { height: 220px; }
  .panels { gap: var(--space-xl); }
  .panel { min-height: 0; }
  .rules__row h3, .rules__row p { grid-column: 1 / -1; }
  .rules__row { row-gap: var(--space-sm); }
  .run__cell { min-height: 180px; padding-inline: var(--space-lg); }
  .fit__grid .head, .fit__rows { grid-column: 1 / -1; }
  .close__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); }
  .close__who { max-width: 320px; }
  .fit__grid { row-gap: var(--space-xl); }
}
@media (max-width: 40rem) {
  .run__grid { grid-template-columns: minmax(0, 1fr); }
  .run__cell { min-height: 0; gap: var(--space-md); }
  .run__cell:nth-child(n) { padding-inline: 0; border-left: 0; }
  .fit__rows li { min-height: 64px; padding-block: var(--space-md); font-size: var(--text-md); }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 span, .hero .lead, .hero .actions { animation: none; }
  .btn { transition: background-color var(--dur-short) linear; }
}
