/* iPhone Duo Hub: one hand-written stylesheet. Mobile-first; test at 390px.
   Tokens follow the launch plan (Section 3). Light is the default;
   [data-theme="dark"] is the reader-selected alternative. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f5f5f7;
  --surface-2: #ebebef;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0066cc; /* darker blue keeps AA contrast on white */
  --accent-text: #ffffff;
  --accent-tint: rgba(0, 102, 204, 0.08);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --header-bg: rgba(255, 255, 255, 0.72);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --frame: #b4b4b9;
  --frame-fill: #d9d9de;
  --floor: rgba(0, 0, 0, 0.12);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --w-regular: 400;
  --w-bold: 600;
  --radius: 16px;
  --gutter: 16px;
  --max: 1120px;
  --narrow: 720px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060607;
  --surface: #111113;
  --surface-2: #1a1a1d;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --accent: #2997ff;
  --accent-text: #ffffff;
  --accent-tint: rgba(41, 151, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --header-bg: rgba(6, 6, 7, 0.72);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --frame: #8e8e93;
  --frame-fill: #1c1c1f;
  --floor: rgba(0, 0, 0, 0.6);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  font-weight: var(--w-regular);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

h1, h2, h3, .h3 {
  margin: 0 0 0.5em;
  font-weight: var(--w-bold);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 8vw, 56px); letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 4vw, 32px); }
h3, .h3 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.25; }

p { margin: 0 0 1em; }

strong, b { font-weight: var(--w-bold); }

.num { font-variant-numeric: tabular-nums; }
.num--right { text-align: right; }
.muted { color: var(--muted); }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: var(--w-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lede { font-size: 19px; color: var(--muted); max-width: 40em; }
.meta { font-size: 14px; color: var(--muted); }

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

.skip-link {
  position: absolute; left: var(--gutter); top: -60px; z-index: 100;
  padding: 8px 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text);
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--narrow); }
.container .container--narrow { margin-inline: 0; }

.section { margin-block: 56px; }
.section__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px;
  margin-bottom: 24px;
}
.section__head h2 { margin: 0; }

.grid { display: grid; gap: 16px; }

@media (min-width: 768px) {
  :root { --gutter: 24px; }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .section { margin-block: 88px; }
}

/* ---------- Header (sticky glass nav) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "logo actions" "nav nav";
  align-items: center;
  column-gap: 16px;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 10px var(--gutter) 0;
}
.logo {
  grid-area: logo;
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text);
  font-weight: var(--w-bold);
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo__mark { color: var(--accent); }

.site-nav { grid-area: nav; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav ul {
  display: flex; gap: 4px;
  margin: 0; padding: 6px var(--gutter) 8px;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.site-nav a:hover,
.site-nav a[aria-current] { color: var(--text); text-decoration: none; }

.site-header__actions { grid-area: actions; display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.theme-toggle:hover { border-color: var(--border-strong); }
/* Show the icon for the theme you would switch to. */
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }

