:root {
  --bg: #07111f;
  --surface: rgba(10, 24, 45, 0.68);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8f4ec;
  --muted: #c8cad4;
  --gold: #ffbc5e;
  --gold-deep: #ff8b2d;
  --mint: #7af3d2;
  --rose: #ff8ba0;
  --sky: #7dc6ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 160, 66, 0.18), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(122, 243, 210, 0.16), transparent 24%),
    radial-gradient(circle at 50% 80%, rgba(125, 198, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #08101b 0%, #09162a 36%, #06111f 100%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.page-noise,
.cursor-glow,
.orb {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
}

.page-noise {
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
}

.cursor-glow {
  width: 240px;
  height: 240px;
  inset: auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 188, 94, 0.2) 0%, rgba(255, 188, 94, 0) 68%);
  filter: blur(10px);
  transform: translate(-50%, -50%);
  z-index: 1;
}

.orb {
  filter: blur(110px);
  opacity: 0.3;
}

.orb-a {
  background: rgba(255, 135, 64, 0.18);
  width: 38vw;
  height: 38vw;
  top: -6vw;
  left: -8vw;
}

.orb-b {
  background: rgba(125, 198, 255, 0.18);
  width: 35vw;
  height: 35vw;
  right: -8vw;
  top: 18vh;
}

.hero,
.section {
  position: relative;
  z-index: 2;
}

.hero {
  min-height: 100vh;
  padding: 1.2rem clamp(1.2rem, 3vw, 2.5rem) 3rem;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.topbar-link {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  border-radius: 999px;
  padding: 0.85rem 1rem;
  color: var(--text);
  text-decoration: none;
}

.hero-copy {
  align-self: center;
  max-width: 720px;
  padding-top: 3rem;
}

.eyebrow,
.label,
.question-step,
.panel-tip {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  color: var(--gold);
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  line-height: 0.95;
}

h1 {
  font-size: clamp(3.8rem, 11vw, 8rem);
  max-width: 10ch;
}

h1 span {
  display: block;
  color: var(--gold);
  font-style: italic;
}

.hero-text,
.glass-card p,
.memory-copy p,
#finalWish {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.02rem;
}

.hero-actions,
.hero-badges,
.options,
.panel-head,
.memory-layout,
.instrument-grid,
.intro-grid,
.questions-layout {
  display: flex;
  gap: 1rem;
}

.hero-actions,
.hero-badges {
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.primary-btn,
.ghost-btn,
.option-btn,
.upload-all span {
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.35rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-btn {
  color: #09111d;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold) 0%, #ffe29a 100%);
  box-shadow: 0 16px 35px rgba(255, 188, 94, 0.28);
}

.ghost-btn,
.option-btn,
.upload-all span {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.primary-btn:hover,
.ghost-btn:hover,
.option-btn:hover,
.upload-all span:hover {
  transform: translateY(-2px);
}

.hero-badges span {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #f0efe8;
  background: rgba(255, 255, 255, 0.04);
}

.hero-stage {
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  bottom: 5vh;
  width: min(36vw, 420px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.vinyl-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.12) 0 8%, transparent 8% 13%, rgba(255, 255, 255, 0.06) 13% 14%, transparent 14% 100%),
    radial-gradient(circle at 30% 30%, rgba(255, 188, 94, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  animation: spin 18s linear infinite;
}

.vinyl-core,
.vinyl-ring {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.vinyl-core {
  width: 18%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
}

.vinyl-ring-a {
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.vinyl-ring-b {
  width: 78%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.equalizer {
  position: absolute;
  bottom: -1.4rem;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.45rem;
}

.equalizer span {
  width: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--mint), var(--sky));
  animation: pulse 1s ease-in-out infinite;
}

.equalizer span:nth-child(odd) {
  animation-duration: 1.4s;
}

.equalizer span:nth-child(1) { height: 30px; }
.equalizer span:nth-child(2) { height: 58px; }
.equalizer span:nth-child(3) { height: 38px; }
.equalizer span:nth-child(4) { height: 72px; }
.equalizer span:nth-child(5) { height: 50px; }
.equalizer span:nth-child(6) { height: 66px; }
.equalizer span:nth-child(7) { height: 34px; }
.equalizer span:nth-child(8) { height: 44px; }

.section {
  padding: clamp(4rem, 7vw, 7rem) clamp(1.2rem, 3vw, 2.5rem);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.intro-grid {
  flex-wrap: wrap;
}

.glass-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  border-radius: 30px;
  padding: 1.4rem;
}

.intro-grid .glass-card {
  flex: 1 1 220px;
  min-height: 160px;
}

.questions-layout,
.memory-layout {
  align-items: flex-start;
}

.question-stack {
  display: grid;
  gap: 1rem;
  flex: 1.3;
}

.question-card {
  padding: 1.35rem;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.question-card h3 {
  font-size: 1.55rem;
  margin: 0.25rem 0 1rem;
}

.options {
  flex-wrap: wrap;
}

.option-btn.active {
  background: linear-gradient(135deg, rgba(255, 188, 94, 0.25), rgba(125, 198, 255, 0.22));
  border-color: rgba(255, 188, 94, 0.58);
}

.setlist-panel {
  position: sticky;
  top: 1.2rem;
  width: min(100%, 360px);
}

.setlist-panel h3 {
  font-size: 2rem;
  margin: 0.2rem 0 0.8rem;
}

.setlist-lines {
  display: grid;
  gap: 0.75rem;
  color: var(--muted);
  min-height: 180px;
}

.setlist-line {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.compact {
  margin-top: 0.6rem;
}

.instrument-grid {
  align-items: stretch;
  flex-wrap: wrap;
}

.instrument-grid > * {
  flex: 1 1 320px;
}

.panel-head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.piano {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 220px;
  padding-top: 1rem;
}

.piano-key {
  position: relative;
  border: 1px solid #0f203a;
  border-radius: 0 0 18px 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.9rem;
  cursor: pointer;
}

.piano-key.white {
  flex: 1;
  min-width: 48px;
  background: linear-gradient(180deg, #fefdf8 0%, #d9e2ef 100%);
  color: #0d1729;
  height: 220px;
}

.piano-key.black {
  position: absolute;
  top: 0;
  width: 9%;
  height: 136px;
  z-index: 2;
  background: linear-gradient(180deg, #192538 0%, #0a111e 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.35);
}

.black-1 { left: 10.5%; }
.black-2 { left: 22.8%; }
.black-4 { left: 47.8%; }
.black-5 { left: 60.2%; }
.black-6 { left: 72.6%; }

.piano-key.active,
.string-line.active {
  transform: translateY(2px) scale(0.99);
  box-shadow: 0 0 0 1px rgba(255, 188, 94, 0.35), 0 0 30px rgba(255, 188, 94, 0.25);
}

.strings {
  min-height: 260px;
  display: grid;
  gap: 1.05rem;
  align-content: center;
  padding: 1rem 0;
}

.string-line {
  width: 100%;
  height: 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 188, 94, 0.65), rgba(255, 255, 255, 0.22));
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.string-line.active {
  animation: stringVibe 280ms ease;
}

.memory-copy {
  flex: 0.9;
}

.memory-grid {
  flex: 1.2;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-all input,
.upload-card input {
  display: none;
}

.memory-card {
  position: relative;
  min-height: 240px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top left, rgba(255, 188, 94, 0.2), transparent 35%);
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.memory-card.has-image {
  border-style: solid;
}

.upload-hint {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 18px;
  background: rgba(8, 16, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.memory-card.has-image .upload-hint {
  background: rgba(8, 16, 28, 0.5);
  backdrop-filter: blur(10px);
}

.finale-card {
  max-width: 840px;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 30;
}

.confetti {
  position: absolute;
  top: -10vh;
  width: 10px;
  height: 20px;
  opacity: 0.95;
  animation: confettiFall linear forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scaleY(0.6); opacity: 0.7; }
  50% { transform: scaleY(1.12); opacity: 1; }
}

@keyframes stringVibe {
  0% { transform: scaleY(1) translateX(0); }
  20% { transform: scaleY(1.22) translateX(10px); }
  50% { transform: scaleY(0.9) translateX(-8px); }
  100% { transform: scaleY(1) translateX(0); }
}

@keyframes confettiFall {
  to {
    transform: translate3d(var(--x-shift), 110vh, 0) rotate(680deg);
    opacity: 1;
  }
}

@media (max-width: 960px) {
  .hero {
    min-height: auto;
    padding-bottom: 2rem;
  }

  .hero-stage {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 2rem auto 0;
    width: min(84vw, 390px);
  }

  .questions-layout,
  .memory-layout,
  .instrument-grid {
    flex-direction: column;
  }

  .setlist-panel {
    width: 100%;
    position: static;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: clamp(3rem, 16vw, 4.6rem);
  }

  .section-heading h2 {
    font-size: clamp(2rem, 12vw, 3.1rem);
  }

  .memory-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }

  .piano {
    min-height: 180px;
  }

  .piano-key.white {
    min-width: 32px;
    height: 180px;
    font-size: 0.75rem;
  }

  .piano-key.black {
    height: 112px;
    font-size: 0.65rem;
  }
}
