/* Atom Aid Live! — one page, four states (before / live / after / closed), chosen by app.js from the clock. */
:root {
  color-scheme: light;
  --navy: #21447B;
  --navy-deep: #16305a;
  --sky: #C7DBFF;
  --orange: #F28C28;
  --live: #d92d20;
  --ink: #1b2a44;
  --muted: #4a5a75;
  --card: rgba(255, 255, 255, 0.82);
  --card-edge: rgba(33, 68, 123, 0.14);
  --radius: 18px;
  --font: "Poppins", "Mulish", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  background-color: #eef3fb;
  background-image:
    linear-gradient(rgba(244, 248, 255, 0.80), rgba(244, 248, 255, 0.86)),
    url("assets/bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.55;
  background: transparent;
}

a { color: var(--navy); }
a:hover { color: var(--navy-deep); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.preview-notice {
  margin: 0;
  padding: 8px 16px;
  background: #fff4d6;
  border-bottom: 1px solid #f0d58a;
  color: #6b4e00;
  font-size: 0.85rem;
  text-align: center;
}

.wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 16px 56px;
}

/* ---- masthead ---- */
.masthead { text-align: center; margin-bottom: 32px; }

.wordmark {
  margin: 0;
  font-size: clamp(2.6rem, 9vw, 4.75rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-transform: uppercase;
}
.wordmark span { color: var(--orange); }

.tagline {
  margin: 12px 0 0;
  font-size: clamp(1.05rem, 3.2vw, 1.3rem);
  font-weight: 600;
  color: var(--navy);
}

.when { margin: 14px 0 0; font-size: 1rem; font-weight: 600; color: var(--ink); }
.when-local { margin: 2px 0 0; font-size: 0.9rem; color: var(--muted); }

/* ---- panels: only the current state's panel shows ---- */
.panel {
  display: none;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(22, 48, 90, 0.10);
  backdrop-filter: blur(6px);
}
body[data-state="before"] .state-before,
body[data-state="live"]   .state-live,
body[data-state="after"]  .state-after,
body[data-state="closed"] .state-closed { display: block; }

.panel h2 {
  margin: 0 0 18px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}
.panel p { margin: 0 auto; max-width: 56ch; }

/* ---- countdown: big tabular digits, legible on a phone at arm's length ---- */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}
.countdown[hidden] { display: none; }
.unit {
  background: #fff;
  border: 1px solid var(--card-edge);
  border-radius: 14px;
  padding: 14px 4px 10px;
}
.num {
  display: block;
  font-size: clamp(2rem, 9vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}
.lbl {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- live ---- */
.dot {
  display: inline-block;
  width: 0.7em; height: 0.7em;
  margin-right: 0.45em;
  border-radius: 50%;
  background: var(--live);
  vertical-align: -0.05em;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pending { color: var(--muted); }

/* ---- actions ---- */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 0;
}
.actions:empty { display: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  min-width: 200px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--navy);
  transition: background-color .15s, color .15s, transform .15s;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.btn-secondary { background: #fff; color: var(--navy); }
.btn-secondary:hover { background: var(--sky); color: var(--navy-deep); }
.btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.gb-widget { margin-top: 24px; }
.gb-widget[hidden] { display: none; }

/* ---- about + credits ---- */
.about {
  margin: 36px auto 0;
  max-width: 62ch;
  text-align: center;
  font-size: 1.02rem;
}
.about p { margin: 0; }

.credits { margin-top: 40px; text-align: center; color: var(--muted); font-size: 0.95rem; }
.presented { margin: 0 0 18px; }
.presented a { font-weight: 700; }
.partners-label { margin: 0 0 8px; }
.partners {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
}
.partners a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--card-edge);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.partners a:hover { background: #fff; }

@media (max-width: 480px) {
  .wrap { padding-top: 32px; }
  .countdown { gap: 6px; }
  .unit { padding: 10px 2px 8px; border-radius: 10px; }
  .lbl { font-size: 0.65rem; letter-spacing: 0.04em; }
  .btn { width: 100%; }
}
