/* DearMaps Landing Page — style.css */
/* Dark-first, responsive, glass aesthetic */

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

:root {
  --color-bg: #0a0a0f;
  --color-bg-alt: #111118;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-surface-hover: rgba(255, 255, 255, 0.08);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #f0f0f5;
  --color-text-secondary: #9898a8;
  --color-text-muted: #6a6a78;
  --color-accent-start: #5b7fff;
  --color-accent-end: #a855f7;
  --color-accent: #7b6bff;
  --color-accent-glow: rgba(123, 107, 255, 0.25);
  --color-glass: rgba(255, 255, 255, 0.05);
  --color-glass-border: rgba(255, 255, 255, 0.1);
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --max-width: 1120px;
  --section-padding: clamp(4rem, 10vw, 8rem) clamp(1.25rem, 5vw, 2rem);
}

@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #f5f5fa;
    --color-bg-alt: #eeeef4;
    --color-surface: rgba(0, 0, 0, 0.03);
    --color-surface-hover: rgba(0, 0, 0, 0.06);
    --color-border: rgba(0, 0, 0, 0.08);
    --color-text: #1a1a2e;
    --color-text-secondary: #555568;
    --color-text-muted: #8888a0;
    --color-glass: rgba(255, 255, 255, 0.6);
    --color-glass-border: rgba(0, 0, 0, 0.08);
    --color-accent-glow: rgba(123, 107, 255, 0.15);
  }
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

