/* sc-components — the shared design system for every sitectrl site.
 *
 * ONE source of truth. Seeded into every tenant's htdocs (like
 * sc-track.js) and linked in every page, so a component fix here reaches
 * every site on the next deploy. Consumed two ways:
 *   - pipelines emit the markup via site_components/markup.py
 *   - agents write the markup directly (taught by CATALOG.md)
 *
 * Responsive by construction: desktop is the base rule, mobile is the
 * @media(max-width:767px) override. Colours default to CSS variables a
 * tenant can override in its own stylesheet without forking this file:
 *   --sc-accent  (bars, active states)   --sc-ink (text)
 *   --sc-bg      (surface)               --sc-muted (secondary text)
 */

/* THEME BINDING — step 2 of docs/site-components-plan.md.
 *
 * These values used to be the AWC Korea palette, hard-coded, because
 * the library had exactly one caller. Seeded onto all 39 tenants it
 * would have painted a brewery navy: a component dropped into any
 * template site announced itself as foreign, which is the opposite of
 * what a shared library is for.
 *
 * The templates turn out to already agree on a token vocabulary —
 * measured across all eight `htdocs/style.css`:
 *
 *     --accent --bg --bg-alt --border   8 of 8
 *     --fg --fg-soft --radius --shadow  7 of 8
 *     --ink / --muted                   local-services' names for
 *                                       --fg / --fg-soft
 *
 * So there is nothing to invent. Each --sc-* reads the template's own
 * token, falls through the alternate name, and only then lands on the
 * literal it used to be. A template is a THEME; the library reads it.
 *
 * Every literal below is the value this file shipped with, so a page
 * with no template stylesheet renders exactly as it did before.
 */
