/* =====================================================================
   Dhawan Developers — styles
   Palette: night-sky navy, champagne, patina bronze, window amber.
   Type: Marcellus (classical display, echoes the logo's columns)
         Manrope (clear modern text)
   ===================================================================== */

:root {
  --space-0: #050911;
  --space-1: #0a1220;
  --space-2: #12203a;
  --ivory: #efe9dd;
  --ivory-dim: rgba(239, 233, 221, 0.72);
  --ivory-faint: rgba(239, 233, 221, 0.5);
  --champagne: #d6be92;
  --bronze: #a8824f;
  --mist: #94a5bd;
  --amber: #f3bd78;
  --sold: #c98d7a;

  --glass: rgba(18, 29, 51, 0.42);
  --glass-strong: rgba(14, 23, 41, 0.72);
  --line: rgba(214, 190, 146, 0.18);
  --line-soft: rgba(239, 233, 221, 0.09);

  --f-display: 'Marcellus', 'Times New Roman', serif;
  --f-text: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--space-0);
  background-image:
    radial-gradient(1200px 800px at 85% -10%, rgba(40, 62, 110, 0.35), transparent 60%),
    radial-gradient(900px 700px at -10% 40%, rgba(60, 48, 90, 0.18), transparent 60%),
    radial-gradient(1000px 900px at 50% 120%, rgba(30, 55, 95, 0.3), transparent 60%);
  background-attachment: fixed;
  color: var(--ivory);
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: 'tnum' 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--champagne); color: var(--space-0); }

:focus-visible {
  outline: 2px solid var(--champagne);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.04;
  margin: 0;
}

.h-xl { font-size: clamp(44px, 7.4vw, 112px); }
.h-lg { font-size: clamp(36px, 5vw, 72px); }
.h-md { font-size: clamp(28px, 3.2vw, 44px); }
.h-sm { font-size: clamp(22px, 2vw, 28px); }

.lede { font-size: clamp(17px, 1.35vw, 20px); color: var(--ivory-dim); max-width: 34em; margin: 0; }
.muted { color: var(--ivory-faint); }
.num { font-feature-settings: 'tnum' 1; }

