/* ========================================
   EasyRun — Landing page
   Fundo: mapa em execução de rota
   Temas: Noturno (default) e Diurno (data-theme="light")
   Paleta: esmeralda/turquesa (mesma do app)
   ======================================== */

/* ---------- Variáveis de tema ---------- */
:root {
  /* Tema Noturno — cores do app EasyRun */
  --bg: #0F172A;
  --bg-soft: #1E293B;
  --surface: rgba(30, 41, 59, 0.75);
  --surface-hover: rgba(51, 65, 85, 0.9);
  --header-bg: rgba(15, 23, 42, 0.55);
  --border: rgba(16, 185, 129, 0.14);
  --border-strong: rgba(16, 185, 129, 0.28);
  --text: #E2E8F0;
  --text-strong: #ffffff;
  --text-2: #CBD5E1;
  --text-3: #94A3B8;
  --text-muted: #64748B;
  --accent: #10B981;
  --accent-hover: #34D399;
  --accent-soft: #6EE7B7;
  --amber: #2DD4BF;
  --green: #4ADE80;
  --red: #FCA5A5;
  --overlay: radial-gradient(ellipse at 20% 15%, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.55) 45%, rgba(15, 23, 42, 0.82) 100%);
  /* Mapa */
  --map-terreno: #141d2b;
  --map-quadra: #182334;
  --map-quadra-stroke: #1e2b40;
  --map-rua: #26344d;
  --map-avenida: #3b4f6e;
  --map-texto: #5b6f8f;
  --map-rota: #10B981;
  --map-rota-dash: #6EE7B7;
  --map-carro: #059669;
}

[data-theme="light"] {
  /* Tema Diurno — foco em contraste (paleta clara do app) */
  --bg: #F8FAFC;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-hover: rgba(226, 232, 240, 0.98);
  --header-bg: rgba(255, 255, 255, 0.78);
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.2);
  --text: #0F172A;
  --text-strong: #0F172A;
  --text-2: #1E293B;
  --text-3: #334155;
  --text-muted: #475569;
  --accent: #047857;
  --accent-hover: #065F46;
  --accent-soft: #10B981;
  --amber: #0F766E;
  --green: #047857;
  --red: #B91C1C;
  --overlay: radial-gradient(ellipse at 20% 15%, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.78) 45%, rgba(226, 232, 240, 0.92) 100%);
  /* Mapa (claro, estilo mapa diurno) */
  --map-terreno: #e8ecef;
  --map-quadra: #dfe4ea;
  --map-quadra-stroke: #cbd5e1;
  --map-rua: #ffffff;
  --map-avenida: #f4f6f8;
  --map-texto: #64748b;
  --map-rota: #059669;
  --map-rota-dash: #10B981;
  --map-carro: #047857;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Fundo: planta de mapa em execução de rota ---------- */
.mapa-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--map-terreno);
  /* Inclinação em perspectiva: câmera alta olhando a planta do mapa. */
  perspective: 1200px;
  perspective-origin: 50% 30%;
  transition: background 0.3s ease;
}

.mapa-bg .mapa-planta {
  position: absolute;
  left: -15%;
  right: -15%;
  top: -20%;
  bottom: -10%;
  transform: rotateX(52deg);
  transform-origin: 50% 62%;
  will-change: transform;
}

.mapa-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Camada de legibilidade do texto (sobre o mapa) */
.mapa-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--overlay);
  transition: background 0.3s ease;
}

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.75rem 0;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-soft);
}

.logo-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-soft);
  display: block;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--text-3);
}

/* ---------- Botão de alternância de tema ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 9999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ---------- Navigation ---------- */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-desktop a {
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color 0.2s;
}

.nav-desktop a:hover {
  color: var(--accent-soft);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
}

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

.nav-mobile a {
  font-size: 0.875rem;
  color: var(--text-2);
  padding: 0.5rem 0;
}

.menu-mobile-btn {
  display: flex;
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  padding: 0.25rem;
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .menu-mobile-btn { display: none; }
  .nav-mobile { display: none !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-hero {
  background: var(--text-strong);
  color: var(--bg);
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
}

.btn-hero:hover { background: var(--text-2); }

.btn-hero-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
}

.btn-hero-outline:hover {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.08);
}

/* ---------- Hero ---------- */
.hero {
  padding: 3rem 0 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-strong);
  background: rgba(16, 185, 129, 0.08);
  font-size: 0.8125rem;
  color: var(--accent-soft);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-strong);
  max-width: 40rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) { .hero-title { font-size: 2.25rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 2.75rem; } }

