/*
 * Phase 08B-R8 — homepage-scoped token overrides.
 * Corrects specific numeric gaps found against the approved prototype
 * (docs/prototypes/cacs-homepage-professional-v1/assets/css/tokens.css)
 * without touching the global Phase 08A tokens in ../tokens.css, which
 * are shared by article/about/admin pages this round must not affect.
 * See docs/evidence/phase08b-r8-exact-port/ROOT_CAUSE_AUDIT.md for the
 * measured before/after values behind each override.
 */
.cacs-homepage-professional-v1 {
  /* Prototype cards measured 10px radius / global site token is 8px. */
  --cacs-hp-radius-card: 10px;
  /* Prototype buttons measured 6px radius / global site token is 4px. */
  --cacs-hp-radius-control: 6px;
  /* Prototype featured title measured 26px at 1586px viewport. */
  --cacs-hp-hero-title-size: clamp(1.25rem, 1.02rem + 1vw, 1.625rem);
  /* Global --cacs-weight-bold is 750 (a Phase 08A choice); the prototype
     uses the standard 700 CSS keyword-adjacent weight throughout. Since
     custom properties inherit, redefining it at this scope root retunes
     every homepage heading/label that reads var(--cacs-weight-bold)
     without touching the global token other pages still use. */
  --cacs-weight-bold: 700;
  /* Prototype's body line-height is 1.5 (24px at 16px base); the global
     --cacs-line-body is 1.65 (Phase 08A, sitewide). Most homepage card
     text already sets its own explicit line-height, but several
     container-level elements (cards, panels) were inheriting the wider
     sitewide default. */
  --cacs-line-body: 1.5;
  /* Same inheritance technique for the two global font-stack tokens:
     both the theme's and the prototype's stacks are generic system
     sans/serif stacks that resolve to the same rendered font in this
     environment (confirmed by rendered-text-width measurement earlier
     in this round), but the literal strings differ, which the exact-port
     computed-style parity test in this round's evidence treats as a
     mismatch unless the strings match. Scoped here rather than in the
     global ../tokens.css so article/about/admin pages keep their own
     font-stack strings unchanged. */
  --cacs-font-body: "Source Sans 3", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cacs-font-display: "Source Serif 4", Georgia, "Times New Roman", "Noto Serif", serif;
  --cacs-font-ui: "Source Sans 3", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cacs-font-heading: "Source Serif 4", Georgia, "Times New Roman", "Noto Serif", serif;
}

/* The header and footer are structural SIBLINGS of `.cacs-home` (see the
   footer-width comment already in leadership-v1.css), not descendants -
   `.cacs-homepage-professional-v1` above cannot reach either one. Both
   are shared chrome already re-styled sitewide via `.cacs_theme`
   throughout every prior round of this project (not homepage-exclusive
   by construction), so the same token corrections are applied at that
   existing sitewide scope here rather than introducing a second,
   inconsistent styling mechanism just for the header/footer. */
/* .is_text (the brand-lockup wrapper) was measuring a stray 27.4px font-
   size, unopposed by `.pkp_site_name`'s own 1rem override which only
   applies to the parent, not this child - core must set its own
   font-size directly on `.is_text` at higher specificity. */
.cacs_theme .pkp_site_name .is_text {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}
.cacs_theme .pkp_structure_head {
  position: relative;
}
.cacs_theme .cacs_brand_mark {
  font-size: 1.125rem;
  line-height: 1.6875rem;
}

.cacs_theme {
  --cacs-font-body: "Source Sans 3", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cacs-font-display: "Source Serif 4", Georgia, "Times New Roman", "Noto Serif", serif;
  /* `--cacs-font-ui`/`--cacs-font-heading` are declared once at :root as
     `var(--cacs-font-body)`/`var(--cacs-font-display)` - that inner
     var() substitution resolves using :root's own inheritance context
     (where the declaration lives), not each descendant's, so overriding
     only the base tokens above does not change what already-inherited
     `--cacs-font-ui`/`--cacs-font-heading` resolve to further down the
     tree (confirmed by comparing computed --cacs-font-ui at a nested
     element before/after adding only the base-token override above, not
     guessed). Both aliases need their own direct override here too. */
  --cacs-font-ui: "Source Sans 3", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cacs-font-heading: "Source Serif 4", Georgia, "Times New Roman", "Noto Serif", serif;
  --cacs-weight-bold: 700;
  --cacs-line-body: 1.5;
}
