/* The home page, over styles.css. */

section { position: relative; }

.section { padding: clamp(64px, 8vw, 104px) 0; }

.head { max-width: 700px; margin-bottom: clamp(32px, 5vw, 52px); }

.head.center { text-align: center; margin-left: auto; margin-right: auto; }

.head h2 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 720; margin: 12px 0 16px; }

.head p { color: var(--muted); font-size: clamp(17px, 2vw, 20px); margin: 0; }

.head.center p { margin: 0 auto; max-width: 34em; }

picture { display: block; }

picture img { display: block; width: 100%; height: auto; }

.device-shot img { filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5)); }

/* Fades in as it scrolls into view, where scripts run and motion is welcome. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }

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

@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

/* Apple's own App Store badge, as its artwork comes: black with its grey border, unmodified,
   at least 40 px tall and a quarter of its height clear around it. */
.badge { display: inline-flex; border-radius: 9px; }

.badge img { display: block; height: 56px; width: auto; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.button svg { width: 18px; height: 18px; flex: none; }

.button.ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.button.ghost:hover { background: rgba(255, 255, 255, 0.08); }

.button:focus-visible, .badge:focus-visible, .video:focus-visible, .tod-tabs button:focus-visible { outline: 2px solid var(--plot); outline-offset: 3px; }

/* On a phone the header keeps the App Store pill rather than Support, which the footer has. */
@media (max-width: 420px) {
  header.site nav .pill { display: inline-flex; }
  header.site nav a[href="support/"] { display: none; }
}

/* ---------- Intro ---------- */

.intro {
  overflow: hidden;
  background:
    radial-gradient(55% 60% at 68% 46%, rgba(163, 217, 224, 0.22), transparent 70%),
    linear-gradient(180deg, var(--deep) 0%, var(--navy) 58%, var(--ink) 100%);
}

/* The plot's grid, faint, fading out towards the edges. */
.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(163, 217, 224, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 217, 224, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 70% at 62% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 62% 45%, #000 20%, transparent 75%);
  pointer-events: none;
}

.intro .wrap {
  position: relative;
  display: grid;
  gap: 4px;
  padding-top: 12px;
  padding-bottom: 64px;
}

.intro-art { animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) both; }

.intro-art picture { width: min(100%, 640px); margin: 0 auto; }

.intro-art img { filter: drop-shadow(0 50px 60px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 90px rgba(163, 217, 224, 0.14)); }

.intro-copy { text-align: center; animation: rise 1.1s .15s cubic-bezier(.2, .7, .2, 1) both; }

.intro .wordmark { --s: clamp(34px, 8.6vw, 64px); margin: 18px 0 0; }

.intro .tagline {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 26px 0 16px;
  background: linear-gradient(180deg, #ffffff 30%, #b9dbe4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro .sub {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  max-width: 30em;
  margin: 0 auto 28px;
}

.intro .cta-row { justify-content: center; }

/* Beside the badge the trailer is a plain link: a pill next to its square corners clashed, and
   the badge stays the row's one container. */
.intro .button.ghost { border-color: transparent; background: none; padding-inline: 10px; }

.intro .button.ghost:hover { background: none; color: var(--plot); }

/* Side by side on a phone rather than stacked: 48 px is still over Apple's 40, and 12 px is a
   quarter of it. */
@media (max-width: 939px) {
  .intro .badge img { height: 48px; }
  .intro .cta-row { gap: 12px; }
}

@media (min-width: 940px) {
  .intro .wrap {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 24px;
    min-height: min(calc(100vh - 60px), 900px);
    padding-top: 40px;
    padding-bottom: 80px;
  }
  .intro-copy { text-align: left; }
  .intro .sub { margin-left: 0; }
  .intro .cta-row { justify-content: flex-start; }
  .intro-copy { grid-area: 1 / 1; }
  .intro-art { grid-area: 1 / 2; }
  .intro-art picture { width: 106%; max-width: none; margin: 0 -8% 0 2%; }
}

/* Three facts under the intro. */
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.facts li { display: flex; align-items: center; gap: 12px; }

.facts strong { color: var(--text); font-weight: 650; }

.facts svg { width: 22px; height: 22px; color: var(--plot); flex: none; }

@media (min-width: 700px) { .facts { grid-auto-flow: column; justify-content: space-between; } }

@media (min-width: 940px) { .facts { grid-area: 2 / 1 / 3 / 3; } }

/* ---------- Trailer ---------- */

.trailer { padding-top: 24px; }

.video {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  overflow: hidden;
  background: var(--deep);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--line);
  cursor: pointer;
}

