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

:root {
  --brand-dark: #1E1C22;
  --primary-blue: #0D47A1;
  --light-blue: #42A5F5;
  --sos-red: #D32F2F;
  --white: #FFFFFF;
  --surface-light: #F5F3F7;
  --text-primary: #1D1D1D;
  --text-secondary: #43474E;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

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

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary-blue);
  text-decoration: none;
}

a:hover {
  opacity: 0.85;
}

:focus-visible {
  outline: 3px solid var(--light-blue);
  outline-offset: 2px;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Navigation ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand-dark);
  padding: 1rem 0;
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--white);
}

.nav-brand img,
.nav-brand svg {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.nav-brand span {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--white);
  text-decoration: none;
}

.nav-cta {
  background: var(--primary-blue);
  color: var(--white) !important;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: #1565C0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
  color: var(--white);
  padding: 6rem 0 5rem;
  overflow: hidden;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.35rem;
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 0.5rem;
}

.hero-description {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 2rem;
  max-width: 480px;
  line-height: 1.7;
}

.hero-visual {
  flex: 0 0 auto;
}

/* Google Play Badge */
.gplay-btn {
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 12px;
}

.gplay-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 1;
}

.gplay-btn img {
  display: block;
  height: 72px;
  width: auto;
  border-radius: 10px;
}

/* ===== Phone Mockup ===== */
.phone-mockup {
  width: 280px;
  border: 8px solid var(--brand-dark);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  background: var(--brand-dark);
}

.phone-mockup img {
  width: 100%;
  display: block;
  border-radius: 28px;
}

/* ===== Section Common ===== */
.section {
  padding: 5rem 0;
}

.section-light {
  background: var(--surface-light);
}

.section-dark {
  background: var(--brand-dark);
  color: var(--white);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.feature-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

@media (prefers-reduced-motion: no-preference) {
  .feature-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 71, 161, 0.08);
  border-radius: 14px;
  color: var(--primary-blue);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

.feature-card.sos .feature-icon {
  background: rgba(211, 47, 47, 0.08);
  color: var(--sos-red);
}

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

.feature-card.sos h3 {
  color: var(--sos-red);
}

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

/* ===== Screenshots ===== */
.screenshots-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
}

.screenshot-item {
  text-align: center;
  flex: 0 0 auto;
}

.screenshot-item .phone-mockup {
  width: 220px;
  margin-bottom: 1rem;
}

.screenshot-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Mobile screenshot carousel */
.screenshots-carousel {
  display: none;
}

/* ===== Perfect For ===== */
.perfect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.perfect-card {
  background: var(--surface-light);
  border-radius: 16px;
  padding: 2.25rem 1.75rem;
  text-align: center;
  transition: box-shadow 0.2s;
}

.perfect-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.perfect-card .card-emoji {
  width: 56px;
  height: 72px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 71, 161, 0.08);
  border-radius: 50%;
  color: var(--primary-blue);
}

.perfect-card .card-emoji svg {
  width: 28px;
  height: 28px;
}

.perfect-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

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

/* ===== CTA Section ===== */
.cta-section {
  text-align: center;
  padding: 5rem 0;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-section .cta-email {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
}

.cta-section .cta-email a {
  color: var(--light-blue);
}

/* ===== Footer ===== */
.footer {
  background: var(--brand-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  transition: color 0.2s;
}

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

/* ===== Legal Pages ===== */
.legal-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.legal-page .last-updated {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

.legal-page h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal-page p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-page h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

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

.legal-page li {
  margin-bottom: 0.35rem;
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.legal-page th,
.legal-page td {
  border: 1px solid #e0e0e0;
  padding: 0.6rem 0.85rem;
  text-align: left;
  line-height: 1.6;
}

.legal-page th {
  background: var(--surface-light);
  font-weight: 600;
  color: var(--text-primary);
}

.legal-page .contact-block {
  margin-top: 1rem;
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.legal-page .back-link {
  display: inline-block;
  margin-top: 3rem;
  font-weight: 600;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .screenshots-row {
    flex-wrap: wrap;
  }

  .screenshot-item .phone-mockup {
    width: 200px;
  }

  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-visual {
    margin-top: 1rem;
  }
}

/* Mobile */
@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 1.15rem;
  }

  .hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .phone-mockup {
    width: 220px;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-title {
    font-size: 1.6rem;
  }

  /* Navigation mobile */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand-dark);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .nav-links a {
    font-size: 1rem;
    padding: 0.5rem 0;
    display: block;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .nav-toggle {
    display: flex;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    padding: 1.5rem;
  }

  /* Screenshots carousel on mobile */
  .screenshots-row {
    display: none;
  }

  .screenshots-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.25rem;
    padding: 0 1.5rem 1.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .screenshots-carousel::-webkit-scrollbar {
    display: none;
  }

  .screenshots-carousel .screenshot-item {
    scroll-snap-align: center;
    flex: 0 0 auto;
  }

  .screenshots-carousel .phone-mockup {
    width: 220px;
    margin-bottom: 0.75rem;
  }

  /* Carousel indicators */
  .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
  }

  .carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s;
  }

  .carousel-dot.active {
    background: var(--primary-blue);
  }

  /* Perfect For */
  .perfect-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}