/* =========================================================================
   Thanda Royal Residence — scroll-scrub landing page
   Cinematic dark editorial. Photography dominant, zero shadows.
   ========================================================================= */

@font-face {
  font-family: "FreightNeo";
  src: url("assets/brand/FreightNeo-Light.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "FreightNeo";
  src: url("assets/brand/FreightNeo-Book.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "FreightNeo";
  src: url("assets/brand/FreightNeo-Semi.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --black: #0a0a0a;
  --ink: #050505;
  --paper: #f4f1ea;
  --paper-ink: #1a1714;
  --white: #ffffff;
  --muted: #9aa0a6;
  --muted-cool: #767d88;
  --line: rgba(255, 255, 255, 0.14);
  --gold: #c9a27a;          /* restrained warm accent */
  --forbes-red: #e2342b;    /* thin signature rule only */
  --display: "FreightNeo", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --maxw: 1600px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  margin: 0 0 1.4rem;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.6rem;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__mark {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: 0.04em; color: var(--white);
}
.preloader__bar { width: 180px; height: 1px; background: var(--line); overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0%; background: var(--gold); transition: width 0.3s var(--ease); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem clamp(1.2rem, 4vw, 3rem);
  border-bottom: 1px solid transparent;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease), padding 0.4s var(--ease);
}
.nav::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--forbes-red); opacity: 0.9;
}
.nav.is-solid {
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 1rem; padding-bottom: 1rem;
}
.nav__brand { font-family: var(--display); font-size: 1.15rem; font-weight: 400; letter-spacing: 0.02em; }
.nav__brand span { color: var(--muted); font-weight: 300; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.2rem); }
.nav__links a { font-size: 13px; letter-spacing: 0.06em; color: rgba(255,255,255,0.82); transition: color 0.3s; }
.nav__links a:hover { color: var(--white); }
.nav__cta { border: 1px solid var(--line); padding: 0.55rem 1.1rem; border-radius: 2px; }
.nav__cta:hover { background: var(--white); color: var(--ink); }
.nav__lockup { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.nav__lockup span { color: var(--forbes-red); margin: 0 0.3em; }

/* ---------- Scrub journey ---------- */
.scrub { position: relative; } /* no fixed height: lets ScrollTrigger's pin spacer expand the page */
.scrub__stage { position: relative; height: 100vh; height: 100svh; width: 100%; overflow: hidden; background: var(--ink); }
.scrub__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scrub__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(5,5,5,0.45) 0%, rgba(5,5,5,0) 28%),
    linear-gradient(to top, rgba(5,5,5,0.55) 0%, rgba(5,5,5,0) 40%);
}

.scrub__intro {
  position: absolute; left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  text-align: center; width: min(92vw, 880px); will-change: opacity, transform;
}
/* Readability scrim so the white hero type always clears the bright frame beneath */
.scrub__intro::before {
  content: ""; position: absolute; z-index: -1;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 150%; height: 230%;
  background: radial-gradient(ellipse at center, rgba(5,6,8,0.62) 0%, rgba(5,6,8,0.4) 42%, rgba(5,6,8,0) 72%);
  pointer-events: none;
}
.scrub__intro h1 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2.6rem, 8.5vw, 7rem); line-height: 0.98; letter-spacing: -0.01em;
  margin: 0.2rem 0 1.1rem; text-shadow: 0 2px 36px rgba(0,0,0,0.6);
}
.scrub__intro .eyebrow { text-shadow: 0 1px 18px rgba(0,0,0,0.55); }
.scrub__intro .lede { font-size: clamp(1rem, 1.6vw, 1.25rem); color: rgba(255,255,255,0.92); margin: 0; text-shadow: 0 1px 22px rgba(0,0,0,0.6); }

.scrub__captions { position: absolute; left: clamp(1.2rem, 4vw, 3.2rem); bottom: clamp(3.4rem, 9vh, 6rem); }
.scrub__captions span {
  position: absolute; left: 0; bottom: 0; white-space: nowrap;
  font-family: var(--display); font-weight: 300; font-size: clamp(1.4rem, 3.4vw, 2.6rem);
  letter-spacing: 0.01em; opacity: 0; transform: translateY(14px); text-shadow: 0 1px 24px rgba(0,0,0,0.7);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); will-change: opacity, transform;
}
.scrub__captions span.is-active { opacity: 1; transform: translateY(0); }

.scrub__cue {
  position: absolute; left: 50%; bottom: clamp(1.4rem, 4vh, 2.6rem); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.8);
  transition: opacity 0.5s var(--ease);
}
.scrub__cue i { width: 1px; height: 38px; background: linear-gradient(var(--white), transparent); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.scrub__cue.is-hidden { opacity: 0; }

.scrub__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,0.12); }
.scrub__progress span { display: block; height: 100%; width: 0%; background: var(--gold); }

