/* ============================================================
   live-hero.css — homepage live-takeover hero.

   The markup for this hero sits in 10-deploy/_source-pages/homepage.html
   directly above the regular .hero-cinema section. The CSS below keeps
   the live hero hidden by default; /js/live-status.js adds `.is-live`
   to <body> when the YouTube channel is broadcasting and the JSON is
   fresh, which flips visibility:

     body:not(.is-live) .hero-live    { display: none; }
     body.is-live      .hero-cinema  { display: none; }
     body.is-live      .now-in-series { display: none; }

   No CSS variables are redefined here; everything pulls from tokens.css.
   ============================================================ */

/* Sunday hero visibility. Default (no state class) = regular cinema hero.
   is-pre -> "before" hero; is-live / is-today -> live takeover hero. */
.hero-pre  { display: none; }
.hero-live { display: none; }
body.is-pre   .hero-pre  { display: block; }
body.is-live  .hero-live { display: block; }
body.is-today .hero-live { display: block; }
body.is-pre   .hero-cinema,
body.is-live  .hero-cinema,
body.is-today .hero-cinema { display: none; }
body.is-pre   .now-in-series,
body.is-live  .now-in-series,
body.is-today .now-in-series { display: none; }

.hero-live {
  position: relative;
  color: var(--on-deep);
  overflow: hidden;
  isolation: isolate;
}

/* Blurred regular-hero photo as backdrop (continuity with the off state). */
.hero-live__photo-bg {
  position: absolute; inset: 0;
  background-image: url('../img/sanctuary-exterior-golden-hour-steeple.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
  z-index: -2;
}
.hero-live__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 20% 60%, rgba(184, 50, 39, 0.20) 0%, transparent 65%),
    linear-gradient(180deg, rgba(15, 17, 15, 0.55) 0%, rgba(14, 26, 46, 0.78) 100%);
  z-index: -1;
}

/* Slim full-width LIVE NOW banner */
.hero-live__banner {
  position: relative;
  background: var(--nh-red);
  color: #ffffff;
  overflow: hidden;
}
.hero-live__banner::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0)    0 12px,
      rgba(255,255,255,0.06) 12px 14px);
  pointer-events: none;
}
.hero-live__banner-inner {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(8px, 1vw, 12px) var(--space-24);
  display: flex; align-items: center; justify-content: center;
  gap: clamp(8px, 1.2vw, 12px);
  font-family: var(--font-display);
  text-align: center;
}
.hero-live__banner-dot {
  width: clamp(7px, 0.85vw, 10px); height: clamp(7px, 0.85vw, 10px);
  border-radius: 50%; background: #ffffff;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.85);
  animation: liveDotPulse 1.4s ease-out infinite;
  flex-shrink: 0;
}
@keyframes liveDotPulse {
  0%   { box-shadow: 0 0 0 0   rgba(255,255,255,0.85); }
  100% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
}
.hero-live__banner-headline {
  display: inline-flex; align-items: center;
  font-size: clamp(13px, 2vw, 24px);
  font-weight: 800; line-height: 1; letter-spacing: 0.08em;
  text-transform: uppercase; margin: 0; color: #ffffff;
}
.hero-live__banner-sub {
  /* CLAUDE.md "no colored left-border" rule: use an inline ::before dot as
     the divider rather than border-left so we don't accumulate left-bar
     patterns anywhere on the site. */
  display: inline-flex; align-items: center;
  margin-left: clamp(6px, 0.9vw, 10px);
  padding-left: 0;
  font-size: clamp(10px, 1vw, 12.5px); font-weight: 600;
  letter-spacing: 0.18em; color: rgba(255,255,255,0.85);
  text-transform: uppercase;
}
.hero-live__banner-sub::before {
  content: "";
  display: inline-block;
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,0.55);
  margin-right: clamp(6px, 0.9vw, 10px);
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .hero-live__banner-inner { flex-wrap: wrap; }
  .hero-live__banner-headline { flex-direction: column; gap: 4px; }
  .hero-live__banner-sub { margin: 0; padding: 0; }
  .hero-live__banner-sub::before { display: none; }
}

/* Body: copy left, media right */
.hero-live__inner {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--space-24);
  display: grid; gap: var(--space-32);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-live__inner {
    grid-template-columns: 1fr 1.05fr;
    gap: var(--space-48);
    min-height: 56vh;
  }
}
.hero-live__copy { display: flex; flex-direction: column; gap: var(--space-16); }
.hero-live__h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 60px);
  font-weight: 800; line-height: 1.02; letter-spacing: -0.02em;
  margin: 0; color: #ffffff; max-width: 20ch;
}
.hero-live__meta {
  font-family: var(--font-display); font-size: 14px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(246,242,236,0.78); margin: 0;
}
.hero-live__meta .hero-live__series a {
  color: rgba(246,242,236,0.92);
  border-bottom: 1px solid rgba(246,242,236,0.30);
  padding-bottom: 1px; text-decoration: none;
  transition: color 150ms ease, border-bottom-color 150ms ease;
}
.hero-live__meta .hero-live__series a:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}
.hero-live__actions {
  display: flex; flex-wrap: wrap; gap: var(--space-12);
  margin-top: var(--space-8);
}
.hero-live .btn--primary { background: var(--nh-red); }
.hero-live .btn--primary:hover { background: var(--nh-red-deep); }
.hero-live .btn--ghost-on-dark {
  background: transparent; color: var(--on-deep);
  border: 1px solid rgba(246,242,236,0.40);
}
.hero-live .btn--ghost-on-dark:hover { background: rgba(246,242,236,0.10); }
@media (max-width: 700px) {
  .hero-live__actions { width: 100%; }
  .hero-live__actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* Media slot: 16:9 with red LIVE badge + play overlay */
.hero-live__media { position: relative; }
.hero-live__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #000;
  background-size: cover;
  background-position: center;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px -16px rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.hero-live__thumb:hover { transform: translateY(-2px); box-shadow: 0 24px 60px -16px rgba(0,0,0,0.65); }
.hero-live__thumb::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.45) 100%);
}
.hero-live__thumb-badge {
  position: absolute; top: 14px; left: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--nh-red); color: #ffffff;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.hero-live__thumb-badge::before {
  content: ""; width: 7px; height: 7px;
  border-radius: 50%; background: #ffffff;
  animation: liveDotPulse 1.4s ease-out infinite;
}
.hero-live__thumb-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #ffffff;
}
.hero-live__thumb-play svg {
  width: clamp(56px, 7vw, 84px); height: clamp(56px, 7vw, 84px);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.45));
}
.hero-live__thumb-hint {
  position: absolute; bottom: 12px; left: 14px;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}

