/* 24seven.fm — plain HTML site, no build step.
   Dark is the brand default; light theme via [data-theme] or system preference. */

:root {
  --bg: #02054b;
  --bg-glow: #171d8a;
  --card: #0b0f63;
  --text: #f2f3ff;
  --muted: #b8bdf0;
  --accent: #8f94ff;
  --link: #a9c8ff;
  --border: rgba(109, 101, 236, 0.45);
  --glow: rgba(109, 101, 236, 0.35);
  --badge-invert: 0;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6ff;
    --bg-glow: #dfe2ff;
    --card: #ffffff;
    --text: #14184f;
    --muted: #43497e;
    --accent: #3d43cf;
    --link: #2f35b9;
    --border: rgba(61, 67, 207, 0.35);
    --glow: rgba(61, 67, 207, 0.22);
    --badge-invert: 1;
    color-scheme: light;
  }
}

:root[data-theme="dark"] {
  --bg: #02054b;
  --bg-glow: #171d8a;
  --card: #0b0f63;
  --text: #f2f3ff;
  --muted: #b8bdf0;
  --accent: #8f94ff;
  --link: #a9c8ff;
  --border: rgba(109, 101, 236, 0.45);
  --glow: rgba(109, 101, 236, 0.35);
  --badge-invert: 0;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f6ff;
  --bg-glow: #dfe2ff;
  --card: #ffffff;
  --text: #14184f;
  --muted: #43497e;
  --accent: #3d43cf;
  --link: #2f35b9;
  --border: rgba(61, 67, 207, 0.35);
  --glow: rgba(61, 67, 207, 0.22);
  --badge-invert: 1;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(90rem 60rem at 70% -20%, var(--bg-glow), transparent 60%),
    var(--bg);
  font-size: clamp(1rem, 0.3vw + 0.95rem, 1.125rem);
  line-height: 1.65;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(68rem, 100% - 3rem);
  margin-inline: auto;
}

/* ---------- header ---------- */

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0;
}

.wordmark {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  text-shadow: 0 0 24px var(--glow);
}
.wordmark span { color: var(--accent); }

header.site nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}
header.site nav a { text-decoration: none; }
header.site nav a:hover { text-decoration: underline; }

#theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}
#theme-toggle:hover { background: var(--card); }

/* ---------- hero ---------- */

.hero {
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem);
  text-align: center;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.2rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 auto;
  max-width: 18ch;
  text-wrap: balance;
  text-shadow: 0 0 60px var(--glow);
}

/* Crossfading headline phrases — CSS only. Each phrase is visible for ~4s
   with 1s fades, on a 25s cycle (5 phrases x 5s), staggered via delays. */
.rotator { position: relative; }
.rotator .sizer { visibility: hidden; }
.rotator .phrase {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: headline-xfade 25s linear infinite both;
}
.rotator .phrase:nth-child(2) { animation-delay: -1s; }
.rotator .phrase:nth-child(3) { animation-delay: 4s; }
.rotator .phrase:nth-child(4) { animation-delay: 9s; }
.rotator .phrase:nth-child(5) { animation-delay: 14s; }
.rotator .phrase:nth-child(6) { animation-delay: 19s; }

/* Fade fully out before the next phrase fades in (no mid-air text overlap):
   each 5s slot (20% of the 25s cycle) = 1s in, 3s hold, 1s out. */
@keyframes headline-xfade {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  16%  { opacity: 1; }
  20%  { opacity: 0; }
  100% { opacity: 0; }
}

.hero .lead {
  color: var(--muted);
  max-width: 46ch;
  margin: 1.4rem auto 0;
  text-wrap: pretty;
}

.store {
  margin-top: 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
.store .fineprint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.store img { display: block; }

.stations {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
}
.stations a {
  display: inline-block;
  padding: 0.35rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: color-mix(in srgb, var(--card) 55%, transparent);
}
.stations a:hover {
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--glow);
}

/* ---------- screenshot filmstrip ---------- */

.filmstrip {
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.filmstrip ul {
  display: flex;
  gap: clamp(0.25rem, 0.8vw, 0.6rem);
  margin: 0;
  padding: 1.5rem max(calc((100vw - 68rem) / 2), 1.5rem) 2.5rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.filmstrip li {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.filmstrip img {
  display: block;
  width: min(19rem, 74vw);
  height: auto;
  border-radius: 1.4rem;
  border: 1px solid var(--border);
  box-shadow:
    0 24px 55px var(--glow),
    0 4px 14px rgba(0, 0, 0, 0.35);
}

.filmstrip .hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- features ---------- */

.features {
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.features h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 2.2rem;
}

.features ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li {
  background: color-mix(in srgb, var(--card) 70%, transparent);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.3rem 1.4rem;
}

.features h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--accent);
}

.features p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
}

/* ---------- prose pages (privacy, support) ---------- */

main.prose {
  flex: 1;
  padding: clamp(2rem, 6vw, 4rem) 0;
}
main.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  text-shadow: 0 0 40px var(--glow);
}
main.prose h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 2.2rem 0 0.4rem;
  color: var(--accent);
}
main.prose p { max-width: 60ch; color: var(--muted); }
main.prose strong { color: var(--text); }
main.prose .updated {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- footer ---------- */

footer.site {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 1.6rem 0 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}
footer.site .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  align-items: baseline;
  justify-content: space-between;
}
footer.site nav {
  display: flex;
  gap: 1.2rem;
  font-weight: 600;
}
footer.site p { margin: 0.6rem 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rotator .phrase { animation: none; }
  .rotator .phrase:nth-child(2) { opacity: 1; }
}
