/* ============================================================
   AUMAGE — See What You Hear
   Dark theme, Hyperfuturist Fluid aesthetic
   Mobile-first responsive design
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #06060e;
  --bg-secondary: #0d0d1a;
  --bg-card: #12122a;
  --bg-card-hover: #1a1a3a;
  --accent: #6366f1;
  --accent-glow: #818cf8;
  --accent-secondary: #a78bfa;
  --text-primary: #f0f0f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border: #1f1f3a;
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- SECTIONS --- */
.section { padding: 4rem 1.5rem; max-width: 1100px; margin: 0 auto; }
.hidden { display: none !important; }

/* --- HERO --- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title { margin-bottom: 0.5rem; }

.brand {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.5rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: white;
  box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(99,102,241,0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--accent); }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--text-primary); }

.btn-danger { background: var(--danger); color: white; }
.btn-large { padding: 1rem 2.5rem; font-size: 1.15rem; border-radius: var(--radius-lg); }
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

/* --- INPUT METHODS --- */
.input-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.input-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}
.input-card:hover { border-color: var(--accent); background: var(--bg-card-hover); }

.input-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.input-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.input-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }

/* --- DROP ZONE --- */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  cursor: pointer;
  transition: all var(--transition);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(99,102,241,0.05);
}
.drop-zone p { color: var(--text-muted); font-size: 0.9rem; }

/* --- TEXT INPUT --- */
.text-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  outline: none;
  transition: border var(--transition);
}
.text-input:focus { border-color: var(--accent); }
.text-input::placeholder { color: var(--text-muted); }

/* --- WAVEFORM --- */
#waveform-canvas {
  width: 100%;
  max-width: 400px;
  height: 80px;
  border-radius: var(--radius);
  background: var(--bg-primary);
  margin: 1rem auto;
  display: block;
}

#record-timer {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 1.2rem;
  color: var(--accent-glow);
  margin: 0.5rem 0;
}

/* --- MODE SELECTOR --- */
.mode-selector {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.mode-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-primary);
  font-family: inherit;
}
.mode-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.mode-card.selected {
  border-color: var(--accent);
  background: rgba(99,102,241,0.1);
  box-shadow: 0 0 30px rgba(99,102,241,0.2);
}
.mode-card h3 { font-size: 1.3rem; margin-bottom: 0.3rem; }
.mode-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* --- GENERATION PROGRESS --- */
.progress-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}
.progress-text {
  font-size: 1.1rem;
  color: var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* --- REVEAL --- */
#reveal-canvas {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 0 auto;
  display: block;
}

/* --- RESULT --- */
.result-container { text-align: center; margin-bottom: 2rem; }

.result-image {
  width: 100%;
  max-width: 600px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(99,102,241,0.2);
}

.mode-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 50px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-glow);
  margin-top: 1rem;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* --- HOW IT WORKS --- */
.how-it-works { text-align: center; }
.how-it-works h2 { margin-bottom: 2.5rem; font-size: 2rem; }

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.step-number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.step-card h3 { margin-bottom: 0.5rem; }
.step-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* --- GALLERY --- */
.examples { text-align: center; }
.examples h2 { margin-bottom: 2rem; font-size: 2rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.gallery-image {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg-card-hover), var(--bg-primary));
}

.gallery-label {
  display: block;
  padding: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.gallery-mode {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  background: rgba(6,6,14,0.8);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-glow);
}

/* --- FOOTER --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.brand-small {
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-by { color: var(--text-muted); }

/* --- HEADINGS --- */
h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* ============================================================
   RESPONSIVE — TABLET+
   ============================================================ */
@media (min-width: 640px) {
  .input-methods { grid-template-columns: repeat(3, 1fr); }
  .mode-selector { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .brand { font-size: 5rem; }
}

@media (min-width: 1024px) {
  .section { padding: 5rem 2rem; }
  .hero { min-height: 85vh; }
}