a:hover {
  opacity: 0.8;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Typography ──────────────────────────────────────────── */
.headline-hero {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.headline-section {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 560px;
}

.label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

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

section {
  padding: var(--section-padding);
}

/* ── Glass Card ──────────────────────────────────────────── */
.glass {
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.glass-sm {
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Gradient Text ───────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Navigation ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem clamp(1.25rem, 5vw, 2rem);
  transition: background 0.3s, border-color 0.3s;
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.85);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

@media (prefers-color-scheme: light) {
  .nav.scrolled {
    background: rgba(245, 245, 250, 0.85);
  }
}

.nav-inner,
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

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

.nav-links a:hover {
  color: var(--color-text);
  opacity: 1;
}

/* Support both div-with-links and ul-li-a nav patterns */
.nav-links li {
  list-style: none;
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
}

/* ── Section Headers (shared) ────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 560px;
  margin: 1rem auto 0;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem clamp(1.25rem, 5vw, 2rem) 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    var(--color-accent-glow) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  border-radius: 999px;
  border: 1px solid var(--color-glass-border);
  background: var(--color-glass);
}

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero .subtitle,
.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
}

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

.app-store-badge:hover {
  transform: scale(1.04);
  opacity: 1;
}

.app-store-badge svg {
  height: 48px;
  width: auto;
}

/* Phone mockup */
.hero-mockup {
  margin-top: 2.5rem;
  width: min(320px, 80vw);
  aspect-ratio: 9 / 19.5;
  border-radius: 36px;
  border: 3px solid var(--color-glass-border);
  background: var(--color-bg-alt);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 30px 80px -20px rgba(0, 0, 0, 0.5),
    0 0 120px var(--color-accent-glow);
}

.hero-mockup-inner {
  position: absolute;
  inset: 8px;
  border-radius: 30px;
  background: linear-gradient(
    170deg,
    #1a1a2e 0%,
    #0f0f1a 50%,
    #1a1028 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  overflow: hidden;
}

.mockup-map-dots {
  position: absolute;
  inset: 0;
  opacity: 0.3;
}

.mockup-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent-glow);
}

.mockup-dot:nth-child(1) { top: 25%; left: 30%; }
.mockup-dot:nth-child(2) { top: 40%; left: 65%; }
.mockup-dot:nth-child(3) { top: 55%; left: 40%; }
.mockup-dot:nth-child(4) { top: 35%; left: 50%; }
.mockup-dot:nth-child(5) { top: 65%; left: 25%; }
.mockup-dot:nth-child(6) { top: 50%; left: 70%; }
.mockup-dot:nth-child(7) { top: 30%; left: 80%; }

.mockup-pin-icon {
  position: relative;
  z-index: 1;
  font-size: 3rem;
  opacity: 0.15;
}

.mockup-pin {
  position: relative;
  z-index: 1;
  opacity: 0.2;
}

/* ── Features ────────────────────────────────────────────── */
.features {
  background: var(--color-bg-alt);
}

.features-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.features-header .subtitle {
  margin: 1rem auto 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  padding: 2rem 1.75rem;
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.2s, border-color 0.2s;
}

.feature-card:hover {
  background: var(--color-surface-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px var(--color-accent-glow);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 650;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ── Privacy ─────────────────────────────────────────────── */
.privacy-section {
  position: relative;
}

.privacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .privacy-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.privacy-points {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.privacy-point {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.privacy-point-icon,
.privacy-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.privacy-point h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.privacy-point p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.privacy-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.privacy-shield {
  width: 200px;
  height: 240px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.privacy-shield-bg {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    135deg,
    rgba(91, 127, 255, 0.1),
    rgba(168, 85, 247, 0.1)
  );
  border: 1px solid var(--color-glass-border);
}

.privacy-shield-icon {
  font-size: 5rem;
  position: relative;
  z-index: 1;
  opacity: 0.85;
}

.privacy-shield::after,
.privacy-shield-glow {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: var(--radius-lg);
  background: radial-gradient(
    circle,
    var(--color-accent-glow) 0%,
    transparent 70%
  );
  z-index: 0;
}

/* ── Pricing ─────────────────────────────────────────────── */
.pricing {
  background: var(--color-bg-alt);
}

.pricing-header {
  text-align: center;
  margin-bottom: 3rem;
}

.pricing-header .subtitle {
  margin: 1rem auto 0;
}

.pricing-cards,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  padding: 2rem 1.75rem;
  text-align: center;
  position: relative;
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.2s;
}

.pricing-card.featured {
  border-color: var(--color-accent);
  box-shadow: 0 0 40px var(--color-accent-glow);
}

.pricing-card.featured::before {
  content: "Best Value";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-period {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* When pricing-period is used as a standalone header */
.pricing-card > .pricing-period {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* When pricing-period is used inline within pricing-amount */
.pricing-amount .pricing-period {
  font-size: 1rem;
  vertical-align: baseline;
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.pricing-amount .currency {
  font-size: 1.25rem;
  vertical-align: super;
  font-weight: 600;
}

.pricing-note,
.pricing-description {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.pricing-card-header {
  margin-bottom: 1.5rem;
}

.pricing-card-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.pricing-currency {
  font-size: 1.25rem;
  vertical-align: super;
  font-weight: 600;
}

.pricing-value {
  font-size: 2.5rem;
  font-weight: 700;
}

.pricing-features {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pricing-features li {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-free {
  text-align: center;
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-free p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

.pricing-free strong {
  color: var(--color-text);
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 3rem clamp(1.25rem, 5vw, 2rem);
}

.footer-inner,
.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  max-width: 280px;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-col h4,
.footer-column h5 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.footer-col ul,
.footer-column {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a,
.footer-column a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col a:hover,
.footer-column a:hover {
  color: var(--color-text);
  opacity: 1;
}

.footer-bottom {
  width: 100%;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

@media (max-width: 640px) {
  .footer-inner,
  .footer-content {
    flex-direction: column;
  }
  .footer-links {
    flex-direction: column;
    gap: 1.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Footer brand - support both h4 and span patterns */
.footer-brand h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

/* ── Subpage Styles ──────────────────────────────────────── */
.subpage {
  padding: 8rem clamp(1.25rem, 5vw, 2rem) 4rem;
  min-height: 80vh;
}

.subpage-content {
  max-width: 720px;
  margin: 0 auto;
}

.subpage-content h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.subpage-content .last-updated {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
}

.subpage-content h2 {
  font-size: 1.35rem;
  font-weight: 650;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.subpage-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.subpage-content p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.subpage-content ul,
.subpage-content ol {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.subpage-content li {
  margin-bottom: 0.4rem;
}

.subpage-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* Support form card */
.support-card {
  padding: 2.5rem;
  margin-top: 2rem;
}

.support-card p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.support-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
  color: #fff !important;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none !important;
}

.support-email-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--color-accent-glow);
  opacity: 1;
}

/* ── Animations ──────────────────────────────────────────── */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-in.delay-1 { transition-delay: 0.1s; }
.animate-in.delay-2 { transition-delay: 0.2s; }
.animate-in.delay-3 { transition-delay: 0.3s; }
.animate-in.delay-4 { transition-delay: 0.4s; }

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.mockup-dot {
  animation: pulse-glow 3s ease-in-out infinite;
}

.mockup-dot:nth-child(2) { animation-delay: 0.5s; }
.mockup-dot:nth-child(3) { animation-delay: 1s; }
.mockup-dot:nth-child(4) { animation-delay: 1.5s; }
.mockup-dot:nth-child(5) { animation-delay: 2s; }
.mockup-dot:nth-child(6) { animation-delay: 0.3s; }
.mockup-dot:nth-child(7) { animation-delay: 1.2s; }