/* ---------- Feature sections ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  min-height: 92vh;
}
.feature--light { background: var(--paper); color: var(--paper-ink); }
.feature--light .eyebrow { color: #7a5d34; }
.feature__media { position: relative; overflow: hidden; }
.feature__media img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; will-change: transform; }
.feature__copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(2.4rem, 7vw, 7rem);
}
.feature__copy h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.04; letter-spacing: -0.01em; margin: 0 0 1.6rem;
}
.feature__copy p { color: inherit; opacity: 0.86; max-width: 46ch; margin: 0 0 1.2rem; }
.feature--dark .feature__copy p { color: rgba(255,255,255,0.82); }

.spec__list { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.spec__list li { padding: 1rem 0; border-top: 1px solid var(--line); font-size: 1.02rem; opacity: 0.9; }
.spec__list li:last-child { border-bottom: 1px solid var(--line); color: var(--gold); opacity: 1; }

/* ---------- Enquiry ---------- */
.enquire {
  text-align: center; padding: clamp(4rem, 12vw, 9rem) clamp(1.4rem, 5vw, 3rem);
  background: var(--ink);
}
.enquire h2 { font-family: var(--display); font-weight: 300; font-size: clamp(2.2rem, 6vw, 4.4rem); margin: 0 0 1.2rem; }
.enquire__lede { color: var(--muted); max-width: 52ch; margin: 0 auto 2.6rem; }
.enquire__form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; max-width: 640px; margin: 0 auto; text-align: left; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  background: transparent; border: 1px solid rgba(255,255,255,0.34); color: var(--white);
  padding: 0.85rem 0.9rem; font-family: var(--sans); font-size: 1rem; border-radius: 2px; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,162,122,0.35); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--forbes-red); }