/* ---------- Background starfield canvas (shared) ---------- */
#scene, #stars {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}
main, .site-footer { position: relative; z-index: 2; }

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 100;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(214, 190, 146, 0.55);
  border-radius: 50%;
  pointer-events: none;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease),
              background-color .35s var(--ease), border-color .35s var(--ease), opacity .3s;
  mix-blend-mode: normal;
  opacity: 0;
}
.cursor-dot {
  position: fixed; left: 0; top: 0; z-index: 101;
  width: 4px; height: 4px; margin: -2px 0 0 -2px;
  background: var(--champagne); border-radius: 50%;
  pointer-events: none; opacity: 0; transition: opacity .3s;
}
.has-cursor .cursor, .has-cursor .cursor-dot { opacity: 1; }
.cursor.is-hover {
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  background: rgba(214, 190, 146, 0.08);
  border-color: rgba(214, 190, 146, 0.8);
}
.cursor.is-drag {
  width: 84px; height: 84px; margin: -42px 0 0 -42px;
  background: rgba(214, 190, 146, 0.1);
}
.cursor-label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11px; letter-spacing: .04em; color: var(--champagne); opacity: 0;
  transition: opacity .25s;
}
.cursor.is-drag .cursor-label { opacity: 1; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  transition: background-color .5s var(--ease), padding .5s var(--ease), transform .6s var(--ease), opacity .6s;
}
.nav.is-scrolled {
  background: rgba(6, 11, 20, 0.55);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  padding-top: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.nav.is-hidden { opacity: 0; transform: translateY(-20px); pointer-events: none; }

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-family: var(--f-display); font-size: 21px; line-height: 1; letter-spacing: .02em; }
.brand-sub { display: block; font-family: var(--f-text); font-size: 12px; color: var(--ivory-faint); margin-top: 5px; letter-spacing: .02em; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 10px 16px; border-radius: 999px; font-size: 15px; color: var(--ivory-dim);
  transition: color .3s, background-color .3s;
}
.nav-link:hover { color: var(--ivory); background: rgba(239, 233, 221, 0.06); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  transition: transform .4s var(--ease), background-color .3s, color .3s, border-color .3s, box-shadow .4s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-gold {
  background: linear-gradient(135deg, #e4cfa6, #b9945e);
  color: #14110b;
  box-shadow: 0 10px 40px -12px rgba(214, 190, 146, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 18px 50px -14px rgba(214, 190, 146, 0.75), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(239, 233, 221, 0.03);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: rgba(214, 190, 146, 0.5); background: rgba(214, 190, 146, 0.08); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  pointer-events: none;
}
.intro-logo {
  width: min(52vmin, 440px); aspect-ratio: 1;
  opacity: 0;
  filter: drop-shadow(0 0 30px rgba(214, 190, 146, 0.35));
}
.intro-caption {
  position: absolute; left: 0; right: 0; bottom: 12vh;
  text-align: center; font-family: var(--f-display);
  font-size: clamp(18px, 2vw, 24px); color: var(--ivory-dim);
  letter-spacing: .04em; opacity: 0;
}
.intro-skip {
  position: absolute; right: var(--gutter); bottom: 32px;
  pointer-events: auto; font-size: 14px; color: var(--ivory-faint);
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-soft);
  transition: color .3s, border-color .3s, opacity .4s;
}
.intro-skip:hover { color: var(--ivory); border-color: var(--line); }
.intro.is-done { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 340vh; }
.hero-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; align-items: flex-end;
  padding: 0 var(--gutter) clamp(40px, 9vh, 96px);
  pointer-events: none;
}
.hero-copy { max-width: 760px; pointer-events: auto; }
.hero-copy .h-xl { margin-bottom: 26px; }
.hero-line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero-line > span { display: inline-block; will-change: transform; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-meta { position: absolute; right: var(--gutter); bottom: clamp(40px, 9vh, 96px); text-align: right; font-size: 14px; color: var(--ivory-faint); }
.hero-meta strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: 30px; color: var(--champagne); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 26px; height: 42px; border-radius: 14px; border: 1px solid var(--line);
}
.scroll-hint::after {
  content: ''; position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--champagne);
  animation: scrollHint 2.2s var(--ease) infinite;
}
@keyframes scrollHint { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

.floors-copy {
  position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%);
  max-width: 420px; opacity: 0; pointer-events: none;
}
.floors-copy p { margin-top: 18px; }

.floor-tags { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.floor-tag {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: var(--ivory); white-space: nowrap;
  opacity: 0; will-change: transform, opacity;
}
.floor-tag::before {
  content: ''; width: 56px; height: 1px;
  background: linear-gradient(90deg, rgba(214,190,146,0), var(--champagne));
}
.floor-tag b { font-weight: 600; color: var(--champagne); font-family: var(--f-display); font-size: 18px; }

/* ---------- Sections ---------- */
.section { padding: clamp(90px, 14vh, 160px) 0; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: 48px; }
.section-head .lede { margin-top: 18px; }

.glass {
  background: var(--glass);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

/* ---------- Heritage ---------- */
.heritage { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.heritage-year { font-family: var(--f-display); font-size: clamp(110px, 19vw, 280px); line-height: .82; color: transparent;
  -webkit-text-stroke: 1px rgba(214, 190, 146, 0.55); letter-spacing: -.01em; }
.heritage-year span { display: block; font-size: clamp(16px, 1.3vw, 19px); max-width: 22em; -webkit-text-stroke: 0; color: var(--ivory-faint); font-family: var(--f-text); letter-spacing: 0; margin-top: .4em; line-height: 1.3; }
.heritage-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border-radius: var(--r-md); overflow: hidden; margin-top: 40px; }
.heritage-facts div { background: rgba(10, 18, 32, 0.65); padding: 22px 24px; }
.heritage-facts strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: 32px; color: var(--champagne); line-height: 1.1; }
.heritage-facts span { font-size: 14px; color: var(--ivory-faint); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.filter-group { display: flex; gap: 4px; padding: 4px; border-radius: 999px; }
.chip {
  padding: 9px 16px; border-radius: 999px; font-size: 14px; color: var(--ivory-dim);
  transition: background-color .3s, color .3s;
}
.chip:hover { color: var(--ivory); }
.chip.is-active { background: rgba(214, 190, 146, 0.16); color: var(--champagne); }

.sample-note {
  display: flex; gap: 12px; align-items: center; padding: 14px 20px; border-radius: var(--r-sm);
  font-size: 14px; color: var(--ivory-dim); margin-bottom: 28px; border-color: rgba(243, 189, 120, 0.25);
}
.sample-note::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); flex: none; }

