/* Moto Náutica — folha de estilo
   Cores tiradas do portfolio (turquesa) e do logótipo (preto, ponto azul). */

@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-latin-700-italic.woff2") format("woff2");
  font-weight: 700; font-style: italic; font-display: swap;
}

:root {
  --laguna: #49B8C2;        /* turquesa do portfolio */
  --laguna-clara: #E2EFF5;
  --geba: #0D4E6E;          /* azul-petróleo: botões, ligações, faixas */
  --geba-escuro: #093A53;
  --tinta: #1D2326;         /* texto */
  --tinta-suave: #4F5B5F;
  --cinza: rgba(214, 232, 242, 0.5);
  --linha: #D0DDE4;
  --wa: #178A43;            /* verde WhatsApp com contraste para texto branco */
  --wa-escuro: #11703A;
  --ponto: #2557A7;         /* ponto azul do logótipo: foco do teclado */

  --largura: 72rem;
  --margem: clamp(1.1rem, 4vw, 2.5rem);
  --titulo: "Barlow Condensed", "Arial Narrow", sans-serif;
  --texto: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--tinta);
  background: #F7FAFC url("../img/fundo-ondas-claro.webp") repeat;
  background-size: 420px;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--geba); text-underline-offset: 0.18em; }
a:hover { color: var(--geba-escuro); }
:focus-visible { outline: 3px solid var(--ponto); outline-offset: 3px; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }

h1, h2 {
  font-family: var(--titulo);
  font-weight: 700;
  font-style: italic;
  line-height: 1.02;
  letter-spacing: -0.005em;
}
h2 { font-size: clamp(2rem, 4.6vw, 2.75rem); margin-bottom: 0.5em; }
h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }

.saltar {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--geba); color: #fff; padding: 0.5rem 1rem; z-index: 100;
}
.saltar:focus { left: 0.5rem; }

