/*
 * Adless site styles.
 *
 * Tokens are copied from apps/mobile/src/theme/tokens.ts on purpose rather than
 * generated: the site ships independently of the app, and a build step that couples
 * a static page to a React Native package would be the tail wagging the dog. If the
 * brand colours move, they move in both files, and docs/18 is the source of truth
 * for both.
 *
 * Dark only. The product is a television app that is used in the dark; a light
 * variant of this page would describe something the reader is not going to see.
 */

:root {
  --ink-900: #0b0e13;
  --ink-800: #12161f;
  --ink-700: #1b212c;
  --ink-600: #28303d;
  --teal-400: #33f2cb;
  --teal-500: #00d8a7;
  --text-hi: #f4f7fa;
  --text-mid: #b4becc;
  --text-low: #8a94a6;
  --live: #ff4d5e;

  --measure: 34rem;
  --gap: clamp(1rem, 2.5vw, 1.75rem);
  --edge: clamp(1.25rem, 5vw, 3rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text-mid);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  color: var(--text-hi);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
}

h2 {
  font-size: clamp(1.375rem, 1.15rem + 1.1vw, 1.75rem);
}

h3 {
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  max-width: var(--measure);
}

a {
  color: var(--teal-500);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--teal-400);
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--text-hi);
  background: var(--ink-700);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--edge);
}

/* Header ------------------------------------------------------------------ */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding-block: clamp(1.25rem, 3vw, 2rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-hi);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  font-size: 1.125rem;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: block;
}

.brand span {
  color: var(--text-low);
  font-weight: 400;
}

.masthead nav {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.5rem);
  font-size: 0.9375rem;
}

.masthead nav a {
  color: var(--text-low);
  text-decoration: none;
}

.masthead nav a:hover {
  color: var(--text-hi);
}

/* Hero -------------------------------------------------------------------- */

.hero {
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--ink-700);
}

.hero p.lede {
  margin-top: 1.25rem;
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  max-width: 40rem;
  color: var(--text-mid);
}

.hero .fine {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-low);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-500);
  border: 1px solid var(--ink-600);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1.5rem;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-500);
}

/* Sections ---------------------------------------------------------------- */

section {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--ink-700);
}

section > h2 + p,
section > h2 + .grid {
  margin-top: 1.25rem;
}

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin-top: 2rem;
}

.card {
  background: var(--ink-800);
  border: 1px solid var(--ink-700);
  border-radius: 12px;
  padding: clamp(1.1rem, 2vw, 1.5rem);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9375rem;
  color: var(--text-low);
}

/* Numbers ----------------------------------------------------------------- */

.figures {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  margin-top: 2rem;
}

.figure .n {
  display: block;
  color: var(--text-hi);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.figure p {
  font-size: 0.875rem;
  color: var(--text-low);
  margin-top: 0.35rem;
}

/* Price ------------------------------------------------------------------- */

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
}

.price .amount {
  color: var(--text-hi);
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.price .per {
  color: var(--text-low);
}

/* Lists ------------------------------------------------------------------- */

ul.plain {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  max-width: var(--measure);
  display: grid;
  gap: 0.7rem;
}

ul.plain li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--text-mid);
}

ul.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 1px;
  background: var(--teal-500);
}

/* Legal pages ------------------------------------------------------------- */

.doc {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 8vw, 6rem);
}

.doc h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
}

.doc .updated {
  color: var(--text-low);
  font-size: 0.9375rem;
  margin-top: 0.75rem;
}

.doc h2 {
  margin-top: clamp(2rem, 4vw, 3rem);
  font-size: 1.25rem;
}

.doc p,
.doc ul {
  margin-top: 1rem;
  max-width: 42rem;
}

.doc ul {
  padding-left: 1.15rem;
  display: grid;
  gap: 0.5rem;
}

.doc strong {
  color: var(--text-hi);
  font-weight: 600;
}

.callout {
  border-left: 2px solid var(--teal-500);
  background: var(--ink-800);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin-top: 1.5rem;
  max-width: 42rem;
}

.callout p {
  max-width: none;
  color: var(--text-mid);
}

/* Footer ------------------------------------------------------------------ */

footer {
  padding-block: clamp(2rem, 4vw, 3rem);
  color: var(--text-low);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

footer a {
  color: var(--text-low);
  text-decoration: none;
}

footer a:hover {
  color: var(--text-hi);
}

@media (prefers-reduced-motion: no-preference) {
  a {
    transition: color 120ms ease;
  }
}
