/* ── VARIABLES ── */
:root {
  --bg:     #09090f;
  --bg2:    #0f0f1a;
  --bg3:    #13131f;
  --border: #1e1e30;
  --brd2:   #2a2a40;
  --text:   #c8c8e0;
  --muted:  #c8c8e0;
  --accent: #7b5fff;
  --teal:   #0d9488;
  --gold:   #c9a84c;
  --major:  #a89fff;
  --minor:  #7a9acc;
  --w:      700px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 40px; height: 56px;
  background: rgba(9,9,15,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px; color: #fff; text-decoration: none;
}
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── SECTIONS ── */
section { padding: 100px 20px; }
.inner  { max-width: var(--w); margin: 0 auto; }

/* ── HERO ── */
#hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; padding: 0 20px;
  position: relative; overflow: hidden;
}
#hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 10% 50%, rgba(123,95,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 90% 20%, rgba(13,148,136,0.05) 0%, transparent 60%);
}
#hero::after {
  content: ''; position: absolute; top: 0; right: -10%; bottom: 0;
  width: 55%; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 28px,
    rgba(255,255,255,0.022) 28px, rgba(255,255,255,0.022) 29px
  );
}
.hero-inner {
  max-width: var(--w); margin: 0 auto; width: 100%;
  position: relative; z-index: 1; padding-top: 56px;
}
.hero-eye {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase; color: var(--teal);
  margin-bottom: 20px; opacity: 0;
  animation: fadeUp 0.7s 0.2s ease forwards;
}
h1.htitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(44px, 8vw, 76px); font-weight: 700;
  color: #fff; line-height: 1.0; letter-spacing: -1px;
  margin-bottom: 16px; opacity: 0;
  animation: fadeUp 0.7s 0.35s ease forwards;
}
h1.htitle em { color: var(--gold); font-style: italic; }
.hero-sub {
  font-size: 18px; color: var(--muted); max-width: 500px;
  margin-bottom: 40px; opacity: 0;
  animation: fadeUp 0.7s 0.5s ease forwards;
}
.hero-stats {
  display: flex; gap: 40px; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.7s 0.65s ease forwards;
}
.hstat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px; font-weight: 700; color: var(--teal); line-height: 1;
}
.hstat-lbl {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); margin-top: 4px;
}
.scroll-hint {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; animation: fadeIn 1s 1.2s ease forwards;
  color: var(--muted); font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: sp 2s 1.5s ease-in-out infinite;
}
@keyframes sp { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* ── TYPOGRAPHY ── */
.stag {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--teal); margin-bottom: 12px;
}
h2.stitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 5vw, 46px); font-weight: 700;
  color: #fff; line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.5px;
}
h2.stitle em { color: var(--gold); font-style: italic; }
p.lead  { font-size: 17px; color: var(--text); margin-bottom: 20px; }
p.body  { font-size: 15px; color: #888899; margin-bottom: 16px; }
.divider { width: 48px; height: 2px; background: var(--teal); margin: 32px 0; }
code.ch {
  color: var(--major); background: var(--bg3);
  padding: 2px 6px; border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
}

/* ── VIDEO ── */
.video-wrap {
  margin: 40px 0; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--brd2); background: #000;
  position: relative; padding-top: 56.25%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.vcap { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; font-style: italic; }

/* ── CALLOUT ── */
.callout {
  border-left: 3px solid var(--teal); padding: 16px 24px;
  margin: 32px 0; background: var(--bg2); border-radius: 0 8px 8px 0;
}
.callout p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-style: italic; color: #d0d0e8; line-height: 1.5;
}

/* ── PIPELINE ── */
.pipeline { display: flex; align-items: stretch; margin: 40px 0; flex-wrap: wrap; }
.pipe-step {
  flex: 1; min-width: 130px;
  background: var(--bg2); border: 1px solid var(--border); padding: 20px 16px;
}
.pipe-step:first-child { border-radius: 8px 0 0 8px; }
.pipe-step:last-child  { border-radius: 0 8px 8px 0; }
.pipe-step + .pipe-step { border-left: none; }
.pipe-num   { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 700; color: var(--brd2); line-height: 1; margin-bottom: 8px; }
.pipe-label { font-size: 11px; font-weight: 700; color: var(--teal); letter-spacing: 0.5px; margin-bottom: 6px; text-transform: uppercase; }
.pipe-body  { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); line-height: 1.6; }
.pipe-arrow { display: flex; align-items: center; justify-content: center; color: var(--brd2); font-size: 18px; padding: 0 4px; flex-shrink: 0; align-self: center; }

