/* MXXM: four inks on white paper. Flat colour, overprinting and heavy condensed
   Futura. Colour always comes from an ink; --ink is the fifth, used for type. */
@font-face { font-family: "MX Heavy"; font-display: block;
  src: local("Futura-CondensedExtraBold"), local("Futura Condensed ExtraBold"), local("AvenirNextCondensed-Heavy"),
       local("Avenir Next Condensed Heavy"), local("Impact"); }
:root {
  --paper: #f3f7f8; --ink: #1a1b4b; --red: #ff335f; --blue: #00a8e8; --yellow: #ffd400; --green: #00b884;
  --heavy: "MX Heavy", "Arial Narrow", sans-serif;
  --text: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --edge: clamp(18px, 3.2vw, 52px);
  --bar: var(--paper); --bar-h: 64px;
  --keys: clamp(112px, 18vh, 172px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 0; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 1.125rem/1.5 var(--text); }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
h2 { font: 400 clamp(3rem, 7.4vw, 8rem)/0.88 var(--heavy); letter-spacing: -0.012em; text-wrap: balance; }
h3 { font: 400 clamp(2rem, 3.4vw, 3.25rem)/0.95 var(--heavy); }
img, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { color: inherit; font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }
.skip { position: fixed; z-index: 30; left: 12px; top: -80px; padding: 12px 16px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 12px; }
.noscript { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 16px; background: var(--ink); color: var(--paper); }

/* ---- bar ---- */
.bar { position: fixed; z-index: 20; inset: 0 0 auto; height: calc(var(--bar-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--edge) 0;
       display: flex; align-items: center; gap: clamp(16px, 3vw, 44px); background: var(--bar); }
.brand { font: 400 1.75rem/1 var(--heavy); letter-spacing: 0.01em; text-decoration: none; }
.bar .brand { padding-block: 10px; }
.bar nav { display: flex; gap: clamp(14px, 2vw, 30px); margin-left: auto; }
.bar nav a { padding-block: 10px; font-size: 1.0625rem; font-weight: 600; text-decoration: none; }
.bar nav a:hover, footer nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.dock { display: flex; }
.dock button { width: 44px; height: 44px; padding: 0; border: 2px solid var(--ink); margin-left: -2px; background: var(--paper); font: 400 1.375rem/1 var(--heavy); }
.dock .dock-stop { width: auto; padding: 0 14px; font: 600 1rem/1 var(--text); }
.dock button:focus-visible { position: relative; z-index: 1; }
html[data-dock="hidden"] .dock { visibility: hidden; opacity: 0; }
html[data-dock="shown"] .dock { opacity: 1; transition: opacity 0.2s; }
[data-layer="n"] { --plate: var(--red); } [data-layer="o"] { --plate: var(--blue); }
[data-layer="v"] { --plate: var(--yellow); } [data-layer="a"] { --plate: var(--green); }
.dock [aria-pressed="true"], .layers [aria-pressed="true"] { background: var(--plate); }
[data-stop]:disabled { color: rgb(26 27 75 / 0.5); }

/* ---- poster ---- */
.poster { height: 190vh; height: 190lvh; }
.poster-scene { position: sticky; top: 0; height: 100vh; height: 100dvh; min-height: 540px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
                padding: calc(var(--bar-h) + env(safe-area-inset-top)) var(--edge) max(var(--edge), env(safe-area-inset-bottom)); overflow: hidden; }
#poster { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.poster-head, .deck { position: relative; z-index: 1; }
.poster-area { margin-inline: calc(-1 * var(--edge)); pointer-events: none; }
.poster-head { pointer-events: none; }
h1#poster-title { font: 400 clamp(1.875rem, 3.5vw, 3.5rem)/0.95 var(--heavy); text-wrap: balance; }
h1 .touch { display: none; }
@media (hover: none) { h1 .touch { display: inline; } h1 .typed { display: none; } }
.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 6px; margin-bottom: 12px; }
.bars i { background: linear-gradient(90deg, var(--ink) var(--fill, 0%), rgb(26 27 75 / 0.16) var(--fill, 0%)); }
.layers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; }
.layers button { min-height: 58px; padding: 8px 16px; border: 2px solid var(--ink); background: var(--paper); font-weight: 600; text-align: left; }
.layers [data-layer] { display: flex; align-items: center; gap: 14px; }
.layers b { font: 400 2rem/1 var(--heavy); }
.layers button:not(:disabled):hover, .dock button:not(:disabled):hover { box-shadow: inset 0 -4px 0 var(--ink); }
.deck p { margin-top: 12px; }

