:root {
  --amber: #F9A62E;      /* only for "now" */
  --ink: #141312;
  --paper: #F6F4F0;
  --paper-2: #E4DFD6;
  --soft: #5F5A52;       /* secondary text on paper */
  --soft-dark: #B3ADA2;  /* secondary text on ink */
  --gutter: clamp(1.9rem, 4vw, 4.5rem);
  --u: clamp(1.5px, 1.35vw, 20px);          /* one semitone of the line */
  --gap: clamp(1.75rem, 4.5vw, 4.5rem);
  --tile: clamp(2.1rem, 3.6vw, 3.25rem);
  --edge: clamp(1.1rem, 5vw, 5rem);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 400 clamp(1.0625rem, 0.4vw + 0.95rem, 1.3rem)/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 4px; }
h1, h2, h3, p, ul, dl { margin: 0; }
h1, h2 { font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 7.2vw, 7.25rem); }
h2 { font-size: clamp(2.1rem, 5vw, 4.75rem); }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--paper); color: var(--ink); padding: 0.6rem 1rem; z-index: 5; }
.skip:focus { top: 1rem; }

/* Header and footer */
.bar { display: flex; align-items: center; gap: 1.5rem; padding: 1.1rem var(--edge) 1.1rem calc(var(--gutter) - var(--tile) / 2); font-size: 1rem; }
.bar a { text-decoration: none; padding: 0.5rem 0; }
.bar a:hover { text-decoration: underline; }
.brand { display: flex; align-items: center; gap: 0.65rem; font-weight: 700; letter-spacing: -0.01em; margin-right: auto; }
.brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.foot { background: var(--ink); color: var(--soft-dark); display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem; padding: 2rem var(--edge) 2.5rem calc(var(--gutter) - var(--tile) / 2); font-size: 1rem; }
.foot a { padding: 0.4rem 0; }
.foot span { margin-right: auto; padding: 0.4rem 0; }

main { flex: 1; }