/* Embedded YouTube IFrame (replaces the thumbnail on click) */
.hero-live__embed {
  width: 100%; aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  border-radius: var(--r-lg);
  box-shadow: 0 20px 50px -16px rgba(0,0,0,0.55);
}

/* "Prefer fullscreen" link beneath the player */
.hero-live__media-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: var(--space-12);
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: rgba(246,242,236,0.78);
  border-bottom: 1px solid rgba(246,242,236,0.25);
  padding-bottom: 2px; width: fit-content;
  transition: color 150ms ease, border-bottom-color 150ms ease;
  text-decoration: none;
}
.hero-live__media-link:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

/* Respect prefers-reduced-motion: stop the LIVE dot pulse, keep everything else. */
@media (prefers-reduced-motion: reduce) {
  .hero-live__banner-dot,
  .hero-live__thumb-badge::before {
    animation: none;
  }
}

/* ============================================================
   "Today's Service" sub-state — after the service, through the day, until the
   VOD is up. Calmer than the pulsing red "Live now" banner.
   ============================================================ */
body.is-today .hero-live__banner { background: var(--nh-ink); }
body.is-today .hero-live__banner-dot { animation: none; background: rgba(255,255,255,0.55); }
body.is-today .hero-live__thumb-badge { display: none; } /* not live in the afternoon */

/* ============================================================
   "Before" hero — Sunday morning, pre-9:30 service-times announcement.
   Shares the live hero's dark, blurred-photo treatment for continuity.
   ============================================================ */
.hero-pre { position: relative; color: var(--on-deep); overflow: hidden; isolation: isolate; }
.hero-pre__photo-bg {
  position: absolute; inset: 0;
  background-image: url('../img/hero-sanctuary-gathered-worship-clovis.jpg');
  background-size: cover; background-position: center;
  filter: blur(16px) saturate(1.08); transform: scale(1.08); z-index: -2;
}
.hero-pre__veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(15,17,15,0.6) 0%, rgba(14,26,46,0.82) 100%);
}
.hero-pre__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(48px, 7vw, 104px) var(--space-24);
  display: flex; flex-direction: column; align-items: flex-start; gap: clamp(14px, 1.6vw, 20px);
}
.hero-pre__eyebrow {
  font-family: var(--font-display); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--nh-red-soft, #ff6b5e); margin: 0;
}
.hero-pre__h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 6vw, 80px); line-height: 0.98; letter-spacing: -0.035em;
  text-transform: uppercase; color: #fff; margin: 0;
}
.hero-pre__h1 em { font-style: normal; color: var(--nh-red-soft, #ff6b5e); }
.hero-pre__lede {
  font-family: var(--font-scripture, "Fraunces", serif); font-style: italic;
  font-size: clamp(18px, 1.6vw, 23px); line-height: 1.5; color: rgba(255,255,255,0.9);
  max-width: 46ch; margin: 0;
}
.hero-pre__times { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: clamp(14px, 2vw, 32px); }
.hero-pre__times li { display: flex; flex-direction: column; gap: 2px; }
.hero-pre__time { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); color: #fff; }
.hero-pre__note { font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: rgba(255,255,255,0.72); }
.hero-pre__golive { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: var(--nh-red-soft, #ff6b5e); margin: 4px 0 0; }
.hero-pre__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ============================================================
   TEMPORARY Sunday-state preview bar (staff control; remove before launch).
   Sits above the nav; full-width slim bar with state buttons.
   ============================================================ */
.sunday-preview {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px clamp(12px, 3vw, 24px);
  background: #15110f; color: #fff;
  border-bottom: 2px solid var(--nh-red);
  font-family: var(--font-display);
}
.sunday-preview__label { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-right: 4px; }
.sunday-preview button {
  appearance: none; cursor: pointer;
  padding: 6px 12px; border-radius: 999px;
  background: transparent; color: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.28);
  font-family: var(--font-display); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.sunday-preview button:hover { border-color: #fff; color: #fff; }
.sunday-preview button.is-active { background: var(--nh-red); border-color: var(--nh-red); color: #fff; }
@media print { .sunday-preview { display: none; } }