.enquire__direct { margin: 1.8rem 0 0; color: var(--muted); font-size: 0.92rem; }
.enquire__direct a { color: var(--gold); border-bottom: 1px solid rgba(201,162,122,0.4); }
.btn {
  grid-column: 1 / -1; justify-self: start;
  background: var(--white); color: var(--ink); border: 0; cursor: pointer;
  padding: 0.95rem 2rem; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 2px;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.btn:hover { transform: translateY(-2px); background: var(--gold); color: var(--ink); }
.enquire__note { grid-column: 1 / -1; color: var(--gold); font-size: 0.92rem; min-height: 1.2em; margin: 0.4rem 0 0; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: clamp(3rem, 7vw, 5rem) 1.4rem; border-top: 1px solid var(--line); }
.footer__lockup { font-family: var(--display); font-size: 1.1rem; letter-spacing: 0.04em; }
.footer__lockup span { color: var(--forbes-red); margin: 0 0.35em; }
.footer__legal { color: var(--muted); font-size: 0.82rem; margin: 1rem auto 0; max-width: 60ch; }

/* ---------- No-JS fallback gallery ---------- */
.fallback-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.fallback-gallery img { width: 100%; height: 60vh; object-fit: cover; }

/* ---------- Reduced motion: static, readable, no scrub ---------- */
body.is-reduced .scrub { height: auto; }
body.is-reduced .scrub__stage { height: 86vh; }
body.is-reduced .scrub__cue, body.is-reduced .scrub__progress { display: none; }

/* ---------- Realm intro + fact strip ---------- */
.realm { background: var(--ink); max-width: var(--maxw); margin: 0 auto; padding: clamp(5rem, 12vw, 10rem) clamp(1.4rem, 6vw, 5rem); }
.realm__title { font-family: var(--display); font-weight: 300; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.06; letter-spacing: -0.01em; margin: 0 0 1.6rem; max-width: 20ch; }
.realm__price { font-family: var(--display); font-weight: 300; font-size: clamp(1.6rem, 3.4vw, 2.6rem); color: var(--gold); margin: 0 0 2.8rem; display: flex; align-items: baseline; gap: 1.1rem; flex-wrap: wrap; }
.realm__price span { font-family: var(--sans); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.realm__copy { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.4rem; max-width: 1100px; }
.realm__copy p { color: rgba(255,255,255,0.82); margin: 0; max-width: 54ch; }
.factstrip { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; margin: clamp(3rem, 7vw, 5rem) 0 0; border-top: 1px solid var(--line); }
.factstrip li { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.8rem 1.5rem 0 0; }
.factstrip strong { font-family: var(--display); font-weight: 300; font-size: clamp(1.8rem, 3.6vw, 2.8rem); color: var(--white); }
.factstrip span { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Interiors gallery ---------- */
.gallery { background: var(--black); padding: 4px 0; }
.gallery__grid { display: grid; gap: 4px; }
.gallery__grid--a { grid-template-columns: 1.4fr 1fr 1fr; }
.gallery__grid--b { grid-template-columns: repeat(4, 1fr); }
.gallery__grid img { width: 100%; height: 64vh; object-fit: cover; display: block; }
.gallery__grid--b img { height: 46vh; }

/* ---------- Document plates (rendered map/diagram pages) ---------- */
.plate { background: var(--paper); color: var(--paper-ink); padding: clamp(4rem, 9vw, 7rem) clamp(1.4rem, 6vw, 5rem); }
.plate--alt { background: #ece7dd; }
.plate__head { max-width: var(--maxw); margin: 0 auto 2.6rem; }
.plate__head .eyebrow { color: #7a5d34; }
.plate__head h2 { font-family: var(--display); font-weight: 300; font-size: clamp(1.8rem, 4vw, 3rem); margin: 0; }
.plate__doc { max-width: 1300px; margin: 0 auto; }
.plate__doc img { width: 100%; height: auto; display: block; background: #fff; }
.plate__doc figcaption { margin-top: 1rem; font-size: 13px; letter-spacing: 0.04em; color: #5f574c; text-align: center; }

/* ---------- Access ---------- */
.access { background: var(--ink); padding: clamp(4rem, 9vw, 7rem) clamp(1.4rem, 6vw, 5rem); }
.access__head { max-width: var(--maxw); margin: 0 auto 2.4rem; text-align: center; }
.access__head h2 { font-family: var(--display); font-weight: 300; font-size: clamp(1.8rem, 4vw, 3rem); margin: 0; }
.access__doc { max-width: 1200px; margin: 0 auto; border: 1px solid var(--line); }
.access__doc img { width: 100%; height: auto; display: block; }
.access__times { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; max-width: 1100px; margin: 2.4rem auto 0; padding: 0; }
.access__times li { display: flex; flex-direction: column; gap: 0.3rem; text-align: center; }
.access__times strong { font-size: 12px; letter-spacing: 0.04em; color: var(--white); font-weight: 500; }
.access__times span { font-family: var(--display); font-size: 1.1rem; color: var(--gold); }
.access__note { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 1.6rem 0 0; }

/* ---------- Quote (LQA) ---------- */
.quote { background: var(--black); text-align: center; padding: clamp(4rem, 10vw, 8rem) clamp(1.4rem, 6vw, 5rem); }
.quote__body { font-family: var(--display); font-weight: 300; font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.4; max-width: 900px; margin: 0 auto; color: var(--white); }

/* ---------- Specification (definition list) ---------- */
.spec { background: var(--ink); max-width: 1100px; margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) clamp(1.4rem, 6vw, 5rem); }
.spec__head { margin: 0 0 2rem; }
.spec__head h2 { font-family: var(--display); font-weight: 300; font-size: clamp(1.8rem, 4vw, 3rem); margin: 0; }
.spec .spec__list { display: block; padding: 0; margin: 0; border: 0; }
.spec .spec__list > div { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.spec .spec__list > div:last-child { border-bottom: 1px solid var(--line); }
.spec dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 0; border: 0; }
.spec dd { margin: 0; color: rgba(255,255,255,0.9); font-size: 1.05rem; }
.spec .spec__list > div:last-child dd { color: var(--gold); }

/* ---------- Responsive for new sections ---------- */
@media (max-width: 860px) {
  .realm__copy { grid-template-columns: 1fr; }
  .factstrip { grid-template-columns: repeat(2, 1fr); }
  .gallery__grid--a, .gallery__grid--b { grid-template-columns: 1fr 1fr; }
  .gallery__grid img, .gallery__grid--b img { height: 40vh; }
  .access__times { grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
  .spec .spec__list > div { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav__links { gap: 1rem; }
  .nav__lockup { display: none; }
  .feature { grid-template-columns: 1fr; }
  .feature--light .feature__copy { order: 2; }
  .feature__media { min-height: 60vh; }
  .enquire__form { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav__brand span { display: none; }
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed; top: 0; left: 50%; transform: translate(-50%, -120%); z-index: 200;
  background: var(--white); color: var(--ink); padding: 0.7rem 1.2rem; border-radius: 0 0 3px 3px;
  font-size: 13px; letter-spacing: 0.04em; transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); outline: none; }

/* ---------- Visible focus for keyboard users ---------- */
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px;
}
.feature--light a:focus-visible, .plate a:focus-visible { outline-color: #7a5d34; }

/* ---------- Footer + no-JS contact ---------- */
.footer__contact { margin: 0.8rem 0 0; font-size: 0.92rem; }
.footer__contact a { color: var(--gold); border-bottom: 1px solid rgba(201,162,122,0.4); }
.footer__legal a { color: inherit; border-bottom: 1px solid rgba(255,255,255,0.2); }
.fallback-contact { text-align: center; color: var(--muted); font-size: 0.95rem; padding: 2rem 1.4rem; max-width: 70ch; margin: 0 auto; }
.fallback-contact a { color: var(--gold); }

/* ---------- Reduced motion backstop ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .scrub__cue i { animation: none; }
}