.hero-subtitle {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-2);
  max-width: 38rem;
  margin-bottom: 2rem;
}

.hero-subtitle strong {
  color: var(--text-strong);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Simulação das bolhas flutuantes (mock) ---------- */
.hero-mocks {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Cada linha: bolha à esquerda + descrição à direita */
.mock-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: center;
}

@media (min-width: 768px) {
  .mock-row {
    grid-template-columns: 22rem 1fr;
    gap: 2.5rem;
    align-items: center;
  }
}

.mock-bubble {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 1rem;
  padding: 0.75rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  max-width: 24rem;
}

.mock-bubble-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mock-bubble-endereco {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.mock-bubble-distancia {
  font-size: 0.8rem;
  color: var(--accent-soft);
  white-space: nowrap;
}

.mock-bubble-buttons {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.mock-bubble-buttons span {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0;
  border-radius: 0.6rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #fff;
  font-size: 1rem;
}

/* --- Bolha de chegada (modo entrega) --- */
.mock-bubble-chegada {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mock-chegada-titulo {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber);
}

.mock-chegada-endereco {
  font-size: 0.85rem;
  color: #ffffff;
  line-height: 1.4;
}

.mock-chegada-pergunta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
  text-align: center;
}

.mock-chegada-botoes {
  display: flex;
  gap: 0.4rem;
}

.mock-chegada-botoes span {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.mock-sim {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--green);
}

.mock-nao {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--red);
}

.mock-chegada-proxima {
  font-size: 0.75rem;
  color: var(--accent-soft);
  border-top: 1px solid rgba(16, 185, 129, 0.15);
  padding-top: 0.5rem;
}

/* --- Texto descritivo ao lado da bolha --- */
.mock-info {
  max-width: 34rem;
}

.mock-info-titulo {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.5rem;
}

.mock-info-desc {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.mock-info-lista {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mock-info-lista li {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.5;
  padding-left: 0.25rem;
}

.mock-info-lista li strong {
  color: var(--text-strong);
  font-weight: 600;
}

/* ---------- Sections ---------- */
.section {
  padding: 4rem 0;
}

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

.section-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 1rem;
  max-width: 40rem;
}

@media (min-width: 640px) { .section-title { font-size: 1.75rem; } }

.section-desc {
  font-size: 1rem;
  color: var(--text-3);
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

/* ---------- Features Grid ---------- */
.features-grid {
  display: grid;
  gap: 1rem;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s;
}

.feature-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.feature-icon-blue { background: rgba(16, 185, 129, 0.15); color: var(--accent-soft); }
.feature-icon-sky { background: rgba(45, 212, 191, 0.15); color: var(--accent-soft); }
.feature-icon-indigo { background: rgba(4, 120, 87, 0.2); color: #6EE7B7; }
.feature-icon-cyan { background: rgba(6, 182, 212, 0.15); color: #67e8f9; }
.feature-icon-slate { background: rgba(100, 116, 139, 0.15); color: var(--text-2); }
.feature-icon-navy { background: rgba(5, 150, 105, 0.2); color: var(--accent-soft); }

.feature-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.feature-bullets {
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-3);
}

.feature-bullets li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.25rem;
}

.feature-bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* ---------- Como funciona (passos) ---------- */
.pillars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pillar {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--surface);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
}

.pillar-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-soft);
  font-size: 0.8125rem;
  font-weight: 700;
}

.pillar strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-strong);
  margin-bottom: 0.25rem;
}

.pillar p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ---------- CTA ---------- */
.section-cta {
  padding: 3rem 0;
}

.cta-box {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 3rem 2rem;
  backdrop-filter: blur(8px);
}

.cta-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.75rem;
}

.cta-desc {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ---------- Footer ---------- */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

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

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

.footer-links a {
  font-size: 0.8125rem;
  color: var(--accent);
  transition: color 0.2s;
}

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

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero, .feature-card, .pillar, .cta-box {
  animation: fadeInUp 0.6s ease-out forwards;
}

.feature-card:nth-child(2) { animation-delay: 0.1s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.3s; }
.feature-card:nth-child(5) { animation-delay: 0.4s; }
.feature-card:nth-child(6) { animation-delay: 0.5s; }

/* ---------- Responsive fine-tune ---------- */
@media (min-width: 768px) {
  .section { padding: 5rem 0; }
  .hero { padding: 5rem 0 3rem; }
}
