/* ==========================================================================
   Oficina do Condutor — redesign 2026
   Voz: sinalética rodoviária, didática, próxima.
   Roxo da marca #651F76 em estratégia comprometida, sem gradientes.
   ========================================================================== */

/* Handel Gothic (fonte do logótipo) — colocar o ficheiro em site/assets/fonts/
   com um destes nomes; enquanto não existir, cai no fallback (Fredoka). */
@font-face {
  font-family: "Handel Gothic";
  src: url("../assets/fonts/HANDGOTN.TTF") format("truetype");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --roxo: #651F76;
  --roxo-escuro: #4A1557;
  --roxo-vivo: #8E34A3;
  --roxo-texto: #651F76;
  --roxo-hover: #4A1557;
  --ink: #26192B;
  --texto: #43364A;
  --mudo: #6C5E74;
  --bg: #FFFFFF;
  --bg-eleva: #FFFFFF;
  --header-bg: rgba(255, 255, 255, 0.98);
  --superficie: #F8F5FA;
  --linha: #E7DEEC;
  --ambar: #F5A300;
  /* o âmbar cheio serve para preenchimentos e contornos; em texto,
     sobre branco, fica ilegível (2:1) — daí a variante escura */
  --ambar-texto: #8A5D00;
  --branco: #FFFFFF;
  --erro: #B3261E;
  --chip-roxo: rgba(101, 31, 118, 0.08);

  --fonte: "Overpass", "Segoe UI", system-ui, sans-serif;
  --fonte-titulos: "Poppins", "Overpass", system-ui, sans-serif;
  --mono: "Overpass Mono", ui-monospace, monospace;

  --raio: 10px;
  --raio-tile: 14px;

  --z-sticky: 20;
  --z-drop: 30;

  --transicao: 200ms cubic-bezier(0.22, 1, 0.36, 1);
  --ease-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Tema escuro ---------- */
html[data-tema="escuro"] {
  --roxo-texto: #CD93DC;
  --roxo-hover: #8E34A3;
  --ink: #F4EEF7;
  --texto: #D8CEDE;
  --mudo: #A99BB3;
  --bg: #17111B;
  --bg-eleva: #241B2B;
  --header-bg: rgba(23, 17, 27, 0.98);
  --superficie: #211927;
  --linha: #3B2E44;
  --erro: #FF9B93;
  --chip-roxo: rgba(205, 147, 220, 0.14);
  --ambar-texto: #F5A300;
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--fonte);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--texto);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--roxo-texto); text-underline-offset: 3px; }
a:hover { color: var(--roxo-hover); }
h1, h2, h3, h4 {
  color: var(--ink);
  font-family: var(--fonte-titulos);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
body, .site-header, .contact-form, .outro, .fc-card, .drop-list {
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--roxo); color: #fff; padding: 0.75rem 1.25rem;
  z-index: 100; border-radius: 0 0 var(--raio) 0; font-weight: 700;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 3px solid var(--roxo-vivo); outline-offset: 2px; border-radius: 4px; }

