/* ============================================================
   MANSÃO PÉ NA AREIA · Angra dos Reis — Costa Verde
   Apresentação privada · off-market — Canaã Imóveis de Luxo
   Direção: quiet luxury — sobriedade, respiro, mar como protagonista.
   ============================================================ */

:root {
  /* Tokens Canaã — substituíveis pelos hexes oficiais do brand kit */
  --marfim: #F4EFE6;
  --grafite: #1C1B1A;
  --bordo: #5A1F2B;
  --champanhe: #C6A664;
  --hairline: rgba(198, 166, 100, 0.32);
  --hairline-soft: rgba(198, 166, 100, 0.18);

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Lora", Georgia, serif;
  --font-label: "Montserrat", "Helvetica Neue", sans-serif;

  --space-section: clamp(96px, 12vw, 160px);
  --pad-inline: clamp(1.4rem, 6vw, 6.5rem);

  /* Trama geométrica — padrão assinatura, uso a ~4% de opacidade */
  --assinatura: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23C6A664' stroke-width='1'%3E%3Cpath d='M0 28 28 0l28 28L28 56Z'/%3E%3Cpath d='M14 28 28 14l14 14-14 14Z'/%3E%3Crect x='25' y='25' width='6' height='6'/%3E%3C/g%3E%3C/svg%3E");
}

/* Pirulen — tipografia oficial do wordmark CANAÃ (subset local com os
   glifos do lockup; Ã verificado no arquivo) */
@font-face {
  font-family: "Pirulen";
  src: url("assets/fonts/pirulen.woff2") format("woff2"),
       url("assets/fonts/pirulen.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--grafite);
  background: var(--marfim);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

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

.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;
}

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

.container-narrow {
  max-width: 680px;
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

.eyebrow {
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--champanhe);
  margin-bottom: 1.6rem;
}

/* contraste AA sobre fundo claro: champanhe não atinge 4,5:1 no marfim */
.section-marfim .eyebrow { color: var(--bordo); }
.section-marfim :focus-visible { outline-color: var(--grafite); }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.15;
}

.section-marfim { background: var(--marfim); color: var(--grafite); }
.section-grafite { background: var(--grafite); color: var(--marfim); }

/* ---------- reveals on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.is-in { opacity: 1; transform: none; }

/* ---------- botões ---------- */

.btn-ghost {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.05rem 2.4rem;
  border: 1px solid var(--hairline);
  color: inherit;
  transition: border-color 0.4s ease, color 0.4s ease, background-color 0.4s ease;
}

.btn-ghost:hover { border-color: var(--champanhe); color: var(--champanhe); }

.btn-solid {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.15rem 2.8rem;
  background: var(--champanhe);
  color: var(--grafite);
  border: 1px solid var(--champanhe);
  transition: background-color 0.4s ease, color 0.4s ease;
}

.btn-solid:hover { background: transparent; color: var(--champanhe); }

/* ============================================================
   1. HEADER
   ============================================================ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.4rem var(--pad-inline);
  color: var(--marfim);
  transition: background-color 0.5s ease, padding 0.5s ease, box-shadow 0.5s ease;
}

.site-header.is-scrolled {
  background: rgba(28, 27, 26, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding-block: 1rem;
  box-shadow: 0 1px 0 var(--hairline-soft);
}

.wordmark {
  font-family: "Pirulen", "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 0.88rem;
  letter-spacing: 0.07em;
}

.wordmark-sub {
  font-weight: 400;
  font-size: 0.5rem;
  letter-spacing: 0.09em;
  opacity: 0.75;
  margin-left: 0.45rem;
}

.header-note {
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--champanhe);
}

/* ============================================================
   2. HERO — foto de capa em tela cheia (desktop) /
      vídeo vertical imersivo em tela cheia (mobile)
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--grafite);
  color: var(--marfim);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-media { position: absolute; inset: 0; z-index: 0; }

.hero-photo,
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-media img,
.hero-media video { width: 100%; height: 100%; object-fit: cover; }

.hero-video { display: none; }   /* desktop: a foto é a capa */

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(95deg,
      rgba(28,27,26,0.56) 0%,
      rgba(28,27,26,0.20) 38%,
      rgba(28,27,26,0) 64%),
    linear-gradient(180deg,
      rgba(28,27,26,0.34) 0%,
      rgba(28,27,26,0.06) 28%,
      rgba(28,27,26,0.44) 72%,
      rgba(28,27,26,0.86) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1480px;
  margin-inline: auto;
  padding: clamp(6rem, 12vh, 9rem) var(--pad-inline) clamp(4.5rem, 10vh, 7rem);
}

