/* Black page, Apple's dark grays, system type. Sizes follow Apple's own product pages. */

:root {
  --text: #f5f5f7;
  --gray: #86868b;
  --soft: #a1a1a6;
  --card: #161617;
  --line: #424245;
  --blue: #2997ff;
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: #000; scroll-behavior: smooth; scroll-padding-top: 60px; }

body {
  margin: 0;
  color: var(--text);
  font: 17px/1.47 var(--font);
  letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img, video { display: block; max-width: 100%; }

p { margin: 0 0 1em; }

/* The bar along the top */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(22, 22, 23, .8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
  height: 48px;
  margin: 0 auto;
  padding: 0 22px;
  font-size: 12px;
  letter-spacing: -.01em;
}

.bar .name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.bar .name img { border-radius: 5px; }
.bar .links { display: flex; gap: 28px; }
.bar .links a { color: #d2d2d7; }
.bar .links a:hover { color: #fff; text-decoration: none; }

/* Top of the page */

.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 72px 22px 20px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 80px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.015em;
}

.tagline {
  margin: 10px 0 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: .007em;
  background: linear-gradient(90deg, #ff5f6d, #ffb347 25%, #7cf29c 50%, #4fc3f7 72%, #c27bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* The icon, built from its four layers the way the TV draws it. tilt.js moves them. */

.stage { perspective: 1000px; padding: 56px 0 48px; }

.tile {
  position: relative;
  width: min(720px, 100%);
  aspect-ratio: 5 / 3;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .07);
  transition: transform .35s ease-out;
}

.tile img {
  position: absolute;
  top: -4%;
  left: -4%;
  width: 108%;
  max-width: none;
  height: 108%;
  transition: transform .35s ease-out;
}

.tile .shine { position: absolute; inset: 0; pointer-events: none; }

.intro {
  max-width: 680px;
  margin: 0 auto;
  color: var(--soft);
  font-size: 21px;
  line-height: 1.38;
  letter-spacing: .011em;
}

/* Sections */

main { max-width: 1000px; margin: 0 auto; padding: 0 22px; }

.wide { margin: 60px 0; }

video {
  width: 100%;
  border-radius: 18px;
  background: #000;
}

h2 {
  margin: 0 0 18px;
  font-size: 56px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -.005em;
}

.lede { max-width: 760px; margin: 120px auto 50px; text-align: center; }
.lede p { color: var(--soft); font-size: 21px; line-height: 1.38; letter-spacing: .011em; }

/* The TV's own menu, so nobody mistakes this for AirPlay */

.tv-ui { margin: 0 0 20px; }
.tv-ui img { width: 100%; border-radius: 18px; }

.tv-ui figcaption {
  max-width: 600px;
  margin: 14px auto 0;
  color: var(--gray);
  font-size: 14px;
  text-align: center;
}

/* Screenshots: a grid on a wide screen, a row you swipe on a phone */

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 80px;
}

.gallery img { border-radius: 18px; }

/* Feature tiles */

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card {
  padding: 44px 40px 34px;
  border-radius: 28px;
  background: var(--card);
}

.card.span { grid-column: 1 / -1; }

h3 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: .007em;
}

.card p { max-width: 68ch; color: var(--soft); }

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

.phones { display: flex; gap: 16px; justify-content: center; align-items: flex-end; }
.phones img { width: 34%; border-radius: 26px; box-shadow: 0 20px 40px rgba(0, 0, 0, .5); }
.phones img.ipad { width: 56%; border-radius: 18px; }

.mark { margin-left: 2px; font-size: .8em; vertical-align: super; line-height: 0; }

.footnote {
  max-width: 68ch;
  margin: 28px auto 0;
  color: var(--gray);
  font-size: 13px;
  line-height: 1.5;
}

.store {
  margin: 60px 0 0;
  color: var(--gray);
  font-size: 14px;
  text-align: center;
}

/* Help */

.help > p { color: var(--soft); font-size: 19px; }

details { border-bottom: 1px solid var(--line); }
details:first-of-type { margin-top: 36px; border-top: 1px solid var(--line); }

summary {
  padding: 20px 30px 20px 0;
  cursor: pointer;
  font-size: 19px;
  font-weight: 600;
  list-style: none;
  position: relative;
}

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

summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 16px;
  color: var(--gray);
  font-size: 24px;
  font-weight: 300;
}

details[open] summary::after { content: "\2212"; }
details p { margin: -6px 0 20px; color: var(--soft); }

/* Privacy */

.page { max-width: 700px; padding-top: 80px; }
.page h1 { font-size: 64px; margin-bottom: 24px; }
.page h2 { margin: 40px 0 8px; font-size: 24px; line-height: 1.17; }
.page p { color: var(--soft); }
.page .lead { color: var(--text); font-size: 24px; line-height: 1.33; }
.updated { margin-top: 48px; color: var(--gray); font-size: 14px; }

/* Footer */

.foot { margin-top: 140px; background: var(--card); }

.foot-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 18px 22px 40px;
  color: var(--gray);
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -.01em;
}

.foot-inner p { margin: 8px 0; }
.foot-inner span { margin: 0 6px; color: var(--line); }
.foot a { color: #d2d2d7; }

@media (max-width: 734px) {
  h1 { font-size: 48px; }
  .tagline { font-size: 21px; }
  h2 { font-size: 40px; }
  .intro, .lede p { font-size: 19px; }
  .lede { margin-top: 80px; }
  .tiles, .split { grid-template-columns: 1fr; }
  .gallery {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 86%;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 -22px 60px;
    padding: 0 22px;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery img { border-radius: 14px; scroll-snap-align: center; }
  .card { padding: 32px 26px 22px; }
  .bar .links { gap: 18px; }
  .page h1 { font-size: 44px; }
}
