/* Site público — Campos Salles Reformas e Construções */

.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--color-graphite-900);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.site-header .logo-link img {
  max-height: 48px;
  width: auto;
}

/* O logo tem o subtítulo "Reformas e Construções" em branco, que some
   sobre o fundo claro do rodapé. Uma base escura por trás resolve sem
   mexer no header (onde o contraste já é bom). */
.footer-logo-badge {
  display: inline-block;
  background: var(--color-graphite-900);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.footer-logo-badge img {
  display: block;
  max-height: 90px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--color-graphite-100);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--color-gold-500);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-actions .phone-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--color-graphite-100);
  display: none;
}

.header-actions .phone-link:hover {
  color: var(--color-gold-500);
}

.nav-toggle {
  display: none;
  background: none;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  min-width: 44px;
}

@media (max-width: 860px) {
  .site-header .container {
    gap: var(--space-2);
    flex-wrap: nowrap;
  }

  .site-header .logo-link {
    min-width: 0;
    flex-shrink: 1;
  }

  .site-header .logo-link img {
    max-height: 40px;
    width: auto;
  }

  .header-actions {
    gap: var(--space-2);
    flex-shrink: 0;
  }

  .header-actions .btn-primary {
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .header-actions .phone-link {
    display: none !important;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-graphite-900);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: var(--space-4);
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    gap: var(--space-2);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (min-width: 861px) {
  .header-actions .phone-link {
    display: inline-block;
  }
}

/* Animações de entrada ao rolar a página.
   Sem JS (sem a classe "js" em <html>), nada fica escondido — o
   conteúdo aparece normal, estático. Com JS, o scroll-reveal.js
   observa cada [data-reveal] e adiciona .is-revealed quando o
   elemento entra na viewport. */
html.js [data-reveal] {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js [data-reveal="up"] {
  transform: translateY(28px);
}

html.js [data-reveal="left"] {
  transform: translateX(-36px);
}

html.js [data-reveal="right"] {
  transform: translateX(36px);
}

html.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-graphite-900);
  color: var(--text-on-dark);
  padding: var(--space-12) 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-bg-static {
  display: none;
}

/* Quem prefere menos movimento recebe a imagem estática (o primeiro
   quadro do vídeo) em vez do vídeo em loop. */
@media (prefers-reduced-motion: reduce) {
  .hero-bg-video {
    display: none;
  }

  .hero-bg-static {
    display: block;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(20, 22, 26, 0.6) 0%, rgba(20, 22, 26, 0.45) 45%, rgba(20, 22, 26, 0.25) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 40ch;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.hero p.hero-text {
  color: var(--color-graphite-100);
  font-size: 1.125rem;
  max-width: 60ch;
  text-align: justify;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.hero .hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-6);
}

/* Seções gerais */
.section {
  padding: var(--space-12) 0;
}

.section-alt {
  background: #f7f5f0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .section-alt {
    background: #1a1d21;
  }
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-2);
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-8);
}

.text-justify {
  text-align: justify;
}

/* Grid de cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}

.card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.card img,
.card svg {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  font-size: 1.125rem;
}

.card-body p {
  color: var(--text-muted);
  flex: 1;
}

.card-body .btn {
  align-self: flex-start;
  margin-top: var(--space-3);
}

/* Credenciais / diferenciais */
.stat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-6);
  text-align: center;
}

.stat-list strong {
  display: block;
  font-size: 1.75rem;
  color: var(--color-gold-700);
}

.process-steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .process-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.process-steps li {
  list-style: none;
  position: relative;
  padding-left: 3rem;
}

.process-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-gold-600);
  color: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: var(--space-4) 0 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--color-graphite-300);
}

/* FAQ accordion (nativo, sem JS) */
.faq-list details {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.faq-list p {
  margin-top: var(--space-2);
  color: var(--text-muted);
}

/* Galeria de projeto */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
}

.gallery figure {
  margin: 0;
}

.gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.gallery figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* Depoimentos */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-6);
}

.testimonial-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.testimonial-card p.quote {
  font-style: italic;
}

.testimonial-card .author {
  font-weight: 600;
  margin-top: var(--space-3);
}

/* Formulário público */
.form-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  max-width: 640px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 var(--space-4);
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* WhatsApp flutuante */
.whatsapp-float {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 200;
  background: #25d366;
  color: #fff;
  border-radius: 999px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* Mapa sob interação */
.map-block {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  text-align: center;
  background: var(--surface-elevated);
}

/* Empty state público */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  color: var(--text-muted);
  border: 1px dashed var(--color-graphite-300);
  border-radius: var(--radius-md);
}

/* Banner de consentimento de cookies */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: var(--color-graphite-900);
  color: var(--color-white);
  padding: var(--space-4);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
}

.cookie-consent-box {
  max-width: var(--max-width);
  margin: 0 auto;
}

.cookie-consent-box p {
  margin: 0 0 var(--space-3);
}

.cookie-consent-box a {
  color: var(--color-gold-500);
}

.cookie-consent-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.cookie-consent-panel {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

/* Filtros de listagem */
.filter-bar {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.filter-bar select,
.filter-bar input {
  padding: 0.6rem;
  border: 1px solid var(--color-graphite-300);
  border-radius: var(--radius-sm);
}
