/* ==========================================================================
   EXPAT STORE — TOKEN ALIASES
   theme.json is the single source of truth for this design system
   (`decisions/2026-09-23-no-page-builder.md`; `design-system-and-build-order.md`
   §2.3). WordPress compiles it to CSS custom properties, and THIS FILE gives those
   properties the short names the rest of the CSS uses.

   THERE IS EXACTLY ONE VALUE FOR EVERY TOKEN, AND IT IS IN theme.json.
   A file that declares its own hex or its own px is a second source of truth, and the
   second source is where the drift starts. So this file declares NO VALUE: it declares
   names.

   NAMING, AND WHY IT LOOKS LIKE THIS
     theme.json  settings.color.palette[].slug            -> --wp--preset--color--<slug>
     theme.json  settings.typography.fontSizes[].slug     -> --wp--preset--font-size--<slug>
     theme.json  settings.spacing.spacingSizes[].slug     -> --wp--preset--spacing--<slug>
     theme.json  settings.typography.fontFamilies[].slug  -> --wp--preset--font-family--<slug>
     theme.json  settings.custom.<a>.<b>                  -> --wp--custom--<a>--<b>
   camelCase in settings.custom is converted to kebab-case by WordPress; every key used
   here is already lower case so the mapping is 1:1 and greppable.

   The editor sees the preset names. Hand-written CSS and the block patterns see the
   `--expat-*` names below. Both resolve to the same value.

   HARD RULE, ASSERTED BY tests/audit.mjs
     No hex value, no rgb()/hsl() literal and no length unit appears in this file, in
     base.css, in components.css or in patterns.css. They live in theme.json.
   ========================================================================== */

