/* ==========================================================================
   RotaFácil — site institucional
   Paleta e gradiente extraídos de lib/core/theme.dart do app (mesma marca).
   ========================================================================== */

:root {
  --primary: #374d9f;
  --secondary: #25268c;
  --tertiary: #1d1e6c;
  --accent: #4c6fff;
  --success: #27ae52;
  --warning: #f9cf58;
  --error: #ee4444;

  --bg: #f1f4f8;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --border: #e3e8f2;
  --text: #14172a;
  --text-dim: #545b73;
  --text-faint: #8890a8;

  --brand-gradient: linear-gradient(160deg, #374d9f 0%, #25268c 55%, #1d1e6c 100%);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 2px 8px rgba(29, 30, 108, 0.06);
  --shadow-md: 0 12px 32px rgba(29, 30, 108, 0.12);
  --shadow-lg: 0 24px 60px rgba(29, 30, 108, 0.18);
  --container: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10121f;
    --surface: #1a1d30;
    --surface-2: #20233a;
    --border: #2b2f4a;
    --text: #f2f4fb;
    --text-dim: #b7bcd6;
    --text-faint: #7d84a3;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 88px 0; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -0.02em; }
p { line-height: 1.65; color: var(--text-dim); margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(76, 111, 255, 0.1);
  padding: 7px 14px;
  border-radius: 100px;
}

/* ---------------------------------- Header ------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand .facil { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dim);
}
.nav-links a:hover { color: var(--accent); }
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.header-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.nav-toggle { display: none; }

/* ----------------------------------- Hero -------------------------------- */
.hero {
  position: relative;
  background: var(--brand-gradient);
  padding: 72px 0 0;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.12), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(76, 111, 255, 0.35), transparent 50%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: end;
}
.hero-copy { padding-bottom: 72px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(39, 174, 82, 0.35);
}
.hero h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 54px);
  margin-bottom: 20px;
}
.hero h1 .hl { color: var(--warning); }
.hero p.lead {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  max-width: 480px;
  margin-bottom: 36px;
}
.store-buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0d0f1f;
  color: #fff;
  padding: 11px 20px 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.15s ease, background 0.15s ease;
}
.store-btn:hover { transform: translateY(-2px); background: #171a30; }
.store-btn svg { width: 24px; height: 24px; flex-shrink: 0; }
.store-btn .store-label { display: flex; flex-direction: column; line-height: 1.25; }
.store-btn .store-label small { font-size: 10.5px; color: rgba(255,255,255,0.65); font-weight: 500; }
.store-btn .store-label strong { font-size: 15.5px; font-weight: 700; }
.hero-meta {
  display: flex;
  gap: 28px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13.5px;
  font-weight: 600;
}
.hero-meta span { display: flex; align-items: center; gap: 6px; }

/* Phone mockup stack */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 560px;
}
.phone {
  position: relative;
  width: 270px;
  border-radius: 42px;
  padding: 12px;
  background: #0b0d1a;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.phone .screen {
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 460 / 998;
}
.phone .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone .notch {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 22px;
  background: #0b0d1a;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone.primary { z-index: 2; transform: translateY(0); }
.phone.secondary {
  position: absolute;
  right: -6px;
  bottom: 34px;
  width: 210px;
  z-index: 1;
  transform: rotate(6deg);
  opacity: 0.96;
}
.float-chip {
  position: absolute;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
}
.float-chip .ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 17px;
}
.float-chip.chip-eta { top: 46px; left: -8px; }
.float-chip.chip-eta .ico { background: rgba(39, 174, 82, 0.14); }
.float-chip.chip-live { bottom: 8px; left: -18px; }
.float-chip.chip-live .ico { background: rgba(249, 207, 88, 0.22); }
.float-chip small { display: block; color: var(--text-faint); font-weight: 600; font-size: 11px; }

.hero-wave {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 56px;
}

/* --------------------------------- Sections ------------------------------ */
.section-head {
  max-width: 620px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 38px); margin-bottom: 14px; }
.section-head p { font-size: 16.5px; }

/* Feature grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 17.5px; margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; }

/* "Como funciona" — dois passos, só texto (sem mockup de celular; a
   screenshot real já aparece no hero, repetir aqui ficava redundante). */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.step-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px 36px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 20px;
}
.step-card .eyebrow { margin-bottom: 14px; }
.step-card h3 { font-size: 24px; margin-bottom: 14px; }
.step-card p { font-size: 15.5px; margin-bottom: 22px; }
.step-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.step-card li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px; color: var(--text-dim); font-weight: 500;
}
.step-card li .check {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px;
  border-radius: 50%; background: rgba(39, 174, 82, 0.14); color: var(--success);
  display: grid; place-items: center; font-size: 12px; font-weight: 900;
}

