﻿/* Refinos leves além do Tailwind CDN */

/* Lightbox catálogo: `hidden` + classe `flex` no mesmo nó — Tailwind faz o flex ganhar; forçar fechado. */
#catalog-lightbox[hidden] {
  display: none !important;
}

#catalog-lightbox .catalog-lightbox-prev[hidden],
#catalog-lightbox .catalog-lightbox-next[hidden] {
  display: none !important;
}

/* Hero / banners: caixa com aspect-ratio da imagem; imagem inteira visível (sem crop) */
.hero-banner-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
}

/* Largura = tamanho real da imagem (px), até o máximo do ecrã; centrado (evita “zoom” em ecrãs largos) */
#hero-slider-aspect {
  box-sizing: content-box;
  width: 100%;
  min-width: 0;
  max-width: min(100%, var(--hero-native-w, 4000px));
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 130px;
  overflow-x: clip;
  touch-action: pan-y pinch-zoom;
  pointer-events: auto;
  -webkit-touch-callout: none;
}

@media (max-width: 767px) {
  #hero-slider-aspect {
    padding-bottom: clamp(3rem, 16vw, 5.5rem);
  }
}

/* Destaques: evita arrastar o slide horizontalmente a ativar “voltar” no browser */
section[aria-label='Destaques'] {
  overscroll-behavior-x: contain;
}

html {
  scroll-padding-top: 8.5rem;
  overflow-x: clip;
  /* Evita “pulo” horizontal quando a barra de rolagem aparece/some */
  scrollbar-gutter: stable;
}

body {
  background-color: #f5f5f5;
}

/* Marca d’água “SCR” (estilo flyer) — áreas claras; hero escuro cobre por cima */
.site-bg-watermark {
  background-color: #f5f5f5;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22320%22%20height%3D%22228%22%3E%3Ctext%20transform%3D%22rotate%28-14%20160%20114%29%22%20x%3D%2250%25%22%20y%3D%2255%25%22%20dominant-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20fill%3D%22%23B72727%22%20fill-opacity%3D%220.055%22%20font-family%3D%22system-ui%2CSegoe%20UI%2Csans-serif%22%20font-weight%3D%22900%22%20font-size%3D%2272%22%3ESCR%3C%2Ftext%3E%3C%2Fsvg%3E");
  background-repeat: repeat;
  background-size: 320px 228px;
}

/* Mesmo padrão na seção “Linha” (fundo claro tipo flyer) */
#linha-atuacao {
  background-color: rgba(255, 255, 255, 0.94);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22320%22%20height%3D%22228%22%3E%3Ctext%20transform%3D%22rotate%28-14%20160%20114%29%22%20x%3D%2250%25%22%20y%3D%2255%25%22%20dominant-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20fill%3D%22%23B72727%22%20fill-opacity%3D%220.055%22%20font-family%3D%22system-ui%2CSegoe%20UI%2Csans-serif%22%20font-weight%3D%22900%22%20font-size%3D%2272%22%3ESCR%3C%2Ftext%3E%3C%2Fsvg%3E");
  background-repeat: repeat;
  background-size: 320px 228px;
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 7rem;
  }
}

.touch-manipulation {
  touch-action: manipulation;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: #b72727;
  color: #fff;
  font-weight: 700;
  border-radius: 0.375rem;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* Faixa de contacto: ícones centrados no círculo (sem “descida” óptica) */
.info-strip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.info-strip-icon svg {
  display: block;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  main h2.font-display.text-3xl {
    font-size: 1.625rem;
    line-height: 1.2;
  }
}

/* h2 (Playfair + marca): sombra suave para leitura em fundo claro ou escuro */
main h2.font-display.text-brand {
  text-shadow:
    0 0 1px rgba(6, 18, 24, 0.22),
    0 1px 2px rgba(6, 18, 24, 0.16),
    0 2px 16px rgba(6, 18, 24, 0.1);
  letter-spacing: -0.01em;
}

main h2.font-display.text-white {
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(0, 0, 0, 0.28);
}

/* Painel admin: h2 brancos (cards, formulários) */
body.min-h-screen.bg-void main h2.font-semibold.text-white {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(0, 0, 0, 0.22);
}

/* Header: logo grande no topo; encolhe ao rolar a página */
.site-header {
  transition:
    box-shadow 0.35s ease,
    background-color 0.35s ease,
    border-color 0.35s ease;
}

#site-header .header-nav-main a {
  position: relative;
}

#site-header .header-nav-main a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 100%;
  height: 2px;
  background: rgba(183, 39, 39, 0.95);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