::selection { background: var(--roxo); color: #fff; }

/* ---------- Botões ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.6rem 0.8rem; /* Overpass assenta alto; compensa na base */
  border-radius: var(--raio);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transicao), color var(--transicao), border-color var(--transicao), transform var(--transicao);
}
.btn:active { transform: scale(0.98); }
.btn-solid { background: var(--roxo); color: #fff; }
.btn-solid:hover { background: var(--roxo-hover); color: #fff; }
.btn-ghost { border-color: var(--linha); color: var(--roxo-texto); background: transparent; }
.btn-ghost:hover { border-color: var(--roxo-texto); color: var(--roxo-texto); }
.btn-light { background: #fff; color: var(--roxo); }
.btn-light:hover { background: var(--superficie); color: var(--roxo-escuro); }

.text-link { font-weight: 700; }

.dot {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  margin: 0 0.55em;
  vertical-align: 0.18em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transicao), box-shadow var(--transicao);
}
.site-header.rolado {
  border-bottom-color: var(--linha);
  box-shadow: 0 4px 24px rgba(38, 25, 43, 0.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 76px;
  max-width: none;
  padding-inline: clamp(1rem, 2vw, 1.75rem);
}
html[data-tema="escuro"] .brand img { filter: brightness(0) invert(1); }
.brand img { width: 178px; height: auto; }

.nav-list {
  display: flex; align-items: center; gap: clamp(0.25rem, 1.5vw, 1rem);
}
.nav-list > li > a:not(.btn) {
  display: inline-block;
  padding: 0.6rem 0.7rem 0.45rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
}
.nav-list > li > a:not(.btn):hover { color: var(--roxo-texto); background: var(--superficie); }
.btn-nav { padding: 0.7rem 1.15rem 0.55rem; font-size: 0.95rem; }

.nav-toggle { display: none; }

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

/* dropdown Alunos */
.nav-dropdown { position: relative; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-weight: 600; color: var(--ink);
  background: none; border: 0; cursor: pointer;
  padding: 0.6rem 0.7rem 0.45rem; border-radius: 6px;
}
.nav-drop-btn:hover { color: var(--roxo-texto); background: var(--superficie); }
.nav-drop-btn svg { transition: transform var(--transicao); }
.nav-drop-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.drop-list {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 220px;
  background: var(--bg-eleva);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  box-shadow: 0 12px 32px rgba(38, 25, 43, 0.12);
  padding: 0.4rem;
  z-index: var(--z-drop);
  display: none;
}
.drop-list.aberto { display: block; }
.drop-list a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.65rem 0.85rem 0.5rem;
  border-radius: 7px;
  text-decoration: none; font-weight: 600; color: var(--ink);
}
.drop-list a:hover { background: var(--superficie); color: var(--roxo-texto); }
.ext { color: var(--mudo); font-size: 0.85em; }

/* botão de tema */
.tema-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1.5px solid var(--linha); border-radius: 50%;
  background: none; color: var(--ink); cursor: pointer;
  transition: border-color var(--transicao), color var(--transicao), background-color var(--transicao);
}
.tema-toggle:hover { border-color: var(--roxo-texto); color: var(--roxo-texto); background: var(--superficie); }
html[data-tema="claro"] .icone-sol { display: none; }
html[data-tema="escuro"] .icone-lua { display: none; }

/* ---------- Hero ---------- */
.hero {
  /* ocupa o primeiro ecrã inteiro — ao abrir só se vê o topo */
  min-height: calc(100vh - 77px);
  min-height: calc(100dvh - 77px);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* mantém o carro fora do ecrã sem criar scroll horizontal */
}
.hero-copy { position: relative; }
.hero h1 { position: relative; z-index: 1; }

/* carro roxo que atravessa por trás das letras do título ao abrir */
.hero-carro {
  position: absolute;
  top: 0; /* posição vertical definida por JS: logo abaixo da última linha do título */
  left: 50%;
  z-index: 0;
  width: clamp(92px, 9.5vw, 132px);
  color: var(--roxo);
  opacity: 0;
  pointer-events: none;
}
html[data-tema="escuro"] .hero-carro { color: var(--roxo-vivo); }
.hero-carro svg { display: block; width: 100%; height: auto; }
@keyframes carroAtravessa {
  0%   { transform: translateX(calc(-50vw - 170px)); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateX(calc(50vw + 170px)); opacity: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero.animar .hero-carro { animation: carroAtravessa 2300ms linear 0.5s backwards; }
}
.hero-grid {
  flex: 1;
  display: grid;
  place-items: center;
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.hero-copy {
  max-width: 64rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.9rem, 5.2vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.12;
}
.hero h1 .roxo {
  color: var(--roxo-texto);
  font-family: "Handel Gothic", "Fredoka", var(--fonte-titulos);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: lowercase; /* como o wordmark do logótipo */
  /* o intervalo entre palavras é normalizado por JS (a largura do espaço da
     Handel Gothic varia entre browsers — um valor fixo colava-as no Safari) */
  /* engrossa os traços (o ficheiro tem só um peso) */
  -webkit-text-stroke: 0.022em currentColor;
  paint-order: stroke fill;
}
.hero-lead {
  margin: 3.6rem auto 0; /* corredor para o carro passar equidistante, sem tapar texto */
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  max-width: 40em;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.85rem; margin-top: 2.2rem; }
.hero-cred {
  display: flex; align-items: flex-start; justify-content: center; gap: 0.55rem;
  margin-top: 2.4rem;
  font-size: 0.92rem; color: var(--mudo);
}
/* alinhado com a 1.ª linha do texto (e não com o centro do bloco, que em
   mobile quebra para 3 linhas e deixava o escudo a meio) */
.hero-cred svg { color: var(--roxo-texto); flex-shrink: 0; margin-top: calc((1.65em - 16px) / 2); }

.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 1;
  background: var(--roxo);
  color: #fff;
  border-radius: var(--raio-tile);
  font-family: var(--mono);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 700;
  line-height: 1;
  padding-top: 0.15em; /* compensa a linha de base do Overpass Mono */
  transition: background-color var(--transicao), transform var(--transicao);
}
.tile small {
  font-family: var(--fonte);
  font-size: 0.55rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-top: 0.35em;
}
.tile-amber { background: var(--ambar); color: #26192B; }

/* linha de estrada: divisor assinatura */
.road-divider {
  height: 0;
  border-top: 4px dashed var(--linha);
  margin-inline: auto;
  max-width: 72rem;
}

/* ---------- Secções: cabeçalho ---------- */
/* o scroll-padding-top do html já compensa o cabeçalho fixo;
   sem margem extra para a secção não aterrar demasiado baixo */
section { scroll-margin-top: 0; }
.section-head {
  max-width: 46em;
  margin-inline: auto;
  margin-bottom: clamp(2.2rem, 5vw, 3.5rem);
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 56px; height: 4px;
  border-radius: 2px;
  background: var(--roxo-texto);
  margin: 0.9rem auto 0;
}
.section-head p { margin-top: 0.9rem; font-size: 1.1rem; color: var(--mudo); }

/* ---------- Sobre / features ---------- */
.sobre { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--linha);
  border-left: 1px solid var(--linha);
}
.features li {
  padding: clamp(1.4rem, 2.5vw, 2rem);
  border-right: 1px solid var(--linha);
  border-bottom: 1px solid var(--linha);
}
.f-icon { width: 34px; height: 34px; color: var(--roxo-texto); }
.features h3 {
  font-size: 1.1rem; font-weight: 700;
  margin-top: 0.9rem;
}
.features p { margin-top: 0.45rem; font-size: 0.95rem; color: var(--mudo); }

/* ---------- Manifesto (bloco roxo) ---------- */
.manifesto {
  background: var(--roxo);
  color: #fff;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.manifesto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.manifesto h2 {
  color: #fff;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.manifesto-copy p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
}
.manifesto-copy p + p { margin-top: 1.1rem; }
.manifesto-copy strong { color: #fff; }
.manifesto-copy .btn { margin-top: 1.8rem; }

/* ---------- Serviços ---------- */
.servicos { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--superficie); }
.cat-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: start; /* cada grupo com a sua altura natural */
}
.cat-group {
  display: flex;
  flex-direction: column;
  background: var(--bg-eleva);
  border: 1px solid var(--linha);
  border-radius: 18px;
  padding: clamp(1.4rem, 2.5vw, 2rem);
}
.cat-group-title {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--roxo-texto);
  border-bottom: 2px solid var(--roxo-texto);
  padding-bottom: 0.7rem;
  margin-bottom: 0.2rem;
}
.grupo-icone { width: 22px; height: 22px; flex-shrink: 0; }
.cat {
  display: flex; gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px dashed var(--linha);
  align-items: flex-start;
}
.cat:last-child { border-bottom: 0; }
.cat .tile {
  flex: 0 0 56px;
  height: 56px; aspect-ratio: auto;
  border-radius: 12px;
  font-size: 1.15rem;
}
.cat h4 {
  font-size: 1.05rem; font-weight: 700;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem;
}
.idade {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--roxo-texto);
  background: var(--chip-roxo);
  border-radius: 99px;
  padding: 0.25em 0.7em 0.1em;
  white-space: nowrap;
}
.cat p { margin-top: 0.45rem; font-size: 0.92rem; color: var(--mudo); line-height: 1.6; }

