:root {
  --black: #030506;
  --panel: #080b0d;
  --panel-2: #0c1013;
  --gold: #f0c352;
  --gold-deep: #9d6712;
  --cream: #efe8db;
  --muted: #756f67;
  --line: rgba(222, 167, 50, .32);
  --blue: #7ea7bd;
  --lime: #c8ff20;
}

* { box-sizing: border-box; }
html { background: var(--black); color: var(--cream); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(85, 105, 120, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 105, 120, .035) 1px, transparent 1px),
    radial-gradient(circle at 18% 25%, rgba(153, 96, 13, .09), transparent 36%),
    #030506;
  background-size: 74px 74px, 74px 74px, auto, auto;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}
button, input { font: inherit; }
button { color: inherit; }
.site-header {
  min-height: 138px;
  padding: 24px clamp(24px, 4vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 4, 4, .94);
}
.brand { display: inline-flex; align-items: center; gap: 22px; color: inherit; text-decoration: none; }
.brand-mark { width: 88px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line); background: #030303; }
.brand-mark img { width: 78%; height: 78%; object-fit: contain; }
.brand-copy { display: grid; gap: 10px; }
.brand-copy b { font-size: 27px; letter-spacing: .24em; }
.brand-copy small, .eyebrow, .privacy, .control footer, .utility-button small, .file-button small, .drop-zone span, figcaption span {
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: .18em;
}
.brand-copy small { color: #d29a24; font-size: 11px; }
.privacy { display: flex; align-items: center; gap: 14px; color: #8c8980; font-size: 11px; }
.privacy i { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 14px rgba(200, 255, 32, .65); }
.privacy em { font-style: normal; opacity: .45; }

main { max-width: 1920px; margin: 0 auto; }
.hero-shell { min-height: 790px; padding: clamp(54px, 7vw, 112px) clamp(24px, 5vw, 96px); display: grid; grid-template-columns: minmax(360px, .82fr) minmax(520px, 1.3fr); align-items: center; gap: clamp(46px, 6vw, 110px); }
.hero-copy { min-width: 0; }
.eyebrow { margin: 0 0 26px; color: #d8a438; font-size: 13px; letter-spacing: .19em; }
h1 { margin: 0; font-size: clamp(68px, 6.1vw, 126px); line-height: .82; letter-spacing: -.065em; font-weight: 900; }
.lede { max-width: 700px; margin: 48px 0 34px; color: #98948d; font-size: clamp(18px, 1.5vw, 27px); line-height: 1.55; font-weight: 600; }
.file-button { width: min(100%, 630px); min-height: 154px; padding: 28px 42px; border: 1px solid #ffd877; display: grid; justify-items: start; align-content: center; gap: 14px; background: linear-gradient(120deg, #f6d375, #c87813); color: #080808; cursor: pointer; box-shadow: 16px 16px 0 rgba(0, 0, 0, .5); transition: transform .2s ease, filter .2s ease; }
.file-button:hover { transform: translate(-3px, -3px); filter: brightness(1.08); }
.file-button span { font-size: clamp(34px, 3.2vw, 59px); line-height: 1; font-weight: 900; letter-spacing: .035em; }
.file-button small { font-size: 12px; }
.drop-zone { width: min(100%, 630px); min-height: 90px; margin-top: 28px; padding: 20px 28px; border: 1px dashed rgba(216, 164, 56, .5); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #908b82; transition: .2s ease; }
.drop-zone strong { max-width: 220px; font-size: 16px; line-height: 1.05; }
.drop-zone span { text-align: right; font-size: 9px; }
.drop-zone.dragging { border-color: var(--gold); background: rgba(240, 195, 82, .08); color: var(--cream); }
.hero-art { min-width: 0; margin: 0; border: 1px solid var(--line); background: #010203; box-shadow: 20px 20px 0 rgba(0, 0, 0, .5); }
.hero-art img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: #010203; }
.hero-art figcaption { min-height: 72px; padding: 0 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero-art figcaption b { letter-spacing: .16em; }
.hero-art figcaption span { color: #a77c26; font-size: 9px; text-align: right; }

.instrument { margin: 0 clamp(18px, 3.2vw, 62px) 90px; border: 1px solid var(--line); background: rgba(4, 6, 7, .92); box-shadow: 20px 20px 0 rgba(0, 0, 0, .45); }
.instrument-head { min-height: 174px; padding: 34px 42px; display: flex; align-items: center; justify-content: space-between; gap: 34px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg, rgba(131, 79, 12, .13), transparent 55%); }
.instrument-head .eyebrow { margin-bottom: 15px; }
.instrument h2 { margin: 0; font-size: clamp(28px, 3.1vw, 58px); line-height: 1; letter-spacing: -.035em; font-weight: 900; }
.readouts { display: flex; gap: 14px; }
.readouts > div { min-width: 118px; padding: 17px 18px; border: 1px solid var(--line); display: grid; gap: 8px; }
.readouts span { font: 10px "Courier New", monospace; color: var(--muted); letter-spacing: .16em; }
.readouts b { color: var(--gold); font: 700 20px "Courier New", monospace; }
.wave-stage { position: relative; height: clamp(290px, 30vw, 500px); overflow: hidden; cursor: crosshair; background: repeating-linear-gradient(0deg, transparent 0 27px, rgba(118, 161, 183, .05) 28px), linear-gradient(90deg, rgba(126, 167, 189, .035), transparent 55%); }
.wave-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 24.8%, var(--line) 25%, transparent 25.2%, transparent 49.8%, var(--line) 50%, transparent 50.2%, transparent 74.8%, var(--line) 75%, transparent 75.2%); }
#waveform { width: 100%; height: 100%; display: block; }
.scan-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; pointer-events: none; background: var(--gold); box-shadow: 0 0 22px rgba(240, 195, 82, .7); opacity: 0; }
.scan-line::after { content: ""; position: absolute; left: -6px; top: 0; width: 14px; height: 14px; background: var(--gold); clip-path: polygon(0 0,100% 0,50% 100%); }
.wave-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 14px; color: #8a847a; }
.wave-empty span { color: #bc8b2a; font: 700 31px "Courier New", monospace; }
.wave-empty small { font: 700 10px "Courier New", monospace; letter-spacing: .2em; }
.instrument.loaded .wave-empty { display: none; }
.instrument.loaded .scan-line { opacity: 1; }
.transport { min-height: 122px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 122px minmax(220px, 1fr) repeat(3, minmax(185px, .72fr)); }
.transport > * { border: 0; border-right: 1px solid var(--line); background: transparent; }
.transport > *:last-child { border-right: 0; }
.transport-button { display: grid; place-content: center; gap: 8px; cursor: pointer; }
.transport-button .play-icon { color: var(--gold); font-size: 28px; }
.transport-button .stop-icon { color: var(--gold); font-size: 24px; display: none; }
.transport-button.playing .play-icon { display: none; }
.transport-button.playing .stop-icon { display: inline; }
.transport-button small { color: #777168; font: 9px "Courier New", monospace; letter-spacing: .16em; }
.time-display { padding: 0 28px; display: flex; align-items: center; gap: 16px; font: 16px "Courier New", monospace; }
.time-display b { color: var(--cream); }.time-display span,.time-display i { color: #56524d; font-style: normal; }
.utility-button { padding: 20px 24px; display: grid; place-content: center; justify-items: start; gap: 8px; cursor: pointer; text-align: left; }
.utility-button b { font-size: 15px; letter-spacing: .14em; }
.utility-button small { color: #6f6a62; font-size: 8px; }
.utility-button.gold { background: linear-gradient(120deg, #ecc966, #b2650d); color: #050505; }
.utility-button.gold small { color: rgba(0,0,0,.58); }
button:disabled, input:disabled { opacity: .32; cursor: not-allowed; }
.utility-button:not(:disabled):hover { background-color: rgba(240, 195, 82, .08); }
.utility-button.gold:not(:disabled):hover { filter: brightness(1.08); }
.utility-button.active { background: #d9b14b; color: #050505; }

.control-intro, .keyboard-heading { min-height: 152px; padding: 38px 42px; display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.control-intro .eyebrow, .keyboard-heading .eyebrow { margin-bottom: 15px; }
.control-intro h2, .keyboard-heading h2 { font-size: clamp(30px, 3vw, 52px); }
.control-intro > p, .keyboard-heading > p { max-width: 520px; margin: 0; color: #79746c; font: 13px/1.7 "Courier New", monospace; }
.controls { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.control { min-height: 234px; padding: 34px 34px 27px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(135deg, rgba(126, 167, 189, .025), transparent); }
.control:nth-child(3n) { border-right: 0; }
.control header { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; }
.control header > b { font-size: 17px; letter-spacing: .14em; }
.control header > span { color: var(--gold); font: 700 15px "Courier New", monospace; }
.lock { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); background: #050708; color: #77736d; font: 700 9px "Courier New", monospace; letter-spacing: .08em; cursor: pointer; }
.lock.locked { color: #050505; background: var(--gold); }
.control input { width: 100%; margin: 58px 0 23px; appearance: none; height: 4px; background: linear-gradient(90deg, var(--gold) 0 var(--fill, 50%), #282a29 var(--fill, 50%) 100%); }
.control input::-webkit-slider-thumb { appearance: none; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #030506; outline: 2px solid var(--gold); background: var(--gold); box-shadow: 0 0 21px rgba(240, 195, 82, .3); cursor: grab; }
.control input::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #030506; outline: 2px solid var(--gold); background: var(--gold); cursor: grab; }
.control footer { display: flex; justify-content: space-between; color: #56534e; font-size: 8px; }
.keyboard-section { padding-bottom: 44px; }
.keyboard-heading { border-top: 1px solid var(--line); }
.pads { margin: 0 42px; border: 1px solid var(--line); display: grid; grid-template-columns: repeat(12, 1fr); background: #030405; }
.pad { position: relative; aspect-ratio: .72; min-width: 0; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; place-content: center; gap: 9px; background: linear-gradient(180deg, rgba(126,167,189,.05), transparent); cursor: pointer; touch-action: none; }
.pad:nth-child(12n) { border-right: 0; }.pad:nth-last-child(-n+12) { border-bottom: 0; }
.pad b { color: var(--cream); font-size: 16px; }.pad small { color: #625e58; font: 8px "Courier New", monospace; }
.pad::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 12px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .12s ease; }
.pad.active { background: linear-gradient(180deg, rgba(240,195,82,.26), rgba(126,167,189,.08)); }
.pad.active::after { transform: scaleX(1); }

.progress-modal { position: fixed; inset: 0; z-index: 20; padding: 22px; display: grid; place-items: center; background: rgba(0,0,0,.88); backdrop-filter: blur(9px); }
.progress-modal[hidden] { display: none; }
.progress-card { width: min(620px, 100%); padding: 46px; border: 1px solid var(--line); background: #07090a; box-shadow: 18px 18px 0 #000; }
.progress-card h2 { margin: 0 0 34px; font-size: clamp(30px, 5vw, 56px); }
.progress-track { height: 8px; background: #232523; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--gold), var(--blue)); transition: width .25s ease; }
.progress-card > b { display: block; margin-top: 15px; color: var(--gold); font: 700 16px "Courier New", monospace; text-align: right; }
.toast { position: fixed; z-index: 30; right: 26px; bottom: 26px; max-width: min(420px, calc(100vw - 52px)); padding: 17px 22px; border: 1px solid var(--line); background: #090c0d; font: 700 11px "Courier New", monospace; letter-spacing: .09em; transform: translateY(120px); opacity: 0; transition: .3s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1080px) {
  .hero-shell { grid-template-columns: 1fr; }
  .hero-copy { max-width: 760px; }
  .hero-art { width: 100%; }
  .transport { grid-template-columns: 100px 1fr 1fr 1fr; }
  .transport .time-display { grid-column: span 3; grid-row: 2; min-height: 70px; border-top: 1px solid var(--line); }
  .controls { grid-template-columns: repeat(2, 1fr); }
  .control:nth-child(3n) { border-right: 1px solid var(--line); }
  .control:nth-child(2n) { border-right: 0; }
  .pads { grid-template-columns: repeat(8, 1fr); }
  .pad:nth-child(12n) { border-right: 1px solid var(--line); }.pad:nth-child(8n) { border-right: 0; }
  .pad:nth-last-child(-n+12) { border-bottom: 1px solid var(--line); }.pad:nth-last-child(-n+8) { border-bottom: 0; }
}

@media (max-width: 680px) {
  .site-header { min-height: 94px; padding: max(12px, env(safe-area-inset-top)) 16px 12px; }
  .brand { gap: 12px; }.brand-mark { width: 58px; }.brand-copy b { font-size: 17px; }.brand-copy small { font-size: 7px; }
  .privacy em, .privacy span { display: none; }.privacy { gap: 0; }
  .hero-shell { min-height: auto; padding: 48px 16px 62px; gap: 48px; }
  .hero-copy .eyebrow { font-size: 9px; line-height: 1.5; }
  h1 { font-size: clamp(52px, 16vw, 78px); line-height: .87; }
  .lede { margin: 30px 0 24px; font-size: 17px; }
  .file-button { min-height: 112px; padding: 24px; box-shadow: 8px 8px 0 #000; }.file-button span { font-size: 32px; }
  .drop-zone { min-height: 72px; margin-top: 20px; padding: 15px; }.drop-zone strong { font-size: 12px; }.drop-zone span { max-width: 145px; }
  .hero-art { box-shadow: 8px 8px 0 #000; }.hero-art figcaption { min-height: 58px; padding: 0 16px; }.hero-art figcaption b { font-size: 12px; }.hero-art figcaption span { font-size: 7px; }
  .instrument { margin: 0 10px 38px; box-shadow: 7px 7px 0 #000; }
  .instrument-head { min-height: 150px; padding: 25px 20px; display: grid; }.instrument-head h2 { font-size: 28px; }
  .readouts { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }.readouts > div { min-width: 0; padding: 10px; }.readouts b { font-size: 13px; }.readouts span { font-size: 7px; }
  .wave-stage { height: 230px; }
  .transport { grid-template-columns: 72px 1fr 1fr; }
  .transport-button { grid-row: span 2; }.transport .time-display { grid-column: span 2; grid-row: auto; min-height: 62px; padding: 0 15px; font-size: 11px; }
  .utility-button { min-height: 74px; padding: 12px; border-top: 1px solid var(--line); }.utility-button b { font-size: 11px; }.utility-button small { font-size: 6px; }
  #exportButton { grid-column: span 2; }
  .control-intro, .keyboard-heading { min-height: 132px; padding: 28px 20px; display: grid; gap: 18px; }.control-intro > p, .keyboard-heading > p { font-size: 10px; }
  .controls { grid-template-columns: 1fr 1fr; }
  .control { min-height: 185px; padding: 23px 14px 18px; }.control header { grid-template-columns: 1fr auto; gap: 8px; }.control header > b { font-size: 12px; }.control header > span { font-size: 11px; }.control .lock { grid-column: span 2; width: 100%; min-height: 31px; }.control input { margin: 35px 0 20px; }.control input::-webkit-slider-thumb { width: 28px; height: 28px; }
  .pads { margin: 0 14px; grid-template-columns: repeat(6, 1fr); }.pad { aspect-ratio: .86; }.pad:nth-child(8n) { border-right: 1px solid var(--line); }.pad:nth-child(6n) { border-right: 0; }.pad:nth-last-child(-n+8) { border-bottom: 1px solid var(--line); }.pad:nth-last-child(-n+6) { border-bottom: 0; }
  .progress-card { padding: 30px 24px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
