/* =========================================================
   Danilo Barros Paisagismo — Landing Page
   Tema claro · areia / oliva / esmeralda
   Fraunces (títulos) + Karla (corpo)
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --sand:        #F7F4EE;
  --sand-deep:   #EFEAE0;
  --sand-warm:   #E7E0D3;
  --olive:       #2F3A2C;
  --olive-soft:  #5C6656;
  --clay:        #A8886A;
  --clay-soft:   #C6AB92;
  --emerald:     #1E6B4F;
  --emerald-dark:#17553F;
  --line:        rgba(47, 58, 44, .14);
  --line-soft:   rgba(47, 58, 44, .08);

  --shell: 1240px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --section-y: clamp(5rem, 10vw, 9rem);

  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Karla", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --radius: 2px;

  --header-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--sand);
  color: var(--olive);
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: .004em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.is-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--olive);
  color: var(--sand);
  padding: .8rem 1.2rem;
}
.skip-link:focus { left: .75rem; top: .75rem; }

/* ---------- Layout ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--sand-deep); }

.section__head { max-width: 46rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.section__sub {
  margin-top: 1.1rem;
  color: var(--olive-soft);
  font-size: 1.1em;
  max-width: 34rem;
}

/* ---------- Tipografia ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--clay);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: .85rem;
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
  flex: none;
  opacity: .7;
}
.eyebrow--light { color: var(--sand); }

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -.022em;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}

.lead {
  font-size: 1.16em;
  line-height: 1.65;
}

p + p { margin-top: 1.25rem; }

em { font-style: italic; }

/* ---------- Botões ---------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .95rem 1.7rem;
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  transition: background-color .35s var(--ease), color .35s var(--ease),
              transform .35s var(--ease), box-shadow .35s var(--ease);
  will-change: transform;
}

.btn--primary {
  background: var(--emerald);
  color: #F6F8F4;
  box-shadow: 0 1px 2px rgba(23, 85, 63, .18), 0 10px 26px -12px rgba(23, 85, 63, .55);
}
.btn--primary:hover {
  background: var(--emerald-dark);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(23, 85, 63, .2), 0 18px 34px -14px rgba(23, 85, 63, .6);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--olive);
  background: transparent;
}
.btn--ghost:hover {
  background: var(--olive);
  color: var(--sand);
  border-color: var(--olive);
}

.btn--lg {
  padding: 1.12rem 2.1rem;
  font-size: 1rem;
}

.icon-wa { width: 1.25em; height: 1.25em; flex: none; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease),
              border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(.75rem, 4vw, 2rem);
}

.site-header.is-stuck {
  background: rgba(247, 244, 238, .92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--line-soft);
}

/* Marca */
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--sand);
  transition: color .4s var(--ease);
  flex: none;
}
.site-header.is-stuck .brand { color: var(--olive); }

.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.06rem;
  letter-spacing: .01em;
  font-variation-settings: "SOFT" 30;
}
.brand__sub {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .28em;
  opacity: .8;
}

.nav__cta {
  padding: clamp(.55rem, 1.6vw, .72rem) clamp(.85rem, 3vw, 1.35rem);
  font-size: clamp(.72rem, 2.3vw, .85rem);
  white-space: nowrap;
  flex: none;
}

