/* ============================================================
   Auto Moto Escola Andorinha — design tokens + componentes
   Mobile-first · breakpoint desktop: 900px
   (portado do design handoff andorinha.css para produção)
   ============================================================ */
:root {
  --navy: #0B2A5B;
  --navy-2: #10355F;
  --navy-3: #1A4378;
  --blue: #1E73BE;
  --yellow: #FFD500;
  --yellow-soft: #FFF3B8;
  --wa: #25D366;
  --wa-deep: #16A34A;
  --bg: #F5F7FA;
  --line: #E2E8F0;
  --gray: #64748B;
  --ink: #1C2B45;
  --white: #FFFFFF;
  --danger: #D6453D;
  --danger-bg: #FDEEED;
  --ok-bg: #EAF9F0;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(11, 42, 91, 0.06), 0 8px 24px rgba(11, 42, 91, 0.08);
  --shadow-lift: 0 2px 4px rgba(11, 42, 91, 0.08), 0 16px 40px rgba(11, 42, 91, 0.14);
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.01em; }
.section { padding: 56px 0; }
.section-light { background: var(--bg); }
.section-navy { background: var(--navy); color: var(--white); }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 12px;
}
.kicker::before { content: ""; width: 22px; height: 3px; background: var(--yellow); border-radius: 2px; }
.section-navy .kicker { color: var(--yellow); }

.section-title { font-size: 28px; font-weight: 800; color: var(--navy); margin-bottom: 10px; text-wrap: pretty; }
.section-navy .section-title { color: var(--white); }
.section-sub { color: var(--gray); max-width: 560px; text-wrap: pretty; }
.section-navy .section-sub { color: #B9C8E0; }
.section-head { margin-bottom: 32px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-size: 16px; font-weight: 700;
  border: none; border-radius: 999px; cursor: pointer;
  padding: 15px 26px; min-height: 52px;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn-wa { background: var(--wa); color: var(--navy); box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35); }
.btn-wa:hover { background: #2FE173; box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45); }
.btn-yellow { background: var(--yellow); color: var(--navy); box-shadow: 0 6px 18px rgba(255, 213, 0, 0.3); }
.btn-yellow:hover { background: #FFDE33; }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: rgba(11, 42, 91, 0.05); }
.btn-outline-light { background: transparent; color: var(--white); border: 2px solid rgba(255, 255, 255, 0.5); }
.btn-outline-light:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; min-height: 40px; font-size: 14px; }
.btn[disabled] { opacity: 0.7; cursor: default; }
.btn:focus-visible, a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: var(--white);
  border-bottom: 3px solid var(--yellow);
}
.site-header .container {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1.1; }
.brand-since { display: block; font-family: var(--font-body); font-weight: 600; font-size: 11px; color: var(--yellow); letter-spacing: 0.08em; text-transform: uppercase; }
.header-spacer { flex: 1; }
.header-nav { display: none; }

/* logo */
.logo-badge {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--yellow); display: grid; place-items: center;
  flex: none; overflow: hidden;
}
.logo-badge img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; transform: scale(1.12); }
.logo-badge svg { width: 26px; height: 26px; }

/* ---------- Selo desde 1972 ---------- */
.badge-1972 {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--yellow); color: var(--navy);
  font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px; padding: 7px 14px;
}
.badge-1972 svg { width: 16px; height: 16px; }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 56px; position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: 32px; }
.hero h1 { font-size: 34px; font-weight: 800; margin: 16px 0 14px; text-wrap: pretty; }
.hero .hl { color: var(--yellow); }
.hero-sub { font-size: 18px; max-width: 520px; text-wrap: pretty; }
.hero-ctas { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.hero-trust { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 14px; font-weight: 600; }
.hero-photo { position: relative; }
.hero-photo .photo { width: 100%; height: 280px; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-lift); }
.hero-photo .badge-1972 { position: absolute; bottom: 14px; left: 14px; box-shadow: var(--shadow); }

/* tonalidades do hero */
.hero[data-tone="marinho"] { background: var(--navy); color: var(--white); }
.hero[data-tone="marinho"] .hero-sub { color: #C7D4E8; }
.hero[data-tone="claro"] { background: var(--white); color: var(--ink); }
.hero[data-tone="claro"] h1 { color: var(--navy); }
.hero[data-tone="claro"] .hl { color: var(--blue); }
.hero[data-tone="claro"] .hero-sub { color: var(--gray); }
.hero[data-tone="amarelo"] { background: var(--yellow); color: var(--navy); }
.hero[data-tone="amarelo"] h1 { color: var(--navy); }
.hero[data-tone="amarelo"] .hl { color: var(--blue); }
.hero[data-tone="amarelo"] .hero-sub { color: var(--navy-3); }
.hero[data-tone="amarelo"] .badge-1972 { background: var(--navy); color: var(--yellow); }
.hero-swallow {
  position: absolute; right: -40px; top: -30px; width: 220px; opacity: 0.1;
  pointer-events: none;
}

/* ---------- Cards de serviço ---------- */
.services-grid { display: grid; gap: 12px; }
.service-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 2px rgba(11, 42, 91, 0.04);
  transition: box-shadow .15s ease, transform .15s ease;
}
.service-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.service-icon {
  width: 48px; height: 48px; border-radius: 12px; flex: none;
  background: var(--bg); color: var(--navy);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
}
.service-icon.cat { background: var(--yellow); }
.service-icon svg { width: 24px; height: 24px; }
.service-body { flex: 1; min-width: 0; }
.service-body h3 { font-size: 16px; color: var(--navy); margin-bottom: 2px; }
.service-body p { font-size: 13.5px; color: var(--gray); }
.service-wa {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok-bg); color: var(--wa-deep);
  text-decoration: none; transition: background .15s ease;
}
.service-wa:hover { background: var(--wa); color: var(--navy); }
.service-wa svg { width: 22px; height: 22px; }

