/* ============================================================
   VILLE GEELY — Landing Page
   style.css
   ============================================================ */

/* ------------------------------------------------------------
   0. FONTES
   Roboto é a fonte global da página (conforme especificação).
   A fonte de marca Geely fica declarada e disponível para uso
   pontual através da variável --font-brand (basta aplicá-la em
   qualquer seletor). Como o print só usa a tipografia tecnológica
   dentro das artes do Hero, ela não é aplicada automaticamente.
------------------------------------------------------------ */
@font-face {
  font-family: 'Geely';
  src: url('../fonte/GEELYBold20250530.otf') format('opentype');
  /* Fonte de face única: o range evita que o navegador aplique
     negrito sintético em qualquer peso solicitado */
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------
   1. RESET / BASE
------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Paleta */
  --white: #FFFFFF;
  --black: #000000;
  --dark-gray: #1A1A1A;
  --gray: #666666;
  --light-gray: #F3F3F3;
  --border: #E5E5E5;

  /* Layout */
  --container: 1200px;
  --container-wide: 1400px;
  --gutter: 24px;

  /* Tipografia */
  --font: 'Roboto', Arial, Helvetica, sans-serif;
  --font-brand: 'Geely', 'Roboto', Arial, sans-serif;

  /* Transições */
  --ease: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--dark-gray);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* Fallback para navegadores sem suporte a `clip` */
  overflow-x: hidden;
}

/* `clip` não cria scroll container, então não quebra o position: sticky
   do header (diferente de `hidden`). */
@supports (overflow-x: clip) {
  body {
    overflow-x: clip;
  }
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Foco visível (acessibilidade) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

/* Âncoras: o header sticky cobre o topo do destino, então cada
   seção com id reserva esse espaço antes de rolar. */
#hero,
#galeria,
#tecnologia,
#quem-somos,
#contato {
  scroll-margin-top: 96px;
}

/* Container central */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Container mais largo — galeria, imagem do EX5 e mapa
   (no print esses blocos são mais largos que o texto) */
.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 30px;
}

/* Títulos e textos de seção.
   Os títulos usam a fonte de marca Geely (mais larga que a Roboto). */
.section-title {
  font-family: var(--font-brand);
  font-size: 1.9rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.3px;
  color: var(--black);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 26px;
}

.section-text {
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--gray);
  text-align: center;
  max-width: 1000px;
  margin: 0 auto 20px;
}

/* Placeholder visual para imagens ainda não adicionadas em /assets */
.img-placeholder {
  background: var(--light-gray);
  position: relative;
}

.img-placeholder::after {
  content: "Adicione a imagem em /assets";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #9a9a9a;
  text-align: center;
  padding: 10px;
}

/* ------------------------------------------------------------
   2. BOTÕES
------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* alvo de toque confortável no mobile */
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
  padding: 14px 34px;
  border-radius: 7px;
  transition: background var(--ease), transform var(--ease);
}

.btn:hover {
  background: #2a2a2a;
  transform: translateY(-1px);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ------------------------------------------------------------
   3. HEADER
------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--black);
  transition: background-color var(--ease), box-shadow var(--ease),
    backdrop-filter 0.35s ease;
}

/* Efeito glass aplicado só na tarja preta do header quando a
   página é rolada: fundo escuro translúcido + desfoque do conteúdo
   que passa por trás. O menu mobile mantém o fundo preto sólido. */
.site-header.is-scrolled {
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Sem suporte a backdrop-filter o fundo translúcido deixaria o
   conteúdo ilegível — a tarja continua preta sólida. */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .site-header.is-scrolled {
    background-color: var(--black);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
}

/* Logo (proporção original: 1536x178, PNG com transparência) */
.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 10px 0; /* sobe a área de toque do logo para 44px */
}

.logo-img {
  display: block;
  height: 34px;
  width: auto;
}

/* Navegação desktop */
.nav-list {
  display: flex;
  align-items: center;
  gap: 38px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
  padding: 8px 0;
  transition: opacity var(--ease);
}

