:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  line-height: 1.5;
  color: #1d1d1f;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;

  /* Brand — used sparingly (accents, active states, CTA emphasis), never as a wash */
  --cp-blue: #0a5fd8;
  --cp-blue-soft: #eef4ff;
  --text-secondary: #6e6e73;
  --text-tertiary: #6e6e73;
  --hairline: #e8e8ed;
  --surface: #f5f5f7;

  /* Fluid spacing so section rhythm scales continuously with the viewport. */
  --content-gutter: clamp(16px, 4vw, 40px);
  --content-max: 1200px;
  --product-max: 1120px;
  --section-gap: clamp(64px, 10vw, 128px);
  --title-gap: clamp(24px, 4vw, 40px);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-padding-top: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #ffffff;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cp-blue);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

.page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 8px 12px;
  background: #1d1d1f;
  color: #fff;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
}

/* ─── TOP NAV ─── */

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 12px;
  flex-wrap: wrap;
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-nav-logo {
  width: 28px;
  height: 28px;
}

.top-nav-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--text-secondary);
}

.top-nav-links a {
  padding: 6px 0;
  transition: color 0.15s;
}

.top-nav-links a:hover {
  color: #1d1d1f;
}

.top-nav-links .top-nav-cta {
  color: #fff;
  background: var(--cp-blue);
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
}

.top-nav-links .top-nav-cta:hover {
  color: #fff;
  background: #0852bc;
}

.top-nav-toggle {
  display: none;
  border: none;
  background: var(--surface);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Two-line menu glyph drawn in CSS, so there's no icon font or image to load. */
.top-nav-toggle span,
.top-nav-toggle span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: #1d1d1f;
  border-radius: 1px;
  transition: transform 0.2s ease;
}

.top-nav-toggle span {
  position: relative;
  transform: translateY(-3px);
}

.top-nav-toggle span::after {
  content: "";
  position: absolute;
  top: 6px;
}

.top-nav-toggle[aria-expanded="true"] span {
  transform: translateY(0) rotate(45deg);
}

.top-nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-6px) rotate(-90deg);
}

/* ─── BUTTONS ─── */