/* ---- Nova taken apart ---- */
.tour { height: 620vh; background: var(--yellow); }
.tour-scene { position: sticky; top: 0; height: 100vh; height: 100dvh; min-height: 560px; overflow: hidden; }
.tour-copy { position: absolute; z-index: 4; left: var(--edge); top: calc(var(--bar-h) + env(safe-area-inset-top) + 26px); width: min(37vw, 640px); pointer-events: none; }
.tour-copy h2 { font-size: clamp(3.25rem, 8vw, 9rem); line-height: 0.84; }
.part { max-width: 22em; min-height: 6.2em; margin-top: clamp(16px, 3vh, 32px); font-weight: 600; font-size: clamp(1.0625rem, 1.5vw, 1.3rem); line-height: 1.4; }
.part strong { display: block; font: 400 1.75em/1.1 var(--heavy); }
.stage { position: absolute; left: 50%; top: calc((100% - var(--keys)) / 2); width: var(--w, 900px); aspect-ratio: 2000 / 1308;
         margin-left: calc(var(--w, 900px) / -2); margin-top: calc(var(--w, 900px) * -0.327);
         -webkit-transform-style: preserve-3d; transform-style: preserve-3d; will-change: transform; }
.plate, .slice { position: absolute; border-radius: calc(var(--w, 900px) * 0.011); }
.plate { inset: 0; border: 3px solid var(--ink); }
.plate::before { content: ""; position: absolute; inset: -3px; border-radius: inherit; background: #100d24; opacity: var(--solid, 0); }
.slot, .slice { left: calc(var(--x) / 2000 * 100%); top: calc(var(--y) / 1308 * 100%); width: calc(var(--sw) / 2000 * 100%); height: calc(var(--sh) / 1308 * 100%); }
.slot { position: absolute; border: 2px solid rgb(26 27 75 / 0.55); border-radius: calc(var(--w, 900px) * 0.009); }
.slice { padding: 0; border: 0; background: #17142f url(img/nova-edit.jpg) no-repeat;
         background-size: calc(2000 / var(--sw) * 100%) calc(1308 / var(--sh) * 100%);
         background-position: calc(var(--x) / (2000 - var(--sw)) * 100%) calc(var(--y) / (1308 - var(--sh)) * 100%); will-change: transform; }
.slice.focus, .slice[aria-pressed="true"] { outline: 4px solid var(--paper); outline-offset: -1px; }
.slice:focus-visible { outline: 6px solid var(--red); }
.tour-done { position: absolute; z-index: 4; left: var(--edge); right: var(--edge); bottom: calc(var(--keys) + 16px); visibility: hidden; text-align: center;
             font: 400 clamp(1.75rem, 2.8vw, 2.75rem)/1 var(--heavy); pointer-events: none; }
.key-message { position: absolute; z-index: 7; left: var(--edge); bottom: calc(var(--keys) + 12px); padding: 8px 12px; background: var(--ink); color: var(--paper); }
.key-message:empty, .sound-message:empty { display: none; }
.keyboard { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: var(--keys); display: flex; background: var(--ink); touch-action: none; user-select: none; -webkit-user-select: none; }
.key { position: relative; flex: 1 0 0; min-width: 0; padding: 0; border: 0; border-left: 2px solid var(--ink); border-top: 2px solid var(--ink); border-radius: 0; background: var(--paper); font-weight: 700; font-size: 1rem; -webkit-tap-highlight-color: transparent; }
.key span { position: absolute; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom)); text-align: center; line-height: 1; }
.key.sharp { position: absolute; z-index: 1; top: 0; height: 60%; width: calc(100% / var(--whites) * 0.58); left: calc(100% / var(--whites) * (var(--after) - 0.29)); border: 0; border-radius: 0 0 5px 5px; background: var(--ink); color: var(--yellow); }
.key.down { background: var(--red); color: var(--ink); }
.key:focus-visible { z-index: 2; outline-offset: -7px; }
.key.sharp:focus-visible { outline-color: var(--yellow); }

