/* Figbook website. Values come from the Paper file (artboard "Website / Home /
   Coming soon / Desktop") and the tokens in docs/design/DESIGN_SYSTEM.md.
   No inline styles and no scripts: the Content-Security-Policy in _headers
   allows only this file. Motion is CSS only and off under reduced motion. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../fonts/Figtree-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Variable.ttf") format("truetype");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --bg: #f3f0e8;
  --surface: #faf8f3;
  --sunken: #e6e1d6;
  --border: #d2ccbe;
  --text: #231a26;
  --text-2: #5c554e;
  --text-3: #6e675e;
  --primary: #6b2f6e;
  --accent: #c23e72;
  --highlight: #ebd9ec;
  --chip-bg: #ebd9ec;
  --chip-text: #6b2f6e;

  /* The plum hero and the ink band keep their colours in both themes. */
  --hero-bg: #4e2151;
  --hero-deep: #2e1330;
  --hero-ink: #ffffff;
  --hero-soft: #ebd9ec;
  --band-bg: #231a26;
  --band-text: #f3f0e8;
  --band-text-2: #b9afbc;
  --band-text-3: #8f8494;
  --band-border: #40354a;
  --band-primary: #d9a9dc;
  --art-bg: #f3f0e8;

  --display: "Fraunces", Georgia, serif;
  --body: "Figtree", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(20px, 5.6vw, 80px);
  --section: clamp(72px, 9vw, 112px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-lift: 0 18px 40px -18px rgb(35 26 38 / 0.35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17121a;
    --surface: #211a25;
    --sunken: #2d2432;
    --border: #40354a;
    --text: #f3f0e8;
    --text-2: #b9afbc;
    --text-3: #8f8494;
    --primary: #d9a9dc;
    --accent: #ee7fa6;
    --highlight: #4e2151;
    --chip-bg: #2e1330;
    --chip-text: #d9a9dc;
    --hero-bg: #2e1330;
    --hero-deep: #17121a;
    --band-bg: #211a25;
    --shadow-lift: 0 18px 40px -18px rgb(0 0 0 / 0.7);
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

/* The width and height attributes reserve space; the CSS sizes the image. */
img {
  height: auto;
}

h1,
h2,
h3,
p,
figure,
pre {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 16px;
  text-transform: uppercase;
  color: var(--text-3);
}

.h2 {
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.09;
  text-wrap: balance;
}

.lead {
  font-size: 18px;
  line-height: 28px;
  color: var(--text-2);
}

/* Links draw their underline in from the left on hover. */
.link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.35s var(--ease);
  padding-bottom: 1px;
}

.link:hover {
  background-size: 0 1px;
  background-position: 100% 100%;
}

.link .arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease);
}

.link:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Brand ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand svg {
  width: 28px;
  height: 28px;
  transition: transform 0.5s var(--ease);
}

.brand:hover svg {
  transform: rotate(-8deg) scale(1.06);
}

.brand-ink {
  stroke: currentColor;
}

.brand-dot {
  fill: var(--accent);
}

.brand-word {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 32px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  view-transition-name: site-header;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  position: relative;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  color: var(--text);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1.5px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.chip .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--hero-bg);
  color: var(--hero-ink);
  overflow: clip;
}

.hero .wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 64px;
  padding-top: 88px;
}

.hero-text {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 720px;
  padding-bottom: 112px;
  align-self: center;
}

.hero .eyebrow {
  color: var(--hero-soft);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(44px, 6.7vw, 96px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

.hero h1 span {
  display: block;
}

.hero-lead {
  max-width: 560px;
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--hero-soft);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    background-color 0.35s var(--ease),
    color 0.35s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

.btn .arrow {
  transition: transform 0.35s var(--ease);
}

.btn:hover .arrow {
  transform: translateY(3px);
}

.btn-solid {
  background: #f3f0e8;
  color: #231a26;
}

.btn-solid:hover {
  box-shadow: 0 14px 30px -12px rgb(0 0 0 / 0.5);
}

.btn-line {
  padding: 15px 27px;
  border: 1px solid var(--hero-soft);
  color: var(--hero-ink);
}

.btn-line:hover {
  background: rgb(255 255 255 / 0.1);
}

.hero-meta {
  color: var(--hero-soft);
  font-weight: 400;
}

.hero-art {
  position: relative;
  flex-shrink: 0;
  width: 410px;
}

.hero-phone {
  width: 410px;
  height: 720px;
  object-fit: cover;
  object-position: top;
  filter: drop-shadow(0 40px 60px rgb(23 18 26 / 0.45));
}

/* The narrator's line sits where the lead ends, as in the design: beside the
   lead and the buttons, never over them. */
.cue {
  position: absolute;
  left: 560px;
  bottom: 146px;
  z-index: 1;
  width: 290px;
}

.bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 40px rgb(23 18 26 / 0.35);
}

.bubble-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bubble-head svg {
  width: 36px;
  height: 16px;
  color: var(--primary);
}

.bubble .eyebrow {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
}

.bubble-line {
  font-family: var(--display);
  font-size: 20px;
  line-height: 30px;
}

/* Each spoken phrase wraps as a whole, as in the design. */
.bubble-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 6px;
}