/* =========================================================
   1. HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  /* O respiro de baixo cresce com a altura da tela: o bloco de texto
     continua ancorado na base (tom editorial), mas sobe em telas altas
     em vez de deixar um vazio grande no centro da foto. */
  padding-block: clamp(7rem, 14vh, 10rem) clamp(4.5rem, 16vh, 13rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__media { position: absolute; inset: 0; z-index: -3; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoom 18s var(--ease) forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

/* Escurecimento em tom quente (oliva-terroso, não preto-azulado): preserva
   o dourado do entardecer em vez de acinzentá-lo. O peso se concentra no
   canto inferior esquerdo, onde fica o texto sobre folhagem clara. */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(110% 105% at 5% 52%, rgba(16, 20, 12, .72) 0%, rgba(16, 20, 12, .44) 42%, transparent 72%),
    linear-gradient(to top, rgba(22, 25, 15, .72) 0%, rgba(22, 25, 15, .36) 36%, rgba(22, 25, 15, .12) 64%, rgba(22, 25, 15, .54) 100%),
    linear-gradient(to right, rgba(16, 20, 12, .48), rgba(16, 20, 12, .12) 62%, transparent 82%);
}

/* Grão sutil — dá textura de fotografia impressa */
.hero__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .09;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* Layout de duas colunas: texto à esquerda, card do formulário à
   direita. Empilha no mobile (formulário abaixo do texto, ainda
   dentro do hero — só cresce em altura, min-height cuida do resto). */
.hero__layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: end;
}
@media (min-width: 960px) {
  .hero { align-items: center; }
  .hero__layout {
    grid-template-columns: minmax(0, 1fr) minmax(24rem, 30rem);
    align-items: center;
  }
}

.hero__content {
  position: relative;
  color: var(--sand);
  text-shadow: 0 2px 20px rgba(8, 11, 7, .38);
}
.hero__badge { margin-bottom: 1.6rem; opacity: .9; }

.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.7rem, 1.2rem + 6.2vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -.028em;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  text-wrap: balance;
  max-width: 16ch;
}
.hero__title em {
  font-style: italic;
  color: #DCE8D6;
  font-variation-settings: "SOFT" 60, "WONK" 1;
}

.hero__sub {
  margin-top: 1.6rem;
  font-size: clamp(1.02rem, .95rem + .5vw, 1.28rem);
  line-height: 1.6;
  max-width: 40ch;
  color: rgba(247, 244, 238, .9);
}

/* Card do formulário — precisa de fundo próprio pra ficar legível
   sobre a foto, já que os campos foram desenhados pra fundo claro. */
.hero__form-card {
  position: relative;
  width: 100%;
  background: rgba(247, 244, 238, .97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: 0 24px 60px -20px rgba(10, 14, 8, .55);
}
.hero__form-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--olive);
  letter-spacing: -.01em;
}
.hero__form-sub {
  margin-top: .4rem;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--olive-soft);
}
.hero__form-card .lead-form { margin: 1.4rem 0 0; max-width: none; }
.hero__form-card .lead-form button.btn { width: 100%; justify-self: stretch; }

/* Entrada escalonada */
.hero__badge, .hero__title, .hero__sub, .hero__form-card {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn .95s var(--ease) forwards;
}
.hero__badge     { animation-delay: .15s; }
.hero__title     { animation-delay: .28s; }
.hero__sub       { animation-delay: .44s; }
.hero__form-card { animation-delay: .58s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border: 1px solid rgba(247, 244, 238, .45);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
  opacity: 0;
  animation: heroIn .9s var(--ease) .9s forwards;
}
.hero__scroll span {
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: var(--sand);
  animation: scrollDot 1.9s var(--ease) infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0);    opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translateY(15px); opacity: 0; }
}

/* =========================================================
   2. LINHA DE CREDIBILIDADE
   ========================================================= */
.credline {
  border-bottom: 1px solid var(--line);
  background: var(--sand);
}
.credline__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3.5rem);
  padding-block: 1.5rem;
  font-size: .92rem;
  letter-spacing: .05em;
  color: var(--olive-soft);
  text-align: center;
}
.credline__list li {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  position: relative;
}
.credline__list li + li::before {
  content: "·";
  position: absolute;
  left: clamp(-2rem, -2vw, -1rem);
  color: var(--clay);
}
.credline__list strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--olive);
  letter-spacing: -.01em;
}

/* =========================================================
   3. MANIFESTO / QUEM SOMOS
   ========================================================= */
.manifesto__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}

.manifesto__text { max-width: 38rem; }
.manifesto__text .h2 { margin-bottom: 1.8rem; }
.manifesto__text p { color: var(--olive-soft); }
.manifesto__text .lead { color: var(--olive); }