.hero-text { max-width: 34rem; text-shadow: 0 1px 30px rgba(28, 27, 26, 0.5); }

.hero-text .eyebrow { color: var(--champanhe); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.9rem, 6.4vw, 5.6rem);
  line-height: 1.03;
  letter-spacing: 0.01em;
  margin-bottom: 1.2rem;
}

.hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--champanhe);
  margin-bottom: 1.8rem;
}

.hero-support {
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 32rem;
  opacity: 0.9;
  margin-bottom: 2.6rem;
}

/* pausa do vídeo (WCAG 2.2.2) — só relevante no mobile, onde o vídeo toca */
.video-toggle {
  position: absolute;
  right: clamp(1.2rem, 3vw, 2.2rem);
  bottom: 2.2rem;
  z-index: 4;
  width: 40px;
  height: 40px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(28, 27, 26, 0.45);
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--marfim);
  cursor: pointer;
  transition: border-color 0.4s ease, color 0.4s ease;
}

.video-toggle:hover { border-color: var(--champanhe); color: var(--champanhe); }
.video-toggle svg[hidden] { display: none; }

.scroll-indicator {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 1px;
  height: 56px;
  overflow: hidden;
}

.scroll-indicator span {
  display: block;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--champanhe));
  animation: scrollHint 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scrollHint {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ============================================================
   3. MANIFESTO
   ============================================================ */

.manifesto { position: relative; padding-block: var(--space-section); }

.manifesto-texture {
  position: absolute;
  inset: 0;
  background-image: var(--assinatura);
  background-size: 56px 56px;
  opacity: 0.04;
  pointer-events: none;
}

.manifesto-text {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.62;
  text-align: center;
}

/* ============================================================
   3b. BANDA DE CAPA — foto em tela cheia após o manifesto
   ============================================================ */

.cover-band { background: var(--grafite); }

.cover-band img {
  width: 100%;
  height: min(92vh, 920px);
  object-fit: cover;
}

/* ============================================================
   4. NÚMEROS ESSENCIAIS
   ============================================================ */

.stats { padding-block: clamp(3.4rem, 6vw, 5rem); }

.stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2.2rem, 6vw, 5.2rem);
  flex-wrap: wrap;
  padding-inline: var(--pad-inline);
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 5.2vw, 4.2rem);
  line-height: 1;
  margin-bottom: 0.55rem;
}

.stat-label {
  font-family: var(--font-label);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--champanhe);
}

.stat-sep { width: 1px; height: 58px; background: var(--hairline); }

/* ============================================================
   5–8. SEÇÕES NARRATIVAS (foto grande + texto)
   ============================================================ */

.feature { padding-block: var(--space-section); overflow: hidden; }

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(2.4rem, 6vw, 6rem);
  padding-right: var(--pad-inline);
}

.feature-grid.is-reversed {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  padding-right: 0;
  padding-left: var(--pad-inline);
}

.feature-grid.is-reversed .feature-media { order: 2; }
.feature-grid.is-reversed .feature-text { order: 1; justify-self: end; }

.feature-media img { width: 100%; height: auto; }

.feature-text { max-width: 26rem; }

.feature-copy { font-size: 1.1rem; line-height: 1.8; }

.section-grafite .feature-copy { opacity: 0.92; }

.feature-detail {
  width: min(44vw, 620px);
  margin-top: clamp(3.5rem, 7vw, 6.5rem);
  margin-left: auto;
  margin-right: var(--pad-inline);
}

.feature-detail.is-right { margin-left: var(--pad-inline); margin-right: auto; }

