/* ============================================================
   V2 HIGIENIZAÇÃO — dark premium
   Paleta: preto profundo, branco, dourado (logo)
   ============================================================ */

:root {
  --black: #050505;
  --black-2: #0c0c0c;
  --black-3: #141414;
  --white: #f5f3ee;
  --white-dim: rgba(245, 243, 238, 0.55);
  --gold: #d9a941;
  --gold-light: #f0cf7e;
  --gold-dark: #9a7222;
  --gold-grad: linear-gradient(120deg, #9a7222 0%, #d9a941 35%, #f6e2a0 50%, #d9a941 65%, #9a7222 100%);
  --font-sans: "Archivo", sans-serif;
  --font-serif: "Cormorant Garamond", serif;
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: initial; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

html {
  /* clip impede que qualquer excesso lateral expanda o viewport no mobile */
  overflow-x: clip;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 400;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--black); }

/* ---------- utilitários ---------- */

.gold-text {
  background: var(--gold-grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldShine 6s linear infinite;
}

.gold-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  background: var(--gold-grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldShine 6s linear infinite;
}

@keyframes goldShine {
  to { background-position: 200% center; }
}

.section-kicker {
  font-size: 12px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.section-title {
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

/* ---------- grain ---------- */

.grain {
  position: fixed;
  inset: -100%;
  pointer-events: none;
  z-index: 200;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainMove 8s steps(10) infinite;
}

@keyframes grainMove {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -8%); }
  30% { transform: translate(4%, 6%); }
  50% { transform: translate(-7%, 3%); }
  70% { transform: translate(6%, -5%); }
  90% { transform: translate(-3%, 7%); }
}

/* ---------- loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transition: opacity 0.8s ease, visibility 0.8s;
}

.loader.done { opacity: 0; visibility: hidden; }

.loader__logo {
  width: 110px;
  animation: loaderPulse 2s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

.loader__bar {
  width: 160px;
  height: 1px;
  background: rgba(245, 243, 238, 0.12);
  overflow: hidden;
}

.loader__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold-grad);
  transition: width 0.3s ease;
}

/* ---------- canvas 3D ---------- */

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* mobile: acompanha a barra de endereço */
  z-index: 1;
  pointer-events: none;
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  transition: background 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom-color: rgba(245, 243, 238, 0.06);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.nav__brand img { height: 34px; }

.nav__brand span {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--white-dim);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__links a {
  color: var(--white-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: color 0.3s;
  position: relative;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.35s ease;
}

.nav__links a:hover { color: var(--white); }
.nav__links a:hover::after { width: 100%; }

.nav__cta {
  border: 1px solid var(--gold-dark);
  padding: 9px 22px;
  border-radius: 100px;
  color: var(--gold) !important;
  transition: background 0.35s, color 0.35s !important;
}

.nav__cta::after { display: none; }

.nav__cta:hover {
  background: var(--gold);
  color: var(--black) !important;
}

/* ---------- conteúdo acima do canvas ---------- */

main { position: relative; z-index: 10; }

/* ---------- hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.hero__content {
  position: relative;
}

/* halo escuro atrás do texto do hero para garantir leitura sobre o sofá */
.hero__content::before {
  content: "";
  position: absolute;
  inset: -22% -38%;
  background: radial-gradient(ellipse 58% 54% at 50% 50%, rgba(5, 5, 5, 0.72) 0%, rgba(5, 5, 5, 0.4) 55%, transparent 78%);
  z-index: -1;
  pointer-events: none;
}

.hero__kicker {
  font-size: 12px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
  text-shadow: 0 2px 14px rgba(5, 5, 5, 0.95), 0 1px 3px rgba(5, 5, 5, 0.8);
}

.hero__title {
  font-size: clamp(56px, 11vw, 160px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
  text-transform: none;
  /* drop-shadow (e não text-shadow) para funcionar também no texto dourado com clip */
  filter: drop-shadow(0 4px 22px rgba(5, 5, 5, 0.9)) drop-shadow(0 1px 5px rgba(5, 5, 5, 0.7));
}

.hero__title .line {
  display: block;
  overflow: hidden;
}

.hero__title .line > span {
  display: inline-block;
  transform: translateY(110%);
}

.hero__sub {
  margin-top: 36px;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(245, 243, 238, 0.78);
  text-shadow: 0 2px 12px rgba(5, 5, 5, 0.95), 0 1px 3px rgba(5, 5, 5, 0.8);
}

.hero__scrollhint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero__scrollhint span {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white-dim);
}

.hero__scrollline {
  width: 1px;
  height: 56px;
  background: rgba(245, 243, 238, 0.15);
  position: relative;
  overflow: hidden;
}

.hero__scrollline::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gold);
  animation: scrollHint 2s ease-in-out infinite;
}

@keyframes scrollHint {
  0% { top: -100%; }
  60%, 100% { top: 100%; }
}

/* ---------- transformação (pin) ---------- */

.transform {
  height: 400vh;
  position: relative;
}

.transform__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* vinheta lateral e inferior: escurece as bordas onde ficam os textos */
.transform__sticky::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.82) 0%, transparent 34%, transparent 66%, rgba(5, 5, 5, 0.82) 100%),
    linear-gradient(0deg, rgba(5, 5, 5, 0.7) 0%, transparent 20%);
}

