/* ─────────────────────────────────────────
   ONE ESTATE — CINEMATIC 3D EXPERIENCE
   ───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@200;300;400;500&display=swap');

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

:root {
  --gold: #c9a96e;
  --gold-light: #e8d5a3;
  --cream: #f5f0e8;
  --dark: #070605;
  --amber: #d4a853;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--dark);
  color: var(--cream);
  overscroll-behavior: none;
  overflow-x: hidden;
}

/* ── SCROLL SPACER ── */
#scroll-spacer {
  height: 800vh;
  position: relative;
  z-index: 0;
}

/* ── CANVAS CONTAINER ── */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

/* ── FIXED STAGE ── */
#stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

/* ── VIGNETTE ── */
#vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.8) 100%);
  pointer-events: none;
  z-index: 2;
  opacity: 0.8;
}

/* ── NAV ── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 60px;
  transition: all 0.5s ease;
  pointer-events: auto;
}
#nav.scrolled {
  padding: 20px 60px;
  background: rgba(7,6,5,0.4);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201,169,110,0.1);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 40px; }
.nav-links a {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.6);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  display: inline-block;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--gold);
  border: none;
  padding: 12px 28px;
  cursor: pointer;
  transition: all 0.3s;
}
.nav-cta:hover { background: var(--gold-light); transform: translateY(-2px); }

/* ── PROGRESS BAR ── */
#progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.05);
  z-index: 200;
}
#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

/* ── SCENE TEXTS ── */
.scene-text {
  position: absolute;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  max-width: 600px;
  will-change: opacity, transform;
}
.scene-text.visible { pointer-events: auto; }

#text-0 { top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; max-width: 95vw; width: 100%; }
#text-1 { top: 50%; left: 10vw; transform: translateY(-50%); }
#text-2 { top: 50%; right: 10vw; transform: translateY(-50%); text-align: right; }
#text-3 { bottom: 15vh; left: 10vw; }
#text-4 { top: 50%; right: 10vw; transform: translateY(-50%); text-align: right; }
#text-5 { bottom: 15vh; left: 50%; transform: translateX(-50%); text-align: center; }
#text-6 { top: 50%; left: 10vw; transform: translateY(-50%); }

.eyebrow {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  display: block;
}
h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5.5vw, 4.2rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 30px;
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--gold-light); }
h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 24px;
}
.sub {
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: rgba(245,240,232,0.5);
  margin-bottom: 40px;
}
.body-p {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(245,240,232,0.6);
  margin-bottom: 30px;
  max-width: 450px;
}

.chip {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,169,110,0.4);
  padding: 8px 20px;
  margin-bottom: 10px;
}

.stat-row { display: flex; align-items: center; gap: 40px; margin-top: 40px; justify-content: center; }
#text-1 .stat-row, #text-3 .stat-row, #text-6 .stat-row { justify-content: flex-start; }
#text-2 .stat-row, #text-4 .stat-row { justify-content: flex-end; }

.stat { display: flex; flex-direction: column; gap: 8px; }
.sn {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}
.sl {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.4);
}
.sdiv { width: 1px; height: 60px; background: rgba(201,169,110,0.2); }

.feat-list { list-style: none; margin-top: 30px; display: flex; flex-direction: column; gap: 15px; }
.feat-list li {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: rgba(245,240,232,0.5);
  text-transform: uppercase;
}

.feature-pills { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 30px; }
.pill {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,169,110,0.3);
  padding: 8px 20px;
  background: rgba(201,169,110,0.05);
}

/* ── SCROLL CUE ── */
.scroll-cue { display: flex; align-items: center; gap: 15px; justify-content: center; margin-top: 50px; opacity: 0.5; }
.sc-mouse {
  width: 26px; height: 42px;
  border: 2px solid rgba(245,240,232,0.3);
  border-radius: 15px;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 8px;
}
.sc-wheel {
  width: 4px; height: 8px;
  background: var(--gold);
  border-radius: 2px;
  animation: scrollWheel 2s ease-in-out infinite;
}
@keyframes scrollWheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(15px); opacity: 0; }
}

/* ── ENCYCLOPEDIA STYLES ── */
.enc-sidebar::-webkit-scrollbar { display: none; }
.enc-tab { 
    background: rgba(245,240,232,0.03); 
    border: 1px solid rgba(245,240,232,0.06); 
    padding: 10px 15px; 
    cursor: pointer; 
    text-align: left; 
    transition: all 0.3s ease;
}
.enc-tab:hover { background: rgba(245,240,232,0.08); }
.enc-tab.active { 
    background: rgba(201, 169, 110, 0.1); 
    border-color: rgba(201, 169, 110, 0.4); 
    box-shadow: 0 0 30px rgba(201, 169, 110, 0.05);
}
.enc-tab-tag { 
    font-size: 0.6rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    color: rgba(245,240,232,0.3); 
    margin-bottom: 4px;
}
.enc-tab.active .enc-tab-tag { color: var(--gold); }
.enc-tab-title { 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: rgba(245,240,232,0.6); 
    line-height: 1.2;
}
.enc-tab.active .enc-tab-title { color: #fff; }

.enc-panel::-webkit-scrollbar { width: 4px; }
.enc-panel::-webkit-scrollbar-thumb { background: rgba(201,169,110,0.2); border-radius: 2px; }

/* ── CONTACT SECTION & FLAME ANIMATION ── */
.flame-text-wrap {
    margin: 20px 0;
    perspective: 1000px;
}
.flame-text {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: 'Outfit', sans-serif;
    color: var(--gold);
    position: relative;
    animation: flame-pulse 2s infinite alternate ease-in-out;
}
@keyframes flame-pulse {
    0% {
        text-shadow: 
            0 0 15px rgba(201, 169, 110, 0.4),
            0 0 30px rgba(201, 169, 110, 0.2);
        transform: scale(1) translateY(0);
        opacity: 0.9;
    }
    100% {
        text-shadow: 
            0 0 25px rgba(201, 169, 110, 0.8),
            0 0 50px rgba(201, 169, 110, 0.4),
            0 0 80px rgba(201, 169, 110, 0.2);
        transform: scale(1.03) translateY(-5px);
        opacity: 1;
    }
}
.cta-button {
    backdrop-filter: blur(10px);
}
.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(201, 169, 110, 0.3);
}
.cta-button.primary:hover {
    background: #fff !important;
}
.cta-button.secondary:hover {
    border-color: #fff !important;
    background: rgba(255,255,255,0.05) !important;
}

@media (max-width: 768px) {
  #nav { padding: 20px; }
  .nav-links { display: none; }
  .scene-text { padding: 0 30px; max-width: 100%; }
  #text-1, #text-2, #text-3, #text-4, #text-6 { top: auto; bottom: 15vh; left: 0; right: 0; text-align: center; transform: none; }
  .form-row { flex-direction: column; }
}
