/* ===== MileGuard Website ===== */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-deep: #F0F2F5;
  --bg-primary: #E8EBF0;
  --bg-elevated: #FFFFFF;
  --bg-surface: #E0E4EB;
  --accent: #16A34A;
  --accent-dark: #15803D;
  --accent-glow: rgba(22, 163, 74, 0.08);
  --accent-strong: rgba(22, 163, 74, 0.15);
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.12);
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Outfit', -apple-system, sans-serif;
  --nav-h: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

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

/* ── Utilities ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-body);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(240, 242, 245, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
}
.nav-logo .logo-icon img {
  width: 100%;
  height: 100%;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 100px;
  transition: background 0.25s, transform 0.25s;
}
.nav-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.nav-mobile.active {
  opacity: 1;
  pointer-events: auto;
}
.nav-mobile a {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.25s;
}
.nav-mobile a:hover { color: var(--text-primary); }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 100px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.05) 0%, transparent 65%);
  top: -250px;
  right: -200px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}
.hero-text { max-width: 560px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 8px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 28px;
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero-title {
  font-family: var(--font-body);
  font-size: clamp(2.8rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero-title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 480px;
}
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* App Store Button */
.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: #0F172A;
  color: #FFFFFF;
  border-radius: 14px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.app-store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}
.app-store-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.app-store-btn .btn-text { text-align: left; }
.app-store-btn .btn-text span:first-child {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.7;
  line-height: 1.2;
}
.app-store-btn .btn-text span:last-child {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
}

/* Secondary CTA */
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.25s, gap 0.25s;
}
.hero-link:hover { color: var(--accent); gap: 12px; }
.hero-link svg { width: 18px; height: 18px; }

/* Hero Phone */
.hero-phone-wrapper {
  display: flex;
  justify-content: center;
  position: relative;
}
.hero-phone-wrapper::before {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.08), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(60px);
  pointer-events: none;
}

/* ── Phone Mockup ── */
.phone {
  position: relative;
  width: 260px;
  height: 530px;
  background: #1C1C1E;
  border-radius: 42px;
  border: 2.5px solid #2C2C2E;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  flex-shrink: 0;
}
.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #000;
  border-radius: 14px;
  z-index: 10;
}
.phone-screen {
  position: absolute;
  inset: 4px;
  border-radius: 38px;
  overflow: hidden;
  background: #0C1117;
}

/* ── Phone Screen: Real Screenshots ── */
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ── Features Grid ── */
.features {
  padding: 120px 0;
  position: relative;
  background: var(--bg-primary);
}
.features-header {
  text-align: center;
  margin-bottom: 64px;
}
.features-header .section-subtitle {
  margin: 0 auto;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-glow);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Showcase Sections ── */
.showcase {
  padding: 100px 0;
}
.showcase-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}
.showcase--reverse .showcase-inner {
  direction: rtl;
}
.showcase--reverse .showcase-inner > * {
  direction: ltr;
}
.showcase-text .section-subtitle {
  margin-bottom: 28px;
}
.showcase-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.showcase-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.showcase-list .check {
  width: 20px;
  height: 20px;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}
.showcase-list .check svg { width: 12px; height: 12px; }
.showcase-phone {
  display: flex;
  justify-content: center;
}

/* ── Stats ── */
.stats {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-number {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── FAQ ── */
.faq {
  padding: 120px 0;
}
.faq-header {
  text-align: center;
  margin-bottom: 56px;
}
.faq-header .section-subtitle {
  margin: 0 auto;
}
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child {
  border-top: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.25s;
}
.faq-question:hover { color: var(--accent); }
.faq-toggle {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease);
}
.faq-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), padding 0.4s;
}
.faq-answer-inner {
  padding-bottom: 24px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ── CTA Section ── */
.cta-section {
  padding: 120px 0;
}
.cta-box {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 80px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.05), transparent 70%);
  bottom: -200px;
  right: -100px;
  pointer-events: none;
}
.cta-content { position: relative; z-index: 1; max-width: 480px; }
.cta-content .section-title { margin-bottom: 16px; }
.cta-content .section-subtitle { margin-bottom: 36px; }
.cta-phone { position: relative; z-index: 1; }
.cta-phone .phone {
  width: 200px;
  height: 410px;
  border-radius: 34px;
}
.cta-phone .phone-notch {
  width: 64px;
  height: 20px;
  top: 8px;
  border-radius: 12px;
}
.cta-phone .phone-screen {
  border-radius: 30px;
}

/* ── Footer ── */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border);
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .nav-logo { margin-bottom: 16px; }
.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 280px;
}
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color 0.25s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-social {
  display: flex;
  gap: 16px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  color: var(--text-muted);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.footer-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}
.footer-social a svg { width: 16px; height: 16px; }

/* ── Legal Pages ── */
.legal-page {
  padding: 140px 0 80px;
  min-height: 100vh;
}
.legal-content {
  max-width: 740px;
  margin: 0 auto;
}
.legal-content h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 8px;
}
.legal-content .legal-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}
.legal-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.legal-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}
.legal-content ul {
  margin: 0 0 16px 20px;
  list-style: disc;
}
.legal-content li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 4px;
}
.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-content a:hover {
  color: var(--accent-dark);
}

/* ── Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.35s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.phone-float { animation: float 5s ease-in-out infinite; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 48px; }
  .hero-text { max-width: 100%; margin: 0 auto; }
  .hero-subtitle { margin: 0 auto 40px; }
  .hero-actions { justify-content: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-inner { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .showcase--reverse .showcase-inner { direction: ltr; }
  .showcase-text .section-subtitle { margin: 0 auto 28px; }
  .showcase-list { align-items: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-box { flex-direction: column; text-align: center; padding: 48px 32px; }
  .cta-content .section-subtitle { margin: 0 auto 36px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile { display: flex; }
  .hero { padding: 120px 0 80px; min-height: auto; }
  .hero-title { font-size: clamp(2.2rem, 7vw, 3rem); }
  .features { padding: 80px 0; }
  .showcase { padding: 60px 0; }
  .faq { padding: 80px 0; }
  .cta-section { padding: 80px 0; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .phone { width: 220px; height: 450px; border-radius: 36px; }
  .phone-screen { border-radius: 32px; }
  .phone-notch { width: 68px; height: 20px; border-radius: 12px; }
  .cta-box { border-radius: 20px; padding: 40px 24px; }
  .cta-phone .phone { width: 180px; height: 370px; border-radius: 30px; }
}
