/* yviptv.com: the app's lime on graphite, with Archivo condensed for headlines like a printed
   TV listing. The hero's guide (home.html) is the one loud thing; everything else stays quiet. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --graphite: #0c0d0c;
  --slate: #161816;
  --slate-2: #202320;
  --ink: #eef0ec;
  --fog: #8f948c;
  --lime: #c5f04a;
  --on-lime: #162000;
  --lime-shade: #2b321c;
  --rule: rgba(255, 255, 255, 0.07);
  --gutter: 16px;
  --wide: 1180px;
  --space: 112px;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; --space: 160px; }
}

* { box-sizing: border-box; }

html { color-scheme: dark; background: var(--graphite); }

body {
  margin: 0;
  background: var(--graphite);
  color: var(--fog);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

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

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

/* Headlines: condensed and heavy. */
h1, h2 { color: var(--ink); font-stretch: 70%; font-weight: 780; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: clamp(48px, 15.4vw, 138px); line-height: 0.94; margin: 0; }
h2 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1; margin: 0 0 18px; }
p { margin: 0 0 14px; }

/* MARK: Navigation and footer */

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; padding-top: 22px; padding-bottom: 22px; }
.site-nav .home { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); font-weight: 650; font-size: 17px; text-decoration: none; }
.site-nav .home img { width: 34px; height: 34px; border-radius: 22%; }
.site-nav a:not(.home) { color: var(--fog); text-decoration: none; font-size: 16px; }
.site-nav a:not(.home):hover, .site-nav a[aria-current] { color: var(--ink); }
@media (max-width: 380px) {
  .site-nav .home { flex-basis: 100%; }
}

.site-footer { margin-top: var(--space); padding-bottom: 48px; color: var(--fog); font-size: 14px; line-height: 1.5; }
.site-footer::before { content: ""; display: block; height: 1px; margin-bottom: 28px; background: var(--rule); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 14px; }
.site-footer nav a { color: var(--fog); text-decoration: none; font-size: 15px; }
.site-footer nav a:hover { color: var(--ink); }
.site-footer p { margin: 0 0 6px; max-width: 72ch; }

/* MARK: Text pages (support, privacy policy, terms, licenses) */

.page { max-width: 720px; margin: 0 auto; padding: 24px var(--gutter) 0; }
.page h1 { font-size: clamp(48px, 9vw, 76px); margin: 28px 0 20px; }
.page h2 { font-size: 27px; font-stretch: 78%; font-weight: 720; letter-spacing: 0; margin: 40px 0 8px; }
.page ul { margin: 0 0 14px; padding-left: 20px; }
.page li { margin-bottom: 8px; }
.page strong { color: var(--ink); font-weight: 620; }
.page .component p { margin-bottom: 6px; overflow-wrap: anywhere; }
.page .component .meta, .page .component .note { color: var(--fog); font-size: 16px; }

/* MARK: Home */

.hero { display: grid; gap: 28px; padding-top: 40px; }
.lede { max-width: 33em; color: var(--ink); font-size: clamp(19px, 2vw, 22px); line-height: 1.5; margin: 0; }
.availability { display: flex; align-items: flex-start; gap: 10px; color: var(--fog); font-size: 17px; margin: 0; }
.availability::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: calc(0.8em - 4.5px); border-radius: 50%; background: var(--lime); }
.hero .guide { margin-top: 36px; }
.hero-phone { margin: 20px 0 0; width: min(300px, 76vw); }

/* Wide: the phone stands on the guide's right end, beside the headline and text. */
@media (min-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr) 320px; column-gap: 0; }
  .hero > * { grid-column: 1; }
  .hero > .guide { grid-column: 1 / -1; grid-row: 4; }
  .hero > .hero-phone { grid-column: 2; grid-row: 1 / 5; align-self: end; position: relative; z-index: 1; width: 100%; margin: 0 0 -88px; }
}

