/* jabberwocky.au, a broadside from top to bottom (since 23 Oct 2026; under it, it was night): ink and a red on the brand's
   mustard, the names in Alegreya SC as the pedals have them (Ultra till 25 Oct 2026), double rules. The pedals are black
   boards on it. A pedal's page can show its pedal in daylight (html.day), unlit; the page stays as it is. */
:root {
  --ground: #e2a72e; --ink: #17130e; --ink2: #4a3814; --red: #7a1e10; --rule: rgb(23 19 14 / .3);
  --accent-night: #EDE6D3; --accent-day: #EDE6D3; --accent: var(--accent-night);   /* the pedal's light, for the switches */
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ground); }
body { background: var(--ground); color: var(--ink); font: 400 17px/1.6 "Alegreya Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--ground); }
.sc { font-family: "Alegreya SC", Georgia, serif; font-weight: 900; letter-spacing: .02em; }   /* the pedals' names: .3 at 13 */
.it { font-family: "Alegreya", Georgia, serif; font-style: italic; font-weight: 500; }
.tag { font: 800 14px/1.2 "Big Shoulders Display", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 56px); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* a pedal: the board, and its lights on a layer of their own over it (src/run.js) */
.drawing { position: relative; }
.drawing > svg + svg { position: absolute; left: 0; top: 0; will-change: transform; pointer-events: none; }

/* the mark: the Jabberwock's woodcut head (../brand/jabberwocky), as a mask so it takes the text colour */
.mark { display: inline-block; width: 1.15em; aspect-ratio: 1; background: currentColor;
  -webkit-mask: url(/mark.svg) center / contain no-repeat; mask: url(/mark.svg) center / contain no-repeat; }

/* a double rule, after the frame on the pedals, with the head on it */
.rule { display: flex; align-items: center; gap: 14px; color: var(--ink); margin: 0 auto; max-width: 552px; padding: 0 16px; }
.rule::before, .rule::after { content: ""; flex: 1; height: 5px; border-top: 2px solid currentColor; border-bottom: 1px solid currentColor; }
.rule i { width: 46px; aspect-ratio: 1; background: currentColor;
  -webkit-mask: url(/mark.svg) center / contain no-repeat; mask: url(/mark.svg) center / contain no-repeat; }

/* home: the head and the name in ink, Humpty Dumpty on portmanteaus, the pedals, then where they're designed */
.hero { text-align: center; color: var(--ink); padding: clamp(36px, 6vw, 80px) 16px clamp(28px, 4vw, 52px); }
.hero .head { width: min(42vh, 64vw, 400px); height: auto; margin: 0 auto clamp(10px, 2vh, 24px); }
.hero h1 { font-size: clamp(2rem, 13.6vw, 12.6rem); line-height: 1; white-space: nowrap; }
.hero .portmanteau { margin-top: clamp(14px, 1.8vw, 24px); }
.portmanteau { text-align: center; max-width: 660px; margin: 0 auto; padding: 0 16px; }   /* wide enough for two lines */
.portmanteau p { font: italic 500 clamp(21px, 2.2vw, 27px)/1.35 "Alegreya", Georgia, serif; text-wrap: balance; }
.portmanteau p span { display: block; }   /* its two lines, each balanced on its own when a phone wraps it */
.portmanteau cite { display: block; margin-top: 8px; font: 800 14px/1.2 "Big Shoulders Display", sans-serif; letter-spacing: .14em; text-transform: uppercase; font-style: normal; color: var(--red); }

/* two across, then one on a phone, so the 28 under the flagship always fill their last row (since 25 Oct 2026; the user:
   "so there's no widows like there is now"; four across first, then "nah, try two a row?") */
.range { --gx: clamp(28px, 4vw, 64px); display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(40px, 5vw, 72px) var(--gx); padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 72px); }
/* every card's words centred under its pedal, as the flagship's are (since 25 Oct 2026; the user: "centre please") */
.card { text-decoration: none; display: block; text-align: center; }
.card .drawing { transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.card:hover .drawing { transform: translateY(-6px); }
.card .name { display: block; margin-top: 20px; font-size: clamp(29px, 2.4vw, 36px); line-height: 1.05; }
.card .kind { display: block; color: var(--red); font-size: 19px; margin-top: 6px; }
.card .price { display: block; margin-top: 12px; color: var(--ink2); font: 800 14px/1.2 "Big Shoulders Display", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
/* the flagship (the Jabberwock, since 25 Oct 2026): first, across the whole row, centred, its words as the others' are
   (the user: "centre it and match the text of the other pedals"); drawn to the same scale as the pedals under it, so its
   bigger box looks it: a column wide times its drawing's 200 mm over their 157 */
.card.flagship { grid-column: 1 / -1; padding-bottom: clamp(36px, 5vw, 64px); margin-bottom: clamp(4px, 1vw, 16px); border-bottom: 1px solid var(--rule); }
.card.flagship .drawing { width: calc((100% - var(--gx)) / 2 * 200 / 157); margin: 0 auto; }
@media (max-width: 560px) { .range { grid-template-columns: 1fr; } .card .drawing { max-width: 420px; margin: 0 auto; }
  .card.flagship .drawing { width: 100%; max-width: calc(420px * 200 / 157); } }
.coda { padding-bottom: clamp(56px, 7vw, 100px); }
.coda .rule { margin-bottom: 28px; }
.coda .tagline { text-align: center; padding: 0 16px; font-size: clamp(19px, 2.1vw, 28px); color: var(--ink2); }

/* a pedal's page */
.crumb { padding: 26px 0 0; }
.crumb a { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 31px; line-height: 1; }
.crumb .mark { width: 46px; }
/* one column (23 Oct 2026; the user: "get rid of the 2 column layout", "i want the pedal larger on the page"): the pedal
   as big as the window lets it be, the way the crumb leaves room, then its demo, then the words under it */
.pedal { padding-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(60px, 8vw, 120px); }
.stage .box { position: relative; width: min(100%, max(340px, calc((100svh - 120px) * 1.113))); margin: 0 auto; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.switch { position: absolute; width: 11.4%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; border-radius: 50%; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.switch:hover { box-shadow: 0 0 0 2px #ffffff30; }
.switch:active { box-shadow: 0 0 0 2px var(--accent); background: #ffffff10; }
html.day .switch { display: none; }
/* the flagship's wider box (200 x 140 round its 188 x 120, not 157 x 141): as tall as the others get, so wider, and its
   switches and knobs the same size on it */
.stage .box.dd { width: min(100%, max(340px, calc((100svh - 120px) * 1.4286))); }
.box.dd .switch { width: 8.95%; }
.box.dd .knob { width: 7%; }
.under { max-width: 760px; margin: clamp(18px, 2.4vw, 30px) auto 0; display: grid; gap: 18px; }
.words { max-width: 720px; margin: clamp(56px, 8vw, 110px) auto 0; }
.try { display: flex; gap: 18px 24px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; color: var(--ink2); font-size: 15.5px; line-height: 1.45; }
.try p { flex: 1 1 260px; }
.try b { color: var(--ink); font-weight: 600; }
html.day .try p { visibility: hidden; }
.lights { display: inline-flex; border: 1px solid var(--rule); border-radius: 99px; padding: 3px; flex: none; }
.lights button { font: inherit; font-size: 14.5px; color: var(--ink2); background: none; border: 0; border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.lights button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }

/* every pedal's demo: Listen, what it's doing, its settings, and knobs that turn (src/demo.js, src/orrery-page.js) */
.listen-row { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; min-height: 42px; }
.listen { font: 600 16px/1 "Alegreya Sans", sans-serif; color: var(--ground); background: var(--ink); border: 0; border-radius: 99px; padding: 12px 22px; cursor: pointer; }
.listen[aria-pressed="true"] { background: var(--red); color: #fff; }
/* the play and stop marks drawn, not typed: phones turn ▶ into an emoji */
.listen::before { content: ""; display: inline-block; width: .62em; height: .72em; margin-right: .5em; vertical-align: -.02em; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.listen[aria-pressed="true"]::before { width: .62em; height: .62em; vertical-align: .03em; clip-path: none; }
.readout { font: 800 15px/1.3 "Big Shoulders Display", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--red); font-variant-numeric: tabular-nums; }
.settings { display: flex; flex-wrap: wrap; gap: 8px; }
.settings button { font: inherit; font-size: 15px; color: var(--ink); background: none; border: 1px solid var(--rule); border-radius: 99px; padding: 5px 14px; cursor: pointer; }
.settings button:hover { border-color: var(--ink); }
.settings button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--ground); }
/* the tracks: what the guitarist plays (src/demo.js), squarer and in the red, the pedal's own marked with a dot */
.tracks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tracks .tag { margin-right: 6px; }
.tracks button { font: inherit; font-size: 14px; color: var(--ink2); background: none; border: 1px dashed var(--rule); border-radius: 6px; padding: 4px 11px; cursor: pointer; }
.tracks button:hover { border-color: var(--red); color: var(--ink); }
.tracks button[data-own]::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; vertical-align: .12em; border-radius: 50%; background: var(--red); }
.tracks button[aria-pressed="true"] { border: 1px solid var(--red); background: var(--red); color: #fff; }
.tracks button[aria-pressed="true"][data-own]::before { background: #fff; }
.knob { position: absolute; width: 8.9%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; cursor: ns-resize; touch-action: none; }
.knob:hover, .knob:focus-visible { box-shadow: 0 0 0 2px #ffffff30; outline: none; }
html.day .knob { display: none; }
.flip { position: absolute; width: 7%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.flip:hover, .flip:focus-visible { box-shadow: 0 0 0 2px #ffffff30; outline: none; }
html.day .flip { display: none; }

.words .tag { color: var(--red); }
.words h1 { font-size: clamp(32px, 13vw - 6px, 92px); line-height: 1; margin-top: 12px; }   /* Bandersnatch and Snicker-snack fit a phone */
.words .sub { font-size: clamp(21px, 2vw, 27px); color: var(--ink2); margin: 10px 0 22px; }
/* what the pedal's word means, and who said so */
.gloss { margin: 0 0 22px; padding-left: 18px; border-left: 3px double var(--red); max-width: 56ch; }
.gloss p { font-family: "Alegreya", Georgia, serif; font-style: italic; font-weight: 500; font-size: 19px; line-height: 1.45; color: var(--ink); }
.gloss cite { display: block; margin-top: 6px; font: 800 13.5px/1.2 "Big Shoulders Display", sans-serif; letter-spacing: .14em; text-transform: uppercase; font-style: normal; color: var(--red); }
/* what's packed into it */
.pack { margin: 0 0 22px; max-width: 56ch; font-size: 18px; line-height: 1.45; }
.pack .tag { display: block; color: var(--red); margin-bottom: 4px; }
.words > p { color: var(--ink); margin-bottom: 16px; max-width: 62ch; }
.words > p b { font-weight: 700; }
.controls { margin-top: 36px; display: grid; gap: 30px; }
.controls h2 { font: 800 15px/1.2 "Big Shoulders Display", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.controls dl div { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 16px; line-height: 1.45; }
.controls dt { font: 800 15.5px/1.45 "Big Shoulders Display", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.controls dd { color: var(--ink2); }
.price { margin-top: 36px; font-size: 25px; }

/* the home page's foot: only the company, one quiet centred line (build.py COMPANY); no other page has it */
footer.company { padding: 0 16px calc(32px + env(safe-area-inset-bottom)); text-align: center; color: var(--ink2); font-size: 14px; line-height: 1.5; }
footer.company a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgb(74 56 20 / .4); }
footer.company a:hover { text-decoration-color: currentColor; }

/* not found */
.lost { min-height: 72vh; display: grid; place-items: center; text-align: center; padding: 60px 16px; }
.lost .mark { display: block; width: min(300px, 64vw); margin: 0 auto 28px; color: var(--ink); }
.lost h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1; }
.lost p { color: var(--ink2); margin-top: 12px; font-size: 19px; }

/* moving between pages (build.py ARRIVE): the page left shrinks back and fades, the pedal you clicked flies to where it
   is on the next page, the name shrinks into the crumb or grows out of it, and the new page's words rise in under it */
.hero h1 .title, .crumb .title { view-transition-name: name; display: inline-block; }
.hero .head, .crumb .mark { view-transition-name: head; }
::view-transition-group(*) { animation-duration: .75s; animation-timing-function: cubic-bezier(.3, .7, .1, 1); }
::view-transition-old(root) { animation: vt-away .4s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in .5s ease .1s both; }
::view-transition-old(*):only-child { animation: vt-away .35s ease both; }
::view-transition-new(*):only-child { animation: vt-up .75s cubic-bezier(.2, .8, .2, 1) .15s both; }
@keyframes vt-away { to { opacity: 0; transform: scale(.96); } }
@keyframes vt-in { from { opacity: 0; } }
@keyframes vt-up { from { opacity: 0; transform: translateY(30px) scale(.97); } }
html.arrive [data-rise] { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--g, 0) * 50ms + 180ms); }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