.bubble-line > * {
  white-space: nowrap;
}

.bubble-line .said {
  color: var(--text-3);
}

.bubble-line mark {
  padding-inline: 6px;
  border-radius: 4px;
  background: var(--highlight);
  color: var(--text);
}

.sync-link {
  position: absolute;
  bottom: calc(100% - 2px);
  left: 140px;
  width: 200px;
  height: 206px;
  color: var(--hero-soft);
}

.hero-mac {
  display: none;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgb(35 26 38 / 0.45),
    0 2px 6px rgb(35 26 38 / 0.25);
}

.hero-mac img {
  width: 100%;
}

/* On Mac the window takes the place of the phone, under the words. */
.hero:has([value="mac"]:checked) .wrap {
  flex-direction: column;
  align-items: stretch;
  gap: 72px;
}

.hero:has([value="mac"]:checked) .hero-text {
  align-self: stretch;
  max-width: none;
  padding-bottom: 0;
}

.hero:has([value="mac"]:checked) :is(.hero-art, .cue) {
  display: none;
}

.hero:has([value="mac"]:checked) .hero-mac {
  display: block;
}

@media (min-width: 1181px) {
  .hero:has([value="mac"]:checked) .hero-text {
    display: grid;
    grid-template-columns: minmax(0, 716px) minmax(0, 500px);
    justify-content: space-between;
    align-items: end;
    gap: 40px 32px;
  }

  .hero:has([value="mac"]:checked) .hero-text > * {
    grid-column: 1 / -1;
  }

  .hero:has([value="mac"]:checked) h1 {
    grid-column: 1;
    grid-row: 3;
  }

  .hero:has([value="mac"]:checked) .hero-lead {
    grid-column: 2;
    grid-row: 3;
    padding-bottom: 10px;
  }
}

/* ---------- Device switch ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Two equal halves, so one thumb can slide from the first to the second. */
.switch {
  position: relative;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  align-self: flex-start;
  justify-self: start;
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid rgb(235 217 236 / 0.25);
  border-radius: 999px;
  background: var(--hero-deep);
}

.switch::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: #f3f0e8;
  transition: transform 0.45s var(--ease);
}

.switch:has([value="mac"]:checked)::before {
  transform: translateX(100%);
}

.switch label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 18px;
  color: var(--hero-soft);
  cursor: pointer;
  transition:
    color 0.35s var(--ease),
    transform 0.2s var(--ease);
}

/* The radio covers its label: it stays focusable and clickable, unseen. */
.switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch svg {
  flex-shrink: 0;
}

.switch label:hover {
  color: var(--hero-ink);
}

.switch label:has(:checked) {
  color: #231a26;
}

.switch label:has(:focus-visible) {
  outline: 2px solid var(--hero-soft);
  outline-offset: 2px;
}

.switch-light {
  border-color: transparent;
  background: var(--sunken);
}

.switch-light::before {
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(35 26 38 / 0.12);
}

.switch-light label {
  color: var(--text-2);
}

.switch-light label:hover,
.switch-light label:has(:checked) {
  color: var(--text);
}

.switch-light label:has(:focus-visible) {
  outline-color: var(--primary);
}

/* Without :has() the choice could not show, so only the iPhone story is told. */
@supports not selector(:has(*)) {
  .switch {
    display: none;
  }
}

/* ---------- Storyboard ---------- */

.story {
  background: var(--bg);
  overflow: clip;
}

.story .wrap {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding-top: 120px;
}

.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 64px;
}

