/* ═══════════════════════════════════════════════════════════
   Servo Scout - Marketing Website
   Design system: dark glass morphism matching the mobile app
   ═══════════════════════════════════════════════════════════ */

/* ── Self-hosted Inter (Latin only) ───────────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  --bg: #0f172a;
  --bg-elevated: #1e293b;
  --bg-card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #f1f5f9;
  --text-secondary: #b0bec9;
  --text-muted: rgba(255, 255, 255, 0.5);
  --primary: #3b82f6;
  --primary-shade: #2563eb;
  --accent: #53cf60;
  --accent-shade: #3fb34d;
  --danger: #ef4444;
  --warning: #fbbf24;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(16px);
  --radius: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container: 1120px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
ul { list-style: none; }

/* ── Typography ────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); }
p { color: var(--text-secondary); }

.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }

/* ── Layout ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
  position: relative;
}

@media (min-width: 768px) {
  section { padding: 100px 0; }
  .container { padding: 0 32px; }
}

@media (min-width: 1024px) {
  section { padding: 120px 0; }
}

/* ── Glass Card ────────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-shade);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.35);
}

.btn-accent {
  background: var(--accent);
  color: #0f172a;
}
.btn-accent:hover {
  background: var(--accent-shade);
  color: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(83, 207, 96, 0.3);
}

.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--text);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-pill {
  border-radius: var(--radius-pill);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Navigation ────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all var(--transition);
}

.nav.scrolled {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-brand:hover { color: var(--text); }

.nav-brand .brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

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

.nav-cta {
  padding: 10px 22px !important;
  font-size: 14px !important;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 767px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-elevated);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 24px;
    gap: 8px;
    transition: right var(--transition);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
  }

  .nav-links.open { right: 0; }

  .nav-links a {
    font-size: 16px;
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-cta {
    margin-top: 16px;
    width: 100%;
    text-align: center;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }
  .nav-overlay.open { display: block; }
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}

.hero-bg .orb-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -100px;
  right: -100px;
}

.hero-bg .orb-2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -80px;
  left: -80px;
}

.hero-bg .orb-3 {
  width: 300px;
  height: 300px;
  background: #8b5cf6;
  top: 40%;
  left: 50%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

.hero-content {
  text-align: center;
}

@media (min-width: 768px) {
  .hero-content { text-align: left; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(83, 207, 96, 0.12);
  border: 1px solid rgba(83, 207, 96, 0.25);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
}

@media (max-width: 767px) {
  .hero-subtitle { margin-inline: auto; }
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .hero-buttons { justify-content: center; }
}

.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-mockup {
  width: 280px;
  max-width: 100%;
  border-radius: 28px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
  background: var(--bg);
  aspect-ratio: 9 / 19.5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.phone-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-mockup-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px;
  text-align: center;
}

.phone-mockup-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.phone-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 12px;
  animation: bounce 2s ease infinite;
}

.scroll-hint svg { width: 20px; height: 20px; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ── How It Works ──────────────────────────────────────── */
.how-it-works { background: var(--bg); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header p {
  max-width: 600px;
  margin: 12px auto 0;
  font-size: 16px;
}

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

@media (min-width: 640px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
}

.step-card {
  text-align: center;
  padding: 32px 24px;
}

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-icon svg {
  width: 28px;
  height: 28px;
}

.step-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--primary); }
.step-icon.green { background: rgba(83, 207, 96, 0.15); color: var(--accent); }
.step-icon.amber { background: rgba(251, 191, 36, 0.15); color: var(--warning); }

.step-card h3 { margin-bottom: 8px; }
.step-card p { font-size: 14px; }

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* ── Features ──────────────────────────────────────────── */
.features {
  background: linear-gradient(180deg, var(--bg) 0%, #131d32 100%);
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 64px;
}

.feature-row:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  .feature-row { grid-template-columns: 1fr 1fr; gap: 48px; }
  .feature-row.reversed .feature-text { order: 2; }
  .feature-row.reversed .feature-visual { order: 1; }
}

.feature-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 8px;
}

.feature-text h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: 12px;
}

.feature-text p {
  font-size: 15px;
  line-height: 1.7;
}

.feature-visual {
  display: flex;
  justify-content: center;
}

.feature-screenshot {
  max-width: 320px;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--glass-bg);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Premium Teaser ────────────────────────────────────── */
.premium {
  background: var(--bg);
  position: relative;
}

.premium-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.premium-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a78bfa;
  margin-bottom: 16px;
}

.premium-card h2 { margin-bottom: 8px; }

.premium-card > p {
  font-size: 15px;
  margin-bottom: 28px;
}

.premium-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  text-align: left;
  margin-bottom: 28px;
}

@media (min-width: 480px) {
  .premium-features { grid-template-columns: 1fr 1fr; }
}

.premium-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.premium-feature svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.premium-price {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 12px;
}

.premium-price strong {
  color: var(--text);
  font-size: 20px;
}

/* ── Trust / Attribution ───────────────────────────────── */
.trust {
  background: linear-gradient(180deg, #131d32 0%, var(--bg) 100%);
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
}

.trust-stat {
  text-align: center;
  padding: 24px;
}

.trust-stat .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.trust-stat p {
  font-size: 14px;
}

.trust-attribution {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.trust-attribution p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Download CTA ──────────────────────────────────────── */
.download-cta {
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%);
  text-align: center;
}

.download-cta h2 { margin-bottom: 12px; }
.download-cta > .container > p { font-size: 16px; margin-bottom: 32px; }

.download-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
  background: #0a1120;
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-brand p {
  font-size: 14px;
  margin-top: 12px;
  max-width: 320px;
}

.footer-links h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 0;
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-bottom p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Legal Pages ───────────────────────────────────────── */
.legal-page {
  padding-top: 100px;
}

.legal-content {
  max-width: 780px;
  margin: 0 auto;
}

.legal-content h1 {
  margin-bottom: 8px;
}

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

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 36px;
  margin-bottom: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.legal-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.legal-content p,
.legal-content li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legal-content ul {
  padding-left: 24px;
  list-style: disc;
  margin-bottom: 16px;
}

.legal-content a { text-decoration: underline; }

.legal-content strong { color: var(--text); }

/* ── 404 Page ──────────────────────────────────────────── */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.error-page h1 {
  font-size: 6rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.error-page h2 {
  margin-bottom: 12px;
}

.error-page p {
  margin-bottom: 24px;
}

/* ── Pro Coming Soon ───────────────────────────────────── */
.pro-coming-soon {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 80px;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.pro-content {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.pro-content h1 {
  margin-bottom: 8px;
}

.pro-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.pro-content .premium-features {
  margin-bottom: 32px;
}

.pro-notify-text {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pro-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Deep Link Page ────────────────────────────────────── */
.deep-link-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.deep-link-card {
  max-width: 400px;
  padding: 40px 32px;
}

.deep-link-card h2 { margin-bottom: 8px; }
.deep-link-card p { margin-bottom: 24px; }

.spinner-ring {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ───────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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