:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #fff;
  --soft: rgba(255, 255, 255, 0.68);
  --faint: rgba(255, 255, 255, 0.42);
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

h1,
h2,
.hero-copy p,
.plus p {
  text-wrap: balance;
}

/* Top bar */

.bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(20px, env(safe-area-inset-top)) 24px 0;
}

.mark img {
  width: 64px;
  height: auto;
}

/* Buttons */

.pill {
  display: inline-block;
  padding: 15px 28px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.pill:hover {
  opacity: 0.88;
}

.pill:active {
  transform: scale(0.97);
}

.pill.small {
  padding: 9px 18px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

/* Apple's badge, at its own proportions. */
.badge {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.badge img {
  height: 54px;
  width: auto;
}

.badge:hover {
  opacity: 0.85;
}

.badge:active {
  transform: scale(0.97);
}

/* Hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.stills,
.stills img {
  position: absolute;
  inset: 0;
}

.stills img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: still 32s infinite;
}

.stills img:nth-child(1) {
  animation-delay: -1s;
}
.stills img:nth-child(2) {
  animation-delay: 7s;
}
.stills img:nth-child(3) {
  animation-delay: 15s;
}
.stills img:nth-child(4) {
  animation-delay: 23s;
}

/* Each still holds for a quarter of the cycle and dissolves into the next,
   drifting slowly the whole time. */
@keyframes still {
  0% {
    opacity: 0;
    transform: scale(1.08);
  }
  6%,
  25% {
    opacity: 1;
  }
  31%,
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.25) 55%, #000 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px max(72px, 10svh);
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(44px, 7.4vw, 84px);
  line-height: 1.02;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

.hero-copy p {
  margin: 22px 0 32px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  max-width: 30em;
}

.note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--faint);
}

/* Features */

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  padding: 72px 0;
}

.feature:nth-child(even) .shot {
  order: 2;
}

.shot {
  width: 100%;
  max-width: 400px;
  justify-self: center;
  /* The phone renders sit on black and run off their frames;
     the fade lets their edges dissolve into the page. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 86%, transparent 100%);
}

/* Renders that run off their sides fade out horizontally as well. */
.shot.wide {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 86%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 86%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-composite: intersect;
}

/* A photograph, not a render on black: framed instead of faded. */
.shot.card {
  -webkit-mask-image: none;
  mask-image: none;
  border-radius: 28px;
  max-width: 360px;
}

.copy {
  max-width: 400px;
}

.copy h2,
.plus h2 {
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.08;
}

.copy p,
.plus p {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--soft);
}

/* Wander+ */

.plus {
  text-align: center;
  padding: 96px 0 120px;
  max-width: 560px;
  margin: 0 auto;
}

.plus .price {
  margin: 10px 0 36px;
  color: var(--fg);
}

/* Footer */

.foot {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 48px 24px max(48px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--faint);
}

.foot-mark {
  width: 44px;
  opacity: 0.6;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

.foot a {
  color: var(--soft);
  text-decoration: none;
}

.foot a:hover {
  color: var(--fg);
}

/* Scroll-in */

.rise {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rise.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .stills img {
    animation: none;
  }
  .stills img:first-child {
    opacity: 1;
  }
}

/* Phone */

@media (max-width: 760px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 40px 0;
    text-align: center;
  }

  .feature:nth-child(even) .shot {
    order: 0;
  }

  .shot {
    max-width: 330px;
  }

  .copy {
    margin: 0 auto;
  }

  .copy p,
  .plus p {
    font-size: 17px;
  }

  .plus {
    padding: 64px 0 88px;
  }
}