/* ---- sounds ---- */
.sounds { padding: calc(var(--bar-h) + clamp(40px, 7vw, 110px)) var(--edge) clamp(56px, 8vw, 130px); }
.sounds-head { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); gap: clamp(20px, 5vw, 90px); align-items: end; }
.sounds-head p { max-width: 30em; }
.prints { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px) clamp(12px, 2.4vw, 40px); margin-top: clamp(28px, 4.5vw, 72px); }
.prints button { --progress: 0; position: relative; display: grid; gap: 2px; padding: 0 0 12px; border: 0; background: none; text-align: left; }
.prints canvas { width: 100%; aspect-ratio: 1; }
.prints strong { font: 400 clamp(1.5rem, 2.2vw, 2.25rem)/1 var(--heavy); }
.prints button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--ink); transform: scaleX(var(--progress)); transform-origin: left; }
.prints button:hover strong, .prints [aria-pressed="true"] strong { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.sound-message { margin-top: 28px; padding: 12px 16px; background: var(--ink); color: var(--paper); }

/* ---- features ---- */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); align-items: center; gap: clamp(24px, 4vw, 72px);
           padding: calc(var(--bar-h) + clamp(24px, 4vw, 64px)) 0 clamp(48px, 6vw, 100px) var(--edge); overflow: hidden; }
.feature.flip { grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); padding: calc(var(--bar-h) + clamp(24px, 4vw, 64px)) var(--edge) clamp(48px, 6vw, 100px) 0; }
.feature.flip .crop { order: -1; }
.feature h2 { font-size: clamp(2.75rem, 5.6vw, 6.25rem); }
.feature p { max-width: 25em; margin-top: 22px; font-weight: 600; font-size: 1.1875rem; }
.blue { background: var(--blue); } .red { background: var(--red); } .green { background: var(--green); } .yellow { background: var(--yellow); }
/* --x --y --w: the region shown, in a 2000 x 1308 screenshot; the ratio sets its height */
.crop { overflow: hidden; background: #14122a; }
.crop img { width: calc(100% * 2000 / var(--w)); max-width: none; transform: translate(calc(-100% * var(--x) / 2000), calc(-100% * var(--y) / 1308)); }
.crop-dock { --x: 14; --y: 350; --w: 1112; aspect-ratio: 1112 / 768; }
.crop-eq { --x: 464; --y: 208; --w: 1488; aspect-ratio: 1488 / 888; }
.crop-play { --x: 0; --y: 92; --w: 2000; aspect-ratio: 2000 / 1030; }

/* ---- specs and family ---- */
.specs { padding: calc(var(--bar-h) + clamp(40px, 6vw, 100px)) var(--edge) clamp(48px, 6vw, 90px); }
.specs dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(28px, 6vw, 110px); margin-top: clamp(24px, 4vw, 60px); }
.specs dl div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 16px; align-items: baseline; padding-block: 18px; border-top: 2px solid var(--ink); }
.specs dt { font: 400 1.625rem/1 var(--heavy); }
.status { margin-top: 28px; font-weight: 700; font-size: 1.25rem; }
.family { padding: calc(var(--bar-h) + clamp(32px, 5vw, 80px)) var(--edge) clamp(64px, 8vw, 130px); }
.overprint { display: flex; justify-content: center; padding-bottom: 0.17em; font: 400 clamp(11rem, 34vw, 40rem)/0.95 var(--heavy); letter-spacing: 0; isolation: isolate; }
.overprint i { font-style: normal; mix-blend-mode: multiply; margin-inline: -0.028em; }
.overprint i:nth-child(1) { color: var(--red); } .overprint i:nth-child(2) { color: var(--blue); }
.overprint i:nth-child(3) { color: var(--yellow); } .overprint i:nth-child(4) { color: var(--green); }
.lyra-card { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(20px, 4vw, 64px); margin-top: clamp(20px, 3vw, 48px); text-decoration: none; }
.lyra-card .overprint { justify-content: start; font-size: clamp(9rem, 25vw, 28rem); }
.lyra-text { max-width: 26em; font-size: 1.1875rem; }
.lyra-text strong { display: block; margin-bottom: 8px; font: 400 clamp(2rem, 3.4vw, 3.25rem)/0.95 var(--heavy); }
.lyra-text u { display: block; margin-top: 14px; font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.lyra-card:hover u { text-decoration-thickness: 5px; }
.others { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 6vw, 110px); margin-top: clamp(28px, 4vw, 64px); }
.others div { padding-top: 22px; border-top: 2px solid var(--ink); }
.others p { max-width: 28em; margin-top: 10px; }