/* ---------- Property cards ---------- */
.grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(18px, 2.2vw, 30px);
  perspective: 1400px;
}
.card-slot { grid-column: span 4; }
.card-slot.is-featured { grid-column: span 8; grid-row: span 2; }
.card-slot.is-wide { grid-column: span 6; }

.card {
  position: relative; display: block; height: 100%; min-height: 440px;
  border-radius: var(--r-lg); overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
  background: var(--space-1);
  isolation: isolate;
}
.card-slot.is-featured .card { min-height: 640px; }
.card-media { position: absolute; inset: -4%; z-index: 0; }
.card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s var(--ease), transform 1.6s var(--ease);
  transform: scale(1.04);
}
.card-media img.is-on { opacity: 1; }
.card:hover .card-media img.is-on { transform: scale(1.09); }
.card::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(5, 9, 17, 0) 30%, rgba(5, 9, 17, 0.55) 60%, rgba(5, 9, 17, 0.95) 100%);
}
.card-glare {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: radial-gradient(600px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 240, 210, 0.16), transparent 40%);
  transition: opacity .5s;
}
.card:hover .card-glare { opacity: 1; }
.card-body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: clamp(22px, 2.4vw, 34px);
  transform: translateZ(40px);
}
.card-tags { position: absolute; top: 22px; left: 22px; right: 22px; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; transform: translateZ(30px); }
.tag {
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  background: rgba(6, 11, 20, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-soft); color: var(--ivory);
}
.tag-status::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; background: #8fd4a6; box-shadow: 0 0 10px #8fd4a6; vertical-align: 1px; }
.tag-status[data-status="Under construction"]::before { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.tag-status[data-status="Sold"]::before { background: var(--sold); box-shadow: none; }
.tag-sample { color: var(--amber); border-color: rgba(243, 189, 120, 0.3); }
.card-loc { font-size: 14px; color: var(--champagne); margin-bottom: 8px; }
.card-title { font-family: var(--f-display); font-size: clamp(24px, 2.1vw, 32px); line-height: 1.12; margin: 0 0 18px; }
.card-slot.is-featured .card-title { font-size: clamp(30px, 3.2vw, 48px); max-width: 16em; }
.card-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.card-specs { display: flex; gap: 18px; font-size: 14px; color: var(--ivory-dim); flex-wrap: wrap; }
.card-specs span { display: inline-flex; gap: 6px; align-items: center; }
.card-specs svg { width: 16px; height: 16px; opacity: .7; }
.card-price { font-family: var(--f-display); font-size: 26px; color: var(--ivory); white-space: nowrap; }
.card-price small { font-family: var(--f-text); font-size: 13px; color: var(--ivory-faint); display: block; text-align: right; }
.card-3d {
  position: absolute; right: 22px; top: 22px; z-index: 2; transform: translateZ(50px);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(214, 190, 146, 0.15); border: 1px solid rgba(214, 190, 146, 0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12px; font-weight: 700; color: var(--champagne);
}

.empty {
  grid-column: 1 / -1; padding: 60px 30px; text-align: center; border-radius: var(--r-lg);
}
.empty .btn { margin-top: 18px; }

/* floating idle motion */
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.float { animation: floaty 7s ease-in-out infinite; }
.float.d1 { animation-delay: -1.5s; } .float.d2 { animation-delay: -3s; } .float.d3 { animation-delay: -4.5s; }

/* ---------- Office ---------- */
.office { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.medallion-wrap { perspective: 1200px; display: grid; place-items: center; }
.medallion {
  position: relative; width: min(420px, 78vw); aspect-ratio: 1;
  transform-style: preserve-3d; transition: transform .8s var(--ease);
}
.medallion-face {
  position: absolute; inset: 0; border-radius: 50%;
  display: grid; place-items: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 245, 225, 0.12), transparent 45%),
    radial-gradient(circle at 50% 50%, #17243d, #0b1424 70%);
  border: 1px solid rgba(214, 190, 146, 0.35);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.6), 0 40px 120px -30px rgba(214, 190, 146, 0.25);
}
.medallion-face img { width: 86%; height: 86%; object-fit: contain; }
.medallion-back { transform: rotateY(180deg); text-align: center; padding: 18%; }
.medallion-back .display { font-size: clamp(26px, 3vw, 38px); color: var(--champagne); }
.medallion-back p { font-size: 14px; color: var(--ivory-dim); margin: 14px 0 0; }
.medallion-rim {
  position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed rgba(214, 190, 146, 0.2);
  animation: spin 60s linear infinite; pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.contact-list { display: grid; gap: 12px; margin-top: 36px; }
.contact-item {
  display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-radius: var(--r-md);
  transition: border-color .3s, background-color .3s, transform .4s var(--ease);
}
a.contact-item:hover { border-color: rgba(214, 190, 146, 0.35); background: rgba(214, 190, 146, 0.06); transform: translateX(6px); }
.contact-icon {
  width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: rgba(214, 190, 146, 0.1); color: var(--champagne);
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-item small { display: block; font-size: 13px; color: var(--ivory-faint); }
.contact-item span { font-size: 17px; }

.map-frame { margin-top: 28px; border-radius: var(--r-lg); overflow: hidden; height: 300px; position: relative; }
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: invert(.92) hue-rotate(180deg) saturate(.55) brightness(.9) contrast(.95); }

/* ---------- Footer ---------- */
.site-footer { padding: 60px 0 40px; border-top: 1px solid var(--line-soft); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--ivory-faint); }

/* =====================================================================
   PROPERTY PAGE
   ===================================================================== */
.p-hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.p-hero-media { position: absolute; inset: -6%; z-index: 0; }
.p-hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.p-hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(5, 9, 17, 0.55) 0%, rgba(5, 9, 17, 0) 25%, rgba(5, 9, 17, 0.35) 55%, var(--space-0) 100%),
    linear-gradient(90deg, rgba(5, 9, 17, 0.6), transparent 60%);
}
.p-hero-inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(40px, 8vh, 90px); }
.p-hero .card-tags { position: static; transform: none; margin-bottom: 22px; }
.p-hero-title { max-width: 14em; }
.p-hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-top: 28px; }
.p-price { font-family: var(--f-display); font-size: clamp(34px, 4vw, 56px); line-height: 1; }
.p-price small { display: block; font-family: var(--f-text); font-size: 14px; color: var(--ivory-faint); margin-top: 10px; }
.p-quick { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 22px; color: var(--ivory-dim); font-size: 15px; }
.p-quick b { color: var(--ivory); font-weight: 600; }

