/* ═══════════ THE MERIDIAN ═══════════ */
:root {
  --ink: #0a0a0e;
  --ink-soft: #101017;
  --ink-panel: #14141c;
  --gold: #cfae7a;
  --gold-soft: rgba(207, 174, 122, 0.35);
  --gold-faint: rgba(207, 174, 122, 0.12);
  --cream: #ece5d8;
  --grey: #8b8894;
  --serif: 'Cormorant Garamond', 'Didot', Georgia, serif;
  --sans: 'Inter', 'Helvetica Neue', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: var(--ink); }

/* ═══ NAV ═══ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.6rem 3rem;
  transition: background .5s, backdrop-filter .5s, padding .5s;
}
.nav.scrolled {
  background: rgba(10, 10, 14, 0.72);
  backdrop-filter: blur(14px);
  padding: 1rem 3rem;
  border-bottom: 1px solid rgba(207,174,122,0.08);
}
.nav-logo {
  font-family: var(--serif); font-weight: 400; letter-spacing: .45em;
  font-size: .95rem; color: var(--cream);
}
.nav-right { display: flex; align-items: center; gap: 2rem; }
.nav-price { font-size: .78rem; letter-spacing: .2em; color: var(--gold); }
.nav-cta {
  font-size: .7rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--cream); text-decoration: none;
  border: 1px solid var(--gold-soft); padding: .7rem 1.5rem;
  transition: background .4s, color .4s;
}
.nav-cta:hover { background: var(--gold); color: var(--ink); }

/* ═══ TOUR RAIL ═══ */
.tour-rail {
  position: fixed; right: 2.6rem; top: 50%; transform: translateY(-50%);
  z-index: 80; display: flex; gap: 1.1rem; align-items: stretch;
  opacity: 0; pointer-events: none; transition: opacity .6s;
}
.tour-rail.active { opacity: 1; }
.rail-line {
  width: 1px; background: rgba(236,229,216,0.14); position: relative;
}
.rail-fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0%;
  background: var(--gold); transition: height .15s linear;
}
.rail-stops { list-style: none; display: flex; flex-direction: column; justify-content: space-between; padding: .2rem 0; }
.rail-stop { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; }
.stop-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(236,229,216,0.25); transition: background .4s, box-shadow .4s;
}
.stop-label {
  font-family: var(--serif); font-style: italic; font-size: .92rem;
  color: rgba(236,229,216,0.35); letter-spacing: .06em;
  transition: color .4s, letter-spacing .4s;
}
.rail-stop.current .stop-dot { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.rail-stop.current .stop-label { color: var(--gold); letter-spacing: .1em; }
.rail-stop.passed .stop-dot { background: var(--gold-soft); }
.rail-stop.passed .stop-label { color: rgba(236,229,216,0.55); }

/* ═══ HERO ═══ */
.hero { position: relative; height: 100vh; overflow: hidden; display: flex; align-items: flex-end; }
.hero-media { position: absolute; inset: 0; }
.hero-img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  animation: heroDrift 18s ease-out forwards;
}
@keyframes heroDrift { to { transform: scale(1.0); } }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,14,0.35) 0%, rgba(10,10,14,0.05) 35%, rgba(10,10,14,0.55) 78%, var(--ink) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 0 3rem 9vh; max-width: 1100px; }
.hero-kicker {
  font-size: .72rem; letter-spacing: .5em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 2rem;
}
.hero-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(3.2rem, 8.5vw, 7.5rem);
  line-height: 1.02; letter-spacing: .01em;
}
.hero-title em { font-style: italic; color: var(--gold); }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span {
  display: block; transform: translateY(110%);
  animation: lineUp 1.4s cubic-bezier(.22,1,.36,1) forwards;
}
.hero-title .line:nth-child(2) span { animation-delay: .18s; }
@keyframes lineUp { to { transform: translateY(0); } }
.hero-sub {
  margin-top: 2.2rem; font-size: 1rem; color: var(--grey);
  letter-spacing: .04em; max-width: 34rem; font-weight: 200;
}
.hero-scroll {
  position: absolute; right: 3rem; bottom: 9vh; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.hero-scroll span {
  font-size: .65rem; letter-spacing: .35em; text-transform: uppercase;
  color: var(--grey); writing-mode: vertical-rl;
}
.scroll-line { width: 1px; height: 70px; background: var(--gold-soft); position: relative; overflow: hidden; }
.scroll-line::after {
  content: ''; position: absolute; top: -40%; left: 0; width: 100%; height: 40%;
  background: var(--gold); animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse { to { top: 110%; } }

/* ═══ FACTS ═══ */
.facts { padding: 7rem 3rem; border-bottom: 1px solid rgba(236,229,216,0.06); }
.facts-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.fact { display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center; }
.fact-num {
  font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 300; color: var(--cream);
}
.fact-label {
  font-size: .68rem; letter-spacing: .4em; text-transform: uppercase; color: var(--gold);
}
.fact-div { width: 1px; height: 56px; background: rgba(236,229,216,0.1); }

/* ═══ TOUR ═══ */
.tour { position: relative; height: 520vh; background: #000; }
.tour-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.tour-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.tour-grain {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.5) 100%);
}
.tour-loader {
  position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, var(--ink-soft), var(--ink) 75%);
  transition: opacity .9s ease;
}
.tour-loader.hidden { opacity: 0; pointer-events: none; }
.tour-loader-inner { display: flex; flex-direction: column; align-items: center; gap: 1.3rem; padding: 0 6vw; }
.tour-loader-kicker { font-size: .62rem; letter-spacing: .4em; text-transform: uppercase; color: var(--gold); }
.tour-loader-bar { width: min(60vw, 280px); height: 2px; background: rgba(236,229,216,.14); border-radius: 2px; overflow: hidden; }
.tour-loader-fill { height: 100%; width: 0%; background: var(--gold); box-shadow: 0 0 10px var(--gold-soft); border-radius: 2px; transition: width .25s ease; }
.tour-loader-label { font-family: var(--serif); font-style: italic; font-size: clamp(1rem, 1.6vw, 1.25rem); color: var(--grey); }