.nav-link:hover {
  opacity: 0.7;
}

.caret {
  font-size: 0.7rem;
  transition: transform var(--ease);
}

/* Dropdown MODELOS */
.nav-item.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
  z-index: 120;
}

/* Abre no hover (desktop) e por classe .open (clique) */
@media (min-width: 901px) {
  .nav-item.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.nav-item.has-dropdown.open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item.has-dropdown.open .caret {
  transform: rotate(180deg);
}

.dropdown li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 22px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--black);
  transition: background var(--ease);
}

.dropdown li a:hover {
  background: var(--light-gray);
}

/* Botão hamburger */
.nav-toggle {
  display: none;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0; /* nunca é espremido pelo logo */
  width: 28px;
  height: 20px;
}

/* Amplia a área de toque sem alterar o desenho das barras */
.nav-toggle::after {
  content: "";
  position: absolute;
  inset: -12px -8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ------------------------------------------------------------
   4. HERO
------------------------------------------------------------ */
.hero {
  width: 100%;
  background: var(--light-gray);
}

/* Duas campanhas alternando em fade suave.
   Proporções reais: desktop 1920x760 | mobile 1080x1350 */
.hero-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 760;
  background: var(--light-gray);
  overflow: hidden;
}

/* Cada banner é um link (display block para ocupar toda a área).
   `visibility: hidden` no slide inativo é essencial: com apenas
   opacity 0 ele continuaria por cima do visível, recebendo cliques
   e foco de teclado. A transição mantém o slide visível durante o
   fade, então o efeito continua suave. */
.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

/* O <picture> precisa gerar caixa para preencher o slide */
.hero-slide-media {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter var(--ease);
}

/* Indicação discreta de que o banner é clicável
   (sem zoom, para não cortar os textos da arte) */
.hero-slide:hover .hero-img {
  filter: brightness(1.06);
}

/* Anel de foco voltado para dentro, para não ser cortado pelo overflow */
.hero-slide:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: -6px;
}

/* Proporção do banner mobile */
@media (max-width: 600px) {
  .hero-slides {
    aspect-ratio: 1080 / 1350;
  }
}

/* ------------------------------------------------------------
   4.5. SEÇÃO DE AGENDAMENTO DE TEST DRIVE
   Componente autossuficiente: todas as regras usam o prefixo
   .test-drive-* para não interferir nas demais seções.
   Reutiliza as variáveis (--font, --font-brand, --white,
   --black, --light-gray, --dark-gray, --gray, --ease) já
   declaradas em :root, e a @font-face da fonte Geely do topo.
------------------------------------------------------------ */
.test-drive-section {
  background: var(--white);
  /* Respiro entre o Hero e o título — responsivo via media queries */
  padding: 90px 0 0;
}

.test-drive-title {
  font-family: var(--font-brand);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  color: var(--black);
  margin-bottom: 40px;
}

.test-drive-container {
  background: var(--light-gray);
  border-radius: 8px;
  padding: 24px 32px 22px;
}

/* Linha horizontal dos campos + botão + checkbox.
   O wrap coloca a política de privacidade em uma segunda linha. */
.test-drive-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 12px;
}

.test-drive-field {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 140px;
  min-width: 0;
}

/* Rótulos acessíveis: o placeholder continua sendo o rótulo visual */
.test-drive-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.test-drive-field input,
.test-drive-field select {
  display: block;
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--dark-gray);
  background: var(--white);
  border: 1px solid #E4E4E4;
  border-radius: 6px;
  transition: border-color var(--ease);
}

.test-drive-field input::placeholder {
  color: #8A8A8A;
  opacity: 1;
}

.test-drive-field input:focus,
.test-drive-field select:focus {
  border-color: var(--black);
}

/* Select com chevron própria (mesmo desenho da referência) */
.test-drive-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23666666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 11px 7px;
}

/* Campo de data: mantém o seletor nativo (exibe dd/mm/aaaa) */
.test-drive-field input[type="date"] {
  padding-right: 10px;
}

