/* ==========================================================================
   Espaço Pedra Vermelha — sistema visual compartilhado
   Fonte: Manual de marca (Will Jr.) + Sistema de Marca refinado pelo Diego.
   Terracota Escuro é a cor-âncora; Off-white é o papel; Petróleo é a tinta.
   Quicksand em toda a tipografia. O símbolo é a bromélia desenhada à mão.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --terra:        #400C00;  /* terracota escuro, cor-âncora */
  --terra-media:  #681500;  /* terracota médio, apoio */
  --terra-clara:  #983921;  /* acento, links, hover */
  --papel:        #FFF9E9;  /* off-white */
  --papel-2:      #F7F0DD;  /* off-white um passo abaixo, para bandas */
  --tinta:        #1C1D20;  /* petróleo */
  --mata:         #004029;  /* verde-mata escuro, toques de território */

  --tinta-70: rgba(28, 29, 32, .72);
  --tinta-45: rgba(28, 29, 32, .5);
  --regua:    rgba(64, 12, 0, .16);

  --sobre-terra:    #FFF9E9;
  --sobre-terra-70: rgba(255, 249, 233, .72);
  --sobre-terra-45: rgba(255, 249, 233, .5);
  --regua-terra:    rgba(255, 249, 233, .18);

  --sans: "Quicksand", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --gut: clamp(1.25rem, 4.5vw, 6rem);
  --max: 1680px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io:  cubic-bezier(.65, .02, .17, 1);
  --dur-rev: .9s;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Lenis assume o smooth; scroll-behavior junto dele faz a página derivar */
html:not(.lenis) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; padding: 0; }
[hidden] { display: none !important; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }

body {
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1rem, .3vw + .95rem, 1.1rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; overflow-x: clip;
}
::selection { background: var(--terra); color: var(--papel); }

.pular {
  position: absolute; left: -9999px; top: 0;
  background: var(--terra); color: var(--papel);
  padding: .8rem 1.2rem; z-index: 200;
}
.pular:focus { left: 0; }

/* ---------- marcas em SVG externo, tingíveis por currentColor ----------
   mask-image permite trocar a cor da logo com a cor do texto do contexto,
   mantendo o SVG cacheável como arquivo. Proporções vêm dos viewBox. */
.marca-svg {
  display: inline-block;
  background: currentColor;
  -webkit-mask: var(--marca) no-repeat center / contain;
  mask: var(--marca) no-repeat center / contain;
}
.marca-svg--flor    { --marca: url("/assets/logos/flor.svg");    aspect-ratio: 66 / 64; }
.marca-svg--h-cunha { --marca: url("/assets/logos/h-cunha.svg"); aspect-ratio: 177 / 64; }
.marca-svg--h-casa  { --marca: url("/assets/logos/h-casa.svg");  aspect-ratio: 177 / 64; }
.marca-svg--h-chale { --marca: url("/assets/logos/h-chale.svg"); aspect-ratio: 177 / 64; }
.marca-svg--v-cunha { --marca: url("/assets/logos/v-cunha.svg"); aspect-ratio: 107 / 119; }
.marca-svg--casa-icone { --marca: url("/assets/logos/casa-icone.svg"); aspect-ratio: 52 / 43; }
.marca-svg--chale-icone { --marca: url("/assets/logos/chale-icone.svg"); aspect-ratio: 32 / 43; }
.marca-svg--airbnb   { --marca: url("/assets/logos/ico-airbnb.svg");   aspect-ratio: 1; }
.marca-svg--whatsapp { --marca: url("/assets/logos/ico-whatsapp.svg"); aspect-ratio: 1; }

/* botão redondo só de ícone (sobre fundo terracota) */
.icobtn {
  display: grid; place-items: center;
  width: 2.9rem; height: 2.9rem;
  border: 1px solid var(--regua-terra);
  border-radius: 999px;
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease-out);
}
.icobtn .marca-svg { width: 1.3rem; height: 1.3rem; }
.icobtn:hover { background: var(--papel); color: var(--terra); border-color: var(--papel); transform: translateY(-2px); }

