/* Shared hero chrome: layout, the pause control, the wireframe frame and its chips.
   Page-specific illustration detail (which shapes, which keyframes) lives in
   assets/css/pages/{slug}-hero.css. Values are from docs/mockups/build.html. */
.hero-grid { display: flex; flex-wrap: wrap; gap: 4rem; align-items: flex-start; padding-block: 5.5rem 5rem; position: relative; }
.hero-grid > * { min-width: 0; }
.hero-h1 { font-size: 4.5rem; margin: 1.5rem 0; max-width: 44rem; }
.hero-body { max-width: 36rem; margin-bottom: 2.5rem; }
/* The hero is a full-bleed band: cancel the body gutter so its overflow clip sits at the screen edge (the caption's gold wash reaches it), and put the gutter back as padding so the content stays aligned. */
body:not(.editor-styles-wrapper) section.band:has(> .hero-grid) { margin-inline: calc(-1 * var(--gutter-l)) calc(-1 * var(--gutter-r)); padding-inline: var(--gutter-l) var(--gutter-r); }
.caption-bar { position: relative; isolation: isolate; color: var(--ink); }
.caption-bar::before { content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: calc(100% + 100vw); z-index: -1; pointer-events: none; background-image: linear-gradient(90deg, color-mix(in srgb, var(--gold) 60%, transparent), transparent); }

.visual { position: relative; width: 100%; max-width: 34rem; margin: 0 auto; aspect-ratio: 1.2 / 1; }
.frame { position: absolute; inset: 0 12%; overflow: hidden; border: 1px solid var(--control-border); border-radius: var(--radius-xs); background: var(--wf-page); }
.frame svg { display: block; width: 100%; height: 100%; }
.frame svg * { stroke: var(--wf-stroke); }
.frame svg rect, .frame svg circle { fill: var(--wf-block); }
.frame svg path, .frame svg line { fill: none; }
.frame svg .gold { fill: var(--gold); stroke: none; }
.frame svg .nf { fill: none; }

.vchip { position: absolute; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; background: var(--chip-fill); -webkit-backdrop-filter: var(--glass-light-filter); backdrop-filter: var(--glass-light-filter); border: 1px solid var(--control-border); border-radius: var(--radius-xs); font-family: var(--font-display); font-size: 1rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; color: var(--ink); }
/* .vchip sets text-transform: uppercase for its own label text. That is an inherited
   CSS property, so without this reset the icon ligature's underlying text content
   ("palette") renders as "PALETTE" at paint time -- the icon font's GSUB ligature
   table is keyed to the lowercase name only, so the uppercased string fails to match
   and the browser falls back to literal clipped capital letters ("PA") instead of the
   glyph. Root cause found 2026-10-24 verifying /build/ live; same gotcha class as the
   GeneratePress specificity issue in the generatepress-child-theme skill -- a property
   set at a container level reaching an element that needs to opt back out. */
.vchip .icon { font-size: 1.25rem; color: var(--gold-text); text-transform: none; }
.vchip.l { left: 0; }
.vchip.r { right: 0; }
.visual.build .vchip { transform: translateY(-50%); }

/* Chip animation and the pause control, in one place so one paused rule wins in every hero.
   THE RULE: nothing else may set `animation-play-state`, and chips may only be animated with
   LONGHAND properties (animation-name, -duration, ...). The `animation` shorthand resets
   animation-play-state to running, so a chip carrying the shorthand (inline, or in any
   stylesheet rule at equal or higher specificity than the paused rule below) cannot be paused:
   the pause button silently did nothing on Grow, Care and Build (an inline shorthand always
   wins) and had to be patched by hand on Check-up. Found 2026-10-25 by running
   tests/pages/checkup-acceptance.mjs against grow and care.

   Chips that play one keyframe each, in order (hitB0..hitB5, defined in the page's own
   {slug}-hero.css): chip N is the Nth span in .visual. A new hero with the same pattern joins
   the :is() list. A hero with one shared keyframe and per-chip delays (Check-up's `hit`, Connect's
   `hit2`) sets the longhands in its own file and puts only `animation-delay` on each chip. */
:is(.visual.grow, .visual.care, .visual.build, .visual.about) .vchip { animation-duration: 10s; animation-timing-function: linear; animation-iteration-count: infinite; }
:is(.visual.grow, .visual.care, .visual.build, .visual.about) .vchip:nth-of-type(1) { animation-name: hitB0; }
:is(.visual.grow, .visual.care, .visual.build, .visual.about) .vchip:nth-of-type(2) { animation-name: hitB1; }
:is(.visual.grow, .visual.care, .visual.build, .visual.about) .vchip:nth-of-type(3) { animation-name: hitB2; }
:is(.visual.grow, .visual.care, .visual.build, .visual.about) .vchip:nth-of-type(4) { animation-name: hitB3; }
:is(.visual.grow, .visual.care, .visual.build, .visual.about) .vchip:nth-of-type(5) { animation-name: hitB4; }
:is(.visual.grow, .visual.care, .visual.build, .visual.about) .vchip:nth-of-type(6) { animation-name: hitB5; }

/* Pause control: the explicit toggle pauses (no pause on hover); reduced motion is handled per
   keyframe in the page-specific file (base/paused state stays visible either way). */
.visual.paused .vchip { animation-play-state: paused; }

@media (max-width: 48rem) {
  .hero-h1 { font-size: 3.25rem; }
  .hero-grid { padding-block: 1.5rem 3rem; gap: 2.5rem; }
  /* Stacked: the graphic (second in the markup, so the copy stays first for readers and search) comes first on screen. */
  .hero-grid > :last-child { order: -1; }
  .vchip { font-size: 1rem; padding: 0.25rem 0.5rem; }
}

/* The gap above the hero caption (the PHP hero set `margin:0.75rem 0 0` inline). Opt-in for the
   same reason as the tile spacing classes in content-band.css. */
.caption-gap { margin: 0.75rem 0 0; }