.test-drive-field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
}

/* Mensagem de validação do campo */
.test-drive-erro {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  color: #C0392B;
}

.test-drive-erro:empty {
  display: none;
}

.test-drive-field .test-drive-erro {
  margin-top: 4px;
}

.test-drive-field.erro input,
.test-drive-field.erro select {
  border-color: #E53935;
}

/* Botão "Agendar" */
.test-drive-submit {
  flex: 1 1 140px;
  min-width: 0;
  min-height: 40px;
  padding: 0 20px;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--ease);
}

.test-drive-submit:hover {
  background: #2a2a2a;
}

/* Checkbox + Política de Privacidade */
.test-drive-privacy {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--gray);
}

.test-drive-privacy input[type="checkbox"] {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin: 3px 0 0;
  accent-color: var(--black);
  cursor: pointer;
}

.test-drive-privacy label {
  cursor: pointer;
}

.test-drive-privacy a {
  color: var(--dark-gray);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--ease);
}

.test-drive-privacy a:hover {
  color: var(--black);
}

.test-drive-privacy.erro input[type="checkbox"] {
  box-shadow: 0 0 0 1px #E53935;
}

/* A mensagem de erro ocupa a linha inteira abaixo do texto */
.test-drive-privacy .test-drive-erro {
  flex: 1 0 100%;
}

/* Tablet: campos em duas colunas */
@media (max-width: 1024px) {
  .test-drive-section {
    padding-top: 76px;
  }

  .test-drive-title {
    font-size: 1.2rem;
  }

  .test-drive-container {
    padding: 22px 24px 20px;
  }

  .test-drive-field,
  .test-drive-submit {
    flex: 1 1 calc(50% - 6px);
  }
}

/* Celular: coluna única, checkbox antes do botão */
@media (max-width: 640px) {
  .test-drive-section {
    padding-top: 56px;
  }

  .test-drive-title {
    font-size: 1.05rem;
    letter-spacing: 1.5px;
    margin-bottom: 26px;
  }

  .test-drive-container {
    padding: 20px 16px 18px;
    border-radius: 6px;
  }

  .test-drive-fields {
    gap: 16px 12px;
  }

  .test-drive-field,
  .test-drive-submit {
    flex: 1 1 100%;
  }

  .test-drive-privacy {
    order: 1;
    font-size: 0.8rem;
  }

  .test-drive-submit {
    order: 2;
    min-height: 46px;
    font-size: 1rem;
  }
}

/* ------------------------------------------------------------
   5. SEÇÃO DE CHAMADA DO EX5
------------------------------------------------------------ */
.intro {
  padding: 110px 0 70px;
  background: var(--white);
}

.intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Frase em destaque na fonte de marca Geely.
   A quebra de linha é fixa no HTML (<br>), então o tamanho pode
   ser maior sem risco de reposicionar a frase. */
.intro-title {
  font-family: var(--font-brand);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--black);
  max-width: 1100px;
  margin-bottom: 26px;
}

.intro-text {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gray);
  max-width: 900px;
  margin-bottom: 38px;
}

/* ------------------------------------------------------------
   6. GALERIA
------------------------------------------------------------ */
.gallery-section {
  padding: 20px 0 60px;
  background: var(--white);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--light-gray);
  cursor: pointer;
}

.gallery-item:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 3px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* ------------------------------------------------------------
   Indicação de que a imagem abre ampliada:
   véu escuro + ícone de lupa (SVG inline, sem arquivo extra).
   Aparecem no hover e também no foco por teclado.
------------------------------------------------------------ */
.gallery-item::before,
.gallery-item::after {
  content: "";
  position: absolute;
  pointer-events: none; /* não intercepta o clique */
  opacity: 0;
  transition: opacity var(--ease), transform var(--ease);
}

/* Véu escuro sobre a foto */
.gallery-item::before {
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.35);
}

