/* Catalyst — dark, system-font, Apple-platform colour roles.
   Colours follow the dark-appearance system palette: black base, #1c1c1e
   elevated surfaces, a label hierarchy that keeps small text above 7:1. */

:root {
  --bg: #000;
  --bg-elevated: #1c1c1e;
  --bg-elevated-2: #2c2c2e;
  --label: #f5f5f7;
  --label-2: #a1a1a6;
  --label-3: #86868b;
  --separator: rgba(255, 255, 255, 0.1);
  --accent: #7d7aff; /* systemIndigo, accessible dark variant */
  --radius-card: 18px;
  --gutter: max(22px, env(safe-area-inset-left));
  --content: 980px;
  --nav-h: 52px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

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

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

/* On iPhone and iPad, follow the reader's Text Size setting. */
@supports (-webkit-touch-callout: none) and (font: -apple-system-body) {
  html { font: -apple-system-body; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; letter-spacing: inherit; color: inherit; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--label); color: #000; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ── Navigation bar: a translucent material over the content ───────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(22, 22, 23, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: #161617; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.nav-inner {
  height: 100%;
  max-width: 1200px; margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 28px;
}

.nav-brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 1.06rem; letter-spacing: -0.01em;
  margin-right: auto;
}
.nav-icon { width: 28px; height: 28px; border-radius: 22.5%; }

.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-size: 0.8rem; letter-spacing: -0.01em; text-decoration: none;
  color: var(--label-2); transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--label); }

.search-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 34px; min-width: 44px; padding: 0 5px 0 12px;
  border-radius: 999px; border: 1px solid var(--separator);
  background: rgba(255, 255, 255, 0.06);
  color: var(--label-2); font-size: 0.82rem; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.search-trigger:hover { background: rgba(255, 255, 255, 0.1); color: var(--label); }
.search-label { margin-right: 18px; }
/* A capsule nested in the capsule: 24pt tall inside the 34pt field leaves an
   even 5pt on every side, so the two curves stay concentric. */
.search-kbd {
  display: inline-flex; align-items: center; gap: 2px;
  height: 24px; padding: 0 9px;
  font-family: var(--font); font-size: 0.7rem; letter-spacing: 0.02em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--separator);
  color: var(--label-2);
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .search-label, .search-kbd { display: none; }
  .search-trigger { padding: 0; justify-content: center; width: 44px; height: 44px; border: 0; background: transparent; }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: min(880px, calc(100svh - var(--nav-h)));
  display: grid; place-items: center;
  padding: 96px var(--gutter) 88px;
  overflow: hidden;
  isolation: isolate;
}

.hero-halftone {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 42%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 75% at 50% 42%, #000 35%, transparent 100%);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%; z-index: -1;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 760px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
/* A soft pool of black behind the text keeps it clear of the dots. */
.hero-content::before {
  content: ""; position: absolute; z-index: -1;
  inset: 18% -18% -12%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.5) 55%, transparent);
  pointer-events: none;
}

.hero-icon {
  width: clamp(112px, 14vw, 144px); height: auto;
  border-radius: 22.37%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 60px rgba(0, 0, 0, 0.7);
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.3rem, 8vw, 5.6rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.028em;
}

.hero-lead {
  margin: 18px 0 0;
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  line-height: 1.38;
  letter-spacing: -0.012em;
  color: var(--label);
  text-wrap: balance;
}

.unavailable {
  margin-top: 36px;
  min-height: 50px; padding: 0 28px;
  display: inline-flex; align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--label-2);
  font-size: 1rem; font-weight: 500;
  cursor: not-allowed;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.hero-platforms {
  margin: 18px 0 0;
  font-size: 0.82rem; color: var(--label-2); letter-spacing: -0.01em;
}
.hero-platforms span { padding: 0 6px; }

/* ── Screens strip ────────────────────────────────────────────────────── */

.screens { padding: 0 0 24px; margin-top: -36px; }

