:lang(zh-Hant) :is(h2, h3, .hero-subtitle) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.language-switcher button:focus-visible,
.nav-links a:focus-visible,
.brand:focus-visible,
.device-lineup-link:focus-visible,
.app-store-cta-link:focus-visible,
.day-rail button:focus-visible {
  outline: 3px solid rgb(255 248 238 / 0.46);
  outline-offset: 4px;
}

/* Hero */

.hero {
  padding: clamp(40px, 6svh, 72px) 0 40px;
}

.hero-inner {
  display: grid;
  width: var(--container);
  justify-items: center;
  gap: clamp(28px, 4svh, 48px);
  margin: 0 auto;
}

.hero-copy {
  display: grid;
  max-width: 720px;
  justify-items: center;
  gap: 22px;
  text-align: center;
}

h1 {
  color: var(--cream);
  font-size: 6rem;
  font-weight: 820;
  line-height: 0.86;
}

.hero-subtitle {
  font-size: 2rem;
  font-weight: 760;
  line-height: 1.12;
}

.hero-lede {
  max-width: 620px;
  color: var(--cream-muted);
  font-size: 18px;
  font-weight: 540;
  line-height: 1.7;
}

.device-lineup-link {
  display: block;
  width: min(1100px, 100%);
  border-radius: 24px;
  transition: transform 220ms ease;
}

.device-lineup-link:hover {
  transform: translateY(-4px);
}

.device-lineup {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  filter: drop-shadow(0 34px 60px rgb(17 19 34 / 0.28));
}

.hero-support {
  margin-top: -12px;
  font-size: 15px;
}

.device-lineup img {
  position: absolute;
}

/* Proportions follow the macOS App Store device composite. */

.lineup-mac {
  top: 0;
  left: 12.15%;
  width: 75.7%;
}

.lineup-phone {
  bottom: 0;
  left: 7.3%;
  width: 19.65%;
}

.lineup-watch {
  bottom: 0;
  left: 23%;
  width: 9.9%;
}

/* Feature pillars */

.pillars {
  padding: 72px 0 40px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pillar {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 30px 28px 34px;
  border: 1px solid var(--glass-line);
  border-radius: 28px;
  background: var(--glass);
}

.pillar h3 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.12;
}

.pillar p {
  color: var(--cream-muted);
  font-size: 17px;
  line-height: 1.7;
}

.pillar-glyph {
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  border-radius: 14px;
  background-color: rgb(255 248 238 / 0.14);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 28px;
}

.glyph-sources {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='%23fff8ee' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 7h16M6 14h11M6 21h7'/%3E%3C/svg%3E");
}

.glyph-priority {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='%23fff8ee' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 23V6M7.5 12.5 14 6l6.5 6.5'/%3E%3C/svg%3E");
}

.glyph-sky {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='%23fff8ee' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 19h20M8.5 19a5.5 5.5 0 0 1 11 0M14 6.5v2.5M6.6 9.6l1.7 1.7M21.4 9.6l-1.7 1.7'/%3E%3C/svg%3E");
}

/* Day story */

.day-story {
  padding: 96px 0 0;
}

.day-story .section-header {
  margin-bottom: 24px;
}

.day-track {
  height: var(--day-track-height, 520vh);
}

.day-stage {
  position: sticky;
  top: var(--day-sticky-top, 64px);
  display: grid;
  width: var(--container);
  height: var(--day-stage-height, 760px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  margin: 0 auto;
}

.day-copy {
  display: grid;
  max-width: 480px;
  gap: 36px;
}

.day-caption {
  display: grid;
  gap: 12px;
}

.day-caption.is-changing {
  animation: caption-in 420ms ease both;
}

.day-time {
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--night);
  background: var(--cream);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.day-caption h3 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.06;
}

.day-caption p {
  color: var(--cream-muted);
  font-size: 19px;
  line-height: 1.6;
}

.day-rail {
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: start;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.day-rail button {
  appearance: none;
  min-width: 64px;
  padding: 7px 10px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  color: var(--cream-muted);
  background: transparent;
  font-size: 14px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}

.day-rail button:hover {
  background: var(--glass);
}

.day-rail button[aria-current="step"] {
  color: var(--night);
  border-color: transparent;
  background: var(--cream);
}

.day-progress {
  display: none;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 248 238 / 0.2);
}