/* Ícone de lupa centralizado */
.gallery-item::after {
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%) scale(0.8);
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23fff'%20stroke-width='1.8'%20stroke-linecap='round'%3E%3Ccircle%20cx='10.5'%20cy='10.5'%20r='7'/%3E%3Cpath%20d='M15.8%2015.8%2021%2021'/%3E%3Cpath%20d='M10.5%207.5v6M7.5%2010.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.gallery-item:hover::before,
.gallery-item:focus-visible::before {
  opacity: 1;
}

.gallery-item:hover::after,
.gallery-item:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.gallery-cta {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

/* ------------------------------------------------------------
   7. TECNOLOGIA E CONFORTO
------------------------------------------------------------ */
.tech {
  padding: 70px 0 60px;
  background: var(--white);
}

.tech .section-title {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.tech .section-text {
  max-width: 900px;
  line-height: 1.8;
}

/* ------------------------------------------------------------
   8. IMAGEM DO EX5
------------------------------------------------------------ */
.ex5-image-section {
  padding: 30px 0 90px;
  background: var(--white);
}

.ex5-image {
  position: relative;
  width: 100%;
  /* proporção original da imagem: 2000x800 */
  aspect-ratio: 5 / 2;
  border-radius: 12px;
  overflow: hidden;
  background: var(--light-gray);
}

.ex5-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ------------------------------------------------------------
   9. 20 ANOS / BLOCO INSTITUCIONAL
------------------------------------------------------------ */
.anos {
  padding: 40px 0 60px;
  background: var(--white);
}

.anos-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Reserva a altura (proporção original: 1943x1713) antes do
   carregamento para evitar salto de layout */
.anos-logo {
  width: 100%;
  max-width: 240px;
  height: auto;
  aspect-ratio: 1943 / 1713;
  border-radius: 6px;
}

.institucional {
  padding: 30px 0 110px;
  background: var(--white);
}

.institucional-inner {
  max-width: 860px;
  margin: 0 auto;
}

.institucional .section-text {
  margin-bottom: 24px;
}

/* ------------------------------------------------------------
   10. FORMULÁRIO DE CONTATO
------------------------------------------------------------ */
.contact {
  position: relative;
  width: 100%;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark-gray);
}

.contact-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.contact-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* sobreposição leve para legibilidade */
.contact-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.05));
}

.contact-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

/* Painel translúcido — o formulário fica sobre a fotografia do EX5 */
.contact-form {
  width: 100%;
  max-width: 420px;
  background: rgba(18, 18, 18, 0.35);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 30px 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.field label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  font-family: var(--font);
  /* 16px evita o zoom automático do Safari iOS ao focar o campo */
  font-size: 1rem;
  color: var(--dark-gray);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 7px;
  padding: 12px 14px;
  transition: border-color var(--ease), background var(--ease);
}

.field input:focus,
.field select:focus {
  background: var(--white);
  border-color: var(--black);
}

/* ------------------------------------------------------------
   Estados de validação do formulário
------------------------------------------------------------ */

/* Mensagem de erro: fica oculta enquanto estiver vazia */
.field-erro {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  color: #ffb3a7;
  margin-top: 6px;
}

.field-erro:empty {
  display: none;
}

/* Campo com erro */
.field.erro label {
  color: #ffb3a7;
}

.field.erro input,
.field.erro select {
  border-color: #ff8a80;
  background: #fff2f0;
}

/* Botão em estado de envio */
.btn[disabled] {
  opacity: 0.75;
  cursor: default;
  transform: none;
}

/* ------------------------------------------------------------
   Confirmação de envio
------------------------------------------------------------ */
.form-sucesso {
  text-align: center;
  padding: 10px 4px 4px;
  outline: none;
}

.form-sucesso-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  margin-bottom: 18px;
}

.form-sucesso-titulo {
  font-family: var(--font-brand);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 10px;
}

.form-sucesso-texto {
  font-size: 0.9rem;
  font-weight: 400;
  color: #e4e4e4;
  line-height: 1.6;
  margin-bottom: 24px;
}

.form-sucesso-texto strong {
  color: var(--white);
  font-weight: 700;
}

