/* Source D'Amour design tokens v1, night register (revised 2026-07-30)
   Source of truth: brand/sda-design-legend-v1.md and its 2026-07-30 addendum.
   Rule of use: components read tokens; nothing hardcodes a hex or a ms value.

   The register inverted on 2026-07-30. Night is the ground, cream is the mat
   around a photograph, and the photography is the light source. Every role
   name below still means exactly what it meant in v1: --sda-paper is "the page
   ground", --sda-ink is "text on the page ground". Only the temperature moved.
   Type scale, measure, spacing and motion are untouched by that decision.

   This file must stay BYTE-IDENTICAL to brand/sda-design-kit/tokens.css. */

:root {
  /* Color: grounds
     The whole night family is seeded from #191410, which was already on the
     site as the footer ground, so nothing here is a new colour: the footer
     came up and became the page. */
  --sda-paper: #191410;        /* page ground (v1 --sda-night) */
  --sda-panel: #211a14;        /* secondary ground, alternate band */
  --sda-well: #2a211a;         /* input and control wells on the page ground */
  --sda-night: #120e0a;        /* deepest ground: header, story band, footer */
  --sda-night-ink: #efe7d8;    /* text on night */
  --sda-mat: #f2ebdd;          /* the photo mat, and the one cream band (v1 --sda-panel) */
  --sda-mat-ink: #241b12;      /* text and dark buttons ON a mat (v1 --sda-ink) */

  /* Color: ink */
  --sda-ink: #efe7d8;          /* text on the page ground, 14.9:1 */
  --sda-ink-soft: #b3aca0;     /* secondary text, 8.1:1 */
  --sda-ink-faint: #8a8378;    /* placeholders and legal micro-text, 4.9:1 */
  --sda-wood-line: rgba(239, 231, 216, 0.22);  /* hairlines on night */

  /* Color: accents (inlay colors; one accent per element, never both)
     Night lifts both hues. The v1 values survive as the -deep pair, which is
     what an accent uses when it sits on a cream mat, never on the page. */
  --sda-verdigris: #7cc0b2;        /* links, focus, eyebrows, "on hold", 8.7:1 */
  --sda-verdigris-deep: #3e8f82;   /* v1 verdigris: rules, and accents on a mat */
  --sda-oxblood: #d0786a;          /* "sold", errors, dropcap, 5.7:1 */
  --sda-oxblood-deep: #7c3a2d;     /* v1 oxblood: the same roles on a mat */
  --sda-copper: #c07a4e;           /* second warm accent, small touches only, 5.3:1 */

  /* Type: faces
     STIX = the voice (anything read aloud as a sentence)
     Hanken = the fixtures (anything clicked or scanned as data) */
  --sda-serif: "STIX Two Text", Georgia, "Times New Roman", serif;
  --sda-sans: "Hanken Grotesk", system-ui, sans-serif;

  /* Type: scale (minor third on 19px body) */
  --sda-display: clamp(2.75rem, 1.4rem + 6vw, 4.5rem);
  --sda-h1: clamp(2.1rem, 1.4rem + 3vw, 3.05rem);
  --sda-h2: clamp(1.65rem, 1.25rem + 1.8vw, 2.15rem);
  --sda-h3: clamp(1.3rem, 1.15rem + 0.7vw, 1.5rem);
  --sda-body: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
  --sda-small: 1rem;
  --sda-caption: 0.875rem;
  --sda-label: 0.75rem;

  /* Type: leading and tracking pairs (use with the matching size) */
  --sda-lh-display: 1.02;  --sda-ls-display: -0.015em;
  --sda-lh-h1: 1.08;       --sda-ls-h1: -0.01em;
  --sda-lh-h2: 1.12;       --sda-ls-h2: -0.005em;
  --sda-lh-h3: 1.2;
  --sda-lh-body: 1.62;
  --sda-lh-caption: 1.45;
  --sda-ls-label: 0.14em;  /* Hanken uppercase labels only, never serif */

  /* Measure */
  --sda-measure: 68ch;         /* body max */
  --sda-measure-lead: 46ch;    /* lead paragraphs */

  /* Space (structural rhythm) */
  --sda-space-1: 0.25rem;
  --sda-space-2: 0.5rem;
  --sda-space-3: 1rem;
  --sda-space-4: 1.5rem;
  --sda-space-5: 2.5rem;
  --sda-space-6: 4rem;
  --sda-space-band: clamp(3rem, 6vw, 4.5rem);      /* section padding */
  --sda-space-band-lg: clamp(3.5rem, 7vw, 5.5rem); /* feature band padding */

  /* Edges and mats
     --sda-hairline is the mat's own inner line and is therefore DARK: it only
     ever draws on cream. Anything drawing an edge on the page ground wants
     --sda-edge, and anything dividing text wants --sda-rule. */
  /* Controls soften, photographs stay square-cornered at their own corner
     radius. 2px read as an unmade decision rather than as a sharp one: at that
     size a corner is neither square nor round, it is just slightly wrong.
     (Logan, 2026-07-31.) */
  --sda-radius: 4px;                                     /* buttons, inputs, frames */
  /* The letterbox fill. The house rule is still contain-never-crop, so a
     photograph shot at a shape other than the frame's leaves a margin; the
     question was only ever what colour that margin is. It was cream, which on
     a night page turns the leftover space into the brightest object on the
     screen: a 4:3 shot in a 4:5 frame spent 39% of the tile shouting about the
     39%. Filling with the deepest ground instead makes the same margin
     disappear, so nothing is cropped and nothing is announced.
     (Logan, 2026-07-31: 4:5, fit inside, no cream at all.)

     The product frame itself is TRANSPARENT rather than reading this token,
     because a frame appears on the page ground, on the night band and inside
     a panelled card, and any single colour is a bar in two of those three.
     This is the fill for the fixed surfaces that are not a frame: the
     thumbnails and the lightbox, which have a ground of their own. */
  --sda-frame-ground: #120e0a;                           /* == --sda-night */
  --sda-mat-pad: 10px;                                   /* cream margin: the line sheet only, now */
  --sda-mat-pad-small: 4px;                              /* thumbnails */
  --sda-hairline: 1px solid rgba(36, 27, 18, 0.16);      /* inside a mat, on cream */
  --sda-edge: 1px solid rgba(239, 231, 216, 0.24);       /* control edges on night */
  --sda-rule: 1px solid rgba(239, 231, 216, 0.14);       /* text section dividers */
  --sda-rule-warm: 1px solid rgba(192, 122, 78, 0.30);   /* the copper hairline */
  --sda-mat-shadow: 0 22px 50px -18px rgba(0, 0, 0, 0.75),
                    0 0 0 1px rgba(239, 231, 216, 0.06); /* matted-print float on night */
  --sda-mat-shadow-lift: 0 30px 60px -20px rgba(0, 0, 0, 0.85),
                         0 0 40px -14px rgba(192, 122, 78, 0.40);

  /* Motion (settle, never bounce; notice it = too much) */
  --sda-ease-settle: cubic-bezier(0.2, 0.65, 0.3, 0.9);  /* reveals */
  --sda-ease-lift: cubic-bezier(0.22, 0.61, 0.36, 1);    /* hovers */
  --sda-t-press: 180ms;      /* buttons: color only */
  --sda-t-link: 240ms;       /* underline draw-in */
  --sda-t-hover-in: 500ms;   /* image lift in */
  --sda-t-hover-out: 700ms;  /* image release (slower out reads expensive) */
  --sda-t-reveal: 600ms;     /* scroll reveal, 12 to 16px translateY, fires once */
  --sda-t-mark: 1000ms;      /* the enso signature moment, once per session */

  /* Focus */
  --sda-focus: 2px solid var(--sda-verdigris);
  --sda-focus-offset: 3px;

  /* Component sizes */
  --sda-btn-h: 48px;
  --sda-btn-h-small: 40px;
  --sda-mark-nav: 60px;   /* header mark */
  --sda-frame-ratio: 4 / 5;  /* the house product frame */
}