/* A phone: the screenshot in a thin bezel. */
.phone { display: block; padding: 7px; border-radius: 44px; background: #1b1e1b; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 30px 60px rgba(0, 0, 0, 0.55); }
.phone img, .phone video { display: block; width: 100%; height: auto; border-radius: 37px; }

/* MARK: The guide in the hero, drawn by the script in home.html. */

.guide { --channel: 104px; --row: 58px; position: relative; isolation: isolate; display: none; padding-top: 34px; user-select: none; }
.js .guide { display: block; }
.guide-times { position: absolute; top: 0; left: var(--channel); right: 0; height: 34px; overflow: hidden; }
.guide-tick { position: absolute; top: 6px; color: var(--fog); font-size: 13px; font-stretch: 85%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.guide-row { position: relative; display: flex; height: var(--row); border-top: 1px solid var(--rule); }
.guide-row:last-child { border-bottom: 1px solid var(--rule); }
.guide-channel { flex: none; width: var(--channel); padding-right: 12px; align-self: center; color: var(--ink); font-size: 15px; font-stretch: 78%; font-weight: 650; line-height: 1.15; }
.guide-track { position: relative; flex: 1; overflow: hidden; }
.guide-show { position: absolute; top: 6px; bottom: 6px; padding: 7px 10px; border-radius: 10px; background: var(--slate); overflow: hidden; white-space: nowrap; }
.guide-show.is-now { background: var(--lime-shade); }
/* Above the line for now, which passes behind the titles. */
.guide-show b, .guide-show span { position: relative; z-index: 2; }
.guide-show b { display: block; color: var(--ink); font-size: 14.5px; font-stretch: 85%; font-weight: 620; overflow: hidden; text-overflow: ellipsis; }
.guide-show span { display: block; color: var(--fog); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.guide-now { position: absolute; z-index: 1; top: 4px; bottom: 0; left: var(--channel); width: 0; pointer-events: none; transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.1, 1); }
.guide-now::after { content: ""; position: absolute; top: 26px; bottom: 0; left: -1px; width: 2px; background: var(--lime); }
.guide-now span { position: absolute; z-index: 3; top: 0; transform: translateX(-50%); padding: 1px 8px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (min-width: 720px) {
  .guide { --channel: 150px; --row: 66px; }
  .guide-channel { font-size: 16.5px; }
  .guide-show b { font-size: 15.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-now { transition: none; }
}

/* MARK: Screens */

.screens { margin-top: var(--space); }
.screens > p { max-width: 36em; }
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: min(68vw, 260px); gap: 20px; margin: 36px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 12px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); }
.shots li { scroll-snap-align: start; }
.shots figure { margin: 0; }
.shots figcaption { margin-top: 14px; color: var(--ink); font-size: 19px; font-stretch: 80%; font-weight: 650; line-height: 1.25; }
.also { margin-top: 28px; max-width: 46em; }

@media (min-width: 980px) {
  .shots { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 300px)); gap: 56px; margin-left: 0; margin-right: 0; padding: 0; overflow: visible; }
}

/* MARK: What goes in, and where it plays: two panes under the hero, the TV one in lime. */

.ends { display: grid; gap: 20px; margin-top: var(--space); }
.pane { display: flex; flex-direction: column; padding: clamp(26px, 4vw, 44px); border-radius: 28px; background: var(--slate); }
.pane h2 { font-size: clamp(34px, 4.4vw, 52px); }
.pane > p { max-width: 30em; margin: 0; }
/* At the foot of the pane, so the two notes line up side by side. */
.pane .pane-note { margin-top: auto; padding-top: 24px; font-size: 15px; }
.pane-tv { background: var(--lime-shade); color: #b9beb4; }
.marks { display: grid; gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; }
.marks li { display: grid; grid-template-columns: 54px 1fr; gap: 16px; align-items: center; }
.marks svg { width: 54px; height: 54px; padding: 14px; border-radius: 16px; background: var(--graphite); color: var(--lime);
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.marks svg .fill { fill: currentColor; stroke: none; }
.marks span { font-size: 16px; line-height: 1.4; }
.marks b { display: block; color: var(--ink); font-size: 23px; font-stretch: 75%; font-weight: 720; line-height: 1.2; }

.tv-menu { margin: 28px 0 0; }
.tv-menu img { display: block; width: min(100%, 340px); height: auto; margin: 0 auto; filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.4)); }

@media (min-width: 900px) {
  .ends { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* MARK: Plans, set like a listing */

.plans { margin-top: var(--space); }
.plan-table { width: 100%; max-width: 860px; margin: 30px 0 22px; border-collapse: collapse; }
.plan-table th, .plan-table td { padding: 18px 20px 18px 0; border-top: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.plan-table tr:last-child > * { border-bottom: 1px solid var(--rule); }
.plan-table th { color: var(--ink); font-size: clamp(26px, 3.4vw, 34px); font-stretch: 72%; font-weight: 760; white-space: nowrap; }
.plan-table .price { color: var(--ink); font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plans > p { max-width: 44em; font-size: 16px; }

@media (max-width: 640px) {
  .plan-table tr { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 16px; padding: 16px 0; border-top: 1px solid var(--rule); }
  .plan-table tr:last-child { border-bottom: 1px solid var(--rule); }
  .plan-table th, .plan-table td, .plan-table tr:last-child > * { padding: 0; border: 0; }
  .plan-table td:last-child { grid-column: 1 / -1; padding-top: 4px; }
}

/* MARK: Privacy */

.privacy { margin-top: var(--space); }
.privacy p { max-width: 36em; color: var(--ink); font-size: clamp(19px, 2vw, 22px); line-height: 1.5; }
