/* ═══════════════════════════════════════════════
   ZION — THE PERFECT MELODY 2
   main.css
═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&family=Crimson+Pro:ital,wght@0,300;1,300&display=swap');

:root {
  --bg:      #020408;
  --cyan:    #00ffff;
  --magenta: #ff00aa;
  --violet:  #aa00ff;
  --orange:  #ff6600;
  --yellow:  #ffff00;
  --white:   #f0f4ff;
  --dim:     rgba(240,244,255,0.35);
  --font-hud:    'Share Tech Mono', monospace;
  --font-display:'Orbitron', sans-serif;
  --font-serif:  'Crimson Pro', serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-hud);
  overflow-x: hidden;
  cursor: none;
}

body.gate-locked {
  overflow: hidden;
}

/* ── Custom cursor ─────────────────────────── */
#cursor {
  position: fixed; z-index: 9999;
  width: 8px; height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%,-50%);
  box-shadow: 0 0 10px var(--cyan);
  transition: background .2s;
}
#cursor-ring {
  position: fixed; z-index: 9998;
  width: 36px; height: 36px;
  border: 1px solid rgba(0,255,255,0.5);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%,-50%);
  transition: width .25s, height .25s, border-color .25s;
}
body.hovering #cursor-ring {
  width: 52px; height: 52px;
  border-color: var(--cyan);
}

/* ── Background canvas ─────────────────────── */
#bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

#access-gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(0, 255, 255, 0.14), transparent 45%),
    rgba(2, 4, 8, 0.97);
  backdrop-filter: blur(18px);
}

#access-gate.open {
  display: flex;
}

#access-gate-modal {
  width: 100%;
  max-width: 520px;
  padding: 36px 30px 30px;
  border: 1px solid rgba(0, 255, 255, 0.28);
  background: linear-gradient(180deg, rgba(7, 12, 20, 0.98), rgba(3, 6, 12, 0.98));
  box-shadow: 0 0 50px rgba(0, 255, 255, 0.08);
  text-align: center;
  animation: modal-in .35s cubic-bezier(.34,1.56,.64,1);
}

.gate-eyebrow {
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: .4em;
}

.gate-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.05;
  margin-bottom: 14px;
  color: var(--white);
}

.gate-desc {
  margin: 0 auto 24px;
  max-width: 420px;
  color: rgba(240, 244, 255, 0.72);
  font-size: 13px;
  line-height: 1.7;
}

.gate-actions {
  display: grid;
  gap: 12px;
}

.gate-email-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.gate-email {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid rgba(0, 255, 255, 0.22);
  background: rgba(2, 4, 10, 0.95);
  color: var(--white);
  font-family: var(--font-hud);
  font-size: 13px;
  outline: none;
}

.gate-email:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.12);
}

.gate-email:disabled {
  opacity: .65;
}

.gate-email-submit {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.gate-link,
.gate-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 18px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 11px;
  font-family: var(--font-display);
  transition: transform .2s, box-shadow .2s, opacity .2s, border-color .2s;
  cursor: none;
}

.gate-link:hover,
.gate-enter:hover:not(:disabled) {
  transform: translateY(-1px);
}

.gate-link.youtube {
  color: #ff4d57;
  border: 1px solid rgba(255, 77, 87, 0.35);
  background: rgba(255, 77, 87, 0.08);
}

.gate-link.spotify {
  color: #1ed760;
  border: 1px solid rgba(30, 215, 96, 0.35);
  background: rgba(30, 215, 96, 0.08);
}

.gate-link.done {
  box-shadow: 0 0 22px rgba(0, 255, 255, 0.14);
  border-color: rgba(0, 255, 255, 0.5);
}

.gate-checks {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}

.gate-status {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(240, 244, 255, 0.55);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.gate-status.done {
  color: var(--cyan);
  border-color: rgba(0, 255, 255, 0.32);
  background: rgba(0, 255, 255, 0.08);
}

.gate-enter {
  width: 100%;
  border: none;
  color: var(--bg);
  background: var(--cyan);
}

.gate-enter:disabled {
  opacity: .35;
}

body.access-complete .presave-row,
body.access-complete #btn-join,
body.access-complete #sub-overlay {
  display: none !important;
}

