/* TiviBuddy website. One dark "living room at night" look, like the app on Apple TV.
   Layout: a narrow reading column; the hero pairs the headline with a drawing of the app's Home screen. */
:root {
  --bg: #0f1216;          /* the app's dark background */
  --surface: #171c22;     /* cards, the phone screen */
  --raised: #212833;      /* tiles and chips */
  --line: #2c3440;
  --text: #f3f0ea;
  --muted: #a9b0ba;
  --amber: #ffc34d;       /* the app's accent: buttons, channel numbers */
  --on-amber: #1a1408;
  --blue: #8fd0ff;
  --green: #7cc77a;
  --rose: #e07c94;
  --display: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.1875rem;   /* 19px: big enough to read without glasses */
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--amber); text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
.brand img { width: 44px; height: 44px; border-radius: 11px; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-weight: 700; padding: 10px 16px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--raised); }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; padding-block: 72px 56px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--amber); }
.lead { font-size: 1.35rem; color: var(--muted); margin-top: 20px; max-width: 34ch; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; align-items: center; }
.button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 26px;
  background: var(--amber); color: var(--on-amber); border-radius: 18px; font-weight: 800; font-size: 1.15rem; text-decoration: none;
}
.button.quiet { background: var(--raised); color: var(--text); border: 2px solid var(--line); }
.platforms { margin-top: 18px; color: var(--muted); font-size: 1rem; }

/* A drawing of the app's Home screen (not a screenshot: no channel names, no provider content). */
.device {
  justify-self: center; width: min(360px, 100%); aspect-ratio: 9 / 18.5;
  background: #05070a; border-radius: 54px; padding: 14px; border: 2px solid #2b323d;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 10px #12161b;
}
.screen { height: 100%; background: #f6f1e7; border-radius: 42px; padding: 34px 18px 18px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; color: #15181d; }
.screen .q { font-family: var(--display); font-weight: 800; font-size: 1.45rem; line-height: 1.15; }
.screen .sub { font-size: 0.8rem; color: #5b6470; margin-top: -4px; }
.tile { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid #e3dccd; border-radius: 18px; padding: 12px; }
.tile i { width: 48px; height: 48px; border-radius: 13px; flex: none; display: grid; place-items: center; font-style: normal; font-size: 1.35rem; }
.tile b { display: block; font-family: var(--display); font-size: 1.15rem; line-height: 1.1; }
.tile span { font-size: 0.78rem; color: #5b6470; }

/* Sections */
section { padding-block: 64px; }
section + section { border-top: 1px solid var(--line); }
.kicker { color: var(--amber); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.85rem; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-top: 8px; max-width: 24ch; }
.intro { color: var(--muted); margin-top: 14px; max-width: 60ch; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; align-content: start; }
.feature h3 { font-size: 1.3rem; }
.feature p { color: var(--muted); font-size: 1.05rem; }
.chip { justify-self: start; display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--amber); color: var(--on-amber); font-weight: 800; font-variant-numeric: tabular-nums; }

/* The guide strip: TiviBuddy's own "Now / Next" line. */
.guide { margin-top: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.guide table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 1.05rem; }
.guide th, .guide td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide tr:last-child td { border-bottom: 0; }
.guide th { color: var(--muted); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; }
.guide .time { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.now { display: inline-block; background: var(--amber); color: var(--on-amber); font-weight: 800; border-radius: 8px; padding: 0 8px; margin-right: 8px; font-size: 0.85rem; }
.bar { height: 6px; border-radius: 3px; background: var(--raised); margin-top: 8px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--amber); }

.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; }
.steps li::before { content: counter(step); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 2px solid var(--amber); color: var(--amber); font-weight: 800; font-size: 1.3rem; }
.steps h3 { font-size: 1.25rem; }
.steps p { color: var(--muted); font-size: 1.05rem; }

.note { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-top: 32px; }
.note::before { content: "i"; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #08131c; font-weight: 800; font-family: var(--display); }

/* Reading pages: help and privacy */
.page .wrap { max-width: 780px; padding-block: 56px 72px; }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; }
.page .updated { color: var(--muted); margin-top: 10px; }
.page h2 { font-size: 1.6rem; margin-top: 44px; max-width: none; }
.page p, .page li { margin-top: 14px; }
.page ul { padding-left: 1.2em; margin: 0; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 22px; margin-top: 14px; }
details[open] { padding-bottom: 18px; }
summary { cursor: pointer; font-weight: 800; font-size: 1.2rem; padding-block: 18px; list-style-position: outside; }
details p { color: var(--muted); }
.mail { font-weight: 800; font-size: 1.25rem; user-select: all; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 1rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px; }
footer a { color: var(--text); }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; padding-block: 48px 40px; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .features, .steps { grid-template-columns: 1fr; }
  section { padding-block: 48px; }
}
@media (prefers-reduced-motion: no-preference) {
  .button { transition: transform 0.15s ease; }
  .button:hover { transform: translateY(-2px); }
}