/* ---------- tipografia ---------- */
.titulo {
  font-weight: 300;
  font-size: clamp(2rem, 3.4vw + .8rem, 3.8rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.titulo strong, .titulo em { font-weight: 500; font-style: normal; }

/* ---------- tela de carregamento ---------- */
.carrega {
  position: fixed; inset: 0; z-index: 300;
  background: var(--terra);
  color: var(--papel);
  display: grid; place-content: center; justify-items: center;
  gap: 1.6rem;
  transition: opacity .7s ease, visibility 0s .7s;
}
.carrega.is-some { opacity: 0; visibility: hidden; pointer-events: none; }
.carrega .marca-svg { width: clamp(11rem, 26vw, 15rem); }
.carrega__linha {
  width: min(46vw, 13rem);
  height: 2px;
  background: var(--regua-terra);
  overflow: hidden;
}
.carrega__linha span {
  display: block; height: 100%; width: 100%;
  background: var(--papel);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s linear;
}

/* ---------- reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur-rev) var(--ease-out), transform var(--dur-rev) var(--ease-out);
}
.reveal.is-vivo { opacity: 1; transform: none; }

.img-reveal { overflow: hidden; }
.img-reveal img {
  transform: scale(1.08);
  opacity: 0;
  transition: transform 1.3s var(--ease-out), opacity .9s ease;
}
.img-reveal.is-vivo img { transform: scale(1); opacity: 1; }

.linha { display: block; overflow: hidden; overflow: clip; }
.linha > span {
  display: block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out);
}
.is-vivo .linha > span, .linha.is-vivo > span { transform: none; }
.linha:nth-child(2) > span { transition-delay: .1s; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .5s ease, box-shadow .5s ease;
}
.nav.is-solida {
  background: rgba(255, 249, 233, .92);
  background: color-mix(in srgb, var(--papel) 90%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--regua);
}
.nav__in {
  max-width: var(--max);
  margin-inline: auto;
  padding: 1rem var(--gut);
  display: flex; align-items: center; gap: 2.5rem;
}
.nav__marca { display: block; }
.nav__marca .marca-svg { height: clamp(2.6rem, 4vw, 3rem); width: auto; aspect-ratio: 177 / 64; }
.nav, .nav a, .nav button { color: var(--papel); }
.nav.is-solida, .nav.is-solida a, .nav.is-solida button { color: var(--terra); }
.nav__links { display: flex; gap: 1.9rem; margin-left: auto; align-items: center; }
.nav__links a { font-size: .93rem; font-weight: 500; opacity: .88; transition: opacity .25s; }
.nav__links a:hover { opacity: 1; }
.nav__cta {
  font-size: .93rem;
  font-weight: 600;
  padding: .55rem 1.2rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: background .3s, color .3s;
}
.nav__cta:hover { background: var(--papel); color: var(--terra); }
.nav.is-solida .nav__cta:hover { background: var(--terra); color: var(--papel); }

/* menu aberto: nav volta a ser transparente em papel sobre o terracota */
.nav.is-menu { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav.is-menu, .nav.is-menu a, .nav.is-menu button { color: var(--papel); }

.nav__toggle { display: none; position: relative; width: 40px; height: 40px; margin-left: auto; }
.nav__toggle span {
  position: absolute; left: 8px; right: 8px; height: 1.5px;
  background: currentColor;
  transition: transform .35s var(--ease-io), top .35s var(--ease-io);
}
.nav__toggle span:first-child { top: 15px; }
.nav__toggle span:last-child  { top: 24px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child  { top: 19px; transform: rotate(-45deg); }

.menu[hidden] { display: none; }
.menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--terra);
  color: var(--papel);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--gut);
  gap: .3rem;
}
.menu a {
  font-weight: 300;
  font-size: clamp(1.8rem, 6.5vw, 2.5rem);
  line-height: 1.35;
}
.menu__pe { margin-top: 2.2rem; font-size: .92rem; color: var(--sobre-terra-70); line-height: 1.7; }

/* ---------- botões ---------- */
.botao {
  display: inline-block;
  padding: .95rem 1.9rem;
  border-radius: 999px;
  background: var(--papel);
  color: var(--terra);
  font-size: .98rem;
  font-weight: 600;
  transition: transform .35s var(--ease-out), background .3s, color .3s;
}
.botao:hover { transform: translateY(-2px); }
.botao--terra { background: var(--terra); color: var(--papel); }
.botao--linha {
  background: transparent;
  color: inherit;
  border: 1px solid var(--regua-terra);
}
.botao--linha:hover { border-color: currentColor; }
.sobre-claro .botao--linha { border-color: var(--regua); }

/* ---------- convite ao tour ---------- */
.tourcta { background: var(--terra); color: var(--papel); }
.tourcta__in {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(4.5rem, 11vh, 8rem) var(--gut);
  display: grid;
  justify-items: start;
  gap: 1.1rem;
}
.tourcta__icone { width: auto; height: 2.6rem; opacity: .9; }
.tourcta__titulo {
  font-weight: 300;
  font-size: clamp(1.9rem, 3.2vw + .6rem, 3.4rem);
  line-height: 1.12;
  letter-spacing: -.01em;
}
.tourcta__in p { color: var(--sobre-terra-70); max-width: 34em; }
.tourcta__in .botao { margin-top: .6rem; }

/* ---------- pé ---------- */
.pe { background: var(--terra); color: var(--sobre-terra-70); }
.pe__in {
  max-width: var(--max);
  margin-inline: auto;
  padding: 3.2rem var(--gut) 3.4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 4rem;
  align-items: start;
  font-size: .92rem;
}
.pe__marca { color: var(--papel); }
.pe__marca .marca-svg { width: clamp(8rem, 14vw, 10.5rem); aspect-ratio: 107 / 119; }
.pe__info { display: grid; gap: .45rem; justify-items: start; }
.pe a { border-bottom: 1px solid transparent; transition: border-color .3s, color .3s; }
.pe a:hover { border-color: currentColor; }
.pe__casas { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-bottom: .6rem; }
.pe__casas a { font-weight: 600; color: var(--papel); }
.pe__mini { margin-top: 1.2rem; font-size: .82rem; color: var(--sobre-terra-45); }
.pe__contatos { display: flex; flex-wrap: wrap; gap: 1rem 2.8rem; margin-top: .8rem; }
.pe__contato { display: flex; align-items: center; gap: .8rem; }
.pe__contato-nome { font-weight: 600; color: var(--papel); min-width: 3rem; }

@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .pe__in { grid-template-columns: 1fr; }
}

/* ---------- movimento reduzido (base) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carrega { display: none; }
  .reveal, .img-reveal img, .linha > span {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