.transform__label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  max-width: 340px;
  opacity: 0;
}

.transform__label--before { left: 7vw; }
.transform__label--after { right: 7vw; text-align: right; }

.transform__label h2 {
  font-size: clamp(44px, 5.5vw, 88px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  filter: drop-shadow(0 3px 16px rgba(5, 5, 5, 0.9)) drop-shadow(0 1px 4px rgba(5, 5, 5, 0.7));
}

.transform__label--before h2 { color: rgba(245, 243, 238, 0.45); }

.transform__label p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(245, 243, 238, 0.8);
  text-shadow: 0 2px 12px rgba(5, 5, 5, 0.95), 0 1px 3px rgba(5, 5, 5, 0.85);
}

.transform__progress {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, 70vw);
}

.transform__progressbar {
  height: 1px;
  background: rgba(245, 243, 238, 0.12);
  overflow: hidden;
}

.transform__progressbar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold-grad);
}

.transform__progresslabels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.transform__progresslabels em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white-dim);
}

/* ---------- manifesto ---------- */

.manifesto {
  padding: 32vh 8vw;
  display: flex;
  justify-content: center;
}

.manifesto__text {
  max-width: 1000px;
  font-size: clamp(26px, 3.6vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-align: center;
}

.manifesto__text .word {
  display: inline-block;
  opacity: 0.12;
}

.manifesto__text em {
  font-family: var(--font-serif);
  font-style: italic;
  background: var(--gold-grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- serviços ---------- */

.services {
  padding: 18vh 6vw 22vh;
  position: relative;
  background: linear-gradient(180deg, transparent 0%, rgba(12, 12, 12, 0.85) 18%, rgba(12, 12, 12, 0.85) 82%, transparent 100%);
}

.services__head {
  margin-bottom: 90px;
  max-width: 800px;
}

.services__grid {
  display: grid;
  /* 6 colunas: 3 cards de 2 colunas em cima, 2 cards de 3 colunas embaixo */
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: rgba(245, 243, 238, 0.07);
  border: 1px solid rgba(245, 243, 238, 0.07);
}

.service-card { grid-column: span 2; }
.service-card:nth-child(4),
.service-card:nth-child(5) { grid-column: span 3; }

@media (max-width: 1080px) {
  .service-card,
  .service-card:nth-child(4),
  .service-card:nth-child(5) { grid-column: span 3; }
  /* 2 por linha: o 5º (impermeabilização) ocupa a linha inteira */
  .service-card:nth-child(5) { grid-column: span 6; }
}

@media (max-width: 640px) {
  .service-card,
  .service-card:nth-child(4),
  .service-card:nth-child(5) { grid-column: span 6; }
}

.service-card {
  background: var(--black-2);
  padding: 56px 40px 48px;
  position: relative;
  overflow: hidden;
  transition: background 0.5s ease;
  will-change: transform;
}

.service-card:hover { background: var(--black-3); }

.service-card__num {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--gold-dark);
  margin-bottom: 40px;
  letter-spacing: 0.1em;
}

.service-card h3 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.service-card p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--white-dim);
}

.service-card__line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.service-card:hover .service-card__line { transform: scaleX(1); }

.service-card--gold {
  background: radial-gradient(120% 120% at 20% 0%, rgba(217, 169, 65, 0.14) 0%, var(--black-2) 55%);
}

