*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #060606;
  color: #ccc;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

/* ── Video Background ─────────────────────────────── */

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.45;
  filter: saturate(0.3) brightness(0.6);
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 30%, transparent 0%, rgba(6, 6, 6, 0.6) 70%),
    linear-gradient(180deg, rgba(6, 6, 6, 0.3) 0%, rgba(6, 6, 6, 0.8) 100%);
}

/* ── Layout ────────────────────────────────────────── */

main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  padding: 0 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a {
  color: #c8b89a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Hero ──────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 80px 0 48px;
}

.hero-title {
  font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: 4rem;
  color: #f0ece4;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1rem;
  color: #8a8078;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 16px;
}

/* ── Pedal Section ─────────────────────────────────── */

.pedal-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 80px;
}

/* ── Audio Controls ────────────────────────────────── */

.audio-controls {
  width: 280px;
  text-align: center;
}

.demo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 260px;
  margin: 0 auto;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #e8e4dc;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 16px;
}

.demo-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.24);
}

.demo-btn.playing {
  border-color: rgba(200, 184, 154, 0.45);
  background: rgba(200, 184, 154, 0.1);
}

.demo-icon {
  font-size: 0.8em;
  transition: transform 0.15s;
}

.demo-btn.playing .demo-icon {
  transform: scale(1.1);
}

.try-hint {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.io-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-text {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.35);
  margin-left: 4px;
}

.io-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.io-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.io-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.io-btn-small {
  padding: 5px 14px;
  font-size: 0.78rem;
}

.io-btn-icon {
  padding: 7px 12px;
  font-size: 1.1rem;
  line-height: 1;
}

.device-details {
  margin-top: 12px;
}

.device-details summary {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  letter-spacing: 0.03em;
  list-style: none;
  transition: color 0.15s;
}

.device-details summary::-webkit-details-marker {
  display: none;
}

.device-details summary::before {
  content: '\25B8\00a0';
}

.device-details[open] summary::before {
  content: '\25BE\00a0';
}

.device-details summary:hover {
  color: rgba(255, 255, 255, 0.55);
}

.device-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.device-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.device-field:first-child {
  grid-column: 1 / -1;
}

.device-field span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.device-field select {
  width: 100%;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #bbb;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  font-size: 0.8rem;
  font-family: inherit;
}

/* ── Pedal Enclosure ───────────────────────────────── */

.pedal {
  position: relative;
  width: 260px;
  aspect-ratio: 67 / 122;
  justify-content: space-evenly;
  background:
    repeating-linear-gradient(90deg,
      transparent 0px,
      transparent 2px,
      rgba(255, 255, 255, 0.018) 2px,
      rgba(255, 255, 255, 0.018) 3px),
    linear-gradient(178deg,
      #ccc8c0 0%,
      #c2bdb5 12%,
      #b8b3ab 35%,
      #b0aba3 60%,
      #a8a39b 80%,
      #a09b93 100%);
  border-radius: 10px;
  padding: 18px 18px 22px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    inset 1px 0 0 rgba(255, 255, 255, 0.1),
    inset -1px 0 0 rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pedal-row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ── Knob Labels ───────────────────────────────────── */

.knob-labels {
  justify-content: space-around;
  margin-bottom: 6px;
}

.knob-labels span {
  font-size: 0.58rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  width: 62px;
  text-align: center;
}

/* ── Knobs ─────────────────────────────────────────── */

.knob-row {
  justify-content: space-around;
  margin-bottom: 0;
}

.knob-assembly {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 62px;
}

.knob-body {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, #3d3d3d, #1c1c1c 50%, #0e0e0e 100%);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.55),
    0 1px 3px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.07);
  position: relative;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.knob-body:active {
  cursor: grabbing;
}

.knob-indicator {
  position: absolute;
  width: 3px;
  height: 14px;
  background: #fff;
  border-radius: 1.5px;
  top: 5px;
  left: 50%;
  margin-left: -1.5px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.25);
}

.knob-value {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  font-size: 0.58rem;
  color: rgba(30, 30, 30, 0.5);
  text-align: center;
  display: none;
}

/* ── Brand ─────────────────────────────────────────── */

.brand-block {
  text-align: center;
  margin: 0;
}

.brand-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: 0.1em;
  line-height: 1.15;
}

.brand-cn {
  font-size: 1.6rem;
  color: #1a1a1a;
  letter-spacing: 0.16em;
  margin-top: 0;
  line-height: 1.25;
}

