/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0A0A0F;
  --bg-card: #14141F;
  --bg-card-light: #1C1C2E;
  --accent: #D4A44C;
  --accent-light: #E8C678;
  --text: #FFFFFF;
  --text-muted: #8A8A9A;
  --text-dim: #5A5A6A;
  --border: #2A2A3A;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Work Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

h1, h2, h3, h4 { line-height: 1.15; }

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 24px rgba(212, 164, 76, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid rgba(212, 164, 76, 0.5);
}
.btn-outline:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(212, 164, 76, 0.1);
}

.btn-sm { padding: 10px 24px; font-size: 0.875rem; }
.btn-lg { padding: 16px 40px; font-size: 1.125rem; }

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(42, 42, 58, 0.3);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 5px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links .btn { color: var(--bg); }
.nav-links .btn:hover { color: var(--bg); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-muted);
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 768px) {
  .nav-inner { padding: 0 20px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 32px 20px;
    gap: 24px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ===== Section Label ===== */
.section-label {
  display: block;
  color: var(--accent);
  opacity: 0.8;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 4px;
  margin-bottom: 12px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212, 164, 76, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero h1 {
  font-size: 4.25rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1.6;
  margin-top: 28px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* DAP Mockup */
.hero-mockup {
  display: flex;
  justify-content: center;
}

.dap-device {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 28px 24px;
  border: 1px solid rgba(42, 42, 58, 0.5);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
  width: 320px;
}

.dap-screen {
  background: #1A1A2E;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.np-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  opacity: 0.8;
  margin-bottom: 16px;
}

.album-art {
  width: 200px;
  height: 200px;
  background: #252540;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.album-art-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212, 164, 76, 0.12), transparent);
}

.track-info {
  margin-top: 20px;
  text-align: center;
}
.track-name {
  display: block;
  font-weight: 600;
  font-size: 1.125rem;
}
.artist-name {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

.progress-bar {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.time-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.format-badge {
  margin-top: 14px;
  background: rgba(212, 164, 76, 0.15);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 60px;
    text-align: center;
  }
  .hero h1 { font-size: 3rem; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.25rem; }
  .hero-sub { font-size: 1.0625rem; }
}

/* ===== Stats ===== */
.stats {
  background: var(--bg-card);
  border-top: 1px solid rgba(42, 42, 58, 0.5);
  border-bottom: 1px solid rgba(42, 42, 58, 0.5);
  padding: 48px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 48px;
  background: rgba(42, 42, 58, 0.4);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 0; }
  .stat:nth-child(2)::after { display: none; }
}

/* ===== Features ===== */
.features {
  padding: 120px 0;
}

.features h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 64px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid rgba(42, 42, 58, 0.3);
  transition: border-color 0.3s, transform 0.3s;
}
.feature-card:hover {
  border-color: rgba(212, 164, 76, 0.2);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(212, 164, 76, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .features h2 { font-size: 2.25rem; }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ===== Sound ===== */
.sound {
  padding: 120px 0;
  background: var(--bg-card);
}

.sound h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.sound-desc {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 48px;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100px;
  margin-bottom: 48px;
  overflow: hidden;
}

.waveform-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
  transition: height 0.6s ease;
}

.audio-chain {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
}
.chain-arrow {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 1.125rem;
}

@media (max-width: 768px) {
  .sound h2 { font-size: 2.25rem; }
}

/* ===== Specs ===== */
.specs {
  padding: 120px 0;
}

.specs h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 64px;
}

.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 64px;
}

.spec-category {
  color: var(--accent);
  opacity: 0.7;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  margin-bottom: 16px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(20, 20, 31, 0.5);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.9375rem;
}
.spec-row span:first-child { color: var(--text-muted); }
.spec-row span:last-child { font-weight: 500; }

@media (max-width: 768px) {
  .specs-grid { grid-template-columns: 1fr; }
  .specs h2 { font-size: 2.25rem; }
}

/* ===== Open Source ===== */
.opensource {
  padding: 120px 0;
  background: var(--bg-card);
}

.opensource h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.oss-desc {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 48px;
}

.oss-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}

.code-block {
  background: #0D0D18;
  border-radius: 12px;
  border: 1px solid rgba(42, 42, 58, 0.4);
  padding: 20px 24px;
  overflow-x: auto;
}

.code-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.code-block pre {
  margin: 0;
  font-family: 'Source Code Pro', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #8A8AAA;
}
.code-block .comment { color: #5A5A7A; }
.code-block .preprocessor { color: #C47DD8; }

.oss-sidebar {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.oss-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.oss-stat-value {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
}
.oss-stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .oss-grid { grid-template-columns: 1fr; }
  .opensource h2 { font-size: 2.25rem; }
}

/* ===== CTA ===== */
.cta {
  position: relative;
  padding: 120px 0;
  text-align: center;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  width: 700px;
  height: 300px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(212, 164, 76, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner { position: relative; }

.cta h2 {
  font-size: 3.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta p {
  color: var(--text-muted);
  font-size: 1.25rem;
  margin-bottom: 40px;
}

.cta-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  max-width: 560px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.cta-form input {
  flex: 1;
  min-width: 240px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid rgba(42, 42, 58, 0.5);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Work Sans', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.cta-form input::placeholder { color: var(--text-dim); }
.cta-form input:focus { border-color: var(--accent); }

@media (max-width: 640px) {
  .cta h2 { font-size: 2.25rem; }
  .cta-form { flex-direction: column; }
  .cta-form input { min-width: 0; }
}

/* ===== Footer ===== */
.footer {
  background: #06060A;
  border-top: 1px solid rgba(42, 42, 58, 0.3);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .logo {
  display: block;
  margin-bottom: 8px;
}
.footer-brand p {
  color: var(--text-dim);
  font-size: 0.875rem;
}

.footer-col h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(42, 42, 58, 0.2);
}
.footer-bottom p {
  color: var(--text-dim);
  font-size: 0.8125rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
