/* landing.css — AudioPatch Landing Page
   Uses exact same color tokens as the app (styles.css).
   NO blue design surfaces. Accent #5c7cfa only for CTA + links. */

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

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-base: #090909;
  --bg-primary: #181818;
  --bg-secondary: #1c1c1c;
  --bg-surface: #0e0e0e;
  --bg-elevated: #1e1e1e;
  --text-primary: #e8e8e8;
  --text-secondary: #aaa;
  --text-tertiary: #777;
  --text-muted: #555;
  --border: #1f1f1f;
  --border-input: #333;
  --accent: #5c7cfa;
  --accent-hover: #748ffc;
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }
.section-alt { background: var(--bg-surface); }

/* ── Nav ───────────────────────────────────────── */
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(9, 9, 9, 0.85);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.landing-nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; letter-spacing: 2px;
  color: var(--text-primary); text-transform: uppercase;
}
.nav-logo img { width: 28px; height: 28px; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-link { font-size: 13px; font-weight: 500; color: var(--text-secondary); transition: color 0.2s; }
.nav-link:hover { color: var(--text-primary); }
.btn-app {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; background: var(--bg-elevated);
  border: 1px solid var(--border-input); color: var(--text-primary);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  font-family: var(--font); cursor: pointer; transition: background 0.2s;
}
.btn-app:hover { background: var(--border-input); color: #fff; }

/* ── Hero ──────────────────────────────────────── */
.hero { padding-top: 140px; padding-bottom: 60px; text-align: center; }
.hero-eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 44px); font-weight: 800; line-height: 1.25;
  color: var(--text-primary); max-width: 700px; margin: 0 auto 20px;
}
.hero-sub { font-size: 16px; color: var(--text-secondary); max-width: 560px; margin: 0 auto 32px; line-height: 1.7; }
.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 28px; background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  font-family: var(--font); cursor: pointer; transition: background 0.2s;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 28px; background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border-input); border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; font-family: var(--font); cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: var(--text-tertiary); color: var(--text-primary); }
.hero-screenshot {
  max-width: 960px; margin: 0 auto; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.hero-screenshot img { width: 100%; }

/* ── Features Grid ─────────────────────────────── */
.features-header { text-align: center; margin-bottom: 48px; }
.features-header h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; margin-bottom: 8px; }
.features-header p { color: var(--text-secondary); font-size: 15px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--border-input); }
.feature-card-body { padding: 24px 20px 16px; }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.feature-card-img { border-top: 1px solid var(--border); overflow: hidden; }
.feature-card-img img { width: 100%; display: block; transition: transform 0.3s; }
.feature-card:hover .feature-card-img img { transform: scale(1.02); }

/* ── Smart Import Showcase ────────────────── */
.import-showcase { padding: 56px 0; }
.import-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.import-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.import-showcase h2 {
  font-size: clamp(20px, 3vw, 26px); font-weight: 700;
  line-height: 1.3; margin-bottom: 10px;
}
.import-desc {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 20px;
}
.import-features-list {
  display: flex; flex-direction: column; gap: 0;
}
.import-feat {
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--border);
  transition: border-color 0.2s;
}
.import-feat:hover {
  border-left-color: var(--accent);
}
.import-feat strong {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 1px;
}
.import-feat p {
  font-size: 11px; color: var(--text-secondary);
  line-height: 1.5; margin: 0;
}
.import-screenshot {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.import-screenshot img { width: 100%; display: block; }

/* ── Product Tour — Interactive Hotspots ─────── */
.tour { text-align: center; }
.tour h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; margin-bottom: 8px; }
.tour-sub { color: var(--text-secondary); font-size: 15px; margin-bottom: 32px; }

.tour-hotspot-wrapper {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: visible;
}
.tour-hotspot-wrapper > img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

/* Pulsating hotspot dot */
.hotspot {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(92, 124, 250, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 10;
  box-shadow: 0 0 0 0 rgba(92, 124, 250, 0.6);
  animation: hotspotPulse 2s ease-in-out infinite;
  transition: transform 0.15s, background 0.15s;
}
.hotspot:hover {
  transform: translate(-50%, -50%) scale(1.3);
  background: rgba(116, 143, 252, 1);
  animation: none;
}

@keyframes hotspotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(92, 124, 250, 0.6); }
  50% { box-shadow: 0 0 0 10px rgba(92, 124, 250, 0); }
}

