/* Homepage. Light page: a split hero (name and call on the left, the phone on a faint Sudoku grid on
   the right), four facts, then the five levels as large white cards. One black band follows with the
   gameplay recording, the progress screens and the accent colours; the page ends light again.
   The only rich colour is the app's own: its six accents, in the hero arc and the accent panel. */
.landing main { overflow-x: clip; }
.section-title { margin: 0; font-size: clamp(2.25rem, 1.35rem + 3.6vw, 3.4375rem); letter-spacing: var(--headline-tracking); overflow-wrap: anywhere; }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem 3rem;
  width: min(calc(100% - 2 * var(--gutter)), var(--wide));
  min-height: min(51.75rem, calc(100svh - 4.5rem));
  margin-inline: auto;
  padding-block: 2.5rem 4rem;
}
.hero-copy { min-width: 0; }
.hero h1 { margin: 0; font-size: clamp(3.75rem, 2.1rem + 6.4vw, 5.75rem); letter-spacing: var(--display-tracking); line-height: 0.9; overflow-wrap: anywhere; }
.hero-tagline { margin: 1.5rem 0 0; font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.5625rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.14; }
:root:lang(ja) .hero-tagline, :root:lang(ko) .hero-tagline, :root:lang(zh-Hans) .hero-tagline { letter-spacing: 0; }
.hero-tagline span { overflow-wrap: anywhere; }
.hero-tagline span + span { color: var(--dim); }
/* One line, as a sentence: the name of the idea, then the grey half. */
.hero-tagline span:first-child::after { content: "."; }
:root:lang(ja) .hero-tagline span:first-child::after, :root:lang(zh-Hans) .hero-tagline span:first-child::after { content: "。"; }
.hero-text { max-width: 26.5rem; margin: 1.5rem 0 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.hero .cta-row { margin-top: 2.5rem; }
.cta-note { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.8125rem; overflow-wrap: anywhere; }

/* The phone. --phone is its width; the height follows the window so the controls under it stay in view. */
.hero-scene {
  --phone: clamp(15rem, calc((100svh - 15rem) * 0.49), 23rem);
  --dot: rgb(3 3 3 / 16%);
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
}
/* A field of fine dots, fading out around the phone. */
.hero-scene::before {
  position: absolute;
  inset: -6rem -8rem -4rem;
  z-index: -1;
  background: radial-gradient(circle, var(--dot) 0.0625rem, transparent 0.09rem) center / 1.375rem 1.375rem;
  content: "";
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 30%, transparent 100%);
  pointer-events: none;
}
/* The six accent colours as one soft arc behind the phone. */
.hero-scene::after {
  position: absolute;
  top: -9rem;
  left: 50%;
  z-index: -1;
  width: 76rem;
  aspect-ratio: 2.5;
  margin-left: -30rem;
  background: conic-gradient(from -90deg at 50% 100%, rgb(10 132 255 / 0%) 26deg, #0a84ff 52deg, #40c8e0 74deg, #30d158 96deg, #ff9f0a 118deg, #bf5af2 142deg, rgb(191 90 242 / 0%) 168deg);
  content: "";
  filter: blur(1.25rem);
  -webkit-mask-image: radial-gradient(ellipse 50% 100% at 50% 100%, transparent 80%, #000 88%, transparent 96%);
  mask-image: radial-gradient(ellipse 50% 100% at 50% 100%, transparent 80%, #000 88%, transparent 96%);
  opacity: 0.17;
  pointer-events: none;
}
:root[data-theme="dark"] .hero-scene, :root:not([data-theme])[data-system-theme="dark"] .hero-scene { --dot: rgb(255 255 255 / 16%); }
:root[data-theme="dark"] .hero-scene::after, :root:not([data-theme])[data-system-theme="dark"] .hero-scene::after { opacity: 0.26; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .hero-scene { --dot: rgb(255 255 255 / 16%); }
  :root:not([data-theme]) .hero-scene::after { opacity: 0.26; }
}
/* The phone: Apple's silver bezel over the app's Levels screen, light under dark. Light / Dark fades the
   dark screen in or out quickly, like a system appearance change. The screen gets its own stacking
   context so the bezel (with the Dynamic Island) always stays on top of it. */
.hero-device { --device: var(--phone); }
.hero-device .device-screen { isolation: isolate; }
/* A still, soft ellipse for the shadow: cheaper than a filter over the whole phone. */
.hero-device::before { position: absolute; right: 10%; bottom: -1.75rem; left: 10%; z-index: -1; height: 3.5rem; border-radius: 50%; background: radial-gradient(closest-side, rgb(3 3 3 / 26%), rgb(3 3 3 / 0%)); content: ""; pointer-events: none; }
.hero-dark { opacity: 0; transition: opacity 280ms cubic-bezier(0.25, 0.1, 0.25, 1); }
:root[data-theme="dark"] .hero-dark, :root:not([data-theme])[data-system-theme="dark"] .hero-dark { opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .hero-dark { opacity: 1; } }
.hero-scene:has(input[value="dark"]:checked) .hero-dark { opacity: 1; }
.hero-scene:has(input[value="light"]:checked) .hero-dark { opacity: 0; }
.hero-controls { display: flex; max-width: 100%; flex-wrap: wrap; justify-content: center; gap: 0.625rem; margin-top: 2.25rem; }
.hero-controls .segmented { margin: 0; }

/* Light / Dark for the phone's screen: two radio buttons drawn as one segmented control. */
.segmented { display: flex; width: max-content; max-width: 100%; min-width: 0; margin: 1.75rem 0 0; padding: 0.25rem; border: 0; border-radius: 61.25rem; background: var(--chip); }
.segmented[hidden] { display: none; }
.segmented label { position: relative; display: inline-flex; min-width: 0; cursor: pointer; }
.segmented input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.segmented span { display: inline-flex; min-height: 2.5rem; align-items: center; padding: 0.25rem 1.5rem; border-radius: 61.25rem; font-size: 0.875rem; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; transition: background-color 560ms var(--ease-soft), box-shadow 560ms var(--ease-soft), transform 600ms var(--snappy); }
.segmented input:checked + span { background: var(--raised); box-shadow: 0 1px 0.25rem rgb(3 3 3 / 16%); }
.segmented input:active + span { transform: scale(0.96); transition-duration: 80ms; }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Where :has() is available the selection is one thumb that slides between the two halves. */
@supports selector(:has(*)) {
  .segmented { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented::before { position: absolute; top: 0.25rem; bottom: 0.25rem; left: 0.25rem; width: calc(50% - 0.25rem); border-radius: 61.25rem; background: var(--raised); box-shadow: 0 1px 0.25rem rgb(3 3 3 / 16%); content: ""; transition: transform 700ms var(--snappy); }
  /* While it travels the thumb stretches a little along its path and settles back, like a drop of
     liquid (site.js sets data-moving for one run). */
  .segmented[data-moving]::before { animation: thumb-stretch 460ms var(--ease-soft); }
  @keyframes thumb-stretch { 35% { scale: 1.16 0.94; } }
  .segmented:has(input[value="dark"]:checked)::before { transform: translateX(100%); }
  .segmented:not(:has(input:checked))::before { opacity: 0; }
  .segmented span { position: relative; width: 100%; justify-content: center; }
  .segmented input:checked + span { background: none; box-shadow: none; }
}
/* Four facts under one headline: an icon, then a short bold line. */
.facts { width: min(calc(100% - 2 * var(--gutter)), var(--column)); margin-inline: auto; padding-block: 3.5rem 2.5rem; text-align: center; }
.fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; max-width: 60rem; margin: 3.5rem auto 0; padding: 0; font-size: 0.9375rem; line-height: 1.45; list-style: none; text-align: start; }
.fact-grid p { margin: 0; }
.fact-grid strong { display: block; color: var(--ink); font-weight: 600; }
.fact-grid p span { display: block; margin-top: 0.125rem; color: var(--muted); }
/* Each fact is a tile that lifts onto a card under the pointer; its icon takes the accent and plays once. */
.fact-grid li { min-width: 0; padding: 1.5rem 1.25rem; border-radius: 1.25rem; overflow-wrap: anywhere; transition: background-color 320ms ease, box-shadow 320ms ease; }
.fact-grid .glyph { width: 2.25rem; height: 2.25rem; margin: 0 0 1.25rem; transition: color 320ms ease; }

/* The levels: a row of large cards that scrolls sideways. --edge is the space beside the content
   column, so the first card lines up with the headline and the next one shows at the window's edge. */
.highlights { --edge: max(var(--gutter), calc((100vw - var(--column)) / 2)); padding-block: 6.75rem 6rem; }
.highlights .section-title { width: min(calc(100% - 2 * var(--gutter)), var(--column)); margin-inline: auto; }
.rail {
  overflow-x: auto;
  padding: 3rem var(--edge) 3.5rem;
  scroll-padding-inline: var(--edge);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline-offset: -3px; }
.rail ul { display: flex; gap: 1.5rem; width: max-content; margin: 0; padding: 0; list-style: none; }
.highlight-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  width: min(var(--column), calc(100vw - 2 * var(--gutter)));
  height: 40rem;
  overflow: hidden;
  padding-inline: 4rem 2rem;
  border-radius: 1.75rem;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  scroll-snap-align: center;
}
.highlight-copy { min-width: 0; }
.highlight-card h3 { margin: 0; font-size: clamp(2.25rem, 1.6rem + 2vw, 3rem); letter-spacing: var(--headline-tracking); line-height: 1.05; overflow-wrap: anywhere; }
.highlight-card p { max-width: 22rem; margin: 0.875rem 0 0; color: var(--muted); font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.4375rem); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; overflow-wrap: anywhere; }
.highlight-visual { display: flex; min-width: 0; justify-content: center; align-self: center; }
.highlight-card .device { --device: 16.75rem; filter: drop-shadow(0 1.5rem 1.75rem rgb(3 3 3 / 20%)); }
/* The phones stand on the card's lower edge, cropped like Canopy's laptops. */
.highlight-levels .highlight-visual, .highlight-scan .highlight-visual { align-self: end; margin-bottom: -6rem; }
.highlight-card .device-shot, .highlight-card .device-shot img { display: block; width: 100%; height: 100%; }
/* iPad Pro 13-inch in landscape, in Apple's bezel: the opening sits at 5.13% / 4.13% and measures 91.73% × 89.74%.
   The iPad card gives the device the wider column and lets it run off the card's right edge. */
.highlight-ipad { grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr); padding-right: 3rem; }
.tablet { position: relative; width: min(34rem, 100%); aspect-ratio: 1500 / 1150; flex: none; margin: 0; filter: drop-shadow(0 1.5rem 2rem rgb(3 3 3 / 18%)); }
.tablet-screen { position: absolute; top: 5.1304%; left: 4.1333%; width: 91.7333%; height: 89.7391%; overflow: hidden; border-radius: 2.4% / 3.2%; background: #000; }
.tablet-screen img { object-fit: cover; }
.tablet-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* The iPhone Duo's outer display in Apple's Star White bezel. */
.duo { position: relative; width: min(19rem, 100%); aspect-ratio: 787 / 1097; flex: none; margin: 0; filter: drop-shadow(0 1.5rem 2rem rgb(3 3 3 / 18%)); }
/* The outer display sits at 88, 80 in Apple's 1574 × 2194 bezel and measures 1398 × 2034, exactly the capture's size.
   The hinge side is square; the frame covers the round corners on the right and holds the camera opening. */
.duo-screen { position: absolute; top: 3.6463%; left: 5.5909%; width: 88.8183%; height: 92.7074%; overflow: hidden; border-radius: 0 12.5% 12.5% 0 / 0 8.6% 8.6% 0; background: #000; }
.duo-screen img { object-fit: cover; }
.duo-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* A real iPhone: Apple's own bezel image over the screen content. A device never takes its height
   from a flex row (that would stretch the bezel), so rows that hold one align to the start. The opening is at 5.1% / 2.2%
   and measures 89.8% × 95.6% of the frame; the content is clipped just inside its corners. */
.device { position: relative; width: var(--device, 18rem); flex: none; aspect-ratio: 1470 / 3000; margin: 0; }
.device-screen { position: absolute; top: 2.2%; left: 5.1%; width: 89.8%; height: 95.6%; overflow: hidden; border-radius: 14% / 6.45%; background: #000; }
.device-screen img, .device-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.device-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Under the cards: one dot per card, the current one stretched into a bar that fills while its card
   is shown, and a round button that pauses or resumes the automatic advance. */
.rail-controls { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.rail-controls[hidden] { display: none; }
.rail-dots { display: flex; min-height: 3.5rem; align-items: center; padding-inline: 1rem; border-radius: 61.25rem; background: var(--chip); }
.rail-dots button { position: relative; width: 1.5rem; height: 2.75rem; padding: 0; border: 0; background: none; cursor: pointer; transition: width 700ms var(--snappy); }
.rail-dots button::before, .rail-dots span { position: absolute; top: 50%; right: 0.5rem; left: 0.5rem; height: 0.5rem; margin-top: -0.25rem; border-radius: 0.25rem; }
.rail-dots button::before { background: var(--muted); content: ""; opacity: 0.55; transition: opacity 240ms ease; }
/* The fill is a bar sliding inside the rounded track: a transform, so the five-second fill costs no paint. */
.rail-dots span { overflow: hidden; }
.rail-dots span::after { position: absolute; inset: 0; border-radius: inherit; background: var(--ink); content: ""; transform: translateX(-100%); }
.rail-dots button[aria-current="true"] { width: 3.5rem; }
.rail-dots button[aria-current="true"]::before { opacity: 0.3; }
/* Standing still, the bar shows where it starts; while the cards advance it fills in five seconds. */
.rail-dots button[aria-current="true"] span::after { transform: translateX(-80%); }
.rail-controls[data-auto="on"] button[aria-current="true"] span::after { animation: dot-fill 5s linear forwards; }
.rail-controls[data-auto="on"][data-hold="true"] button[aria-current="true"] span::after { animation-play-state: paused; }
@keyframes dot-fill { from { transform: translateX(-80%); } to { transform: none; } }
.round-toggle {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  flex: none;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--chip);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 200ms ease, transform 600ms var(--snappy);
}
.round-toggle[hidden] { display: none; }
.round-toggle:active { transform: scale(0.94); transition-duration: 80ms; }
.round-toggle svg { width: 1.25rem; height: 1.25rem; }
.round-toggle .icon-pause, .round-toggle[data-state="playing"] .icon-play { display: none; }
.round-toggle[data-state="playing"] .icon-pause { display: block; }

/* The black band keeps its tone in both appearances, so it carries its own colours. */
.band {
  --surface: #1b1b1d;
  --chip: rgb(255 255 255 / 14%);
  --chip-hover: rgb(255 255 255 / 22%);
  --ink: #f5f5f7;
  --ink-soft: #c7c7cc;
  --muted: #98989f;
  --dim: #6e6e73;
  --button-bg: #f5f5f7;
  --button-bg-hover: #fff;
  --button-ink: #030303;
  --button-shadow: 0 0.875rem 1.875rem -0.75rem rgb(255 255 255 / 20%);
  --focus: #2997ff;
  --accent: #0a84ff;
  --card-shadow: none;
  padding-block: 7.5rem 9rem;
  background: #030303;
  color: var(--ink);
  color-scheme: dark;
}

/* Play: the recording inside a phone, the headline under it, then the four tools. */
.play { width: min(calc(100% - 2 * var(--gutter)), var(--column)); margin-inline: auto; text-align: center; }
.play-stage { position: relative; width: max-content; max-width: 100%; margin-inline: auto; }
.play .device { --device: min(19rem, 62vw); }
/* A finger on the recording: a soft translucent circle, about the size of a fingertip on this screen.
   site.js moves it to each tap and sets its opacity and scale from the video's own clock. */
.touch { position: absolute; top: 0; left: 0; z-index: 1; width: 11%; aspect-ratio: 1; margin: -5.5% 0 0 -5.5%; border-radius: 50%; background: rgb(255 255 255 / 30%); box-shadow: 0 0 0 1.5px rgb(255 255 255 / 55%), 0 0.25rem 1rem rgb(0 0 0 / 35%); opacity: 0; pointer-events: none; }
.video-toggle { position: absolute; right: -4.25rem; bottom: 1.75rem; width: 2.75rem; height: 2.75rem; }
.video-toggle svg { width: 1.125rem; height: 1.125rem; }
.play .section-title { margin-top: 4.5rem; }
.play-text { max-width: 29rem; margin: 1.5rem auto 0; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.play .cta-row { justify-content: center; margin-top: 2.25rem; }
.tool-grid { margin-top: 4.5rem; font-size: 1rem; }
.tool-grid .glyph { width: 2.75rem; height: 2.75rem; }

/* Progress: a two-tone headline, then the finished game and the statistics, each in its own tile. */
.progress { width: min(calc(100% - 2 * var(--gutter)), var(--column)); margin-inline: auto; padding-top: 10rem; }
.section-lede { margin: 0; color: var(--dim); font-size: clamp(2.25rem, 1.35rem + 3.6vw, 3.4375rem); font-weight: 700; letter-spacing: var(--headline-tracking); line-height: 1.05; overflow-wrap: anywhere; text-wrap: balance; }
.tile-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 3.5rem; }
.tile { display: flex; height: 34rem; align-items: flex-start; justify-content: center; overflow: hidden; padding-top: 3rem; border-radius: 1.75rem; background: var(--surface); }
.tile .device { --device: 17rem; }

/* Accent colours: the panel takes the chosen colour. The swatches are real radio buttons; :has()
   recolours the panel and swaps both screens, so it works without scripts. Without :has() the
   default blue stays. Hidden screenshots are lazy images, so they load on first use. */
.looks { width: min(calc(100% - 2 * var(--gutter)), var(--column)); margin: 1.25rem auto 0; }
.accent-panel {
  --tint: #0a84ff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  height: 31rem;
  overflow: hidden;
  padding-inline: 4rem 3rem;
  border-radius: 1.75rem;
  background: var(--tint);
  color: #030303;
  transition: background-color 700ms var(--ease-soft);
}
.swatch-blue { --tint: #0a84ff; }
.accent-panel:has(input[value="black"]:checked), .swatch-black { --tint: #f5f5f7; }
.accent-panel:has(input[value="orange"]:checked), .swatch-orange { --tint: #ff9f0a; }
.accent-panel:has(input[value="turquoise"]:checked), .swatch-turquoise { --tint: #40c8e0; }
.accent-panel:has(input[value="violet"]:checked), .swatch-violet { --tint: #bf5af2; }
.accent-panel:has(input[value="green"]:checked), .swatch-green { --tint: #30d158; }
.accent-copy { min-width: 0; }
.accent-copy h2 { margin: 0; font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); font-weight: 800; letter-spacing: -0.04em; overflow-wrap: anywhere; }
:root:lang(ja) .accent-copy h2, :root:lang(ko) .accent-copy h2, :root:lang(zh-Hans) .accent-copy h2 { letter-spacing: 0; }
.accent-copy p { max-width: 24rem; margin: 1rem 0 0; color: rgb(3 3 3 / 74%); font-size: 1.25rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.swatches { display: flex; width: max-content; max-width: 100%; min-width: 0; flex-wrap: wrap; margin: 2rem 0 0; padding: 0 0.25rem; border: 0; border-radius: 1.5rem; background: #030303; }
.swatch { display: grid; width: 2.75rem; height: 2.75rem; place-items: center; cursor: pointer; }
.swatch input { width: 1.5rem; height: 1.5rem; margin: 0; border-radius: 50%; background: var(--tint); cursor: pointer; -webkit-appearance: none; appearance: none; transition: transform 600ms var(--snappy), box-shadow 300ms var(--ease-soft); }
.swatch input:checked { transform: scale(1.08); }
.swatch input:checked { box-shadow: 0 0 0 2px #030303, 0 0 0 4px #f5f5f7; }
.swatch input:active { transform: scale(0.9); transition-duration: 80ms; }
.swatch input:focus-visible { outline: 3px solid #2997ff; outline-offset: 5px; }
/* Both phones rise from the panel's lower edge; the second sits a step lower. */
.accent-devices { display: flex; align-items: flex-start; align-self: start; gap: 1.5rem; padding-top: 3.5rem; }
.accent-devices .device { --device: 14.5rem; filter: drop-shadow(0 1.5rem 1.75rem rgb(3 3 3 / 28%)); }
.accent-devices .device + .device { margin-top: 2.5rem; }
.accent-panel .device-screen img { display: none; }
.accent-panel .device-screen .shot-blue { display: block; }
.accent-panel:has(input:checked:not([value="blue"])) .shot-blue { display: none; }
.accent-panel:has(input[value="black"]:checked) .shot-black,
.accent-panel:has(input[value="orange"]:checked) .shot-orange,
.accent-panel:has(input[value="turquoise"]:checked) .shot-turquoise,
.accent-panel:has(input[value="violet"]:checked) .shot-violet,
.accent-panel:has(input[value="green"]:checked) .shot-green { display: block; }

/* "Explore everything": a pill that opens into the full feature list, grouped in three columns. */
.explore { width: 100%; margin-top: 3.5rem; text-align: start; }
.explore summary { display: flex; width: max-content; max-width: 100%; min-height: 3.25rem; align-items: center; gap: 1rem; margin-inline: auto; padding: 0.375rem 0.375rem 0.375rem 1.5rem; border-radius: 61.25rem; background: var(--surface); color: var(--ink); font-size: 0.9375rem; font-weight: 500; cursor: pointer; list-style: none; transition: background-color 200ms ease, transform 200ms var(--ease); }
.explore summary::-webkit-details-marker { display: none; }
.explore summary { transition: background-color 200ms ease, transform 600ms var(--snappy); }
.explore summary:active { transform: scale(0.96); transition-duration: 80ms; }
.explore-mark { position: relative; display: grid; width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%; background: var(--accent); }
.explore-mark { transition: transform 700ms var(--snappy); }
.explore[open] .explore-mark { transform: rotate(180deg); }
.explore-mark::before, .explore-mark::after { position: absolute; top: 50%; left: 50%; width: 0.9375rem; height: 0.125rem; margin: -0.0625rem 0 0 -0.46875rem; border-radius: 0.0625rem; background: #fff; content: ""; transition: transform 700ms var(--snappy); }
.explore-mark::after { transform: rotate(90deg); }
.explore[open] .explore-mark::after { transform: rotate(0deg); }
.explore-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; margin-top: 2.5rem; padding: 2.5rem; border-radius: 1.75rem; background: var(--surface); }
.explore-group h3 { margin: 0 0 1rem; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.explore-group ul { display: grid; gap: 1.125rem; margin: 0; padding: 0; list-style: none; }
.explore-group li { font-size: 0.9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.explore-group strong { display: block; font-weight: 600; }
.explore-group span { color: var(--muted); }

/* Privacy, at the end of the band: a two-tone headline and four cards with the accent's line icons. */
.privacy-home { width: min(calc(100% - 2 * var(--gutter)), var(--column)); margin-inline: auto; padding-top: 10rem; }
.privacy-home .section-title span + span { display: block; color: var(--dim); }
.privacy-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin: 3.5rem 0 0; padding: 0; list-style: none; }
.privacy-cards li { display: flex; min-width: 0; min-height: 17rem; flex-direction: column; padding: 2rem 1.75rem; border-radius: 1.75rem; background: var(--surface); transition: transform 700ms var(--snappy), background-color 500ms var(--ease-soft); }
.privacy-cards .glyph { width: 2.75rem; height: 2.75rem; flex: none; color: var(--accent); }
.privacy-cards h3 { margin: 2.5rem 0 0; color: var(--accent); font-size: 1.1875rem; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.privacy-cards p { margin: 0.375rem 0 0; color: var(--ink-soft); font-size: 0.9375rem; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.privacy-more { margin: 2rem 0 0; font-size: 0.9375rem; font-weight: 500; }
.privacy-more a { color: var(--focus); }

/* Closing call: the app icon, one line, the two buttons. */
.closing { display: flex; flex-direction: column; align-items: center; padding: 10rem var(--gutter) 5.5rem; text-align: center; }
.app-mark { display: block; width: 6.5rem; height: 6.5rem; border-radius: 22.5%; box-shadow: 0 1.5rem 2.5rem -1.25rem rgb(3 3 3 / 35%), 0 0 0 1px var(--hairline); }
/* The same drawing as the icon files, in their colours, so the grid can draw itself in. */
.m-tile { fill: #fff; }
.m-ink { stroke: #11191f; }
/* The dash that draws the lines exists only while they draw: at rest, a dash as long as the whole
   frame leaves its two round ends meeting at the corner, which shows as a small bump. */
:root[data-theme="dark"] .m-tile, :root:not([data-theme])[data-system-theme="dark"] .m-tile { fill: #11191f; }
:root[data-theme="dark"] .m-ink, :root:not([data-theme])[data-system-theme="dark"] .m-ink { stroke: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .m-tile { fill: #11191f; }
  :root:not([data-theme]) .m-ink { stroke: #fff; }
}
.closing .section-title { max-width: 100%; margin-top: 3rem; }
.closing-sub { max-width: 100%; margin: 1rem 0 0; color: var(--muted); font-size: 1.0625rem; font-weight: 500; overflow-wrap: anywhere; }
.closing .cta-row { justify-content: center; margin-top: 2.5rem; }

/* Languages: the headline phrase in the current language, and every language as a pill. */
.languages { display: flex; flex-direction: column; align-items: center; width: min(calc(100% - 2 * var(--gutter)), 40rem); margin-inline: auto; padding-block: 3.5rem 5rem; border-top: 1px solid var(--hairline); text-align: center; }
.languages .language-globe { width: 1.375rem; height: 1.375rem; color: var(--link); }
.languages h2 { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.hello { max-width: 100%; min-height: 1.1em; margin: 1.25rem 0 0; font-size: clamp(2rem, 1.5rem + 2.2vw, 2.75rem); font-weight: 700; letter-spacing: var(--headline-tracking); line-height: 1.1; overflow-wrap: anywhere; }
.hello-word { display: inline-block; }
.hello-name { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.language-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.language-list a { display: inline-flex; min-height: 2.75rem; align-items: center; padding: 0.5rem 1rem; border-radius: 0.75rem; background: var(--chip); color: var(--ink-soft); font-size: 0.875rem; font-weight: 600; text-decoration: none; transition: background-color 200ms ease, color 200ms ease; }
.language-list a.is-on, .language-list:not(:has(.is-on)) a[aria-current] { background: var(--ink); color: var(--bg); }

@media (hover: hover) {
  .fact-grid li:hover { background: var(--surface); box-shadow: var(--card-shadow); }
  .fact-grid li:hover .glyph { color: var(--accent); }
  .round-toggle:hover { background: var(--chip-hover); }
  .explore summary:hover { background: #262629; }
  .privacy-cards li:hover { background: #222225; transform: translateY(-0.375rem); }
  .tablet, .duo { transition: transform 700ms var(--snappy); }
  .highlight-card.is-current:hover .tablet, .highlight-card.is-current:hover .duo { transform: translateY(-0.5rem); }
  .rail-dots button:hover::before { opacity: 0.9; }
  .language-list a:hover { text-decoration: none; }
  .language-list a:not(.is-on):hover { background: var(--chip-hover); color: var(--ink); }
}

/* Level cards with scripts: the card in the middle is the current one. Its neighbours sit a little
   smaller with their text dimmed and their phone lowered, and settle into place as they arrive. */
.rail[data-enhanced] .highlight-card { transition: transform 900ms var(--spring), box-shadow 700ms var(--ease-soft); }
.rail[data-enhanced] .highlight-copy { transition: opacity 600ms var(--ease-soft), transform 900ms var(--spring) 60ms; }
.rail[data-enhanced] .highlight-visual { transition: transform 900ms var(--spring) 100ms, opacity 600ms var(--ease-soft); }
.rail[data-enhanced] .highlight-card:not(.is-current) { box-shadow: none; transform: scale(0.94); }
.rail[data-enhanced] .highlight-card:not(.is-current) .highlight-copy { opacity: 0.25; transform: translateY(0.625rem); }
.rail[data-enhanced] .highlight-card:not(.is-current) .highlight-visual { opacity: 0.6; transform: translateY(6%) scale(0.96); }

/* Motion. On load the hero comes into focus piece by piece: the copy line after line, then the phone,
   the grid behind it and last the arc. Entrances further down are in styles.css (data-reveal).
   The animations fill backwards only, so nothing stays promoted once it has settled. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: blur-in 900ms var(--ease) backwards; }
  .hero-copy > :nth-child(1) { animation-delay: 60ms; }
  .hero-copy > :nth-child(2) { animation-delay: 140ms; }
  .hero-copy > :nth-child(3) { animation-delay: 220ms; }
  .hero-copy > :nth-child(4) { animation-delay: 300ms; }
  .hero-copy > :nth-child(5) { animation-delay: 380ms; }
  /* The blur comes after the shadow in the list, so it can fade to nothing while the shadow stays. */
  .hero-device { animation: phone-in 1100ms 240ms var(--spring) backwards; transform-origin: 50% 100%; }
  @keyframes phone-in { from { opacity: 0; transform: perspective(75rem) translateY(3rem) rotateX(10deg) scale(0.94); } 40% { opacity: 1; } }
  .segmented { animation: blur-in 900ms 200ms var(--ease) backwards; }
  .hero-scene::before { animation: fade-in 1400ms 500ms ease backwards; }
  .hero-scene::after { animation: fade-in 1800ms 1100ms ease backwards; }
  @keyframes fade-in { from { opacity: 0; } }
  .hello-word { animation: word-in 260ms var(--ease) backwards; }
  @keyframes word-in { from { opacity: 0; transform: translateY(0.12em); } }
  /* The app mark draws its frame, then its four rules. */
  /* Explore: the list unfolds from the pill, its three groups one after another. */
  .explore[open] .explore-body { animation: explore-in 900ms var(--spring) backwards; transform-origin: 50% 0; }
  .explore[open] .explore-group { animation: explore-in 900ms var(--spring) backwards; }
  .explore[open] .explore-group:nth-child(1) { animation-delay: 80ms; }
  .explore[open] .explore-group:nth-child(2) { animation-delay: 160ms; }
  .explore[open] .explore-group:nth-child(3) { animation-delay: 240ms; }
  @keyframes explore-in { from { opacity: 0; transform: translateY(-1rem) scale(0.98); } 45% { opacity: 1; } }
  .app-mark.play .m-frame { animation: mark-draw 900ms var(--ease) backwards; }
  .app-mark.play .m-rule { animation: mark-draw 620ms var(--ease) backwards; }
  @keyframes mark-draw { from { stroke-dasharray: 1 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1 1; stroke-dashoffset: 0; } }
  .app-mark.play .m-rule:nth-of-type(1) { animation-delay: 320ms; }
  .app-mark.play .m-rule:nth-of-type(2) { animation-delay: 420ms; }
  .app-mark.play .m-rule:nth-of-type(3) { animation-delay: 520ms; }
  .app-mark.play .m-rule:nth-of-type(4) { animation-delay: 620ms; }
  /* A new accent: both phones settle again. One keyframe name per accent restarts the animation on every change. */
  .accent-panel:has(input[value="blue"]:checked) .device { animation: pop-blue 900ms var(--spring) backwards; }
  .accent-panel:has(input[value="black"]:checked) .device { animation: pop-black 900ms var(--spring) backwards; }
  .accent-panel:has(input[value="orange"]:checked) .device { animation: pop-orange 900ms var(--spring) backwards; }
  .accent-panel:has(input[value="turquoise"]:checked) .device { animation: pop-turquoise 900ms var(--spring) backwards; }
  .accent-panel:has(input[value="violet"]:checked) .device { animation: pop-violet 900ms var(--spring) backwards; }
  .accent-panel:has(input[value="green"]:checked) .device { animation: pop-green 900ms var(--spring) backwards; }
  .accent-panel .device + .device { animation-delay: 70ms; }
  @keyframes pop-blue { from { opacity: 0.5; transform: translateY(5%) scale(0.96); } 40% { opacity: 1; } }
  @keyframes pop-black { from { opacity: 0.5; transform: translateY(5%) scale(0.96); } 40% { opacity: 1; } }
  @keyframes pop-orange { from { opacity: 0.5; transform: translateY(5%) scale(0.96); } 40% { opacity: 1; } }
  @keyframes pop-turquoise { from { opacity: 0.5; transform: translateY(5%) scale(0.96); } 40% { opacity: 1; } }
  @keyframes pop-violet { from { opacity: 0.5; transform: translateY(5%) scale(0.96); } 40% { opacity: 1; } }
  @keyframes pop-green { from { opacity: 0.5; transform: translateY(5%) scale(0.96); } 40% { opacity: 1; } }
}

@media (max-width: 56rem) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 3.5rem; min-height: 0; padding-block: 2.5rem 3rem; }
  .hero-scene::after { top: -5rem; width: 46rem; margin-left: -19rem; }
  .hero-scene { --phone: min(19rem, 68vw); }
  .highlight-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: start; gap: 2rem; height: 36rem; padding: 2.25rem 1.75rem 0; }
  .highlight-card .device { --device: min(15.5rem, 64vw); }
  .highlight-visual, .highlight-levels .highlight-visual, .highlight-scan .highlight-visual { align-self: start; margin-bottom: 0; }
  .highlight-ipad { grid-template-columns: minmax(0, 1fr); padding-right: 1.75rem; }
  .highlight-ipad { padding-right: 1.75rem; }
  .tablet { width: 100%; }
  .highlight-ipad .highlight-visual { align-self: center; margin-top: -2rem; }
  .duo { width: min(14rem, 54vw); }
  .privacy-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-body { grid-template-columns: minmax(0, 1fr); padding: 2rem 1.75rem; }
  .accent-panel { grid-template-columns: minmax(0, 1fr); gap: 0; height: auto; padding: 2.5rem 1.75rem 0; }
  .accent-devices { width: 100%; max-width: 26rem; height: 21rem; justify-content: center; justify-self: center; gap: 1rem; overflow: hidden; padding-top: 2.5rem; }
  .accent-devices .device { --device: calc(50% - 0.5rem); }
  .accent-devices .device + .device { margin-top: 1.5rem; }
  .video-toggle { right: -3.5rem; }
}
@media (max-width: 44rem) {
  .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2.5rem; }
  .tile-row { grid-template-columns: minmax(0, 1fr); }
  .tile { height: 30rem; padding-top: 2.5rem; }
  .tile .device { --device: 15rem; }
  .band { padding-block: 5rem 6rem; }
  .progress { padding-top: 7rem; }
  .highlights { padding-block: 4.5rem 4.5rem; }
  .rail { padding-block: 2rem 2.5rem; }
  .rail ul { gap: 1rem; }
  .closing { padding-block: 7rem 4.5rem; }
  .highlight-card, .tile, .accent-panel { border-radius: 1.5rem; }
}
@media (max-width: 40rem) {
  /* On a phone the hero keeps one button, so the phone comes into view sooner. */
  .hero { gap: 2rem; padding-block: 1.5rem 2.5rem; }
  .hero h1 { font-size: clamp(3.25rem, 1.6rem + 9vw, 3.75rem); }
  .hero-tagline, .hero-text { margin-top: 1rem; }
  .hero .cta-row { margin-top: 1.75rem; }
  .hero .cta-row a { width: 100%; justify-content: center; }
  .hero-more { display: none; }
  .cta-note { text-align: center; }
  .hero-scene { --phone: min(17rem, 64vw); }
  .privacy-cards { grid-template-columns: minmax(0, 1fr); }
  .privacy-cards li { min-height: 0; padding: 1.75rem 1.5rem; }
  .privacy-cards h3 { margin-top: 1.5rem; }
  .privacy-home { padding-top: 7rem; }
  .fact-grid li { padding: 1rem 0.5rem; }
}
@media (prefers-contrast: more) {
  .hero-scene::after { content: none; }
  .accent-copy p { color: #030303; }
}
