/* ============================================================
   HOME PAGE
   ============================================================ */

/* ==================== HERO PRINCIPAL ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Orbes dourados animados no background */
@keyframes orb-breathe {
  0%, 100% { transform: scale(1) translate(0, 0);   opacity: 0.5; }
  33%       { transform: scale(1.15) translate(20px,-20px); opacity: 0.8; }
  66%       { transform: scale(0.9) translate(-10px, 15px); opacity: 0.4; }
}

.hero::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,75,0.07) 0%, transparent 65%);
  top: -5%;
  right: 20%;
  animation: orb-breathe 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,75,0.05) 0%, transparent 65%);
  bottom: 10%;
  left: -5%;
  animation: orb-breathe 16s ease-in-out infinite reverse;
  animation-delay: -5s;
  pointer-events: none;
  z-index: 0;
}

/* Canvas Three.js fica atrás de tudo */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: var(--z-canvas);
  pointer-events: none;
}

/* Overlay — protege texto (esquerda) e adiciona profundidade no fundo */
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(10,10,10,0.96) 0%,
      rgba(10,10,10,0.82) 28%,
      rgba(10,10,10,0.42) 52%,
      rgba(10,10,10,0.12) 80%,
      rgba(10,10,10,0.04) 100%
    ),
    linear-gradient(to top,
      rgba(10,10,10,0.65) 0%,
      transparent 30%
    );
  z-index: 1;
  pointer-events: none;
}

/* Container de texto — z-index acima da foto */
.hero__inner {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 100vh;
  padding-block: 120px var(--space-11);
}

.hero__copy {
  max-width: 560px;
}

/* ── FOTO FULL-BLEED ────────────────────────────────────────────────────── */

/* Foto: full-bleed 100vw × 100vh, atrás de tudo */
.hero__photo-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  z-index: 2;
  overflow: hidden;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

/* Overlay cuida da borda esquerda — ::before não é mais necessário */
.hero__photo-wrap::before {
  display: none;
}

/* Fade no rodapé */
.hero__photo-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(to top, var(--color-bg) 0%, transparent 100%);
  z-index: 3;
  pointer-events: none;
}

/* Com JS: cortinas fechadas — GSAP vai abrir */
body.gsap-ready .hero__photo-wrap {
  clip-path: polygon(100% 0%, 100% 0%, 100% 100%, 100% 100%);
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  filter: sepia(0.08) saturate(1.15) brightness(1.04) contrast(1.02);
  transform-origin: center 15%;
}

/* Warm amber atmospheric glow over the photo */
.hero__photo-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 65% 28%,
    rgba(230, 160, 55, 0.28) 0%,
    rgba(201, 130, 40, 0.12) 45%,
    transparent 70%
  );
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Floating stat badges over the photo */
.hero__badge {
  position: absolute;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(201, 162, 75, 0.4);
  border-right: 1px solid rgba(201, 162, 75, 0.12);
  border-bottom: 1px solid rgba(201, 162, 75, 0.12);
  border-left: 2px solid var(--color-gold);
  border-radius: 10px;
  padding: 14px 20px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 148px;
  pointer-events: none;
}

.hero__badge-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-gold);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero__badge-label {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.35;
}

.hero__badge--top {
  top: 12%;
  right: 6%;
  left: auto;
}

.hero__badge--bot {
  top: 62%;
  right: 4%;
  left: auto;
}

.hero__eyebrow {
  font-size: var(--size-eyebrow);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-gold);
  display: block;
  margin-bottom: var(--space-5);
}

.hero__title {
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.hero__title em {
  font-style: normal;
  color: var(--color-gold); /* fallback */
  background: linear-gradient(90deg,
    #c9a24b 0%,
    #ffe491 40%,
    #e8b830 65%,
    #c9a24b 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gold-shimmer 5s linear infinite;
}

.hero__sub {
  font-size: clamp(14px, 1.15vw, 16px);
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 44ch;
  margin-bottom: var(--space-7);
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.hero__microcopy {
  font-size: 13px;
  color: var(--color-text-muted);
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hero__microcopy::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background-color: var(--color-gold-soft);
}

/* Scroll indicator */
.hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: 11px;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  opacity: 0.5;
  animation: fade-in 2s ease 2s both;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-gold), transparent);
  animation: float 2s ease-in-out infinite;
}

