/* ============================================================
   PASSENGER :: DEPARTURE COUNTDOWN
   ------------------------------------------------------------
   A recreation of the classic NASA/KSC segmented countdown
   clock: black paneled housing, blue trim + label bands, amber
   dot-matrix digits, angled silver base.

   Pairs with: countdown.html + assets/js/countdown.js
   Loaded after passenger.css, so it inherits the Chakra Petch /
   Rajdhani font imports already declared there.
   ============================================================ */

.countdown-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 56px);
  padding: 48px 20px;
  text-align: center;
  color: #ffffff;
  background:
    radial-gradient(1.6px 1.6px at 8% 22%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 22% 68%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.8px 1.8px at 38% 12%, rgba(255,255,255,0.85), transparent 60%),
    radial-gradient(1.3px 1.3px at 54% 78%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 68% 34%, rgba(255,255,255,0.8), transparent 60%),
    radial-gradient(1.1px 1.1px at 82% 58%, rgba(255,255,255,0.65), transparent 60%),
    radial-gradient(1.7px 1.7px at 92% 16%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 14% 90%, rgba(255,255,255,0.55), transparent 60%),
    #05060c;
  background-repeat: repeat;
  background-size: 340px 340px;
}

/* ---------- heading ---------- */

.countdown-kicker {
  display: block;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 14px;
}

.countdown-heading {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  letter-spacing: 0.14em;
  margin: 0;
  color: #ffffff;
}

.countdown-heading-sub {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 10px;
}

/* ---------- clock housing ---------- */

.clock {
  --lit: #ffd35c;
  --lit-glow: rgba(255, 211, 92, 0.65);
  --unlit: #2a2c33;
  width: min(100%, 980px);
}

.clock-body {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: linear-gradient(180deg, #1c1e24, #101116);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 6px solid #052a5b;
  border-bottom: 6px solid #052a5b;
  border-radius: 4px;
  padding: clamp(16px, 2.6vw, 30px) clamp(10px, 2vw, 22px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.clock-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 clamp(6px, 1.4vw, 16px);
}

.digit-slot {
  display: flex;
  gap: clamp(4px, 1vw, 10px);
}

.digit {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: clamp(1.5px, 0.3vw, 3px);
  width: clamp(34px, 6vw, 60px);
  height: clamp(48px, 8.4vw, 84px);
  padding: 6px;
  background: #05060a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

.dot {
  border-radius: 50%;
  background: var(--unlit);
}

.dot.lit {
  background: var(--lit);
  box-shadow: 0 0 6px 1px var(--lit-glow), 0 0 1px var(--lit);
}

.clock-label-strip {
  width: 100%;
  background: #1d4ed8;
  padding: 5px 0;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.clock-label-strip span {
  display: block;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: clamp(0.6rem, 1vw, 0.8rem);
  letter-spacing: 0.2em;
  color: #ffffff;
}

.clock.launched .clock-label-strip {
  background: #16a34a;
}

.clock-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 2px;
}

.clock-divider .dot {
  width: clamp(5px, 0.9vw, 8px);
  height: clamp(5px, 0.9vw, 8px);
  background: var(--lit);
  box-shadow: 0 0 6px 1px var(--lit-glow);
}

.clock-base {
  height: clamp(26px, 4vw, 44px);
  margin: 0 auto;
  width: 92%;
  background: linear-gradient(180deg, #d7dbe2, #9aa0ac 55%, #6c7280);
  clip-path: polygon(4% 0, 96% 0, 68% 100%, 32% 100%);
}

/* ---------- status + CTA ---------- */

.countdown-status {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.countdown-enter {
  display: none;
  align-items: center;
  gap: 10px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: #05060a;
  background: var(--lit, #ffd35c);
  padding: 16px 34px;
  text-decoration: none;
  border-radius: 2px;
  transition: opacity 0.2s ease;
}

.countdown-enter.visible { display: inline-flex; }

.countdown-enter:hover { opacity: 0.85; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .clock-body { flex-wrap: wrap; row-gap: 18px; }
  .clock-divider { display: none; }
  .clock-unit { width: 42%; }
}

@media (prefers-reduced-motion: reduce) {
  .countdown-enter, .clock-label-strip { transition: none; }
}

/* ---------- sound toggle ---------- */

.sound-toggle {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 211, 92, 0.5);
    border-radius: 999px;
    background: rgba(18, 20, 28, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sound-toggle:hover { background: rgba(18, 20, 28, 0.95); }

.sound-toggle.needs-click { animation: sound-pulse 1.8s ease-in-out infinite; }

@keyframes sound-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 211, 92, 0.55); }
    50%      { box-shadow: 0 0 0 10px rgba(255, 211, 92, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .sound-toggle, .sound-toggle.needs-click { animation: none; transition: none; }
}