.video picture, .video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video img { object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }

.video:hover img { transform: scale(1.02); }

.video .play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(64px, 9vw, 92px);
  height: clamp(64px, 9vw, 92px);
  translate: -50% -50%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #06202b;
  background: rgba(195, 236, 241, 0.92);
  box-shadow: 0 0 0 10px rgba(163, 217, 224, 0.16), 0 20px 50px rgba(0, 0, 0, 0.45);
  transition: transform .25s ease;
}

.video:hover .play { transform: scale(1.06); }

.video .play svg { width: 38%; height: 38%; margin-left: 6%; }

.video .label {
  position: absolute;
  left: 22px;
  bottom: 18px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(236, 244, 248, 0.86);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.video.playing { cursor: default; }

.video.playing .play, .video.playing .label { display: none; }

/* ---------- The two modes ---------- */

.modes { display: grid; gap: 20px; }

@media (min-width: 860px) { .modes { grid-template-columns: 1fr 1fr; } }

.mode {
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 60% at 50% 38%, rgba(163, 217, 224, 0.16), transparent 72%),
    linear-gradient(180deg, var(--navy), var(--deep));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mode .art {
  height: clamp(340px, 46vw, 520px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 36px 24px 0;
}

.mode .art picture { height: 100%; }

.mode .art img { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; }

/* Two Duos side by side are wider than tall: let them use the card's width. */
.mode .art.pair { align-items: center; padding: 24px 16px; }

.mode .art.pair picture { height: auto; width: 100%; }

.mode .art.pair img { height: auto; width: 100%; }

/* The flat Duo stands taller than its card: show its top, and let its foot run under the text. */
.mode.flat .art { align-items: flex-start; overflow: hidden; }

.mode.flat .art picture { height: 128%; flex: none; }

.mode .text { padding: 28px 28px 32px; border-top: 1px solid var(--line); background: rgba(4, 13, 19, 0.35); position: relative; }

.mode .tag { font-size: 13px; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--plot); }

.mode h3 { font-size: clamp(26px, 3vw, 32px); font-weight: 700; margin: 10px 0 10px; }

.mode p { color: var(--muted); margin: 0; font-size: 17px; }

/* ---------- Three more things the Duo does ---------- */

.trio { display: grid; gap: 20px; margin-top: 20px; }

@media (min-width: 760px) { .trio { grid-template-columns: 1fr 1fr; } }

.feature {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feature .art {
  aspect-ratio: 5 / 4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 28px 24px 0;
  overflow: hidden;
  background: radial-gradient(70% 70% at 50% 60%, rgba(163, 217, 224, 0.12), transparent 75%);
}

.feature .art picture { width: 46%; }

.feature .art img { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5)); }



.feature .art.classic { background: radial-gradient(70% 70% at 50% 60%, rgba(45, 90, 230, 0.28), transparent 75%); }

.feature .text { padding: 22px 24px 26px; }

.feature .tag { font-size: 12px; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fire); }

.feature h3 { font-size: 22px; font-weight: 680; margin: 8px 0 8px; letter-spacing: -0.015em; }

.feature p { color: var(--muted); margin: 0; font-size: 16px; }

/* ---------- The ocean, from morning to night ---------- */

.ocean { background: linear-gradient(180deg, var(--ink), var(--deep) 30%, var(--deep) 70%, var(--ink)); }

/* Half the page from 900px: the words on the left, the picture on the right at its own shape. */
.ocean-grid { display: grid; gap: 36px; align-items: center; }

@media (min-width: 900px) { .ocean-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }

.ocean-copy .head { margin-bottom: 0; }

.tod-stage {
  position: relative;
  aspect-ratio: 1400 / 1298;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--line);
  background: var(--navy);
}

.tod-stage picture { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }

.tod-stage picture.on { opacity: 1; }

.tod-stage img { width: 100%; height: 100%; object-fit: cover; }