.service-card--gold h3 {
  background: var(--gold-grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- impermeabilização ---------- */

.shield {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 16vh 8vw;
}

.shield__inner { max-width: 620px; }

.shield__text {
  margin-top: 32px;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--white-dim);
}

.shield__list {
  margin-top: 44px;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.shield__list li {
  padding: 20px 0;
  border-bottom: 1px solid rgba(245, 243, 238, 0.08);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.02em;
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.shield__list li:first-child { border-top: 1px solid rgba(245, 243, 238, 0.08); }

/* ---------- final ---------- */

.final {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20vh 24px;
  position: relative;
}

.final::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 60%, rgba(217, 169, 65, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.final__logo {
  width: 90px;
  margin-bottom: 48px;
  filter: drop-shadow(0 0 40px rgba(217, 169, 65, 0.35));
}

.final__title {
  font-size: clamp(38px, 6vw, 84px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  filter: drop-shadow(0 3px 18px rgba(5, 5, 5, 0.9)) drop-shadow(0 1px 4px rgba(5, 5, 5, 0.7));
}

.final__sub {
  margin-top: 28px;
  font-size: 15px;
  font-weight: 300;
  color: rgba(245, 243, 238, 0.8);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px rgba(5, 5, 5, 0.95);
}

.final__cta {
  margin-top: 56px;
  display: inline-block;
  padding: 18px 52px;
  border-radius: 100px;
  background: var(--gold-grad);
  background-size: 200% auto;
  color: var(--black);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s;
  animation: goldShine 6s linear infinite;
  box-shadow: 0 0 0 rgba(217, 169, 65, 0);
}

.final__cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 48px rgba(217, 169, 65, 0.35);
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
  border-top: 1px solid rgba(245, 243, 238, 0.06);
  font-size: 12px;
  color: var(--white-dim);
  letter-spacing: 0.06em;
  background: var(--black);
}

.footer__tag {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold-dark);
  font-size: 14px;
}

/* ---------- responsivo ---------- */

@media (max-width: 860px) {
  :root { --nav-h: 60px; }

  .nav { padding: 0 20px; }
  .nav__links { gap: 20px; }
  .nav__links a:not(.nav__cta) { display: none; }
  .nav__cta { padding: 8px 18px; font-size: 12px; }
  .nav__brand img { height: 28px; }
  .nav__brand span { display: none; }

  /* hero */
  .hero { padding: 0 20px; }
  .hero__kicker { font-size: 10px; letter-spacing: 0.3em; margin-bottom: 20px; }
  .hero__title { font-size: clamp(48px, 14vw, 72px); }
  .hero__sub { margin-top: 26px; font-size: 15px; }
  .hero__scrollhint { bottom: 22px; }
  .hero__scrollline { height: 40px; }

  /* transformação: textos no topo e na base, vinheta vertical */
  .transform__sticky::before {
    background:
      linear-gradient(180deg, rgba(5, 5, 5, 0.88) 0%, transparent 30%),
      linear-gradient(0deg, rgba(5, 5, 5, 0.88) 0%, transparent 32%);
  }
  .transform__label { max-width: 72vw; }
  .transform__label--before { left: 6vw; top: calc(var(--nav-h) + 28px); transform: none; }
  .transform__label--after { right: 10vw; top: auto; bottom: 15%; transform: none; }
  .transform__label h2 { font-size: 42px; margin-bottom: 10px; }
  .transform__label p { font-size: 13px; line-height: 1.6; }
  .transform__progress { bottom: 26px; width: 64vw; }

  /* manifesto */
  .manifesto { padding: 20vh 7vw; }
  .manifesto__text { font-size: clamp(22px, 6.4vw, 32px); }

  /* serviços */
  .services { padding: 12vh 5vw 14vh; }
  .services__head { margin-bottom: 48px; }
  .section-kicker { margin-bottom: 16px; }
  .service-card { padding: 36px 24px 34px; }
  .service-card__num { margin-bottom: 24px; }
  .service-card h3 { font-size: 21px; }

  /* impermeabilização */
  .shield { padding: 12vh 7vw; min-height: auto; }
  .shield__text { margin-top: 24px; }
  .shield__list { margin-top: 32px; }
  .shield__list li { padding: 16px 0; font-size: 14px; }

  /* final */
  .final { padding: 14vh 20px 18vh; }
  .final__logo { width: 64px; margin-bottom: 32px; }
  .final__sub { margin-top: 20px; font-size: 13px; padding: 0 6vw; }
  .final__cta { margin-top: 40px; padding: 16px 44px; font-size: 14px; }

  .footer { padding: 24px 20px; flex-direction: column; gap: 8px; }
}