/* Botões */
.botao {
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 3rem; padding: 0.7em 1.25em;
  font: 600 1rem/1.2 var(--texto);
  text-decoration: none; border-radius: 6px; border: 2px solid transparent;
  cursor: pointer;
}
.botao .icone { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.botao-wa { background: var(--wa); color: #fff; }
.botao-wa:hover { background: var(--wa-escuro); color: #fff; }
.botao-contorno { border-color: rgba(255,255,255,0.8); color: #fff; }
.botao-contorno:hover { background: rgba(255,255,255,0.12); color: #fff; }
.botao-contorno-escuro { border-color: var(--geba); color: var(--geba); }
.botao-contorno-escuro:hover { background: var(--laguna-clara); }
.botao-claro { background: #fff; color: var(--geba); }
.botao-claro:hover { background: var(--laguna-clara); color: var(--geba-escuro); }
.botao-pequeno { min-height: 2.5rem; padding: 0.45em 1em; }
.acoes { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Cabeçalho */
.topo {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--linha);
}
.topo-interior {
  max-width: var(--largura); margin: 0 auto; padding: 0.6rem var(--margem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.marca img { height: 48px; width: auto; }
.menu-botao {
  display: none;
  font: 600 1rem var(--texto); color: var(--tinta);
  background: none; border: 2px solid var(--linha); border-radius: 6px;
  padding: 0.45em 0.9em; cursor: pointer;
}
.menu { display: flex; align-items: center; gap: 1.5rem; }
.menu a:not(.botao) { color: var(--tinta); text-decoration: none; font-weight: 600; }
.menu a:not(.botao):hover { color: var(--geba); text-decoration: underline; }

@media (max-width: 859px) {
  .js .menu-botao { display: block; }
  .js .menu { display: none; }
  .menu { width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 0.75rem; }
  .menu.aberto { display: flex; }
  .menu a:not(.botao) { padding: 0.8rem 0; border-top: 1px solid var(--linha); }
  .menu .botao { margin-top: 0.75rem; justify-content: center; }
  .marca img { height: 38px; }
}

/* Hero */
.hero {
  background: var(--geba) url("../img/fundo-hero.webp") repeat;
  background-size: 440px;
  color: #fff;
  display: grid;
}
.hero-texto {
  position: relative; padding: 2.5rem var(--margem) 3.5rem;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-texto > * { position: relative; z-index: 1; }
.hero-texto::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(9, 62, 92, 0.9) 30%, rgba(9, 62, 92, 0.5));
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2.9rem, 11vw, 5.25rem);
  max-width: 11ch;
  margin-bottom: 0.35em;
}
.hero p { font-size: 1.15rem; max-width: 34ch; color: #E6F1F2; margin-bottom: 1.5em; }
.hero-foto { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--geba-escuro); }
.hero-foto .slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1.4s ease;
}
.hero-foto .slide.ativo { opacity: 1; }
.hero-local { font-size: 0.98rem !important; color: #BFE3EA !important; margin-top: -0.6em; }
@media (prefers-reduced-motion: no-preference) {
  .hero-foto img.slide.ativo { animation: aproximar 7s ease-out both; }
  .hero-texto p { animation: entrar 0.9s 0.55s cubic-bezier(.2,.7,.2,1) both; }
  .hero-texto .acoes { animation: entrar 0.9s 0.7s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes aproximar { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes entrar { from { opacity: 0; transform: translateX(-2.5rem); } to { opacity: 1; transform: none; } }

@media (min-width: 960px) {
  .hero { grid-template-columns: max(42%, calc((100vw - var(--largura)) / 2 + var(--margem) + 31rem)) minmax(0, 1fr); min-height: clamp(34rem, 70vh, 46rem); }
  .hero-texto {
    padding: 4rem 3rem 6rem max(var(--margem), calc((100vw - var(--largura)) / 2 + var(--margem)));
  }
  .hero-foto { aspect-ratio: auto; }
}

/* Garantias */
.garantias {
  list-style: none; margin: 0 auto; padding: 1.5rem var(--margem);
  max-width: var(--largura);
  display: grid; grid-template-columns: 1fr; gap: 1rem;
  border-bottom: 1px solid var(--linha);
}
.garantias li { display: flex; flex-direction: column; padding-left: 0.9rem; border-left: 3px solid var(--laguna); }
.garantias strong { font-weight: 600; }
.garantias span { color: var(--tinta-suave); font-size: 0.95rem; }
@media (min-width: 640px) { .garantias { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .garantias { grid-template-columns: repeat(4, 1fr); padding-block: 2rem; } }

/* Secções */
.seccao { padding: clamp(3rem, 8vw, 5.5rem) var(--margem); }
.seccao > * { max-width: var(--largura); margin-inline: auto; }
.seccao-cinza { background: var(--cinza); }
.seccao-cab { margin-bottom: 2rem; }
.seccao-cab p { max-width: 52ch; color: var(--tinta-suave); font-size: 1.125rem; }

.duas-colunas { display: grid; gap: 2rem; }
@media (min-width: 860px) {
  .duas-colunas { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 3.5rem; align-items: start; }
  .duas-colunas-foto { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}

.duas-colunas .seccao-cab { margin-bottom: 0; }
.foto img { width: 100%; border-radius: 14px; }
.foto-retrato img { max-height: 26rem; width: auto; margin-inline: auto; }

/* Famílias de produtos */
.familias {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 1rem;
}
.familia h3 { margin: 0.75rem 0 0.25rem; }
.familia p { color: var(--tinta-suave); font-size: 0.95rem; margin: 0; }
.familia-img {
  height: 8.5rem; border-radius: 14px;
  background: var(--laguna-clara);
  display: grid; place-items: center; overflow: hidden;
}
.familia-img img { width: 100%; height: 100%; object-fit: cover; }
.icone-grande { width: 3.25rem; height: 3.25rem; fill: none; stroke: var(--geba); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

.familia-destaque { grid-column: span 2; }
.familia-destaque .familia-img { position: relative; }
.marca-sobre-foto {
  position: absolute; left: 0.75rem; bottom: 0.75rem;
  width: auto !important; height: 2.4rem !important; object-fit: contain !important;
  background: #fff; padding: 0.45rem 0.7rem; border-radius: 4px;
}
.familia-destaque h3 { font-family: var(--titulo); font-style: italic; font-weight: 700; font-size: 1.6rem; }

.familia-pedido {
  grid-column: span 2;
  background: var(--geba); color: #fff; border-radius: 14px;
  padding: 1.5rem;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.4rem;
}
.familia-pedido h3 { margin: 0; font-family: var(--titulo); font-style: italic; font-weight: 700; font-size: 1.6rem; }
.familia-pedido p { color: #E6F1F2; margin-bottom: 0.75rem; }

@media (min-width: 720px) {
  .familias { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.25rem; }
  .familia-img { height: 9.5rem; }
}
@media (min-width: 1024px) {
  .familias { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Serviços */
.servicos { margin: 0; display: grid; gap: 0; }
.servicos > div { padding: 1rem 0; border-top: 1px solid var(--linha); }
.servicos > div:last-child { border-bottom: 1px solid var(--linha); }
.servicos dt { font-weight: 600; font-size: 1.125rem; }
.servicos dd { margin: 0.15rem 0 0; color: var(--tinta-suave); }
@media (min-width: 640px) {
  .servicos { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
  .servicos > div:nth-last-child(2) { border-bottom: 1px solid var(--linha); }
}

/* Clientes */
.clientes { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.clientes li { display: flex; flex-direction: column; color: var(--tinta-suave); }
.clientes strong { color: var(--tinta); font-weight: 600; }
@media (min-width: 640px) { .clientes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; } }

/* Faixa proforma */
.faixa-proforma {
  background-color: var(--geba);
  background-image: linear-gradient(90deg, rgba(13, 78, 110, 0.97) 40%, rgba(13, 78, 110, 0.6)), url("../img/fundo-ondas-escuro.webp");
  background-size: auto, 360px;
  color: #fff; padding: clamp(2.5rem, 6vw, 3.75rem) var(--margem); }
.faixa-interior { max-width: var(--largura); margin: 0 auto; display: grid; gap: 1.5rem; align-items: center; }
.faixa-proforma h2 { margin-bottom: 0.3em; }
.faixa-proforma p { color: #E6F1F2; font-size: 1.125rem; margin: 0; }
@media (min-width: 860px) { .faixa-interior { grid-template-columns: 1fr auto; gap: 3rem; } }

/* Sobre nós */
.texto p { max-width: 60ch; }
.distancias { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: 1rem 2.25rem; }
.distancias li { display: flex; flex-direction: column; color: var(--tinta-suave); font-size: 0.95rem; }
.distancias b { font-family: var(--titulo); font-style: italic; font-weight: 700; font-size: 2.25rem; line-height: 1; color: var(--geba); }

/* Contactos */
address { font-style: normal; font-size: 1.15rem; margin-bottom: 1.25rem; }
.horario { margin: 0 0 1.25rem; }
.horario > div { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.horario dt { font-weight: 600; min-width: 9rem; }
.horario dd { margin: 0; }
.contactos { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.3rem; }

/* Marcas */
.marcas h2 { margin-bottom: 1.5rem; }
.grupo-marcas { padding: 1.25rem 0; border-top: 1px solid var(--linha); }
.grupo-marcas h3 { font-size: 0.95rem; color: var(--tinta-suave); margin-bottom: 1rem; }
.logos { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem; }
.logos img { height: 30px; width: auto; max-width: 9.5rem; object-fit: contain; filter: grayscale(1); opacity: 0.72; }
.logos img:hover { filter: none; opacity: 1; }
.logos-principais img { height: 34px; max-width: 13rem; filter: none; opacity: 1; }
@media (min-width: 640px) { .logos-principais img { height: 44px; } }

/* Rodapé */
.rodape { background: var(--tinta); color: #C9D2D4; padding: 2.5rem var(--margem) 6rem; font-size: 0.95rem; }
.rodape-interior { max-width: var(--largura); margin: 0 auto; display: grid; gap: 1rem; }
.rodape img { height: 40px; width: auto; }
.rodape p { margin: 0; }
@media (min-width: 860px) { .rodape-interior { grid-template-columns: auto 1fr auto; align-items: center; gap: 2.5rem; } }

/* Botão WhatsApp flutuante */
.wa-flutuante {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom));
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 60;
}
.wa-flutuante:hover { background: var(--wa-escuro); color: #fff; }
.wa-flutuante svg { width: 1.9rem; height: 1.9rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.seccao-cab p:last-child { margin-bottom: 0; }

/* Serviços: foto */
.foto-servico { margin-top: 2rem; }
.foto-servico img { max-height: 24rem; width: 100%; object-fit: cover; object-position: 50% 30%; }
.foto-servico figcaption { margin-top: 0.5rem; font-size: 0.9rem; color: var(--tinta-suave); }

/* Selo "desde 2020" */
.foto-com-selo { position: relative; }
.selo {
  position: absolute; width: 8rem; height: 8rem; right: 0.75rem; bottom: -2rem;
  transform: rotate(-9deg);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}
.selo-texto { font-family: var(--titulo); font-style: italic; font-weight: 700; font-size: 17px; letter-spacing: 2.4px; fill: #fff; }
.selo-ancora { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 860px) { .selo { width: 9.5rem; height: 9.5rem; right: auto; left: -2.5rem; bottom: -2.5rem; } }

/* Mapa */
.mapa { border-radius: 14px; overflow: hidden; background: var(--linha); aspect-ratio: 4 / 3; }
.mapa iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Nome de marca enquanto não houver logótipo */
.logo-texto { font-family: var(--titulo); font-weight: 700; font-style: italic; font-size: 2.1rem; line-height: 1; letter-spacing: 0.04em; color: var(--tinta); }

/* Galeria */
.galeria-grelha { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.galeria-grelha img { width: 100%; height: 100%; aspect-ratio: 10 / 7; object-fit: cover; border-radius: 12px; }
@media (min-width: 860px) {
  .galeria-grelha { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
}
/* Cartões de família sobre o fundo com ondas */
.familia:not(.familia-pedido) h3, .familia:not(.familia-pedido) p { text-shadow: 0 0 6px #F7FAFC, 0 0 2px #F7FAFC; }

/* Sobre nós: foto do balcão sobreposta */
.foto-com-selo { margin-top: 1rem; }
.foto-inset {
  position: absolute; top: -1.5rem; right: -0.75rem; width: 34% !important; height: auto;
  border: 5px solid #fff; border-radius: 10px; box-shadow: 0 6px 18px rgba(9, 58, 83, 0.28);
  transform: rotate(3deg);
}
@media (min-width: 860px) { .foto-inset { top: -2.5rem; right: -1.5rem; width: 36% !important; } }

/* Família sem foto: ilustração */
.familia-ilustracao { background: linear-gradient(135deg, var(--geba), #2C82A8); }
.familia-ilustracao .icone-grande { stroke: #fff; width: 3.75rem; height: 3.75rem; }

/* ===== Topo: movimento ===== */
/* Título: cada linha sobe por trás de uma "máscara", depois um brilho atravessa-o */
.hero h1 .linha { display: block; overflow: hidden; padding: 0 0.12em 0.06em 0; margin-right: -0.12em; }
.hero h1 .linha > span {
  display: inline-block;
  background: linear-gradient(100deg, #fff 42%, #A9EAF2 50%, #fff 58%) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: subir 1s cubic-bezier(.16,.84,.3,1) both, brilho 9s 1.6s ease-in-out infinite;
}
.hero h1 .linha:nth-child(2) > span { animation-delay: 0.12s, 1.75s; }
.hero h1 .linha:nth-child(3) > span { animation-delay: 0.24s, 1.9s; }
@keyframes subir { from { transform: translateY(105%); } to { transform: none; } }
@keyframes brilho { 0% { background-position: 100% 0; } 18%, 100% { background-position: 0 0; } }

/* Padrão de ondas do painel a deslizar devagar */
.hero { animation: deriva 80s linear infinite; }
@keyframes deriva { from { background-position: 0 0; } to { background-position: 440px 220px; } }

/* Ondas animadas na base do painel azul */
.hero-ondas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 4.5rem; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-ondas .onda { transform-box: view-box; }
.onda-1 { fill: rgba(73, 184, 194, 0.18); animation: mar 14s linear infinite; }
.onda-2 { fill: rgba(73, 184, 194, 0.28); animation: mar 9s linear infinite reverse; }
@keyframes mar { from { transform: translateX(0); } to { transform: translateX(-600px); } }

/* Quem pede menos movimento vê só um fade, sem deslocações */
@media (prefers-reduced-motion: reduce) {
  .hero h1 .linha > span { animation: aparecer 1.2s ease both; }
  .hero, .onda-1, .onda-2 { animation-duration: 240s; }
}
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }

/* Facebook */
.icone-fb { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: #1877F2; color: #fff !important; flex: none; }
.icone-fb:hover { background: #0F5FCC; }
.icone-fb svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.menu .icone-fb { padding: 0; border-top: 0; }
@media (max-width: 859px) { .menu .icone-fb { margin-top: 0.75rem; } }
.rodape-redes { display: flex; align-items: center; gap: 0.6rem; }
.rodape-redes a:not(.icone-fb) { color: #fff; }
.rodape-interior { grid-template-columns: auto 1fr auto auto; }
@media (max-width: 859px) { .rodape-interior { grid-template-columns: 1fr; } }