.outros {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.outro {
  background: var(--bg-eleva);
  border: 1px solid var(--linha);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.2rem);
}
.outro h3 { font-size: 1.2rem; font-weight: 700; }
.outro p { margin: 0.6rem 0 1rem; color: var(--mudo); }

/* ---------- Formação ---------- */
.formacao { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.form-areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
}
.form-area { border-top: 3px solid var(--roxo-texto); padding-top: 1.4rem; }
.form-area header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.form-area h3 { font-size: 1.25rem; font-weight: 700; }
.ref {
  font-family: var(--mono);
  font-size: 0.78rem; font-weight: 600;
  color: var(--mudo);
  white-space: nowrap;
}
.form-area ul { margin-top: 1rem; }
.form-area li {
  padding: 0.55rem 0 0.4rem;
  border-bottom: 1px dashed var(--linha);
  font-size: 0.97rem;
}
.form-area li:last-child { border-bottom: 0; }
.form-area li a {
  color: inherit; text-decoration: none;
  display: block;
  transition: color var(--transicao);
}
.form-area li a:hover, .form-area li a:focus-visible { color: var(--roxo-texto); text-decoration: underline; }

.form-contacto {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  background: var(--superficie);
  border: 1px solid var(--linha);
  border-radius: 20px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.form-contacto h3 { font-size: 1.35rem; font-weight: 800; }
.fc-txt p { margin-top: 0.6rem; color: var(--mudo); }
.fc-card {
  background: var(--bg-eleva);
  border: 1px solid var(--linha);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
}
.fc-nome { font-weight: 800; color: var(--ink); font-size: 1.1rem; }
.fc-cargo { font-size: 0.9rem; color: var(--mudo); margin-top: 0.15rem; }
.fc-links { margin-top: 0.7rem; font-weight: 700; }
.fc-links a { text-decoration: none; }
.fc-links a:hover { text-decoration: underline; }

/* ---------- Avaliações (Google) ---------- */
.reviews {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  background: var(--superficie);
  overflow: hidden;
}
.reviews-head { text-align: center; }
.reviews-nota {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.95rem; color: var(--texto);
  margin-bottom: 1rem;
}
.reviews-nota strong { color: var(--ink); font-weight: 700; }
.reviews-estrelas { position: relative; display: inline-block; line-height: 1; }
.reviews-estrelas-base,
.reviews-estrelas-fill {
  font-size: 1.05rem; letter-spacing: 0.08em; white-space: nowrap;
}
.reviews-estrelas-base { color: var(--linha); }
.reviews-estrelas-fill {
  position: absolute; inset: 0;
  width: 96%; /* 4,8 de 5 */
  overflow: hidden;
  color: var(--ambar);
}

.reviews-carrossel {
  margin-top: clamp(2rem, 4vw, 3rem);
  overflow-x: auto;
  /* "proximity" e não "mandatory": com mandatory o snap cancela o scroll suave
     das setas (o carrossel ficava preso no mesmo cartão, sobretudo no Safari). */
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.reviews-carrossel::-webkit-scrollbar { display: none; }
.reviews-carrossel:focus-visible { outline: 2px solid var(--roxo-texto); outline-offset: -4px; }

.reviews-track {
  display: flex; align-items: stretch; gap: clamp(1rem, 2vw, 1.5rem);
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  width: max-content;
}
.review-card {
  scroll-snap-align: center;
  flex: 0 0 min(88vw, 27rem);
  display: flex; flex-direction: column;
  background: var(--bg-eleva);
  border: 1px solid var(--linha);
  border-radius: 18px;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  min-height: 19rem;
}
.review-aspas {
  display: block; text-align: center;
  font-family: var(--fonte-titulos); font-size: 3rem; font-weight: 800;
  line-height: 0.7; color: var(--roxo-texto); opacity: 0.35;
}
/* As avaliações mais longas ficam cortadas ao fim de 9 linhas (com "…"), para
   os cartões não ficarem gigantes por causa de uma só. O link do rodapé leva
   ao Google, onde se lê o texto completo. */
.review-card blockquote {
  margin-block: auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 9;
  line-clamp: 9;
  overflow: hidden;
  text-align: center; text-wrap: pretty;
  font-size: 1rem; line-height: 1.7; color: var(--texto);
  padding-block: 1.6rem;
}
.review-card cite {
  display: block; text-align: center;
  font-style: normal; font-weight: 700; color: var(--ink);
  padding-top: 1rem;
  border-top: 1px dashed var(--linha);
}

.reviews-rodape {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem; flex-wrap: wrap;
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
}
.reviews-setas { display: flex; gap: 0.6rem; }
.review-seta {
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: 99px; border: 1.5px solid var(--linha);
  background: var(--bg-eleva); color: var(--texto);
  cursor: pointer;
  transition: border-color var(--transicao), color var(--transicao), background-color var(--transicao);
}
.review-seta:hover { border-color: var(--roxo-texto); color: var(--roxo-texto); }
.review-seta[disabled] { opacity: 0.4; cursor: default; }
.review-seta[disabled]:hover { border-color: var(--linha); color: var(--texto); }

@media (max-width: 720px) {
  .reviews-rodape { justify-content: center; }
  .review-card { min-height: 20rem; }
}

/* ---------- Certificações ---------- */
.certs { border-block: 1px solid var(--linha); padding: 2rem 0; background: var(--bg); }
.certs-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.certs-row img {
  width: auto;
  filter: grayscale(1); opacity: 0.55;
  transition: filter var(--transicao), opacity var(--transicao);
}
.certs-row img:hover { filter: none; opacity: 1; }
/* Em modo escuro os logótipos (com texto escuro) ficariam ilegíveis;
   mostram-se a cores sobre um chip branco em vez de invertidos. */
html[data-tema="escuro"] .certs-row img {
  filter: none;
  opacity: 0.92;
  background: #fff;
  padding: 7px 11px;
  border-radius: 8px;
  box-sizing: content-box;
}
html[data-tema="escuro"] .certs-row img:hover { opacity: 1; }

/* ---------- Contactos ---------- */
.contactos { padding: clamp(3.5rem, 8vw, 6rem) 0 0; }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}
.c-list { margin: 0; }
.c-list div { padding: 1.1rem 0; border-bottom: 1px dashed var(--linha); }
.c-list div:first-child { padding-top: 0; }
.c-list dt {
  font-family: var(--mono);
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--roxo-texto);
  margin-bottom: 0.3rem;
}
.c-list dd { margin: 0; font-size: 1.05rem; color: var(--ink); font-weight: 600; }
.c-list dd a { color: var(--ink); text-decoration: none; }
.c-list dd a:hover { color: var(--roxo-texto); text-decoration: underline; }
.c-note { font-size: 0.8rem; color: var(--mudo); font-weight: 400; margin-top: 0.3rem; }