.signature {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--clay);
  margin-top: 2rem !important;
  font-variation-settings: "SOFT" 60, "WONK" 1;
}

/* Base (mobile): só a foto grande — a segunda, sobreposta, é um recurso
   de composição de página larga e fica pequena demais para valer a pena
   numa coluna estreita. Ela reaparece a partir do breakpoint desktop. */
.manifesto__media { display: block; }
.manifesto__photo {
  overflow: hidden;
  position: relative;
  /* borda sutil, por dentro do recorte, sem roubar espaço da imagem */
  box-shadow: inset 0 0 0 1px rgba(47, 58, 44, .16);
}
.manifesto__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.manifesto__photo:hover img { transform: scale(1.04); }
.manifesto__photo--a { aspect-ratio: 4 / 5; }
.manifesto__photo--b { display: none; }

/* Desktop: composição editorial — foto grande com a segunda sobreposta
   no canto inferior esquerdo, quebrando o grid. */
@media (min-width: 768px) {
  .manifesto__media {
    position: relative;
    padding-bottom: clamp(3rem, 7vw, 5.5rem);
  }
  .manifesto__photo--a {
    width: 84%;
    margin-left: auto;
    aspect-ratio: 4 / 5;
  }
  .manifesto__photo--b {
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    width: 46%;
    aspect-ratio: 1 / 1;
    /* moldura na cor do fundo da seção, separando as duas fotos */
    border: clamp(.5rem, 1.2vw, .9rem) solid var(--sand);
  }
}

/* =========================================================
   4. GALERIA
   ========================================================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(0, 15.5vw);
  gap: clamp(.6rem, 1.4vw, 1.15rem);
}
.gallery__item--tall { grid-row: span 2; }

.gallery__btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
}
.gallery__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease), filter .6s var(--ease);
}
.gallery__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(23, 30, 22, .68), transparent 52%);
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.gallery__btn:hover img,
.gallery__btn:focus-visible img { transform: scale(1.05); }
.gallery__btn:hover::after,
.gallery__btn:focus-visible::after { opacity: 1; }

.gallery__tag {
  position: absolute;
  top: .85rem;
  left: .85rem;
  z-index: 2;
  font-size: .6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  padding: .38rem .7rem;
  border-radius: 999px;
  background: rgba(247, 244, 238, .9);
  color: var(--olive);
  backdrop-filter: blur(4px);
}
.gallery__tag--3d { background: rgba(30, 107, 79, .92); color: #F6F8F4; }
.gallery__tag--progress { background: rgba(168, 136, 106, .94); color: #fff; }

.gallery__cap {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 1rem;
  z-index: 2;
  color: var(--sand);
  font-size: .88rem;
  letter-spacing: .02em;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.gallery__btn:hover .gallery__cap,
.gallery__btn:focus-visible .gallery__cap { opacity: 1; transform: none; }

.projetos__more {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: flex;
  justify-content: center;
}

/* =========================================================
   PÁGINA DE PROJETOS
   ========================================================= */
.projects-page { background: var(--sand); }

