/* ==========================================================================
   TurboSanta V3 — Illustrated Storybook + Mission Control Design System
   Layered cleanly on top of sleigh_v2.css via body.v3
   Typography: Eurostile Extended Bold + Open Sans
   Multi-Tenant Dynamic Colors: --primary, --primary-rgb, --on-primary, --accent
   5 Automatic States: body.v3[data-v3-state="loading|countdown|tonight|live|rain|complete"]
   ========================================================================== */

html {
  background-color: #090d16;
  overflow-x: clip;
}

body.v3 {
  --v3-ink: #090d16;
  --v3-deep: #0b1228;
  --v3-surface: rgba(12, 18, 38, 0.72);
  --v3-surface-strong: rgba(9, 14, 30, 0.88);
  --v3-cream: #fdf8ee;
  --v3-cream-soft: rgba(253, 248, 238, 0.78);
  --v3-cream-muted: rgba(232, 224, 210, 0.56);
  --v3-display: 'Eurostile', 'Open Sans', sans-serif;
  --v3-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  font-family: var(--v3-sans);
  color: var(--v3-cream);
  background-color: transparent;
  overflow-x: clip;
  overflow-y: visible;
  -webkit-font-smoothing: antialiased;
}

body.v3 h1,
body.v3 h2,
body.v3 .brand-font,
body.v3 .hero-headline,
body.v3 .section-title,
body.v3 .brand-name,
body.v3 #footer-club-heading {
  font-family: var(--v3-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--v3-cream);
}

body.v3 h3,
body.v3 #grant-beneficiaries-card h3,
body.v3 #volunteer-crew-card h3,
body.v3 .modal-panel-v2 h3 {
  font-family: var(--v3-sans);
  font-weight: 800;
  text-transform: none;
  letter-spacing: -0.015em;
  color: var(--v3-cream);
}

body.v3 .hero-headline .hl,
body.v3 .section-title .hl {
  background: linear-gradient(135deg, #fffdf7 0%, var(--primary) 54%, #fde68a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 26px rgba(var(--primary-rgb), 0.28));
}

body.v3 #snow-canvas {
  opacity: 0.45;
  z-index: 3;
}

/* ==========================================================================
   HEADER & NAV POLISH
   ========================================================================== */
body.v3 .site-header {
  background: linear-gradient(180deg, rgba(5, 8, 22, 0.78) 0%, rgba(5, 8, 22, 0.12) 100%);
}

body.v3 .site-header.is-scrolled {
  background: rgba(6, 10, 24, 0.88);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid rgba(253, 248, 238, 0.08);
  box-shadow: 0 14px 36px rgba(2, 4, 12, 0.55);
}

body.v3 .brand-crest-wrap {
  border-radius: 14px;
  background: rgba(253, 248, 238, 0.06);
  border-color: rgba(253, 248, 238, 0.14);
}

body.v3 #header-kicker {
  display: none !important;
}

body.v3 .desktop-nav {
  background: rgba(253, 248, 238, 0.04);
  border-color: rgba(253, 248, 238, 0.1);
}

body.v3 .desktop-nav a {
  color: var(--v3-cream-soft);
  white-space: nowrap;
}

body.v3 .v3-live-pill {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.52);
  color: #6ee7b7;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.22);
  transition: transform 0.18s ease, background 0.18s ease;
}

body.v3 .v3-live-pill:hover {
  transform: translateY(-1px);
  background: rgba(16, 185, 129, 0.25);
}

body.v3[data-v3-state="live"] .v3-live-pill {
  display: inline-flex;
}

.v3-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px #34d399;
  animation: v3PulseDot 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes v3PulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.68); opacity: 0.45; }
}

/* ==========================================================================
   HERO STAGE — Transparent Over Native Table Video / Custom Background Image
   ========================================================================== */
body.v3 .v3-hero {
  position: relative;
  overflow: hidden;
  margin-top: -72px;
  padding: 122px 0 84px;
  min-height: min(86vh, 780px);
  display: flex;
  align-items: center;
}

@media (max-width: 640px) {
  body.v3 .v3-hero {
    padding: 102px 0 64px;
    min-height: min(80vh, 700px);
  }
}

body.v3 .hero-video-wrap {
  z-index: 0;
}