:root {
  --sc-accent:  var(--accent, #33507a);
  --sc-ink:     var(--fg, var(--ink, #000));
  --sc-bg:      var(--bg, #fff);
  --sc-muted:   var(--fg-soft, var(--muted, #55566e));
  --sc-tile-bg: var(--bg-alt, #f2f3f5);
  --sc-radius:  var(--radius, var(--radius-sm, 14px));
  --sc-heading: var(--fg, var(--ink, #23254c));
  --sc-btn:     var(--accent, #33507a);

  /* NOT bound. --sc-bar is the header's companion strip and --sc-purple
   * a tier colour; both are lighter/darker partners to the accent with
   * no template token that means the same thing, and deriving one with
   * colour-mix() would change how AWC Korea renders today. They stay
   * literal until a second caller needs them. */
  --sc-bar: #557bb8;
}

/* ============================ HEADER ============================
 * image1 (mobile) + image8 (desktop). Desktop: horizontal links, big
 * logo at the right end. Mobile: a vertical menu showing 3 links with a
 * carat above and below (scroll ±3 or finger-scroll), logo ~2/3 on the
 * right. Active link underlined. No "Home" — the logo links home.
 */
.sc-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; background: var(--sc-bg); padding: .5rem 1.5rem;
}
.sc-header__bar { height: 15px; background: var(--sc-bar); }
.sc-header__nav { display: flex; align-items: center; min-width: 0; }
/* --sc-header-fs/-ls/-gap: read as CSS vars, not literals, so
 * switch_preview.py can set them to the LIVE site's own measured nav
 * typography (stamped as data-sc-fs/-ls/-gap on .sc-header__links,
 * read by fitHeaderLinks() in sc-components.js) instead of the generic
 * defaults below -- AWC Korea's live header keeps 6 links on one row
 * at 15px/700/1px letter-spacing/35px gap (hosted3/REPORT.txt E2), a
 * tighter fit than these defaults reproduce on their own.
 * fitHeaderLinks() shrinks further from whichever baseline is in play
 * only if that still doesn't fit -- a safety net, not the mechanism.
 * These fallback literals are unchanged for every site with no capture
 * to measure from. */
.sc-header__links {
  display: flex; flex-direction: row; align-items: center;
  gap: var(--sc-header-gap, 2rem);
  list-style: none; margin: 0; padding: 0;
}
.sc-header__links a {
  color: var(--sc-ink); font-weight: 700; text-transform: uppercase;
  text-decoration: none; letter-spacing: var(--sc-header-ls, .03em);
  white-space: nowrap;
  font-size: var(--sc-header-fs, 1.05rem);
}
.sc-header__links a[aria-current="page"] { text-decoration: underline; }
.sc-header__carat { display: none; }              /* desktop: no carats */
.sc-header__brand { flex: 0 0 auto; display: flex; }
.sc-header__brand img {
  height: 88px; width: auto; max-width: 100%; display: block;
}

@media (max-width: 767px) {
  .sc-header { align-items: stretch; gap: 1rem; padding: .5rem 1rem; }
  /* Left third: a 3-row scroll menu framed by up/down carats. */
  .sc-header__nav {
    flex-direction: column; flex: 0 0 38%; justify-content: center;
    --sc-row: 2.6em;
  }
  .sc-header__carat {
    display: block; border: 0; background: none; color: var(--sc-accent);
    font-size: 15px; line-height: 1; cursor: pointer; padding: 2px 0;
    text-align: left;
  }
  .sc-header__links {
    flex-direction: column; gap: 0;
    max-height: calc(var(--sc-row) * 3); overflow-y: auto;
    scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sc-header__links::-webkit-scrollbar { display: none; }
  .sc-header__links li { scroll-snap-align: start; }
  .sc-header__links a {
    display: flex; align-items: center; height: var(--sc-row);
    font-size: 1.05rem;
  }
  /* Right two-thirds: the logo, as large as the row allows. */
  .sc-header__brand { flex: 0 0 60%; align-items: center;
                      justify-content: flex-end; }
  .sc-header__brand img { height: auto; max-height: 120px; }
}

/* ============================ GALLERY ==========================
 * image17/image16. A full-bleed hero reel that CROSS-FADES (not
 * slides), autoplays, and continues from wherever the visitor left it.
 * Hollow dots, the active one filled. NO dots and NO autoplay when
 * there is a single image. Bleeds by the page gutter (--sc-pad).
 */
.sc-gallery { margin: 0 calc(var(--sc-pad, 1.5rem) * -1) 1.25rem; }
.sc-gallery__frame {
  position: relative; width: 100%; height: min(56vw, 520px);
  overflow: hidden; background: #eef1f4;
}
.sc-gallery__slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; opacity: 0;
  transition: opacity .9s ease;
}
.sc-gallery__slide.is-active { opacity: 1; }
.sc-gallery__dots {
  display: flex; gap: 14px; justify-content: center; padding: 16px 0;
}
.sc-gallery__dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid #c9d3dd; background: transparent; padding: 0;
  cursor: pointer; transition: background .2s, border-color .2s;
}
.sc-gallery__dot.is-active {
  background: var(--sc-accent); border-color: var(--sc-accent);
}
@media (min-width: 768px) {
  .sc-gallery__frame { height: min(42vw, 560px); }
}

/* ============================ FOOTER ===========================
 * image7 (mobile) / image3 (desktop). A blue band, white text.
 * Desktop top half is 3 columns: contact (email + Instagram, as text)
 * on the left, logo centred, nav (JOIN/RENEW + EVENTS) on the right.
 * Mobile stacks it centred: contact as ICONS, then the two nav links,
 * then the logo. Legal block is centred under both, in smaller text.
 * DOM order is contact, brand, nav (the desktop row); mobile reorders.
 */
.sc-footer {
  background: var(--sc-foot-bg, var(--sc-bar));
  color: #fff; text-align: center; padding: 2.5rem 1.5rem 1.75rem;
}
.sc-footer__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; max-width: 900px; margin: 0 auto;
}
.sc-footer__contact, .sc-footer__nav {
  display: flex; flex-direction: column; gap: .5rem;
}
.sc-footer a { color: inherit; text-decoration: none; }
.sc-footer__contact a { font-weight: 700; }
.sc-footer__nav a { font-weight: 700; letter-spacing: .03em; }
.sc-footer__contact a svg { display: none; }        /* desktop: text */
.sc-footer__brand { display: flex; flex-direction: column;
                    align-items: center; gap: .4rem; }
.sc-footer__brand img { height: 74px; width: auto; }
.sc-footer__legal {
  margin-top: 1.5rem; font-size: .84rem; line-height: 1.7; opacity: .95;
}
.sc-footer__legal a { text-decoration: underline; }

@media (max-width: 767px) {
  .sc-footer__top { flex-direction: column; gap: 1rem; }
  .sc-footer__contact { order: 1; flex-direction: row; gap: 1.1rem;
                        justify-content: center; }
  .sc-footer__nav { order: 2; gap: 1rem; }
  .sc-footer__brand { order: 3; margin-top: .6rem; }
  .sc-footer__contact a span { display: none; }      /* mobile: icons */
  .sc-footer__contact a svg { display: block; width: 26px; height: 26px; }
}

/* ============================ INFO TILES ========================
 * image2/image19 (mobile) / image18 (desktop 2-col). Title (navy, bold,
 * NO background), then image, then text. One line between title→image
 * and image→text; generous space above the title. Stacked on mobile,
 * two columns on desktop.
 */
.sc-info-tiles { display: grid; grid-template-columns: 1fr;
                 gap: 1.5rem 3rem; margin: 1rem 0; }
.sc-info-tile__title {
  color: var(--sc-heading, #23254c); font-weight: 700;
  font-size: 1.5rem; margin: 3.2em 0 1em; line-height: 1.2;
}
.sc-info-tile__img {
  width: 100%; height: auto; display: block; margin: 0 0 1em;
  border-radius: 8px;
}
.sc-info-tile__text { color: var(--sc-body, var(--sc-muted));
                      line-height: 1.75; }
@media (max-width: 767px) {
  /* Mobile only: tiles stack in a single column, so the very first one
     (right after the photo reel) needs less top margin than the rest.
     Scoped here so it never fights the desktop rule below, which must
     give every tile in a row the SAME top margin or the row's titles
     drift out of alignment (measured: "Join Us" sitting lower than
     "Get To Know Us" on the top row, 2026-09-13). */
  .sc-info-tile:first-child .sc-info-tile__title { margin-top: 1.4em; }
}
@media (min-width: 768px) {
  .sc-info-tiles { grid-template-columns: 1fr 1fr; }
  .sc-info-tile .sc-info-tile__title { margin-top: 1.6em; }
}

/* ============================ BUTTON (shared) ==================== */
.sc-btn {
  display: inline-block; background: var(--sc-btn, var(--sc-accent));
  color: #fff; text-transform: uppercase; font-weight: 700;
  letter-spacing: .03em; text-decoration: none; padding: .7rem 1.3rem;
  border-radius: 8px; border: 0; cursor: pointer; margin-top: 1rem;
}

/* ============================ INSTRUCTIONS ======================
 * image5 (mobile) / image4 (desktop 2-col). A title, then faint-gray
 * rounded tiles each holding text and an optional button. One line
 * between title and the first tile, one line between tiles. Two columns
 * on desktop.
 */
.sc-instructions__title {
  color: var(--sc-heading, #23254c); font-weight: 700;
  font-size: 1.4rem; margin: 1.2em 0 1em;
}
.sc-instructions__grid { display: grid; grid-template-columns: 1fr;
                         gap: 1.25rem; }
.sc-instruction-tile {
  background: var(--sc-tile-bg); border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--sc-radius); padding: 1.4rem 1.5rem 1.5rem;
}
.sc-instruction-tile__body { color: var(--sc-body, var(--sc-muted));
                             line-height: 1.7; }
@media (min-width: 768px) {
  .sc-instructions__grid { grid-template-columns: 1fr 1fr;
                           align-items: start; }
}

/* ============================ EVENT TILES =======================
 * image9 (mobile) / image12 (desktop side-by-side). A title, then a
 * rounded card: light-gray top holds the event image, white bottom
 * holds Date/Time/Location (blue labels), a description, and an RSVP
 * button. On desktop the gray media and white body sit side by side.
 * 3-4 lines between tiles.
 */
.sc-event { margin: 0 0 3.5rem; }
.sc-event__title { color: var(--sc-heading, #23254c); font-weight: 700;
                   font-size: 1.5rem; margin: 0 0 1rem; }
.sc-event__card { border: 1px solid rgba(0,0,0,.08);
                  border-radius: 16px; overflow: hidden; }
.sc-event__media { background: var(--sc-tile-bg); padding: 1.5rem;
                   display: flex; align-items: center;
                   justify-content: center; }
.sc-event__media img { max-width: 72%; height: auto; display: block; }
.sc-event__body { background: #fff; padding: 1.5rem 1.6rem 1.6rem;
                  color: var(--sc-body, var(--sc-muted)); }
.sc-event__meta { line-height: 1.9; }
.sc-event__meta b { color: var(--sc-accent); font-weight: 700; }
.sc-event__desc { line-height: 1.75; margin: 1rem 0; }
@media (min-width: 768px) {
  .sc-event__card { display: grid; grid-template-columns: 1fr 1fr; }
  .sc-event__media img { max-width: 88%; }
}

/* ============================ TIER BAR (shared) ================= */
.sc-tier-bar {
  color: #fff; font-weight: 700; font-size: 1.05rem;
  padding: .6rem var(--sc-pad, 1.5rem);
  margin: 1.2rem calc(var(--sc-pad, 1.5rem) * -1) .9rem;
}

/* ============================ LOGO SCROLLER =====================
 * image13/image6 (mobile) / image14 (desktop). A horizontally
 * scrollable row (or 4-row grid, for Donor) of white rounded logo
 * cards — logo CONTAINED, never zoomed (also fixes partner-tile zoom).
 * Dots appear (via JS) only when the row overflows. scrollbar hidden.
 */
.sc-scroller__track {
  display: flex; gap: 1rem; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  padding-bottom: .25rem;
}
.sc-scroller__track::-webkit-scrollbar { display: none; }
.sc-scroller__track--rows {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(4, auto);
  grid-auto-columns: minmax(42%, 1fr); gap: .8rem 1rem;
}
.sc-logo-card {
  flex: 0 0 auto; scroll-snap-align: start;
  width: 46%; aspect-ratio: 3 / 2; background: #fff;
  border: 1px solid rgba(0,0,0,.10); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  padding: 1.1rem;
}
.sc-scroller__track--rows .sc-logo-card { width: auto; aspect-ratio: 2 / 1;
                                          padding: .7rem; }
.sc-logo-card img { max-width: 100%; max-height: 100%; object-fit: contain;
                    display: block; }
.sc-scroller__dots { display: flex; gap: 10px; justify-content: center;
                     padding: 12px 0 0; }
.sc-scroller__dots:empty { display: none; }
.sc-scroller__dot { width: 9px; height: 9px; border-radius: 50%;
                    border: 0; background: #c9d3dd; padding: 0; cursor: pointer; }
.sc-scroller__dot.is-active { background: var(--sc-accent); }
@media (min-width: 768px) {
  .sc-logo-card { width: 220px; }
  .sc-scroller__track--rows { grid-auto-columns: minmax(200px, 1fr); }
}

/* ============================ SPONSOR TIERS =====================
 * image10/image11 (mobile) / image15 (desktop). A purple rounded
 * container with a white title + description, then a horizontal
 * scroller of white tier tiles (tier name + bullet benefits), with
 * light dots. One tile shows at a time on mobile; more on desktop.
 * Reuses the generic scroller (data-sc-scroller / -track / -dots).
 */
.sc-sponsor-tiers {
  background: var(--sc-purple, #3f2a7a); color: #fff;
  border-radius: 18px; padding: 1.5rem 1.5rem 1.25rem; margin: 1.5rem 0;
}
.sc-sponsor-tiers__title { font-weight: 700; font-size: 1.4rem;
                           margin: 0 0 .7rem; }
.sc-sponsor-tiers__desc { line-height: 1.7; margin: 0 0 1.25rem;
                          opacity: .96; }
.sc-tier-tile {
  flex: 0 0 88%; scroll-snap-align: start; background: #fff;
  color: var(--sc-body, #333); border-radius: 14px;
  padding: 1.5rem 1.6rem;
}
.sc-tier-tile__title { color: #666; font-weight: 700; text-transform: uppercase;
                       letter-spacing: .02em; margin: 0 0 1rem;
                       font-size: 1.1rem; }
.sc-tier-tile ul { margin: 0; padding-left: 1.2rem; line-height: 1.9; }
.sc-tier-tile li { margin-bottom: .5rem; }
.sc-scroller__dots--light .sc-scroller__dot { background: rgba(255,255,255,.4); }
.sc-scroller__dots--light .sc-scroller__dot.is-active { background: #fff; }
@media (min-width: 768px) {
  .sc-tier-tile { flex-basis: 44%; }
}


/* ============ HEADER VARIANT: sc-header--menu ====================
 *
 * A PLAIN HAMBURGER, for sites that are not the association this
 * component was drawn from.
 *
 * The default .sc-header is a measured reproduction of one customer's
 * real header: a three-row scrolling list framed by up/down carats.
 * That is correct for them and unrecognisable everywhere else — a
 * switch preview of a trade company shipped with eight long links in
 * that reel and the visitor reported, twice, that "the hamburger does
 * not work". There was no hamburger.
 *
 * So this is opt-in and leaves the default alone. Add sc-header--menu
 * and the mobile header becomes a button that shows every link; the
 * desktop row wraps instead of overflowing.
 */
.sc-header--menu .sc-header__toggle { display: none; }

@media (min-width: 768px) {
  /* EIGHT LINKS DO NOT FIT ON ONE ROW. The reel never needed to wrap
   * because that site has seven short ones; "Discuss a Trade
   * Opportunity" beside seven others does. */
  .sc-header--menu .sc-header__links { flex-wrap: wrap; row-gap: .35rem; }
  /* Logo left, nav right — nearly every real site (D-SF10 N2a, 2026-09-11
   * 17:21Z). The default .sc-header has no desktop order rule because
   * markup.py emits nav-then-brand in the DOM, matching the one customer
   * header this component was measured from; the switch funnel's plain-
   * hamburger variant is a different, more common site shape and the
   * same DOM order read as the logo sitting on the right of every switch
   * preview. Scoped to this opt-in variant only — the default .sc-header
   * and Wild Apricot's own header stay exactly as measured. */
  .sc-header--menu .sc-header__brand { order: 1; }
  .sc-header--menu .sc-header__nav { order: 2; }
  /* Right-aligned links, matching how nearly every real site lays out
   * a right-hand nav (D-SF10 N2c, 2026-09-11 17:45Z). N2a moved the
   * logo left, but `.sc-header__nav` itself is `flex: 1 1 auto`
   * (render.py's own inline style, #1057) so it fills the rest of the
   * header row -- and `.sc-header__links` (the `<ul>`, flex but with
   * no width of its own) then sits packed at the START of THAT box,
   * hugging the logo instead of the header's right edge. The fix has
   * to be on `.sc-header__nav`, not `.sc-header__links`: the links
   * list's own `justify-content` only positions its `<li>`s within
   * itself, not the `<ul>` within its parent. Desktop carats are
   * `display: none` already (base rule), so `.sc-header__nav`'s only
   * visible child here is the links list. */
  .sc-header--menu .sc-header__nav { justify-content: flex-end; }
}

@media (max-width: 767px) {
  /* `row-gap` inherits the DEFAULT header's `.sc-header { gap: 1rem }`
   * (desktop-row spacing, harmless there since that header never
   * wraps into a second row on phone). This variant DOES wrap --
   * that's the whole point of `flex-wrap: wrap` below -- so the same
   * 1rem became a visible 24px gap between the wrapped logo/toggle row
   * and the nav row underneath it (QA round 2, N3). Kill it here;
   * the toggle/brand gap on the SAME row still comes from `gap: .5rem`
   * declared on the toggle itself, unaffected by this. */
  .sc-header--menu { flex-wrap: wrap; align-items: center; row-gap: 0; }
  /* The toggle used to sit alone on its own row under the logo, with a
   * large gap (QA replay 5 on ryanrenner, 390 wide, 2026-09-11). Root
   * cause: the button lived INSIDE `<nav class="sc-header__nav">`
   * (`switch_preview._NAV_OPEN` inserted it as nav's first child), and
   * `.sc-header__nav` is `flex-direction: column` from the DEFAULT
   * mobile rule above (this variant only overrode `flex`/`order`, not
   * `flex-direction`) -- so the nav box, containing only the visible
   * toggle when closed, wrapped onto its own line below the brand.
   *
   * The first fix put `display: contents` on nav so its children could
   * sit on the header's own row -- but that drops the `<nav>`
   * navigation landmark from the accessibility tree in some browsers
   * (QA review, 2026-09-11), which a CSS-only patch should never cost.
   * The real fix is upstream: `switch_preview._use_menu_header` now
   * inserts the toggle as `<header>`'s OWN child, a sibling of `<nav>`
   * and the logo, so nav stays a normal, always-present element and
   * this stylesheet only has to place three ordinary flex siblings. */
  /* `flex: 1 1 auto` alone (round 1) let the brand box grow to its
   * FULL intrinsic content width before sharing the row with the
   * toggle -- fine for a short wordmark, but a wide one (creswell,
   * grayman: brand box measured 298px) filled the row and, combined
   * with the inherited `justify-content: flex-end` from the DEFAULT
   * mobile rule above (this selector only ever overrode `flex`/
   * `order`), pushed the logo/text hard against the toggle instead of
   * sitting at the header's left edge (QA round 2, Fail A). `flex: 1 1
   * 0` + `min-width: 0` let the box shrink below its content's natural
   * size when the toggle needs room; `justify-content: flex-start`
   * overrides the inherited flex-end so a SHRUNK brand still anchors
   * left instead of drifting toward the toggle as it shrinks. */
  .sc-header--menu .sc-header__brand {
    flex: 1 1 0; min-width: 0; order: 1; justify-content: flex-start;
  }
  /* Without a max-width, a wide logo/wordmark image (ryanrenner: 358px)
   * stayed at its own intrinsic width regardless of how much the BOX
   * around it shrank, forcing the toggle onto its own row below (QA
   * round 2, Fail B, same shape as main). `strong` covers the
   * text-fallback brand (no logo captured) the same way, though plain
   * text wraps on its own even without this. */
  .sc-header--menu .sc-header__brand img,
  .sc-header--menu .sc-header__brand strong {
    max-width: 100%; height: auto;
  }
  .sc-header--menu .sc-header__toggle {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem; order: 2; margin-left: auto; flex: 0 0 auto;
    border: 1px solid var(--sc-muted); border-radius: 10px;
    background: none; color: var(--sc-ink); cursor: pointer;
    font: inherit; font-size: 15px; padding: .45rem .7rem;
    min-height: 44px; min-width: 44px;      /* a real touch target */
  }
  /* Nav itself is the third row-level item: it breaks onto its own
   * full-width line below the logo/toggle row, and its own content
   * (below) decides whether that line has any height. */
  .sc-header--menu .sc-header__nav { flex: 1 1 100%; order: 3; }
  /* The carats belong to the reel, not to a menu. */
  .sc-header--menu .sc-header__carat { display: none !important; }
  /* CLOSED BY DEFAULT, and closed means gone — a zero-height list that
   * still catches taps is how a menu "does nothing". */
  .sc-header--menu .sc-header__links {
    display: none; flex-direction: column; gap: 0;
    max-height: none; overflow: visible; width: 100%;
  }
  .sc-header--menu[data-sc-open="1"] .sc-header__links { display: flex; }
  .sc-header--menu .sc-header__links a {
    display: flex; align-items: center; min-height: 44px;
    font-size: 1.05rem;
  }
}


/* ============ PAGE TITLE ==========================================
 * The one h1 on a page. Sections are h2 (info tiles, instructions) and
 * h3 (events) — correct for sections, and the reason a page composed
 * only of those had no h1 at all until this existed.
 */
.sc-page-title { margin: 0 0 1.5rem; }
.sc-page-title__eyebrow {
  margin: 0 0 .35rem; font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--sc-accent);
}
.sc-page-title h1 {
  margin: 0; font-size: clamp(1.75rem, 4vw, 2.6rem); line-height: 1.15;
  color: var(--sc-heading, #23254c);
}

/* ── sc-hero ───────────────────────────────────────────────────────────
   THE FRONT DOOR, and the library did not have one.

   Every component here was a mid-page block, so a page composed
   entirely from the library could not open with anything. Measured
   2026-09-09: home_has_hero failed on 6 of 6 site-copy builds while
   passing on 21 of 22 template builds — the template builds inherit a
   hero from the template's own markup, and the copies had nothing to
   inherit.

   Full-bleed by design. A hero that stops at the content gutter reads
   as a card, not as a band; the 100vw trick escapes whatever container
   it lands in without needing the page to cooperate.

   The image is a BACKGROUND, not an <img>: it must crop rather than
   letterbox as the viewport narrows, and it carries no information a
   screen reader needs (the h1 says what the page is).

   The scrim is not decoration — it is what keeps the headline legible
   over a photograph nobody vetted for contrast. Without it a light
   image gives white-on-white, which is worse than no hero at all. */
.sc-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 2.25rem;
  padding: clamp(3rem, 9vw, 6.5rem) clamp(1.25rem, 6vw, 4rem);
  display: flex;
  align-items: center;
  min-height: 320px;
  background: var(--sc-hero-bg, var(--sc-accent, #33507a));
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}
.sc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.62) 0%,
                                     rgba(0,0,0,.42) 55%,
                                     rgba(0,0,0,.24) 100%);
}
/* No photograph: the scrim would darken a flat colour for no reason. */
.sc-hero--flat::before { background: none; }
.sc-hero__inner {
  position: relative;             /* above the scrim */
  max-width: 46rem;
  width: 100%;
  margin: 0 auto;
}
.sc-hero__eyebrow {
  margin: 0 0 .6rem; font-size: .8rem; letter-spacing: .1em;
  text-transform: uppercase; opacity: .9;
}
.sc-hero h1 {
  margin: 0; color: #fff;
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  line-height: 1.1;
  text-wrap: balance;
}
.sc-hero__sub {
  margin: 1rem 0 0; max-width: 42rem;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.55; opacity: .95;
}
.sc-hero .sc-btn { margin-top: 1.6rem; }

/* The band is the one place a phone must not lose the headline to
   padding — shrink the frame, never the type. */
@media (max-width: 640px) {
  .sc-hero { min-height: 240px; padding: 2.5rem 1.25rem; }
}
