/* Waveband website. Same tokens as the TV app (src/theme.ts): night navy, paper white, red only for
   live things (the on-air dot and the dial needle). Fonts are served from here, nobody else's. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/Bricolage.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('fonts/AtkinsonNext.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('fonts/AtkinsonNextBold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --night: #0b1626;
  --panel: #14233a;
  --raised: #1f3352;
  --paper: #f3eee4;
  --mist: #9aa8bc;
  --tick: #4c5f80;
  --line: rgba(243, 238, 228, 0.16);
  --glass: rgba(243, 238, 228, 0.06);
  --on-air: #ff5a4f;
  --display: 'Bricolage Grotesque', 'Arial Black', sans-serif;
  --body: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --measure: 1180px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night);
}

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--paper);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto; /* keep the shape when the width shrinks (the tags carry width and height) */
  display: block;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
}
.wordmark::before {
  content: '';
  width: 0.3em;
  height: 0.3em;
  border-radius: 50%;
  background: var(--on-air);
  box-shadow: 0 0 0.35em var(--on-air);
}

.nav {
  display: flex;
  gap: 28px;
}
.nav a {
  color: var(--mist);
  text-decoration: none;
}
.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--paper);
}

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

.hero {
  position: relative;
  /* The app's own backdrop: the desk on the right, already faded into navy on the left and bottom. */
  background: var(--night) url('img/backdrop-desk.jpg') right top / cover no-repeat;
  overflow: hidden;
}
/* The app's backdrop: darker towards the left and bottom, where the words sit. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 22, 38, 0.55) 0%, rgba(11, 22, 38, 0) 55%),
    linear-gradient(0deg, var(--night) 0%, rgba(11, 22, 38, 0) 30%);
}
.hero > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  padding-top: clamp(40px, 9vw, 110px);
  padding-bottom: 36px;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
}
h1 {
  font-size: clamp(2.3rem, 7.4vw, 5.6rem);
  overflow-wrap: break-word;
  max-width: 13ch;
}
h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  max-width: 16ch;
}

.lead {
  max-width: 34rem;
  color: var(--mist);
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  margin: 24px 0 32px;
}

.soon {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  font-weight: 700;
}
.soon small {
  font-weight: 400;
  color: var(--mist);
  font-size: 1rem;
}

/* ------------------------------------------------------------------ the dial */

/* One tick per station, the taller ones every fifth, and the red needle: it sweeps up the band
   once when the page opens, like the app's opening screen. */
.dial {
  position: relative;
  height: 48px;
  margin-top: clamp(40px, 7vw, 80px);
  margin-bottom: clamp(28px, 4vw, 44px);
  background:
    repeating-linear-gradient(90deg, var(--paper) 0 2px, transparent 2px calc(100% / 8)) bottom / 100% 26px no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 2px, transparent 2px calc(100% / 40)) bottom / 100% 14px no-repeat;
}
.needle {
  position: absolute;
  bottom: -6px;
  width: 4px;
  height: 54px;
  border-radius: 2px;
  background: var(--on-air);
  box-shadow: 0 0 14px var(--on-air);
  left: 63%;
}
@media (prefers-reduced-motion: no-preference) {
  .needle {
    animation: tune 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.25s backwards;
  }
}
@keyframes tune {
  from {
    left: 3%;
  }
}

.shot {
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  background: var(--panel);
}

.hero-shot {
  padding-bottom: clamp(24px, 4vw, 48px);
}

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

.features {
  padding-top: clamp(40px, 8vw, 110px); /* top only: the sides come from .wrap */
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  margin-bottom: clamp(64px, 10vw, 128px);
}
.feature:nth-child(even) {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.feature:nth-child(even) .feature-copy {
  order: 2;
}
.feature p {
  color: var(--mist);
  margin: 20px 0 0;
  max-width: 30rem;
}

/* ------------------------------------------------------------------ plans */

.plans {
  border-top: 1px solid var(--line);
  padding: clamp(56px, 8vw, 100px) 0;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.plan {
  padding: 32px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--glass);
}
.plan h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin: 0;
}
.plan .price {
  color: var(--mist);
  margin: 6px 0 18px;
}
.plan ul {
  margin: 0;
  padding-left: 1.2em;
}
.plan li {
  margin: 6px 0;
}
.plan-plus {
  background: var(--raised);
  border-color: rgba(243, 238, 228, 0.28);
}
.fine {
  color: var(--mist);
  font-size: 1rem;
  margin-top: 20px;
}

/* ------------------------------------------------------------------ text pages */

.page {
  padding-top: clamp(24px, 5vw, 64px);
  padding-bottom: clamp(56px, 8vw, 100px);
  max-width: 820px;
}
.page h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  max-width: none;
}
.page .updated {
  color: var(--mist);
  margin: 12px 0 40px;
}
.page h2 {
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  max-width: none;
  margin: 44px 0 10px;
}
.page p,
.page li {
  max-width: 68ch;
}
.page ul {
  padding-left: 1.2em;
}

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

.foot {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  padding-bottom: 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  color: var(--mist);
  font-size: 1rem;
}
.foot nav {
  display: flex;
  gap: 24px;
}
.foot a {
  color: var(--mist);
}

/* ------------------------------------------------------------------ narrow screens */

@media (max-width: 760px) {
  .feature,
  .feature:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature:nth-child(even) .feature-copy {
    order: 0;
  }
  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .nav {
    gap: 18px;
  }
  .wordmark {
    font-size: 1.5rem;
  }
}

@media (max-width: 360px) {
  .bar {
    gap: 12px 20px;
  }
  .soon {
    border-radius: 18px;
  }
}
