:root {
  --bg: #0e0e1a;
  --bg-alt: #14142a;
  --fg: #f5f0e8;
  --fg-muted: #8a8799;
  --accent: #e8a838;
  --accent-dim: #c4892a;
  --card-bg: #1a1a30;
  --card-border: rgba(255,255,255,0.07);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-alt);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 2rem;
  background: rgba(14,14,26,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo-tag {
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(232,168,56,0.12);
  border: 1px solid rgba(232,168,56,0.25);
  border-radius: 20px;
  padding: 0.15rem 0.6rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(232,168,56,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}
.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  max-width: 460px;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid rgba(232,168,56,0.3);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  letter-spacing: 0.02em;
}

/* PHONE FRAME */
.hero-right {
  display: flex;
  justify-content: center;
}
.phone-frame {
  width: 280px;
  height: 580px;
  background: #111127;
  border-radius: 38px;
  border: 2px solid rgba(255,255,255,0.1);
  padding: 14px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 40px 80px rgba(0,0,0,0.5),
    0 0 60px rgba(232,168,56,0.08);
  position: relative;
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #111127;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: #0d0d22;
  border-radius: 28px;
  padding: 36px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.screen-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.screen-badge {
  font-size: 0.55rem;
  font-weight: 600;
  color: #22c55e;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 10px;
  padding: 0.1rem 0.5rem;
  letter-spacing: 0.06em;
}

/* WAVEFORM */
.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 70px;
  padding: 8px 0;
}
.wave-bar {
  flex: 1;
  background: linear-gradient(to top, var(--accent) 0%, var(--accent-dim) 100%);
  border-radius: 3px;
  min-height: 4px;
  animation: wave 1.4s ease-in-out infinite;
}
.wave-bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.wave-bar:nth-child(2) { height: 55%; animation-delay: 0.08s; }
.wave-bar:nth-child(3) { height: 80%; animation-delay: 0.16s; }
.wave-bar:nth-child(4) { height: 45%; animation-delay: 0.24s; }
.wave-bar:nth-child(5) { height: 95%; animation-delay: 0.32s; }
.wave-bar:nth-child(6) { height: 70%; animation-delay: 0.4s; }
.wave-bar:nth-child(7) { height: 60%; animation-delay: 0.48s; }
.wave-bar:nth-child(8) { height: 88%; animation-delay: 0.56s; }
.wave-bar:nth-child(9) { height: 50%; animation-delay: 0.64s; }
.wave-bar:nth-child(10) { height: 72%; animation-delay: 0.72s; }
.wave-bar:nth-child(11) { height: 40%; animation-delay: 0.8s; }
.wave-bar:nth-child(12) { height: 90%; animation-delay: 0.88s; }
.wave-bar:nth-child(13) { height: 60%; animation-delay: 0.96s; }
.wave-bar:nth-child(14) { height: 75%; animation-delay: 1.04s; }
.wave-bar:nth-child(15) { height: 48%; animation-delay: 1.12s; }
.wave-bar:nth-child(16) { height: 65%; animation-delay: 1.2s; }
.wave-bar:nth-child(17) { height: 85%; animation-delay: 1.28s; }
.wave-bar:nth-child(18) { height: 55%; animation-delay: 1.36s; }
.wave-bar:nth-child(19) { height: 38%; animation-delay: 1.44s; }
.wave-bar:nth-child(20) { height: 62%; animation-delay: 1.52s; }

@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.5); }
}

.episode-info {
  margin-top: 4px;
}
.episode-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
  margin-bottom: 2px;
}
.episode-meta {
  font-size: 0.65rem;
  color: var(--fg-muted);
}

/* CONTROLS */
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.ctrl-btn {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  flex-shrink: 0;
  cursor: pointer;
}
.progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}
.time-label {
  font-size: 0.65rem;
  color: var(--fg-muted);
  flex-shrink: 0;
  min-width: 28px;
}

/* TOPIC INPUT SECTION */
.topic-section {
  padding: 6rem 2rem;
  background: var(--bg-alt);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.topic-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.input-frame {
  display: flex;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.topic-input {
  flex: 1;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--fg-muted);
  cursor: text;
}
.generate-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  border: none;
  color: var(--bg);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 0 12px 12px 0;
}
.generate-btn:hover { background: var(--accent-dim); }
.suggestion-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.suggestion-label {
  font-size: 0.75rem;
  color: var(--fg-muted);
}
.suggestion-chip {
  font-size: 0.75rem;
  color: var(--fg-muted);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
}
.suggestion-chip:hover {
  background: rgba(232,168,56,0.1);
  border-color: rgba(232,168,56,0.3);
  color: var(--fg);
}