:root {

  /* ------------------------------------------------------------------ colour
     Source of the VALUES: website/mockups/04-ferm-living/style.css lines 37-60, which
     is the direction the operator chose. See BUILD-REPORT.md §3 and conflict X-A for
     the one place this disagrees with design-system-and-build-order.md §2.1 — that
     report restates a teal palette taken from site.html; the chosen mockup is navy and
     gold, drawn from the supplied logos. */
  --expat-navy:         var(--wp--preset--color--navy);
  --expat-navy-deep:    var(--wp--preset--color--navy-deep);
  --expat-gold:         var(--wp--preset--color--gold);
  --expat-gold-soft:    var(--wp--preset--color--gold-soft);
  --expat-field:        var(--wp--preset--color--field);
  --expat-band:         var(--wp--preset--color--band);
  --expat-band-alt:     var(--wp--preset--color--band-alt);
  --expat-dark:         var(--wp--preset--color--dark);
  --expat-ink:          var(--wp--preset--color--ink);
  --expat-ink-mute:     var(--wp--preset--color--ink-mute);
  --expat-ink-band:     var(--wp--preset--color--ink-band);
  --expat-on-dark:      var(--wp--preset--color--on-dark);
  --expat-on-dark-soft: var(--wp--preset--color--on-dark-soft);
  --expat-on-dark-mute: var(--wp--preset--color--on-dark-mute);
  --expat-rule:         var(--wp--preset--color--rule);
  --expat-rule-2:       var(--wp--preset--color--rule-2);

  /* ---------------------------------------------------------------- typefaces
     System stacks only — no font CDN, no @import, no url(), no woff2 to fetch.
     `assets/fonts/` exists and is deliberately empty; theme.json declares
     `fontFace: []` for both families. */
  --expat-sans:  var(--wp--preset--font-family--sans);
  --expat-serif: var(--wp--preset--font-family--serif);

  /* --------------------------------------------------------------- type scale
     The measured scale. The responsive behaviour the mockup implements as stepped
     media queries is kept as steps in base.css; the display size also carries a
     continuous clamp() so the step is not a jump. */
  --expat-t-display: var(--wp--preset--font-size--display);
  --expat-t-band:    var(--wp--preset--font-size--band-heading);
  --expat-t-32:      var(--wp--preset--font-size--h2);
  --expat-t-24:      var(--wp--preset--font-size--h3);
  --expat-t-18:      var(--wp--preset--font-size--h4);
  --expat-t-15:      var(--wp--preset--font-size--control);
  --expat-t-14:      var(--wp--preset--font-size--body);
  --expat-t-13:      var(--wp--preset--font-size--small);
  --expat-t-11:      var(--wp--preset--font-size--tag);

  /* The responsive steps the mockup implements as media queries, declared here so that
     base.css overrides a TOKEN at the breakpoint rather than restating a size. A size
     repeated in a media query is a second source of truth for the same value. */
  --expat-t-tablet-display: var(--wp--custom--expat--t--tablet--display);
  --expat-t-tablet-32:      var(--wp--custom--expat--t--tablet--32);
  --expat-t-tablet-24:      var(--wp--custom--expat--t--tablet--24);
  --expat-t-mobile-display: var(--wp--custom--expat--t--mobile--display);
  --expat-t-mobile-32:      var(--wp--custom--expat--t--mobile--32);
  --expat-t-mobile-24:      var(--wp--custom--expat--t--mobile--24);

  --expat-lh-tight:   var(--wp--custom--line-height--tight);
  --expat-lh-heading: var(--wp--custom--line-height--heading);
  --expat-lh-h3:      var(--wp--custom--line-height--h3);
  --expat-lh-body:    var(--wp--custom--line-height--body);
  --expat-ls-display: var(--wp--custom--letter-spacing--display);
  --expat-ls-tag:     var(--wp--custom--letter-spacing--tag);
  --expat-ls-nav:     var(--wp--custom--letter-spacing--nav);
  --expat-measure:    var(--wp--custom--measure);

  /* ----------------------------------------------------------------- spacing
     The mockup uses literal whitespace per block; these names give it one rhythm so a
     later template does not invent a second. The values are the mockup's own. */
  --expat-space-1: var(--wp--preset--spacing--10);
  --expat-space-2: var(--wp--preset--spacing--20);
  --expat-space-3: var(--wp--preset--spacing--30);
  --expat-space-4: var(--wp--preset--spacing--40);
  --expat-space-5: var(--wp--preset--spacing--50);
  --expat-space-6: var(--wp--preset--spacing--60);
  --expat-space-7: var(--wp--preset--spacing--70);
  --expat-space-8: var(--wp--preset--spacing--80);
  --expat-space-9: var(--wp--preset--spacing--90);

  --expat-section-y:        var(--wp--custom--expat--section--y);
  --expat-section-y-tablet: var(--wp--custom--expat--section--y-tablet);
  --expat-section-y-mobile: var(--wp--custom--expat--section--y-mobile);

  /* ---------------------------------------------------------------- geometry */
  --expat-wrap:          var(--wp--custom--expat--wrap);
  --expat-gutter:        var(--wp--custom--expat--gutter);
  --expat-gutter-tablet: var(--wp--custom--expat--gutter-tablet);
  --expat-gutter-mobile: var(--wp--custom--expat--gutter-mobile);
  --expat-radius:        var(--wp--custom--expat--radius);
  --expat-radius-pill:   var(--wp--custom--expat--radius-pill);
  --expat-control-pad:   var(--wp--custom--expat--control--pad);
  --expat-control-h:     var(--wp--custom--expat--control--h);
  --expat-tap-min:       var(--wp--custom--expat--tap-min);
  --expat-ratio-card:    var(--wp--custom--expat--ratio--card);
  --expat-ratio-frame:   var(--wp--custom--expat--ratio--frame);
  --expat-ratio-band:    var(--wp--custom--expat--ratio--band);

  /* ------------------------------------------------------- motion and layering
     There is deliberately NO shadow token. The measured reference separates with
     hairlines and background tone; a theme that owns a shadow token uses it. */
  --expat-duration: var(--wp--custom--expat--dur);
  --expat-ease:     var(--wp--custom--expat--ease);

  /* Structural values that are not design choices: the off-canvas resting position of a
     visually-hidden element, the WordPress admin-bar offset, and the width of a hairline. */
  --expat-offscreen:    var(--wp--custom--expat--offscreen);
  --expat-admin-bar:    var(--wp--custom--expat--admin-bar);
  --expat-hairline:     var(--wp--custom--expat--hairline);
  --expat-focus-width:  var(--wp--custom--expat--focus-width);
  --expat-seam:         var(--wp--custom--expat--seam);
  --expat-strip-band:   var(--wp--custom--expat--strip--band);
  --expat-strip-line:   var(--wp--custom--expat--strip--line);
  --expat-paymark-w:    var(--wp--custom--expat--paymark-w);

  --expat-z-header:  var(--wp--custom--expat--z--header);
  --expat-z-overlay: var(--wp--custom--expat--z--overlay);
  --expat-z-drawer:  var(--wp--custom--expat--z--drawer);
  --expat-z-toast:   var(--wp--custom--expat--z--toast);
}

/* The three breakpoints live in theme.json (settings.custom.expat.bp) and are stated
   literally in the media queries in base.css, because a CSS custom property cannot be
   used in a media-query condition. tests/audit.mjs asserts the two agree. */

/* Focus is visible and unobscured — WCAG 2.1 AA, and the mockup's own treatment. */
:focus-visible {
  outline: var(--expat-focus-width) solid var(--expat-gold);
  outline-offset: var(--expat-space-1);
  border-radius: var(--expat-radius);
}

/* Reduced motion stops transitions rather than shortening them. There is no animation
   anywhere in this theme, so this is the belt to that braces. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   THE PARENT'S PRESETS ARE OFF, SO OURS WIN

   theme.json sets `settings.color.defaultPalette: false`,
   `settings.typography.defaultFontSizes: false`,
   `settings.spacing.defaultSpacingSizes: false` and `settings.shadow.defaultPresets:
   false`. That stops Blocksy's and WordPress core's own preset palettes, type sizes,
   spacing steps and shadow presets from being offered in the editor alongside ours —
   which is how a page ends up with two blues and three shadows.

   The consequence, stated because it is real: a block authored in the editor that
   carries a parent preset colour keeps its raw value on render, because the parent's
   preset is no longer registered. That is why every pattern in /patterns is
   hand-written with our own class names rather than block colour attributes, and why
   the editor user sees only the palette above.
   -------------------------------------------------------------------------- */