.projects-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(4rem, 9vw, 8rem)) 0 clamp(4rem, 8vw, 7rem);
  background:
    radial-gradient(circle at 82% 30%, rgba(168, 136, 106, .19), transparent 22rem),
    linear-gradient(145deg, var(--sand) 0%, #eee9de 100%);
  border-bottom: 1px solid var(--line-soft);
}
.projects-hero::after {
  content: "";
  position: absolute;
  width: clamp(15rem, 32vw, 31rem);
  aspect-ratio: 1;
  right: -10%;
  bottom: -58%;
  border: 1px solid rgba(47, 58, 44, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(47, 58, 44, .025), 0 0 0 8rem rgba(47, 58, 44, .018);
  pointer-events: none;
}
.projects-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(2rem, 8vw, 8rem);
}
.projects-hero__content { max-width: 50rem; }
.projects-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  color: var(--olive-soft);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.projects-back svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.projects-back:hover { color: var(--emerald); }
.projects-hero__title {
  max-width: 12ch;
  font-family: var(--serif);
  font-size: clamp(3.25rem, 7vw, 7rem);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.045em;
  color: var(--olive);
}
.projects-hero__title em { color: var(--emerald); font-weight: 350; }
.projects-hero__content > p {
  max-width: 40rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--olive-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.7;
}
.projects-hero__count {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: .75rem;
  color: var(--olive-soft);
  font-size: .75rem;
  line-height: 1.25;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.projects-hero__count strong {
  font-family: var(--serif);
  font-size: clamp(3.25rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: .8;
  color: var(--clay);
}
.projects-collection { padding-top: clamp(2rem, 5vw, 4rem); }
.gallery--archive {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: clamp(13rem, 20vw, 19rem);
}
.gallery--archive .gallery__item--portrait { grid-row: span 2; }
.gallery--archive .gallery__btn {
  border: 0;
  box-shadow: none;
  outline-offset: 3px;
}
.gallery--archive .gallery__btn::after { opacity: .38; }
.gallery--archive .gallery__cap { opacity: 1; transform: none; }

.projects-cta {
  padding: 0 0 clamp(5rem, 10vw, 9rem);
  background: var(--sand);
}
.projects-cta__inner {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 6rem);
  background: var(--olive);
  color: var(--sand);
  text-align: center;
}
.projects-cta__inner::before {
  content: "";
  position: absolute;
  inset: -65% 50% auto -10%;
  height: 28rem;
  border: 1px solid rgba(247, 244, 238, .1);
  border-radius: 50%;
  transform: rotate(-10deg);
}
.projects-cta__inner > * { position: relative; z-index: 1; }
.projects-cta__kicker {
  color: var(--clay-soft);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.projects-cta h2 {
  max-width: 12ch;
  margin: .9rem auto 1.25rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4.75rem);
  font-weight: 350;
  line-height: 1;
}
.projects-cta__inner > p:not(.projects-cta__kicker) {
  max-width: 33rem;
  margin: 0 auto 2rem;
  color: rgba(247, 244, 238, .72);
}

/* =========================================================
   5. ANTES & DEPOIS
   ========================================================= */
/* Os comparativos têm orientações diferentes. Empilhados e centralizados,
   cada um preserva sua proporção sem criar um grid visualmente quebrado. */
.ba-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: clamp(3rem, 7vw, 6rem);
}
.ba { width: 100%; }
.ba--landscape { max-width: 58rem; }

.ba__frame {
  position: relative;
  /* retrato: as fotos reais recebidas são verticais (celular), não a
     paisagem horizontal prevista originalmente */
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--sand-warm);
  touch-action: pan-y;
  cursor: ew-resize;
  box-shadow: inset 0 0 0 1px rgba(47, 58, 44, .16);
}
.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
/* "Antes" fica por cima, à esquerda, revelando "Depois" por baixo à
   direita conforme o divisor se move — leitura esquerda→direita. */
.ba__img--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); z-index: 1; }

.ba__label {
  position: absolute;
  bottom: .8rem;
  z-index: 3;
  font-size: .6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(247, 244, 238, .9);
  color: var(--olive);
  pointer-events: none;
}
.ba__label--after  { right: .8rem; }
.ba__label--before { left: .8rem; }

.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  background: var(--sand);
  transform: translateX(-1px);
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(23, 30, 22, .35);
}
.ba__handle i {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sand);
  box-shadow: 0 4px 16px rgba(23, 30, 22, .3);
}
.ba__handle i::before,
.ba__handle i::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-block: 5px solid transparent;
  translate: 0 -50%;
}
.ba__handle i::before {
  left: 11px;
  border-right: 7px solid var(--olive);
}
.ba__handle i::after {
  right: 11px;
  border-left: 7px solid var(--olive);
}

/* Range invisível por cima: dá suporte a teclado e leitor de tela */
.ba__range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.ba__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 44px;
  height: 100%;
  cursor: ew-resize;
}
.ba__range::-moz-range-thumb {
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: ew-resize;
}
.ba__frame:has(.ba__range:focus-visible) .ba__handle i {
  box-shadow: 0 0 0 3px var(--emerald), 0 4px 16px rgba(23, 30, 22, .3);
}