.strip {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

/* Every landscape screen shares one height and iPhone stands a little taller,
   all on one baseline, the way devices line up side by side. The vertical
   padding is headroom for a focused card to lift without being clipped. */
.track {
  --h: clamp(200px, 32vw, 400px);
  --gap: 32px;
  list-style: none; margin: 0; padding: 52px 0 18px;
  display: flex; align-items: flex-end; gap: var(--gap);
  width: max-content;
  animation: strip 80s linear infinite;
}
.shot { flex: 0 0 auto; position: relative; }
.shot.is-lifted { z-index: 2; }
.shot figure { margin: 0; display: flex; flex-direction: column; align-items: center; }

/* The frame is what lifts and tilts and carries the shadow; the clip inside it
   holds the moving picture. They are separate because a clip would also cut
   off the shadow. */
.frame {
  --r: calc(var(--h) * 0.035);
  position: relative;
  border-radius: var(--r);
  box-shadow: 0 0 0 1px var(--separator), 0 30px 60px rgba(0, 0, 0, 0.5);
  transform-origin: 50% 55%;
  transition: box-shadow 0.35s ease, filter 0.5s ease 0.35s;
}
/* clip-path, not just overflow + border-radius: once the frame is transformed
   in 3D, WebKit (Safari, Orion) gives the sliding picture its own layer and
   stops honouring the parent's rounded overflow, so the corners go square.
   A clip-path is applied to every descendant layer. */
.clip {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  clip-path: inset(0 round var(--r));
  background: var(--bg-elevated);
}
.frame img {
  display: block;
  height: var(--h); width: auto; max-width: none;
}
.shot-mac .frame { --r: calc(var(--h) * 0.045); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.shot-phone .frame { --r: calc(var(--h) * 1.2 * 0.068); }
.shot-phone .frame img { height: calc(var(--h) * 1.2); }

/* Illumination: a sheen that travels across the surface as it tilts. */
.glare {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 58%);
}

.frame.is-focused {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 44px 80px rgba(0, 0, 0, 0.72);
  transition: box-shadow 0.35s ease, filter 0.2s ease;
}
.shot-mac .frame.is-focused { box-shadow: 0 44px 80px rgba(0, 0, 0, 0.72); }

/* The rest of the row dims behind the focused screen, as it does on Apple TV. */
.track.has-focus .frame:not(.is-focused) { filter: brightness(0.62); }

.shot figcaption {
  margin-top: 22px;
  text-align: center;
  font-size: 0.76rem; letter-spacing: -0.005em;
  color: var(--label-2);
}

.strip:hover .track,
.strip:focus-within .track,
.strip.is-paused .track { animation-play-state: paused; }

@keyframes strip {
  to { transform: translateX(calc(-50% - var(--gap) / 2)); }
}

.screens-foot {
  max-width: var(--content); margin: 18px auto 0; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.screens-caption { margin: 0; font-size: 0.76rem; color: var(--label-3); }

.strip-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--separator);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.76rem; color: var(--label-2); cursor: pointer;
}
.strip-toggle:hover { color: var(--label); background: rgba(255, 255, 255, 0.1); }
.strip-toggle .icon-play { display: none; }
.strip-toggle[aria-pressed="true"] .icon-play { display: block; }
.strip-toggle[aria-pressed="true"] .icon-pause { display: none; }

/* With Reduce Motion, the strip is a still row you scroll yourself. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .strip { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-mask-image: none; mask-image: none; }
  .track { animation: none; padding: 52px var(--gutter) 18px; }
  .track li { scroll-snap-align: center; }
  .track li[aria-hidden="true"] { display: none; }
  .strip-toggle { display: none; }
}

/* ── Sections ─────────────────────────────────────────────────────────── */

.section-title {
  margin: 0;
  text-align: center;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-sub {
  margin: 12px 0 0; text-align: center;
  font-size: 1.12rem; color: var(--label-2);
}

.features, .devices, .faq {
  max-width: 1100px; margin: 0 auto;
  padding: 120px var(--gutter) 0;
}

.feature-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 48px;
}
.feature { text-align: center; max-width: 330px; margin: 0 auto; }
.feature h3 {
  margin: 0 0 10px;
  font-size: 1.1rem; font-weight: 600; letter-spacing: -0.015em;
}
.feature p { margin: 0; color: var(--label-2); font-size: 0.94rem; line-height: 1.5; }

.also {
  margin: 96px auto 0; max-width: 860px;
  padding: 36px 40px;
  border-radius: var(--radius-card);
  background: var(--bg-elevated);
}
.also-title { margin: 0 0 18px; font-size: 1.1rem; font-weight: 600; }
.also-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px;
}
.also-list li { color: var(--label-2); font-size: 0.9rem; line-height: 1.45; }
.also-list strong { color: var(--label); font-weight: 600; }