body.v3 .v3-hero.hero-video-compact {
  padding: 108px 0 44px;
  min-height: auto;
}

@media (max-width: 640px) {
  body.v3 .v3-hero.hero-video-compact {
    padding: 96px 0 36px;
    min-height: auto;
  }
}

body.v3 .hero-card.has-video.video-compact {
  background: rgba(8, 11, 18, 0.48);
  border: 1px solid rgba(var(--primary-rgb), 0.28);
  border-radius: 26px;
  padding: 36px 26px;
  overflow: hidden;
  box-shadow: 0 22px 58px -10px rgba(0, 0, 0, 0.78), 0 0 32px -6px rgba(var(--primary-rgb), 0.24);
}

/* ==========================================================================
   HERO FOREGROUND TYPOGRAPHY, COUNTDOWN TILES & INSTANT STREET SEARCH
   ========================================================================== */
body.v3 #hero-countdown-chip {
  display: none !important;
}

body.v3 .hero-card {
  gap: 18px;
}

.v3-eyebrow {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  margin: 0;
}

body.v3 .hero-headline {
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 12px 36px rgba(3, 6, 18, 0.72);
}

.v3-hl-lead {
  display: block;
  font-family: var(--v3-sans);
  font-style: normal;
  font-weight: 700;
  font-size: 0.34em;
  text-transform: uppercase;
  color: rgba(253, 248, 238, 0.88);
  margin-bottom: 8px;
  letter-spacing: 0.16em;
}

body.v3 .hero-subcopy {
  color: var(--v3-cream-soft);
  font-size: 15.5px;
  max-width: 56ch;
}

/* Countdown Tiles */
.v3-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.v3-countdown[hidden] {
  display: none !important;
}

.v3-count-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--v3-cream-muted);
}

.v3-count-tiles {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.v3-tile {
  min-width: 68px;
  padding: 9px 14px;
  border-radius: 16px;
  background: rgba(9, 14, 32, 0.72);
  border: 1px solid rgba(253, 248, 238, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.v3-tile-num {
  font-family: var(--v3-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.08;
  color: var(--v3-cream);
  font-variant-numeric: tabular-nums;
}

.v3-tile-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-top: 2px;
}

/* Instant Hero Street Finder ("When's Santa coming to my street?") */
.v3-search {
  width: 100%;
  max-width: 640px;
  position: relative;
  z-index: 40;
  text-align: left;
}

.v3-search-label {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--v3-cream-soft);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.v3-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 16px;
  border-radius: 999px;
  background: rgba(8, 12, 28, 0.84);
  border: 1px solid rgba(var(--primary-rgb), 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.v3-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65), 0 0 0 3px rgba(var(--primary-rgb), 0.22);
}

.v3-search-icon {
  color: var(--primary);
  font-size: 15px;
  flex-shrink: 0;
}

.v3-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--v3-cream);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 9px 4px;
  outline: none;
}

.v3-search-input::placeholder {
  color: var(--v3-cream-muted);
  font-weight: 500;
}

.v3-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.v3-search-clear {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--v3-cream-soft);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.v3-search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.v3-search-clear[hidden] {
  display: none !important;
}

.v3-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--primary);
  color: var(--on-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.34);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.v3-search-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

@media (max-width: 520px) {
  .v3-search-btn span {
    display: none;
  }
  .v3-search-btn {
    padding: 10px 14px;
  }
}

.v3-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 310px;
  overflow-y: auto;
  border-radius: 20px;
  background: rgba(8, 12, 28, 0.96);
  border: 1px solid rgba(253, 248, 238, 0.18);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.78);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.v3-search-results[hidden] {
  display: none !important;
}

.v3-res-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.v3-res-row:hover,
.v3-res-row.is-active {
  background: rgba(var(--primary-rgb), 0.13);
  border-color: rgba(var(--primary-rgb), 0.42);
}

.v3-res-info {
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.v3-res-street {
  font-weight: 800;
  font-size: 13.5px;
  color: var(--v3-cream);
}

.v3-res-meta {
  font-size: 12px;
  color: var(--v3-cream-muted);
  margin-top: 2px;
}

.v3-res-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.v3-res-btn {
  border: 1px solid rgba(var(--primary-rgb), 0.42);
  background: rgba(var(--primary-rgb), 0.16);
  color: var(--primary);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.v3-res-btn:hover {
  background: var(--primary);
  color: var(--on-primary);
}

.v3-res-empty {
  padding: 14px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--v3-cream-soft);
}

/* Scroll cue arrow at bottom of hero */
.v3-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 6;
  width: 28px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(253, 248, 238, 0.24);
  background: rgba(5, 8, 22, 0.42);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
}