/* ==================== SEÇÃO STATS ==================== */
.stats-section {
  padding-block: var(--space-7);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  background-color: var(--color-bg-elevated);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stats-grid .stat-card:last-child {
  border-right: none;
}

/* ==================== PILARES ==================== */
.pillars-section {
  padding-block: var(--space-11);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.pillar-card {
  padding: var(--space-7);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-mid) var(--ease-out),
              background-color var(--dur-mid) var(--ease-out),
              transform var(--dur-mid) var(--ease-out),
              box-shadow var(--dur-mid) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.pillar-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent, var(--color-gold), transparent);
  transform: scaleX(0);
  transition: transform var(--dur-mid) var(--ease-out);
}

.pillar-card:hover {
  border-color: var(--color-gold);
  background-color: var(--color-bg-elevated);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(201,162,75,0.08);
}

.pillar-card:hover::after {
  transform: scaleX(1);
}

.pillar-card:hover .pillar-icon {
  transform: scale(1.1) rotate(-5deg);
}

.pillar-icon {
  transition: transform var(--dur-mid) var(--ease-out);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  color: var(--color-gold);
  margin-bottom: var(--space-5);
}

.pillar-title {
  font-size: 20px;
  font-weight: var(--weight-demibold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.pillar-body {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ==================== SHOWCASE 3D (seção fullscreen) ==================== */
.showcase-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#showcase-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.showcase__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(10, 10, 10, 0.92) 0%,
    rgba(10, 10, 10, 0.7) 45%,
    rgba(10, 10, 10, 0.45) 100%);
  z-index: 1;
  pointer-events: none;
}

/* 2-column: copy left, floor-plan SVG right */
.showcase__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
  width: 100%;
  padding-block: var(--space-10);
  min-height: 100vh;
}

.showcase__copy {
  max-width: 560px;
}

.showcase__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase__title {
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  line-height: 1.1;
  margin-bottom: var(--space-5);
}

.showcase__body {
  font-size: 17px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-7);
  max-width: 50ch;
}

/* ==================== FLOOR PLAN SVG ==================== */
.floorplan-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  opacity: 0.88;
}

/* Initial hidden states */
.floorplan-svg .fp-grid    { opacity: 0; }
.floorplan-svg .fp-room    { opacity: 0; }
.floorplan-svg .fp-outer   { stroke-dashoffset: 1; }
.floorplan-svg .fp-wall    { stroke-dashoffset: 1; }
.floorplan-svg .fp-door    { stroke-dashoffset: 1; }
.floorplan-svg .fp-label   { opacity: 0; }
.floorplan-svg .fp-measure { opacity: 0; }
.floorplan-svg .fp-compass { opacity: 0; }
.floorplan-svg .fp-scale   { opacity: 0; }
.floorplan-svg .fp-dots-group { opacity: 0; }

/* Keyframes */
@keyframes fp-draw {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}
@keyframes fp-appear {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fp-pulse {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 1; }
}

/* Triggered when .is-animating added via JS */
.floorplan-svg.is-animating .fp-grid {
  animation: fp-appear 1s ease 0.1s both;
}
.floorplan-svg.is-animating .fp-outer {
  animation: fp-draw 2.4s cubic-bezier(0.22,1,0.36,1) 0.3s both;
}
.floorplan-svg.is-animating .fp-h-main {
  animation: fp-draw 0.9s ease-out 2.1s both;
}
.floorplan-svg.is-animating .fp-v1 {
  animation: fp-draw 0.65s ease-out 2.3s both;
}
.floorplan-svg.is-animating .fp-v2 {
  animation: fp-draw 0.65s ease-out 2.45s both;
}
.floorplan-svg.is-animating .fp-v3 {
  animation: fp-draw 0.5s ease-out 2.6s both;
}
.floorplan-svg.is-animating .fp-v4 {
  animation: fp-draw 0.5s ease-out 2.7s both;
}
.floorplan-svg.is-animating .fp-door {
  animation: fp-draw 0.5s ease-out 2.85s both;
}
.floorplan-svg.is-animating .fp-room {
  animation: fp-appear 0.55s ease 3.1s both;
}
.floorplan-svg.is-animating .fp-label {
  animation: fp-appear 0.4s ease both;
}
.floorplan-svg.is-animating .fp-label-sala  { animation-delay: 3.2s; }
.floorplan-svg.is-animating .fp-label-q1    { animation-delay: 3.3s; }
.floorplan-svg.is-animating .fp-label-q2    { animation-delay: 3.4s; }
.floorplan-svg.is-animating .fp-label-coz   { animation-delay: 3.5s; }
.floorplan-svg.is-animating .fp-label-banh  { animation-delay: 3.6s; }
.floorplan-svg.is-animating .fp-label-area  { animation-delay: 3.7s; }
.floorplan-svg.is-animating .fp-measure {
  animation: fp-appear 0.7s ease 3.3s both;
}
.floorplan-svg.is-animating .fp-compass {
  animation: fp-appear 0.6s ease 3.5s both;
}
.floorplan-svg.is-animating .fp-scale {
  animation: fp-appear 0.6s ease 3.6s both;
}
.floorplan-svg.is-animating .fp-dots-group {
  animation: fp-appear 0.5s ease 3.7s forwards;
}
.floorplan-svg.is-animating .fp-dot {
  animation: fp-pulse 2.8s ease-in-out 4.2s infinite;
}

