/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --void:  #05030d;
  --gold:  #e8a835;
  --ember: #c84b1a;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --mono:  'IBM Plex Mono', 'Courier New', monospace;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--void);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Star canvas ───────────────────────────────────────────── */
#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ─── Main UI container ─────────────────────────────────────── */
.ui {
  position: fixed;
  inset: 0;
  z-index: 1;
}

/* ─── Sky zone (full viewport, content anchored near top) ───── */
.sky-zone {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.9rem, 2.5vh, 1.4rem);
  padding: 2rem 1.5rem 52vh;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.eyebrow {
  font-family: var(--mono);
  font-weight: 300;
  font-size: clamp(0.68rem, 1.5vw, 0.82rem);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(232, 168, 53, 0.55);
}

.poem {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 3.0vw, 1.5rem);
  line-height: 2;
  letter-spacing: 0.025em;
  color: rgba(255, 255, 255, 0.58);
  text-shadow: 0 0 32px rgba(232, 168, 53, 0.18);
}

/* ─── Countdown ─────────────────────────────────────────────── */
.countdown {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.6rem, 2.5vw, 1.8rem);
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.digits {
  font-family: var(--mono);
  font-weight: 300;
  font-size: clamp(2.8rem, 9.5vw, 6.5rem);
  color: #fff;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow:
    0 0 18px rgba(232, 168, 53, 0.48),
    0 0 55px rgba(232, 168, 53, 0.18);
}

.lbl {
  font-family: var(--mono);
  font-weight: 300;
  font-size: clamp(0.55rem, 1.3vw, 0.68rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
}

.sep {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 5.5vw, 3.8rem);
  color: rgba(232, 168, 53, 0.28);
  line-height: 1;
  padding-bottom: clamp(1rem, 2.5vh, 1.4rem);
}

.datestamp {
  font-family: var(--mono);
  font-weight: 300;
  font-size: clamp(0.6rem, 1.35vw, 0.72rem);
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.18);
}

/* ─── Horizon line ──────────────────────────────────────────── */
.horizon-line {
  display: none;
}

/* ─── City zone — extends up past the midpoint, fades in ────── */
.city-zone {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62%;
  z-index: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 18%, black 40%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 18%, black 40%);
}

.city-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: #080510;
  /* Placeholder city-light glow — replaced when a real photo is set */
  background-image:
    radial-gradient(ellipse 22% 18% at 28% 88%, rgba(255, 210, 90, 0.07)  0%, transparent 100%),
    radial-gradient(ellipse 18% 14% at 55% 92%, rgba(255, 190, 110, 0.06) 0%, transparent 100%),
    radial-gradient(ellipse 14% 12% at 78% 85%, rgba(200, 160, 255, 0.05) 0%, transparent 100%),
    radial-gradient(ellipse 90% 55% at 50% 100%, rgba(12, 5, 28, 0.55)    0%, transparent 100%);
  background-size: cover;
  background-position: center top;
}

.city-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(5, 3, 13, 0.12) 40%,
    rgba(5, 3, 13, 0.48) 100%
  );
}

/* ─── Intro overlay ─────────────────────────────────────────── */
#intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #05030d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  cursor: pointer;
}

.intro-name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3rem, 10vw, 7rem);
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.05em;
  text-shadow: 0 0 40px rgba(232, 168, 53, 0.25);
}

.intro-hint {
  font-family: var(--mono);
  font-weight: 300;
  font-size: clamp(0.55rem, 1.4vw, 0.7rem);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

/* ─── Camera shutter flash ──────────────────────────────────── */
.flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 99;
}

/* ─── Audio controls ────────────────────────────────────────── */
#audioControls {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: none; /* hidden until intro is dismissed */
  align-items: center;
  gap: 0.75rem;
}

#volumeSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.2s;
}

#volumeSlider::-webkit-slider-thumb:hover {
  background: rgba(255, 255, 255, 0.9);
}

#volumeSlider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

#muteBtn {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

#muteBtn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

#muteBtn svg {
  width: 100%;
  height: 100%;
}

/* ─── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .digits {
    text-shadow: 0 0 18px rgba(232, 168, 53, 0.45) !important;
    animation: none !important;
  }
  .horizon-line {
    opacity: 1 !important;
  }
}