/* Stats strip */
.stats {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 48px 24px;
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 34px; font-weight: 800; color: var(--primary); }
@media (prefers-color-scheme: dark) { .stat strong { color: var(--accent); } }
.stat span { font-size: 13.5px; color: var(--text-faint); font-weight: 600; }

/* Official partner strip */
.partner-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-faint);
  text-align: center;
  flex-wrap: wrap;
}
.partner-strip .badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
}

/* Final CTA */
.cta-block {
  background: var(--brand-gradient);
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(255,255,255,0.15), transparent 55%);
}
.cta-block h2 { color: #fff; font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 14px; position: relative; }
.cta-block p { color: rgba(255,255,255,0.8); max-width: 480px; margin: 0 auto 32px; position: relative; }
.cta-block .store-buttons { justify-content: center; position: relative; }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 24px;
  font-weight: 700;
  font-size: 15.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 24px 22px; font-size: 14.5px; color: var(--text-dim); }

/* -------------------------------- Footer --------------------------------- */
.site-footer { background: #0c0e1c; color: rgba(255,255,255,0.7); padding: 64px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 14px; max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: rgba(255,255,255,0.62); font-size: 14.5px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 13px; color: rgba(255,255,255,0.4); flex-wrap: wrap; gap: 12px;
}
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: grid; place-items: center;
}
.footer-social a:hover { background: var(--accent); }

/* ------------------------------ Legal pages ------------------------------- */
.legal-hero {
  background: var(--brand-gradient);
  padding: 56px 0 44px;
  color: #fff;
}
.legal-hero .container { max-width: 820px; }
.legal-hero .eyebrow { background: rgba(255,255,255,0.14); color: #fff; margin-bottom: 16px; }
.legal-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 40px); }
.legal-hero p { color: rgba(255,255,255,0.78); margin-top: 12px; }
.legal-body { padding: 56px 0 96px; }
.legal-body .container { max-width: 820px; }
.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
}
.legal-card h2 { font-size: 20px; margin: 40px 0 14px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card h3 { font-size: 16px; margin: 24px 0 10px; }
.legal-card p, .legal-card li { color: var(--text-dim); font-size: 15px; line-height: 1.75; }
.legal-card ul, .legal-card ol { padding-left: 22px; display: grid; gap: 8px; margin: 12px 0; }
.legal-card strong { color: var(--text); }
.legal-card a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.legal-card table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.legal-card th, .legal-card td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-dim); }
.legal-card th { color: var(--text); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.03em; }
.legal-toc {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 32px;
  font-size: 14px;
}
.legal-toc strong { display: block; margin-bottom: 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
.legal-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.legal-toc a { color: var(--text-dim); font-weight: 600; }
.legal-toc a:hover { color: var(--accent); }
.legal-updated { font-size: 13px; color: var(--text-faint); margin-bottom: 8px; font-weight: 600; }
.legal-note {
  background: rgba(249, 207, 88, 0.14);
  border: 1px solid rgba(249, 207, 88, 0.4);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 13.5px;
  color: var(--text-dim);
  margin-top: 28px;
}

/* --------------------------------- Utilities ------------------------------ */
.back-home {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.85);
  margin-bottom: 20px;
}

/* --------------------------------- Responsive ------------------------------ */
@media (max-width: 980px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; margin-top: 24px; }
  .hero-copy { padding-bottom: 32px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .store-buttons, .hero-meta { justify-content: center; }
  /* Acima de 760px o layout vira coluna única, mas ainda havia espaço para o
     app mostrar o celular secundário girado + os chips flutuantes — pensados
     só para o hero largo de 2 colunas. Nessa faixa intermediária eles
     ficavam espremidos/sobrepostos ("duas telas uma em cima da outra").
     Escondendo os dois no MESMO breakpoint em que o hero vira 1 coluna,
     sobra só o celular principal, centralizado — sem essa faixa quebrada. */
  .phone.secondary { display: none; }
  .float-chip { display: none; }
}
@media (max-width: 760px) {
  section { padding: 64px 0; }
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 24px; }
  .step-card { padding: 32px 24px 28px; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .cta-block { padding: 48px 24px; }
  .legal-card { padding: 28px 22px; }
}
