@font-face { font-family: Archivo; src: url(/fonts/Archivo-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Archivo; src: url(/fonts/Archivo-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

/* The game's own board colours: one wire colour per instrument. */
:root {
  --board: #0b0e12;
  --tile: #323a42;
  --idle: #7d8a96;
  --ink: #d7dee7;
  --soft: #a3afbb;
  --yellow: #f7d44c;
  --cyan: #4dd8ff;
  --green: #79e27d;
  --purple: #b68fef;
  --pink: #ff9dcf;
  --gutter: max(20px, env(safe-area-inset-left));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--board);
  color: var(--ink);
  font: 400 1.0625rem/1.55 Archivo, system-ui, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* The in-game circuitry, faint and fixed behind everything, over a soft glow. It hangs
   below the screen by as far as it is allowed to drift up while the page scrolls. Each
   depth plane is its own <svg>, overhanging the edges by the farthest a plane travels
   when it follows the cursor. */
body::before, .circuitry {
  position: fixed;
  inset: 0 0 -45vh;
  z-index: -1;
  translate: 0 max(var(--scroll, 0) * -.07px, -45vh);
  pointer-events: none;
}
body::before {
  content: "";
  background:
    radial-gradient(60vmax 50vmax at 72% 30%, rgb(182 143 239 / .09), transparent 70%),
    radial-gradient(50vmax 40vmax at 15% 85%, rgb(247 212 76 / .05), transparent 70%);
}
.circuitry { overflow: hidden; opacity: .09; }
.circuitry svg { position: absolute; top: -32px; left: -32px; width: calc(100% + 64px); height: calc(100% + 64px); }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* The header stays put while the page scrolls. A backdrop fades in behind it once the
   page has moved under it, and on the main page a small store button joins it whenever
   neither of the big ones is on screen. */
header { position: relative; z-index: 10; padding-top: env(safe-area-inset-top); }
html.js header { position: sticky; top: 0; }
header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-bottom: 1px solid rgb(255 255 255 / .08);
  background: rgb(11 14 18 / .8);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  opacity: 0;
  transition: opacity .3s ease;
}
header.stuck::before { opacity: 1; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.home { display: flex; align-items: center; min-height: 44px; }
.wordmark { display: block; width: 128px; height: auto; }
.wordmark path { stroke: var(--ink); }
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: #1a1606;
  font-weight: 700;
  font-size: .9375rem;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .25) inset, 0 6px 24px -8px rgb(247 212 76 / .6);
  -webkit-tap-highlight-color: transparent;
}
.pill::after { content: ""; position: absolute; inset: -4px; }
.pill:active { scale: .96; }
html.js header:not(.offer) .pill { opacity: 0; visibility: hidden; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  padding-block: 28px 72px;
}
/* The headline is two short sentences, one per line. --line is the room a line has and
   --fit the width of the language's longer sentence in ems, so the type steps down just
   far enough to keep each sentence on its own line. Measure again if the headline changes. */
html { --fit: 6.6; }
html:lang(fr) { --fit: 9.1; }
html:lang(it) { --fit: 8.8; }
html:lang(ja) { --fit: 8.1; }
html:lang(de) { --fit: 9.55; }
html:lang(es) { --fit: 9.05; }
h1 {
  --line: calc(100vw - 2 * var(--gutter));
  margin: 0;
  font-weight: 700;
  font-size: min(clamp(2.75rem, 11vw, 5.25rem), calc(var(--line) / var(--fit)));
  line-height: .98;
  letter-spacing: -.035em;
}
h1 span { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
h1 b { display: block; font-weight: inherit; }
.lede {
  margin: 24px 0 0;
  max-width: 32ch;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  line-height: 1.45;
  color: var(--soft);
  text-wrap: balance;
}
.cta { margin-top: 36px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 28px 0 22px;
  border-radius: 16px;
  background: var(--yellow);
  color: #1a1606;
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .25) inset, 0 10px 40px -8px rgb(247 212 76 / .55);
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .5) 50%, transparent 65%);
  translate: -110% 0;
}
.button:hover::after { translate: 110% 0; transition: translate .7s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgb(255 255 255 / .35) inset, 0 14px 48px -6px rgb(247 212 76 / .7); }
.button:active { transform: scale(.97); }
.button svg { width: 22px; height: 22px; flex: none; }
.note { margin: 0; font-size: .9375rem; color: var(--idle); }
/* Before launch: the site's own notice where the store badge will go. It isn't a link, and
   it stays clearly unlike Apple's badges; its node glows like a circuit waiting for power. */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  margin: 0;
  padding: 8px 22px 8px 18px;
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 16px;
  background: rgb(50 58 66 / .45);
  line-height: 1.2;
  text-align: start;
}
.soon i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgb(247 212 76 / .18), 0 0 14px rgb(247 212 76 / .7); }
.soon b { display: block; color: var(--ink); font-size: 1.0625rem; }
.soon small { display: block; color: var(--soft); font-size: .875rem; }