.tod-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(4, 13, 19, 0.55));
  pointer-events: none;
}

/* Under the picture, where they never cover the fleet. */
.tod { position: relative; }

.tod-tabs {
  width: fit-content;
  margin: 14px auto 0;
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(4, 13, 19, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.tod-tabs button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  min-height: 40px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: rgba(236, 244, 248, 0.78);
  background: transparent;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.tod-tabs button[aria-pressed="true"] { background: rgba(236, 244, 248, 0.92); color: #06202b; }

@media (max-width: 420px) { .tod-tabs button { padding: 8px 12px; font-size: 14px; } }

.ocean-points { display: grid; gap: 14px; margin-top: 32px; }

.ocean-points div { border-top: 1px solid var(--line); padding-top: 16px; }

.ocean-points strong { display: block; font-size: 18px; font-weight: 650; margin-bottom: 4px; }

.ocean-points span { color: var(--muted); font-size: 16px; }

/* ---------- Picture beside words ---------- */

.split { display: grid; gap: 44px; align-items: center; }

.split .device-shot { width: min(100%, 420px); margin: 0 auto; }

@media (min-width: 900px) {
  .split { grid-template-columns: 0.85fr 1.15fr; gap: 72px; }
  .split.flip { grid-template-columns: 1.15fr 0.85fr; }
  .split.flip .device-shot { order: 2; }
}

.split h2 { font-size: clamp(34px, 5vw, 54px); font-weight: 720; margin: 12px 0 16px; }

.split .lede { color: var(--muted); font-size: clamp(17px, 2vw, 20px); margin: 0 0 28px; }

/* The two rulebooks. */
.rulebooks { display: grid; gap: 14px; }

.rulebook { padding: 24px 24px 22px; }

.rulebook .tag { font-size: 13px; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--plot); }

.rulebook h3 { font-size: 24px; font-weight: 690; margin: 8px 0 6px; letter-spacing: -0.015em; }

.rulebook p { color: var(--muted); margin: 0; font-size: 16px; }

.rulebook.enhanced { background: radial-gradient(80% 90% at 100% 0%, rgba(255, 145, 71, 0.14), transparent 60%), var(--card); }

.rulebook.enhanced .tag { color: var(--fire); }

.weapons { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }

@media (min-width: 520px) { .weapons { grid-template-columns: 1fr 1fr; } }

.weapons li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.3;
}

.weapons svg { width: 22px; height: 22px; color: var(--fire); flex: none; }

.weapons strong { display: block; font-weight: 650; }

.weapons span { color: var(--muted); font-size: 14px; }

/* Ways to play. */
.ways { display: grid; gap: 12px; }

@media (min-width: 560px) { .ways { grid-template-columns: 1fr 1fr; } }

.way { padding: 22px 22px 20px; }

.way h3 { font-size: 20px; font-weight: 680; margin: 16px 0 6px; letter-spacing: -0.015em; }

.way p { color: var(--muted); margin: 0; font-size: 15px; }

.icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(163, 217, 224, 0.1);
  border: 1px solid rgba(163, 217, 224, 0.25);
  color: var(--plot);
}

.icon svg { width: 24px; height: 24px; }

/* The shipyard's list. */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }

.ticks li { display: flex; gap: 14px; align-items: flex-start; font-size: 17px; }

.ticks svg { flex: none; width: 22px; height: 22px; color: var(--plot); margin-top: 3px; }

.ticks span { color: var(--muted); }

/* ---------- Closing ---------- */

.closing { text-align: center; padding: clamp(72px, 9vw, 110px) 0 clamp(88px, 11vw, 124px); overflow: hidden; }

.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(45% 55% at 50% 45%, rgba(163, 217, 224, 0.14), transparent 70%);
  pointer-events: none;
}

.closing .wrap { position: relative; }

.closing .icon-art { display: block; margin: 0 auto; width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 20px 60px rgba(163, 217, 224, 0.18); }

.closing .wordmark { --s: clamp(30px, 5vw, 56px); margin: 30px 0 22px; }

.closing p { color: var(--muted); font-size: 19px; margin: 0 0 28px; }

.closing .cta-row { justify-content: center; }

header.site nav a.pill { color: var(--plot); text-decoration: none; }
