@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #080808;
  --surface: #0f0f0f;
  --elevated: #161616;
  --line: rgba(255,255,255,0.06);
  --craft-line: rgba(190,155,110,0.2);
  --accent: #c9a87c;
  --accent-light: #e0c9a6;
  --accent-dim: #8a7355;
  --white: #f2efe9;
  --gray: #666058;
  --dim: #3a3632;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'Space Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--white); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
::selection { background: var(--accent); color: var(--bg); }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 24px 48px; display: flex; justify-content: space-between; align-items: center;
  mix-blend-mode: difference;
}
.nav-wordmark { font-family: var(--mono); font-size: 11px; letter-spacing: 6px; color: var(--white); text-decoration: none; }
.nav-links { display: flex; gap: 36px; }
.nav-links a { font-size: 12px; color: var(--white); text-decoration: none; letter-spacing: 2px; opacity: 0.5; transition: opacity 0.3s; }
.nav-links a:hover { opacity: 1; }

/* HERO */
.hero {
  height: 100vh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 48px 64px; position: relative; overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  background: url('assets/banner.png') center/cover; opacity: 0.25;
}
.hero-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 20%, var(--bg) 85%);
}
.hero-inner { position: relative; z-index: 2; }
.hero h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 9vw, 140px);
  line-height: 0.92; letter-spacing: -0.03em; color: var(--white);
}
.hero h1 i { color: var(--accent-light); }
.hero-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--craft-line);
}
.hero-row p { max-width: 360px; font-size: 14px; line-height: 1.8; color: var(--gray); font-weight: 300; }
.hero-row a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 3px;
  color: var(--accent); text-decoration: none; border: 1px solid var(--accent-dim);
  padding: 14px 32px; transition: all 0.4s;
}
.hero-row a:hover { background: var(--accent); color: var(--bg); }