/* 3D model section */
.model-section { padding-top: clamp(60px, 10vh, 120px); }
.model-shell {
  position: relative; height: min(82vh, 820px); min-height: 520px;
  border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(900px 600px at 50% 40%, rgba(40, 62, 110, 0.35), transparent 70%),
    linear-gradient(180deg, #08101d, #050911);
  border: 1px solid var(--line-soft);
}
.model-shell canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.model-tabs { position: absolute; top: 18px; left: 18px; z-index: 4; display: flex; gap: 4px; padding: 4px; border-radius: 999px; }
.model-tools { position: absolute; top: 18px; right: 18px; z-index: 4; display: flex; gap: 4px; padding: 4px; border-radius: 999px; }
.model-hint {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 4;
  font-size: 13px; color: var(--ivory-faint); padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  transition: opacity .6s;
}
.model-rooms { transition: opacity .5s; position: absolute; left: 18px; bottom: 18px; z-index: 4; display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: var(--r-md); max-height: calc(100% - 110px); overflow: auto; }
.model-rooms button { text-align: left; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; color: var(--ivory-dim); display: flex; justify-content: space-between; gap: 18px; transition: background-color .25s, color .25s; }
.model-rooms button small { color: var(--ivory-faint); font-size: 12px; }
.model-rooms button:hover, .model-rooms button.is-active { background: rgba(214, 190, 146, 0.12); color: var(--ivory); }
.model-loading { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; color: var(--ivory-faint); font-size: 14px; transition: opacity .6s; }

.room-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.room-label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  font-size: 12px; color: var(--ivory); text-align: center; white-space: nowrap;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(6, 11, 20, 0.55); border: 1px solid var(--line-soft);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: opacity .3s, background-color .3s, border-color .3s;
}
.room-label small { color: var(--ivory-faint); margin-left: 6px; }
.room-label.is-hover { background: rgba(214, 190, 146, 0.25); border-color: rgba(214, 190, 146, 0.6); }
.room-labels.is-dim .room-label { opacity: 0; }