/* ==================== PROVA SOCIAL ==================== */
.social-proof-section {
  padding-block: var(--space-11);
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-9);
}

.ig-embed-wrap {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 350px;
  background-color: var(--color-bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}

/* ==================== FAQ ==================== */
.faq-section {
  padding-block: var(--space-11);
  background-color: var(--color-bg-elevated);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.faq-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-9);
  align-items: start;
}

.faq-intro {
  position: sticky;
  top: 120px;
}

.faq-intro__title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: var(--space-5);
}

.faq-intro__sub {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ==================== RESPONSIVO HOME ==================== */
@media (max-width: 1024px) {
  /* Foto full-bleed em tablet — reduz opacidade levemente */
  .hero__photo-wrap {
    opacity: 0.75;
  }

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

  .stats-grid .stat-card:nth-child(2) {
    border-right: none;
  }

  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .faq-layout {
    grid-template-columns: 1fr;
  }

  .faq-intro {
    position: static;
  }
}

@media (max-width: 768px) {
  /* Hero empilhado: foto em cima, texto embaixo */
  .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    overflow: visible;
  }

  #hero-canvas,
  .hero__overlay,
  .hero::before,
  .hero::after {
    display: none;
  }

  /* Foto vira primeiro elemento (topo) */
  .hero__photo-wrap {
    position: relative;
    inset: unset;
    width: 100%;
    height: 88vw;
    max-height: 460px;
    opacity: 1;
    z-index: 1;
    order: 0;
    clip-path: none;
    flex-shrink: 0;
  }

  body.gsap-ready .hero__photo-wrap {
    clip-path: none;
  }

  /* Fade no topo (onde o nav sobrepõe) */
  .hero__photo-wrap::before {
    display: block;
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 88px;
    background: linear-gradient(to bottom, var(--color-bg) 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
    width: 100%;
  }

  /* Fade na base — funde com o texto abaixo */
  .hero__photo-wrap::after {
    height: 38%;
  }

  .hero__photo {
    object-position: center 5%;
  }

  .hero__photo-glow,
  .hero__badge,
  .hero__scroll-hint {
    display: none;
  }

  /* Container de texto vem depois da foto */
  .hero > .container {
    order: 1;
  }

  /* Texto com padding adequado abaixo da foto */
  .hero__inner {
    min-height: auto;
    padding-block: var(--space-5) var(--space-7);
  }

  /* Seções com padding fixo no CSS — reduzir no mobile */
  .stats-section    { padding-block: var(--space-6); }
  .pillars-section  { padding-block: var(--space-8); }
  .social-proof-section { padding-block: var(--space-8); }
  .faq-section      { padding-block: var(--space-8); }

  /* Showcase: empilha texto + esconde SVG no mobile */
  .showcase-section { min-height: 50vh; }
  .showcase__inner  { grid-template-columns: 1fr; padding-block: var(--space-8); min-height: 50vh; }
  .showcase__visual { display: none; }

  /* Reduz gaps grandes */
  .social-grid  { margin-bottom: var(--space-6); }
  .faq-layout   { gap: var(--space-6); }

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

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

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

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

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .stats-grid .stat-card {
    border-right: none;
    border-bottom: 1px solid var(--color-line);
  }

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