/* Acupixel design tokens — the single source of colour, type, spacing and rhythm for both sites.
 *
 * Built from 10-brand-and-assets.md and the Acupixel Brand & Document Design System v1.0.
 * The brand's own rule governs everything here:
 *
 *     "Red should function as a signal, not a background flood.
 *      Default to white pages with red accents and black typography."
 *
 * Contrast is checked against these exact values by `npm run check:contrast`, whose output is in
 * VALIDATION/contrast.txt. Change a value here and that check tells you what it broke.
 *
 * Both sites use this file unchanged. A site differs by EMPHASIS — which components it leads with
 * and how much air the hero gets — never by palette. See design/design-system.md section 6.
 */

@font-face {
  font-family: "Inter";
  src: url("/media/shared/fonts/inter-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/media/shared/fonts/inter-latin-500-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/media/shared/fonts/inter-latin-600-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/media/shared/fonts/inter-latin-700-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  /* ---------------------------------------------------------------- colour */
  --canvas: #FFFFFF;        /* the page. White-first is the first rule of the brand */
  --ink: #111111;           /* Near Black: headings, dominant type, dark bars */
  --ink-body: #333333;      /* Body Charcoal: paragraphs and detail */
  --ink-muted: #666666;     /* Mid Gray: captions, metadata, secondary annotation */
  --panel: #F2F2F2;         /* Panel Gray: tables, support cards, footers */
  --panel-soft: #F7F7F7;    /* the lighter panel used by the brand document itself */
  --callout: #FBEAEC;       /* the brand's "Key Update Callout" pale red background */
  --rule: #D4D4D4;          /* DECORATIVE separation only: section dividers, card edges, table rules that
                               sit alongside other delineation. Exempt from 1.4.11, which covers UI
                               components and meaningful graphics — a divider is neither */
  --rule-strong: #767676;   /* Any boundary that CARRIES MEANING: form field borders, control outlines,
                               a table border that is the only thing separating columns. Meets 4.5:1 */

  --red: #ED1C24;           /* Acupixel Red. LARGE display type, icons, accents, rules. Never body text */
  --red-strong: #B3121A;    /* Acupixel Red darkened until it carries small text and button labels at 4.5:1.
                               Derived, not invented: same hue, enough contrast to be readable both ways */
  --logo-red: #CC0000;      /* the red the logo is DRAWN in. Used only inside the logo asset, never in the
                               interface, until question 15 is answered. Declared so nobody re-picks it by eye */

  --focus: #B3121A;         /* focus ring. 3:1 against canvas and panel */
  --selection: #FBEAEC;

  /* ---------------------------------------------------------------- type */
  /* The brand document specifies PRINT sizes on US Letter. Those are not transcribed: what carries
   * across is the ratio and the weight pairing — bold headings over regular body, one clear step per
   * level. A ~1.25 scale, fluid between a 400px phone and a desktop column. */
  --font-sans: "Inter", "Helvetica Neue", Arial, "Liberation Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --text-display: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);   /* page title */
  --text-h2: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);      /* section heading */
  --text-h3: clamp(1.1875rem, 1.1rem + 0.4vw, 1.4375rem);  /* subhead */
  --text-h4: 1.0625rem;                                     /* group label */
  --text-body: 1.0625rem;                                   /* 17px: comfortable for technical prose */
  --text-small: 0.9375rem;
  --text-caption: 0.8125rem;                                /* timestamps, metadata, table notes */

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  --leading-tight: 1.15;    /* display */
  --leading-heading: 1.25;
  --leading-body: 1.6;      /* technical prose is read, not skimmed */

  --tracking-display: -0.02em;
  --tracking-eyebrow: 0.08em;

  /* ---------------------------------------------------------------- space */
  /* A 4px base. The brand document's print rhythm is a large step between major sections and a small
   * one between related elements; these are the screen equivalents. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --section-gap: clamp(3rem, 2rem + 4vw, 6rem);   /* between major sections */
  --block-gap: clamp(1.5rem, 1.2rem + 1vw, 2.5rem); /* between related elements */

  /* ---------------------------------------------------------------- layout */
  --page-gutter: clamp(1rem, 0.5rem + 2vw, 3rem);  /* never edge-to-edge text */
  --measure: 68ch;          /* prose column: the brand's comfortable measure, 60–75 characters */
  --container: 76rem;
  --container-narrow: 48rem;

  --radius-sm: 2px;
  --radius: 4px;            /* the collateral is square-ish; this is restraint, not styling */
  --radius-lg: 8px;
  --radius-pill: 999px;     /* buttons: a full, oval/stadium shape regardless of button height */

  /* Elevation is a rule and a panel, not a drop shadow: the brand uses flat support panels. */
  --shadow-none: none;
  --shadow-card: 0 1px 0 0 var(--rule);
  --shadow-raised: 0 2px 8px rgba(17, 17, 17, 0.08);

  --border-hairline: 1px solid var(--rule);
  --border-control: 1px solid var(--rule-strong);
  --border-strong: 2px solid var(--ink);
  --border-accent: 3px solid var(--red);

  /* ---------------------------------------------------------------- motion */
  --duration-fast: 120ms;
  --duration: 200ms;
  --easing: cubic-bezier(0.2, 0, 0.2, 1);
}

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