#site-header .header-nav-main a:hover::after {
  transform: scaleX(1);
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  background-color: #fff;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* Header escuro — layout autopeças (mantém contraste ao rolar) */
.site-header.site-header--dark.is-scrolled {
  background-color: rgba(9, 9, 11, 0.94);
  border-bottom-color: #b72727;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

#site-header.site-header--dark .header-nav-main a::after {
  background: #b72727;
  bottom: -0.15rem;
  height: 3px;
}

/* Hero full-bleed no layout impactante */
.hero-shell #hero-slider-aspect.hero-slider-impact {
  max-width: 100%;
  padding-bottom: clamp(2rem, 10vw, 5rem);
}

@media (max-width: 767px) {
  .hero-shell #hero-slider-aspect.hero-slider-impact {
    padding-bottom: clamp(1.5rem, 12vw, 3.5rem);
  }
}

/* Hero: leitura forte + efeito “tech” (brilhos vermelhos à direita) */
.hero-slide-photo {
  filter: brightness(0.58) contrast(1.08) saturate(0.92);
}

.hero-slide-scrim {
  background: linear-gradient(
    90deg,
    rgba(2, 2, 4, 0.92) 0%,
    rgba(6, 6, 10, 0.78) 32%,
    rgba(12, 10, 14, 0.45) 52%,
    rgba(8, 8, 12, 0.25) 72%,
    rgba(4, 4, 8, 0.55) 100%
  );
}

.hero-tech-fx {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.hero-tech-fx__glow {
  position: absolute;
  inset: -15% -20% -15% 35%;
  background: radial-gradient(ellipse 70% 55% at 78% 42%, rgba(183, 39, 39, 0.42) 0%, rgba(183, 39, 39, 0.08) 45%, transparent 68%);
  animation: hero-tech-pulse 10s ease-in-out infinite alternate;
}

.hero-tech-fx__streaks {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -11deg,
    transparent 0,
    transparent 36px,
    rgba(183, 39, 39, 0.07) 36px,
    rgba(183, 39, 39, 0.07) 37px
  );
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 38%, black 55%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 38%, black 55%);
  opacity: 0.85;
  animation: hero-tech-drift 14s ease-in-out infinite alternate;
}

.hero-tech-fx__hud {
  position: absolute;
  right: 4%;
  top: 18%;
  width: min(42vw, 520px);
  height: 42%;
  min-height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 55%);
  box-shadow:
    0 0 0 1px rgba(183, 39, 39, 0.12) inset,
    0 24px 80px rgba(0, 0, 0, 0.35);
  opacity: 0.55;
}

.hero-tech-fx__hud::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(183, 39, 39, 0.5), transparent);
  box-shadow: 0 28px 0 0 rgba(255, 255, 255, 0.06);
}

.hero-tech-fx__hud::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 28%;
  bottom: 28%;
  height: 42%;
  border-left: 1px solid rgba(183, 39, 39, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(to top right, rgba(183, 39, 39, 0.12), transparent 65%);
  border-radius: 0 0 0 6px;
}

@media (max-width: 767px) {
  .hero-tech-fx__hud {
    right: -8%;
    top: 8%;
    width: 58vw;
    opacity: 0.35;
  }
}

@keyframes hero-tech-pulse {
  0% {
    opacity: 0.75;
    transform: scale(1) translateX(0);
  }
  100% {
    opacity: 1;
    transform: scale(1.04) translateX(-1.5%);
  }
}

@keyframes hero-tech-drift {
  0% {
    transform: translateX(-1%) translateY(0.5%);
  }
  100% {
    transform: translateX(2%) translateY(-0.5%);
  }
}

/* Cards “Trabalhamos com” — borda marca + hover (sem tom azulado do ring/borda clara) */
.linha-produto-card {
  position: relative;
  border: 1px solid rgba(183, 39, 39, 0.22);
  background: linear-gradient(165deg, #ffffff 0%, rgba(250, 250, 250, 0.96) 55%, rgba(183, 39, 39, 0.04) 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(183, 39, 39, 0.06) inset;
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.28s ease;
}

.linha-produto-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(120% 80% at 10% 0%, rgba(183, 39, 39, 0.09) 0%, transparent 55%);
  transition: opacity 0.28s ease;
}

.linha-produto-card:hover {
  border-color: rgba(183, 39, 39, 0.5);
  transform: translateY(-3px);
  box-shadow:
    0 12px 36px -12px rgba(183, 39, 39, 0.35),
    0 8px 24px -8px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(183, 39, 39, 0.12) inset;
}