footer { padding: calc(var(--bar-h) + 24px) var(--edge) max(48px, env(safe-area-inset-bottom)); background: var(--ink); color: var(--paper); }
footer .brand { font-size: clamp(4rem, 12vw, 12rem); line-height: 0.85; }
footer p + p { margin-top: 18px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 18px; }
footer nav a { padding-block: 10px; font-weight: 600; text-decoration: none; }
footer .legal { max-width: 60em; margin-top: 28px; font-size: 0.9375rem; color: #c9cbe6; }
footer :focus-visible { outline-color: var(--yellow); }

/* ---- Lyra page ---- */
.lyra-hero { padding: calc(var(--bar-h) + 10px) var(--edge) 0; }
.lyra-hero p { max-width: 26em; margin: 0 auto; font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 600; line-height: 1.35; text-align: center; text-wrap: balance; }
.lyra-shot { max-width: 1280px; margin: clamp(32px, 5vw, 72px) auto 0; padding-inline: clamp(0px, 2vw, 24px); }
.lyra-shot figcaption { padding: 12px clamp(18px, 2vw, 24px); font-size: 1rem; }
.lyra-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 90px); }
.lyra-notes > div { padding: clamp(28px, 4vw, 64px) var(--edge); }
.lyra-notes h2 { font-size: clamp(2.25rem, 3.6vw, 3.75rem); line-height: 0.92; }
.lyra-notes p { max-width: 27em; margin-top: 16px; }
.lyra-notes .note-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(16px, 4vw, 64px); align-items: end; }
.lyra-notes .note-wide h2 { font-size: clamp(3rem, 7.4vw, 8rem); line-height: 0.88; }
.lyra-notes .note-wide p { margin: 0; font-weight: 600; font-size: 1.1875rem; }

/* ---- About page ---- */
.about-hero { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); gap: clamp(20px, 5vw, 90px); align-items: end;
              padding: calc(var(--bar-h) + env(safe-area-inset-top) + clamp(32px, 6vw, 96px)) var(--edge) clamp(40px, 6vw, 96px); }
.about-hero h1 { font: 400 clamp(3.5rem, 8.4vw, 10rem)/1.12 var(--heavy); letter-spacing: -0.012em; text-wrap: balance; }
.about-hero p { max-width: 26em; font-size: clamp(1.1875rem, 1.6vw, 1.5rem); font-weight: 600; line-height: 1.4; }
.about-focus { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); gap: clamp(20px, 5vw, 90px); align-items: end;
               padding: clamp(48px, 7vw, 110px) var(--edge); }
.about-focus h2 { line-height: 1.12; }
.about-focus p { max-width: 26em; font-size: 1.1875rem; font-weight: 600; }
.about-more { padding: clamp(40px, 6vw, 90px) var(--edge); font-size: 1.1875rem; }
.about-more p { max-width: 34em; }

/* ---- smaller screens ---- */
@media (max-width: 1000px) { .prints { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lyra-notes { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px), (max-aspect-ratio: 1/1) {
  .tour-copy { right: var(--edge); width: auto; top: calc(var(--bar-h) + env(safe-area-inset-top) + 10px); }
  .tour-copy h2 { font-size: clamp(3rem, 15vw, 7rem); }
  .part { margin-top: 12px; min-height: 5.4em; }
  .key span { display: none; }
}
@media (max-width: 800px) {
  .sounds-head, .feature, .feature.flip, .specs dl, .lyra-card, .others, .lyra-notes .note-wide, .about-hero, .about-focus { grid-template-columns: minmax(0, 1fr); }
  .feature, .feature.flip { padding: calc(var(--bar-h) + 24px) 0 0; gap: 32px; }
  .feature-copy { padding-inline: var(--edge); }
  .feature.flip .crop { order: 0; }
  html[data-dock="shown"] .bar nav { display: none; }
  html[data-dock="hidden"] .dock { display: none; }
  .dock { margin-left: auto; }
  .layers { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .layers [data-layer] { flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; padding: 6px 2px; font-size: 1rem; }
  .layers .deck-stop { grid-column: 1 / -1; min-height: 46px; text-align: center; }
}
@media (max-width: 560px) { .prints { grid-template-columns: repeat(2, minmax(0, 1fr)); } .specs dl div { grid-template-columns: 1fr; gap: 6px; } }
/* four links do not fit beside the name; Sounds is still in the footer */
@media (max-width: 480px) { .bar nav a[href$="#sounds"] { display: none; } }
@media (max-width: 380px) { .bar { gap: 8px; } .brand { font-size: 1.5rem; } .bar nav { gap: 12px; } .bar nav a { font-size: 0.9375rem; } .dock button { width: 40px; } .dock .dock-stop { padding: 0 8px; } }
@media (max-width: 800px) and (max-height: 720px) {
  :root { --keys: 100px; }
  .tour-copy h2 { font-size: 13.5vw; }
  .part { margin-top: 8px; font-size: 1rem; line-height: 1.3; }
  .deck p { font-size: 1rem; line-height: 1.35; }
}
@media (max-height: 560px) { .deck p { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .poster { height: auto; }
  .poster-scene { position: relative; }
}