/* ---------- Como funciona ---------- */
.steps { display: grid; gap: 0; counter-reset: passo; }
.step { display: flex; gap: 16px; position: relative; padding-bottom: 26px; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 21px; top: 46px; bottom: 4px;
  width: 2px; background: var(--line);
}
.step:last-child::before { display: none; }
.step-num {
  counter-increment: passo;
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  background: var(--navy); color: var(--yellow);
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
  display: grid; place-items: center; position: relative; z-index: 1;
}
.step-num::after { content: counter(passo); }
.step-body h3 { font-size: 17px; color: var(--navy); margin: 9px 0 4px; }
.step-body p { font-size: 14.5px; color: var(--gray); max-width: 420px; }

/* ---------- Por que a Andorinha ---------- */
.why-grid { display: grid; gap: 12px; }
.why-card {
  background: var(--navy-2); border: 1px solid var(--navy-3);
  border-radius: var(--radius); padding: 18px;
  display: flex; gap: 14px; align-items: flex-start;
}
.why-icon {
  width: 40px; height: 40px; flex: none; border-radius: 10px;
  background: rgba(255, 213, 0, 0.14); color: var(--yellow);
  display: grid; place-items: center;
}
.why-icon svg { width: 21px; height: 21px; }
.why-card h3 { font-size: 16px; margin-bottom: 3px; }
.why-card p { font-size: 13.5px; color: #B9C8E0; }

/* ---------- Prova social ---------- */
.rating-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.rating-num { font-family: var(--font-display); font-weight: 800; font-size: 40px; color: var(--navy); line-height: 1; }
.stars { color: #F6B400; font-size: 18px; letter-spacing: 2px; }
.rating-meta { font-size: 13.5px; color: var(--gray); }
.testimonials { display: grid; gap: 12px; }
.testimonial {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.testimonial p { font-size: 14.5px; color: var(--ink); }
.testimonial footer { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--yellow); color: var(--navy);
  font-weight: 800; font-size: 14px; display: grid; place-items: center;
}
.testimonial cite { font-style: normal; font-size: 13.5px; font-weight: 700; color: var(--navy); display: block; }
.testimonial small { color: var(--gray); font-size: 12px; }
.proof-stats { list-style: none; display: grid; gap: 10px; margin-top: 16px; }
.proof-stat, .stat {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: 0 1px 2px rgba(11, 42, 91, 0.04);
}
.stat-ico {
  width: 40px; height: 40px; flex: none; border-radius: 10px;
  background: var(--ok-bg); color: var(--wa-deep);
  display: grid; place-items: center;
}
.stat-ico svg { width: 22px; height: 22px; }
.stat strong { display: block; font-family: var(--font-display); font-size: 15px; color: var(--navy); }
.stat small { font-size: 12.5px; color: var(--gray); }
.proof-note { font-size: 12px; color: var(--gray); margin-top: 12px; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; max-width: 720px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-body); font-size: 15.5px; font-weight: 700; color: var(--navy);
  padding: 16px 18px; min-height: 56px;
}
.faq-chevron { flex: none; width: 22px; height: 22px; color: var(--blue); transition: transform .2s ease; }
.faq-item[data-open="true"] .faq-chevron { transform: rotate(180deg); }
.faq-a { padding: 0 18px 16px; font-size: 14.5px; color: var(--gray); }
.faq-item[data-open="false"] .faq-a { display: none; }
.faq-a a { font-weight: 700; }

/* ---------- Formulário ---------- */
.form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  border-top: 5px solid var(--yellow);
  box-shadow: var(--shadow-lift);
  padding: 26px 22px; max-width: 560px; margin: 0 auto;
}
.form-card h2 { font-size: 24px; color: var(--navy); margin-bottom: 6px; }
.form-card > p { color: var(--gray); font-size: 14.5px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.field .req { color: var(--danger); }
.field input[type="text"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 16px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 13px 14px; min-height: 50px; background: var(--white);
  transition: border-color .15s ease;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2364748B' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.15); }
.field.has-error input, .field.has-error select { border-color: var(--danger); }
.field-error { display: flex; align-items: center; gap: 6px; color: var(--danger); font-size: 13px; font-weight: 600; margin-top: 6px; }
.field-row { display: grid; gap: 16px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; }
.consent input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--blue); }
.consent label { font-size: 13px; color: var(--gray); }
.more-toggle {
  background: none; border: none; cursor: pointer; font-family: var(--font-body);
  color: var(--blue); font-weight: 700; font-size: 14px; padding: 4px 0; margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
.form-alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--gray); }
.form-alt a { font-weight: 700; color: var(--wa-deep); text-decoration: none; }
.form-alt a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
/* honeypot: fora da tela, sem display:none (alguns bots ignoram o oculto) */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* spinner */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(11, 42, 91, 0.25); border-top-color: var(--navy);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* sucesso / erro */
.form-result { text-align: center; padding: 18px 4px; }
.form-result .result-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center;
}
.form-result.is-ok .result-icon { background: var(--ok-bg); color: var(--wa-deep); }
.form-result.is-err .result-icon { background: var(--danger-bg); color: var(--danger); }
.form-result .result-icon svg { width: 30px; height: 30px; }
.form-result h3 { font-size: 21px; color: var(--navy); margin-bottom: 8px; }
.form-result p { font-size: 14.5px; color: var(--gray); margin-bottom: 20px; text-wrap: pretty; }
.form-result .btn + .btn { margin-top: 10px; }