.linha-produto-card:hover::after {
  opacity: 1;
}

.linha-produto-dot {
  box-shadow: 0 0 10px rgba(183, 39, 39, 0.45);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease;
}

.linha-produto-card:hover .linha-produto-dot {
  transform: scale(1.2);
  box-shadow: 0 0 16px rgba(183, 39, 39, 0.65);
}

@media (prefers-reduced-motion: reduce) {
  .linha-produto-card,
  .linha-produto-card::after,
  .linha-produto-dot {
    transition: none;
  }

  .linha-produto-card:hover {
    transform: none;
  }

  .linha-produto-card:hover .linha-produto-dot {
    transform: none;
  }
}

.hero-title-impact {
  color: #f4f4f5;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.85),
    0 8px 40px rgba(0, 0, 0, 0.75),
    0 0 80px rgba(0, 0, 0, 0.35);
  letter-spacing: -0.03em;
}

.hero-sub-impact {
  color: rgba(228, 228, 231, 0.92);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.65);
}

.hero-cta-primary {
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.45),
    0 0 48px -8px rgba(183, 39, 39, 0.65);
}

.hero-cta-secondary {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.06);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.hero-no-banner-base {
  background:
    radial-gradient(ellipse 100% 80% at 80% 20%, rgba(183, 39, 39, 0.22) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a0c 0%, #030305 100%);
}

@media (prefers-reduced-motion: reduce) {
  .hero-tech-fx__glow,
  .hero-tech-fx__streaks {
    animation: none;
  }
}

.site-header-inner {
  transition:
    padding-top 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    padding-bottom 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  /* Padding um pouco menor libera altura para a logo maior sem subir o min-height da barra */
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  /* Altura mínima fixa = logo no estado “grande” + padding: o encolhimento visual
     não reduz a caixa do header, evitando reflow que mudava scrollY e gerava tremor. */
  min-height: 4.5rem;
  box-sizing: border-box;
  align-items: center;
}

@media (min-width: 768px) {
  .site-header-inner {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    min-height: 5rem;
  }
}

@media (min-width: 1024px) {
  .site-header-inner {
    min-height: 5.25rem;
  }
}

.site-header.is-scrolled .site-header-inner {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}

.header-logo-link {
  text-decoration: none;
}

.header-logo-img {
  display: block;
  width: auto;
  height: 3.35rem;
  max-height: 3.35rem;
  max-width: min(13.5rem, calc(100vw - 5.5rem));
  object-fit: contain;
  object-position: center center;
  transition:
    height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
  .header-logo-img {
    height: 3.6rem;
    max-height: 3.6rem;
    max-width: min(15rem, calc(100vw - 6rem));
  }
}

@media (min-width: 768px) {
  .header-logo-img {
    height: 3.9rem;
    max-height: 3.9rem;
    max-width: min(16rem, 40vw);
  }
}

@media (min-width: 1024px) {
  .header-logo-img {
    height: 4.1rem;
    max-height: 4.1rem;
    max-width: 17rem;
  }
}

.site-header.is-scrolled .header-logo-img {
  height: 2.6rem;
  max-height: 2.6rem;
}

@media (min-width: 640px) {
  .site-header.is-scrolled .header-logo-img {
    height: 2.7rem;
    max-height: 2.7rem;
  }
}

@media (min-width: 768px) {
  .site-header.is-scrolled .header-logo-img {
    height: 2.85rem;
    max-height: 2.85rem;
  }
}

@media (min-width: 1024px) {
  .site-header.is-scrolled .header-logo-img {
    height: 2.95rem;
    max-height: 2.95rem;
  }
}

/* Logo circular no header — manter proporção redonda */
.header-logo-img.logo-round {
  width: 4.1rem !important;
  height: 4.1rem !important;
  max-width: 4.1rem !important;
  max-height: 4.1rem !important;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 640px) {
  .header-logo-img.logo-round {
    width: 4.35rem !important;
    height: 4.35rem !important;
    max-width: 4.35rem !important;
    max-height: 4.35rem !important;
  }
}

.site-header.is-scrolled .header-logo-img.logo-round {
  width: 3.15rem !important;
  height: 3.15rem !important;
  max-width: 3.15rem !important;
  max-height: 3.15rem !important;
}

.header-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.35rem;
  height: 3.35rem;
  transition:
    width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.header-logo-fallback svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

@media (min-width: 768px) {
  .header-logo-fallback {
    width: 3.9rem;
    height: 3.9rem;
  }
}

@media (min-width: 1024px) {
  .header-logo-fallback {
    width: 4.1rem;
    height: 4.1rem;
  }
}

.site-header.is-scrolled .header-logo-fallback {
  width: 2.6rem;
  height: 2.6rem;
}

@media (min-width: 768px) {
  .site-header.is-scrolled .header-logo-fallback {
    width: 2.85rem;
    height: 2.85rem;
  }
}

@media (min-width: 1024px) {
  .site-header.is-scrolled .header-logo-fallback {
    width: 2.95rem;
    height: 2.95rem;
  }
}

/**
 * Degradê na foto: base 100% opaca com a cor do card para não “vazar”
 * fundo claro da imagem nem o fundo da página atrás do card.
 */
.pillar-image-fade {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Base clara para cards em layout light */
  background: linear-gradient(
    to top,
    rgb(255, 255, 255) 0%,
    rgb(255, 255, 255) 24%,
    rgba(255, 255, 255, 0.92) 42%,
    rgba(255, 255, 255, 0.55) 64%,
    rgba(255, 255, 255, 0.1) 86%,
    transparent 100%
  );
}

/* Fotos claras: degradê mais baixo para não “apagar” a imagem */
.pillar-image-fade--bright {
  background: linear-gradient(
    to top,
    rgb(255, 255, 255) 0%,
    rgb(255, 255, 255) 14%,
    rgba(255, 255, 255, 0.82) 32%,
    rgba(255, 255, 255, 0.35) 58%,
    rgba(255, 255, 255, 0.08) 82%,
    transparent 100%
  );
}

/* Entrada ao rolar a página */
.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Mobile: texto e cards visíveis sem depender do JS (evita “página vazia” + melhora LCP percebido) */
@media (max-width: 767px) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal-group > .reveal:nth-child(n) {
    --reveal-delay: 0ms;
  }
}

