/* Colours come from the plugin's own artwork (design/make_harp.py). --page is set at load, see app.js. */
:root {
    --page: hsl(235 60% 90%);
    --glass: rgb(255 255 255 / .42);
    --glass-navy: rgb(59 66 104 / .84);
    --ink: #2f3657;
    --ink-soft: #3b4263;
    --navy: #3b4268;
    --navy-logo: #525b85;
    --accent: #f2ab94;
    --pointer: #d9826b;
    --rule: rgb(47 54 87 / .22);
    --gutter: clamp(16px, 5vw, 72px);
    --display: "Jost", Futura, "Avenir Next", sans-serif;
    --text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h2, h3 { font-family: var(--display); margin: 0; }
h2 { font-weight: 700; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -.012em; text-wrap: balance; }
h3 { font-weight: 600; font-size: 22px; line-height: 1.2; margin: 0 0 10px; }
p { margin: 0 0 16px; max-width: 62ch; }
.fine { font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 4px; }

/* The page's liquid background (background.js). The gradient is the still fallback. */
.liquid-bg {
    position: fixed; inset: -12%; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse 60% 55% at 62% 38%, rgb(255 255 255 / .55), transparent 72%);
    /* The shader was made for a dark page. Lifting its near-black bands keeps text readable over any part of it:
       at worst, black becomes about sRGB .49, and at this opacity over the pastel page about .73. */
    filter: blur(70px) contrast(.35) brightness(1.5) saturate(1.8);
    opacity: .42;
}
.liquid-bg canvas { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-transparency: reduce) { .liquid-bg { display: none; } }

.skip { position: absolute; left: 16px; top: -60px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 30; }
.skip:focus { top: 12px; }