.device-grid {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.device {
  padding: 30px 28px 32px;
  border-radius: var(--radius-card);
  background: var(--bg-elevated);
}
.device h3 { margin: 0 0 16px; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.015em; }
.device ul { list-style: none; margin: 0; padding: 0; }
.device li {
  position: relative; padding: 11px 0 11px 0;
  border-top: 1px solid var(--separator);
  font-size: 0.9rem; line-height: 1.42; color: var(--label-2);
}
.device li:first-child { border-top: 0; padding-top: 0; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */

.faq { padding-bottom: 140px; }
.faq-list { margin: 48px auto 0; max-width: 860px; display: grid; gap: 12px; }

.faq details {
  border-radius: 16px;
  background: var(--bg-elevated);
  transition: background 0.2s ease;
}
.faq details:hover { background: #222224; }
.faq summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 16px 24px;
  font-weight: 600; font-size: 1rem; letter-spacing: -0.015em;
  cursor: pointer; border-radius: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: 0 0 auto;
  width: 9px; height: 9px;
  border-right: 2px solid var(--label-3); border-bottom: 2px solid var(--label-3);
  transform: rotate(-45deg);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg) translate(-2px, -2px); }
.faq-body { padding: 0 24px 22px; }
.faq-body p { margin: 0; color: var(--label-2); font-size: 0.94rem; line-height: 1.55; max-width: 720px; }

.is-flash { animation: flash 1.6s ease; }
@keyframes flash {
  0%, 30% { box-shadow: 0 0 0 2px var(--accent); }
  100% { box-shadow: 0 0 0 2px transparent; }
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--separator);
  background: #0b0b0c;
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 40px var(--gutter) max(40px, env(safe-area-inset-bottom)); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-name { margin: 0; font-weight: 600; }
.footer-tag { margin: 4px 0 0; font-size: 0.82rem; color: var(--label-2); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 0.82rem; color: var(--label-2); text-decoration: none; }
.footer-links a:hover { color: var(--label); text-decoration: underline; }
.legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--separator); }
.legal p { margin: 0 0 8px; font-size: 0.7rem; line-height: 1.5; color: var(--label-3); letter-spacing: -0.005em; }

/* ── Search ───────────────────────────────────────────────────────────── */

.search { position: fixed; inset: 0; z-index: 80; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.search[hidden] { display: none; }
.search-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.search-panel {
  position: relative; width: min(620px, 100%);
  border-radius: 20px; overflow: hidden;
  background: rgba(36, 36, 38, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  box-shadow: 0 0 0 1px var(--separator), 0 40px 80px rgba(0, 0, 0, 0.6);
}
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--separator); color: var(--label-2); }
.search-field input {
  flex: 1; min-width: 0; height: 58px;
  border: 0; outline: 0; background: transparent;
  color: var(--label); font: inherit; font-size: 1.06rem;
}
.search-field input::placeholder { color: var(--label-3); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-esc {
  font-size: 0.7rem; height: 24px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--separator); background: rgba(255, 255, 255, 0.06); color: var(--label-2);
}
.search-results { list-style: none; margin: 0; padding: 8px; max-height: min(420px, 60vh); overflow-y: auto; }
.search-results li { padding: 12px 14px; border-radius: 12px; cursor: pointer; }
.search-results li[aria-selected="true"] { background: rgba(125, 122, 255, 0.22); }
.search-results .r-kind { display: block; font-size: 0.7rem; color: var(--label-3); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.search-results .r-title { display: block; font-weight: 600; font-size: 0.94rem; }
.search-results .r-snippet { display: block; font-size: 0.82rem; color: var(--label-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results .r-empty { cursor: default; color: var(--label-2); font-size: 0.9rem; }

/* ── Narrow layouts ───────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-grid { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 640px) {
  .hero { padding-top: 72px; padding-bottom: 64px; }
  .features, .devices, .faq { padding-top: 88px; }
  .feature-grid { grid-template-columns: 1fr; gap: 40px; margin-top: 44px; }
  .also { padding: 28px 22px; margin-top: 72px; }
  .also-list { grid-template-columns: 1fr; }
  .faq summary { padding: 16px 18px; }
  .faq-body { padding: 0 18px 20px; }
  .footer-top { flex-direction: column; }
}