.room-panel {
  position: absolute; top: 18px; right: 18px; bottom: 18px; z-index: 5;
  width: min(420px, calc(100% - 36px));
  border-radius: var(--r-md); padding: 22px; overflow: auto;
  transform: translateX(calc(100% + 40px)); transition: transform .7s var(--ease);
  background: var(--glass-strong);
}
.room-panel.is-open { transform: none; }
.room-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.room-panel h3 { margin: 0; }
.room-panel .dims { color: var(--champagne); font-size: 14px; margin-top: 6px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); transition: background-color .3s, border-color .3s;
}
.icon-btn:hover { background: rgba(214, 190, 146, 0.1); border-color: rgba(214, 190, 146, 0.5); }
.icon-btn svg { width: 18px; height: 18px; }
.room-photos { display: grid; gap: 12px; margin-top: 20px; }
.room-photos button { border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4 / 3; position: relative; }
.room-photos img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.room-photos button:hover img { transform: scale(1.05); }
.room-photos .none { font-size: 14px; color: var(--ivory-faint); padding: 18px; border: 1px dashed var(--line); border-radius: var(--r-sm); }
.room-nav { display: flex; gap: 8px; margin-top: 18px; }

.scan-empty {
  position: absolute; inset: 0; z-index: 3; display: none; place-items: center; text-align: center; padding: 30px;
}
.scan-empty.is-on { display: grid; }
.scan-empty .ring {
  width: 120px; height: 120px; margin: 0 auto 26px; border-radius: 50%;
  border: 1px solid rgba(214, 190, 146, 0.35); position: relative;
  animation: spin 14s linear infinite;
}
.scan-empty .ring::before, .scan-empty .ring::after {
  content: ''; position: absolute; inset: 14px; border-radius: 50%; border: 1px dashed rgba(214, 190, 146, 0.3);
}
.scan-empty .ring::after { inset: 34px; border-style: solid; border-color: rgba(214, 190, 146, 0.18); }
.scan-empty p { max-width: 30em; margin: 14px auto 0; color: var(--ivory-dim); }

/* specs */
.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border-radius: var(--r-lg); overflow: hidden; }
.spec { background: rgba(9, 16, 29, 0.78); padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 14px; min-height: 140px; transition: background-color .4s; }
.spec:hover { background: rgba(18, 30, 52, 0.85); }
.spec svg { width: 24px; height: 24px; color: var(--champagne); }
.spec small { display: block; font-size: 13px; color: var(--ivory-faint); }
.spec b { font-weight: 600; font-size: 18px; }
.spec .yes { color: #9ad8b0; }
.spec .no { color: var(--ivory-faint); }

.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 90px); }
.about p.body { font-size: 19px; line-height: 1.75; color: var(--ivory-dim); max-width: 36em; margin: 22px 0 0; }
.amenities { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.amenities li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft); color: var(--ivory-dim); }
.amenities li::before { content: ''; width: 6px; height: 6px; transform: rotate(45deg); background: var(--champagne); flex: none; }

/* 3D gallery ring */
.ring-stage {
  position: relative; height: clamp(380px, 56vw, 620px); perspective: 1800px; perspective-origin: 50% 40%;
  overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.ring-stage:active { cursor: grabbing; }
.ring {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  transform-style: preserve-3d;
}
.ring-item {
  position: absolute; left: 0; top: 0;
  width: var(--rw, 420px); height: calc(var(--rw, 420px) * 0.68);
  margin-left: calc(var(--rw, 420px) / -2); margin-top: calc(var(--rw, 420px) * -0.34);
  border-radius: var(--r-md); overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--line-soft);
}
.ring-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ring-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 18px 14px; font-size: 14px;
  background: linear-gradient(180deg, transparent, rgba(5, 9, 17, 0.85));
}
.ring-controls { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(4, 7, 13, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 84vh; }
.lightbox img { max-width: 92vw; max-height: 78vh; border-radius: var(--r-md); object-fit: contain; }
.lightbox figcaption { text-align: center; margin-top: 14px; color: var(--ivory-dim); font-size: 15px; }
.lightbox .icon-btn { position: absolute; background: rgba(6, 11, 20, 0.6); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; }
.lb-next { right: 22px; top: 50%; }

/* location + enquire */
.loc-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(24px, 4vw, 60px); align-items: stretch; }
.loc-grid .map-frame { margin-top: 0; height: 100%; min-height: 360px; }
.enquire {
  border-radius: var(--r-lg); padding: clamp(34px, 5vw, 70px);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(214, 190, 146, 0.14), transparent 70%),
    var(--glass);
}
.enquire-actions { display: grid; gap: 12px; }
.enquire-actions .btn { justify-content: flex-start; padding: 18px 24px; font-size: 16px; }