.gate-note {
  margin-top: 12px;
  color: rgba(240, 244, 255, 0.4);
  font-size: 10px;
  letter-spacing: .12em;
}

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
#hero {
  position: relative; z-index: 2;
  min-height: 44vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 24px 6px;
  overflow: hidden;
}

/* scan line */
.scan-line {
  position: absolute; left:0; right:0; height:1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,255,0.2), transparent);
  animation: scan 5s linear infinite;
  pointer-events: none;
}
@keyframes scan { 0%{top:-1px} 100%{top:100%} }

/* corners */
.corner {
  position: absolute; width:22px; height:22px;
  border-color: rgba(0,255,255,0.4);
}
.c-tl { top:16px; left:16px; border-top:1px solid; border-left:1px solid; }
.c-tr { top:16px; right:16px; border-top:1px solid; border-right:1px solid; }

/* hero text */
.hero-content { text-align:center; max-width:700px; }

.hero-eyebrow {
  font-size:11px; letter-spacing:.4em;
  color: rgba(0,255,255,0.4); margin-bottom:16px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(82px,14vw,170px);
  font-weight: 900; line-height: 1;
  color: var(--cyan);
  text-shadow: 0 0 40px var(--cyan), 0 0 100px rgba(0,180,255,0.3);
  letter-spacing: .12em;
  animation: flicker 9s infinite;
}

.hero-project {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 40px);
  color: rgba(240,244,255,0.86);
  letter-spacing: .16em;
  text-transform: uppercase;
}
@keyframes flicker {
  0%,94%,100%{opacity:1} 95%{opacity:.4} 96%{opacity:1} 97%{opacity:.15} 99%{opacity:1}
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px,3vw,28px);
  color: rgba(255,255,255,0.5);
  margin-top: 8px; margin-bottom: 10px;
  letter-spacing: .08em;
}

/* presave buttons */
.presave-row {
  display: flex; gap:12px; justify-content:center;
  flex-wrap: wrap; margin-bottom: 24px;
}
.btn-presave {
  display: inline-flex; align-items: center; gap:8px;
  font-family: var(--font-hud); font-size:11px;
  letter-spacing:.15em; text-transform:uppercase;
  padding: 10px 20px;
  border-radius: 2px; text-decoration: none;
  transition: all .3s; cursor: none;
}
.btn-presave.spotify {
  background: rgba(30,215,96,0.1);
  border: 1px solid rgba(30,215,96,0.35);
  color: #1ed760;
}
.btn-presave.spotify:hover {
  background: rgba(30,215,96,0.2);
  box-shadow: 0 0 20px rgba(30,215,96,0.2);
}
.btn-presave.apple {
  background: rgba(252,60,68,0.1);
  border: 1px solid rgba(252,60,68,0.35);
  color: #fc3c44;
}
.btn-presave.apple:hover {
  background: rgba(252,60,68,0.2);
  box-shadow: 0 0 20px rgba(252,60,68,0.2);
}

/* main CTA */
.btn-cta {
  font-family: var(--font-display); font-size:13px;
  font-weight:700; letter-spacing:.25em; text-transform:uppercase;
  padding: 16px 48px;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  cursor: none;
  position: relative; overflow: hidden;
  transition: all .3s;
}
.btn-cta::before {
  content:''; position:absolute; inset:0;
  background: var(--cyan); transform:scaleX(0);
  transform-origin:left; transition:transform .3s;
}
.btn-cta:hover::before { transform:scaleX(1); }
.btn-cta:hover { color: var(--bg); }
.btn-cta span { position:relative; z-index:1; margin-left:8px; }
.btn-cta > * { position:relative; z-index:1; }

/* ══════════════════════════════════════════════
   PENTAGRAMA / SCORE
══════════════════════════════════════════════ */
#score-section {
  position: relative; z-index: 2;
  display: flex; align-items: center;
  min-height: 350px;
  padding: 0 0 70px;
  border-top: 1px solid rgba(0,255,255,0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#score-section::-webkit-scrollbar { display:none; }

.score-label-left {
  flex-shrink: 0; padding: 0 8px 0 24px;
}
.clef-glyph {
  font-size: 120px; line-height:1;
  color: rgba(0,255,255,0.15);
  font-family: serif;
  user-select:none;
}

#score-track {
  position: relative;
  flex: 1; min-width: 600px;
  height: 300px;
  display: flex; align-items: center;
}