.feature-detail img { width: 100%; height: auto; }

/* ============================================================
   9. CHEGADA & INFRAESTRUTURA
   ============================================================ */

.backstage { padding-block: clamp(80px, 10vw, 130px); }

.backstage .feature-copy { font-size: 1.08rem; }

.backstage-list {
  list-style: none;
  columns: 2;
  column-gap: clamp(2.4rem, 5vw, 4rem);
  margin-top: 2.6rem;
}

.backstage-list li {
  break-inside: avoid;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 0.98rem;
  opacity: 0.92;
}

/* ============================================================
   10. GALERIA
   ============================================================ */

.gallery { padding-block: var(--space-section); padding-inline: var(--pad-inline); }

.gallery-head { text-align: center; margin-bottom: clamp(3rem, 6vw, 5rem); }
.gallery-head .eyebrow { margin-bottom: 1rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2.4vw, 2rem);
  max-width: 1480px;
  margin-inline: auto;
}

.gallery-item {
  position: relative;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gallery-item:hover img { transform: scale(1.025); }

/* ritmo editorial: pares 7/5 alternados, panorâmicas de mar em destaque maior */
.gallery-item:nth-child(4n+1) { grid-column: span 7; aspect-ratio: 4 / 3; }
.gallery-item:nth-child(4n+2) { grid-column: span 5; aspect-ratio: 1 / 1; }
.gallery-item:nth-child(4n+3) { grid-column: span 5; aspect-ratio: 1 / 1; }
.gallery-item:nth-child(4n+4) { grid-column: span 7; aspect-ratio: 4 / 3; }

/* ============================================================
   11. O FILME DA CASA
   ============================================================ */

.film { padding-block: var(--space-section); }

.film .container-narrow { text-align: center; margin-bottom: clamp(2.6rem, 5vw, 4rem); }

.film-frame {
  width: min(86vw, 420px);
  margin-inline: auto;
  padding: 10px;
  border: 1px solid var(--hairline);
  background: #050505;
}

.film-frame video {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  display: block;
}

/* ============================================================
   12. FICHA TÉCNICA
   ============================================================ */

.specs { padding-block: var(--space-section); }

.specs-inner { max-width: 1060px; margin-inline: auto; padding-inline: var(--pad-inline); }

.specs-head { text-align: center; margin-bottom: clamp(2.8rem, 5vw, 4.5rem); }
.specs-head .eyebrow { margin-bottom: 1rem; }

.specs-list { list-style: none; columns: 2; column-gap: clamp(3rem, 6vw, 5.5rem); }

.specs-list li {
  break-inside: avoid;
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 1.02rem;
  line-height: 1.6;
}

/* ============================================================
   13. LOCALIZAÇÃO
   ============================================================ */

.location {
  padding-block: var(--space-section);
  border-top: 1px solid var(--hairline-soft);
  text-align: center;
}

.location .eyebrow { margin-bottom: 1.4rem; }

/* ============================================================
   14. VALOR & CONTATO
   ============================================================ */

.offer { padding-block: var(--space-section); text-align: center; }

.offer-price {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1.1;
  margin-bottom: 1.6rem;
}

.offer-support {
  max-width: 36rem;
  margin-inline: auto;
  font-size: 1.02rem;
  opacity: 0.85;
  margin-bottom: 3rem;
}

/* ============================================================
   15. FOOTER
   ============================================================ */

.site-footer {
  background: #151413;
  color: var(--marfim);
  text-align: center;
  padding: clamp(4rem, 7vw, 5.5rem) var(--pad-inline) 3rem;
}

.footer-brand {
  font-family: "Pirulen", "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  color: var(--marfim);
}

.footer-line {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--champanhe);
  margin-bottom: 1rem;
}

.footer-sites {
  font-family: var(--font-label);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.78;
  margin-bottom: 2.2rem;
}

.footer-sites a { transition: color 0.3s ease; }
.footer-sites a:hover { color: var(--champanhe); }

.footer-confidential {
  font-style: italic;
  font-size: 0.88rem;
  opacity: 0.6;
  max-width: 34rem;
  margin-inline: auto;
  margin-bottom: 2.2rem;
}

