/* Hallmark · shape: single scene with expanding sections (by request) · genre: editorial · theme: Garden (deal 1/3, seed personal-b6ca·c8caa3c9·2026-11-19·r0), recoloured for the scene · job: hire · draw: 341001
 * hero: Poster (full-bleed Blender loop, 6 s, fixed; poster frame under reduced motion) · nav: none, the sections are the nav · footer: colophon line · imagery: one original Blender animation (scene/scene.py, scene/encode.py) · signature: a katana driven into a carpet of maple leaves at sunset
 * axes: dark-scrim/roman-serif/chromatic-red · posture: committed · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S5 R4 V4 · weakest: P, content is all placeholders until the user supplies it */
@import url("./tokens.css");
@import url("./base.css");

/* fonts, self-hosted (fonts/; SIL Open Font License, see fonts/OFL-*.txt): the same files Google Fonts serves, split the same way,
   so a browser only fetches the alphabet a page uses; Hanken Grotesk is one variable file for both weights */
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/hanken-grotesk-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/hanken-grotesk-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/hanken-grotesk-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/hanken-grotesk-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Vollkorn'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/vollkorn-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Vollkorn'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/vollkorn-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --color-accent: oklch(52% 0.19 30); --color-focus: oklch(86% 0.1 75);
  --color-on-scene: oklch(96% 0.02 85); --color-on-scene-2: oklch(86% 0.035 80); --color-on-scene-muted: oklch(78% 0.04 75);
  --color-scrim: oklch(14% 0.02 40 / 0.78); --color-scrim-0: oklch(14% 0.02 40 / 0);
  --color-panel: oklch(16% 0.02 40 / 0.82); --color-hair: oklch(96% 0.02 85 / 0.22);
  --color-sheet: oklch(13% 0.015 40 / 0.95); --color-sheet-panel: oklch(20% 0.02 40 / 0.9);
  /* replace the leftover Garden greens with the scene's warm darks */
  --color-ink: oklch(12% 0.015 40); --color-ink-2: oklch(20% 0.02 40); --color-muted: oklch(55% 0.03 60);
  --color-paper: oklch(12% 0.015 40); --color-paper-2: oklch(17% 0.02 40); --color-paper-3: oklch(22% 0.02 40);
  --color-rule: oklch(96% 0.02 85 / 0.22); --color-rule-2: oklch(96% 0.02 85 / 0.35);
  --color-accent-2: oklch(84% 0.09 70); --color-accent-ink: oklch(97% 0.015 85);
  /* ink-brush UI: a brush mask, plus a soft-edged wipe that sweeps across it so strokes look painted on */
  --brush: url("img/brush-stroke.webp"); --brush-head: url("img/brush-head.webp"); --wash: url("img/brush-panel.svg");
  --wipe: url("img/brush-wipe.svg");
  --panel-fill: var(--color-panel);
  --tint-moss: oklch(52% 0.19 30 / 0.11); --tint-clay: oklch(54% 0.14 46 / 0.10);
}

html { background: var(--color-ink); scrollbar-color: var(--color-muted) var(--color-ink); }
body { background: transparent; color: var(--color-on-scene-2);   /* html carries the colour, so the fixed scene shows */ font-variant-numeric: oldstyle-nums; }
.num { font-variant-numeric: lining-nums tabular-nums; }
:focus-visible { outline-color: var(--color-focus); }
a { transition: text-decoration-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
a:hover { text-decoration-color: var(--color-focus); }

/* the scene, fixed behind everything, with a scrim on the reading side */
.backdrop { position: fixed; inset: 0; z-index: -1; }
.backdrop video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--color-scrim) 0%, var(--color-scrim) 28%, var(--color-scrim-0) 62%); }

.column { width: min(100%, 600px); min-height: 100dvh; padding: var(--space-3xl) var(--space-2xl) var(--space-xl); display: flex; flex-direction: column; gap: var(--space-2xl); }

.intro h1 { color: var(--color-on-scene); max-width: 12ch; }
.intro .lead { margin-top: var(--space-md); color: var(--color-on-scene-2); }
.intro .seeking { margin-top: var(--space-sm); font-size: var(--text-lead); font-weight: 500; color: var(--color-focus); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-lg) var(--space-2xl); margin-top: var(--space-lg); }
/* brush marks: a dense head on the left that runs dry into streaks; the tail trails past the words, like a game menu's selection stroke */
.btn::before, .btn::after, .sections h2::before, .panel::before { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; min-height: 48px; padding: var(--space-sm) var(--space-lg); font-size: 1.125rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-on-scene); text-decoration: none; transition: color var(--dur-short) var(--ease-out) 80ms; }
/* a stroke is three masks intersected: the stroke itself (scene/brush.py: body + dry tail in one image, laid right-aligned
   so the tail is always whole and the body is cropped on the left), the head (frayed where the brush touched down) and
   the wipe that paints it on. --tail is the length of the dry end (the last 15% of the stroke image), --run how far
   the stroke reaches past the element */
