/* ============================================================
   Terraza 6 — House Tour
   Refined scroll experience with editorial typography
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@300;400;600;700&family=Poppins:wght@200;300;400;600;700;800&display=swap');

:root {
  --bg-warm: #F4F1EB;
  --bg-dark: #0C0F0D;
  --text-dark: #1A1A1A;
  --text-light: #F0EDE8;
  --orange: #E36C0F;
  --amber: #FA9200;
  --sage: #98C9A3;
  --sage-dark: #5A7A5E;
  --font-display: 'Poppins', sans-serif;
  --font-label: 'Barlow Condensed', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: var(--font-display); background: var(--bg-dark); color: var(--text-dark); }
body { -webkit-overflow-scrolling: touch; }

/* ── Loader ──────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-dark);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
  transition: opacity 0.6s ease;
}
#loader.done { opacity: 0; pointer-events: none; }
.loader-brand {
  font-family: var(--font-label); font-size: 13px; font-weight: 600;
  letter-spacing: 8px; color: rgba(255,255,255,0.2); text-transform: uppercase;
}
.loader-track {
  width: 160px; height: 1px;
  background: rgba(255,255,255,0.06); overflow: hidden;
}
.loader-bar {
  width: 0%; height: 100%;
  background: var(--sage); transition: width 0.15s linear;
}
.loader-percent {
  font-family: var(--font-label); font-size: 11px; font-weight: 400;
  color: rgba(255,255,255,0.15); letter-spacing: 3px;
}

/* ── Nav overrides ───────────────────────────────────── */
nav.nav2 { position: fixed !important; z-index: 100; }
nav.nav2.nav-over-hero:not(.nav-scroll) .navbar-nav .nav-link { color: #fff !important; }
nav.nav2.nav-over-hero:not(.nav-scroll) .logo-img { filter: brightness(0) invert(1); }
nav.nav2.nav-over-hero:not(.nav-scroll) .mob-burger__bar { background: #fff; }

/* ── Hero ────────────────────────────────────────────── */
.hero-standalone {
  position: fixed; top: 0; left: 0; right: 0;
  height: 100vh; z-index: 5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #0b1a14 0%, #0f2a1f 35%, #132e22 55%, #0d1f17 100%);
  padding: 0 24px; overflow: hidden;
}
.hero-standalone::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(152,201,163,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 20% 80%, rgba(227,108,15,0.03) 0%, transparent 50%);
  pointer-events: none;
}
.hero-standalone .section-label {
  font-family: var(--font-label); font-size: 13px; font-weight: 400;
  letter-spacing: 6px; text-transform: uppercase;
  color: var(--sage); margin-bottom: 24px;
  opacity: 0.8;
}
.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  font-weight: 700; line-height: 1.0;
  color: #fff; letter-spacing: -1.5px;
  max-width: 780px;
}
.hero-heading span { display: inline-block; opacity: 0; transform: translateY(30px); }
.hero-tagline {
  font-family: var(--font-label); font-size: 13px; font-weight: 300;
  color: rgba(255,255,255,0.4); margin-top: 24px;
  letter-spacing: 4px; text-transform: uppercase; white-space: nowrap;
}
.scroll-indicator {
  position: absolute; bottom: 36px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.18);
  font-family: var(--font-label); font-size: 9px; font-weight: 400;
  letter-spacing: 3px; text-transform: uppercase;
  animation: bob 2.5s ease infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ── Canvas ──────────────────────────────────────────── */
.canvas-wrap {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 8; clip-path: circle(0% at 50% 50%);
  pointer-events: none;
}
canvas { display: block; width: 100%; height: 100%; }

#dark-overlay { display: none; }

/* ── Mobile scroll hint ──────────────────────────────── */
.mobile-scroll-hint {
  display: none;
  position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-label); font-size: 11px; font-weight: 400;
  letter-spacing: 2px; text-transform: uppercase;
  animation: hintPulse 2s ease infinite;
  pointer-events: none;
  transition: opacity 0.5s;
}
.hint-dot { animation: hintScroll 1.5s ease infinite; }
@keyframes hintScroll {
  0% { cy: 10; opacity: 1; }
  100% { cy: 24; opacity: 0; }
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
@media (max-width: 768px) {
  .mobile-scroll-hint { display: flex; }
}

/* ── Marquee ─────────────────────────────────────────── */
.marquee-wrap {
  position: fixed; z-index: 9; top: 50%; left: 0; right: 0;
  transform: translateY(-50%); pointer-events: none;
  opacity: 0; overflow: visible;
}
.marquee-text {
  font-family: var(--font-display); font-size: 14vw; font-weight: 800;
  color: rgba(255,255,255,0.03); white-space: nowrap; letter-spacing: -3px;
  text-transform: uppercase;
}

/* ── Scroll Container ────────────────────────────────── */
#scroll-container {
  position: relative;
  height: 2400vh;
}

/* ── Sections ────────────────────────────────────────── */
.scroll-section {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center;
  height: 100vh;
  opacity: 0; pointer-events: none;
  z-index: 50;
}
.align-left { padding: 0 52vw 0 6vw; justify-content: flex-start; }
.align-right { padding: 0 6vw 0 52vw; justify-content: flex-end; }

.section-inner {
  max-width: 40vw;
  padding-left: 28px;
  border-left: 2px solid rgba(152,201,163,0.5);
  position: relative;
}