@media (min-width: 1024px) {
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo nav actions";
    padding-block: 10px;
  }
  .site-nav { margin: 0; }
  .site-nav ul { justify-content: center; padding: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 17px;
  font-weight: var(--w-regular);
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--secondary:hover { border-color: var(--text); }
.btn--sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow { white-space: nowrap; }
.link-arrow::after { content: " \203A"; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0; padding: 16px 0 0;
  list-style: none;
  font-size: 13px; color: var(--muted);
}
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: 0.5; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card--link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
/* Hero image bleeds to the card edges; 16:9 box reserved up front, no layout shift. */
.card__media {
  display: block;
  width: calc(100% + 48px);
  max-width: none;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: -24px -24px 20px;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  background: var(--surface-2);
}
.card__title { margin-bottom: 8px; }
.card__title a { color: var(--text); }
/* Whole card is clickable via the title link. */
.card--link .card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__title a:hover { text-decoration: none; }
.card__meta { margin: 0; font-size: 14px; color: var(--muted); }
.card > :last-child { margin-bottom: 0; }

/* ---------- Hero ---------- */
.hero { padding-top: 48px; overflow: hidden; }
.hero__inner { text-align: center; }
.hero__title { font-size: clamp(44px, 11vw, 80px); margin-bottom: 16px; }
.hero__sub { max-width: 34em; margin: 0 auto 28px; font-size: 19px; color: var(--muted); }
.hero__actions { justify-content: center; }
.hero__media { margin: 32px auto 0; }
.hero__art {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9; /* matches the 1280x720 footage; reserves space, no layout shift */
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.hero__credit { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: right; }
.hero__player { position: relative; }
/* Pause/play control: fixed dark glass so it reads on the footage in either theme. */
.hero__toggle {
  position: absolute; right: 12px; bottom: 12px;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.hero__toggle[hidden] { display: none; }
.hero__toggle:hover { background: rgba(0, 0, 0, 0.75); }
.hero__toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hero__toggle-pause { display: none; }
.hero__toggle[data-state="playing"] .hero__toggle-play { display: none; }
.hero__toggle[data-state="playing"] .hero__toggle-pause { display: block; }

@media (min-width: 768px) {
  .hero { padding-top: 80px; }
  .hero__sub { font-size: 21px; }
}

/* ---------- Countdown ---------- */
.countdown { display: grid; gap: 20px; align-items: center; }
.countdown h2 { margin: 0; }
.countdown__units { display: flex; gap: 8px; margin: 0; }
.countdown__units div {
  flex: 1;
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  text-align: center;
}
.countdown__units dd { margin: 0; font-size: 34px; font-weight: var(--w-bold); letter-spacing: -0.02em; line-height: 1.1; }
.countdown__units dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.countdown__units div { display: flex; flex-direction: column-reverse; gap: 4px; }
.countdown__done { margin: 0; }

@media (min-width: 768px) {
  .countdown { grid-template-columns: 1fr auto; padding: 32px; }
  .countdown__units { gap: 12px; }
  .countdown__units dt { font-size: 12px; letter-spacing: 0.08em; }
  .countdown__units div { min-width: 110px; }
}

/* ---------- Facts strip ---------- */
.facts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  margin: 0; padding: 0; list-style: none;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.facts li { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--bg); }
.facts__value { font-size: 28px; font-weight: var(--w-bold); letter-spacing: -0.02em; line-height: 1.1; }
.facts__label { font-size: 14px; color: var(--muted); }
@media (min-width: 768px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
  .facts li { padding: 28px; }
  .facts__value { font-size: 36px; }
}

/* ---------- Versus ---------- */
.versus { display: flex; align-items: center; gap: 16px; margin: 16px 0; }
.versus > div { display: flex; flex-direction: column; flex: 1; }
.versus__name { font-size: 14px; color: var(--muted); }
.versus__price { font-size: 28px; font-weight: var(--w-bold); letter-spacing: -0.02em; }
.versus__vs { color: var(--muted); font-size: 14px; }

/* ---------- Deals band ---------- */
.deals-band { display: grid; gap: 20px; align-items: center; }
.deals-band h2 { margin-bottom: 8px; }
@media (min-width: 768px) {
  .deals-band { grid-template-columns: 1fr auto; padding: 40px; }
  .deals-band p { margin: 0; }
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 24px;
}
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th,
.table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child > * { border-bottom: 0; }
.table thead th { background: var(--surface); font-weight: var(--w-bold); white-space: nowrap; }
.table tbody th { font-weight: var(--w-bold); white-space: nowrap; }
.table td.num--right,
.table th.num--right { text-align: right; }
.table .is-winner { background: var(--accent-tint); }
.table--compare { min-width: 520px; }

/* ---------- Article & page ---------- */
.page__header,
.article__header { padding-block: 32px 8px; }
.page { padding-bottom: 56px; }
.article__footer { margin-top: 48px; padding-bottom: 56px; display: grid; gap: 24px; }

.prose > * + * { margin-top: 0; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li + li { margin-top: 0.35em; }
.prose blockquote {
  margin: 0 0 1em; padding: 16px 20px;
  border-left: 2px solid var(--accent);
  background: var(--surface); border-radius: 0 12px 12px 0;
}
.prose blockquote p:last-child { margin: 0; }
.prose code { font-size: 0.88em; padding: 2px 6px; border-radius: 6px; background: var(--surface); }

.disclosure {
  margin: 0 0 24px; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 14px; color: var(--muted);
}

.related__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.related__list li { border-bottom: 1px solid var(--border); }
.related__list a { display: block; padding: 12px 0; }

.specs-card__list { margin: 0 0 16px; }
.specs-card__list div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px;
}
.specs-card__list dt { color: var(--muted); }
.specs-card__list dd { margin: 0; text-align: right; }

.upcoming { margin: 0 0 56px; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.upcoming li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.upcoming time { white-space: nowrap; font-size: 15px; }

.status-page { padding-block: 96px; text-align: center; }
.status-page .lede { margin-inline: auto; }
.status-page .btn-row { justify-content: center; }

/* ---------- Video embeds (click-to-play facade) ---------- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0 0 1.5em;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.video__facade,
.video__frame {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video__facade {
  display: block;
  padding: 0;
  background: var(--surface);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.video__thumb { width: 100%; height: 100%; object-fit: cover; }
/* Scrim keeps the title legible over any thumbnail, in either theme. */
.video__facade::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0) 55%);
  pointer-events: none;
}
.video__play {
  position: absolute; top: 50%; left: 50%;
  display: grid; place-items: center;
  width: 68px; height: 68px;
  padding-left: 4px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
  z-index: 1;
}
.video__facade:hover .video__play,
.video__facade:focus-visible .video__play { background: var(--accent); transform: translate(-50%, -50%) scale(1.06); }
.video__facade:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: var(--radius); }
.video__title {
  position: absolute; left: 20px; right: 20px; bottom: 16px;
  font-size: 15px;
  font-weight: var(--w-bold);
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .video__play { transition: none; }
  .video__facade:hover .video__play,
  .video__facade:focus-visible .video__play { transform: translate(-50%, -50%); }
}