/* ── COMPARISON TABLE ── */
.ctable { width: 100%; border-collapse: collapse; margin: 32px 0; font-size: 14px; }
.ctable th { padding: 10px 16px; text-align: left; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); }
.ctable th:last-child { color: var(--teal); }
.ctable td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: #888899; }
.ctable td:last-child { color: var(--text); }
.ctable tr:hover td { background: var(--bg2); }

/* ── STAT CARDS ── */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 24px 20px; text-align: center; }
.stat-num  { font-family: 'Cormorant Garamond', serif; font-size: 40px; font-weight: 700; color: var(--teal); line-height: 1; }
.stat-lbl  { font-size: 12px; color: var(--muted); margin-top: 8px; text-transform: uppercase; letter-spacing: 1.5px; }
.stat-sub  { font-size: 11px; color: #c8c8e0;; margin-top: 6px; font-style: italic; }

/* ── FREQUENCY CHART ── */
.freq-chart { margin: 40px 0; }
.fbar-row   { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.fbar-lbl   { font-family: 'JetBrains Mono', monospace; font-size: 13px; width: 36px; text-align: right; flex-shrink: 0; }
.fbar-lbl.major { color: var(--major); font-weight: 500; }
.fbar-lbl.minor { color: var(--minor); font-style: italic; }
.fbar-track { flex: 1; height: 20px; background: var(--bg2); border-radius: 3px; overflow: hidden; }
.fbar-fill  { height: 100%; border-radius: 3px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.fbar-count { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); width: 56px; text-align: right; flex-shrink: 0; }

/* ── STATIC PREDICTION CARDS ── */
.pred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 40px 0; }
.pred-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.pctitle   { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }
.pctitle.bi  { color: var(--muted); }
.pctitle.tri { color: var(--teal); }
.pcctx     { font-family: 'JetBrains Mono', monospace; font-size: 16px; color: var(--major); margin-bottom: 20px; }
.pitem     { margin-bottom: 10px; }
.prow      { display: flex; align-items: center; gap: 10px; }
.plbl      { font-family: 'JetBrains Mono', monospace; font-size: 13px; width: 36px; text-align: right; color: var(--major); font-weight: 500; }
.plbl.m    { color: var(--minor); font-style: italic; }
.ptrack    { flex: 1; height: 20px; background: #0a0a14; border-radius: 3px; overflow: hidden; }
.pfill     { height: 100%; border-radius: 3px; }
.ppct      { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); width: 36px; text-align: right; }
.pnotes    { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: #333355; text-align: right; margin-top: 1px; padding-right: 46px; letter-spacing: 1px; }

/* ── INSIGHT BOX ── */
.insight {
  background: linear-gradient(135deg, rgba(13,148,136,0.08), rgba(123,95,255,0.05));
  border: 1px solid rgba(13,148,136,0.2); border-radius: 10px;
  padding: 24px 28px; margin: 32px 0;
}
.ins-lbl { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.insight p { font-size: 15px; color: var(--text); }

/* ── LIMITATION / FUTURE CARDS ── */
.lgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 32px 0; }
.lcard { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 22px; }
.lcard h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.lcard p  { font-size: 13px; color: #666680; }
.lcard.fut h4 { color: var(--teal); }

/* ── DEMO SECTION ── */
#demo { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.demo-wrap { max-width: 760px; margin: 0 auto; }

.chord-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chord-btn  {
  width: 74px; height: 42px; border-radius: 8px; border: 1px solid;
  font-family: 'JetBrains Mono', monospace; font-size: 14px; cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
}
.chord-btn.major { background: #1a1a2e; color: var(--major); border-color: #2e2e50; }
.chord-btn.major:hover { border-color: var(--accent); box-shadow: 0 0 12px rgba(123,95,255,0.2); }
.chord-btn.minor { background: #111120; color: var(--minor); border-color: #222235; font-style: italic; }
.chord-btn.minor:hover { border-color: #4455aa; box-shadow: 0 0 12px rgba(122,154,204,0.15); }
.chord-btn:active { transform: scale(0.94); }
.chord-btn.playing { animation: bpulse 0.4s ease; }
@keyframes bpulse {
  0%   { box-shadow: 0 0 0 0   rgba(123,95,255,0.5); }
  100% { box-shadow: 0 0 0 10px rgba(123,95,255,0); }
}

.prog-wrap {
  background: #060609; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 20px; min-height: 62px; display: flex; align-items: center;
  flex-wrap: wrap; gap: 4px; font-size: 22px;
  font-family: 'JetBrains Mono', monospace; margin: 16px 0;
}
.prog-empty { color: #2a2a45; font-style: italic; font-size: 14px; }
.prog-chord {
  color: var(--major); font-weight: 500;
  animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.prog-chord.m { color: var(--minor); }
.prog-arr   { color: #252540; margin: 0 4px; font-size: 16px; }
.prog-cur   { color: #333355; font-style: italic; font-size: 18px; }
@keyframes popIn {
  from { opacity: 0; transform: scale(0.7) translateY(4px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.dlabel  { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.dpitem  { margin-bottom: 8px; animation: slin 0.25s ease both; }
@keyframes slin {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.dprow   { display: flex; align-items: center; gap: 12px; }
.dplbl   { width: 42px; text-align: right; font-size: 15px; color: var(--major); font-weight: 500; font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }
.dplbl.m { color: var(--minor); font-style: italic; }
.dptrack { flex: 1; height: 22px; background: #0a0a14; border-radius: 4px; overflow: hidden; }
.dpfill  { height: 100%; border-radius: 4px; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.dppct   { width: 40px; font-size: 12px; color: var(--muted); text-align: right; font-family: 'JetBrains Mono', monospace; }
.dpnotes { text-align: right; font-size: 9px; color: #c8c8e0; letter-spacing: 1.5px; margin-top: 2px; padding-right: 52px; font-family: 'JetBrains Mono', monospace; }

.play-line      { font-size: 11px; color: #444466; min-height: 20px; margin-bottom: 4px; font-family: 'JetBrains Mono', monospace; }
.play-line .cn  { color: #8877ff; }
.play-line .nn  { color: #3a4a66; }

.dcontrols { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.ctrl-btn  {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 2px; text-transform: uppercase; border-radius: 6px;
  padding: 8px 16px; cursor: pointer; border: 1px solid;
  background: transparent; transition: all 0.15s;
}
.ctrl-btn.clr        { color: #664455; border-color: #2a1520; }
.ctrl-btn.clr:hover  { color: #cc6677; border-color: #552233; background: #140a10; }
.ctrl-btn.tog        { color: #446655; border-color: #1a2a20; }
.ctrl-btn.tog:hover  { color: #66aa88; border-color: #224433; background: #0a1410; }
.mbadge {
  font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--teal); background: #0a1a12; border: 1px solid #1a3a25;
  border-radius: 4px; padding: 3px 10px;
}
.ctx-info { font-size: 10px; color: #c8c8e0; font-family: 'JetBrains Mono', monospace; margin-left: auto; }
#audio-status {
  font-size: 9px; letter-spacing: 1.5px; color: var(--teal);
  opacity: 0; transition: opacity 0.3s; text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

/* ── FOOTER ── */
footer { padding: 48px 20px; text-align: center; border-top: 1px solid var(--border); }
.finner { max-width: var(--w); margin: 0 auto; }
.flogo  { font-family: 'Cormorant Garamond', serif; font-size: 24px; color: #fff; margin-bottom: 16px; }
.flinks { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.flinks a { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.flinks a:hover { color: var(--text); }
.fcopy  { font-size: 12px; color: #222235; }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .pred-grid { grid-template-columns: 1fr; }
  .lgrid { grid-template-columns: 1fr; }
  .pipeline { flex-direction: column; }
  .pipe-step:first-child { border-radius: 8px 8px 0 0; }
  .pipe-step:last-child  { border-radius: 0 0 8px 8px; }
  .pipe-step + .pipe-step { border-left: 1px solid var(--border); border-top: none; }
}