.ba figcaption {
  margin-top: 1rem;
  font-size: .88rem;
  letter-spacing: .05em;
  color: var(--olive-soft);
}

.ba-hint {
  margin-top: 2rem;
  text-align: center;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clay);
}

/* =========================================================
   6. COMO FUNCIONA
   ========================================================= */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  counter-reset: step;
}
.step { position: relative; padding-top: 2.5rem; }
.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.step::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--clay);
}
.step__num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 300;
  line-height: 1;
  color: var(--clay-soft);
  letter-spacing: -.03em;
  margin-bottom: .9rem;
  font-variation-settings: "SOFT" 40, "WONK" 1;
}
.step__title {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.012em;
  margin-bottom: .7rem;
}
.step p { color: var(--olive-soft); font-size: .97rem; }

/* =========================================================
   7. DIFERENCIAIS
   ========================================================= */
.diffs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.diff {
  padding: clamp(2rem, 4vw, 3.2rem) clamp(1.5rem, 3vw, 3rem);
  border-top: 1px solid var(--line);
  position: relative;
}
.diff:nth-child(odd)  { padding-left: 0; }
.diff:nth-child(even) { padding-right: 0; }
.diff:nth-child(odd)::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: var(--line);
}
.diff:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }

.diff__icon {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--emerald);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 1.4rem;
}
.diff__title {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.014em;
  margin-bottom: .8rem;
  max-width: 22ch;
}
.diff p { color: var(--olive-soft); max-width: 40ch; }

/* =========================================================
   8. DEPOIMENTOS
   ========================================================= */
.quotes {
  position: relative;
  max-width: 52rem;
  margin-inline: auto;
  text-align: center;
}
/* Cabeçalho centralizado para casar com a citação, que também é centrada */
.depoimentos .section__head {
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.depoimentos .section__sub { margin-inline: auto; }

.quotes__mark {
  width: 96px;
  height: 68px;
  margin: 0 auto 1.2rem;
  fill: var(--clay-soft);
  opacity: .55;
}

.quotes__viewport {
  position: relative;
  display: grid;
}
.quote {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), visibility .6s;
}
.quote.is-active { opacity: 1; visibility: visible; transform: none; }

.quote__stars {
  color: var(--clay);
  letter-spacing: .32em;
  font-size: .95rem;
  margin-bottom: 1.6rem;
}
.quote__text {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.32rem, 1rem + 1.5vw, 2.1rem);
  line-height: 1.4;
  letter-spacing: -.014em;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  text-wrap: balance;
}
.quote__author {
  margin-top: 2rem;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.quote__author span {
  display: block;
  margin-top: .4rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: none;
  color: var(--olive-soft);
}

.quotes__nav {
  margin-top: clamp(2.2rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.quotes__arrow {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.quotes__arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quotes__arrow:hover { background: var(--olive); color: var(--sand); border-color: var(--olive); }

.quotes__dots { display: flex; gap: .55rem; }
.quotes__dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay-soft);
  transition: background-color .35s var(--ease), transform .35s var(--ease);
}
.quotes__dots button[aria-selected="true"] { background: var(--olive); transform: scale(1.3); }

/* =========================================================
   9. CTA FINAL
   ========================================================= */
.cta {
  padding-block: clamp(6rem, 12vw, 11rem);
  background: var(--sand-deep);
  position: relative;
  overflow: hidden;
  text-align: center;
}
/* Folhagem decorativa, bem discreta, nos cantos */
.cta::before,
.cta::after {
  content: "";
  position: absolute;
  width: clamp(16rem, 30vw, 30rem);
  aspect-ratio: 1;
  background: radial-gradient(circle at center, rgba(30, 107, 79, .09), transparent 68%);
  pointer-events: none;
}
.cta::before { top: -12%; left: -8%; }
.cta::after  { bottom: -18%; right: -10%; }

.cta__inner { position: relative; max-width: 44rem; }
.cta__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.3rem, 1.3rem + 4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -.026em;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  text-wrap: balance;
}
.cta__title em { font-style: italic; color: var(--emerald); }
.cta__sub {
  margin-top: 1.4rem;
  font-size: 1.12em;
  color: var(--olive-soft);
}
.cta .btn { margin-top: 2.6rem; }

/* Formulário de qualificação de leads */
.lead-form {
  display: grid;
  gap: 1.3rem;
  max-width: 30rem;
  margin: 2.6rem auto 0;
  text-align: left;
}

.field { border: 0; margin: 0; padding: 0; }
.field label,
.field legend {
  display: block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--olive-soft);
  margin-bottom: .6rem;
  padding: 0;
}
.field label span,
.field legend span { font-weight: 400; opacity: .7; text-transform: none; }