.tour-caption {
  position: absolute; left: 3.5rem; bottom: 3.2rem; z-index: 5;
  display: flex; flex-direction: column; gap: .4rem; max-width: 30rem;
}
.caption-roman {
  font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--gold);
  letter-spacing: .3em;
}
.caption-name {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2rem, 4vw, 3.2rem); color: var(--cream); line-height: 1;
}
.caption-desc { font-size: .85rem; color: var(--grey); letter-spacing: .05em; margin-top: .4rem; }
.tour-caption > * { transition: opacity .5s, transform .5s; }
.tour-caption.switching > * { opacity: 0; transform: translateY(12px); }

/* ═══ INTERLUDE ═══ */
.interlude { padding: 12rem 3rem; display: flex; justify-content: center; }
.interlude-text {
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.5;
  text-align: center; color: var(--cream); max-width: 52rem;
}

/* ═══ SECTIONS ═══ */
.section-head { max-width: 1200px; margin: 0 auto 4.5rem; }
.section-kicker {
  display: block; font-size: .68rem; letter-spacing: .5em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem;
}
.section-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.1;
}

/* ═══ GALLERY ═══ */
.gallery { padding: 8rem 3rem; }
.gallery-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem;
}
.g-item { position: relative; overflow: hidden; }
.g-item.g-wide { grid-column: span 2; }
.g-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  aspect-ratio: 16/9; filter: saturate(.92);
  transition: transform 1.4s cubic-bezier(.22,1,.36,1);
}
.g-item.g-wide img { aspect-ratio: 21/9; }
.g-item:hover img { transform: scale(1.04); }
.g-item figcaption {
  position: absolute; left: 1.6rem; bottom: 1.3rem;
  font-family: var(--serif); font-style: italic; font-size: 1.05rem;
  color: var(--cream); text-shadow: 0 2px 18px rgba(0,0,0,.7);
}

/* ═══ AMENITIES ═══ */
.amenities { padding: 8rem 3rem; background: var(--ink-soft); }
.amenity-list { list-style: none; max-width: 1200px; margin: 0 auto; }
.amenity {
  display: flex; align-items: baseline; gap: 2.5rem;
  padding: 1.9rem 0; border-bottom: 1px solid rgba(236,229,216,0.07);
}
.amenity:first-child { border-top: 1px solid rgba(236,229,216,0.07); }
.a-index { font-size: .72rem; letter-spacing: .2em; color: var(--gold); min-width: 2rem; }
.a-name {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem); color: var(--cream);
}

/* ═══ PRICE ═══ */
.price { padding: 14rem 3rem; text-align: center; position: relative; overflow: hidden; }
.price::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, var(--gold-faint), transparent 70%);
}
.price-inner { position: relative; }
.price-kicker {
  display: block; font-size: .7rem; letter-spacing: .55em; text-transform: uppercase;
  color: var(--grey); margin-bottom: 2rem;
}
.price-figure {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(3.4rem, 10vw, 8rem); color: var(--cream);
  letter-spacing: .02em; line-height: 1;
}
.price-figure.lit { color: var(--gold); text-shadow: 0 0 80px rgba(207,174,122,0.25); transition: color 1.4s, text-shadow 1.4s; }
.price-note { margin-top: 2rem; font-size: .8rem; letter-spacing: .15em; color: var(--grey); }