.story .h2-big {
  max-width: 640px;
  font-family: var(--display);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.03;
  text-wrap: balance;
}

.split-title {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.split > p {
  max-width: 440px;
  font-size: 20px;
  line-height: 30px;
  color: var(--text-2);
}

.story .on-mac {
  display: none;
}

.story:has([value="mac"]:checked) .on-iphone {
  display: none;
}

.story:has([value="mac"]:checked) .on-mac {
  display: block;
}

.story:has([value="mac"]:checked) .story-mac {
  display: flex;
}

.story-mac {
  flex-direction: column;
  gap: 64px;
}

/* Each Mac step is a radio that covers it; the checked one picks the window below. */
.steps-mac .step {
  position: relative;
  border-radius: 12px;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.35s var(--ease);
}

.steps-mac .step:has(:checked) {
  opacity: 1;
}

/* A tap leaves :hover behind on touch screens, so only a pointer previews. */
@media (hover: hover) {
  .steps-mac .step:hover {
    opacity: 1;
  }
}

.steps-mac input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.steps-mac .step:has(:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 8px;
}

.steps-mac .step-text {
  min-height: 0;
}

.steps-mac .step:has(:checked) .step-num::after {
  background-size: 100% 100%;
}

/* The three shots share one cell and cross-fade. */
.mac-window {
  display: grid;
  width: 100%;
  max-width: 1280px;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  box-shadow:
    0 24px 64px rgb(35 26 38 / 0.18),
    0 2px 6px rgb(35 26 38 / 0.1);
}

.mac-window img {
  grid-area: 1 / 1;
  width: 100%;
  opacity: 0;
  transform: scale(1.015);
  transition:
    opacity 0.6s var(--ease),
    transform 0.8s var(--ease);
}

.story-mac:has([value="listen"]:checked) .shot-listen,
.story-mac:has([value="figure"]:checked) .shot-figure,
.story-mac:has([value="focus"]:checked) .shot-focus {
  opacity: 1;
  transform: none;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-inline: 4px;
  min-height: 108px;
}

.step-num {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 16px;
  color: var(--primary);
}

.step-num::after {
  content: "";
  flex-grow: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--primary), var(--primary)) 0 0 / 0% 100% no-repeat, var(--border);
  transition: background-size 0.8s var(--ease);
}

.step:hover .step-num::after,
.steps:not(.steps-mac) .step:first-child .step-num::after {
  background-size: 100% 100%;
}

.step h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.step p {
  color: var(--text-2);
}

.step img {
  width: 100%;
  max-width: 410px;
  aspect-ratio: 410 / 600;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s var(--ease);
}

.step:hover img {
  transform: translateY(-10px);
}

/* ---------- Privacy band ---------- */

.band {
  background: var(--band-bg);
  color: var(--band-text);
}

.band .wrap {
  display: flex;
  gap: 64px;
  padding-block: var(--section);
}

.band-title {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0;
  width: 400px;
}

.band .eyebrow {
  color: var(--band-text-3);
}

.band-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex-grow: 1;
}

.band-body > p {
  font-size: 20px;
  line-height: 32px;
  color: var(--band-text-2);
}

.promises {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 160px));
  gap: 16px;
  margin: 0;
  padding: 28px 0 0;
  list-style: none;
  border-top: 1px solid var(--band-border);
}

.promises li {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
}

.promises svg {
  width: 32px;
  height: 32px;
  color: var(--band-primary);
  transition: transform 0.5s var(--ease);
}

.promises li:hover svg {
  transform: translateY(-3px) rotate(-6deg);
}

.proof {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--band-border);
}

.proof p {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--band-text-2);
}

.proof svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--band-primary);
}

.band .link {
  flex-shrink: 0;
  color: var(--band-primary);
}

/* ---------- Study tools ---------- */

.tools {
  background: var(--surface);
}

.tools .wrap {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-block: var(--section);
}

.tools .h2 {
  max-width: 620px;
}

.tools .split > p {
  max-width: 420px;
  font-size: 18px;
  line-height: 28px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  display: flex;
  flex-direction: column;
  overflow: clip;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  transition:
    transform 0.45s var(--ease),
    box-shadow 0.45s var(--ease),
    border-color 0.45s var(--ease);
}

.tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.tile-art {
  background: var(--art-bg);
  overflow: clip;
}