/* Hotspot popup */
.hotspot-popup {
  position: absolute;
  width: 280px;
  background: var(--bg-primary);
  border: 1px solid var(--border-input);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  z-index: 20;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}
.hotspot-popup.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.hotspot-popup-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.hotspot-popup-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Export Slideshow (smaller) ────────────────── */
.gallery h2 { text-align: center; font-size: clamp(24px, 4vw, 36px); font-weight: 700; margin-bottom: 12px; }
.gallery-sub { text-align: center; color: var(--text-secondary); font-size: 15px; margin-bottom: 40px; }

.export-slideshow { max-width: 480px; margin: 0 auto; }
.export-slide-wrapper {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  background: var(--bg-primary);
}
.export-slide { display: none; animation: slideFadeIn 0.35s ease; }
.export-slide.active { display: block; }
@keyframes slideFadeIn { from { opacity: 0; } to { opacity: 1; } }
.export-slide img { width: 100%; max-height: 360px; object-fit: contain; display: block; background: #fff; }
.export-slide-label {
  padding: 10px 16px; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); background: var(--bg-primary);
  border-top: 1px solid var(--border); text-align: center;
}
.export-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 16px; }
.export-btn {
  padding: 6px 14px; background: var(--bg-primary); border: 1px solid var(--border-input);
  border-radius: var(--radius-sm); color: var(--text-secondary);
  font-size: 12px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all 0.2s;
}
.export-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.export-dots { display: flex; gap: 8px; }
.export-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-input); cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.export-dot:hover { background: var(--text-tertiary); }
.export-dot.active { background: var(--accent); transform: scale(1.2); }
.export-counter { text-align: center; margin-top: 8px; font-size: 11px; color: var(--text-muted); font-family: 'SF Mono', 'Menlo', monospace; }

/* ── Consoles ──────────────────────────────────── */
.consoles h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; text-align: center; margin-bottom: 16px; }
.consoles-sub { text-align: center; color: var(--text-secondary); font-size: 14px; max-width: 700px; margin: 0 auto 28px; line-height: 1.6; }
.console-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.console-pill {
  padding: 6px 16px; background: var(--bg-primary);
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
}
.not-stageplot {
  max-width: 600px; margin: 0 auto; background: var(--bg-primary);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 32px; text-align: center;
}
.not-stageplot strong { display: block; font-size: 16px; margin-bottom: 10px; color: var(--text-primary); }
.not-stageplot p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* ── How to Start ──────────────────────────────── */
.howto h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; text-align: center; margin-bottom: 48px; }
.howto-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.howto-step {
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; text-align: center;
  display: flex; flex-direction: column;
}
.howto-step-num { font-size: 28px; font-weight: 800; color: var(--accent); padding: 20px 0 8px; }
.howto-step h3 { font-size: 14px; font-weight: 700; padding: 0 16px 4px; color: var(--text-primary); }
.howto-step p { font-size: 12px; color: var(--text-secondary); padding: 0 16px 12px; line-height: 1.5; flex: 1; }
.howto-step-img { border-top: 1px solid var(--border); overflow: hidden; height: 140px; flex-shrink: 0; }
.howto-step-img img { width: 100%; height: 140px; object-fit: cover; object-position: top left; display: block; }

/* ── FAQ ───────────────────────────────────────── */
.faq h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; text-align: center; margin-bottom: 40px; }
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--text-primary); user-select: none;
}
.faq-q:hover { background: var(--bg-elevated); }
.faq-q .chevron { transition: transform 0.2s; font-size: 12px; color: var(--text-tertiary); }
.faq-item.open .faq-q .chevron { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 20px 16px; font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.faq-item.open .faq-a { display: block; }

/* ── Changelog ─────────────────────────────────── */
.changelog h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; text-align: center; margin-bottom: 40px; }
#changelog-entries { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.cl-entry { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; }
.cl-entry-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.cl-entry-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.cl-entry-date { font-size: 11px; color: var(--accent); font-family: 'SF Mono', 'Menlo', monospace; }
.cl-entry ul { margin: 0; padding-left: 16px; font-size: 12px; color: var(--text-secondary); line-height: 1.7; }
.changelog-more { text-align: center; margin-top: 20px; }

/* ── CTA ───────────────────────────────────────── */
.cta { text-align: center; padding: 80px 0; }
.cta h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; margin-bottom: 24px; }
.cta .btn-primary { font-size: 16px; padding: 14px 36px; }
.cta-note { margin-top: 16px; font-size: 13px; color: var(--text-muted); }