/* ---------- Featured media and in-article images ---------- */
.article__media { margin-block: 8px 32px; }
.article__media .video { margin: 0; }
.article__image {
  width: 100%;
  aspect-ratio: 16 / 9; /* reserves space before load: no layout shift */
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.prose img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.prose p > img { margin-block: 0.5em; }
.prose figure { margin: 0 0 1.5em; }
.prose figure img { margin: 0; }
.prose figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}

/* ---------- Forms ---------- */
input[type="email"],
input[type="text"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px stops iOS Safari zooming on focus */
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

.form { display: grid; gap: 20px; max-width: 560px; }
.form__field { display: grid; gap: 6px; }
.form__field label { font-size: 15px; font-weight: var(--w-bold); }
.form .btn { justify-self: start; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
}
.site-footer__grid { display: grid; gap: 32px; padding-block: 48px 32px; }
.site-footer__links { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.site-footer__links a { color: var(--muted); }
.site-footer__links a:hover { color: var(--text); }
.site-footer__brand .logo { margin-bottom: 8px; }
.newsletter__row { display: flex; gap: 8px; }
.newsletter__row input { flex: 1; min-width: 0; }
.site-footer__legal {
  padding-block: 20px 32px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.site-footer__legal p { margin: 0 0 4px; }

@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 1.2fr 0.8fr 0.8fr 1.6fr; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Article hero caption: descriptive caption plus source credit. */
.article__caption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.article__credit {
  white-space: nowrap;
}

/* Like button (article pages). Anonymous, one vote per browser. */
.like {
  margin-block: 4px 40px;
}
.like__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: var(--w-bold);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.like__button:hover:not(:disabled) {
  border-color: var(--border-strong);
}
.like__button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  cursor: default;
}
.like__icon {
  flex: none;
}
.like__count {
  min-width: 1.6em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