/* Staff lines */
#staff-lines {
  position: absolute; left:0; right:0;
  top: 50%; transform: translateY(-50%);
  display: flex; flex-direction:column;
  gap: 20px;
}
.staff-line {
  width:100%; height:.5px;
  background: rgba(0,255,255,0.1);
}

/* Notes container */
#notes-container {
  position: relative; width:100%; height:100%;
  display: flex; align-items: center;
  justify-content: space-around;
  padding: 0 56px;
}

/* Individual note */
.note-cell {
  position: relative;
  display: flex; flex-direction:column;
  align-items: center;
  cursor: none;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  transform: scale(1.25);
  transform-origin: center center;
}
.note-cell:hover { transform: translateY(-14px) scale(1.38); }
.note-cell.locked { opacity: .3; pointer-events: all; }
.note-cell.locked:hover { transform: translateY(-6px) scale(1.28); }

.note-pulse-ring {
  position:absolute;
  width:60px; height:60px;
  border-radius:50%;
  border:1px solid currentColor;
  opacity:0;
  transition: opacity .3s;
  animation: none;
}
.note-cell:not(.locked):hover .note-pulse-ring {
  opacity:1;
  animation: pulse-ring 1.2s ease-out infinite;
}
@keyframes pulse-ring {
  0%{transform:scale(.7);opacity:.8}
  100%{transform:scale(1.6);opacity:0}
}

.note-head {
  width:58px; height:42px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: currentColor;
  transform: rotate(-12deg);
  display:flex; align-items:center; justify-content:center;
  position:relative; z-index:2;
  transition: box-shadow .3s, transform .3s;
  box-shadow: 0 0 10px currentColor;
}
.note-cell:not(.locked):hover .note-head {
  box-shadow: 0 0 30px currentColor, 0 0 60px currentColor;
  transform: rotate(-12deg) scale(1.16);
}

.note-glyph {
  font-size: 25px;
  color: var(--bg);
  transform: rotate(12deg);
  display:block; line-height:1;
}

.note-stem {
  width:3px; height:88px;
  background: currentColor;
  transform-origin: top;
  position:relative;
  box-shadow: 0 0 6px currentColor;
}
.note-flag {
  position:absolute;
  right:-19px; top:0;
  width:19px; height:32px;
  border-right:3px solid currentColor;
  border-bottom:3px solid currentColor;
  border-radius:0 0 14px 0;
  box-shadow: 0 0 6px currentColor;
}

.note-label {
  margin-top:14px; text-align:center;
}
.note-roman {
  display:block; font-size:15px;
  letter-spacing:.2em; opacity:.5;
}
.note-name {
  display:block; font-size:17px;
  letter-spacing:.1em; margin-top:2px;
  transition: opacity .3s;
}
.note-cell:hover .note-name { opacity:1; }

.lock-icon {
  position:absolute;
  top:-18px;
  left:50%;
  transform:translateX(-50%);
  font-size:16px;
  opacity:.95;
  line-height:1;
  text-shadow: 0 0 10px rgba(255, 180, 0, 0.55);
}

.score-label-right {
  flex-shrink:0; padding:0 24px;
  writing-mode:vertical-rl;
  font-size:9px; letter-spacing:.3em;
  color:rgba(0,255,255,0.2);
}

/* ══════════════════════════════════════════════
   VAULT MODAL
══════════════════════════════════════════════ */
#vault-overlay {
  position:fixed; inset:0; z-index:100;
  background: rgba(2,4,8,0.92);
  backdrop-filter: blur(12px);
  display:none; align-items:center; justify-content:center;
  padding:20px;
}
#vault-overlay.open { display:flex; }

#vault-modal {
  position:relative;
  width:100%; max-width:560px;
  max-height:90vh; overflow-y:auto;
  background: #06080f;
  border: 1px solid rgba(0,255,255,0.15);
  padding: 32px 28px 28px;
  scrollbar-width: thin;
  animation: modal-in .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modal-in {
  from{transform:scale(.85);opacity:0}
  to{transform:scale(1);opacity:1}
}