.field input[type="text"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sand);
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--olive);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--olive-soft); opacity: .55; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(30, 107, 79, .14);
}
.field textarea { resize: vertical; min-height: 5rem; font-family: inherit; }

.choice-group { display: flex; flex-wrap: wrap; gap: .6rem; }
.choice { position: relative; cursor: pointer; }
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.choice span {
  display: inline-flex;
  padding: .6rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 400;
  color: var(--olive);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.choice input:focus-visible + span { outline: 2px solid var(--emerald); outline-offset: 2px; }
.choice.is-checked span {
  background: var(--emerald);
  color: #F6F8F4;
  border-color: var(--emerald);
}

.field-group {
  padding-left: 1.1rem;
  border-left: 2px solid var(--line);
  display: grid;
  gap: 1.3rem;
}
.field-group.is-animating {
  overflow: hidden;
  will-change: height, opacity, transform;
  transition:
    height .42s var(--ease),
    opacity .3s var(--ease),
    transform .42s var(--ease);
}
.field-group[hidden] { display: none; }

.lead-form button.btn { margin-top: .4rem; justify-self: start; }

/* =========================================================
   10. FOOTER
   ========================================================= */
.footer {
  background: var(--olive);
  color: var(--sand-deep);
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.footer__name {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem);
  font-weight: 400;
  letter-spacing: -.01em;
  font-variation-settings: "SOFT" 40;
}
.footer__tagline {
  margin-top: .6rem;
  color: rgba(239, 234, 224, .68);
  font-style: italic;
  font-family: var(--serif);
}
.footer__label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--clay-soft);
  margin-bottom: .9rem;
}
.footer__col p { font-size: .96rem; color: rgba(239, 234, 224, .88); }
.footer__col a { border-bottom: 1px solid rgba(239, 234, 224, .3); transition: border-color .3s var(--ease); }
.footer__col a:hover { border-bottom-color: var(--sand-deep); }
.footer__social { margin-top: .8rem; }

.footer__bottom {
  border-top: 1px solid rgba(239, 234, 224, .14);
  padding-block: 1.6rem;
}
.footer__bottom p {
  font-size: .8rem;
  letter-spacing: .04em;
  color: rgba(239, 234, 224, .55);
}

/* =========================================================
   Botão flutuante WhatsApp
   ========================================================= */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25D366;
  color: #FFFFFF;
  box-shadow: 0 6px 22px -6px rgba(11, 61, 37, .55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.9);
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility .45s;
}
.wa-float.is-visible { opacity: 1; visibility: visible; transform: none; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }

/* =========================================================
   Lightbox
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(.5rem, 2vw, 2rem);
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(20, 26, 19, .94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lightbox__figure {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
  max-height: 100%;
}
.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 11rem);
  width: auto;
  object-fit: contain;
  transform: scale(.97);
  transition: transform .4s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: none; }
.lightbox__cap {
  color: rgba(247, 244, 238, .8);
  font-size: .88rem;
  letter-spacing: .08em;
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: clamp(.75rem, 2vw, 1.5rem);
  right: clamp(.75rem, 2vw, 1.5rem);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--sand);
  border: 1px solid rgba(247, 244, 238, .25);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.lightbox__close:hover { background: var(--sand); color: var(--olive); }
.lightbox__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

.lightbox__nav {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--sand);
  border: 1px solid rgba(247, 244, 238, .25);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.lightbox__nav:hover { background: var(--sand); color: var(--olive); }
.lightbox__nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__nav--prev { grid-column: 1; }
.lightbox__nav--next { grid-column: 3; }

/* =========================================================
   Reveal on scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   Responsivo
   ========================================================= */