/* MARQUEE */
.marquee-wrap { overflow: hidden; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee {
  display: flex; gap: 64px; white-space: nowrap;
  animation: scroll 20s linear infinite;
  font-family: var(--mono); font-size: 11px; letter-spacing: 4px; color: var(--dim);
}
.marquee span::after { content: '·'; margin-left: 64px; color: var(--accent-dim); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* SECTIONS */
.section { padding: 120px 48px; max-width: 1400px; margin: 0 auto; }
.section-number { font-family: var(--mono); font-size: 11px; color: var(--accent-dim); letter-spacing: 4px; margin-bottom: 16px; }
.section-title { font-family: var(--serif); font-size: clamp(36px, 5vw, 64px); font-weight: 400; line-height: 1.1; margin-bottom: 48px; }
.section-title i { color: var(--accent-light); }
.divider { border: none; border-top: 1px solid var(--line); margin: 0; }

/* PROCESS — editorial flow, no boxes */
.process-list { counter-reset: step; }
.process-item {
  display: grid; grid-template-columns: 80px 200px 1fr; gap: 32px;
  padding: 32px 0; border-bottom: 1px solid var(--line);
  align-items: baseline; transition: all 0.3s;
}
.process-item:hover { padding-left: 12px; border-color: var(--craft-line); }
.process-step { font-family: var(--serif); font-size: 32px; color: var(--accent-dim); font-style: italic; }
.process-name { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: var(--accent); }
.process-desc { font-size: 14px; color: var(--gray); font-weight: 300; line-height: 1.7; }

/* UPLOAD */
.upload-area {
  border: 1px solid var(--craft-line); padding: 96px 48px; text-align: center;
  cursor: pointer; transition: all 0.5s; position: relative;
}
.upload-area:hover { border-color: var(--accent); background: rgba(190,155,110,0.03); }
.upload-area h3 { font-family: var(--serif); font-size: 28px; font-weight: 400; margin-bottom: 12px; }
.upload-area p { font-size: 13px; color: var(--gray); letter-spacing: 1px; }
.upload-area .corner {
  position: absolute; width: 24px; height: 24px;
}
.upload-area .corner--tl { top: -1px; left: -1px; border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.upload-area .corner--tr { top: -1px; right: -1px; border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.upload-area .corner--bl { bottom: -1px; left: -1px; border-bottom: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.upload-area .corner--br { bottom: -1px; right: -1px; border-bottom: 1px solid var(--accent); border-right: 1px solid var(--accent); }

/* WORKSPACE */
#workspace { max-width: 960px; margin: 0 auto; padding: 0 48px 120px; position: relative; z-index: 3; }
.ws-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--line); margin-bottom: 32px;
}
.ws-file { font-family: var(--serif); font-size: 22px; }
.ws-dur { font-family: var(--mono); font-size: 12px; color: var(--gray); }
.ws-reset {
  font-family: var(--mono); font-size: 10px; letter-spacing: 2px;
  background: none; border: none; color: var(--gray); cursor: pointer; transition: color 0.3s;
}
.ws-reset:hover { color: var(--accent); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin-bottom: 24px; }
.metric { padding: 28px 24px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: none; }
.metric-label { font-family: var(--mono); font-size: 9px; letter-spacing: 3px; color: var(--gray); margin-bottom: 8px; }
.metric-value { font-family: var(--serif); font-size: 28px; color: var(--accent); }
.metric-bar { height: 1px; background: var(--line); margin-top: 12px; }
.bar-fill { height: 1px; background: var(--accent); width: 0%; transition: width 0.8s; }

.wave-box, .spec-box { border: 1px solid var(--line); padding: 20px 24px; margin-bottom: 16px; }
.wave-label { font-family: var(--mono); font-size: 9px; letter-spacing: 4px; color: var(--gray); margin-bottom: 12px; }
#waveform-canvas { width: 100%; height: 100px; display: block; }
.spectrum-bars { display: flex; gap: 8px; height: 70px; align-items: flex-end; }
.spec-bar { flex: 1; background: var(--accent); min-height: 4px; transition: height 0.5s; border-radius: 1px 1px 0 0; }
.spec-bar-label { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); font-size: 7px; font-family: var(--mono); color: var(--gray); white-space: nowrap; }

/* PRESETS */
#presets-section { margin-top: 40px; }
.presets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; border: 1px solid var(--line); }
.preset-card {
  padding: 32px 20px; text-align: left; cursor: pointer;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.preset-card:hover { background: var(--surface); }
.preset-card.selected { background: var(--surface); box-shadow: inset 0 1px 0 var(--accent); }
.preset-emoji { font-size: 20px; margin-bottom: 12px; }
.preset-name { font-family: var(--serif); font-size: 17px; margin-bottom: 6px; }
.preset-desc { font-size: 11px; color: var(--gray); line-height: 1.6; }
.preset-lufs { font-family: var(--mono); font-size: 10px; color: var(--accent-dim); margin-top: 10px; }

.master-cta { text-align: center; margin: 48px 0; }
.master-btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: 4px;
  padding: 16px 56px; background: none; border: 1px solid var(--accent-dim);
  color: var(--accent); cursor: pointer; transition: all 0.4s;
}
.master-btn:hover:not(:disabled) { background: var(--accent); color: var(--bg); }
.master-btn:disabled { opacity: 0.2; cursor: not-allowed; }

.progress-card { border: 1px solid var(--line); padding: 48px; text-align: center; }
.progress-stage { font-family: var(--serif); font-size: 20px; margin-bottom: 24px; }
.progress-track { height: 1px; background: var(--line); }
.progress-fill { height: 1px; background: var(--accent); width: 0%; transition: width 0.4s; }
.progress-pct { font-family: var(--mono); font-size: 11px; color: var(--gray); margin-top: 16px; }

.comparison-grid { display: flex; border: 1px solid var(--line); margin-bottom: 24px; }
.comparison-card { flex: 1; padding: 32px; }
.comparison-card.after { border-left: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--accent); }
.comp-label { font-family: var(--mono); font-size: 9px; letter-spacing: 4px; color: var(--gray); }
.comp-lufs { font-family: var(--serif); font-size: 40px; color: var(--gray); margin: 8px 0; }
.comparison-card.after .comp-lufs { color: var(--accent); }
.comp-sublabel { font-size: 11px; color: var(--gray); margin-bottom: 16px; }
.comparison-arrow { display: none; }
#waveform-before, #waveform-after { width: 100%; height: 70px; display: block; }