.horario { border-collapse: collapse; width: 100%; margin-top: 1.6rem; }
.horario caption {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--roxo-texto);
  margin-bottom: 0.5rem;
}
.horario th, .horario td {
  text-align: left;
  padding: 0.55rem 0 0.4rem;
  border-bottom: 1px dashed var(--linha);
  font-size: 0.97rem;
}
.horario th { font-weight: 700; color: var(--ink); padding-right: 1rem; }
.horario td { font-family: var(--mono); font-size: 0.88rem; color: var(--texto); }
.horario tr:last-child th, .horario tr:last-child td { border-bottom: 0; }

/* formulário */
.contact-form {
  background: var(--superficie);
  border: 1px solid var(--linha);
  border-radius: 20px;
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
}
.contact-form h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: 1.4rem; }
.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-weight: 700; font-size: 0.95rem; color: var(--ink);
  margin-bottom: 0.4rem;
}
.req { color: var(--ambar-texto); }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg-eleva);
  border: 1.5px solid var(--linha);
  border-radius: var(--raio);
  padding: 0.8rem 0.95rem 0.65rem;
  transition: border-color var(--transicao), box-shadow var(--transicao);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--roxo-texto);
  box-shadow: 0 0 0 3px var(--chip-roxo);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-error { color: var(--erro); font-size: 0.88rem; margin-top: 0.35rem; font-weight: 600; }
