:root {
  --cream: #f4ebe3;
  --peach: #e8a07a;
  --ink: #f7f1ea;
  --muted: rgba(247, 241, 234, 0.72);
  --glass: rgba(12, 16, 28, 0.42);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  height: 100%;
  background: #05070d;
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  overflow-x: hidden;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #05070d;
}

.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  pointer-events: none;
}

.bg-still { opacity: 1; }
.bg-motion {
  opacity: 0;
  animation: crossfade 18s ease-in-out infinite;
}

@keyframes crossfade {
  0%, 40% { opacity: 0; transform: scale(1.02); }
  50%, 90% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-motion { display: none; animation: none; }
}

.veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 72% 40%, transparent 0%, rgba(5, 7, 13, 0.28) 50%, rgba(5, 7, 13, 0.7) 100%),
    linear-gradient(180deg, rgba(5, 7, 13, 0.2) 0%, transparent 30%, rgba(5, 7, 13, 0.62) 78%, rgba(5, 7, 13, 0.82) 100%);
}

.content {
  position: relative;
  z-index: 1;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  padding-bottom: max(2rem, env(safe-area-inset-bottom) + 1.5rem);
  max-width: 40rem;
}

.brand {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--peach);
  margin-bottom: 0.85rem;
  font-weight: 600;
}

.headline {
  white-space: normal;

  font-weight: 500;
  font-size: clamp(1.85rem, 7.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.sub {
  margin-top: 0.75rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 2.6vw, 1.15rem);
  color: var(--muted);
  font-weight: 400;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(3.4rem, 1fr));
  gap: 0.55rem;
  margin-top: 1.75rem;
  width: min(100%, 22rem);
}

.unit {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.85rem;
  padding: 0.7rem 0.35rem 0.55rem;
  text-align: center;
}

.num {
  display: block;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.1;
}

.lbl {
  display: block;
  margin-top: 0.2rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.date {
  margin-top: 0.9rem;
  width: min(100%, 22rem); /* match .countdown so it sits centered under the clock */
  text-align: center;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .bg {
    object-position: center 22%;
  }
  .veil {
    background:
      radial-gradient(ellipse 90% 60% at 50% 30%, transparent 0%, rgba(5, 7, 13, 0.25) 45%, rgba(5, 7, 13, 0.75) 100%),
      linear-gradient(180deg, rgba(5, 7, 13, 0.15) 0%, transparent 25%, rgba(5, 7, 13, 0.72) 68%, rgba(5, 7, 13, 0.9) 100%);
  }
  .content {
    align-items: center;
    text-align: center;
    justify-content: flex-end;
  }

  /* Local scrim behind type (GTM mobile ~390 contrast nit) */
  .content::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(120%, 28rem);
    height: min(58%, 22rem);
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 70% at 50% 75%,
      rgba(5, 7, 13, 0.88) 0%,
      rgba(5, 7, 13, 0.55) 45%,
      transparent 72%);
  }

  .headline, .sub, .date {
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
  }
  .unit {
    background: rgba(12, 16, 28, 0.62);
  }
  .countdown { width: 100%; }
}

.sub[hidden] { display: none; }