.reveal-group > .reveal:nth-child(1) {
  --reveal-delay: 0ms;
}
.reveal-group > .reveal:nth-child(2) {
  --reveal-delay: 85ms;
}
.reveal-group > .reveal:nth-child(3) {
  --reveal-delay: 170ms;
}
.reveal-group > .reveal:nth-child(4) {
  --reveal-delay: 255ms;
}
.reveal-group > .reveal:nth-child(5) {
  --reveal-delay: 340ms;
}
.reveal-group > .reveal:nth-child(6) {
  --reveal-delay: 425ms;
}
.reveal-group > .reveal:nth-child(7) {
  --reveal-delay: 510ms;
}
.reveal-group > .reveal:nth-child(8) {
  --reveal-delay: 595ms;
}
.reveal-group > .reveal:nth-child(9) {
  --reveal-delay: 680ms;
}

/* Cards claros (faixa de informações, figuras de seção, formulário) */
.card-lift {
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease;
  border-radius: 1rem;
}

@media (hover: hover) and (pointer: fine) {
  .card-lift:hover {
    transform: translateY(-8px);
    box-shadow:
      0 22px 44px -16px rgba(0, 0, 0, 0.12),
      0 0 0 1px rgba(183, 39, 39, 0.35);
  }

  .card-lift:hover .card-lift-img {
    transform: scale(1.06);
  }
}

.card-lift .card-lift-img {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

#contato .card-lift {
  box-shadow: 0 16px 40px -20px rgba(15, 23, 42, 0.22);
}

footer {
  backdrop-filter: none;
}

/* Crédito F5 no rodapé — tamanho fixo e discreto (não herda escala do header) */
.footer-dev-logo {
  height: auto;
  width: auto;
}

/* Pilares escuros */
.card-lift-dark {
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
  .card-lift-dark:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow:
      0 28px 56px -12px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(220, 38, 38, 0.35),
      0 0 28px rgba(220, 38, 38, 0.12);
  }

  .card-lift-dark:hover .pillar-card-img {
    transform: scale(1.05);
  }
}

.card-lift-dark .pillar-card-img {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .animate-hero-line {
    animation: none !important;
    transform: scaleY(1) !important;
    opacity: 1 !important;
  }

  .site-header,
  .site-header-inner,
  .header-logo-img,
  .header-logo-fallback {
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card-lift,
  .card-lift-dark,
  .card-lift .card-lift-img {
    transition: none;
  }

  @media (hover: hover) and (pointer: fine) {
    .card-lift:hover,
    .card-lift-dark:hover {
      transform: none;
    }

    .card-lift:hover .card-lift-img {
      transform: none;
    }

    .card-lift-dark:hover .pillar-card-img {
      transform: none;
    }
  }
}

