/* Landing page layout. Fonts, colors and shared components come from identity.css.
   Everything sits on one left-aligned 12-column grid; the product imagery is the only
   large visual. */

:root {
  color-scheme: light dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--id-bg);
  color: var(--id-ink);
  font-family: var(--id-font);
  font-size: var(--id-size-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: var(--id-radius-control);
  background: var(--id-button);
  color: var(--id-button-ink);
}

.skip:focus {
  top: 12px;
}

/* Header: the same bar the docs use. */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--id-bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--id-hairline);
}

.bar-inner {
  max-width: calc(var(--id-width) + var(--id-gutter) * 2);
  height: var(--id-header-height);
  margin: 0 auto;
  padding: 0 var(--id-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bar nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

.bar nav a {
  color: var(--id-ink-2);
}

.bar nav a:hover {
  color: var(--id-ink);
  text-decoration: none;
}

/* Sections share the grid. */

main > section {
  max-width: calc(var(--id-width) + var(--id-gutter) * 2);
  margin: 0 auto;
  padding: var(--id-section) var(--id-gutter) 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--id-column-gap);
}

main > section > * {
  grid-column: 1 / -1;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: var(--id-size-display);
  line-height: 1.02;
  letter-spacing: -0.032em;
}

h2 {
  font-size: var(--id-size-section);
  line-height: 1.08;
  letter-spacing: -0.026em;
}

.body,
.lede {
  margin: 20px 0 0;
  color: var(--id-ink-2);
  text-wrap: pretty;
}

.body {
  font-size: 19px;
  line-height: 1.45;
}

/* Hero: the line at full width, then the sentence and the command, then the film. */

.hero {
  padding-top: clamp(56px, 7vw, 96px);
}

.hero h1 {
  grid-column: 1 / span 10;
}

.hero-text {
  grid-column: 1 / span 7;
}

.lede {
  margin-top: 28px;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.4;
}

.actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.command {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 6px 0 16px;
  border-radius: var(--id-radius-control);
  cursor: pointer;
}

.command-state {
  min-width: 58px;
  padding: 6px 12px;
  border-radius: var(--id-radius-control);
  background: var(--id-bg);
  color: var(--id-ink-2);
  font-family: var(--id-font);
  font-size: 13px;
  font-weight: 600;
}

.release-note {
  margin: 20px 0 0;
  color: var(--id-ink-2);
  font-size: var(--id-size-small);
}

/* Film */

.film {
  position: relative;
  margin: clamp(56px, 7vw, 88px) 0 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--id-hairline);
  border-radius: var(--id-radius-media);
  background: var(--id-surface);
}

.film video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The cover shows when the film can't autoplay; with scripts off, the video's own controls
   show instead. */
.film-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--id-surface);
  cursor: pointer;
}

.film-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html:not(.js) .film-cover,
html.film-autoplay .film-cover,
.film.started .film-cover {
  display: none;
}

.film-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--id-radius-control);
  /* Opaque enough to read over both the dark and the light phones on the cover. */
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font: 600 17px/1.2 var(--id-font);
  white-space: nowrap;
}

/* A plain triangle, drawn with borders, so the label reads as "play" at a glance. */
.film-play::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}

.film-cover:active .film-play {
  transform: translate(-50%, -50%) scale(0.98);
}

.film-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 8px;
}

.film-controls[hidden] {
  display: none;
}

.pill {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--id-radius-control);
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  color: #fff;
  font: 600 14px var(--id-font);
  cursor: pointer;
}

/* Install: heading on the left, the three steps on the right. */

.section-text {
  grid-column: 1 / span 5;
}

.steps {
  grid-column: 7 / -1;
  align-self: end;
}

.steps li {
  padding: 22px 0;
  font-size: var(--id-size-title);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* Real apps */

.apps {
  padding-bottom: var(--id-section);
}

.phones {
  list-style: none;
  margin: 64px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--id-column-gap);
}

.phone {
  margin: 0;
  container-type: inline-size;
}

.device {
  position: relative;
  padding: 3.2cqw;
  border-radius: 16cqw;
  background: #0d0d0e;
  box-shadow: 0 0 0 1px var(--id-hairline);
}

.device picture,
.device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12.6cqw;
}

.device img {
  background: var(--id-surface);
}

.island {
  position: absolute;
  top: calc(3.2cqw + 2.3cqw);
  left: 50%;
  width: 26.5cqw;
  height: 7.8cqw;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}

.phone figcaption {
  margin-top: 20px;
  color: var(--id-ink-2);
  font-size: var(--id-size-small);
  line-height: 1.4;
}

.phone figcaption strong {
  display: block;
  color: var(--id-ink);
  font-weight: 600;
}

/* Footer: the same footer the docs home uses. */

.footer {
  border-top: 1px solid var(--id-hairline);
  color: var(--id-ink-2);
  font-size: var(--id-size-caption);
}

.footer-inner {
  max-width: calc(var(--id-width) + var(--id-gutter) * 2);
  margin: 0 auto;
  padding: 28px var(--id-gutter) 44px;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
}

.footer nav a {
  color: var(--id-ink);
}

.footer p {
  max-width: 64em;
  margin: 14px 0 0;
  line-height: 1.5;
}

/* Medium screens: text columns widen. */

@media (max-width: 960px) {
  /* One column: twelve tracks and their gaps would be wider than a phone. */
  main > section {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1,
  .hero-text,
  .section-text,
  .steps {
    grid-column: 1 / -1;
  }

  .steps {
    margin-top: 40px;
  }
}

/* Narrow screens: phones become a swipeable row. */

@media (max-width: 860px) {
  .phones {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(62vw, 280px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-left: calc(var(--id-gutter) * -1);
    margin-right: calc(var(--id-gutter) * -1);
    padding: 8px var(--id-gutter);
    scroll-padding: 0 var(--id-gutter);
    scrollbar-width: none;
  }

  .phones::-webkit-scrollbar {
    display: none;
  }

  .phones li {
    scroll-snap-align: start;
  }
}

@media (max-width: 480px) {
  .bar nav {
    gap: 18px;
  }

  .command code {
    font-size: 12.5px;
  }

  .steps li {
    font-size: 19px;
  }

  .film-controls {
    right: 10px;
    bottom: 10px;
    gap: 6px;
  }

  .pill {
    min-height: 30px;
    padding: 0 12px;
    font-size: 13px;
  }
}