/* Buttons are drawn like the instrument's chord buttons. */
.key {
    display: inline-block; font: 600 16.5px/1 var(--text); text-decoration: none; color: var(--ink); text-align: center;
    padding: 15px 26px; border-radius: 8px; border: 1px solid rgb(90 70 40 / .32);
    box-shadow: inset 0 3px 0 rgb(255 255 255 / .55), 0 3px 0 rgb(90 70 40 / .3), 0 6px 10px rgb(90 70 40 / .16);
    transition: transform .07s, box-shadow .07s;
}
.key:active { transform: translateY(3px); box-shadow: inset 0 3px 0 rgb(255 255 255 / .4), 0 0 0 rgb(90 70 40 / .3); }
.key-yellow { background: linear-gradient(#fbefb6, #ead58e); }
.key-plain { background: linear-gradient(#fffbf5, #e6dbc9); }
.key-small { padding: 9px 15px; font-size: 14.5px; white-space: nowrap; }

/* Hero */
.hero { padding: 20px var(--gutter) 40px; text-align: center; }
.wordmark {
    display: inline-block; margin: 0; font: italic 900 clamp(68px, 10.5vw, 136px)/1 var(--display); letter-spacing: -.02em; color: var(--navy-logo);
    padding-bottom: 8px; background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% 5px no-repeat;
}
.tagline { margin: 12px auto 16px; max-width: none; font: 600 clamp(19px, 2vw, 25px)/1.2 var(--display); }

.stage-scroll { margin: 0 auto; width: min(100%, 1240px, calc((100svh - 300px) * 1.876)); min-width: min(100%, 700px); }
.stage { position: relative; }
.stage img { width: 100%; filter: drop-shadow(0 14px 22px rgb(70 60 90 / .2)); }
#deck { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; overflow: visible; }
#deck .hit { fill: transparent; cursor: pointer; touch-action: manipulation; }
#deck .hit:focus-visible, #deck .knob-hit:focus-visible { outline: none; stroke: var(--navy); stroke-width: 2; }
#deck .knob-hit { fill: transparent; cursor: ns-resize; touch-action: none; }
#deck .strings-hit { fill: transparent; cursor: grab; touch-action: none; }
#deck .pressed { fill: #fff8e6; stroke: var(--pointer); stroke-width: 2; pointer-events: none; opacity: 0; }
#deck .pressed.on { opacity: 1; }
#deck .cap { font: 600 10.5px var(--text); fill: var(--navy); opacity: .42; text-anchor: middle; pointer-events: none; text-transform: uppercase; }
#deck .playable { fill: none; stroke: var(--navy-logo); stroke-width: 2.5; pointer-events: none; }
#deck .locked { fill: #efe6d8; opacity: .68; pointer-events: none; }
#deck .ptr { stroke: var(--pointer); stroke-width: 3; stroke-linecap: round; pointer-events: none; }
#deck .led { pointer-events: none; opacity: 0; }
#deck .led.on { opacity: 1; }
#deck .lcd { font: 700 19px Menlo, Consolas, monospace; fill: #7a5638; text-anchor: middle; pointer-events: none; }
#deck .str { stroke: var(--pointer); stroke-width: 3; stroke-linecap: round; opacity: 0; pointer-events: none; }
@media (hover: none) { #deck .cap { display: none; } }

.hint { margin: 18px auto 0; max-width: 74ch; }
.hint p { margin: 0 auto 6px; }
.touch-only { display: none; }
@media (hover: none) { .touch-only { display: inline; } .keys-only { display: none; } }
@media (max-width: 760px) {
    .stage-scroll { width: auto; min-width: 0; margin-inline: calc(var(--gutter) * -1); overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 22px; }
    .stage { width: 820px; margin-inline: 12px; }
}

/* Intro */
.about { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px clamp(32px, 7vw, 110px); align-items: center; padding: 56px var(--gutter) 72px; max-width: 1320px; margin: auto; }
.about h2 { margin-bottom: 16px; }
.about p { margin-bottom: 0; }
.about-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; max-width: 420px; }
.about-side .key { padding-inline: 14px; white-space: nowrap; }
.about-side .fine { grid-column: 1 / -1; }

/* Section bar */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 9px var(--gutter); background: var(--glass-navy); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); color: #fff; }
.bar-name { font: italic 900 21px/1 var(--display); text-decoration: none; }
.bar-links { display: flex; gap: 22px; margin: auto; overflow-x: auto; scrollbar-width: none; }
.bar-links a { font-size: 15px; text-decoration: none; white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }
.bar-links a:hover, .bar-links a.current { border-bottom-color: var(--accent); }
.bar :focus-visible { outline-color: #fff; }
.bar .key-yellow:focus-visible { outline-color: #fff; }
@media (max-width: 760px) { .bar-name { display: none; } .bar { gap: 14px; } }

/* Feature rows */
main > section { max-width: 1320px; margin: auto; padding: clamp(56px, 8vw, 104px) var(--gutter); }
.feature { display: grid; grid-template-columns: minmax(280px, 5fr) 8fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.feature h2 { margin-bottom: 18px; }
.feature-text p:last-child { margin-bottom: 0; }
.shot { border-radius: 16px; box-shadow: 0 14px 28px rgb(70 60 90 / .18); }
.feature-harp { grid-template-columns: 5fr 5fr; }
.shot-free { max-height: 720px; width: auto; margin-inline: auto; filter: drop-shadow(0 14px 18px rgb(70 60 90 / .18)); }
#recording .shot { justify-self: center; }
.combo { border-collapse: collapse; margin: 0 0 18px; }
.combo th { text-align: left; font-weight: 400; padding: 6px 28px 6px 0; }
.combo td { font: 600 19px var(--display); padding: 6px 0; }
.combo tr + tr > * { border-top: 1px solid var(--rule); }
@media (max-width: 900px) {
    .feature, .feature-harp { grid-template-columns: minmax(0, 1fr); }
    .feature-harp .shot-free { order: 2; max-height: 520px; }
}

/* Reference sections */
.controllers, .specs { background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3); max-width: none !important; }
.controllers { border-radius: 28px 28px 0 0; }
.specs { padding-top: 0 !important; }
.controllers > *, .specs > * { max-width: 1176px; margin-inline: auto; }
.controllers > h2, .specs > h2 { margin-bottom: 32px; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); }
.columns h3:not(:first-child) { margin-top: 36px; }
@media (max-width: 860px) { .columns { grid-template-columns: minmax(0, 1fr); } }
.map { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 16px; line-height: 1.45; }
.map th { text-align: left; font-weight: 600; padding: 9px 18px 9px 0; vertical-align: top; width: 36%; }
.map td { padding: 9px 0; vertical-align: top; }
.map tr > * { border-top: 1px solid var(--rule); }
kbd { font: 600 15px Menlo, Consolas, monospace; word-spacing: .15em; }
pre { margin: 18px 0; overflow-x: auto; background: var(--navy); color: #f4f0e6; padding: 18px 20px; border-radius: 12px; font-size: 14px; line-height: 1.6; }
pre code, code { font-family: Menlo, Consolas, monospace; }
p code { font-size: .92em; overflow-wrap: anywhere; }
pre:focus-visible { outline-offset: 3px; }

/* Get */
.get { max-width: 1176px !important; box-sizing: content-box; }
.get h2 { margin-bottom: 12px; }
.get .columns { margin-top: 40px; }
.get ol { margin: 0 0 14px; padding-left: 22px; }
.get li { margin-bottom: 6px; }
.get code { overflow-wrap: anywhere; font-size: .9em; }
/* Fixed, because the panel fills the first screen and a message below it would go unseen. */
#sound-status { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 10px 16px; border-radius: 8px; background: var(--navy); color: #fff; }
#sound-status:empty { display: none; }

.foot { padding: 28px var(--gutter) 44px; border-top: 1px solid var(--rule); font-size: 14.5px; color: var(--ink-soft); }
.foot p { margin: auto; max-width: 74ch; text-align: center; }

@media (max-width: 620px) {
    body { font-size: 16.5px; }
    .about { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
    .about-side { max-width: none; grid-template-columns: minmax(0, 1fr); }
    .key:not(.key-small) { padding-inline: 12px; }
    .map th { width: 40%; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .key { transition: none; }
}
