:root {
  --bg-forest: #0D1D0F;
  --bg-moss: #2C4E0D;
  --bg-cream: #F4F1EA;
  --bg-sage: #E6ECDF;
  --text-body: #54595F;
  --gold: #B8A57A;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-forest);
  color: var(--bg-cream);
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
}

::selection {
  background: var(--bg-moss);
  color: var(--bg-cream);
}

/* Lenis Smooth Scroll Setup */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

/* Tipografia Fluida Editorial */
.title-hero {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.75rem, 6.2vw, 6rem); /* Até 96px no desktop */
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 300;
}

.title-section {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.25rem, 4.6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  font-weight: 300;
}

.eyebrow {
  font-family: 'Manrope', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-weight: 500;
}

/* Textura de Granulado Editorial (Noise Overlay) */
.noise-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Linhas Douradas Sutis */
.gold-line-h {
  height: 1px;
  background: linear-gradient(90deg, rgba(184,165,122,0.45) 0%, rgba(184,165,122,0.12) 100%);
}
.gold-border {
  border-color: rgba(184, 165, 122, 0.28);
}

/* Cabeçalho com transição para Vidro Fosco */
header.nav-scrolled {
  background-color: rgba(13, 29, 15, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(184, 165, 122, 0.18);
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

/* Hero Ken Burns lento */
@keyframes kenBurns {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.11); }
}
.ken-burns {
  animation: kenBurns 26s ease-out forwards;
  will-change: transform;
}

/* Máscara de Palavras do Hero */
.word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.word-inner {
  display: inline-block;
  transform: translateY(115%);
  will-change: transform;
}

/* Revelação por Clip-Path nas imagens */
.reveal-clip {
  clip-path: inset(100% 0% 0% 0%);
  transition: clip-path 0.1s linear;
  will-change: clip-path;
}

/* Marquee Infinito */
@keyframes marqueeScroll {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 38s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}

/* Cursor Personalizado Discreto (Desktop) */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background-color: #B8A57A;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease,
              border 0.3s ease;
  mix-blend-mode: exclusion;
}
.custom-cursor.cursor-expanded {
  width: 54px;
  height: 54px;
  background-color: rgba(184, 165, 122, 0.15);
  border: 1px solid rgba(184, 165, 122, 0.7);
  mix-blend-mode: normal;
}

/* Imagem flutuante da seção de Serviços */
#service-hover-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 410px;
  pointer-events: none;
  z-index: 60;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 25px 50px -12px rgba(13, 29, 15, 0.45);
}
#service-hover-preview.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Acordeão FAQ */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
}
.faq-item.open .faq-answer {
  opacity: 1;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* Pulsação sutil botão flutuante WhatsApp */
@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(44, 78, 13, 0.55); }
  70% { box-shadow: 0 0 0 14px rgba(44, 78, 13, 0); }
}
.wa-pulse {
  animation: subtlePulse 3s infinite;
}

/* Scrollbar oculta para carrossel mobile */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Respeito a prefers-reduced-motion e dispositivos touch */
@media (prefers-reduced-motion: reduce) {
  .ken-burns, .marquee-track, .wa-pulse {
    animation: none !important;
  }
  .word-inner {
    transform: none !important;
  }
  .reveal-clip {
    clip-path: none !important;
  }
}

@media (max-width: 1023px) {
  .custom-cursor, #service-hover-preview {
    display: none !important;
  }
  .reveal-clip {
    clip-path: inset(0% 0% 0% 0%) !important;
  }
}

/* Áreas de toque de pelo menos 44px no celular e tablet (ajuste do deploy) */
@media (max-width: 1023px) {
  main a.inline-flex.text-xs,
  footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