.download-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.store-button,
.mac-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 184px;
  min-height: 58px;
  padding: 8px 22px 8px 18px;
  border-radius: 16px;
  line-height: 1.15;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.store-button {
  background: #000;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.mac-button {
  background: var(--cp-blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(10, 95, 216, 0.28);
}

.store-button:not([aria-disabled="true"]):hover,
.mac-button:not([aria-disabled="true"]):hover {
  transform: translateY(-1px);
}

/* Not available yet (see downloadLinks in scripts.js): same button, no link affordance. */
.store-button[aria-disabled="true"],
.mac-button[aria-disabled="true"] {
  cursor: default;
}

.button-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.button-icon {
  width: 28px;
  height: 28px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.store-button-small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

.store-button-large {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.requirements {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ─── HERO ─── */

.hero {
  padding: clamp(24px, 5vw, 56px) 0 0;
  text-align: center;
}

.hero-text {
  max-width: 820px;
  margin: 0 auto clamp(24px, 4vw, 40px);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--cp-blue);
  background: var(--cp-blue-soft);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
}

.hero-text h1 {
  font-size: clamp(38px, 6vw + 0.5rem, 76px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(17px, 1vw + 14px, 21px);
  line-height: 1.45;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 28px;
}

/* Hero scene — bleeds past .page's max-width on wide viewports so the product is shown
   larger than the text column above it. Standard full-bleed trick: 100vw + centre. */
.hero-composite-bleed {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
}

/* The studio backdrop + three device frames (Mac behind, iPad + iPhone in front). */
.hero-scene {
  position: relative;
  width: min(100%, 1774px);
  margin: 0 auto;
  aspect-ratio: 1774 / 887;
  isolation: isolate;
}

.hero-scene-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Fades the backdrop's photo edges into the page, so the scene dissolves into it rather
   than sitting in an obvious rectangle. */
.hero-scene-fade {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.hero-scene-fade-top {
  top: 0; left: 0; right: 0; height: 10%;
  background: linear-gradient(to bottom, #fff, transparent);
}
.hero-scene-fade-bottom {
  bottom: 0; left: 0; right: 0; height: 7%;
  background: linear-gradient(to top, #fff, transparent);
}
.hero-scene-fade-left {
  top: 0; height: 55%; left: 0; width: 9%;
  background: linear-gradient(to right, #fff, transparent);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
}
.hero-scene-fade-right {
  top: 0; height: 55%; right: 0; width: 9%;
  background: linear-gradient(to left, #fff, transparent);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
}

/* Compound selectors so these win over the generic .device-frame rules below. A tight,
   overlapping cluster: the Mac anchors large and centred; the iPad and iPhone sit low in
   the foreground and cut into its footprint. */
.hero-scene .hero-device-mac,
.hero-scene .hero-device-ipad,
.hero-scene .hero-device-iphone {
  position: absolute;
  z-index: 2;
}

.hero-scene .hero-device-mac {
  width: 58%;
  left: 21%;
  top: 12%;
}

.hero-scene .hero-device-ipad {
  z-index: 3;
  width: 43%;
  left: 2%;
  bottom: 4%;
}

.hero-scene .hero-device-iphone {
  z-index: 4;
  width: 18%;
  right: 12%;
  bottom: 3%;
}

/* ─── DEVICE FRAME (reusable) ───
   A real screenshot behind a hardware image with a transparent screen opening. The frame
   owns clipping and aspect; the page owns size and position. */
.device-frame {
  position: relative;
  width: 100%;
}

.device-frame-hardware {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.device-frame-screen {
  position: absolute;
  z-index: 1;
  overflow: hidden;
  background: #000;
}

.device-frame-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Screen-opening geometry is generated by marketing-captures/optimize.py from each
   frame's alpha channel, after it stretches the frame so the opening has exactly the
   screenshot's shape. The opening sits a pixel under the opaque bezel, whose alpha,
   painted on top, defines the rounded corners. Don't edit the generated block by hand. */
/* BEGIN device-frame geometry (generated by marketing-captures/optimize.py) */
.device-frame--mac { aspect-ratio: 1536 / 1088; }
.device-frame--mac .device-frame-screen {
  left: 8.594%; right: 8.594%; top: 10.846%; bottom: 15.993%;
}
.device-frame--ipad { aspect-ratio: 1510 / 1096; }
.device-frame--ipad .device-frame-screen {
  left: 8.344%; right: 8.344%; top: 10.584%; bottom: 10.310%;
}
.device-frame--iphone { aspect-ratio: 760 / 1092; }
.device-frame--iphone .device-frame-screen {
  left: 20.000%; right: 20.132%; top: 4.487%; bottom: 5.495%;
}
/* END device-frame geometry */

/* ─── SECTIONS ───
   Every section uses one template: a centred header (eyebrow, title, lead) above its
   content. Alternate sections sit on a full-width grey band for rhythm. */

.section {
  padding: var(--section-gap) 0;
}

.section--band {
  position: relative;
  isolation: isolate;
}

.section--band::before {
  content: "";
  position: absolute;
  inset: 0 50%;
  width: 100vw;
  margin-left: -50vw;
  background: var(--surface);
  z-index: -1;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--title-gap);
}

.section-eyebrow {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cp-blue);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(32px, 3.4vw + 0.75rem, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.section-lead {
  font-size: clamp(17px, 0.5vw + 15px, 21px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 16px auto 0;
}

/* ─── CARDS ───
   One card style for features, app groups, setup steps and privacy points: white on grey
   bands, grey on white sections. */

.card-grid,
.feature-cards {
  list-style: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border-radius: 24px;
  padding: 28px;
}

.section--band .card {
  background: #fff;
}

.card h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 8px;
}

.card p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(160deg, #3d8bff, var(--cp-blue));
  margin-bottom: 18px;
}

.icon-tile svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(160deg, #3d8bff, var(--cp-blue));
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
}

/* ─── TRACKPAD & KEYBOARD ─── */

.feature-split {
  display: grid;
  grid-template-columns: auto minmax(0, 560px);
  justify-content: center;
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}

.feature-device {
  width: 290px;
}

/* Input demo (scripts.js), in step with the three cards beside it: gestures on the full
   trackpad, a tap on the keyboard button (the keyboard shot wipes up from the bottom, the
   way the iOS keyboard slides in), then a tap on Command (the modifier keys fade in).
   Frames are hidden only once the script arms the demo, so without it the last shows. */
.input-demo.is-armed .input-demo-keyboard {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.5s cubic-bezier(0.2, 0.85, 0.25, 1);
}

.input-demo.is-armed.is-keyboard .input-demo-keyboard {
  clip-path: inset(0);
}

.input-demo.is-armed .input-demo-modifiers {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.input-demo.is-armed.is-modifiers .input-demo-modifiers {
  opacity: 1;
}

/* Touch indicators. Each is a layer the size of the screen, moved with translate() in
   percentages of itself — i.e. of the screen — carrying one circle (its child span) whose
   height comes from padding (a percentage of the same width), so it is square by
   construction and never stretches. Size never animates: a touch darkens the circle. */
.input-demo-finger,
.input-demo-tap {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.input-demo-finger > span,
.input-demo-tap > span {
  position: absolute;
  left: 0;
  top: 0;
  width: 13%;
  height: 0;
  padding-bottom: 13%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
}

.input-demo-tap--keyboard { transform: translate(57.9%, 91.2%); }
.input-demo-tap--command { transform: translate(42%, 61.4%); }

.input-demo.is-tapping-keyboard .input-demo-tap--keyboard,
.input-demo.is-tapping-command .input-demo-tap--command {
  animation: input-demo-tap-show 0.6s ease-out;
}

.input-demo.is-tapping-keyboard .input-demo-tap--keyboard > span,
.input-demo.is-tapping-command .input-demo-tap--command > span {
  animation: input-demo-tap-press 0.6s ease-out;
}

@keyframes input-demo-tap-show {
  0% { opacity: 0; }
  20%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes input-demo-tap-press {
  0%, 25% { background: rgba(0, 0, 0, 0.2); }
  40% { background: rgba(0, 0, 0, 0.4); }
  60%, 100% { background: rgba(0, 0, 0, 0.2); }
}

/* On the trackpad (24–86% down), one 5 s timeline, shaped for a thumb: a right thumb pivots
   near the bottom-right corner, so the pointer sweeps along an arc about that point, drawn
   in around the middle of the trackpad, then clicks; then two fingers scroll up (the
   everyday gesture for reading down a page), side by side on the same samples so they stay
   level. Paths are sampled from smooth curves with eased speed, so the animations
   themselves run linearly. */
.input-demo.is-gesturing .input-demo-finger--one {
  animation: input-demo-finger-one 5s linear;
}

.input-demo.is-gesturing .input-demo-finger--one > span {
  animation: input-demo-finger-one-press 5s linear;
}

.input-demo.is-gesturing .input-demo-finger--two {
  animation: input-demo-finger-two 5s linear;
}

@keyframes input-demo-finger-one {
  /* Generated (see the comment above): a thumb sweeping the pointer around, a click,
     then the left finger of the scroll. */
  0.00% { opacity: 0; transform: translate(31.9%, 60.1%); }
  5.00% { opacity: 1; transform: translate(31.9%, 60.1%); }
  6.77% { opacity: 1; transform: translate(32.1%, 60.0%); }
  8.55% { opacity: 1; transform: translate(32.6%, 59.8%); }
  10.32% { opacity: 1; transform: translate(33.5%, 59.4%); }
  12.09% { opacity: 1; transform: translate(34.8%, 58.8%); }
  13.86% { opacity: 1; transform: translate(36.3%, 58.1%); }
  15.64% { opacity: 1; transform: translate(38.1%, 57.4%); }
  17.41% { opacity: 1; transform: translate(40.3%, 56.5%); }
  19.18% { opacity: 1; transform: translate(42.8%, 55.6%); }
  20.95% { opacity: 1; transform: translate(45.6%, 54.8%); }
  22.73% { opacity: 1; transform: translate(48.7%, 54.1%); }
  24.50% { opacity: 1; transform: translate(52.0%, 53.4%); }
  26.27% { opacity: 1; transform: translate(55.3%, 52.9%); }
  28.05% { opacity: 1; transform: translate(58.6%, 52.4%); }
  29.82% { opacity: 1; transform: translate(61.8%, 52.0%); }
  31.59% { opacity: 1; transform: translate(64.3%, 52.4%); }
  33.36% { opacity: 1; transform: translate(63.4%, 53.6%); }
  35.14% { opacity: 1; transform: translate(62.2%, 54.7%); }
  36.91% { opacity: 1; transform: translate(61.1%, 55.5%); }
  38.68% { opacity: 1; transform: translate(60.2%, 56.2%); }
  40.45% { opacity: 1; transform: translate(59.5%, 56.7%); }
  42.23% { opacity: 1; transform: translate(59.1%, 57.0%); }
  44.00% { opacity: 1; transform: translate(59.0%, 57.1%); }
  58.00% { opacity: 1; transform: translate(59.0%, 57.1%); }
  62.00% { opacity: 0; transform: translate(59.0%, 57.1%); }
  64.00% { opacity: 0; transform: translate(43.0%, 67.0%); }
  68.00% { opacity: 1; transform: translate(43.0%, 67.0%); }
  69.38% { opacity: 1; transform: translate(43.0%, 66.8%); }
  70.75% { opacity: 1; transform: translate(43.0%, 66.2%); }
  72.12% { opacity: 1; transform: translate(43.0%, 65.1%); }
  73.50% { opacity: 1; transform: translate(43.0%, 63.8%); }
  74.88% { opacity: 1; transform: translate(43.0%, 62.1%); }
  76.25% { opacity: 1; transform: translate(43.0%, 60.2%); }
  77.62% { opacity: 1; transform: translate(43.0%, 58.1%); }
  79.00% { opacity: 1; transform: translate(43.0%, 56.0%); }
  80.38% { opacity: 1; transform: translate(43.0%, 53.9%); }
  81.75% { opacity: 1; transform: translate(43.0%, 51.8%); }
  83.12% { opacity: 1; transform: translate(43.0%, 49.9%); }
  84.50% { opacity: 1; transform: translate(43.0%, 48.2%); }
  85.88% { opacity: 1; transform: translate(43.0%, 46.9%); }
  87.25% { opacity: 1; transform: translate(43.0%, 45.8%); }
  88.62% { opacity: 1; transform: translate(43.0%, 45.2%); }
  90.00% { opacity: 1; transform: translate(43.0%, 45.0%); }
  95.00% { opacity: 0; transform: translate(43.0%, 45.0%); }
  100.00% { opacity: 0; transform: translate(43.0%, 45.0%); }
}

@keyframes input-demo-finger-one-press {
  0%, 48% { background: rgba(0, 0, 0, 0.2); }
  50.5% { background: rgba(0, 0, 0, 0.4); }
  54%, 100% { background: rgba(0, 0, 0, 0.2); }
}

@keyframes input-demo-finger-two {
  /* Generated: the right finger of the scroll, on the same samples as the left. */
  0.00% { opacity: 0; transform: translate(57.0%, 67.0%); }
  64.00% { opacity: 0; transform: translate(57.0%, 67.0%); }
  68.00% { opacity: 1; transform: translate(57.0%, 67.0%); }
  69.38% { opacity: 1; transform: translate(57.0%, 66.8%); }
  70.75% { opacity: 1; transform: translate(57.0%, 66.2%); }
  72.12% { opacity: 1; transform: translate(57.0%, 65.1%); }
  73.50% { opacity: 1; transform: translate(57.0%, 63.8%); }
  74.88% { opacity: 1; transform: translate(57.0%, 62.1%); }
  76.25% { opacity: 1; transform: translate(57.0%, 60.2%); }
  77.62% { opacity: 1; transform: translate(57.0%, 58.1%); }
  79.00% { opacity: 1; transform: translate(57.0%, 56.0%); }
  80.38% { opacity: 1; transform: translate(57.0%, 53.9%); }
  81.75% { opacity: 1; transform: translate(57.0%, 51.8%); }
  83.12% { opacity: 1; transform: translate(57.0%, 49.9%); }
  84.50% { opacity: 1; transform: translate(57.0%, 48.2%); }
  85.88% { opacity: 1; transform: translate(57.0%, 46.9%); }
  87.25% { opacity: 1; transform: translate(57.0%, 45.8%); }
  88.62% { opacity: 1; transform: translate(57.0%, 45.2%); }
  90.00% { opacity: 1; transform: translate(57.0%, 45.0%); }
  95.00% { opacity: 0; transform: translate(57.0%, 45.0%); }
  100.00% { opacity: 0; transform: translate(57.0%, 45.0%); }
}

/* The card for the step playing. */
.feature-cards .card.is-current {
  background: var(--cp-blue-soft);
}

.feature-cards {
  display: grid;
  gap: 16px;
}

.feature-cards .card {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 20px;
  padding: 24px;
  transition: background 0.3s ease;
}

.feature-cards .icon-tile {
  grid-row: span 2;
  margin-bottom: 0;
}

/* ─── PRODUCT SHOWCASE (Context app picker, Layouts) ───
   One screenshot at a time; selector pills swap which is shown. A fixed-aspect frame with
   stacked images means switching never shifts layout — only opacity changes. */

.showcase {
  max-width: 900px;
  margin: 0 auto;
}

.showcase-selectors {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 auto 28px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
}

.showcase-selector {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.showcase-selector:hover {
  color: #1d1d1f;
}

.showcase-selector.is-active {
  color: #1d1d1f;
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.showcase-image {
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.showcase-image.is-active {
  opacity: 1;
  pointer-events: auto;
}

.showcase-caption {
  text-align: center;
  font-size: 17px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 24px auto 0;
  max-width: 560px;
  min-height: 3em;
}

.showcase-caption strong {
  color: #1d1d1f;
  font-weight: 600;
}

.showcase-caption span {
  display: none;
}

.showcase-caption span.is-active {
  display: inline;
}

/* ─── FAQ ─── */

.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border-radius: 18px;
  padding: 0 24px;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 36px 20px 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-tertiary);
  border-bottom: 2px solid var(--text-tertiary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq details p {
  padding: 0 0 22px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ─── DOWNLOAD ─── */

.final-cta {
  text-align: center;
  padding: clamp(48px, 8vw, 88px) var(--content-gutter);
  /* The FAQ above already ends with a section's worth of padding. */
  margin: 0 0 clamp(40px, 6vw, 72px);
  background: linear-gradient(180deg, #f5f8ff 0%, #eef4ff 100%);
  border-radius: 32px;
}

.final-cta-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
}

.final-cta h2 {
  font-size: clamp(32px, 3.4vw + 0.75rem, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 10px;
}

.final-cta > p:not(.requirements) {
  font-size: clamp(17px, 0.5vw + 15px, 21px);
  color: var(--text-secondary);
  margin: 0 auto 28px;
}

/* ─── FOOTER ─── */

footer {
  padding: 20px 0 36px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--text-tertiary);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

footer nav {
  display: flex;
  gap: 20px;
}

footer a:hover {
  color: #1d1d1f;
}

/* ─── LEGAL PAGES ─── */

.legal {
  max-width: 680px;
  padding: clamp(24px, 5vw, 56px) 0 var(--section-gap);
}

.legal h1 {
  font-size: clamp(30px, 3vw + 1rem, 44px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 8px;
}

.legal .updated {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 32px 0 8px;
}

.legal p,
.legal li {
  color: #424245;
  font-size: 16px;
  line-height: 1.65;
}

.legal p + p,
.legal ul + p {
  margin-top: 12px;
}

.legal ul {
  padding-left: 20px;
  margin-top: 8px;
}

.legal a {
  color: var(--cp-blue);
}

/* ─── RESPONSIVE ───
   Content-driven transitions, not a desktop-shrunk-to-mobile ladder:
     900px — the nav no longer has room for its link row; it collapses to a menu.
     760px — two- and three-column layouts get too cramped for real copy; they stack.
     700px — the wide three-device hero stops working; a dedicated mobile scene takes over.
   Typography and spacing are fluid (clamp()) and need no per-breakpoint overrides. */

@media (max-width: 900px) {
  .top-nav-toggle {
    display: flex;
  }

  .top-nav-links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    display: none;
    padding: 8px 0;
  }

  .top-nav-links a {
    padding: 12px 4px;
    font-size: 17px;
    color: #1d1d1f;
    border-bottom: 1px solid var(--hairline);
  }

  .top-nav-links .top-nav-cta {
    margin-top: 12px;
    text-align: center;
    border-bottom: none;
  }

  .top-nav-links.is-open {
    display: flex;
  }

  /* Legal pages: a single Download button that never collapses into a menu. */
  .top-nav-links.top-nav-links--simple {
    display: flex;
    width: auto;
    padding: 0;
  }

  .top-nav-links--simple .top-nav-cta {
    margin-top: 0;
    padding: 7px 16px;
    font-size: 14px;
    color: #fff;
  }
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-split {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .feature-device {
    width: 240px;
  }

  .feature-cards {
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .card-grid,
  .card-grid--three {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 24px;
  }
}

/* Mobile hero: not a shrunk desktop scene — a compact composition: the Mac, cropped
   from both sides, recessed behind a centred iPhone. No iPad; it has no room to read at
   this width. Its images are lazy, so hiding it here also means they never download. */
@media (max-width: 700px) {
  .hero-scene {
    aspect-ratio: 1.15;
    overflow: hidden;
  }

  .hero-scene .hero-device-ipad {
    display: none;
  }

  .hero-scene .hero-device-mac {
    width: 86%;
    left: 50%;
    transform: translateX(-50%);
    top: 4%;
  }

  .hero-scene .hero-device-iphone {
    width: 42%;
    right: 3%;
    bottom: 3%;
  }

  /* Product imagery reads as artwork: let it use more of the viewport than body copy. */
  .showcase .showcase-frame {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    padding: 0 8px;
  }

  .showcase-selector {
    padding: 8px 12px;
    font-size: 14px;
  }

  .store-button,
  .mac-button {
    min-width: 160px;
    padding-left: 14px;
    padding-right: 16px;
    gap: 10px;
  }
}

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

  .showcase-image,
  .store-button,
  .mac-button,
  .top-nav-toggle span,
  .top-nav-toggle span::after,
  .faq summary::after {
    transition: none;
  }
}
