/* ==========================================================================
   Driveet — Landing Page estática
   Recriação fiel da landing em Flutter, mesma paleta/animações/responsivo.
   ========================================================================== */

:root {
  --matte-black: #0A0A0A;
  --pure-white: #FFFFFF;
  --racing-yellow: #DAE501;
  --accent-muted: #8A7300;
  --success: #3DDC97;
  --danger: #FF4D4F;

  /* Modo escuro (padrão) */
  --background: var(--matte-black);
  --surface: #141414;
  --surface-elevated: #232323;
  --text-primary: var(--pure-white);
  --text-secondary: #BFBFBF;
  --divider: #2A2A2A;
  --on-accent: var(--matte-black);
}

html[data-theme="light"] {
  --background: #F2F2F0;
  --surface: #E8E8E5;
  --surface-elevated: var(--pure-white);
  --text-primary: var(--matte-black);
  --text-secondary: #5C5C5C;
  --divider: #D6D6D3;
}

* { box-sizing: border-box; }

/* Bug corrigido: elementos com `hidden` no HTML mas que também têm
   uma classe com `display` explícito (ex.: .contact-success, .spinner)
   ignoravam o `hidden` — a regra do autor com mesma especificidade
   vence a regra padrão do navegador [hidden]{display:none} por vir
   depois no cascade. Essa regra garante que `hidden` sempre vence,
   não importa o que mais estiver definido. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--text-primary);
}

body {
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Botões (formato "bisel" no canto superior-direito — assinatura visual da marca) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  font-weight: 700;
  font-size: 16px;
  border: none;
  /* O corte em bisel (canto superior-direito) + arredondamento dos
     outros 3 cantos é aplicado via JS (script.js), com o path exato
     calculado a partir do tamanho real de cada botão — border-radius
     sozinho não dá conta de misturar "1 canto cortado + 3 arredondados"
     de forma responsiva a qualquer largura. Fallback simples caso o
     JS não rode por algum motivo: */
  border-radius: 12px;
  transition: transform 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--racing-yellow); color: var(--on-accent); }
.btn--outline { background: transparent; color: var(--pure-white); border: 1px solid rgba(255,255,255,0.4); }
.btn--outline-accent { background: transparent; color: var(--racing-yellow); border: 1px solid var(--racing-yellow); }
.btn--compact { min-height: 44px; padding: 0 20px; font-size: 14px; }
.btn--wide { width: 200px; }
.btn--wide-sm { width: 160px; min-height: 52px; }
.btn--block { width: 100%; }

.icon-btn {
  background: transparent;
  border: none;
  color: var(--pure-white);
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}
.icon-btn:hover { background: rgba(255,255,255,0.1); }

/* ---------- Utilidades ---------- */
.eyebrow {
  display: inline-block;
  color: var(--racing-yellow);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
}
.eyebrow--center { display: block; text-align: center; margin-bottom: 8px; }
.accent-text { color: var(--racing-yellow); }

.section-title {
  text-align: center;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.2px;
  margin: 0 0 48px;
  line-height: 1.3;
}
.section-title--left { text-align: left; font-size: 28px; margin-bottom: 12px; }

.section-lead { color: var(--text-secondary); font-size: 15px; line-height: 1.5; text-align: center; max-width: 640px; margin: 0 auto 20px; }
.section-lead--left { text-align: left; margin: 0 0 20px; }

.section { width: 100%; padding: 72px 48px; background: var(--background); }
.section--alt { background: var(--surface); }

/* ---------- Scroll reveal (fade + slide-up, mesma curva/duração do Flutter) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Hover-scale (1.03x, só mouse — igual MouseRegion do Flutter) ---------- */
@media (hover: hover) and (pointer: fine) {
  .hover-scale { transition: transform 0.18s ease-out; }
  .hover-scale:hover { transform: scale(1.03); }
  .hover-scale-sm, .hover-scale--sm { transition: transform 0.18s ease-out; }
  .hover-scale-sm:hover, .hover-scale--sm:hover { transform: scale(1.015); }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  height: clamp(560px, 100vh, 1000px);
  overflow: hidden;
  /* Corte diagonal na base — mesmo path do _DiagonalBottomClipper do Flutter */
  clip-path: polygon(0 0, 0 calc(100% - 28px), 100% 100%, 100% 0);
  display: flex;
  flex-direction: column;
}

