/* ==========================================================================
   PRESTONIC EVENTS — Teaser
   Design tokens
   Color:  --ink #060606 (background) / --paper #f3ede2 (text)
           --gold #b9975b (accent, muted antique gold, used sparingly)
           --gold-soft rgba(185,151,91,0.55) (hairlines / dividers)
   Type:   'Cormorant Garamond' — display serif, wide tracking, restraint
           'Inter' — utility sans for labels + tabular countdown digits
   ========================================================================== */

:root {
  --ink: #060606;
  --paper: #f3ede2;
  --paper-dim: rgba(243, 237, 226, 0.72);
  --gold: #b9975b;
  --gold-soft: rgba(185, 151, 91, 0.5);
  --overlay: rgba(4, 4, 4, 0.38);

  /* Real viewport height, corrected by JS for mobile browser chrome */
  --vh: 1vh;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   Stage
   ========================================================================== */

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  background: var(--ink) url('assets/poster.jpg') center center / cover no-repeat;
}

.stage__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Even, gentle darkening — keeps the footage visible */
.stage__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--overlay);
}

/* Slightly stronger falloff at the very top and bottom only,
   so text stays legible without flattening the whole frame */
.stage__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0) 22%,
    rgba(0, 0, 0, 0) 68%,
    rgba(0, 0, 0, 0.6) 100%
  );
  pointer-events: none;
}

/* ==========================================================================
   Content layout
   ========================================================================== */

.content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: max(7vh, env(safe-area-inset-top) + 28px) 24px max(env(safe-area-inset-bottom) + 20px, 22px);
  text-align: center;
}

.content__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vh, 52px);
  width: 100%;
  max-width: 560px;
}

/* ==========================================================================
   Logo
   ========================================================================== */

.logo {
  width: clamp(120px, 32vw, 190px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.35));
}

/* ==========================================================================
   Headline
   ========================================================================== */

.headline {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.headline__line {
  margin: 0;
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(15px, 4.1vw, 22px);
  letter-spacing: 0.16em;
  line-height: 1.5;
  color: var(--paper);
  text-transform: uppercase;
}

.headline__line:last-child {
  color: var(--gold);
  font-weight: 500;
}

/* ==========================================================================
   Countdown
   ========================================================================== */

.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 88px;
  justify-content: center;
}

.countdown__grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(10px, 3vw, 22px);
  transition: opacity 0.8s ease;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3ch;
}

.countdown__value {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 8vw, 46px);
  letter-spacing: 0.03em;
  color: var(--paper);
  line-height: 1.1;
}

.countdown__label {
  margin-top: 6px;
  font-size: clamp(9px, 2.1vw, 11px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper-dim);
  font-weight: 400;
}

.countdown__sep {
  font-family: 'Inter', sans-serif;
  font-weight: 200;
  font-size: clamp(22px, 6vw, 38px);
  color: var(--gold-soft);
  align-self: center;
  transform: translateY(-2px);
}

.countdown__arrived {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(20px, 5vw, 30px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
  opacity: 0;
  animation: arrive 1.4s ease forwards;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.content__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 4vh;
}

.footer__mark {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--paper-dim);
  text-transform: uppercase;
}

.footer__social {
  color: var(--paper-dim);
  opacity: 0.7;
  display: inline-flex;
  padding: 8px;
  transition: opacity 0.4s ease, color 0.4s ease;
}

.footer__social:hover,
.footer__social:focus-visible {
  color: var(--gold);
  opacity: 1;
}

.footer__social:focus-visible {
  outline: 1px solid var(--gold-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--gold-soft);
  outline-offset: 3px;
}


/* ==========================================================================
   Sound toggle
   ========================================================================== */

.sound-toggle {
  position: absolute;
  z-index: 4;
  top: max(18px, env(safe-area-inset-top) + 12px);
  right: max(18px, env(safe-area-inset-right) + 12px);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: rgba(6, 6, 6, 0.48);
  color: var(--paper);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  background: rgba(6, 6, 6, 0.72);
  border-color: var(--gold);
  color: var(--gold);
}

.sound-toggle:active {
  transform: scale(0.97);
}

.sound-toggle__icon {
  font-size: 14px;
  line-height: 1;
}

.sound-toggle.is-on {
  border-color: var(--gold);
  color: var(--gold);
}

@media (max-width: 480px) {
  .sound-toggle {
    top: max(12px, env(safe-area-inset-top) + 8px);
    right: max(12px, env(safe-area-inset-right) + 8px);
    min-height: 38px;
    padding: 8px 11px;
    font-size: 9px;
    gap: 7px;
  }
}

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

/* ==========================================================================
   Reveal animations — slow, staggered, opacity + gentle rise
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal--1 { animation-delay: 0.3s; }
.reveal--2 { animation-delay: 0.9s; }
.reveal--3 { animation-delay: 1.5s; }
.reveal--4 { animation-delay: 2.1s; }
.reveal--5 { animation-delay: 2.4s; }

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .countdown__arrived {
    animation: none;
    opacity: 1;
  }
}

/* ==========================================================================
   Small phones — tighten spacing further
   ========================================================================== */

@media (max-width: 360px) {
  .countdown__grid {
    gap: 8px;
  }
  .headline__line {
    letter-spacing: 0.12em;
  }
}

/* ==========================================================================
   Desktop / larger viewports
   ========================================================================== */

@media (min-width: 900px) {
  .content {
    padding: 6vh 40px 5vh;
  }
  .content__inner {
    max-width: 680px;
    gap: 56px;
  }
  .logo {
    width: 210px;
  }
}

/* Landscape phones — the tallest single risk on mobile web: keep the stack
   compact so nothing is clipped when height is scarce */
@media (max-height: 480px) and (orientation: landscape) {
  .content__inner {
    gap: 18px;
  }
  .logo {
    width: 96px;
  }
  .content__footer {
    padding-top: 1.5vh;
  }
}