/* Espaço entre "ABRIR WHATSAPP" e "ENVIAR NOVA MENSAGEM" */
.form-sucesso .btn-block + .btn-block {
  margin-top: 10px;
}

/* ------------------------------------------------------------
   11. MAPA
------------------------------------------------------------ */
.map-section {
  padding: 80px 0 100px;
  background: var(--white);
}

.map-wrapper {
  width: 100%;
  aspect-ratio: 16 / 6;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--light-gray);
}

.map-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-cta {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

/* ------------------------------------------------------------
   12. RODAPÉ
------------------------------------------------------------ */
.site-footer {
  background: var(--black);
  color: var(--white);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 48px;
  padding-top: 70px;
  padding-bottom: 60px;
}

.footer-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* Logo no rodapé: um pouco menor que o do header (34px) */
.footer-logo {
  display: block;
  height: 26px;
  width: auto;
  margin-bottom: 18px;
}

.footer-info p,
.footer-legal p {
  font-size: 0.82rem;
  font-weight: 300;
  color: #c9c9c9;
  line-height: 1.7;
  margin-bottom: 12px;
}

/* Telefone e endereço são links no mobile (tel: e Maps) */
.footer-info a {
  transition: color var(--ease);
}

.footer-info a:hover {
  color: var(--white);
}

.footer-social {
  display: flex;
  flex-direction: column;
}

/* margin negativa no container para o 1o ícone alinhar com o
   título da coluna, sem que as caixas de toque se sobreponham */
.social-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: -10px;
}

.social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px; /* alvo de toque de 44x44 */
  color: var(--white);
  opacity: 0.85;
  transition: opacity var(--ease), transform var(--ease);
}

.social-list a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* Rodapé final */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.footer-copy,
.footer-credit {
  font-size: 0.75rem;
  font-weight: 300;
  color: #bcbcbc;
}

/* ------------------------------------------------------------
   13. LIGHTBOX DA GALERIA
------------------------------------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 76px;
  background: rgba(0, 0, 0, 0.92);
  animation: lightbox-fade 0.25s ease;
}

.lightbox[hidden] {
  display: none;
}

@keyframes lightbox-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  line-height: 1;
  transition: background var(--ease);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* O foco padrão é preto e sumiria sobre o fundo escuro */
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 1.7rem;
  padding-bottom: 3px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.9rem;
  padding-bottom: 4px;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: #d8d8d8;
}

/* Trava a rolagem do fundo enquanto o lightbox está aberto */
body.lightbox-aberto {
  overflow: hidden;
}

/* ------------------------------------------------------------
   14. WHATSAPP FLUTUANTE
------------------------------------------------------------ */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  transition: transform var(--ease);
}

.whatsapp-float:hover {
  transform: scale(1.06);
}

/* ------------------------------------------------------------
   14.5. MENOS MOVIMENTO
   Quando o sistema do usuário pede menos animação, desliga a
   rolagem suave e as transições decorativas. O conteúdo nunca
   depende de animação para ficar visível.
------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-slide,
  .gallery-item img,
  .gallery-item::before,
  .gallery-item::after,
  .btn,
  .nav-link,
  .dropdown,
  .main-nav,
  .whatsapp-float,
  .lightbox {
    transition: none;
  }
}

/* ------------------------------------------------------------
   15. RESPONSIVIDADE
 ------------------------------------------------------------ */

/* Tablet */
@media (max-width: 1024px) {
  /* Header encurta para 70px — a folga das âncoras acompanha */
  #hero,
  #galeria,
  #tecnologia,
  #quem-somos,
  #contato {
    scroll-margin-top: 78px;
  }

  .header-inner {
    min-height: 70px;
  }

  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .intro-title {
    font-size: 1.9rem;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-info {
    grid-column: 1 / -1;
  }
}