#vault-close {
  position:absolute; top:14px; right:16px;
  background:none; border:none;
  font-size:16px; color:rgba(255,255,255,0.3);
  cursor:none; transition:color .2s;
}
#vault-close:hover { color:var(--cyan); }

.vault-header { margin-bottom:20px; }
.vault-eyebrow {
  font-size:9px; letter-spacing:.35em;
  color:var(--cyan); margin-bottom:8px; display:block;
}
.vault-title {
  font-family:var(--font-display); font-size:clamp(28px,5vw,42px);
  font-weight:700; line-height:1.1;
  text-shadow:0 0 20px currentColor;
}

#code-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 4, 8, 0.94);
  backdrop-filter: blur(14px);
}

#code-overlay.open {
  display: flex;
}

#code-modal {
  width: 100%;
  max-width: 420px;
  padding: 34px 28px 28px;
  border: 1px solid rgba(170, 0, 255, 0.35);
  background: linear-gradient(180deg, rgba(16, 8, 26, 0.98), rgba(6, 4, 12, 0.98));
  text-align: center;
  box-shadow: 0 0 40px rgba(170, 0, 255, 0.12);
}

.code-eyebrow {
  color: #c875ff;
  font-size: 10px;
  letter-spacing: .35em;
  margin-bottom: 10px;
}

.code-title {
  font-family: var(--font-display);
  font-size: 34px;
  margin-bottom: 10px;
}

.code-desc {
  color: rgba(240,244,255,0.72);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.code-input {
  width: 100%;
  margin-bottom: 12px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(170, 0, 255, 0.28);
  background: rgba(9, 6, 16, 0.96);
  color: var(--white);
  font-family: var(--font-hud);
  font-size: 14px;
  outline: none;
}

.code-submit {
  width: 100%;
  min-height: 50px;
  border: none;
  background: #aa00ff;
  color: white;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: none;
}

.code-msg {
  min-height: 18px;
  margin-top: 12px;
  color: #ff79c6;
  font-size: 11px;
  letter-spacing: .08em;
}
.vault-meta {
  margin-top:8px; font-size:10px;
  color:rgba(255,255,255,0.35); letter-spacing:.15em;
}
.meta-sep { margin:0 10px; opacity:.3; }

/* Waveform */
.vault-wave-wrap {
  background:#02050a;
  border:1px solid rgba(255,255,255,0.06);
  padding:16px; margin-bottom:20px;
}
#wave-canvas { width:100%; height:60px; display:block; }
.wave-controls {
  display:flex; align-items:center; gap:12px; margin-top:10px;
}
.wave-btn {
  font-family:var(--font-hud); font-size:9px;
  letter-spacing:.2em; text-transform:uppercase;
  background:transparent; border:1px solid rgba(0,255,255,0.3);
  color:var(--cyan); padding:6px 14px; cursor:none;
  white-space:nowrap; transition:all .2s;
}
.wave-btn:hover { background:rgba(0,255,255,0.08); }
.wave-bar-track {
  flex:1; height:2px; background:rgba(255,255,255,0.08);
}
.wave-bar-fill {
  height:100%; width:0%; background:var(--cyan);
  transition:width .1s linear;
}

/* Tabs */
.vault-tabs {
  display:flex; gap:0;
  border-bottom:1px solid rgba(255,255,255,0.06);
  margin-bottom:20px;
}
.vtab {
  font-family:var(--font-hud); font-size:10px;
  letter-spacing:.2em; text-transform:uppercase;
  background:none; border:none;
  padding:10px 20px;
  color:rgba(255,255,255,0.3);
  cursor:none; border-bottom:2px solid transparent;
  transition:all .2s;
}
.vtab.active { color:var(--cyan); border-bottom-color:var(--cyan); }
.vtab:hover:not(.active) { color:rgba(255,255,255,0.6); }

.vtab-panel { display:none; }
.vtab-panel.active { display:block; }

.vault-desc {
  font-family:var(--font-serif); font-style:italic;
  font-size:17px; line-height:1.7;
  color:rgba(255,255,255,0.7);
}

/* Lyrics — manuscript paper style */
.lyrics-scroll {
  background: repeating-linear-gradient(
    transparent, transparent 27px,
    rgba(0,255,255,0.05) 27px, rgba(0,255,255,0.05) 28px
  );
  padding:16px; max-height:220px; overflow-y:auto;
  border:1px solid rgba(0,255,255,0.08);
}
.lyrics-text {
  font-family:var(--font-serif); font-style:italic;
  font-size:16px; line-height:28px;
  color:rgba(255,255,255,0.75);
  white-space:pre-wrap;
}

/* Video */
.video-placeholder {
  min-height:160px; background:#020408;
  border:1px solid rgba(255,255,255,0.08);
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  gap:10px; padding:12px;
}
.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}
.video-label { font-size:12px; color:rgba(255,255,255,0.5); text-align:center; }