.v3-scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  animation: v3ScrollCue 1.8s ease-in-out infinite;
}

@keyframes v3ScrollCue {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  60% { transform: translateY(10px); opacity: 0.25; }
}

@media (max-width: 768px) {
  .v3-scroll-cue {
    display: none;
  }
}

/* ==========================================================================
   MISSION CONTROL LIVE MAP STAGE
   ========================================================================== */
.v3-live-hud {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 18px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.2) 0%, rgba(12, 18, 38, 0.94) 55%);
  border-bottom: 1px solid rgba(52, 211, 153, 0.32);
  font-size: 13px;
}

body.v3[data-v3-state="live"] .v3-live-hud {
  display: flex;
}

body.v3[data-v3-state="live"] .tracker-frame-container {
  border-color: rgba(52, 211, 153, 0.48);
  box-shadow: 0 28px 70px -16px rgba(0, 0, 0, 0.9), 0 0 46px rgba(16, 185, 129, 0.16);
}

.v3-hud-title {
  font-weight: 800;
  color: #6ee7b7;
}

.v3-hud-sub {
  color: var(--v3-cream-soft);
  font-size: 12.5px;
  margin-left: auto;
}

@media (max-width: 540px) {
  .v3-hud-sub {
    margin-left: 0;
    width: 100%;
  }
}

/* ==========================================================================
   ADVENT ROUTE CARDS, IMPACT, FAIRY-LIGHT MEMORIES & MODALS
   ========================================================================== */
body.v3 .section-eyebrow {
  color: var(--primary);
  letter-spacing: 0.14em;
}

body.v3 .route-card-v2 {
  background: var(--v3-surface);
  border-color: rgba(253, 248, 238, 0.1);
  border-radius: 22px;
}

body.v3 .route-card-v2:hover {
  border-color: rgba(var(--primary-rgb), 0.5);
}

body.v3 .date-calendar-Leaf {
  background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.16) 0%, rgba(12, 18, 38, 0.92) 100%);
  border-color: rgba(var(--primary-rgb), 0.38);
  border-radius: 15px;
}

body.v3 .date-leaf-day {
  font-family: var(--v3-display);
  font-weight: 700;
}

.v3-filter-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.v3-filter-wrap i {
  position: absolute;
  left: 14px;
  color: var(--v3-cream-muted);
  font-size: 12.5px;
  pointer-events: none;
}

body.v3 .v3-filter-wrap .route-inline-filter {
  padding-left: 36px;
}

body.v3 .fundraiser-card-v2,
body.v3 .glass-bento-card,
body.v3 .faq-card,
body.v3 .club-footer-card {
  background: var(--v3-surface);
  border-color: rgba(253, 248, 238, 0.11);
}

body.v3 .raised-big-figure {
  font-family: var(--v3-display);
  font-weight: 700;
}

.v3-fund-note {
  font-size: 12.5px;
  color: var(--v3-cream-soft);
  margin-top: 10px;
}

.v3-ga-title {
  font-weight: 800;
  font-size: 13px;
  color: var(--v3-cream);
}

.v3-ga-bonus {
  color: #6ee7b7;
}

.v3-donate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.v3-donate-row .btn-brand {
  flex: 1;
  min-width: 210px;
}

.v3-donate-row .btn-glass {
  flex: 1;
  min-width: 190px;
}

.v3-cash-ga {
  text-align: center;
  padding-top: 8px;
}

