/* Hallmark · shape: one-shot scroll story (home), anchored reference (how-it-works) · genre: atmospheric · theme: dark studio (brass) · job: buy · draw: ea83dc
 * hero: stage · nav: edge-aligned, wordmark, three links and one action · footer: mast (giant hairline wordmark lit by the cursor) · imagery: concept renders of the machine, the extraction sequence · signature: one warm studio light that moves through the whole page
 * v2 (DESIGN-V2.md): Instrument Serif display + Hanken Grotesk text; accent is brass, no orange; square controls (2px), underline fields in one glass panel
 * axes: dark/serif-display/warm · posture: full-palette · contrast: pass · fold: pass · v3.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: E, three pinned scenes on desktop (4.0 + 1.6 + about 2.1 screens), one on phones (3.2); each has a static end state */
/* Hallmark · answered F8 · the home page is one story through one shot; the pour, the anatomy and the ritual are beats of the same morning */
/* Hallmark · waive 38i 38ii 38iii · one italic word per display head, in brass-hi Instrument Serif italic · it is the brand's display voice in DESIGN-V2 (B's type), never more than one per head */
/* Hallmark · waive 2b · gradient text only on the footer wordmark (a light passing over engraving) and the chrome italic in 08 · DESIGN-V2 names both and bans every other */
/* Hallmark · waive 29 · one glass panel (the consultation form) over the warm pool of section 10 · the only frosted surface on the site; everything else is solid or hairline */
/* Hallmark · waive 12 · overshoot only on gauge needles inside a named diagram · a needle settling is the gauge’s own physics; no control or state uses it */
/* Hallmark · accepted 58 · how-it-works is a long-read reference page with a contents rail; topics run ~120 words by design */
/* Hallmark · waive 81 · span.vignette over the pour canvas and over the crema canvas · the portal of the pour stays closed until the pin opens it, and the crema circle always holds a still image under its vignette */
/* Hallmark · waive 85 · the consultation form comes first and the waitlist second · the close is a request for a private consultation; the waitlist is the quieter second card for visitors who would rather watch for a while */
/* Hallmark · waive 77 · topic text in five of eight columns beside a sticky figure, or beside the topic’s own sticky heading where a topic has no drawing · how-it-works is an anchored reference read one topic at a time, and ownership is a set of hairline rows under its heading */
/* Hallmark · waive 44c · the how-it-works intro is a reference header, not a hero · it opens with its heading, one lead paragraph and the parts photo, then the contents list follows on the same screen */
/* Hallmark · dismissed F18 · these data-slot holders are hidden copy slots for unconfirmed facts (manufacturer, team, origin, line legend), not image slots; nothing drops in until the client confirms */
/* Hallmark · dismissed 40 · without scripting the consultation button reads ink-2 on paper-3, about 10:1; the linter paired the enabled label colour with the disabled fill */
/* Hallmark · dismissed 41 · the disabled no-JS button is one rule of three specificity classes in the components layer, so its ink and its fill change together; the 1.13 pairing never renders */
/* Hallmark · dismissed F20 · the three dials sit as a triangle, two gauges above and the group gauge below, the way they sit on the machine’s face */
/* Hallmark · dismissed 59 · home carries ten beats of one morning (header and footer are chrome); how-it-works is a reference of seventeen anchored topics in one contents rail */
@layer tokens, base, components, sections;

/* metric-matched fallbacks: the page keeps its line breaks while the web fonts load */
@font-face { font-family: "Instrument Serif fallback"; src: local("Times New Roman"), local("Georgia"); size-adjust: 91%; ascent-override: 100%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: "Hanken Grotesk fallback"; src: local("Arial"); size-adjust: 98.5%; ascent-override: 100%; descent-override: 28%; line-gap-override: 0%; }

