/* synced from clients/_shared/site-core/css/shared-core.css */
/* Canonical source — distributed by sync_site_core.py.
   Edit clients/_shared/site-core/css/shared-core.css, then run
   `python3 clients/_shared/site-core/scripts/sync_site_core.py`
   to refresh per-site copies. Drift is gated by `--check` in
   deploy_sites.sh, alongside the JS extensions. */
/*
  Shared site-core primitives for all 4 client sites (BPW/CVCC/FND/TFF).
  Theme tokens remain site-local; this layer only supplies common
  structure/utilities (container, stack, grid, card, eyebrow, prose,
  list-tight, media, pill).
*/

:root {
  --site-core-container: 72rem;
  --site-core-gap-xs: 0.25rem;
  --site-core-gap-sm: 0.5rem;
  --site-core-gap-md: 1rem;
  --site-core-gap-lg: 1.5rem;
  --site-core-gap-xl: 2rem;
  --site-core-radius-sm: 0.2rem;
  --site-core-radius-md: 0.35rem;
}

.site-core-container,
.site-shell__container {
  width: min(var(--site-core-container), 100%);
  margin-left: auto;
  margin-right: auto;
}

.site-core-stack {
  display: flex;
  flex-direction: column;
  gap: var(--site-core-gap-md);
}

.site-core-grid {
  display: grid;
  gap: var(--site-core-gap-md);
}

.site-core-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-core-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-core-card {
  border: 1px solid var(--silverback, rgba(0, 0, 0, 0.25));
  border-radius: var(--site-core-radius-md);
  background: var(--offwhite, #fff);
  padding: var(--site-core-gap-md);
}

.site-core-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.site-core-prose > * + * {
  margin-top: 0.75rem;
}

.site-core-list-tight {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: var(--site-core-gap-xs);
}

.site-core-media {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-core-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--silverback, rgba(0, 0, 0, 0.25));
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .site-core-grid-2,
  .site-core-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------
   THE QUALITY FLOOR
   ------------------------------------------------------------------
   Everything above this line is optional structure a site may or may not
   use. Everything below it is what a client site must do REGARDLESS of its
   identity, and the reason this file is worth loading at all.

   Measured 2026-09-04 across all eight live sites: three of them
   (CVCC, FND, TFF) animate — 1, 7 and 8 rules respectively — with no
   `prefers-reduced-motion` block anywhere, and FND's mobile menu control
   drew at 17x17 CSS pixels. Neither is a matter of taste, and neither
   should be re-decided per site.

   Nothing here sets a colour, a family or a size. Identity stays site-local;
   only the floor is shared. */

/* MOTION IS A PREFERENCE, NOT A DECISION. Someone who has asked their OS to
   reduce motion has usually asked for a medical reason. `0.01ms` rather than
   `0` so animations still FIRE and their completion handlers still run — a
   site that reveals content on `animationend` would otherwise show nothing. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* A FOCUS RING THAT SURVIVES THE SITE'S OWN CSS. Every site currently relies
   on the browser default, which vanishes the moment any rule sets
   `outline: none` — a one-line change on any of eight sites, made for a
   mouse, that silently strips keyboard navigation.

   `currentColor` rather than a fixed hue: this has to sit legibly on a boho
   cream, a near-black studio page and a farm green without any of them
   naming a token. `:focus-visible`, so a mouse press never draws it. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: var(--site-core-radius-sm);
}

/* A CONTROL BIG ENOUGH TO HIT (WCAG 2.2 AA, 2.5.8). Applies to CONTROLS —
   buttons, summaries, and anything a site marks `.site-core-tap` — never to
   bare `a`, because a link inside a sentence is explicitly exempt and giving
   it a min-height would break the line box it sits in. A standalone link
   styled as an action gets the class. */
button,
summary,
[role="button"],
.site-core-tap {
  min-height: 24px;
  min-width: 24px;
}

/* An icon-only control needs its target from PADDING, not from a stretched
   glyph: `min-width` alone on a 17px icon leaves the icon 17px and the box
   24px, which looks like a mistake rather than a target. */
.site-core-tap--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: max(0px, calc((44px - 1em) / 2));
}