/* ═══ SHOWING ═══ */
.showing { padding: 8rem 3rem 10rem; background: var(--ink-soft); }
.showing-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 5rem; align-items: start;
}
.agent-card {
  background: var(--ink-panel); border: 1px solid rgba(207,174,122,0.14);
  padding: 3rem 2.5rem; display: flex; flex-direction: column; gap: 1.6rem;
  position: sticky; top: 8rem;
}
.agent-photo {
  width: 84px; height: 84px; border-radius: 50%;
  border: 1px solid var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.6rem; color: var(--gold); letter-spacing: .1em;
  background: radial-gradient(circle at 30% 30%, #1e1e28, #101016);
}
.agent-info { display: flex; flex-direction: column; gap: .45rem; }
.agent-name { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; }
.agent-title { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.agent-firm { font-size: .82rem; color: var(--grey); margin-bottom: .8rem; }
.agent-line { font-size: .88rem; color: var(--cream); text-decoration: none; opacity: .8; transition: opacity .3s, color .3s; }
.agent-line:hover { color: var(--gold); opacity: 1; }

.showing-form { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.6rem; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid rgba(236,229,216,0.18);
  color: var(--cream); font-family: var(--sans); font-weight: 300;
  font-size: 1rem; padding: 1.1rem 0 .7rem; outline: none; resize: none;
  transition: border-color .4s;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.field label {
  position: absolute; left: 0; top: 1.05rem;
  font-size: .95rem; color: var(--grey); pointer-events: none;
  transition: all .35s cubic-bezier(.22,1,.36,1);
}
.field input:focus + label, .field textarea:focus + label,
.field input:not(:placeholder-shown) + label, .field textarea:not(:placeholder-shown) + label {
  top: -.5rem; font-size: .65rem; letter-spacing: .25em; text-transform: uppercase; color: var(--gold);
}
.form-submit {
  align-self: flex-start; margin-top: 1rem;
  background: transparent; border: 1px solid var(--gold);
  color: var(--gold); font-family: var(--sans);
  font-size: .72rem; letter-spacing: .3em; text-transform: uppercase;
  padding: 1.1rem 3rem; cursor: pointer; position: relative; overflow: hidden;
  transition: color .45s;
}
.form-submit::before {
  content: ''; position: absolute; inset: 0; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.22,1,.36,1);
  z-index: 0;
}
.form-submit:hover::before { transform: scaleX(1); }
.form-submit:hover { color: var(--ink); }
.form-submit span { position: relative; z-index: 1; }
.form-done {
  display: none; font-family: var(--serif); font-style: italic;
  font-size: 1.15rem; color: var(--gold);
}
.showing-form.sent .form-done { display: block; }
.showing-form.sent .field, .showing-form.sent .form-submit { display: none; }

/* ═══ FOOTER ═══ */
.footer {
  padding: 4rem 3rem; text-align: center;
  display: flex; flex-direction: column; gap: 1.4rem;
  border-top: 1px solid rgba(236,229,216,0.06);
}
.footer-logo { font-family: var(--serif); letter-spacing: .5em; font-size: .9rem; }
.footer-fine { font-size: .68rem; color: var(--grey); letter-spacing: .08em; }

/* ═══ REVEALS ═══ */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1.1s cubic-bezier(.22,1,.36,1), transform 1.1s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }
.amenity.reveal { transition-delay: calc(var(--d, 0) * 90ms); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .nav { padding: 1.2rem 1.5rem; }
  .nav-price { display: none; }
  .hero-content { padding: 0 1.5rem 12vh; }
  .hero-scroll { right: 1.5rem; }
  .facts-inner { flex-wrap: wrap; gap: 2.5rem; justify-content: center; }
  .fact-div { display: none; }
  .tour-rail { right: 1.1rem; }
  .stop-label { display: none; }
  .tour-caption { left: 1.5rem; }
  .gallery, .amenities, .showing, .facts { padding-left: 1.5rem; padding-right: 1.5rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .g-item.g-wide { grid-column: span 1; }
  .g-item.g-wide img { aspect-ratio: 16/9; }
  .showing-grid { grid-template-columns: 1fr; gap: 3rem; }
  .agent-card { position: static; }
}