@layer tokens {
  :root {
    color-scheme: dark;

    /* grounds */
    --color-stage: #060404;
    --color-paper: #0B0807;
    --color-paper-2: #14100C;
    --color-paper-3: #1C1611;
    --color-ground: var(--color-paper);          /* body ground. Home: transparent, so the fixed studio layer shows (below) */
    --color-root: var(--color-ground);           /* html ground (overscroll, behind the studio) */
    /* ink */
    --color-ink: #ECE3D2;
    --color-ink-2: #C9BDA8;
    --color-muted: #9C8F80;
    --color-edge: #6E6458;
    --color-rule: rgba(236, 227, 210, .14);
    --color-line: #B9B0A4;
    /* materials */
    --color-brass: #B8925A;
    --color-brass-hi: #E0C08A;
    --color-brass-lo: #7A5A32;
    --color-walnut: #4A2E1B;                     /* glows only, never text or fills */
    --color-brass-shade: #3C2812;                /* the brass bar's lower edge */
    --color-shadow: #000;                        /* shadows and vignettes */
    --color-studio-floor: #1B130D;               /* the studio's warm floor and dark ceiling */
    --color-studio-ceiling: #120D0A;
    --color-beam: rgb(255 196 128);              /* the studio light */
    --beam-rgb: 255, 196, 128;                   /* same, for rgba(var(--beam-rgb), a) */
    --chrome: linear-gradient(100deg, #9EA3A7, #F4F6F7 45%, #8D9296 70%, #E6E9EB);
    --brass-fill: linear-gradient(180deg, #E0C08A, #B8925A 55%, #8E6B3C);
    /* signals */
    --color-accent: var(--color-brass);
    --color-accent-ink: #0B0807;
    --color-focus: var(--color-brass-hi);
    --color-signal: #C8402A;                     /* red ball and needle tips only */
    --color-error: #E8705A;
    --color-light: #FFF3E3;                      /* specular white (glass, chrome glare); the warm light is --color-beam */
    /* instruments */
    --color-dial: #ECE6D8;
    --color-dial-ink: #141210;
    /* crema ramp: WebGL uniforms and the still image only */
    --crema-0: #120905;
    --crema-1: #3A1C0B;
    --crema-2: #9A5520;
    --crema-3: #D39A5C;
    --crema-4: #EFCF9C;
    /* glass panel */
    --glass: rgba(20, 16, 12, .55);
    --glass-blur: 14px;
    /* mask ink (used only inside mask-image gradients) */
    --mask-ink: #000;
    --selection: color-mix(in oklch, var(--color-brass) 38%, transparent);

    /* type */
    --font-display: "Instrument Serif", "Instrument Serif fallback", "Times New Roman", serif;
    --font-body: "Hanken Grotesk", "Hanken Grotesk fallback", ui-sans-serif, system-ui, sans-serif;
    --display-weight: 400;
    --tracking-display: -0.025em;
    --text-display: clamp(3.5rem, 10vw, 10.5rem);                  /* h1: 56 → 144 at 1440 → 168 */
    --text-display-l: clamp(3.25rem, 1rem + 7vw, 8.5rem);         /* turning points (07, 10): ~124 at 1440 */
    --text-display-s: clamp(2.5rem, 1.4rem + 3.6vw, 4.75rem);     /* statements, numerals: ~67 at 1440 */
    --text-section: clamp(2.75rem, 6.4vw, 6.5rem);                /* h2: 44 → 92 at 1440 → 104 */
    --text-section-calm: clamp(2.25rem, 1.3rem + 2.8vw, 4rem);    /* quieter beats: ~62 at 1440 */
    --text-title: clamp(1.375rem, 1.1rem + 0.7vw, 1.875rem);      /* h3: 30 at 1440 */
    --text-lead: clamp(1.375rem, 1.2rem + 0.45vw, 1.625rem);      /* 22 → 26 */
    --text-body: clamp(1.125rem, 1.06rem + 0.2vw, 1.25rem);       /* 18 → 20 */
    --text-sm: 0.875rem;                                           /* captions (ink-2), nav, buttons */
    --text-xs: 0.8125rem;                                          /* functional small only */
    --leading-display: .88;
    --leading-statement: .96;
    --leading-section: .92;
    --leading-title: 1.15;
    --leading-lead: 1.42;
    --leading-body: 1.6;
    --measure: 62ch;
    --measure-lead: 34ch;

    /* space (hallmark scale) */
    --space-3xs: 0.125rem;  /* 2 */
    --space-2xs: 0.25rem;   /* 4 */
    --space-xs: 0.5rem;     /* 8 */
    --space-sm: 0.75rem;    /* 12 */
    --space-md: 1rem;       /* 16 */
    --space-lg: 1.5rem;     /* 24 */
    --space-xl: 2.5rem;     /* 40 */
    --space-2xl: 4rem;      /* 64 */
    --space-3xl: 6rem;      /* 96 */
    --space-4xl: 9rem;      /* 144 */
    /* section gaps, mixed on purpose */
    --gap-a: clamp(5rem, 3rem + 6.5vw, 9rem);
    --gap-b: clamp(6rem, 3rem + 8.5vw, 11rem);
    --gap-c: clamp(4.5rem, 3rem + 5.2vw, 7.5rem);
    /* how-it-works reading rhythm */
    --how-row-gap: clamp(2rem, 1.6rem + 0.8vw, 2.75rem);
    --how-topic-gap: clamp(5rem, 1rem + 10vw, 14rem);
    --how-group-gap: clamp(6rem, 2rem + 10vw, 15rem);
    --text-how: var(--text-body);
    --leading-how: 1.65;
    --text-title-how: clamp(2.25rem, 1.2rem + 1.8vw, 3.25rem);

    /* layout */
    --container: 90rem;
    --gutter: clamp(1.25rem, 4.4vw, 4rem);
    --columns: 4;
    --gap-columns: 1rem;
    --header-h: 60px;
    --peek: 48px;
    --rail-w: 15rem;
    --toc-bar-h: 3rem;

    /* shape: square, machined. No pills anywhere (the name stays for older rules) */
    --radius-card: 0;
    --radius-well: 0;                            /* fields are underline-only */
    --radius-pill: 2px;                          /* buttons */
    --radius-btn: 2px;
    --rule-hair: 1px;
    --focus-w: 2px;
    --shadow-card: none;
    --control-h: 52px;
    --field-h: 48px;

    /* layers */
    --z-studio: -1;
    --z-base: 0;
    --z-raised: 10;
    --z-sticky: 20;
    --z-header: 40;
    --z-overlay: 100;
    --z-skip: 1000;

    /* motion */
    --dur-micro: 120ms;
    --dur-short: 220ms;
    --dur-long: 420ms;
    --ease-out: cubic-bezier(.16, 1, .3, 1);          /* expo.out for reveals */
    --ease-mech: cubic-bezier(.77, 0, .18, 1);        /* mechanical moves */
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);
    --ease-in: cubic-bezier(.7, 0, .84, 0);

    /* image treatment (never on text grounds) */
    --grain-image: 0.06;
    --grain-under-text: 0.04;
    --vignette: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, color-mix(in oklch, var(--color-stage) 85%, transparent) 100%);
  }
  /* home: the studio layer is the ground; html keeps the stage black for overscroll */
  :root:has(> body[data-page="home"]) { --color-ground: transparent; --color-root: var(--color-stage); }
  /* how-it-works: a second, calmer room, one warm step up (ink 14:1, muted 6:1 on it) */
  :root:has(> body[data-page="how"]) { --color-ground: var(--color-paper-2); }
  /* the long reads keep the serif but at reading scale: the poster sizes belong to the home page */
  :root:has(> body:is([data-page="how"], [data-page="long"])) {
    --text-display: clamp(3rem, 1.6rem + 4.6vw, 6rem);
    --text-section: clamp(2.25rem, 1.4rem + 2.6vw, 3.75rem);
    --leading-display: .95;
    --leading-section: 1;
  }
  @media (min-width: 40em) { :root { --columns: 8; --gap-columns: 1.25rem; } }
  @media (min-width: 64em) { :root { --columns: 12; --gap-columns: 2rem; --header-h: 76px; --peek: 72px;
                                     --text-how: 1.1875rem; --leading-how: 1.7; } }
  @media (prefers-contrast: more) { :root { --color-muted: var(--color-ink-2); --color-rule: var(--color-edge); } }
  @media print {
    :root { --color-paper: #F2EEE7; --color-paper-2: #FBF9F5; --color-stage: #F2EEE7; --color-ink: #161412; --color-ink-2: #2B2724;
            --color-muted: #5C554E; --color-line: #161412; --color-edge: #8D857C; --color-rule: #D9D2C7; --color-signal: #B03A22; --color-link-print: #6B4A1E;
            --color-accent: #6B4A1E; --color-accent-ink: #FBF9F5; --color-ground: var(--color-paper); --color-root: var(--color-paper); }
  }
}