.day-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(var(--day-progress, 0));
  border-radius: inherit;
  background: var(--cream);
}

.day-devices {
  position: relative;
  justify-self: center;
  height: var(--day-phone-height, 680px);
  aspect-ratio: 980 / 2000;
  /* Leave room for the watch, which extends 30% of the phone width to the right. */
  margin-right: calc(var(--day-phone-height, 680px) * 0.147);
  filter: drop-shadow(0 30px 50px rgb(17 19 34 / 0.3));
}

.day-phone {
  position: relative;
  width: 100%;
  height: 100%;
}

.day-watch {
  position: absolute;
  bottom: 0;
  left: 80%;
  width: 50%;
  aspect-ratio: 560 / 880;
}

[data-day-frames] img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 480ms linear;
}

[data-day-frames] img.is-active {
  z-index: 2;
  opacity: 1;
}

[data-day-frames] img.is-previous {
  z-index: 1;
  opacity: 1;
  transition: none;
}

@keyframes caption-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Manifesto and Plus */

.manifesto {
  padding: 140px 0;
  text-align: center;
}

.manifesto .section-inner {
  display: grid;
  max-width: 920px;
  justify-items: center;
  gap: 24px;
}

.manifesto h2,
.manifesto p {
  white-space: pre-line;
}

.manifesto h2 {
  font-size: 3.6rem;
  line-height: 1.12;
}

.manifesto p {
  color: var(--cream-muted);
  font-size: 20px;
  line-height: 1.7;
}

.plus {
  padding: 40px 0;
}

.plus-panel {
  display: grid;
  max-width: 880px;
  justify-items: center;
  gap: 18px;
  margin: 0 auto;
  padding: 56px 48px;
  border: 1px solid var(--glass-line);
  border-radius: 36px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgb(255 248 238 / 0.14), transparent 60%),
    var(--glass);
  text-align: center;
}

.plus-mark {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--night);
  background: var(--cream);
  font-size: 15px;
  font-weight: 820;
}

.plus-panel h2 {
  font-size: 2.6rem;
}

.plus-panel p {
  max-width: 640px;
  color: var(--cream-muted);
  font-size: 18px;
  line-height: 1.72;
  white-space: pre-line;
}

@media (max-width: 980px) {
  h1 {
    font-size: 4.8rem;
  }

  h2,
  .manifesto h2 {
    font-size: 2.65rem;
  }
}

@media (max-width: 680px) {
  .hero {
    padding: 48px 0 24px;
  }

  h1 {
    font-size: 3.6rem;
  }

  .hero-subtitle {
    font-size: 1.45rem;
  }

  h2,
  .manifesto h2,
  .plus-panel h2 {
    font-size: 2.1rem;
  }

  .device-lineup {
    aspect-ratio: 1 / 0.74;
  }

  .lineup-mac {
    left: 12%;
    width: 88%;
  }

  .lineup-phone {
    left: 0;
    width: 30%;
  }

  .lineup-watch {
    left: 24%;
    width: 15%;
  }

  .pillars {
    padding-top: 48px;
  }

  .pillar {
    padding: 26px 22px 28px;
  }

  .day-story {
    padding-top: 64px;
  }

  .day-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: start;
    justify-items: center;
    gap: 18px;
  }

  .day-copy {
    width: 100%;
    gap: 14px;
    text-align: center;
  }

  .day-caption {
    justify-items: center;
    gap: 8px;
  }

  .day-caption h3 {
    font-size: 1.8rem;
  }

  .day-caption p {
    font-size: 17px;
  }

  .day-rail {
    display: none;
  }

  .day-progress {
    display: block;
    width: min(240px, 70%);
    margin: 0 auto;
  }

  .day-watch {
    left: 78%;
    width: 44%;
  }

  .manifesto {
    padding: 96px 0;
  }

  .manifesto p {
    font-size: 18px;
  }

  .plus-panel {
    padding: 40px 22px;
    border-radius: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal,
  .device-lineup-link,
  .day-caption.is-changing,
  [data-day-frames] img {
    transition: none;
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