.footer-year {
  font-family: var(--font-label);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  opacity: 0.55;
}

/* ============================================================
   BOTÃO FLUTUANTE WHATSAPP
   ============================================================ */

.wa-float {
  position: fixed;
  right: clamp(1.2rem, 3vw, 2.2rem);
  bottom: clamp(1.2rem, 3vw, 2.2rem);
  z-index: 50;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--champanhe);
  border-radius: 50%;
  color: var(--champanhe);
  background: rgba(28, 27, 26, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

.wa-float.is-visible { opacity: 1; visibility: visible; transform: none; }
.wa-float:hover { background: var(--champanhe); color: var(--grafite); }

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(28, 27, 26, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lb-stage { max-width: min(88vw, 1400px); text-align: center; }

.lb-stage img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  margin-inline: auto;
  object-fit: contain;
}

.lb-stage figcaption {
  font-family: var(--font-label);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--champanhe);
  margin-top: 1.2rem;
  min-height: 1em;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  z-index: 2;
  background: none;
  border: none;
  color: var(--marfim);
  font-family: var(--font-display);
  cursor: pointer;
  line-height: 1;
  padding: 0.6rem 1rem;
  transition: color 0.3s ease;
}

.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--champanhe); }

.lb-close { top: 1.4rem; right: 1.6rem; font-size: 2.2rem; font-weight: 500; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }

.lb-counter {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--marfim);
  opacity: 0.7;
}

/* ============================================================
   GATE OPCIONAL (desligado por padrão)
   ============================================================ */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--grafite);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate[hidden] { display: none; }

.gate-card {
  text-align: center;
  color: var(--marfim);
  padding: 3rem;
  border: 1px solid var(--hairline);
  max-width: 320px;
}

.gate-brand {
  font-family: "Pirulen", "Montserrat", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.07em;
  margin-bottom: 1.6rem;
}

.gate-text { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 1.8rem; }

.gate-card input {
  width: 100%;
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--marfim);
  font-family: var(--font-label);
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-align: center;
  padding: 0.8rem;
  margin-bottom: 1.4rem;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */

@media (max-width: 880px) {

  /* Hero imersivo: vídeo vertical em tela cheia (formato ideal aqui) */
  .hero-photo { display: none; }
  .hero-video { display: block; }
  .hero { align-items: flex-end; }
  .hero-inner { padding-bottom: clamp(5rem, 16vh, 8rem); }
  .hero-text { max-width: none; }
  .video-toggle { display: flex; }

  .feature-grid,
  .feature-grid.is-reversed {
    grid-template-columns: 1fr;
    padding-inline: 0;
    gap: 2.4rem;
  }

  .feature-grid.is-reversed .feature-media { order: 1; }
  .feature-grid.is-reversed .feature-text { order: 2; justify-self: start; }

  .feature-text { max-width: none; padding-inline: var(--pad-inline); }

  .feature-detail,
  .feature-detail.is-right { width: min(78vw, 480px); margin-inline: auto; }

  .stat-sep { height: 44px; }

  .gallery-item:nth-child(n) { grid-column: span 12; aspect-ratio: 4 / 3; }
  .gallery-item:nth-child(4n+2),
  .gallery-item:nth-child(4n+3) { aspect-ratio: 1 / 1; }

  .specs-list { columns: 1; }

  .lb-prev, .lb-next { font-size: 2rem; padding: 0.8rem 0.6rem; }
  .lb-prev { left: 0.2rem; }
  .lb-next { right: 0.2rem; }
}

@media (max-width: 480px) {
  .wordmark { font-size: 0.74rem; letter-spacing: 0.05em; }
  .wordmark-sub { display: none; }
  .header-note { font-size: 0.58rem; }
  .stats-row { gap: 1.8rem; }
  .stat-sep { display: none; }
}

/* ============================================================
   MOVIMENTO REDUZIDO
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal { opacity: 1; transform: none; transition: none; }

  .scroll-indicator span { animation: none; }

  .gallery-item img,
  .gallery-item:hover img { transition: none; transform: none; }
}
