/* tvOS Browser site. No build step, no external resources. */

:root {
  --bg: #07080c;
  --bg-raised: #0e1118;
  --text: #f5f6f8;
  --text-muted: #a3a9b6;
  --text-faint: #6f7684;
  --accent: #4f9bff;
  --accent-strong: #2f7df6;
  --accent-glow: rgba(79, 155, 255, 0.35);
  --green: #34c77b;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.12);
  --radius: 22px;
  --radius-small: 12px;
  --max-width: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Soft colour glows behind the page, like the tvOS home screen. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 45vw at 15% -10%, rgba(79, 155, 255, 0.18), transparent 70%),
    radial-gradient(50vw 40vw at 95% 10%, rgba(155, 92, 255, 0.14), transparent 70%),
    radial-gradient(60vw 50vw at 50% 110%, rgba(52, 199, 123, 0.08), transparent 70%);
  pointer-events: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 750;
}

h3 {
  font-size: 1.3rem;
  font-weight: 650;
}

p {
  margin: 0 0 1em;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.88em;
}

kbd,
:not(pre) > code {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

.container {
  width: min(var(--max-width), 100% - 48px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
}

/* ---------- Glass ---------- */

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

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

.site-header {
  position: sticky;
  top: 12px;
  z-index: 50;
  margin-top: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 14px 10px 18px;
  border-radius: 999px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--glass-strong);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--text);
  padding: 8px;
  cursor: pointer;
}