/* Phone and the powered wires feeding it */
.stage {
  --glow: rgb(182 143 239 / .22);
  position: relative;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: min(300px, 74vw);
  container-type: inline-size;
}
/* A dark titanium iPhone, proportioned from the real device: a thin polished rim,
   a black display border and the Dynamic Island. Every size is in cqi, a percentage
   of the phone's width, so the whole device scales as one piece. */
.phone {
  position: relative;
  width: 100%;
  padding: 1.1cqi;
  border-radius: 17cqi;
  background:
    linear-gradient(90deg, rgb(255 255 255 / .2), transparent 2.4cqi, transparent calc(100% - 2.4cqi), rgb(255 255 255 / .14)),
    linear-gradient(160deg, #78838f, #2d343c 20%, #1a1f25 48%, #2f363f 76%, #6f7a87);
  box-shadow:
    inset 0 0 0 .25cqi rgb(255 255 255 / .1),
    inset 0 .35cqi .3cqi rgb(255 255 255 / .28),
    inset 0 -.35cqi .3cqi rgb(0 0 0 / .5),
    0 0 0 1px rgb(0 0 0 / .8),
    0 2cqi 5cqi rgb(0 0 0 / .45),
    0 34cqi 60cqi -22cqi rgb(0 0 0 / .95),
    0 0 46cqi -8cqi var(--glow);
  transition: box-shadow 1.2s ease;
}
.stage.sound-on { --glow: rgb(182 143 239 / .45); }
.phone .key {
  position: absolute;
  width: 1.1cqi;
  border-radius: .6cqi;
  background: linear-gradient(90deg, #1d2228, #7a8592 55%, #3b434c);
  box-shadow: 0 0 0 1px rgb(0 0 0 / .6);
}
.key.action { left: -.8cqi; top: 40cqi; height: 7.5cqi; }
.key.up { left: -.8cqi; top: 54cqi; height: 14cqi; }
.key.down { left: -.8cqi; top: 71cqi; height: 14cqi; }
.key.side { right: -.8cqi; top: 60cqi; height: 22cqi; background: linear-gradient(270deg, #1d2228, #7a8592 55%, #3b434c); }
.bezel {
  position: relative;
  padding: 3cqi;
  border-radius: 15.9cqi;
  background: #010203;
  box-shadow: inset 0 0 0 .3cqi rgb(255 255 255 / .05);
}
.screen {
  position: relative;
  aspect-ratio: 720 / 1560;
  border-radius: 12.9cqi;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}
.screen video {
  display: block;
  cursor: pointer;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.island {
  position: absolute;
  z-index: 1;
  top: 2.3cqi;
  left: 50%;
  width: 26.5cqi;
  height: 7.6cqi;
  translate: -50% 0;
  border-radius: 99px;
  background: #000;
  box-shadow: inset 0 0 0 .2cqi rgb(255 255 255 / .07), 0 0 0 .2cqi rgb(0 0 0 / .6);
}
.island::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 2.2cqi;
  width: 3.4cqi;
  height: 3.4cqi;
  translate: 0 -50%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #33456a, #0b111c 50%, #000 75%);
  box-shadow: 0 0 0 .35cqi #07090d;
}
/* A faint sheen across the glass. */
.screen::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(125deg, rgb(255 255 255 / .08), rgb(255 255 255 / .02) 30%, transparent 55%);
  pointer-events: none;
}
.wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: -1;
  pointer-events: none;
}
.wires path {
  fill: none;
  stroke-width: .9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wires .trace, .wires .halo { stroke-dasharray: 1; }
.wires .halo { stroke-width: 3.2; opacity: .18; }
.wires .pulse { stroke: #fff; stroke-width: .9; stroke-dasharray: .06 .94; stroke-dashoffset: 1; opacity: 0; }
.sound-on .wires .pulse { opacity: .9; }
.wires g:nth-child(1) { --i: 0; }
.wires g:nth-child(2) { --i: 1; }
.wires g:nth-child(3) { --i: 2; }
.wires g:nth-child(4) { --i: 3; }
.wires g:nth-child(5) { --i: 4; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flow { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.controls { display: flex; justify-content: center; align-items: center; gap: 10px; }
/* The buttons are wired up by the script, so without it they would do nothing. */
html:not(.js) .controls { display: none; }
.control {
  position: relative;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 999px;
  background: rgb(22 27 33 / .85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font: inherit;
  font-size: .9375rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .3s ease, box-shadow .3s ease, scale .15s ease;
}
.control:hover { border-color: rgb(255 255 255 / .3); }
.control:active { scale: .96; }
.control.round { width: 44px; padding: 0; justify-content: center; }
.control svg { width: 20px; height: 20px; flex: none; }
.when-paused, .paused .when-playing { display: none; }
.paused .when-paused { display: inline; }
.sound .on, .sound-on .sound .off { display: none; }
.sound-on .sound .on { display: inline; }
.sound-on .sound { border-color: rgb(255 255 255 / .3); box-shadow: 0 0 28px -8px rgb(182 143 239 / .7); }
/* One bar per instrument, moving while the song plays. */
.meter { display: none; align-items: flex-end; gap: 2.5px; width: 20px; height: 16px; flex: none; }
.sound-on .meter { display: inline-flex; }
.sound-on .sound svg { display: none; }
.meter i { flex: 1; height: 100%; border-radius: 1.5px; background: var(--c); transform-origin: 50% 100%; scale: 1 .4; }
.meter i:nth-child(1) { --c: var(--purple); scale: 1 .55; }
.meter i:nth-child(2) { --c: var(--pink); scale: 1 .9; }
.meter i:nth-child(3) { --c: var(--cyan); scale: 1 .4; }
.meter i:nth-child(4) { --c: var(--green); scale: 1 .7; }

/* Features, each in its instrument's wire colour, fading out below its text. In one column
   each wire runs down from its node and powers on as the page scrolls (--p is how far
   along it the power has reached); side by side on wide screens, each is tapped off with
   its own bracket. */
.features { --h2: clamp(1.6rem, 4.6vw, 2.25rem); --node: calc(var(--h2) * .55); list-style: none; margin: 0; padding: 24px 0; }
.features > li { --c: var(--ink); --p: 1; position: relative; max-width: 40rem; }
.features > li::before, .features > li::after { content: ""; position: absolute; }
.features > li::after { width: 9px; height: 9px; border: 3px solid var(--c); border-radius: 50%; background: var(--board); box-sizing: content-box; }
@media (max-width: 899px) {
  .features > li { padding: 0 0 52px 34px; }
  .features > li:last-child { padding-bottom: 12px; }
  .features > li::before {
    left: 6px;
    top: var(--node);
    bottom: 0;
    width: 3px;
    border-radius: 3px;
    background: var(--c);
    box-shadow: 0 0 9px -1px var(--c);
    -webkit-mask-image: linear-gradient(#000 35%, transparent 92%);
    mask-image: linear-gradient(#000 35%, transparent 92%);
    clip-path: inset(0 -12px calc((1 - var(--p)) * 100%) -12px);
  }
  .features > li::after { left: 0; top: calc(var(--node) - 7.5px); }
  .features h2 { margin: 0 0 8px; }
}
@media (min-width: 900px) {
  .features > li { padding: 0 0 72px 52px; }
  .features > li::before {
    left: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    border-top: 3px solid var(--c);
    border-left: 3px solid var(--c);
    border-top-left-radius: 16px;
    filter: drop-shadow(0 0 5px var(--c));
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 95%);
    mask-image: linear-gradient(to bottom, #000 45%, transparent 95%);
  }
  .features > li::after { left: 27px; top: -6px; }
  .features h2 { margin: -.4em 0 10px; }
}
.features > li:nth-child(1) { --c: var(--purple); }
.features > li:nth-child(2) { --c: var(--pink); }
.features > li:nth-child(3) { --c: var(--cyan); }
.features > li:nth-child(4) { --c: var(--green); }
.features h2 { font-size: var(--h2); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.features p { margin: 0; max-width: 34em; color: var(--soft); text-wrap: pretty; }
.instruments { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.instruments li { --c: var(--ink); padding: 4px 12px; border-radius: 999px; font-size: .875rem; color: var(--ink); background: rgb(50 58 66 / .7); border: 1px solid rgb(255 255 255 / .08); }
.instruments li:nth-child(1) { --c: var(--purple); }
.instruments li:nth-child(2) { --c: var(--pink); }
.instruments li:nth-child(3) { --c: var(--cyan); }
.instruments li:nth-child(4) { --c: var(--green); }
.features > li.in .instruments li { color: var(--c); border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 14px -5px var(--c); }

/* Closing call: one last wire runs down into the app icon and switches it on. */
.closing { padding-block: 40px 88px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.closing::before {
  content: "";
  width: 3px;
  height: 72px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(transparent, var(--yellow));
  filter: drop-shadow(0 0 5px rgb(247 212 76 / .6));
}
.closing .icon { position: relative; width: 112px; height: 112px; }
.closing .icon img { display: block; width: 100%; height: 100%; border-radius: 22.5%; box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 24px 60px -12px rgb(0 0 0 / .8); }
.closing h2 { margin: 28px 0 10px; font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; }
.closing p { margin: 0; max-width: 32ch; color: var(--soft); font-size: 1.125rem; text-wrap: balance; }
.closing .cta { align-items: center; }

footer { padding-block: 20px max(40px, env(safe-area-inset-bottom)); border-top: 1px solid rgb(255 255 255 / .08); font-size: .875rem; color: var(--idle); }
footer nav { display: flex; flex-wrap: wrap; gap: 0 28px; }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
footer a { color: var(--soft); text-decoration: none; }
footer a:hover, footer a:active { color: var(--ink); text-decoration: underline; }
footer p { margin: 0 0 4px; }

@media (min-width: 900px) {
  .bar { min-height: 84px; }
  .wordmark { width: 148px; }
  .hero { grid-template-columns: 1.15fr 1fr; gap: 32px; padding-block: 40px 120px; min-height: min(900px, calc(100svh - 84px)); }
  h1 { --line: calc((min(1120px, 100vw - 2 * var(--gutter)) - 32px) * .535); font-size: min(clamp(2.75rem, 5.8vw, 5.25rem), calc(var(--line) / var(--fit))); }
  .lede { font-size: clamp(1.05rem, 1.45vw, 1.35rem); }
  .stage { width: clamp(280px, (100svh - 260px) * .45, 340px); }
  .features { padding-top: 64px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 72px; row-gap: 24px; }
  .features > li:nth-child(3), .features > li:nth-child(4) { padding-bottom: 8px; }
  .closing { padding-block: 88px 120px; }
  .closing::before { height: 96px; }
}

/* On a phone the visitor is already holding the device, so the frame goes and the board
   plays straight on the page: full width, cropped to the band of the recording where the
   puzzle sits, its top and bottom melting into the background. */
@media (max-width: 599px) {
  .hero { gap: 28px; padding-block: 28px 40px; }
  /* Few voices above the video: the headline, a quieter lede at reading size, then one
     status line. Before launch the notice drops its box and reads as that line, in the
     wire's yellow, so the video's sound button is the only thing that looks pressable. */
  .lede { margin-top: 16px; max-width: none; font-size: 1.0625rem; }
  .cta { margin-top: 24px; gap: 4px; }
  .soon { min-height: 0; padding: 0; border: 0; background: none; gap: 10px; }
  .soon i { width: 10px; height: 10px; }
  .soon b, .soon small { display: inline; font-size: 1rem; }
  .soon b { color: var(--yellow); }
  html[data-release="soon"] .hero .note { padding-left: 20px; }
  .stage { width: auto; justify-self: stretch; margin-inline: calc(-1 * var(--gutter)); gap: 0; }
  .phone, .bezel { padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .phone .key, .island, .wires, .screen::after { display: none; }
  .screen {
    aspect-ratio: 10 / 13;
    border-radius: 0;
    background: none;
    -webkit-mask-image: linear-gradient(transparent, #000 13%, #000 84%, transparent);
    mask-image: linear-gradient(transparent, #000 13%, #000 84%, transparent);
  }
  .screen video { object-position: 50% 55%; }
  /* The buttons sit in the video's top corner so the sound is in reach above the fold. */
  .controls { position: absolute; z-index: 1; top: 10px; right: var(--gutter); }
}

/* Motion. One page-load sequence (wordmark draws, headline rises, the phone arrives,
   the wires plug in), then each section lights up as it scrolls into view. It all lives
   here so readers who prefer reduced motion get the finished page with nothing hidden. */
@media (prefers-reduced-motion: no-preference) {
  .soon i { animation: standby 2.4s ease-in-out infinite; }
  .wordmark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.3s cubic-bezier(.5, 0, .2, 1) .1s forwards; }
  .wordmark circle { transform-origin: 96px 8px; scale: 0; animation: pop .55s cubic-bezier(.3, 1.6, .5, 1) 1.15s forwards; }
  h1 b { translate: 0 108%; animation: rise .95s cubic-bezier(.2, .8, .2, 1) .25s forwards; }
  h1 span + span b { animation-delay: .38s; }
  .lede, .cta { opacity: 0; translate: 0 16px; animation: fade-up .8s cubic-bezier(.2, .8, .2, 1) .7s forwards; }
  .cta { animation-delay: .85s; }
  .stage { opacity: 0; translate: 0 48px; scale: .94; animation: arrive 1.25s cubic-bezier(.2, .8, .2, 1) .45s forwards; }
  .phone { animation: float 7s ease-in-out 2.2s infinite; }
  .wires .trace, .wires .halo { stroke-dashoffset: 1; animation: draw 1.5s cubic-bezier(.6, 0, .2, 1) calc(1.3s + var(--i) * .11s) forwards; }
  .controls { opacity: 0; animation: fade-up .7s ease-out 1.6s forwards; }
  .pill { transition: opacity .3s ease, translate .45s cubic-bezier(.3, 1.5, .5, 1), scale .15s ease; }
  html.js header:not(.offer) .pill { translate: 0 -10px; transition: opacity .2s ease, translate .2s ease, visibility 0s .2s; }
  .sound-on .wires .pulse { animation: flow 1.8s linear infinite; }
  .sound-on:not(.paused) .meter i { animation: meter .47s ease-in-out infinite alternate; }
  .sound-on:not(.paused) .meter i:nth-child(2) { animation-duration: .61s; animation-delay: -.2s; }
  .sound-on:not(.paused) .meter i:nth-child(3) { animation-duration: .39s; animation-delay: -.1s; }
  .sound-on:not(.paused) .meter i:nth-child(4) { animation-duration: .55s; animation-delay: -.35s; }
  /* While the song is still silent, the sound button rings quietly for attention. */
  .stage:not(.sound-on) .sound::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 1px solid var(--yellow);
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    animation: ring 2.8s ease-out 3s infinite;
  }
  @media (max-width: 599px) {
    .stage { translate: 0 28px; scale: 1; }
    .phone { animation: none; }
    /* The board drifts a little inside its window as the hero scrolls away. */
    .screen video { object-position: 50% calc(55% - min(var(--scroll, 0), 800) * .00625%); }
  }

  @media (max-width: 899px) {
    html.js .features > li { --p: 0; }
    html.js .features > li::before { transition: clip-path .18s linear; }
    html.js .features > li::after { transition: border-color .3s ease; }
    html.js .features > li:not(.in)::after { border-color: color-mix(in srgb, var(--idle) 55%, var(--board)); }
    html.js .features > li.in::after { animation: tap-on .9s ease-out; }
  }
  @media (min-width: 900px) {
    html.js .features > li::before { clip-path: inset(0 100% 100% 0); transition: clip-path 1s cubic-bezier(.4, 0, .2, 1) .1s; }
    html.js .features > li.in::before { clip-path: inset(0 -8px -8px 0); }
    html.js .features > li::after { opacity: 0; scale: .5; transition: opacity .45s ease .25s, scale .45s cubic-bezier(.3, 1.6, .5, 1) .25s; }
    html.js .features > li.in::after { opacity: 1; scale: 1; }
  }
  html.js .features > li > h2, html.js .features > li > p, html.js .instruments {
    opacity: 0;
    translate: 0 14px;
    transition: opacity .7s ease .15s, translate .7s cubic-bezier(.2, .8, .2, 1) .15s;
  }
  html.js .features > li > p { transition-delay: .3s; }
  html.js .instruments { transition-delay: .45s; }
  html.js .features > li.in > h2, html.js .features > li.in > p, html.js .features > li.in .instruments { opacity: 1; translate: 0; }
  .instruments li { transition: color .5s ease, border-color .5s ease, box-shadow .5s ease; }
  .features > li.in .instruments li:nth-child(1) { transition-delay: .7s; }
  .features > li.in .instruments li:nth-child(2) { transition-delay: .85s; }
  .features > li.in .instruments li:nth-child(3) { transition-delay: 1s; }
  .features > li.in .instruments li:nth-child(4) { transition-delay: 1.15s; }

  /* The wire draws down, the icon lands on the end of it and two rings go out. */
  html.js .closing::before { clip-path: inset(0 -12px 100% -12px); transition: clip-path .7s cubic-bezier(.6, 0, .2, 1); }
  html.js .closing.in::before { clip-path: inset(0 -12px 0 -12px); }
  html.js .closing > * { opacity: 0; translate: 0 20px; transition: opacity .8s ease .45s, translate .8s cubic-bezier(.2, .8, .2, 1) .45s, scale .8s cubic-bezier(.3, 1.4, .5, 1) .45s; }
  html.js .closing > .icon { translate: 0; scale: .7; }
  html.js .closing > :nth-child(2) { transition-delay: .6s; }
  html.js .closing > :nth-child(3) { transition-delay: .7s; }
  html.js .closing > :nth-child(4) { transition-delay: .8s; }
  html.js .closing.in > * { opacity: 1; translate: 0; scale: 1; }
  .closing .icon::before, .closing .icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid var(--yellow);
    border-radius: 22.5%;
    opacity: 0;
    pointer-events: none;
  }
  .closing.in .icon::before { animation: ripple 1.6s ease-out .75s; }
  .closing.in .icon::after { animation: ripple 1.6s ease-out 1.05s; }
  .closing .icon img { animation: breathe 5s ease-in-out infinite; }
}
@keyframes rise { to { translate: 0; } }
@keyframes standby { 50% { box-shadow: 0 0 0 7px rgb(247 212 76 / 0), 0 0 6px rgb(247 212 76 / .3); } }
@keyframes fade-up { to { opacity: 1; translate: 0; } }
@keyframes arrive { to { opacity: 1; translate: 0; scale: 1; } }
@keyframes pop { to { scale: 1; } }
@keyframes meter { from { scale: 1 .25; } to { scale: 1 1; } }
@keyframes ring { 0% { opacity: .75; scale: 1; } 55%, 100% { opacity: 0; scale: 1.12 1.4; } }
@keyframes tap-on { from { box-shadow: 0 0 0 0 var(--c); } to { box-shadow: 0 0 0 14px transparent; } }
@keyframes ripple { from { opacity: .7; scale: 1; } to { opacity: 0; scale: 1.9; } }
@keyframes float { 50% { translate: 0 -1.6cqi; } }
@keyframes breathe { 50% { box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 24px 60px -12px rgb(0 0 0 / .8), 0 0 70px -10px rgb(247 212 76 / .45); } }
@media (prefers-reduced-motion: reduce) {
  .sound-on .wires .pulse { animation: none; opacity: 0; }
  .button { transition: none; }
  .button:hover::after { transition: none; }
}

/* Apple's badge: fixed artwork, so it only gets clear space and a hover lift. */
.badge { display: inline-block; border-radius: 10px; -webkit-tap-highlight-color: transparent; transition: transform .15s ease, filter .15s ease; }
.badge img { display: block; height: 56px; width: auto; }
.badge:hover { transform: translateY(-1px); filter: brightness(1.12); }
.badge:active { transform: scale(.97); filter: brightness(.85); }

/* Desktop visitors can't tap through, so they get a code for their phone. */
.cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; }
.qr { display: none; align-items: center; gap: 12px; color: var(--idle); font-size: .875rem; }
.qr img { width: 72px; height: 72px; padding: 5px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgb(255 255 255 / .12); }
.qr p { margin: 0; max-width: 15ch; line-height: 1.3; }
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) { .qr { display: flex; } }

/* Footer language links */
.langs { column-gap: 24px; margin: 0 0 14px; }
@media (max-width: 599px) { footer .langs { display: grid; grid-template-columns: repeat(3, max-content); column-gap: 32px; } }
.langs a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Support, privacy, press and 404 */
.article article { max-width: 42rem; padding-block: 40px 96px; }
.article h1 { margin: 0 0 16px; font-size: clamp(2.25rem, 7vw, 3.5rem); line-height: 1; letter-spacing: -.03em; }
.article .standfirst { margin: 0; font-size: clamp(1.15rem, 2.4vw, 1.3rem); line-height: 1.45; color: var(--soft); }
.article .meta { color: var(--idle); font-size: .9375rem; }
.article .standfirst + .meta { margin-top: 14px; }
.article h2 { margin: 48px 0 12px; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.02em; }
/* Each section opens with a quiet line icon on a small tile like the game's, tinted with
   the instrument colours in turn. */
.article h2:has(.ico) { display: flex; align-items: center; gap: 12px; margin-top: 52px; }
.ico {
  --c: var(--yellow);
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgb(255 255 255 / .07);
  background: rgb(50 58 66 / .35);
  color: color-mix(in srgb, var(--c) 55%, var(--idle));
}
.ico svg { width: 18px; height: 18px; }
.article h2:nth-of-type(5n+2) .ico { --c: var(--purple); }
.article h2:nth-of-type(5n+3) .ico { --c: var(--pink); }
.article h2:nth-of-type(5n+4) .ico { --c: var(--cyan); }
.article h2:nth-of-type(5n) .ico { --c: var(--green); }
.article p, .article li, .article dd { color: var(--soft); }
.article p { margin: 0 0 14px; text-wrap: pretty; }
.article a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(255 255 255 / .3); }
.article a:hover { text-decoration-color: currentColor; }
.article strong { color: var(--ink); font-weight: 700; }
.article ul { padding-left: 1.2em; }
.article li { margin: 0 0 8px; }
.article dl { margin: 0; }
.article dt { margin: 22px 0 6px; color: var(--ink); font-weight: 700; }
.article dd { margin: 0; }
.article .facts { display: grid; grid-template-columns: max-content 1fr; column-gap: 24px; }
.article .facts dt { margin: 0; padding: 10px 0; border-top: 1px solid rgb(255 255 255 / .08); }
.article .facts dd { padding: 10px 0; border-top: 1px solid rgb(255 255 255 / .08); }
.article .button { margin-top: 12px; color: #1a1606; text-decoration: none; }
.article .kit { display: grid; gap: 10px; padding: 0; list-style: none; }
.kit a { display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; border-radius: 14px; background: rgb(50 58 66 / .45); border: 1px solid rgb(255 255 255 / .08); text-decoration: none; color: var(--ink); }
.kit a:hover { border-color: rgb(255 255 255 / .22); background: rgb(50 58 66 / .65); }
.kit img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; flex: none; }
.kit span { min-width: 0; }
.kit small { display: block; margin-top: 2px; color: var(--idle); font-size: .875rem; }
@media (min-width: 640px) { .kit { grid-template-columns: 1fr 1fr; } }

/* Japanese pages keep the system font for the headline and body. */
html:lang(ja) body { font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; }
html:lang(ja) h1, html:lang(ja) .features h2, html:lang(ja) .closing h2 { letter-spacing: 0; line-height: 1.15; }
/* Break lines between phrases rather than inside a word, where the browser can. */
html:lang(ja) :is(h1, h2, p) { word-break: auto-phrase; line-break: strict; }
html:lang(ja) h1 { font-size: min(clamp(2.4rem, 9vw, 4.4rem), calc(var(--line) / var(--fit))); }