/* ── Footer ────────────────────────────────────── */
.landing-footer { border-top: 1px solid var(--border); padding: 24px 0; }
.landing-footer .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-tertiary); letter-spacing: 1px;
}
.footer-brand img { width: 20px; height: 20px; opacity: 0.6; }
.footer-links { display: flex; gap: 20px; font-size: 12px; }
.footer-links a { color: var(--text-tertiary); }
.footer-links a:hover { color: var(--text-secondary); }
.footer-copy { font-size: 11px; color: var(--text-muted); }

/* ── Lightbox (Gallery Mode) ───────────────────── */
.lightbox-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  gap: 16px;
}
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }
.lightbox-content {
  display: flex; flex-direction: column; align-items: center;
  max-width: 92vw; max-height: 90vh;
}
.lightbox-content img {
  max-width: 92vw; max-height: 80vh; border-radius: var(--radius);
  box-shadow: 0 20px 80px rgba(0,0,0,0.6); object-fit: contain;
}
.lightbox-caption {
  margin-top: 12px; font-size: 13px; color: var(--text-secondary);
  text-align: center; max-width: 700px; line-height: 1.5;
}
.lightbox-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--text-muted);
  font-family: 'SF Mono', 'Menlo', monospace;
}
.lightbox-close {
  position: absolute; top: 20px; right: 28px; background: none; border: none;
  color: var(--text-secondary); font-size: 28px; cursor: pointer;
  transition: color 0.2s; z-index: 10000; line-height: 1;
}
.lightbox-close:hover { color: #fff; }
.lightbox-nav {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 36px; width: 48px; height: 48px;
  border-radius: 50%; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0; line-height: 1;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.18); transform: scale(1.1); }

/* ── Legal Modal ──────────────────────────────── */
.legal-modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9998;
  background: rgba(0, 0, 0, 0.8);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.legal-modal-overlay.active { opacity: 1; pointer-events: auto; }
.legal-modal {
  background: var(--bg-primary); border: 1px solid var(--border-input);
  border-radius: var(--radius); padding: 32px; max-width: 560px; width: 90vw;
  max-height: 80vh; overflow-y: auto; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.legal-modal h3 { margin: 0 0 16px; font-size: 18px; font-weight: 700; }
.legal-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.legal-tab {
  padding: 6px 14px; background: var(--bg-elevated); border: 1px solid var(--border-input);
  border-radius: var(--radius-sm); color: var(--text-secondary);
  font-size: 12px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all 0.2s;
}
.legal-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.legal-tab:hover:not(.active) { background: var(--border-input); color: var(--text-primary); }
.legal-content { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.legal-content strong { color: var(--text-primary); }
.legal-modal-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  color: var(--text-muted); font-size: 20px; cursor: pointer; line-height: 1;
}
.legal-modal-close:hover { color: var(--text-primary); }

/* ── Fade-in on scroll ─────────────────────────── */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Help Popup ────────────────────────────────── */
.help-popup-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9998;
  background: rgba(0, 0, 0, 0.8);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.help-popup-overlay.active { opacity: 1; pointer-events: auto; }
.help-popup {
  background: var(--bg-primary); border: 1px solid var(--border-input);
  border-radius: var(--radius); padding: 32px; max-width: 420px;
  text-align: center; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.help-popup h3 { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.help-popup p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.help-popup-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  color: var(--text-muted); font-size: 20px; cursor: pointer; line-height: 1;
}
.help-popup-close:hover { color: var(--text-primary); }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .howto-steps { grid-template-columns: repeat(2, 1fr); }
  .export-slideshow { max-width: 100%; }
  .hotspot { width: 16px; height: 16px; }
  .hotspot-popup { width: 220px; }
}

@media (max-width: 600px) {
  section { padding: 56px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .howto-steps { grid-template-columns: 1fr; }
  .hero { padding-top: 110px; }
  .hero h1 { font-size: 26px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .landing-footer .container { flex-direction: column; text-align: center; }
  .nav-link { display: none; }
  .hotspot { width: 14px; height: 14px; border-width: 1.5px; }
  .hotspot-popup { width: 200px; font-size: 11px; }
  .import-layout { grid-template-columns: 1fr; gap: 24px; }
  .import-screenshot { order: -1; }
}