.field.invalido input, .field.invalido textarea { border-color: var(--erro); }
.form-note { margin-top: 0.9rem; font-size: 0.85rem; color: var(--mudo); }

.mapa { border-top: 1px solid var(--linha); }
.mapa iframe {
  display: block;
  width: 100%; height: 420px; border: 0;
  filter: grayscale(0.7);
  transition: filter 400ms ease;
}
.mapa iframe:hover { filter: none; }
html[data-tema="escuro"] .mapa iframe { filter: invert(0.9) hue-rotate(180deg) grayscale(0.3); }
html[data-tema="escuro"] .mapa iframe:hover { filter: invert(0.9) hue-rotate(180deg); }

.mapa-aviso, .mapa-recusado {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.9rem; text-align: center;
  height: 420px; padding: 2rem;
  background: var(--superficie); color: var(--mudo);
}
.mapa-aviso p, .mapa-recusado p { max-width: 26rem; }
@media (max-width: 720px) {
  .mapa-aviso, .mapa-recusado { height: 320px; }
}

/* ---------- Banner de cookies ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--ink); color: var(--bg);
  box-shadow: 0 -10px 30px rgba(20, 12, 24, 0.25);
}
.cookie-banner-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.1rem 0;
}
.cookie-banner-inner p { flex: 1; min-width: 240px; font-size: 0.92rem; line-height: 1.6; }
.cookie-banner-inner a { color: inherit; text-decoration: underline; }
.cookie-banner-acoes { display: flex; gap: 0.7rem; flex-shrink: 0; }
html[data-tema="escuro"] .cookie-banner { background: var(--superficie); color: var(--ink); border-top: 1px solid var(--linha); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--roxo-escuro);
  color: rgba(255, 255, 255, 0.82);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.foot-logo { display: flex; align-items: center; gap: 0.9rem; }
.foot-logo img { flex-shrink: 0; }
.foot-wordmark {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.foot-wordmark strong { font-weight: 800; }
.foot-wordmark span {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.2rem;
}
.foot-brand p { margin-top: 1.1rem; font-size: 0.95rem; max-width: 30em; }
.foot-social { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.2rem; }
.foot-social a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: #fff; font-weight: 700; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
  padding-bottom: 2px;
}
.foot-social a:hover { color: #fff; border-bottom-color: #fff; }

.foot-col h3 {
  color: #fff;
  font-size: 0.8rem; font-weight: 700;
  font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 1rem;
}
.foot-col li { margin-bottom: 0.6rem; font-size: 0.97rem; }
.foot-col a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.foot-col a:hover { color: #fff; text-decoration: underline; }

.foot-legal {
  border-top: 1px dashed rgba(255, 255, 255, 0.25);
  padding-block: 1.75rem 2.25rem;
  padding-right: 5.5rem; /* reserva a coluna dos contactos flutuantes */
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem 2.5rem;
  align-items: center;
}
.livro-reclamacoes {
  display: inline-flex; align-items: center; gap: 0.7rem;
  background: #fff;
  color: var(--roxo-escuro);
  border-radius: var(--raio);
  padding: 0.7rem 1.1rem;
  text-decoration: none;
  font-size: 0.85rem; line-height: 1.3;
  transition: transform var(--transicao);
}
.livro-reclamacoes:hover { transform: translateY(-2px); color: var(--roxo); }
.livro-reclamacoes svg { flex-shrink: 0; }
.foot-note { font-size: 0.85rem; }
.foot-note a { color: #fff; }
.copyright { grid-column: 1 / -1; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }

/* ---------- Contactos flutuantes ---------- */
.contactos-flutuantes {
  position: fixed;
  right: clamp(0.9rem, 2vw, 1.5rem);
  bottom: clamp(0.9rem, 2vw, 1.5rem);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.cf-btn {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 6px 18px rgba(20, 12, 24, 0.30);
  transition: transform var(--transicao);
}
.cf-btn:hover { transform: translateY(-3px) scale(1.06); color: #fff; }
.cf-whatsapp { background: #25D366; }
.cf-tel {
  background: var(--roxo);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4), 0 6px 18px rgba(20, 12, 24, 0.30);
}
html[data-tema="escuro"] .cf-tel { background: var(--roxo-vivo); }
.cf-mail { background: var(--ambar); color: #26192B; }
.cf-mail:hover { color: #26192B; }

/* ============ MOVIMENTO ============
   O conteúdo está sempre visível por defeito. As animações só são aplicadas
   quando o JS marca o arranque (.animar) ou a entrada no ecrã (.visto), e
   apenas se o utilizador não pediu movimento reduzido. Assim nada fica
   escondido se o JS falhar ou num renderizador sem animações. */
@keyframes sobe {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes desenhaEstrada {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
/* animação especial da 1ª subsecção */
@keyframes cartaEntra {
  from { opacity: 0; transform: translateY(30px) scale(0.93); }
  to { opacity: 1; transform: none; }
}
@keyframes iconePop {
  0% { opacity: 0; transform: scale(0.35) rotate(-18deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes tracoCresce {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: no-preference) {
  /* entrada coreografada do hero, no arranque da página */
  .hero.animar h1,
  .hero.animar .hero-lead,
  .hero.animar .hero-actions,
  .hero.animar .hero-cred { animation: heroIn 720ms var(--ease-quint) backwards; }
  .hero.animar h1 { animation-delay: 0.08s; }
  .hero.animar .hero-lead { animation-delay: 0.22s; }
  .hero.animar .hero-actions { animation-delay: 0.34s; }
  .hero.animar .hero-cred { animation-delay: 0.46s; }
  .hero.animar .road-divider { animation: desenhaEstrada 950ms var(--ease-expo) 0.55s backwards; }

  /* revelação individual ao rolar */
  .revela.visto { animation: sobe 600ms var(--ease-quint) backwards; }

  /* revelação em cascata (grelhas e listas) */
  .stagger.visto > * { animation: sobe 600ms var(--ease-quint) backwards; }
  .stagger.visto > *:nth-child(2) { animation-delay: 0.06s; }
  .stagger.visto > *:nth-child(3) { animation-delay: 0.12s; }
  .stagger.visto > *:nth-child(4) { animation-delay: 0.18s; }
  .stagger.visto > *:nth-child(5) { animation-delay: 0.24s; }
  .stagger.visto > *:nth-child(6) { animation-delay: 0.30s; }
  .stagger.visto > *:nth-child(7) { animation-delay: 0.36s; }
  .stagger.visto > *:nth-child(8) { animation-delay: 0.42s; }
  .stagger.visto > *:nth-child(n+9) { animation-delay: 0.48s; }

  /* ---- Animação especial: primeira subsecção ("Temos tudo o que precisas") ----
     Reveal em duas fases: o cartão sobe com escala e, logo a seguir, o ícone
     dá um pop com rotação. O traço do título cresce do centro. */
  .sobre-especial .section-head.visto h2::after {
    animation: tracoCresce 700ms var(--ease-expo) 0.15s backwards;
  }
  .features-especial.visto > li {
    animation: cartaEntra 640ms var(--ease-expo) backwards;
    animation-delay: calc(var(--i, 0) * 65ms);
  }
  .features-especial.visto > li .f-icon {
    animation: iconePop 560ms var(--ease-quint) backwards;
    animation-delay: calc(var(--i, 0) * 65ms + 240ms);
  }
}

/* ---------- Micro-interações ----------
   Só transform/opacity (compositadas pela GPU). As sombras de elevação
   vivem num pseudo-elemento e animam a opacidade — sem repaint por frame. */
.btn-solid:hover, .btn-light:hover, .btn-ghost:hover { transform: translateY(-2px); }

.f-icon { transition: transform var(--transicao); }
.features li:hover .f-icon { transform: scale(1.12) rotate(-4deg); }

.outro { position: relative; transition: transform var(--transicao), border-color var(--transicao), background-color var(--transicao); }
.outro::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 14px 30px rgba(38, 25, 43, 0.10);
  opacity: 0; transition: opacity var(--transicao);
}
.outro:hover { transform: translateY(-4px); border-color: var(--roxo-texto); }
.outro:hover::after { opacity: 1; }

.cat .tile { transition: transform var(--transicao); }
.cat:hover .tile { transform: translateY(-3px) rotate(-2deg); }

.tema-toggle svg { transition: transform 400ms var(--ease-quint); }
.tema-toggle:hover svg { transform: rotate(-20deg) scale(1.05); }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .cat-groups { grid-template-columns: 1fr; gap: 2.5rem; }
  .manifesto-grid { grid-template-columns: 1fr; }
  .form-areas { grid-template-columns: 1fr; }
  .form-contacto { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .foot-legal { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 1000px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font: inherit; font-weight: 700; color: var(--ink);
    background: none; border: 1.5px solid var(--linha); border-radius: 8px;
    padding: 0.55rem 0.9rem 0.4rem;
    cursor: pointer;
  }
  .nav-toggle-bar {
    width: 16px; height: 2px; background: currentColor; position: relative;
  }
  .nav-toggle-bar::before, .nav-toggle-bar::after {
    content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor;
  }
  .nav-toggle-bar::before { top: -5px; }
  .nav-toggle-bar::after { top: 5px; }

  .nav-list {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.15rem;
    background: var(--bg-eleva);
    border-bottom: 1px solid var(--linha);
    box-shadow: 0 16px 32px rgba(38, 25, 43, 0.12);
    padding: 0.75rem clamp(1.25rem, 4vw, 2.5rem) 1.25rem;
  }
  .nav-list.aberto { display: flex; }
  .nav-list > li > a:not(.btn), .nav-drop-btn { display: block; width: 100%; text-align: left; padding: 0.8rem 0.6rem 0.65rem; }
  .nav-drop-btn { display: flex; justify-content: space-between; }
  .drop-list { position: static; box-shadow: none; border: 0; background: var(--superficie); margin-top: 0.25rem; }
  .nav-cta-item { margin-top: 0.6rem; }
  .btn-nav { display: block; text-align: center; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 76px; }
  .header-inner { min-height: 68px; }
  .brand img { width: 150px; }

  .features { grid-template-columns: 1fr; }
  .outros { grid-template-columns: 1fr; }
  .form-area header { flex-direction: column; gap: 0.2rem; }
  .certs-row { justify-content: center; }
  .certs-row img { height: 36px; }
  .mapa iframe { height: 320px; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .site-footer { padding-bottom: 4.5rem; }
  .foot-legal { padding-right: 4.25rem; }
  .cf-btn { width: 50px; height: 50px; }

  /* corredor livre para os contactos flutuantes no hero */
  .hero-grid { padding-bottom: 6.5rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-cred { padding-inline: 3.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