/* Soft dark glow behind text */
.section-inner::before {
  content: ''; position: absolute;
  top: 50%; left: 50%;
  width: 220%; height: 300%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(0,0,0,0.12);
  filter: blur(80px);
  z-index: -1; pointer-events: none;
}

.section-label {
  font-family: var(--font-label); font-size: 12px; font-weight: 400;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--sage); display: block; margin-bottom: 16px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600; line-height: 1.15;
  color: #fff; letter-spacing: -0.5px;
  margin-bottom: 16px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9), 0 0 12px rgba(0,0,0,0.7), 0 0 40px rgba(0,0,0,0.3);
}
.section-body {
  font-size: 15px; font-weight: 300; line-height: 1.8;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 1px 3px rgba(0,0,0,0.85), 0 0 10px rgba(0,0,0,0.5);
}
.section-note {
  font-size: 14px; font-weight: 300;
  color: rgba(255,255,255,0.6); margin-top: 14px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.85);
}

/* ── Stats ───────────────────────────────────────────── */
.section-stats {
  justify-content: center; padding: 0 40px;
  text-align: center;
}
.section-stats .section-inner { border-left: none; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 40px; max-width: 780px; margin: 0 auto;
}
.stat {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
}
.stat-number {
  font-family: var(--font-display); font-size: 52px; font-weight: 700;
  color: #fff; line-height: 1; font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.4);
}
.stat-suffix {
  font-family: var(--font-label); font-size: 16px; font-weight: 400;
  color: var(--sage); letter-spacing: 1px; opacity: 0.8;
}
.stat-label {
  font-family: var(--font-label); font-size: 11px; font-weight: 300;
  color: rgba(255,255,255,0.5); letter-spacing: 1px;
  margin-top: 6px; text-transform: uppercase;
}

/* ── CTA ─────────────────────────────────────────────── */
.section-cta { justify-content: center; padding: 0 24px; text-align: center; }
.cta-inner {
  max-width: 520px; margin: 0 auto;
  text-align: center; border-left: none; padding-left: 0;
}
.cta-inner .section-label { color: rgba(255,255,255,0.35); }
.cta-inner .section-heading {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}
.cta-button {
  display: inline-block; font-family: var(--font-label);
  font-size: 14px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  color: #fff; text-decoration: none;
  background: var(--orange);
  padding: 16px 44px; border-radius: 4px;
  margin-top: 32px;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  box-shadow: 0 4px 24px rgba(227,108,15,0.25);
}
.cta-button:hover {
  background: #c95e0d;
  transform: translateY(-1px);
  box-shadow: 0 8px 36px rgba(227,108,15,0.35);
}

/* ── Footer ──────────────────────────────────────────── */
.fba, .footer, .footer-premium, .backgroundfooter { position: relative; z-index: 60; }
#wa-floating-btn { z-index: 200; }

/* ── Mobile — split layout: video top, text bottom ──── */
@media (max-width: 768px) {
  #scroll-container { height: 1800vh; }

  .hero-heading { font-size: clamp(1.8rem, 8vw, 3.5rem); letter-spacing: -1px; }
  .hero-tagline { white-space: normal; font-size: 11px; letter-spacing: 2px; text-align: center; max-width: 280px; }

  /* Canvas takes top 55% of screen, fitted to width */
  .canvas-wrap {
    top: 0; bottom: auto;
    height: 55vh;
  }
  canvas {
    object-fit: contain;
  }

  /* Sections sit in bottom 45% with dark background */
  .scroll-section {
    top: auto; bottom: 0;
    height: 45vh;
    align-items: flex-start;
    padding-top: 24px;
    background: linear-gradient(180deg, rgba(12,15,13,0.95) 0%, rgba(12,15,13,0.98) 100%);
  }
  .align-left, .align-right {
    padding: 0 24px;
    justify-content: flex-start;
  }
  .section-inner {
    max-width: 100%;
    padding-left: 16px;
    border-left-width: 2px;
  }
  .section-inner::before { display: none; }
  .section-heading { font-size: 1.5rem; margin-bottom: 10px; }
  .section-body { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,0.75); }
  .section-label { font-size: 10px; margin-bottom: 10px; letter-spacing: 3px; }
  .section-note { font-size: 12px; }

  /* Remove text shadows on mobile — dark bg handles contrast */
  .section-label,
  .section-heading,
  .section-body,
  .section-note { text-shadow: none; }

  /* Stats */
  .section-stats { padding: 0 24px; align-items: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat-number { font-size: 32px; text-shadow: none; }
  .stat-suffix { font-size: 14px; }
  .stat-label { font-size: 9px; }

  /* CTA */
  .section-cta { align-items: center; padding-top: 20px; }
  .cta-inner { max-width: 100%; }
  .cta-inner .section-heading { font-size: 1.3rem; }
  .cta-button { padding: 14px 32px; font-size: 12px; letter-spacing: 2px; }

  /* Marquee hidden on mobile — too noisy with split layout */
  .marquee-wrap { display: none; }
}

@media (max-width: 480px) {
  .canvas-wrap { height: 50vh; }
  .scroll-section { height: 50vh; }
  .hero-heading { font-size: 1.5rem; }
  .section-heading { font-size: 1.3rem; }
  .section-body { font-size: 12px; }
}
