/* ==========================================================================
   Darkroom Editorial — design tokens
   The single source of truth for colour, type, space and motion.
   Documented in DESIGN-SYSTEM.md and shown live at /styleguide/.
   ========================================================================== */

:root {
  /* Colour — paper and ink. Photographs carry all the colour. */
  --paper: #ffffff;
  --ink: #0d0d0d;
  --ink-muted: #6b6b6b;      /* 5.3:1 on paper, for labels and meta */
  --rule: #e4e4e4;           /* hairlines, image placeholders */
  --placeholder: #f1f1f0;    /* shown while a photograph loads */
  --film: #000000;           /* video player letterbox */
  --on-film: #ffffff;

  /* Type — one serif family, small sizes, no bold. */
  --font-serif: "EB Garamond", Garamond, "Apple Garamond", Baskerville,
    "Baskerville Old Face", "Hoefler Text", "Times New Roman", serif;

  --step--1: 0.8125rem;   /* 13px  footer, fine print */
  --step-0: 0.9375rem;    /* 15px  UI: navigation, counters, captions, labels */
  --step-1: 1.125rem;     /* 18px  reading text */
  --step-2: 1.5rem;       /* 24px  pull quotes */
  --step-3: clamp(1.625rem, 1.05rem + 1.7vw, 2.375rem); /* 26–38px lead statement */

  --leading-ui: 1.25;
  --leading-text: 1.5;
  --leading-display: 1.18;
  --weight-regular: 400;
  --weight-medium: 500;      /* used sparingly: never for headings */

  /* Space — built on the 13px UI rhythm. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 13px;
  --space-4: 26px;
  --space-5: 52px;
  --space-6: 104px;

  --gutter: 26px;            /* page side margin */
  --gap: 3px;                /* between photographs */
  --header-h: 44px;
  --bar-h: 52px;             /* strip footer: counter, caption, arrows */
  --label-col: 236px;        /* left column of information lists */
  --measure: 62ch;           /* longest reading line */

  /* Hosting badge. Netlify's free plan pins a "Powered by Netlify" badge
     (202 × 64px, 15px from the right edge) to the bottom-right corner.
     Controls that live there keep clear of it. Set both to 0 if the badge
     is ever hidden (paid plan) or the site moves to another host. */
  --badge-clear-x: 230px;
  --badge-clear-y: 76px;

  /* Photograph tile in the horizontal strip: a third of the page,
     but never so wide that a 2:3 portrait overflows the viewport.
     In a project sequence, landscape frames span two tiles. */
  --strip-h: calc(100svh - var(--header-h) - var(--bar-h) - var(--space-2));
  --tile-w: min(
    calc((100vw - 2 * var(--gutter) - 2 * var(--gap)) / 3),
    calc(var(--strip-h) / 1.5)
  );
  --tile-w-wide: calc(2 * var(--tile-w) + var(--gap));

  /* Motion — quiet, and switched off for reduced motion. */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 240ms;
}

@media (max-width: 700px) {
  :root {
    --gutter: 16px;
    --header-h: 66px;
    --label-col: 1fr;
    --step-1: 1.0625rem;  /* 17px */
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
}