.v3-cash-ga a {
  font-size: 12.5px;
  color: #86efac;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Draped Christmas Fairy-Light Garlands Across Header & Every Section */
.v3-header-lights {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 32px;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
  opacity: 0.96;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.v3-lights-string {
  width: 100%;
  max-width: 760px;
  height: 28px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  pointer-events: none;
}

.v3-lights-string::before,
.v3-lights-string::after {
  content: '';
  flex: 1;
  height: 1px;
}

.v3-lights-string::before {
  background: linear-gradient(90deg, transparent 0%, rgba(var(--primary-rgb, 245, 184, 61), 0.55) 100%);
}

.v3-lights-string::after {
  background: linear-gradient(90deg, rgba(var(--primary-rgb, 245, 184, 61), 0.55) 0%, transparent 100%);
}

.v3-northstar-emblem {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.v3-northstar-diamond {
  width: 4px;
  height: 4px;
  background: var(--primary, #f5b83d);
  opacity: 0.72;
  transform: rotate(45deg);
}

.v3-northstar-svg {
  width: 18px;
  height: 18px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(var(--primary-rgb, 245, 184, 61), 0.52));
}

.v3-garland-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.v3-garland-svg .v3-cord {
  fill: none;
  stroke: #1f3a2e;
  stroke-width: 2.2;
}

.v3-garland-svg .v3-cord-sheen {
  fill: none;
  stroke: rgba(167, 243, 208, 0.22);
  stroke-width: 0.9;
}

.v3-garland-svg .v3-cap {
  fill: #1b2e25;
}

.v3-garland-svg .v3-bulb {
  animation: v3FairyTwinkle 3.2s ease-in-out infinite;
}

.v3-garland-svg .v3-bulb-halo {
  animation: v3FairyHalo 3.2s ease-in-out infinite;
}

.v3-garland-svg .v3-bulb-glint {
  fill: rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.v3-bulb-gold { fill: var(--primary, #fde047); }
.v3-halo-gold { fill: rgba(var(--primary-rgb), 0.42); }
.v3-bulb-red { fill: #f87171; }
.v3-halo-red { fill: rgba(239, 68, 68, 0.40); }
.v3-bulb-green { fill: #4ade80; }
.v3-halo-green { fill: rgba(34, 197, 94, 0.38); }
.v3-bulb-blue { fill: #60a5fa; }
.v3-halo-blue { fill: rgba(96, 165, 250, 0.38); }
.v3-bulb-warm { fill: #fef3c7; }
.v3-halo-warm { fill: rgba(254, 243, 199, 0.40); }

@keyframes v3FairyTwinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.46; }
}

@keyframes v3FairyHalo {
  0%, 100% { opacity: 0.62; }
  50% { opacity: 0.14; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-garland-svg .v3-bulb,
  .v3-garland-svg .v3-bulb-halo {
    animation: none !important;
  }
}

body.v3 .faq-card[open] summary i {
  transform: rotate(180deg);
}

/* Footer & Helpers */
.v3-footer {
  padding-top: 24px;
  position: relative;
}

.v3-club-copy {
  max-width: 660px;
}

.v3-club-copy h2 {
  font-size: 26px;
  margin-bottom: 10px;
}

.v3-club-copy p {
  font-size: 14px;
  color: var(--v3-cream-soft);
  line-height: 1.65;
}

.v3-theater-title,
.v3-theater-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v3-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.v3-modal-head h3 {
  font-size: 24px;
  margin-top: 6px;
}

.v3-modal-head p {
  font-size: 13px;
  color: var(--v3-cream-soft);
  margin-top: 5px;
}

.v3-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--v3-cream-soft);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.v3-check input {
  margin-top: 3px;
  accent-color: var(--primary);
}

.v3-block {
  width: 100%;
}

.v3-input-row {
  display: flex;
  gap: 8px;
}

.v3-input-row .input-v2 {
  flex: 1;
}

.v3-coords-status {
  font-size: 12px;
  color: #6ee7b7;
}

/* ==========================================================================
   MOBILE ERGONOMICS & SAFE-AREA POLISH
   ========================================================================== */
@media (max-width: 768px) {
  body.v3 .v3-search-input,
  body.v3 .route-inline-filter,
  body.v3 .input-v2 {
    font-size: 16px; /* Prevents iOS Safari auto-zoom on tap */
  }
}

@media (max-width: 959px) {
  body.v3 {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  body.v3 .mobile-thumb-dock {
    bottom: max(12px, env(safe-area-inset-bottom, 12px));
  }
}

@media (max-width: 520px) {
  .v3-res-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .v3-res-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .v3-res-btn {
    padding: 8px 12px;
    font-size: 12px;
    text-align: center;
  }
}