/* banner de erro acima do form */
.error-banner {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--danger-bg); border: 1px solid #F3C6C3; color: #9C2B24;
  border-radius: 10px; padding: 12px 14px; font-size: 13.5px; font-weight: 600;
  margin-bottom: 18px;
}
.error-banner svg { width: 20px; height: 20px; flex: none; }

/* ---------- Localização ---------- */
.map-embed {
  position: relative; border-radius: var(--radius); overflow: hidden;
  height: 240px; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-open {
  position: absolute; right: 10px; bottom: 10px;
  background: var(--white); color: var(--navy); font-size: 12.5px; font-weight: 700;
  text-decoration: none; padding: 8px 12px; border-radius: 999px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.map-open:hover { background: var(--bg); }
.loc-grid { display: grid; gap: 20px; }
.loc-info h3 { font-size: 17px; color: var(--navy); margin-bottom: 4px; }
.loc-info p { font-size: 14.5px; color: var(--gray); }
.loc-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.loc-row svg { width: 20px; height: 20px; flex: none; color: var(--blue); margin-top: 2px; }
.loc-actions { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.loc-actions .btn-wa { grid-column: 1 / -1; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #B9C8E0; padding: 36px 0; font-size: 13.5px; }
.site-footer .container { display: flex; flex-direction: column; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--white); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: #B9C8E0; }

/* ---------- WhatsApp flutuante ---------- */
.float-wa {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: var(--wa); color: var(--navy);
  border-radius: 999px; padding: 8px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(22, 101, 52, 0.35);
  transition: transform .15s ease;
}
.float-wa:hover { transform: scale(1.05); }
.float-wa .float-wa-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
}
.float-wa .float-wa-icon svg { width: 30px; height: 30px; }
.float-wa .float-wa-label {
  display: none;
  font-weight: 800; font-size: 14px; padding-right: 14px;
}
.float-wa::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  border: 2px solid var(--wa); opacity: 0;
  animation: wa-pulse 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .float-wa::after { animation: none; }
  html { scroll-behavior: auto; }
  .spinner { animation: none; }
}

/* ============================================================
   Desktop ≥ 900px
   ============================================================ */
@media (min-width: 900px) {
  .section { padding: 88px 0; }
  .section-title { font-size: 36px; }
  .section-head { margin-bottom: 44px; }

  .header-nav { display: flex; gap: 26px; }
  .header-nav a { color: #C7D4E8; text-decoration: none; font-size: 14px; font-weight: 600; }
  .header-nav a:hover { color: var(--white); }

  .hero { padding: 88px 0; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 56px; }
  .hero h1 { font-size: 52px; }
  .hero-ctas { flex-direction: row; }
  .hero-photo .photo { height: 400px; }

  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .service-card { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; }
  .service-wa { align-self: flex-end; margin-top: -44px; }

  .steps { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  .step { flex-direction: column; padding-bottom: 0; }
  .step::before { left: 56px; right: -12px; top: 21px; bottom: auto; width: auto; height: 2px; }
  .step-body p { font-size: 13.5px; }

  .why-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }

  .proof-cols { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; }
  .testimonials { grid-template-columns: repeat(3, 1fr); }
  .proof-photos .photo, .proof-photos .photo-placeholder { height: 150px; }

  .field-row { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 36px; }

  .loc-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; gap: 40px; }
  .map-embed { height: 340px; }

  .float-wa .float-wa-label { display: block; }

  .site-footer .container { flex-direction: row; align-items: center; justify-content: space-between; }
}