.hero__bg-wrap { position: absolute; inset: 0; overflow: hidden; }
.hero__bg {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  background-size: cover;
  background-position: center;
  /* Zoom lento contínuo ("Ken Burns") — 22s, igual ao Flutter */
  animation: kenburns 22s ease-in-out infinite alternate;
}
.hero__bg--gradient {
  /* Camadas empilhadas: se `hero-banner.jpg` existir em assets/, ela
     aparece por cima; se não existir, o navegador simplesmente ignora
     essa camada (sem erro visível) e o gradiente por baixo continua
     aparecendo normalmente — não precisa tirar essa linha depois de
     adicionar o arquivo. Pra vídeo de fundo em vez de foto, troca a
     tag <div class="hero__bg hero__bg--gradient"> no HTML por um
     <video autoplay muted loop playsinline> com a mesma classe
     hero__bg (mantém o zoom/Ken Burns e o corte diagonal automaticamente).

     Arquivo comprimido (item pendente, resolvido): a imagem original
     enviada era PNG, 2MB — formato ruim pra foto (PNG é sem perda,
     ótimo pra ícone/captura de tela, péssimo pra fotografia). Convertido
     pra JPEG qualidade 82: 240KB, 88% menor, sem perda visual perceptível
     no tamanho em que aparece na página. */
  background-image: url('assets/hero-banner.jpg'), linear-gradient(to bottom, var(--matte-black), var(--surface));
  background-size: cover, cover;
  background-position: center, center;
}
@keyframes kenburns {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.85), rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.25));
}

.hero__decorative-text {
  position: absolute;
  right: 40px;
  top: 0;
  bottom: 60px;
  display: none;
  align-items: center;
  color: rgba(255,255,255,0.18);
  font-weight: 900;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: 1px;
  text-align: right;
  transform: rotate(-3deg);
  pointer-events: none;
}

.hero__content { position: relative; z-index: 2; display: flex; flex-direction: column; height: 100%; }

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
}
.topbar__brand { display: flex; align-items: center; gap: 10px; }
.topbar__wordmark { height: auto; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar__auth-btn { display: none; }

.hero__body { flex: 1; display: flex; align-items: center; padding: 24px; }
.hero__copy { max-width: 640px; }
.hero__title {
  color: var(--pure-white);
  font-weight: 900;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: 0.5px;
  margin: 18px 0 20px;
}
.hero__subtitle { color: rgba(255,255,255,0.7); font-size: 16px; line-height: 1.5; margin: 0 0 32px; max-width: 560px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Selo "FEITO PARA A CULTURA AUTOMOTIVA" */
.hero .eyebrow {
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(218, 229, 1, 0.12);
  border: 1px solid rgba(218, 229, 1, 0.4);
  letter-spacing: 1.2px;
  font-size: 11px;
}

/* ==========================================================================
   APP SHOWCASE
   ========================================================================== */
.app-showcase__inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 40px;
}
.app-showcase__copy { width: 100%; }
.app-showcase__mockup { display: flex; justify-content: center; }

.highlight-list { list-style: none; margin: 28px 0 12px; padding: 0; }
.highlight-list li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.highlight-icon { color: var(--racing-yellow); flex-shrink: 0; margin-top: 1px; }
.highlight-list span { font-size: 14.5px; line-height: 1.4; }

.store-badges { display: flex; flex-wrap: wrap; gap: 16px; }
.store-badges--center { justify-content: center; margin-top: 24px; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--surface-elevated);
  border-radius: 12px;
  color: var(--text-primary);
}
.store-badge__text { display: flex; flex-direction: column; }
.store-badge__top { color: var(--text-secondary); font-size: 10px; }
.store-badge__name { font-weight: 700; font-size: 15px; }