@media (min-width: 1024px) {
  .manifesto__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1023px) {
  :root { --header-h: 72px; }

  .gallery { grid-auto-rows: minmax(0, 30vw); }

  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  /* Reforça o contraste apenas no mobile, onde o recorte da foto deixa
     o título sobre a área mais clara do céu e da vegetação. */
  .hero__veil {
    background:
      linear-gradient(to bottom, rgba(16, 20, 12, .72) 0%, rgba(16, 20, 12, .58) 34%, rgba(16, 20, 12, .34) 62%, rgba(16, 20, 12, .56) 100%),
      radial-gradient(115% 72% at 0% 28%, rgba(12, 16, 10, .72) 0%, rgba(12, 16, 10, .38) 55%, transparent 82%);
  }
  .hero__title,
  .hero__sub,
  .hero__badge {
    text-shadow: 0 2px 18px rgba(8, 11, 7, .42);
  }

  .credline__list {
    flex-direction: column;
    gap: 1rem;
    padding-block: 1.75rem;
  }
  .credline__list li + li::before { display: none; }

  /* Mobile: coluna única, só os 3 primeiros itens — mosaico de 2 colunas
     fica apertado demais numa tela estreita, e 8 fotos é longo para rolar. */
  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(0, 68vw);
    gap: clamp(1rem, 4vw, 1.5rem);
  }
  .gallery__item:nth-child(n + 4) { display: none; }

  .projects-hero__grid { grid-template-columns: 1fr; }
  .projects-hero__count { display: none; }
  .projects-back { margin-bottom: 2rem; }
  .projects-hero__title { font-size: clamp(3rem, 16vw, 5.25rem); }
  .gallery--archive {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .gallery--archive .gallery__item:nth-child(n + 4) { display: block; }
  .gallery--archive .gallery__item,
  .gallery--archive .gallery__item--portrait { grid-row: auto; }
  .gallery--archive .gallery__btn { aspect-ratio: 4 / 3; }
  .gallery--archive .gallery__item--portrait .gallery__btn { aspect-ratio: 4 / 5; }
  .projects-cta__inner { margin-inline: -.5rem; }

  .steps { grid-template-columns: 1fr; gap: 2rem; }

  .diffs { grid-template-columns: 1fr; }
  .diff { padding-inline: 0; }
  .diff:nth-child(odd)::after { display: none; }
  .diff:nth-last-child(-n+2):not(:last-child) { border-bottom: 0; }

  .lightbox { grid-template-columns: 1fr; padding-inline: 1rem; }
  .lightbox__figure { grid-column: 1; }
  .lightbox__nav {
    position: absolute;
    bottom: 1.25rem;
    grid-column: 1;
  }
  .lightbox__nav--prev { left: 22%; }
  .lightbox__nav--next { right: 22%; }
  .lightbox__img { max-height: calc(100vh - 14rem); }

  .footer__grid { grid-template-columns: 1fr; }

  .wa-float { width: 52px; height: 52px; }
  .wa-float svg { width: 27px; height: 27px; }
}

/* =========================================================
   Acessibilidade — movimento reduzido
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__badge, .hero__title, .hero__sub, .hero__form-card, .hero__content .btn, .hero__scroll { opacity: 1; transform: none; }
  .hero__media img { animation: none; }
}

/* Impressão */
@media print {
  .site-header, .wa-float, .hero__scroll, .quotes__nav, .lightbox { display: none !important; }
  body { background: #fff; }
  .reveal { opacity: 1; transform: none; }
}