.tile-art img {
  width: 100%;
  aspect-ratio: 303 / 200;
  transition: transform 0.6s var(--ease);
}

.tile:hover .tile-art img {
  transform: scale(1.05);
}

.tile-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border);
}

.tile h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.tile p {
  font-size: 15px;
  line-height: 22px;
  color: var(--text-2);
}

/* ---------- Launch ---------- */

.launch .wrap {
  display: flex;
  gap: 64px;
  padding-block: var(--section);
}

.launch-title {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0;
  width: 400px;
}

.platforms {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-grow: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition:
    transform 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.platform:hover {
  transform: translateX(6px);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.platform.later {
  border-style: dashed;
  background: transparent;
}

.platform div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.platform strong {
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.platform.later strong {
  color: var(--text-2);
}

.status {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 16px;
  text-transform: uppercase;
}

.platform.later .status {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
}

/* ---------- Format teaser ---------- */

.format {
  border-top: 1px solid var(--border);
  background: var(--surface);
  scroll-margin-top: 24px;
}

.format .wrap {
  display: flex;
  gap: 64px;
  padding-block: var(--section);
}

.format-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0;
  width: 400px;
}

.publishers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.publishers strong {
  font-weight: 600;
  line-height: 22px;
}

.publishers p {
  color: var(--text-2);
}

.publishers .link {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 15px;
}

.code {
  flex-grow: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 32px 36px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 26px;
  transition: border-color 0.4s var(--ease);
}

.code:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.code .k {
  color: var(--primary);
}

.code .fig {
  display: inline-block;
  margin-inline: -8px;
  padding-inline: 8px;
  border-radius: 6px;
  background: var(--highlight);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer .wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-top: 64px;
  padding-bottom: 56px;
}

.site-footer .brand svg {
  width: 22px;
  height: 22px;
}

.site-footer .brand-word {
  font-size: 22px;
  line-height: 28px;
}

.site-footer .fine {
  margin-top: 16px;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-3);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.footer-nav a {
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-nav .mail {
  font-family: var(--mono);
  font-weight: 400;
}

/* ---------- Text pages (privacy, security, 404) ---------- */

.doc {
  padding-block: clamp(56px, 8vw, 104px);
}

.doc .wrap {
  max-width: calc(720px + 2 * var(--gutter));
}

.doc header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.doc h1 {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.doc h2 {
  margin-top: 40px;
  margin-bottom: 12px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.doc p,
.doc li {
  font-size: 18px;
  line-height: 30px;
  color: var(--text-2);
}

.doc p + p {
  margin-top: 16px;
}

.doc ul,
.doc ol {
  margin: 0;
  padding-left: 22px;
}

.doc li + li {
  margin-top: 10px;
}

.doc strong {
  color: var(--text);
  font-weight: 600;
}

.doc code {
  font-family: var(--mono);
  font-size: 0.88em;
}

/* ---------- Narrow windows ---------- */

/* The bubble needs the room between the end of the lead and the phone; below
   this width it would cover more than the phone's edge. */
@media (max-width: 1320px) {
  .cue {
    display: none;
  }
}

@media (max-width: 1180px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .band .wrap,
  .launch .wrap,
  .format .wrap {
    flex-direction: column;
    gap: 40px;
  }

  .band-title,
  .launch-title,
  .format-text {
    width: auto;
    max-width: 640px;
  }
}

@media (max-width: 900px) {
  .nav .nav-link {
    display: none;
  }

  .hero .wrap {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding-top: 56px;
  }

  .hero-text {
    align-self: stretch;
    gap: 28px;
    padding-bottom: 56px;
  }

  .hero-art,
  .hero-phone {
    width: min(340px, 100%);
    height: auto;
  }

  .hero-phone {
    aspect-ratio: 410 / 560;
  }

  .split {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .story .wrap {
    gap: 40px;
    padding-top: 72px;
  }

  /* The three phones scroll sideways inside the section, never the page. */
  .steps {
    display: flex;
    gap: 16px;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }

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

  .step {
    flex: 0 0 min(300px, 80%);
    scroll-snap-align: start;
  }

  .step-num::after {
    background-size: 100% 100%;
  }

  .steps-mac .step:not(:has(:checked)) .step-num::after {
    background-size: 0% 100%;
  }

  /* The Mac steps are words only: they stack above the window. */
  .steps-mac {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }

  .story-mac {
    gap: 40px;
  }

  .hero:has([value="mac"]:checked) .wrap {
    gap: 48px;
  }

  .promises {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 28px;
  }

  .proof {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .site-header .wrap {
    padding-block: 20px;
  }

  .brand-word {
    font-size: 24px;
  }

  .tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform {
    padding: 18px 20px;
  }

  .platform strong {
    font-size: 16px;
    line-height: 22px;
  }

  .code {
    padding: 24px 20px;
    font-size: 13px;
    line-height: 22px;
  }

  .btn {
    padding: 14px 22px;
    font-size: 16px;
  }

  .btn-line {
    padding: 13px 21px;
  }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* Page to page: the header stays, the page underneath fades and rises. */
  @view-transition {
    navigation: auto;
  }

  html {
    scroll-behavior: smooth;
  }

  ::view-transition-old(root) {
    animation: page-out 0.25s var(--ease) both;
  }

  ::view-transition-new(root) {
    animation: page-in 0.5s var(--ease) both;
  }

  /* Hero entrance: words, then the phone, then the narrator catches up. */
  .hero-text > :not(.cue) {
    animation: rise 0.9s var(--ease) both;
  }

  .hero-text > :nth-child(2) {
    animation-delay: 0.06s;
  }

  .hero-text > :nth-child(3) {
    animation-delay: 0.12s;
  }

  .hero-text > :nth-child(4) {
    animation-delay: 0.18s;
  }

  .hero-text > :nth-child(5) {
    animation-delay: 0.24s;
  }

  .hero-phone {
    animation: phone-in 1.2s var(--ease) 0.2s both;
  }

  /* Switching device: what was hidden fades in out of a soft blur. An
     element that turns visible restarts its animation; the hero words
     stay visible, so on Mac they replay under another keyframe name. */
  .hero-mac,
  .hero-art,
  .story-mac,
  .steps.on-iphone,
  .split > p {
    animation: swap 0.7s var(--ease) both;
  }

  .hero:has([value="mac"]:checked) .hero-text > :not(.cue, .switch) {
    animation-name: rise-again;
  }

  .switch label:active {
    transform: scale(0.97);
  }

  .bubble {
    animation:
      pop 0.7s var(--ease) 0.9s both,
      float 6s ease-in-out 1.6s infinite;
  }

  .bubble-line mark {
    background-image: linear-gradient(var(--highlight), var(--highlight));
    background-color: transparent;
    background-repeat: no-repeat;
    background-size: 0% 100%;
    animation: highlight 0.9s var(--ease) 1.4s forwards;
  }

  .bubble-head path {
    transform-origin: center;
    transform-box: fill-box;
    animation: wave 1.1s ease-in-out infinite alternate;
  }

  .sync-link {
    animation: draw 1.4s var(--ease) 1.2s both;
  }

  .sync-link circle {
    animation: dot 0.4s var(--ease) 2.4s both;
  }

  .chip .pulse {
    animation: pulse 2s ease-in-out infinite;
  }

  /* Sections rise into place as they scroll in, where the browser can. */
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }

    .step:nth-child(2),
    .tile:nth-child(2),
    .platform:nth-child(2) {
      animation-range: entry 8% entry 68%;
    }

    .step:nth-child(3),
    .tile:nth-child(3),
    .platform:nth-child(3) {
      animation-range: entry 16% entry 76%;
    }

    .tile:nth-child(4) {
      animation-range: entry 24% entry 84%;
    }
  }
}

/* Reduced motion: hovers still change colour and underline, but nothing
   moves, and every state change is instant. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .link:hover .arrow,
  .brand:hover svg,
  .btn:hover,
  .btn:hover .arrow,
  .step:hover img,
  .promises li:hover svg,
  .tile:hover,
  .tile:hover .tile-art img,
  .platform:hover {
    transform: none;
  }
}

@keyframes page-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

@keyframes rise-again {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

@keyframes swap {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(16px);
  }
}

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

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.94);
  }
}

@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes highlight {
  to {
    background-size: 100% 100%;
  }
}

@keyframes wave {
  from {
    transform: scaleY(0.55);
  }
}

/* The link grows from the bubble (bottom left) to the phone (top right). */
@keyframes draw {
  from {
    clip-path: inset(100% 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes dot {
  from {
    opacity: 0;
    transform: scale(0);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
}