.phone-mockup {
  width: 280px;
  padding: 12px;
  background: #000;
  border-radius: 40px;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 60px 10px rgba(218, 229, 1, 0.08);
}
.phone-mockup__screen {
  width: 100%;
  height: auto; /* Bug corrigido: sem isso, o atributo HTML height="855"
    (adicionado pra evitar layout shift) força uma altura fixa gigante,
    brigando com o aspect-ratio abaixo e distorcendo a imagem inteira. */
  aspect-ratio: 401 / 855;
  object-fit: cover;
  border-radius: 28px;
}

/* ==========================================================================
   HOW IT WORKS
   ========================================================================== */
.how-it-works { text-align: center; }
.steps {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.steps__line { display: none; }

.step { width: 100%; max-width: 320px; text-align: left; }
.step__badge-wrap { position: relative; width: 64px; height: 64px; margin-bottom: 20px; }
.step__numeral {
  position: absolute;
  top: -22px;
  left: -6px;
  color: color-mix(in srgb, var(--text-primary) 6%, transparent);
  font-weight: 900;
  font-size: 96px;
  line-height: 1;
  z-index: 0;
  user-select: none;
}
.step__icon {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--racing-yellow);
  border-radius: 16px;
}
.step__title { font-weight: 700; font-size: 17px; margin: 0 0 6px; }
.step__desc { color: var(--text-secondary); font-size: 13px; line-height: 1.4; margin: 0; }

/* ==========================================================================
   FEATURES
   ========================================================================== */
.features { text-align: center; }
.features__flagship {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.flagship-card {
  width: 100%;
  max-width: 340px;
  text-align: left;
  padding: 24px 24px 20px;
  background: var(--surface-elevated);
  border-radius: 18px;
  border-bottom: 3px solid var(--racing-yellow);
}
.flagship-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(218, 229, 1, 0.14);
  color: var(--racing-yellow);
  border-radius: 14px;
  margin-bottom: 16px;
}
.flagship-card__title { font-weight: 700; font-size: 17px; margin: 0 0 8px; }
.flagship-card__desc { color: var(--text-secondary); font-size: 13px; line-height: 1.5; margin: 0; }

.features__supporting {
  max-width: 1140px;
  margin: 20px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}
.supporting-row {
  width: 100%;
  max-width: 500px;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
}
.supporting-row__icon { color: var(--racing-yellow); flex-shrink: 0; margin-top: 1px; }
.supporting-row h4 { font-weight: 600; font-size: 14px; margin: 0 0 2px; }
.supporting-row p { color: var(--text-secondary); font-size: 12.5px; line-height: 1.4; margin: 0; }

/* ==========================================================================
   COMPARISON
   ========================================================================== */
.comparison__inner { max-width: 1140px; margin: 0 auto; }
.comparison__grid { display: flex; flex-direction: column; gap: 20px; }
.comparison-pair { display: flex; flex-direction: column; gap: 10px; }
.comparison-card {
  flex: 1;
  padding: 20px;
  border-radius: 14px;
  background: var(--surface-elevated);
}
.comparison-card--driveet {
  background: rgba(218, 229, 1, 0.08);
  border: 1.5px solid rgba(218, 229, 1, 0.5);
}
.comparison-card h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 8px;
}
.comparison-card--driveet h4 { color: var(--racing-yellow); }
.comparison-card p { font-size: 13px; line-height: 1.45; margin: 0; }

/* ==========================================================================
   CONTACT FORM
   ========================================================================== */
.contact__inner { max-width: 420px; margin: 0 auto; text-align: center; }
.contact-form { text-align: left; margin-top: 32px; }
.field { display: block; margin-bottom: 12px; }
.field__label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--racing-yellow); outline-offset: 1px; }
.field__error { display: block; color: var(--danger); font-size: 12px; margin-top: 4px; min-height: 14px; }
.honeypot { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; left: -9999px; }
.contact-form .btn { margin-top: 8px; }