/* Menu mobile */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--black);
    max-height: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    transition: max-height 0.3s ease;
  }

  /* Altura livre até a borda da tela: sem limite fixo, o menu não
     corta itens quando o usuário amplia a fonte do navegador.
     O 500px é o fallback para navegadores sem suporte a dvh. */
  .main-nav.open {
    max-height: 500px;
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    position: relative;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 20px;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 15px var(--gutter);
  }

  /* Dropdown vira bloco interno no mobile */
  .dropdown {
    position: static;
    opacity: 1;
    visibility: hidden;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: var(--dark-gray);
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease;
  }

  .nav-item.has-dropdown.open .dropdown {
    max-height: 300px;
    padding: 6px 0;
  }

  .dropdown li a {
    color: var(--white);
    padding: 12px var(--gutter);
  }

  .dropdown li a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  /* Empilha imagem + formulário (evita que a imagem "roube"
     a largura do formulário dentro do flex em linha) */
  .contact {
    display: block;
    min-height: 0;
    padding: 0 0 64px;
  }

  .contact-bg {
    position: relative;
    height: 300px;
  }

  .contact-inner {
    justify-content: center;
    margin-top: -60px;
  }

  /* Empilhado, o formulário fica boa parte sobre o fundo branco —
     o painel translúcido deixaria os rótulos brancos ilegíveis.
     Aqui ele vira uma chapa escura praticamente opaca. */
  .contact-form {
    background: rgba(16, 16, 16, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(255, 255, 255, 0.14);
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --gutter: 18px;
  }

  .logo-img {
    height: 28px;
  }

  .container-wide {
    padding: 0 18px;
  }

  .intro {
    padding: 72px 0 56px;
  }

  /* Escala junto com a largura para cada frase caber em 1 linha
     e o título se manter em 2 linhas no celular */
  .intro-title {
    font-size: min(1.4rem, 4.7vw);
  }

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

  .intro-text {
    font-size: 0.95rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Respiro mais generoso entre as seções no celular */
  .tech {
    padding: 64px 0 56px;
  }

  .ex5-image-section {
    padding: 56px 0 72px;
  }

  .anos {
    padding: 56px 0 64px;
  }

  .institucional {
    padding: 40px 0 72px;
  }

  .map-section {
    padding: 64px 0 72px;
  }

  .gallery-section {
    padding: 24px 0 64px;
  }

  /* A imagem original é 2000x800 e o carro ocupa 92% da largura:
     qualquer corte lateral amputa o veículo. Mantém a proporção
     real em vez de cortar. */
  .ex5-image {
    aspect-ratio: 5 / 2;
  }

  /* Lupa menor acompanha o tamanho das miniaturas */
  .gallery-item::after {
    width: 26px;
    height: 26px;
  }

  .map-wrapper {
    aspect-ratio: 4 / 3;
  }

  .contact-form {
    padding: 26px 20px;
  }

  /* Rótulos e mensagens de erro um pouco maiores para leitura */
  .field label {
    font-size: 0.8rem;
  }

  .field-erro {
    font-size: 0.78rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 50px;
    padding-bottom: 40px;
  }

  .footer-logo {
    height: 22px;
    margin-bottom: 14px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    /* Reserva a área do botão flutuante do WhatsApp */
    padding-bottom: 74px;
  }

  .lightbox {
    padding: 60px 14px 76px;
  }

  .lightbox-close,
  .lightbox-nav {
    width: 44px;
    height: 44px;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }

  .whatsapp-float {
    width: 48px;
    height: 48px;
    bottom: 16px;
    right: 16px;
  }

  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }

  .btn {
    padding: 12px 26px;
    font-size: 0.78rem;
  }
}

/* Telas muito estreitas (ex.: 320px):
   o logo encolhe para o hamburger não ser espremido.
   A galeria continua em 2 colunas, como pede o layout. */
@media (max-width: 380px) {
  .header-inner {
    gap: 14px;
  }

  .logo-img {
    height: 24px;
  }

  .container-wide {
    padding: 0 14px;
  }

  .institucional .section-title,
  .tech .section-title {
    font-size: 1.15rem;
  }

  .footer-legal p {
    font-size: 0.8rem;
  }
}