/* The line. --k is this part's key in semitones above G, --p the part before it. */
.part { --line: #A79F92; position: relative; padding: clamp(4.5rem, 10vw, 10rem) var(--edge) clamp(4.5rem, 10vw, 10rem) calc(var(--gutter) + var(--k) * var(--u) + var(--gap)); }
.part::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) + var(--k) * var(--u) - 1.5px); width: 3px; background: var(--line); transition: background-color 0.35s; }
.part::after { content: ""; position: absolute; top: 0; left: calc(var(--gutter) + var(--p) * var(--u) - 1.5px); width: calc((var(--k) - var(--p)) * var(--u) + 3px); height: 3px; background: var(--line); transition: background-color 0.35s; }
.tile { position: absolute; z-index: 1; left: calc(var(--gutter) + var(--k) * var(--u) - var(--tile) / 2); width: var(--tile); height: var(--tile); border-radius: 28%; display: grid; place-items: center; font-weight: 700; font-size: calc(var(--tile) * 0.42); letter-spacing: -0.02em; background: var(--paper-2); color: var(--ink); transition: background-color 0.35s; margin-top: 0.15rem; }
.now { --line: var(--amber); }
.now > .tile { background: var(--amber); color: var(--ink); }
.dark { background: var(--ink); color: var(--paper); --line: #57524A; }
.dark.now { --line: var(--amber); }
.dark .tile { background: #35322E; color: var(--paper); }
.dark.now > .tile { background: var(--amber); color: var(--ink); }
.lead { max-width: 34rem; margin-top: 1.5rem; }
.lead + .lead { margin-top: 1rem; }
.dark .lead { color: #D8D3CA; }

/* Device frames, drawn in CSS around the raw screens. Sizes follow the frame's width (cqw). */
.screen, .wide, .hero-shot { container-type: inline-size; isolation: isolate; }
.phone { position: relative; padding: 1.75cqw; border: 1.15cqw solid transparent; border-radius: 17.2cqw; background: linear-gradient(#050505, #050505) padding-box, linear-gradient(100deg, #7D7871, #E3DFD8 9%, #8B8680 24%, #A8A39B 70%, #E9E5DF 91%, #77726B) border-box; box-shadow: inset 0 0 0 0.4cqw #3A3835, 0 2.5cqw 5cqw -1.5cqw rgb(20 19 18 / 0.4); }
.phone::before, .phone::after { content: ""; position: absolute; z-index: -1; width: 1.5cqw; }
.phone::before { left: -2cqw; top: 33cqw; height: 47cqw; border-radius: 0.6cqw 0 0 0.6cqw; background: linear-gradient(#8B8680 0 7.5cqw, transparent 0 14cqw, #8B8680 0 28cqw, transparent 0 33cqw, #8B8680 0); }
.phone::after { right: -2cqw; top: 56cqw; height: 22cqw; border-radius: 0 0.6cqw 0.6cqw 0; background: #A8A39B; }
.phone img { width: 100%; border-radius: 14.3cqw; }
/* Camera cut-out: same place and size as in the Lock Screen image, which already shows it. */
.island > i { position: absolute; left: 50%; top: 5.15cqw; width: 22.2cqw; height: 8.6cqw; margin-left: -11.1cqw; border-radius: 4.3cqw; background: radial-gradient(circle at 81% 50%, #141C26 0 1.5cqw, transparent 1.7cqw), #000; box-shadow: 0 0 0 0.25cqw #171717; }
/* These two screenshots stop in the middle of a row. Fade the last row out. */
.end-song img { -webkit-mask-image: linear-gradient(#000 94.5%, transparent 97.5%); mask-image: linear-gradient(#000 94.5%, transparent 97.5%); }
.end-list img { -webkit-mask-image: linear-gradient(#000 97.2%, transparent 99%); mask-image: linear-gradient(#000 97.2%, transparent 99%); }
.tablet { position: relative; padding: 2.3cqw; border: 0.5cqw solid transparent; border-radius: 4.3cqw; background: linear-gradient(#050505, #050505) padding-box, linear-gradient(100deg, #7D7871, #E3DFD8 6%, #A8A39B 30%, #A8A39B 72%, #E9E5DF 95%, #77726B) border-box; box-shadow: inset 0 0 0 0.15cqw #2E2C2A, 0 1.6cqw 3.2cqw -1cqw rgb(20 19 18 / 0.4); }
.tablet::after { content: ""; position: absolute; top: 0.75cqw; left: 50%; width: 0.85cqw; height: 0.85cqw; margin-left: -0.42cqw; border-radius: 50%; background: #1B2026; }
.tablet img { width: 100%; border-radius: 2cqw; }
.dark .phone { box-shadow: inset 0 0 0 0.4cqw #3A3835; }
.dark .tablet { box-shadow: inset 0 0 0 0.15cqw #3A3835; }

/* Hero */
.hero { --k: 0; --p: 0; --top: clamp(3rem, 11vh, 8rem); padding-top: var(--top); padding-bottom: clamp(2rem, 4vw, 3.5rem); min-height: min(88vh, 54rem); min-height: min(88svh, 54rem); display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(2rem, 5vw, 6rem); }
.hero > .tile { top: var(--top); }
.home-bar { background: var(--ink); color: var(--paper); margin-bottom: -1px; padding-bottom: 1px; }
.home-bar .brand { margin-right: 1rem; }
/* Width is also limited by window height, so the whole phone fits without scrolling. */
.hero-shot { position: relative; z-index: 1; width: clamp(17rem, min(34vw, (100vh - 5rem) * 0.48), 30rem); width: clamp(17rem, min(34vw, (100svh - 5rem) * 0.48), 30rem); margin-top: calc(-1 * var(--top) - 2.6rem); align-self: start; }
.cta { display: inline-block; margin-top: 2.25rem; padding: 0.95rem 1.6rem; border-radius: 0.9rem; background: var(--paper); color: var(--ink); font-weight: 650; text-decoration: none; }
.note { margin-top: 0.7rem; font-size: 1rem; color: var(--soft-dark); }

/* Problem */
.three { list-style: none; padding: 0; margin-top: clamp(2rem, 4vw, 3.5rem); font-size: clamp(1.6rem, 3.5vw, 3.1rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.three li { text-wrap: balance; padding: 0.5em 0; border-top: 2px solid var(--paper-2); }
.three li:last-child { border-bottom: 2px solid var(--paper-2); }

/* Text beside a screen */
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); gap: clamp(2rem, 6vw, 7rem); align-items: start; }
.pair .screen { width: 100%; }
.facts { margin-top: 2.25rem; max-width: 34rem; display: grid; gap: 1.1rem; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0.1rem 0 0; color: var(--soft); }
.dark .facts dd { color: var(--soft-dark); }

/* Lock Screen cards */
.cards { margin: clamp(2.5rem, 5vw, 4.5rem) 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.75rem, 3vw, 3rem) clamp(1rem, 2.5vw, 2.5rem); max-width: 68rem; }
.cards img { width: 100%; border-radius: 6.6% / 15.6%; box-shadow: 0 0 0 1px #3A3732; }
.cards span { display: block; margin-top: 0.7rem; font-size: 1rem; color: var(--soft-dark); }

/* Typed line */
.typed { margin-top: clamp(2rem, 4vw, 3rem); font-size: clamp(1.35rem, 2.6vw, 2.4rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; padding-bottom: 0.5em; border-bottom: 2px solid var(--ink); }
.parsed { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 clamp(1.25rem, 3vw, 3rem); margin-top: 1rem; }
.parsed dt { color: var(--soft); font-size: 1rem; }
.parsed dd { margin: 0; font-weight: 650; }

/* Stage */
.stage-shots { margin-top: clamp(2.5rem, 5vw, 4.5rem); display: grid; grid-template-columns: minmax(0, 1fr) min(15.5rem, 26%); gap: clamp(1rem, 2.5vw, 2.5rem); align-items: end; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 17rem)); gap: clamp(0.9rem, 2.5vw, 2.5rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.two figcaption { margin-top: 0.9rem; font-size: 1rem; color: var(--soft); }
figure { margin: 0; }

/* Questions */
.faq { margin-top: clamp(1.75rem, 4vw, 3rem); max-width: 46rem; border-bottom: 2px solid var(--paper-2); }
.faq details { border-top: 2px solid var(--paper-2); }
.faq summary { cursor: pointer; padding: 1.05rem 2.5rem 1.05rem 0; font-weight: 650; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 0.4rem; top: 50%; width: 0.6rem; height: 0.6rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { padding: 0 2.5rem 1.3rem 0; color: var(--soft); }

/* Text pages */
.text { padding: clamp(2rem, 6vw, 5rem) var(--edge) clamp(4rem, 9vw, 8rem) calc(var(--gutter) - var(--tile) / 2); max-width: 60rem; }
.text h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.text h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.15; margin-top: 2.75rem; }
.text p, .text ul, .text ol { margin-top: 0.8rem; max-width: 40rem; }
.text ul, .text ol { padding-left: 1.25rem; }

@media (max-width: 800px) {
  .hero { display: block; min-height: 0; padding-top: 2.5rem; padding-bottom: 0; }
  .hero-shot { width: min(96%, 22rem); margin: 3rem 0 0; }
  .hero > .hero-shot { padding-bottom: 3.5rem; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .pair .screen { max-width: 18rem; }
  .cards { grid-template-columns: minmax(0, 1fr); max-width: 30rem; }
  .stage-shots { grid-template-columns: minmax(0, 1fr); }
  .stage-shots .screen { max-width: 15.5rem; }
  .bar { gap: 1.1rem; padding-left: 1.1rem; }
  .home-bar .brand { margin-right: auto; }
  .hero > .tile { top: 2.5rem; }
  .cta { padding: 0.9rem 1.1rem; }
  .foot, .text { padding-left: 1.1rem; }
  .parsed { gap: 0 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .part::before, .part::after, .tile { transition: none; }
}
@media print { .part::before, .part::after, .tile, .bar nav { display: none; } }

.bar nav { display: contents; }
.text .updated { color: var(--soft); }
.summary-box { margin-top: 2rem; padding: 1.25rem 1.4rem; background: var(--paper-2); border-radius: 0.6rem; max-width: 40rem; }
.summary-box ul { margin-top: 0.5rem; }
.text li + li { margin-top: 0.5rem; }