/* EPISODES SECTION */
.episodes-section {
  padding: 7rem 2rem;
}
.episodes-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.episodes-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 3rem;
  line-height: 1.2;
}
.episodes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.episode-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.episode-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.card-art {
  height: 130px;
  position: relative;
  overflow: hidden;
}
.art-1 {
  background: linear-gradient(135deg, #1a4a3a 0%, #0d2e23 100%);
}
.art-1::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(34,197,94,0.2) 0%, transparent 60%);
}
.art-2 {
  background: linear-gradient(135deg, #3d2a0f 0%, #241a08 100%);
}
.art-2::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(234,88,28,0.2) 0%, transparent 60%);
}
.art-3 {
  background: linear-gradient(135deg, #1a2a4a 0%, #0d1a2e 100%);
}
.art-3::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(56,189,248,0.2) 0%, transparent 60%);
}
.art-4 {
  background: linear-gradient(135deg, #2a1a4a 0%, #1a0d2e 100%);
}
.art-4::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(168,85,247,0.2) 0%, transparent 60%);
}
.card-body { padding: 1.25rem; }
.card-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.card-desc {
  font-size: 0.8rem;
  color: var(--fg-muted);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}
.card-meta {
  font-size: 0.7rem;
  color: var(--fg-muted);
  opacity: 0.7;
}

/* HOW IT WORKS */
.how-section {
  padding: 7rem 2rem;
  background: var(--bg-alt);
  border-top: 1px solid rgba(255,255,255,0.04);
}
.how-inner {
  max-width: 900px;
  margin: 0 auto;
}
.how-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 4rem;
  line-height: 1.2;
}
.steps {
  display: flex;
  align-items: center;
  gap: 0;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex: 1;
}
.step-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.35;
  line-height: 1;
  flex-shrink: 0;
}
.step-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.35rem;
}
.step-desc {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.6;
}
.step-connector {
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, rgba(232,168,56,0.4), rgba(232,168,56,0.1));
  flex-shrink: 0;
  margin: 0 1rem;
  margin-top: 1.4rem;
}

/* CLOSING */
.closing {
  padding: 8rem 2rem;
  text-align: center;
}
.closing-inner {
  max-width: 800px;
  margin: 0 auto;
}
.closing-art {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}
.closing-wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
}
.closing-bar {
  width: 5px;
  border-radius: 4px;
  background: var(--accent);
  opacity: 0.6;
  animation: closing-wave 1.8s ease-in-out infinite;
}
.closing-bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.closing-bar:nth-child(2) { height: 50%; animation-delay: 0.12s; }
.closing-bar:nth-child(3) { height: 80%; animation-delay: 0.24s; }
.closing-bar:nth-child(4) { height: 60%; animation-delay: 0.36s; }
.closing-bar:nth-child(5) { height: 100%; animation-delay: 0.48s; }
.closing-bar:nth-child(6) { height: 70%; animation-delay: 0.6s; }
.closing-bar:nth-child(7) { height: 90%; animation-delay: 0.72s; }
.closing-bar:nth-child(8) { height: 55%; animation-delay: 0.84s; }
.closing-bar:nth-child(9) { height: 75%; animation-delay: 0.96s; }
.closing-bar:nth-child(10) { height: 45%; animation-delay: 1.08s; }
.closing-bar:nth-child(11) { height: 65%; animation-delay: 1.2s; }
.closing-bar:nth-child(12) { height: 85%; animation-delay: 1.32s; }
.closing-bar:nth-child(13) { height: 50%; animation-delay: 1.44s; }
.closing-bar:nth-child(14) { height: 70%; animation-delay: 1.56s; }
.closing-bar:nth-child(15) { height: 40%; animation-delay: 1.68s; }

@keyframes closing-wave {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(0.55); opacity: 0.3; }
}

.closing-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-style: italic;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}
.closing-body {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* FOOTER */
.footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 3rem 2rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
}
.footer-note {
  font-size: 0.78rem;
  color: var(--fg-muted);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}
.footer-links a {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--fg); }
.footer-sep { color: rgba(255,255,255,0.15); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero {
    padding: 7rem 1.5rem 4rem;
    min-height: auto;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-right {
    order: -1;
  }
  .phone-frame {
    width: 240px;
    height: 500px;
  }
  .hero-headline {
    font-size: 2.2rem;
  }
  .episodes-grid {
    grid-template-columns: 1fr;
  }
  .steps {
    flex-direction: column;
    gap: 2rem;
  }
  .step-connector {
    display: none;
  }
  .step {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .phone-frame {
    width: 200px;
    height: 420px;
  }
  .phone-screen {
    padding: 30px 12px 16px;
  }
  .episodes-section, .how-section, .closing {
    padding: 5rem 1.5rem;
  }
}