.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; perspective: 1400px; }
.more-grid .card { min-height: 380px; }

.not-found { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 120px var(--gutter); }

.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ivory-dim); margin-bottom: 20px; }
.back-link:hover { color: var(--ivory); }
.back-link svg { width: 18px; height: 18px; }

/* reveal (one orchestrated entrance per section) */
.reveal { opacity: 0; transform: translateY(40px); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1080px) {
  .card-slot, .card-slot.is-wide { grid-column: span 6; }
  .card-slot.is-featured { grid-column: span 12; grid-row: auto; }
  .card-slot.is-featured .card { min-height: 540px; }
  .specs { grid-template-columns: repeat(3, 1fr); }
  .more-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .nav-links .nav-link { display: none; }
  .brand-sub { display: none; }
  .heritage, .office, .about, .loc-grid, .enquire { grid-template-columns: 1fr; }
  .card-slot, .card-slot.is-wide, .card-slot.is-featured { grid-column: 1 / -1; }
  .card, .card-slot.is-featured .card { min-height: 460px; }
  .hero-meta { display: none; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .spec { padding: 18px; min-height: 120px; }
  .model-shell { height: 78vh; min-height: 480px; }
  .model-rooms { display: none; }
  .model-tabs { left: 10px; top: 10px; }
  .model-tools { right: 10px; top: auto; bottom: 10px; }
  .model-hint { bottom: 64px; }
  .room-panel { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 62%; transform: translateY(calc(100% + 30px)); }
  .more-grid { grid-template-columns: 1fr; }
  .floors-copy { top: 14%; transform: none; max-width: calc(100% - 2 * var(--gutter)); }
  .floor-tag::before { width: 28px; }
  .floor-tag { font-size: 12px; }
  .floor-tag b { font-size: 15px; }
  .lb-prev, .lb-next { top: auto; bottom: 22px; }
}
@media (max-width: 480px) {
  .filters { gap: 8px; }
  .filter-group { overflow-x: auto; max-width: 100%; }
  .chip { padding: 8px 12px; white-space: nowrap; }
  .heritage-facts { grid-template-columns: 1fr; }
  .p-quick { gap: 14px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .float { animation: none; }
}

/* hide hero copy until the opening scene finishes */
body.is-locked .hero-copy, body.is-locked .hero-meta, body.is-locked .scroll-hint { opacity: 0; }
.room-label small { display: none; }
.room-label.is-hover small { display: inline; }
.spec:last-child { grid-column: auto / -1; }

/* small-screen fixes */
.section-head > * { min-width: 0; max-width: 100%; }
.filters { max-width: 100%; }
@media (max-width: 820px) {
  .filter-group { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .filter-group::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; }
  .hero-stage::before {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
    background: linear-gradient(180deg, rgba(5, 9, 17, 0), rgba(5, 9, 17, 0.82) 45%, rgba(5, 9, 17, 0.92));
    pointer-events: none; opacity: var(--ca, 1);
  }
  .hero-copy { position: relative; }
}
@media (max-width: 480px) {
  .hide-sm { display: none; }
  .brand-name { font-size: 18px; }
  .brand-mark { width: 40px; height: 40px; }
  .nav .btn-sm { padding: 10px 16px; }
}
/* keep the phone headline backdrop off the opening scene */
body.is-locked .hero-stage::before { opacity: 0; }

/* a single listing spans the full gallery width */
.grid > .card-slot:only-child { grid-column: 1 / -1; }
.grid > .card-slot:only-child .card { min-height: min(72vh, 640px); }
