/**
 * =====================================================================
 * HERO CAROUSEL COMPONENT — STYLES
 * =====================================================================
 * 2026 REDESIGN UPDATE — full rebuild of the slide-content classes to
 * match the real static design's "rotating masthead" exactly
 * (css/style.css): ".hero__frame/.hero__kicker/.hero__body/.hero__row/
 * .hero__cta" replace the earlier invented
 * ".hero__inner/.hero__content/.hero__eyebrow/.hero__actions", which
 * do not exist in the real stylesheet at all. The carousel MECHANICS
 * (slide cross-fade, dots, arrows, counter, grain overlay) are
 * otherwise the same shapes as before, with values updated to match.
 *
 * EVERY WORDPRESS-SPECIFIC HARDENING FIX BELOW IS PRESERVED FROM THE
 * PREVIOUS VERSION OF THIS FILE (confirmed necessary, live, on this
 * exact component — none of this is guesswork carried over blindly):
 *   - The full-bleed width break-out on "section.hero" (the static
 *     site's .hero is a direct child of <main> with nothing
 *     constraining its width; this shortcode instead renders inside
 *     Blocksy's own boxed content wrapper, so it needs an explicit
 *     break-out to actually reach full-bleed).
 *   - !important on img.hero__img's width/height/object-fit (a mobile
 *     image-shrinking bug traced to a Blocksy base-theme image-sizing
 *     rule this project can't fully predict the specificity of from
 *     the outside).
 *   - !important + explicit un-classed-child rules on the counter
 *     (Blocksy uses !important on its own font-family declaration,
 *     and the visible counter digits live on un-classed <b>/<span>
 *     children that don't reliably inherit font-mono either, for the
 *     same reason this project's own site-wide safety-net rule in
 *     global.css explicitly sets a font-family on any plain span).
 * =====================================================================
 */

section.hero {
  position: relative;
  min-height: min(86vh, 760px);
  background: var(--ink); color: var(--white); overflow: hidden;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.3s var(--ease), transform 9s var(--ease);
}
.hero__slide.is-active { opacity: 1; transform: scale(1); z-index: 1; }
img.hero__img { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover !important; }
.hero__slide::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.22) 60%, rgba(0,0,0,0.72) 100%);
}
.hero__frame {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-block: 40px 76px;
}
p.hero__kicker {
  --forced-font: var(--font-mono); font-family: var(--forced-font) !important; font-size: 12px; letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75); margin: 0;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.hero__body {
  max-width: 920px;
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: 0.12s;
}
.hero__slide.is-active .hero__kicker,
.hero__slide.is-active .hero__body { opacity: 1; transform: none; transition-delay: 0.5s; }
.hero__slide.is-active .hero__body { transition-delay: 0.65s; }
h1.hero__headline, p.hero__headline {
  color: var(--white);
  --forced-font: var(--font-serif);
  font-family: var(--forced-font) !important;
  font-size: clamp(2.8rem, 1.7rem + 5.4vw, 5.6rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.005em;
  margin: 0 0 28px;
}
/* No font-family needed here — global.css's "--forced-font" mechanism
   means this <span> (see blocksy_child_wrap_phrase_in_span() in
   inc/helpers.php) automatically inherits --forced-font (serif) from
   its h1.hero__headline/p.hero__headline parent above. Previously
   needed its own explicit "font-family: var(--font-serif) !important"
   here before that mechanism existed — see global.css's own header
   comment on --forced-font for the full history/reasoning. */
.hero__headline .accent {
  color: var(--red-bright);
}
.hero__row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.22); padding-top: 24px;
}
p.hero__sub { font-size: 17px; color: rgba(255, 255, 255, 0.75); max-width: 460px; margin: 0; }
a.hero__cta {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  font-family: var(--font-sans) !important; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--white);
  padding-bottom: 4px; border-bottom: 1px solid var(--white);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), gap 0.25s var(--ease);
}
.hero__cta svg { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
a.hero__cta:hover { color: var(--red-bright); border-color: var(--red-bright); gap: 14px; }
.hero__cta:hover svg { transform: translateX(2px); }
@media (max-width: 700px) {
  .hero__row { flex-direction: column; align-items: flex-start; gap: 20px; }
}

.hero__controls {
  position: absolute; z-index: 4; inset-inline: 0; bottom: 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
div.hero__counter {
  --forced-font: var(--font-mono);
  font-family: var(--forced-font) !important; font-size: 12px; letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
}
/* No separate "b"/"span" font-family rule needed anymore — both
   automatically inherit --forced-font (mono) from div.hero__counter
   above via global.css's "--forced-font" mechanism. This used to need
   its own explicit "font-family: var(--font-mono) !important" on both
   children before that mechanism existed. */
.hero__counter b { color: var(--white); font-weight: 500; margin-right: 6px; }
.hero__dots { display: flex; gap: 10px; }
button.hero__dot {
  /* "!important" added on top of "button.hero__dot" — the element-
     qualified selector only ties assets/css/global.css's
     ".entry-content button { background: none }" reset on specificity,
     which still depends on load order to break the tie; that dependency
     is exactly what kept the dots invisible on desktop even after the
     "button.hero__dot" fix. !important removes the dependency on load
     order entirely — same reasoning as img.hero__img below. */
  width: 28px; height: 2px; background: rgba(255, 255, 255, 0.28) !important;
  position: relative; overflow: hidden; transition: background 0.3s var(--ease);
}
button.hero__dot.is-active { background: rgba(255, 255, 255, 0.3) !important; }
.hero__dot .bar { position: absolute; inset: 0; background: var(--red-bright); transform-origin: left; transform: scaleX(0); }
.hero__dot.is-active .bar { animation: hero-progress 7s linear forwards; }
@keyframes hero-progress { to { transform: scaleX(1); } }
.hero__arrows { display: flex; gap: 8px; }
button.hero__arrow {
  /* "!important" on border/color, same reasoning as button.hero__dot
     above — a specificity tie against ".entry-content button" still
     depends on load order to resolve; !important removes that
     dependency entirely rather than trusting the tie-break. */
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.32) !important;
  color: var(--white) !important;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
button.hero__arrow:hover { background: var(--white); color: var(--ink) !important; border-color: var(--white) !important; }
.hero__arrow svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .hero__dots { display: none; } }

/* Grain overlay */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>");
  opacity: 0.35; mix-blend-mode: overlay;
}