.btn::before, .btn::after, .sections h2::before {
  inset: var(--pad-y) calc(var(--run, var(--tail)) * -1) var(--pad-y) var(--pad-x);
  mask: var(--wipe) 100% 0 / 500% 100% no-repeat, var(--brush-head) 0 0 / auto 100% no-repeat, var(--brush) 100% 0 / calc(var(--tail) / 0.15) 100% no-repeat;
  mask-composite: intersect;
  transition: mask-position var(--dur-long) var(--ease-out);
}
.btn + .btn::before, .btn + .btn::after, details:nth-of-type(even) summary h2::before, .pinned h2::before { scale: 1 -1; }   /* mirrored, so neighbours aren't the same stroke */
.btn { --tail: 4em; --run: 2.5em; --pad-y: calc(50% - 1.35em); --pad-x: calc(var(--space-lg) - 1em); }   /* lettered like the section titles, and the stroke scaled to the words the same way: 2.7em tall, head 1em before them */
.btn::before { mask-position: 50% 0, 0 0, 100% 0; transition: none; }
.btn::before { background: var(--color-scrim); }
.btn--primary::before { background: var(--color-accent); }
.btn::after { background: var(--color-on-scene); }
.btn:hover, .btn:focus-visible { color: var(--color-ink); }
.btn:hover::after, .btn:focus-visible::after { mask-position: 50% 0, 0 0, 100% 0; }
.btn:active::after { opacity: 0.85; }

/* expanding sections, styled as a game menu: the hovered, focused or open title gets the stroke */
summary, .pinned-title { display: flex; align-items: center; padding-block: var(--space-md); }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.sections h2 { position: relative; isolation: isolate; font-family: var(--font-body); font-weight: 500; font-size: var(--text-xl); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.2; color: var(--color-on-scene); transition: color var(--dur-short) var(--ease-out) 60ms; }
.sections h2 { --tail: 9.5em; --pad-y: -0.75em; --pad-x: -1em; }
.sections h2::before { background: var(--color-on-scene); }
summary:hover h2, summary:focus-visible h2, details[open] > summary h2, .pinned h2 { color: var(--color-ink); }   /* dark ink on the cream stroke */
summary:hover h2::before, summary:focus-visible h2::before, details[open] > summary h2::before, .pinned h2::before { mask-position: 50% 0, 0 0, 100% 0; }   /* the wipe at 50%: painted (100% unpainted, 0 swept off) */
.panel { position: relative; isolation: isolate; margin-bottom: var(--space-lg); padding: var(--space-lg); }
.panel::before { inset: 0 -8px; background: var(--panel-fill); mask: var(--wash) 0 0 / 100% 100% no-repeat, var(--wipe) 100% 0 / 500% 100% no-repeat; mask-composite: intersect; animation: paint 650ms var(--ease-out) both; }
.panel > * { animation: ink-in 420ms var(--ease-out) 260ms both; }
@keyframes paint { to { mask-position: 0 0, 50% 0; } }
@keyframes ink-in { from { opacity: 0; filter: blur(3px); transform: translateX(-8px); } }

/* load sequence: the scene alone for half a second, then the header is brushed on, then the buttons, then each menu title
   in turn with Links last, alongside its logos; once all are painted, the first three are swept off the way they came.
   --at is when each piece starts; every pass speeds up and settles like a hand-drawn stroke. Reduced motion (base.css)
   drops the delays and durations, so everything simply shows */
:root { --brush-ease: cubic-bezier(0.55, 0, 0.25, 1); }
.intro h1 { --at: 500ms; } .intro .lead { --at: 700ms; } .intro .seeking { --at: 850ms; }
.btn { --at: 1200ms; } .btn + .btn { --at: 1400ms; }
details:nth-of-type(1) { --at: 1800ms; } details:nth-of-type(2) { --at: 1950ms; } details:nth-of-type(3) { --at: 2100ms; }
.pinned { --at: 2250ms; }
.intro h1, .intro .lead, .intro .seeking { animation: brush-on 900ms var(--brush-ease) var(--at) backwards; }
.btn, .pinned h2 { animation: show 300ms var(--ease-out) calc(var(--at) + 220ms) backwards; }   /* the words appear as the brush reaches them */
.btn::before, .pinned h2::before { animation: paint-in 900ms var(--brush-ease) var(--at) backwards; }
summary h2 { animation: ink-flash 2450ms var(--brush-ease) var(--at) backwards; }
summary h2::before { animation: paint-flash 2450ms var(--brush-ease) var(--at) backwards; }
.pinned .panel::before { animation-duration: 900ms; animation-timing-function: var(--brush-ease); animation-delay: var(--at); }
.pinned .panel > * { animation-duration: 600ms; animation-delay: calc(var(--at) + 200ms); }   /* both logos ink in at once, as the panel is painted */
.colophon { animation: show 600ms var(--ease-out) 3200ms backwards; }
@keyframes brush-on { from { mask: var(--wipe) 100% 0 / 500% 100% no-repeat; } to { mask: var(--wipe) 50% 0 / 500% 100% no-repeat; } }
@keyframes show { from { opacity: 0; } }
@keyframes paint-in { from { mask-position: 100% 0, 0 0, 100% 0; } to { mask-position: 50% 0, 0 0, 100% 0; } }
/* painted on over the first 900ms (37%), held while the rest of the menu is painted, then swept off the same way (63–100%) */
@keyframes paint-flash { 0% { mask-position: 100% 0, 0 0, 100% 0; } 37%, 63% { mask-position: 50% 0, 0 0, 100% 0; } 100% { mask-position: 0 0, 0 0, 100% 0; } }
/* the words appear as the brush reaches them (9–18%) and turn cream as it sweeps past them (74–82%), so they stay readable */
@keyframes ink-flash { 0%, 9% { opacity: 0; color: var(--color-ink); } 18% { opacity: 1; } 74% { color: var(--color-ink); } 82% { color: var(--color-on-scene); } }

