/* v4 · the orange opener: the synth illustration under the big wordmark, copy on the right. */
/* the opener paints its own orange and keeps its own colours, so the page ground can turn blue underneath while scrolling without showing through */
.intro { position: relative; isolation: isolate; background: #FF5B35; --bg: #FF5B35; --fg: #191919; --wm: #EDEAF4; --wm-acc: #191919; --fg-72: rgba(25,25,25,.78); --fg-50: rgba(25,25,25,.55); --fg-30: rgba(25,25,25,.3); color: #191919; }
.intro .wm-big :is(rect, circle, .acc) { fill: #191919; }
.intro .btn { background: #191919; color: #FF5B35; }
.hero-pic { position: absolute; left: -27vw; bottom: -22vh; height: 104vh; width: auto; max-width: none; z-index: 0; pointer-events: none; user-select: none; }
@media (max-width: 1400px) and (min-width: 621px) { .hero-pic { left: -34vw; bottom: -26vh; } }
.intro .meta { display: none; }
.wm-big, .intro-body { position: relative; z-index: 1; }
@media (min-width: 621px) {
  .intro-body { grid-template-columns: minmax(0, 1fr); justify-items: end; align-content: start; align-items: start; padding-top: 28px; gap: 20px; }
  .h1 { text-align: right; font-size: clamp(40px, 4.4vw, 76px); max-width: 9.2em; }
  .intro-side { max-width: 34ch; padding-bottom: 0; }
  .intro-side p { font-size: clamp(15px, 1.15vw, 19px); color: var(--fg); }
}
@media (max-width: 620px) {
  .intro { --spine: 72svh; min-height: 100svh; }
  .hero-pic { left: -80vw; bottom: -8vh; width: 240vw; height: auto; min-width: 0; }
  .intro-body { align-content: start; padding-top: 0; row-gap: 12px; }
  .h1 { font-size: clamp(32px, 9.6vw, 40px); line-height: 1; }
  .intro-side p { font-size: 14px; color: var(--fg); }
}

/* ── v4 · the modules: fifteen plates drawn the way the app draws them, a little taller for the app's own caption line ── */
.gcard .viz { height: 80px; }
.gcard { flex-basis: 252px; }
.card .viz { height: 56px; }
/* the cursor over paper: ink instead of the ground's foreground */
.cursor.on-paper i { background: #191919; }
.cursor.on-paper.notes i { background: var(--blue); }
.cursor.on-paper.audio i { background: var(--orange); }
.cursor.on-paper.control i { background: var(--violet); }
.cursor.on-paper.fx i { background: var(--pink); }
.cursor.on-paper.link i, .cursor.on-paper.grab i { background: transparent; border-color: #191919; }
.cursor.on-paper.grab i { background: rgba(25,25,25,.06); }

/* ── the opener's illustration is a loop now: the edges fade into the ground so the video's orange never shows a seam ── */
video.hero-pic { object-fit: cover; -webkit-mask-image: linear-gradient(to top, #000 86%, transparent 99%), linear-gradient(to right, #000 93.5%, transparent 99.5%); -webkit-mask-composite: source-in; mask-image: linear-gradient(to top, #000 86%, transparent 99%), linear-gradient(to right, #000 93.5%, transparent 99.5%); mask-composite: intersect; }
@media (prefers-reduced-motion: reduce) { video.hero-pic { display: none; } }

/* ── steady grounds: each block paints its own colour, nothing fades on scroll ── */
section[data-tone], footer[data-tone] { background: var(--bg); color: var(--fg); }
html, body { background: #191919; }
.topbar[data-tone] { background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--fg); }

/* ── one screen per block, and the blocks slide over each other like cards ──
   Every block is exactly the height of the window and sticks to the top; the
   next one comes up over it, with a shadow on its leading edge, and the one
   underneath sinks back a little. On a wide screen the content is fitted to
   the window (scaled down when it would not fit). On a phone a block can be
   taller than the window: it scrolls through, then sticks by its bottom edge
   while the next one slides over. */
.intro, .sec, .tail { scroll-snap-align: none; }
section[data-tone] { position: sticky; top: 0; z-index: 1; transform-origin: 50% 0; box-shadow: 0 -18px 40px rgba(0, 0, 0, .22); }
#intro { box-shadow: none; }
.tail { position: relative; z-index: 2; background: var(--bg); box-shadow: 0 -18px 40px rgba(0, 0, 0, .22); }
.sec { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 84px var(--gut) 44px; }
.sec > .fit { width: 100%; }
@media (min-width: 900px) {
  .sec { height: 100svh; padding: 0; overflow: hidden; display: block; }
  .sec > .fit { position: absolute; left: 0; top: 0; width: 100%; padding: 84px var(--gut) 40px; transform-origin: 0 0; }
}

/* ── snapping: one card per gesture. Invisible markers mirror the blocks (a
   sticky block can't be a snap target itself); a marker taller than the
   window, a long block on a phone, scrolls freely inside. ── */
html { scroll-snap-type: y mandatory; }
.snaps { position: absolute; left: 0; top: 0; width: 1px; height: 0; pointer-events: none; }
.snaps i { position: absolute; left: 0; width: 1px; opacity: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.snaps i.end { scroll-snap-align: end; scroll-snap-stop: normal; }
/* on a phone: stops at the top of every card and at the bottom of the tall ones; in between you scroll freely */
html.snap-phone { scroll-snap-type: y mandatory; }

/* ── the section index: always at the top, one chip per block in its own colour ── */
body .topbar { transform: none; }
.topbar .home { transition: opacity .3s; }
body:not(.past) .topbar .home { opacity: 0; pointer-events: none; }
.idx { position: relative; display: flex; align-items: center; gap: 0; font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.idx-list { display: flex; gap: 2px; }
.idx a, .idx-now { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; color: var(--fg-72); text-decoration: none; border-radius: 2px; transition: background .2s, color .2s; }
.idx a::after { display: none; }
.idx i { width: 8px; height: 8px; background: var(--sw, var(--fg)); box-shadow: 0 0 0 1px var(--fg-30); flex: none; }
.idx b { font-weight: 500; font-variant-numeric: tabular-nums; opacity: .55; }
.idx a:hover { color: var(--fg); background: var(--fg-08); }
.idx a.on { color: var(--fg); background: var(--fg-14); }
.idx a.on b { opacity: 1; }
.idx-now { all: unset; display: none; }
@media (max-width: 1100px) { .idx a b { display: none; } }
@media (max-width: 899px) {
  .topbar .menu.idx { display: flex; }
  .idx-now { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; cursor: pointer; color: var(--fg); border: 1px solid var(--fg-30); border-radius: 2px; font: inherit; letter-spacing: inherit; text-transform: inherit; }
  .idx-now i { width: 8px; height: 8px; background: var(--sw, var(--fg)); box-shadow: 0 0 0 1px var(--fg-30); }
  .idx-now svg { width: 9px; height: 6px; transition: transform .2s; }
  .idx.open .idx-now svg { transform: rotate(180deg); }
  .idx-list { position: absolute; top: calc(100% + 8px); left: 0; display: none; flex-direction: column; gap: 0; min-width: 190px; padding: 6px; background: var(--bg); border: 1px solid var(--fg-30); box-shadow: 0 12px 32px rgba(0,0,0,.25); }
  .idx.open .idx-list { display: flex; }
  .idx-list a { padding: 10px; font-size: 11px; }
  .idx a b { display: inline; }
  body:not(.past) .topbar .home { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) { .topbar .go-cta { display: none; } .topbar { gap: 12px; } }
@media (max-width: 899px) { .idx-list { left: auto; right: 0; } }

/* ── the end of the page: the beta card carries the wordmark and the socials, no footer ── */
.beta-end { padding: 28px 0 0; }
.beta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 22px; font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-50); }
/* the socials sit on the line of the request button, on the right, as tall as it */
#output .form-wrap { max-width: none; }
.bf-b .go { max-width: none; grid-template-columns: minmax(0, 560px) 1fr auto; column-gap: 24px; }
.bf-b .go button { grid-column: 1; grid-row: 1; }
.bf-b .go small { grid-column: 1; grid-row: 2; }
.bf-b .go .beta-soc { grid-column: 3; grid-row: 1; }
.beta-soc { display: flex; gap: 10px; }
.beta-soc a { display: inline-flex; align-items: center; gap: 10px; height: clamp(56px, 4.6vw, 68px); padding: 0 20px; box-sizing: border-box; border: 1px solid var(--fg-30); color: var(--fg); text-decoration: none; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; transition: background .2s, color .2s, border-color .2s; }
.beta-soc a svg { width: 20px; height: 20px; flex: none; }
.beta-soc a:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.done .again { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
@media (max-width: 899px) {
  .bf-b .go { grid-template-columns: minmax(0, 1fr); }
  .bf-b .go .beta-soc { grid-column: 1; grid-row: 3; }
  .beta-soc a { height: 52px; flex: 1; justify-content: center; }
  .beta-soc { width: 100%; }
}
.beta-wm svg { display: block; width: 100%; height: auto; }
.beta-wm polygon, .beta-wm path { fill: var(--wm); }
@media (min-width: 900px) {
  .beta-end { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--gut) 36px; z-index: 2; }
}
/* the beta card's line of copy: a size up, and on the right */
#output .sec-head > .lead { font-size: clamp(17px, 1.45vw, 22px); color: var(--fg); max-width: 34ch; justify-self: end; text-align: right; }

/* the top bar's beta button: the menu's height and type */
.idx a, .topbar .go-cta { height: 26px; box-sizing: border-box; padding: 0 9px; display: inline-flex; align-items: center; line-height: 1; }
.topbar .go-cta { font-size: 10px; font-weight: 500; letter-spacing: .12em; border-radius: 2px; }
@media (max-width: 899px) { .idx-now { height: 30px; box-sizing: border-box; padding: 0 10px; } }
@media (max-width: 560px) { .topbar .go-cta { display: none; } }
@media (max-width: 899px) { #output .sec-head > .lead { justify-self: start; text-align: left; } }

/* ── the patch on a phone: the same cards, running top to bottom ── */
.cplay { display: none; }
.stage.phone { min-width: 0; }
.stage.phone .card { width: auto; }
.stage.phone .portrow { display: none; }
.stage.phone .card .viz { height: 56px; }
.stage.phone .port.in { left: 14px !important; right: auto !important; top: -7px !important; }
.stage.phone .port.out { left: auto !important; right: 14px !important; top: auto !important; bottom: -7px; }
.stage.phone .card[data-id="transport"] .port.out { right: calc(50% - 7px) !important; }
.stage.phone .port::before { content: attr(data-label); position: absolute; font-size: 7.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: rgba(25,25,25,.45); white-space: nowrap; pointer-events: none; line-height: 1; }
.stage.phone .port.in::before { left: 16px; top: -7px; }
.stage.phone .port.out::before { right: 16px; top: 9px; }
.stage.phone .card[data-id="transport"] .port.out::before { right: auto; left: 16px; top: 9px; }
.stage.phone .port::after { inset: -14px; }
.stage.phone .seg button { height: 30px; padding: 0; font-size: 9.5px; }
.stage.phone .body { padding: 8px; gap: 8px; }
/* the Transport across the top: its drawing on the left, tempo and Play on the right */
.stage.phone .card[data-id="transport"] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.stage.phone .card[data-id="transport"] > .band, .stage.phone .card[data-id="transport"] > h3 { grid-column: 1 / -1; }
.stage.phone .card[data-id="transport"] > .viz { grid-column: 2; grid-row: 3; height: 56px; margin: 8px 8px 8px 0; width: calc(100% - 8px); align-self: center; }
.stage.phone .card[data-id="transport"] > .body { grid-column: 1; grid-row: 3; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.stage.phone .card[data-id="transport"] .cplay { order: -1; }
.stage.phone .cplay { display: flex; align-items: center; justify-content: center; gap: 9px; height: 40px; border: 0; border-radius: 2px; background: #191919; color: #F5F1F4; font: inherit; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.stage.phone .cplay svg { width: 11px; height: 11px; fill: currentColor; }
.stage.phone .cplay { font-size: 12px; animation: cplay 1.8s ease-in-out infinite; }
.stage.phone .cplay.on { animation: none; }
@keyframes cplay { 0%, 100% { box-shadow: 0 0 0 0 rgba(43,75,242,0); } 50% { box-shadow: 0 0 0 5px rgba(43,75,242,.35); } }
@media (prefers-reduced-motion: reduce) { .stage.phone .cplay { animation: none; } }
.stage.phone .cplay.on { background: #2B4BF2; }
@media (max-width: 879px) { .deck #play { display: none; } }
.only-narrow { display: none; }
@media (max-width: 879px) { .only-wide { display: none; } .only-narrow { display: inline; } }
.stage.phone .port.yes, .stage.phone .port.armed, .stage.phone .port.hit { transform: none; }
.stage.phone .port.yes.notes, .stage.phone .port.armed.notes { box-shadow: 0 0 0 6px rgba(43,75,242,.3); }
.stage.phone .port.yes.audio, .stage.phone .port.armed.audio { box-shadow: 0 0 0 6px rgba(255,91,53,.3); }
.stage.phone .port.yes.clock, .stage.phone .port.armed.clock { box-shadow: 0 0 0 6px rgba(25,25,25,.18); }
.stage.phone .port.hit { box-shadow: 0 0 0 4px rgba(200,255,0,.6); }