/* ── LEDs ──────────────────────────────────────────── */

.stomp-led-row {
  gap: 120px;
  margin-bottom: 6px;
}

.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #502828;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: background 0.15s, box-shadow 0.15s;
}

.led.on {
  background: #ff2222;
  border-color: #dd1a1a;
  box-shadow:
    0 0 6px 2px rgba(255, 34, 34, 0.55),
    0 0 14px 5px rgba(255, 34, 34, 0.2),
    inset 0 0 2px rgba(255, 255, 255, 0.3);
}

/* ── Toggle Labels ─────────────────────────────────── */

.toggle-labels {
  justify-content: space-around;
  max-width: 190px;
  margin-bottom: 3px;
}

.toggle-labels span {
  font-size: 0.52rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: 56px;
  text-align: center;
}

/* ── Toggle Switches ───────────────────────────────── */

.toggle-row {
  justify-content: space-around;
  max-width: 190px;
  margin-bottom: 0;
}

.toggle-switch {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 56px;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-track {
  width: 16px;
  height: 28px;
  background: #252525;
  border-radius: 4px;
  border: 1px solid #4a4a4a;
  position: relative;
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.12);
}

.toggle-bat {
  position: absolute;
  width: 10px;
  height: 12px;
  background: linear-gradient(90deg,
      #999 0%,
      #c8c8c8 20%,
      #e6e6e6 42%,
      #eee 58%,
      #c8c8c8 80%,
      #999 100%);
  border-radius: 5px;
  left: 50%;
  margin-left: -5px;
  top: 13px;
  transition: top 0.1s ease;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.toggle-switch input:checked+.toggle-track .toggle-bat {
  top: 2px;
}

/* ── Model Info ────────────────────────────────────── */

.model-block {
  margin: 0;
}

.model-name {
  font-size: 1.7rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.model-edition {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.1em;
  line-height: 1.25;
}

/* ── Footswitches ──────────────────────────────────── */

.stomp-row {
  gap: 80px;
  margin-bottom: 0;
}

.footswitch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #8a8680;
  background:
    radial-gradient(circle at 40% 35%,
      #dcd8d0 0%,
      #c4c0b8 35%,
      #aaa69e 65%,
      #9a9690 100%);
  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.4),
    0 2px 5px rgba(0, 0, 0, 0.25),
    inset 0 2px 4px rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: box-shadow 0.08s, transform 0.06s;
  padding: 0;
  font-family: inherit;
}

.footswitch:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.15),
    inset 0 -1px 2px rgba(0, 0, 0, 0.08);
}

.footswitch.active {
  border-color: #706c66;
}

/* ── Story ─────────────────────────────────────────── */

.story {
  max-width: 500px;
  text-align: center;
  margin-bottom: 72px;
}

.story p {
  font-size: 1.15rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Buy ─────────────────────────────────────────── */

.buy {
  text-align: center;
  margin-bottom: 72px;
}

.buy-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 14px 20px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  font-weight: 800;
  transition: background 0.2s, border-color 0.2s;
}

.buy-btn-price {
  color: rgba(255, 255, 255, 0.35);
  text-decoration: line-through;
  margin-right: 30px;
}

.buy-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.24);
  text-decoration: none;
}

.buy-btn:active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.32);
  text-decoration: none;
}

/* ── Features ──────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  width: 100%;
  margin-bottom: 80px;
}

.feature {
  text-align: center;
}

.feature h3 {
  font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: 1.8rem;
  color: #e8e4dc;
  margin-bottom: 10px;
}

.feature p {
  font-size: 1.0rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 560px) {
  .hero-title {
    font-size: 2.8rem;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 36px;
    max-width: 360px;
  }
}

/* ── Footer ────────────────────────────────────────── */

.page-footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
}

.page-footer p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.9;
}

.page-footer strong {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

/* ── Debug ─────────────────────────────────────────── */

.debug-section {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.io-panel {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 16px;
}

.diag-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.82rem;
}

.diag-label {
  color: rgba(255, 255, 255, 0.35);
}

.badge {
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 10px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
}

.badge.active {
  border-color: #2ec27e;
  color: #2ec27e;
}

.meter {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 99px;
  overflow: hidden;
  margin: 3px 0;
}

.meter-fill {
  width: 0%;
  height: 100%;
  background: #4e88f3;
  transition: width 70ms linear;
}

.meter-fill.delta {
  background: #c58a2e;
}