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

:root {
  --bg: #121212;
  --bg-card: #1e1e1e;
  --bg-card-hover: #252525;
  /* SongDrop's brand orange, from `src/constants/theme.ts` → Gradient.via. */
  --primary: #FFA24B;
  --primary-hover: #FFBB78;
  --text: #f0f0f0;
  --text-secondary: #a8a8a8;
  --text-muted: #8a8a8a;
  --border: #2a2a2a;
  --radius: 12px;
  --max-width: 1100px;

  /* The app's three-stop gradient, used for the wordmark and the step markers. */
  --brand-gradient: linear-gradient(135deg, #FF7A6E 0%, #FFA24B 52%, #FFD75E 100%);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--bg-card);
  color: var(--text);
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.page-content {
  padding-top: 100px;
  padding-bottom: 80px;
}

/* ===== Hero ===== */
.hero {
  padding: 140px 24px 80px;
  text-align: center;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-icon {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  margin: 0 auto 28px;
  box-shadow: 0 8px 32px rgba(255, 162, 75, 0.22);
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* Laid out as a row so a second badge can be added back beside the first
   without changing anything here. Google Play is not shipped yet; when it is,
   its PNG needs `height: 80px; margin: -13px` rather than 54px, because
   Google's artwork sits on a canvas with 41px of transparent padding on every
   side while Apple's SVG has none. */
.store-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-store-badge {
  display: inline-block;
  transition: transform 0.2s, opacity 0.2s;
}

.app-store-badge:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.app-store-badge img {
  height: 54px;
}

/* A store link with no URL configured yet. Kept in the layout so the page does
   not silently lose its download button — see `js/main.js`. */
.store-badges a[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* ===== Features ===== */
.features {
  padding: 80px 24px;
}

.features-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.5px;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: background 0.2s, transform 0.2s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 162, 75, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 22px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== How It Works ===== */
.how-it-works {
  padding: 80px 24px;
}

.how-it-works-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.step {
  text-align: center;
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #3B1A0F;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== CTA ===== */
.cta {
  padding: 80px 24px;
  text-align: center;
}

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 52px 40px;
}

.cta h2 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 16px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--text);
}

/* ===== Legal Pages ===== */
.legal {
  max-width: 760px;
  margin: 0 auto;
}

.legal h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.legal .last-updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
}

.legal h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.legal ul,
.legal ol {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.8;
}

.legal li {
  margin-bottom: 4px;
}

.legal a {
  color: var(--primary);
}

.legal strong {
  color: var(--text);
  font-weight: 600;
}

/* ===== Contact Page ===== */
.contact-section {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-section h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-section .subtitle {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 48px;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 162, 75, 0.1);
  border: 1px solid rgba(255, 162, 75, 0.25);
  border-radius: 8px;
  padding: 12px 20px;
  color: var(--primary);
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s;
}

.contact-email:hover {
  background: rgba(255, 162, 75, 0.18);
  color: var(--primary-hover);
}

.contact-note {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-top: 40px;
  text-align: left;
}

.contact-note strong {
  color: var(--text);
}

/* ===== Unconfigured values =====
   Anything still blank in `js/main.js` renders as a loud marker rather than an
   empty gap, so a placeholder can never be published by accident. This mirrors
   the app, where an empty Terms URL disables the button instead of shipping a
   dead link (`src/app/(tabs)/settings.tsx`). */
.todo {
  display: inline;
  background: rgba(192, 52, 43, 0.16);
  border-bottom: 2px solid #F08279;
  color: #F08279;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
}

[hidden] { display: none !important; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .hero {
    padding: 120px 20px 60px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 17px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .section-title {
    font-size: 28px;
  }

  .cta-inner {
    padding: 36px 24px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .legal h1 {
    font-size: 28px;
  }

  .contact-section h1 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 30px;
  }

  .hero-icon {
    width: 80px;
    height: 80px;
  }
}