.contact-success {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(218, 229, 1, 0.08);
  border: 1px solid rgba(218, 229, 1, 0.4);
  margin-top: 32px;
  text-align: left;
  color: var(--racing-yellow);
}
.contact-success svg { flex-shrink: 0; }
.contact-success span { color: var(--text-primary); font-size: 14px; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--on-accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   STORE BADGES SECTION
   ========================================================================== */
.store-badges-section { padding: 56px 24px; text-align: center; }
.store-badges-section__title { font-weight: 900; font-size: 24px; margin: 0 0 8px; }
.store-badges-section__subtitle { color: var(--text-secondary); margin: 0; }
.store-badge--elevated { background: var(--surface-elevated); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { width: 100%; background: var(--background); }
.footer__top {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.footer__brand { max-width: 260px; }
.footer__desc { color: var(--text-secondary); font-size: 13px; line-height: 1.5; margin: 14px 0 20px; }
.footer__symbol { margin-bottom: 0; }
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-elevated);
  color: var(--text-secondary);
}
.footer__col h5 { font-weight: 700; font-size: 13px; letter-spacing: 0.5px; margin: 0 0 16px; }
.footer__col a { display: block; color: var(--text-secondary); font-size: 13.5px; margin-bottom: 12px; }
.footer__col a:hover { color: var(--text-primary); }

.footer__divider { height: 1px; background: var(--divider); }

.footer__bottom {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}
.footer__tag { color: var(--text-secondary); opacity: 0.6; font-size: 11px; letter-spacing: 1.5px; font-weight: 600; }

/* ==========================================================================
   RESPONSIVIDADE — breakpoint largo em 900px, igual `isWideScreen` do Flutter
   ========================================================================== */
@media (min-width: 900px) {
  .topbar { padding: 20px 48px; }
  .topbar__auth-btn { display: inline-flex; }
  .hero__body { padding: 24px 48px; }
  .hero__decorative-text { display: flex; }

  .section { padding: 80px 48px; }
  .how-it-works, .features, .comparison { padding-top: 88px; padding-bottom: 88px; }

  .app-showcase__inner { flex-direction: row; align-items: center; }
  .app-showcase__copy { flex: 1; }
  .app-showcase__mockup { width: 320px; flex-shrink: 0; }

  .steps { flex-direction: row; align-items: flex-start; justify-content: center; gap: 20px; }
  .steps__line {
    display: flex;
    position: absolute;
    top: 34px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: repeating-linear-gradient(to right, rgba(218,229,1,0.35) 0 12px, transparent 12px 24px);
  }
  .step { width: 320px; }

  .flagship-card { width: 340px; }
  .supporting-row { width: 500px; }

  .comparison-pair { flex-direction: row; align-items: stretch; }

  .footer__top { flex-direction: row; align-items: flex-start; }
  .footer__brand { flex: 2; }
  .footer__col { flex: 1; }
  .footer__bottom { flex-direction: row; align-items: center; }
  .footer__bottom .footer__tag { margin-left: auto; }
}

@media (max-width: 899px) {
  .section, .hero__body, .topbar { padding-left: 20px; padding-right: 20px; }
  .section { padding-top: 48px; padding-bottom: 48px; }
}

/* ==========================================================================
   PÁGINAS LEGAIS (Termos / Privacidade)
   ========================================================================== */
.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 780px;
  margin: 0 auto;
}
.legal-topbar__brand { display: flex; align-items: center; gap: 10px; }
.legal-topbar .icon-btn { color: var(--text-primary); }
.legal-topbar .icon-btn:hover { background: var(--surface); }

.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 24px 64px;
}
.legal-page h1 { font-size: 30px; font-weight: 800; margin: 0 0 4px; }
.legal-updated { color: var(--text-secondary); font-size: 12px; margin: 0 0 16px; }
.legal-disclaimer {
  color: var(--text-secondary);
  font-size: 13px;
  font-style: italic;
  padding: 12px 16px;
  border-left: 3px solid var(--racing-yellow);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  margin: 0 0 32px;
}
.legal-section { margin-bottom: 28px; }
.legal-section h2 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.legal-section p { font-size: 14px; line-height: 1.6; margin: 0 0 12px; }
.legal-section ul { margin: 0 0 12px; padding-left: 20px; }
.legal-section li { font-size: 14px; line-height: 1.6; margin-bottom: 4px; }
.legal-cross-link { font-size: 14px; margin-top: 40px; }
.legal-cross-link a { color: var(--racing-yellow); font-weight: 600; }
