/* ── VoicePrompt Design System ── */
:root {
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2333;
  --bg-input: #0f3460;
  --accent: #e94560;
  --accent-hover: #d63851;
  --accent-glow: rgba(233, 69, 96, 0.3);
  --green: #4ecca3;
  --green-glow: rgba(78, 204, 163, 0.3);
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-faint: #484f58;
  --border: #30363d;
  --radius: 10px;
  --max-width: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

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

.btn-green {
  background: var(--green);
  color: #000;
  box-shadow: 0 0 20px var(--green-glow);
}
.btn-green:hover { background: #5dd8af; transform: translateY(-1px); }

.btn-lg { padding: 16px 32px; font-size: 17px; border-radius: 12px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ── Hero ── */
.hero {
  padding: 140px 0 80px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(233, 69, 96, 0.1);
  border: 1px solid rgba(233, 69, 96, 0.3);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), #ff8a80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-preview {
  margin-top: 60px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.hero-preview-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.hero-preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-faint);
}
.hero-preview-body {
  padding: 30px 40px;
  font-size: 22px;
  line-height: 1.8;
  text-align: left;
  min-height: 180px;
}
.hero-preview-body .word-dim { color: #444; }
.hero-preview-body .word-spoken { color: #555; }
.hero-preview-body .word-active { color: var(--accent); background: rgba(233,69,96,0.15); border-radius: 3px; padding: 1px 2px; }
.hero-preview-body .word-current { color: #fff; }
.hero-preview-body .word-future { color: #666; }

/* ── How it works ── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 48px;
}
.step {
  text-align: center;
  padding: 32px 24px;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(233, 69, 96, 0.1);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 15px; }

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-icon { font-size: 28px; margin-bottom: 12px; display: block; }
.feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 14px; line-height: 1.5; }

/* ── Comparison Table ── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 48px;
  font-size: 15px;
}
.comparison-table th,
.comparison-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.comparison-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.comparison-table td:first-child { font-weight: 500; }
.comparison-table .check { color: var(--green); font-weight: 700; }
.comparison-table .cross { color: var(--text-faint); }
.comparison-table .highlight-col {
  background: rgba(233, 69, 96, 0.05);
  border-left: 2px solid var(--accent);
}

/* ── Pricing ── */
.pricing-card {
  max-width: 420px;
  margin: 48px auto 0;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 40px var(--accent-glow);
}
.pricing-card .price {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  margin: 16px 0 4px;
}
.pricing-card .price-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
}
.pricing-card .price-sub s { color: var(--text-faint); }
.pricing-features {
  text-align: left;
  margin: 24px 0;
  list-style: none;
}
.pricing-features li {
  padding: 8px 0;
  font-size: 15px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pricing-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  font-size: 16px;
}

/* ── FAQ ── */
.faq-list { max-width: 700px; margin: 48px auto 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-q {
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-q::after { content: '+'; color: var(--text-muted); font-size: 20px; transition: transform 0.2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s, padding 0.3s;
}
.faq-item.open .faq-a { max-height: 200px; padding-top: 12px; }

/* ── Section headings ── */
.section-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 17px;
  max-width: 550px;
  margin: 0 auto;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}
.footer a { color: var(--text-muted); }

/* ── Success page ── */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.success-box {
  max-width: 520px;
}
.success-icon { font-size: 64px; margin-bottom: 24px; display: block; }
.success-box h1 { font-size: 36px; margin-bottom: 12px; }
.success-box p { color: var(--text-muted); font-size: 17px; margin-bottom: 32px; }
.success-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Demo banner ── */
.demo-banner {
  background: linear-gradient(90deg, var(--accent), #ff6b6b);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.demo-banner a { color: #fff; text-decoration: underline; }

/* ── App layout (teleprompter pages) ── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.app-sidebar {
  width: 380px;
  min-width: 380px;
  background: #16213e;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.app-sidebar h2 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-sidebar h2 span { color: var(--accent); }
.app-sidebar label { font-size: 13px; color: var(--text-muted); }
.app-sidebar textarea {
  width: 100%;
  flex: 1;
  min-height: 150px;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  font-family: inherit;
}
.app-sidebar textarea:focus { outline: none; border-color: var(--accent); }
.app-main {
  flex: 1;
  background: #000;
  display: flex;
  flex-direction: column;
}
.app-main-header {
  padding: 8px 16px;
  background: #111;
  font-size: 12px;
  color: #666;
  display: flex;
  justify-content: space-between;
}
.app-main-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20vh 60px 40vh 60px;
}
.app-main-text {
  max-width: 900px;
  margin: 0 auto;
}

.control-row { display: flex; align-items: center; gap: 10px; }
.control-row label { white-space: nowrap; font-size: 13px; color: var(--text-muted); }
.control-row input[type=range] { flex: 1; }
.control-row span { min-width: 40px; text-align: right; font-size: 14px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.voice-status {
  font-size: 12px;
  padding: 8px;
  border-radius: 4px;
  background: var(--bg-input);
  line-height: 1.4;
}
.voice-status.listening { background: #1b4332; color: var(--green); }
.voice-status.error { background: #4a1a1a; color: var(--accent); }

/* Teleprompter word styles */
.app-main-text .word {
  display: inline;
  transition: color 0.25s, background 0.25s;
  color: #555;
  line-height: 1.8;
  padding: 2px 0;
}
.app-main-text .word.upcoming { color: #999; }
.app-main-text .word.active-sentence { color: #fff; }
.app-main-text .word.spoken-word { color: var(--accent); background: rgba(233,69,96,0.15); border-radius: 3px; }
.app-main-text .word.spoken { color: #555; }
.app-main-text .para-break { display: block; height: 0.8em; }

/* Mirror */
.app-main.mirrored .app-main-scroll { transform: scaleX(-1); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 120px 0 60px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-preview-body { font-size: 16px; padding: 20px; }
  .nav-links a.hide-mobile { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .comparison-table { font-size: 13px; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; }
  .pricing-card { margin: 48px 16px 0; }
}