/* ══════════════════════════════════════════════
   SUBSCRIBE MODAL
══════════════════════════════════════════════ */
#sub-overlay {
  position:fixed; inset:0; z-index:200;
  background:rgba(2,4,8,0.95);
  backdrop-filter:blur(16px);
  display:none; align-items:center; justify-content:center;
  padding:20px;
}
#sub-overlay.open { display:flex; }

#sub-modal {
  position:relative;
  width:100%; max-width:440px;
  background:#06080f;
  border:1px solid rgba(0,255,255,0.2);
  padding:40px 32px 32px;
  animation:modal-in .35s cubic-bezier(.34,1.56,.64,1);
  text-align:center;
}
#sub-close {
  position:absolute; top:14px; right:16px;
  background:none; border:none; font-size:16px;
  color:rgba(255,255,255,0.3); cursor:none;
}
#sub-close:hover { color:var(--cyan); }
.sub-eyebrow {
  font-size:9px; letter-spacing:.4em;
  color:var(--cyan); margin-bottom:10px;
}
.sub-title {
  font-family:var(--font-display); font-size:26px;
  font-weight:700; margin-bottom:12px;
}
.sub-desc {
  font-size:12px; color:var(--dim);
  line-height:1.7; margin-bottom:24px;
}
.sub-form {
  display:flex; flex-direction:column; gap:10px;
}
.sub-form input[type="email"] {
  background:#02040a;
  border:1px solid rgba(0,255,255,0.2);
  color:var(--white); padding:13px 16px;
  font-family:var(--font-hud); font-size:13px;
  outline:none; transition:border .2s;
}
.sub-form input:focus { border-color:var(--cyan); }
#sub-submit {
  font-family:var(--font-display); font-size:12px;
  font-weight:700; letter-spacing:.2em; text-transform:uppercase;
  background:var(--cyan); color:var(--bg);
  border:none; padding:14px; cursor:none;
  transition:opacity .2s;
}
#sub-submit:hover { opacity:.85; }
.sub-msg {
  margin-top:12px; font-size:11px; min-height:18px;
  letter-spacing:.1em;
}
.sub-msg.ok   { color:#1ed760; }
.sub-msg.err  { color:#ff4455; }
.sub-legal {
  margin-top:14px; font-size:9px;
  color:rgba(255,255,255,0.15); letter-spacing:.2em;
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
#footer {
  position:relative; z-index:2;
  border-top:1px solid rgba(0,255,255,0.06);
  padding:20px 24px;
}
.footer-inner {
  display:flex; align-items:center;
  justify-content:space-between; flex-wrap:wrap; gap:12px;
}
.footer-logo {
  font-family:var(--font-display); font-size:16px;
  color:rgba(0,255,255,0.3); letter-spacing:.3em;
}
.footer-copy { font-size:9px; color:rgba(255,255,255,0.15); letter-spacing:.1em; }
.footer-link {
  font-size:9px; letter-spacing:.15em;
  color:rgba(0,255,255,0.3); text-decoration:none;
}
.footer-link:hover { color:var(--cyan); }

/* ══════════════════════════════════════════════
   MOBILE
══════════════════════════════════════════════ */
@media (max-width:600px) {
  .hero-name { font-size:72px; }
  #vault-modal { padding:24px 18px 20px; }
  .vtab { padding:10px 14px; font-size:9px; }
  .lyrics-text { font-size:14px; line-height:28px; }
  #access-gate-modal { padding: 28px 20px 24px; }
}