.rows { margin: 0; padding: 0; list-style: none; }
.rows li { display: grid; gap: var(--space-2xs); padding-block: var(--space-md); border-bottom: var(--rule-hair) solid var(--color-hair); }
.rows li:first-child { padding-top: 0; }
.rows li:last-child { border-bottom: 0; padding-bottom: 0; }
.panel h3 { color: var(--color-on-scene); font-size: var(--text-lg); }
.meta { font-size: var(--text-sm); color: var(--color-on-scene-muted); }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }
.tools p { margin-top: var(--space-xs); }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg); margin: 0; padding: 0; list-style: none; }
.links .icon { display: inline-flex; padding: 10px; margin: -10px; }   /* a 44px tap target around a 24px logo, without spreading the row */
.links .icon svg { width: 24px; height: 24px; fill: currentColor; }
.links .icon:hover { color: var(--color-focus); }
.panel a { color: var(--color-on-scene); }

.colophon { margin-top: auto; font-size: var(--text-sm); color: var(--color-on-scene-muted); }

/* phones: the scene gets the first screen, the name rests at its foot, the sections ride up on a sheet */
@media (max-width: 40rem) {
  .backdrop video { object-position: 77% 50%; }   /* the katana, centred */
  .backdrop::after { background: none; }
  .column { width: 100%; gap: 0; padding: 0; }
  /* the fade travels with the text, so the name and buttons stay legible as they scroll over the bright sky */
  .intro { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
           background: linear-gradient(180deg, var(--color-scrim-0) 0%, var(--color-scrim-0) 38%, var(--color-scrim) 78%, var(--color-scrim) 100%);
           padding: calc(var(--space-2xl) + env(safe-area-inset-top)) max(var(--space-md), env(safe-area-inset-right)) var(--space-2xl) max(var(--space-md), env(safe-area-inset-left)); }
  .intro h1 { font-size: clamp(2.75rem, 13vw, 3.5rem); }
  .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); margin-top: var(--space-md); }
  .btn { justify-content: center; padding-inline: var(--space-xs); --tail: 40px; --run: 12px; }   /* the words are centred in a wide button: the tail fits inside it, not off screen */

  .sections { border-top: 0; background: var(--color-sheet); border-radius: 20px 20px 0 0;
              padding: var(--space-xs) max(var(--space-md), env(safe-area-inset-right)) var(--space-md) max(var(--space-md), env(safe-area-inset-left)); }
  .sections::before { content: ""; display: block; width: 36px; height: 4px; margin: var(--space-xs) auto var(--space-sm); border-radius: 2px; background: var(--color-hair); }
  summary, .pinned-title { min-height: 64px; padding-block: var(--space-sm); }
  .sections h2 { font-size: 1.1875rem; max-width: none; }
  .sections h2 { --pad-x: -0.7em; --tail: 4em; }   /* keep the head inside the sheet's padding, and the tail on screen */
  .panel { margin: 0 0 var(--space-md); padding: var(--space-md) var(--space-lg); --panel-fill: var(--color-sheet-panel); }
  .panel h3 { font-size: 1.0625rem; }
  .rows li { padding-block: var(--space-sm); }
  .tools { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .links { gap: var(--space-sm) var(--space-lg); }
  .links a { display: inline-flex; align-items: center; min-height: 44px; }

  .colophon { margin: 0; background: var(--color-sheet);
              padding: var(--space-lg) max(var(--space-md), env(safe-area-inset-right)) calc(var(--space-xl) + env(safe-area-inset-bottom)) max(var(--space-md), env(safe-area-inset-left));
              border-top: var(--rule-hair) solid var(--color-hair); }
}