.ab-player { border: 1px solid var(--line); padding: 24px; margin-bottom: 24px; }
.ab-toggle { display: flex; gap: 0; justify-content: center; margin-bottom: 20px; }
.ab-btn {
  padding: 8px 28px; border: 1px solid var(--line);
  background: none; font-family: var(--mono); font-size: 11px;
  letter-spacing: 2px; color: var(--gray); cursor: pointer; transition: all 0.3s;
}
.ab-btn.active { border-color: var(--accent); color: var(--accent); }
.player-controls { display: flex; align-items: center; gap: 16px; }
.play-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: none; color: var(--white); font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.3s;
}
.play-btn:hover { border-color: var(--accent); color: var(--accent); }
.player-timeline { flex: 1; height: 1px; background: var(--line); cursor: pointer; overflow: hidden; }
.timeline-fill { height: 1px; width: 0%; background: var(--accent); transition: width 0.1s; }
.player-time { font-family: var(--mono); font-size: 11px; color: var(--gray); }

.download-section { text-align: center; margin-top: 32px; }
.download-btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: 3px;
  padding: 14px 40px; background: var(--accent); border: none;
  color: var(--bg); cursor: pointer; transition: background 0.3s;
}
.download-btn:hover { background: var(--accent-light); }
.download-meta { font-size: 10px; color: var(--gray); margin-top: 12px; font-family: var(--mono); }

/* PRICING */
#pricing .pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.price-col { padding: 56px 36px; border-right: 1px solid var(--line); }
.price-col:last-child { border-right: none; }
.price-col.featured { background: var(--surface); box-shadow: inset 0 1px 0 var(--accent); }
.price-badge { font-family: var(--mono); font-size: 8px; letter-spacing: 3px; color: var(--accent); margin-bottom: 16px; }
.price-tier { font-family: var(--mono); font-size: 10px; letter-spacing: 3px; color: var(--gray); margin-bottom: 20px; }
.price-amount { font-family: var(--serif); font-size: 48px; margin-bottom: 32px; }
.price-amount span { font-size: 14px; color: var(--gray); }
.price-features { list-style: none; margin-bottom: 36px; }
.price-features li { padding: 10px 0; font-size: 13px; color: var(--gray); border-bottom: 1px solid var(--line); }
.price-btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: 3px;
  padding: 10px 28px; border: 1px solid var(--line); background: none;
  color: var(--gray); cursor: pointer; transition: all 0.3s; width: 100%;
}
.price-btn:hover { border-color: var(--accent); color: var(--accent); }
.price-btn.primary { border-color: var(--accent); color: var(--accent); }
.price-btn.primary:hover { background: var(--accent); color: var(--bg); }

/* FOOTER */
footer {
  padding: 48px; display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line);
}
.footer-left { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 20px; height: 20px; border-radius: 3px; }
footer span { font-family: var(--mono); font-size: 10px; color: var(--gray); letter-spacing: 3px; }
footer em { font-family: var(--serif); font-size: 13px; color: var(--gray); }

/* CRAFT LAYER */
.craft-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.craft-obj { position: absolute; opacity: 0.04; animation: drift 12s ease-in-out infinite; }
.craft-obj.vinyl {
  width: 60px; height: 60px; border-radius: 50%;
  background: radial-gradient(circle, #111 20%, #222 21%, #222 45%, var(--accent-dim) 46%, var(--accent-dim) 48%, #111 49%);
  border: 2px solid #222; animation: drift 14s ease-in-out infinite, spin 30s linear infinite;
}
.vinyl-inner { position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-dim); transform: translate(-50%,-50%); }
.craft-obj.vinyl.sm { width: 36px; height: 36px; }
.craft-obj.vinyl.sm .vinyl-inner { width: 7px; height: 7px; }
.craft-obj.note { font-size: 20px; color: var(--accent-dim); }
@keyframes drift { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.craft-obj:nth-child(1) { animation-delay: 0s; }
.craft-obj:nth-child(2) { animation-delay: -2s; }
.craft-obj:nth-child(3) { animation-delay: -4s; }
.craft-obj:nth-child(4) { animation-delay: -6s; }
.craft-obj:nth-child(5) { animation-delay: -1s; }
.craft-obj:nth-child(6) { animation-delay: -3s; }

@media (max-width: 768px) {
  nav, .hero, .section, footer { padding-left: 24px; padding-right: 24px; }
  .hero h1 { font-size: 40px; }
  .process-item { grid-template-columns: 1fr; gap: 8px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  #pricing .pricing-grid { grid-template-columns: 1fr; }
  .price-col { border-right: none; border-bottom: 1px solid var(--line); }
  .comparison-grid { flex-direction: column; }
  .nav-links { display: none; }
  .hero-row { flex-direction: column; gap: 24px; }
  .craft-layer { display: none; }
  .marquee-wrap { display: none; }
  footer { flex-direction: column; gap: 16px; }
}