.nav-toggle svg {
  width: 26px;
  height: 26px;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1.02rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.button svg {
  width: 20px;
  height: 20px;
}

.button-primary {
  background: linear-gradient(180deg, #5aa4ff, var(--accent-strong));
  color: #fff;
  box-shadow: 0 10px 30px var(--accent-glow);
}

.button-primary:hover {
  box-shadow: 0 14px 40px var(--accent-glow);
}

.button-secondary {
  background: var(--glass-strong);
  border-color: var(--glass-border);
  color: var(--text);
}

.button-small {
  padding: 8px 16px;
  font-size: 0.92rem;
}

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

.hero {
  padding: clamp(56px, 9vw, 110px) 0 40px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 26px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.hero h1 .gradient,
.gradient-text {
  background: linear-gradient(90deg, #8cc2ff, #b49bff 55%, #6ee7b7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  max-width: 720px;
  margin: 0 auto 34px;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-badges svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.hero-shot {
  margin: 56px auto 0;
  max-width: 1100px;
}

/* ---------- Screenshots ---------- */

.screen {
  margin: 0;
  padding: 10px;
  border-radius: 28px;
}

.screen img {
  width: 100%;
  border-radius: 19px;
}

.screen figcaption {
  padding: 12px 8px 4px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}

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

.section {
  padding: clamp(64px, 10vw, 120px) 0;
}

.section-head {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.15rem;
}

.kicker {
  display: block;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker.green {
  color: var(--green);
}

.kicker.purple {
  color: #b49bff;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.feature + .feature {
  margin-top: clamp(80px, 12vw, 140px);
}

.feature.reverse .feature-copy {
  order: 2;
}

.feature-copy p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.checklist {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding: 0 0 14px 34px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.checklist strong {
  color: var(--text);
}

.checklist span {
  color: var(--text-muted);
}

.stat {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 20px;
  border-radius: var(--radius-small);
}

.stat b {
  font-size: 2rem;
  line-height: 1;
}

.stat span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Cards grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card {
  padding: 26px;
}

.card .icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(79, 155, 255, 0.35), rgba(79, 155, 255, 0.12));
  color: #cfe3ff;
}

.card .icon svg {
  width: 24px;
  height: 24px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.shots-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 40px;
}

/* ---------- Remote table ---------- */

.remote {
  padding: 8px;
  max-width: 860px;
  margin: 0 auto;
}

.remote table {
  width: 100%;
  border-collapse: collapse;
}

.remote th,
.remote td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
}

.remote th {
  width: 42%;
  font-weight: 600;
}

.remote tr + tr th,
.remote tr + tr td {
  border-top: 1px solid var(--glass-border);
}

.remote td {
  color: var(--text-muted);
}

/* ---------- Free block ---------- */

.free {
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(79, 155, 255, 0.22), transparent 70%),
    var(--glass);
}

.free p {
  max-width: 640px;
  margin: 0 auto 30px;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.free .hero-actions {
  margin-top: 8px;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 860px;
  margin: 0 auto;
}

.faq details {
  padding: 0 24px;
  margin-bottom: 12px;
}

.faq summary {
  position: relative;
  padding: 20px 36px 20px 0;
  font-weight: 600;
  font-size: 1.08rem;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq details p {
  margin: 0;
  padding: 0 0 20px;
  color: var(--text-muted);
}

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

.site-footer {
  padding: 56px 0 64px;
  border-top: 1px solid var(--glass-border);
  color: var(--text-faint);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.site-footer h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 0.95rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 8px;
}

.site-footer a {
  color: var(--text-muted);
}

.fineprint {
  margin-top: 40px;
  font-size: 0.85rem;
}

/* ---------- Install guide ---------- */

.page-intro {
  padding: clamp(48px, 8vw, 90px) 0 40px;
  text-align: center;
}

.page-intro p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.guide {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 100px;
}

.toc {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.toc h2 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.progress {
  height: 4px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--glass-strong);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 0.3s ease;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li a {
  display: flex;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.35;
}

.toc li a:hover {
  color: var(--text);
  background: var(--glass);
  text-decoration: none;
}

.toc li a.active {
  color: var(--text);
  background: var(--glass-strong);
}

.toc .num {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--glass-strong);
  font-size: 0.75rem;
  font-weight: 700;
}

.toc li a.active .num,
.toc li a.done .num {
  background: var(--accent);
  color: #fff;
}

.toc .divider {
  height: 1px;
  margin: 10px 0;
  background: var(--glass-border);
}

.step {
  padding: clamp(24px, 4vw, 40px);
  margin-bottom: 22px;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.step-number {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(180deg, #5aa4ff, var(--accent-strong));
  font-size: 1.3rem;
  font-weight: 800;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.step-number.plain {
  background: var(--glass-strong);
  box-shadow: none;
}

.step-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.step-time {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--glass-strong);
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.step p,
.step li {
  color: var(--text-muted);
}

.step strong {
  color: var(--text);
}

.step ol,
.step ul {
  padding-left: 1.3em;
}

.step li {
  margin-bottom: 8px;
}

.step .screen {
  margin-top: 22px;
}

.callout {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-small);
  background: rgba(79, 155, 255, 0.1);
  border: 1px solid rgba(79, 155, 255, 0.28);
  color: #cfe3ff;
  font-size: 0.97rem;
}

.callout.warn {
  background: rgba(255, 196, 0, 0.08);
  border-color: rgba(255, 196, 0, 0.3);
  color: #ffe9a8;
}

.callout svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.option {
  padding: 20px;
  border-radius: var(--radius-small);
  background: var(--glass);
  border: 1px solid var(--glass-border);
}

.option h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.option p {
  font-size: 0.95rem;
}

/* ---------- Code blocks ---------- */

.code {
  position: relative;
  margin: 16px 0 0;
}

.code pre {
  margin: 0;
  padding: 18px 20px;
  padding-right: 92px;
  overflow-x: auto;
  border-radius: var(--radius-small);
  background: #05060a;
  border: 1px solid var(--glass-border);
  color: #dfe6f3;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.6;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: #1d212b;
  color: var(--text);
  font: 600 0.82rem var(--font);
  cursor: pointer;
  box-shadow: -10px 0 12px #05060a;
}

.copy-button:hover {
  background: #272c38;
}

.copy-button.copied {
  background: var(--green);
  border-color: var(--green);
  color: #04130b;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guide {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }
}

@media (max-width: 820px) {
  .feature,
  .feature.reverse {
    grid-template-columns: 1fr;
  }

  .feature.reverse .feature-copy {
    order: 0;
  }

  .shots-pair,
  .options,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    flex-wrap: wrap;
    border-radius: 26px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 6px 0 4px;
  }

  .nav-links.open {
    display: flex;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
    justify-content: center;
  }

  .step-head {
    flex-wrap: wrap;
  }

  .step-time {
    margin-left: 0;
  }

  .remote th {
    width: 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

.spaced {
  margin-top: 18px;
}

/* Grid children default to min-width: auto, so long code lines would widen the page on phones. */
.guide > *,
.feature > *,
.options > * {
  min-width: 0;
}
