/* ==========================================================================
   Real Estate Agency — design tokens
   60 / 30 / 10 : onyx ground / graphite + ivory type / champagne accent
   8pt spacing grid · Marcellus (display, low-contrast serif) + DM Sans (UI / body)
   Contrast on --c-onyx: ivory 17.4:1 · stone 8.6:1 · champagne 8.9:1 (AAA)
   ========================================================================== */
:root, .sw-root {
  --c-onyx: #0B0C0E;
  --c-graphite: #16181C;
  --c-slate: #22252B;
  --c-line: rgba(244, 239, 230, 0.14);
  --c-ivory: #F4EFE6;
  --c-stone: #BDB6AB;
  --c-champagne: #CDAE74;
  --c-error: #E8A09A;

  --f-display: "Marcellus", "Optima", "Candara", Georgia, serif;
  --f-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* type scale — Perfect Fourth (1.333) from an 18px body */
  --t-label: 13px;
  --t-ui: 14px;
  --t-body: 18px;
  --t-h4: 24px;
  --t-h3: clamp(24px, 2vw, 30px);
  --t-h2: clamp(36px, 4.2vw, 68px);
  --t-h1: clamp(40px, 4.6vw, 80px);
  --track-label: .18em;

  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 32px; --s-5: 40px;
  --s-6: 48px; --s-8: 64px; --s-10: 80px; --s-12: 96px; --s-16: 128px;
  --gutter: clamp(16px, 5vw, 80px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --legible-shadow: 0 1px 2px rgba(0,0,0,.45), 0 2px 24px rgba(0,0,0,.4);

  /* scrub-engine theme hooks */
  --sw-bg: var(--c-onyx);
  --sw-ink: var(--c-ivory);
  --sw-ink-soft: var(--c-stone);
  --sw-accent: var(--c-champagne);
  --sw-font-display: var(--f-display);
  --sw-font-body: var(--f-body);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--c-onyx); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--c-onyx); color: var(--c-ivory);
  font-family: var(--f-body); font-size: var(--t-body); font-weight: 400; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--c-champagne); outline-offset: 3px; }
body.is-loading { overflow: hidden; }

.skip {
  position: fixed; left: var(--s-2); top: -64px; z-index: 300;
  background: var(--c-champagne); color: var(--c-onyx); padding: 12px 16px;
  font-weight: 600; font-size: var(--t-ui); text-decoration: none; transition: top .2s;
}
.skip:focus { top: var(--s-2); }

/* ---------- logo (text wordmark) ---------- */
.logo { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; text-decoration: none; color: var(--c-ivory); line-height: 1; }
.logo__name { font-family: var(--f-display); font-size: 22px; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.logo__sub { font-family: var(--f-body); font-size: 12px; font-weight: 600; letter-spacing: .42em; text-transform: uppercase; color: var(--c-champagne); white-space: nowrap; }
.logo--stacked { align-items: center; gap: var(--s-2); }
/* centred type: cancel the trailing letter-spacing so each line sits optically centred */
.logo--stacked .logo__name { font-size: clamp(32px, 4vw, 44px); margin-right: -.2em; }
.logo--stacked .logo__sub { font-size: 14px; margin-right: -.42em; }
.loader__inner { width: min(440px, 86vw); }

/* ---------- buttons: raised 3D (shared by .btn and the film's .sw-btn) ---------- */
.btn, .sw-btn {
  --btn-lift: 2px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1);
  min-height: 44px; padding: 0 28px; border-radius: 12px;
  font-family: var(--f-body); font-size: var(--t-ui); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transform: translateY(0);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn:focus-visible, .sw-btn:focus-visible { outline: 2px solid var(--c-champagne); outline-offset: 4px; }

/* primary: gold stroke only — dark glass face, ivory label, raised on a dark bronze base */
.btn--gold, .sw-btn--primary {
  color: var(--c-ivory);
  background: linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.02) 100%), rgba(11,12,14,.6);
  border: 1px solid rgba(205,174,116,.85);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 var(--btn-lift) 0 rgba(0,0,0,.55),
    0 calc(var(--btn-lift) + 8px) 20px rgba(0,0,0,.45);
}
.btn--gold:hover, .sw-btn--primary:hover {
  color: var(--c-ivory);
  background: linear-gradient(180deg, rgba(205,174,116,.2) 0%, rgba(205,174,116,.06) 100%), rgba(11,12,14,.6);
  border-color: #E3C88F;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 calc(var(--btn-lift) + 1px) 0 rgba(0,0,0,.55),
    0 calc(var(--btn-lift) + 12px) 26px rgba(0,0,0,.5);
}
.btn--gold:active, .sw-btn--primary:active {
  transform: translateY(calc(var(--btn-lift) - 1px));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 1px 0 rgba(0,0,0,.55),
    0 4px 10px rgba(0,0,0,.4);
}
.btn--sm { min-height: 44px; padding: 0 var(--s-3); }
.btn--block { width: 100%; }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center;
  background: var(--c-onyx); transition: opacity .9s var(--ease), visibility .9s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__inner { width: min(360px, 80vw); display: flex; flex-direction: column; align-items: center; gap: var(--s-5); }
.loader__bar { width: 100%; height: 1px; background: var(--c-line); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 100%; background: var(--c-champagne); transform-origin: 0 50%; transform: scaleX(0); transition: transform .4s var(--ease); }
.loader__label { width: 100%; margin: 0; display: flex; justify-content: space-between; font-size: var(--t-label); font-weight: 500; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--c-stone); }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--gutter);
  padding-top: calc(var(--s-3) + env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(11,12,14,.8) 0%, rgba(11,12,14,0) 100%);
  transition: background .4s var(--ease), padding .4s var(--ease);
}
.site-header.is-solid { background: rgba(11,12,14,.94); backdrop-filter: blur(12px); padding-top: var(--s-2); padding-bottom: var(--s-2); border-bottom: 1px solid var(--c-line); }
.site-nav { margin-left: auto; display: flex; gap: var(--s-4); }
.site-nav a {
  position: relative; font-size: var(--t-ui); font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--c-ivory); padding: 12px 0; text-shadow: var(--legible-shadow); transition: color .3s;
}
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--c-champagne); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.site-nav a:hover { color: var(--c-champagne); }
.site-nav a:hover::after { transform: scaleX(1); }
.menu-toggle { display: none; width: 48px; height: 48px; margin-left: auto; background: none; border: 0; cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--c-ivory); transition: transform .3s var(--ease); }
.menu-toggle span:first-child { top: 20px; } .menu-toggle span:last-child { top: 28px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 190; background: var(--c-onyx);
  display: flex; flex-direction: column; justify-content: center; gap: var(--s-3); padding: var(--s-12) var(--gutter);
}
.mobile-menu a:not(.btn) { font-family: var(--f-display); font-size: 36px; text-decoration: none; line-height: 1.2; }
.mobile-menu .btn { margin-top: var(--s-3); align-self: flex-start; }

/* ==========================================================================
   Scroll film — overrides for scrub-engine (engine CSS lives in @layer sw)
   ========================================================================== */
.sw-root { color: var(--c-ivory); }
.sw-sky { background: var(--c-onyx); }
.sw-sky__grad, .sw-sky__glow, .sw-particles, .sw-hint { display: none; }
.sw-topbar { display: none; }
.sw-scrollbar { top: auto; bottom: 0; height: 2px; z-index: 60; background: rgba(244,239,230,.08); }
.sw-scrollbar span { background: var(--c-champagne); }
.sw-scene__video, .sw-scene__still { object-position: center center; }

/* cinematic grading: soft vignette + left/bottom scrim so type always reads over video */
.sw-copylayer::before {
  width: 100%;
  background:
    radial-gradient(120% 90% at 70% 45%, transparent 45%, rgba(11,12,14,.5) 100%),
    linear-gradient(90deg, rgba(11,12,14,.86) 0%, rgba(11,12,14,.62) 32%, rgba(11,12,14,0) 62%),
    linear-gradient(0deg, rgba(11,12,14,.65) 0%, rgba(11,12,14,0) 32%);
}
/* anchored to the bottom so taller blocks (hero + CTA) grow upward instead of off-screen —
   the engine writes an inline translateY on .sw-copy, so centring via transform is not possible */
.sw-copy { left: var(--gutter); width: min(48vw, 640px); top: auto; bottom: clamp(96px, 15vh, 160px); }
.sw-copy__num { font-family: var(--f-body); font-size: var(--t-label); font-weight: 500; letter-spacing: var(--track-label); color: var(--c-stone); }
.sw-copy__eyebrow {
  margin-top: var(--s-3); font-family: var(--f-body); font-weight: 600; font-size: var(--t-label); letter-spacing: var(--track-label);
  color: var(--c-champagne); display: flex; align-items: center; gap: var(--s-2); text-shadow: var(--legible-shadow);
}
.sw-copy__eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; flex: none; }
.sw-copy__title {
  font-family: var(--f-display); font-weight: 400; color: var(--c-ivory);
  font-size: var(--t-h2); line-height: 1.1; letter-spacing: 0;
  margin-top: var(--s-2); text-shadow: var(--legible-shadow); text-wrap: balance;
}
.sw-copy:first-child .sw-copy__title { font-size: var(--t-h1); line-height: 1.06; }
.sw-copy__body {
  margin-top: var(--s-3); font-size: var(--t-body); font-weight: 400; line-height: 1.6;
  color: var(--c-ivory); max-width: 42ch; text-shadow: var(--legible-shadow);
}
.sw-copy__tags { gap: var(--s-1); margin-top: var(--s-3); }
.sw-copy__tags li {
  font-size: var(--t-label); font-weight: 500; letter-spacing: .08em; text-transform: none;
  color: var(--c-ivory); background: rgba(11,12,14,.55); backdrop-filter: blur(8px);
  border: 1px solid rgba(244,239,230,.28); border-radius: 0; padding: 8px 14px;
}
.sw-copy__cta { gap: var(--s-2); margin-top: var(--s-4); }
.sw-btn--ghost {
  color: var(--c-ivory);
  background: linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 100%), rgba(11,12,14,.5);
  border-color: rgba(244,239,230,.32);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 var(--btn-lift) 0 rgba(0,0,0,.6),
    0 calc(var(--btn-lift) + 8px) 20px rgba(0,0,0,.4);
}
.sw-btn--ghost:hover {
  color: var(--c-champagne); border-color: rgba(205,174,116,.7);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.32),
    0 calc(var(--btn-lift) + 1px) 0 rgba(0,0,0,.6),
    0 calc(var(--btn-lift) + 12px) 26px rgba(0,0,0,.45);
}
.sw-btn--ghost:active {
  transform: translateY(calc(var(--btn-lift) - 1px));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 0 rgba(0,0,0,.6), 0 4px 10px rgba(0,0,0,.35);
}

/* right rail — thin architectural level line */
.sw-route { right: var(--gutter); gap: var(--s-4); padding: var(--s-2) 0; }
.sw-route::before { width: 1px; background: var(--c-ivory); opacity: .25; top: 0; bottom: 0; }
.sw-route__dot { width: 24px; height: 24px; }
.sw-route__dot i { width: 5px; height: 5px; background: rgba(244,239,230,.55); }
.sw-route__dot:hover i { background: var(--c-champagne); transform: scale(1.4); }
.sw-route__dot.is-active i { background: var(--c-champagne); transform: scale(1.8); box-shadow: 0 0 0 5px rgba(205,174,116,.22); }
.sw-route__label {
  right: 32px; font-family: var(--f-body); font-size: var(--t-label); font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-ivory); background: transparent; backdrop-filter: none; border: 0; padding: 4px 0; border-radius: 0;
  text-shadow: var(--legible-shadow);
}

/* HUD — level readout */
.hud {
  position: fixed; right: var(--gutter); bottom: calc(var(--s-5) + env(safe-area-inset-bottom)); z-index: 45;
  display: grid; grid-template-columns: auto 48px; grid-template-rows: auto auto; column-gap: var(--s-2);
  align-items: end; text-align: right; transition: opacity .5s var(--ease);
}
.hud.is-hidden { opacity: 0; pointer-events: none; }
.hud__label { grid-column: 1; font-size: var(--t-label); font-weight: 500; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--c-stone); text-shadow: var(--legible-shadow); }
.hud__value { grid-column: 1; font-family: var(--f-display); font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; font-variant-numeric: tabular-nums; text-shadow: var(--legible-shadow); }
.hud__btn {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(11,12,14,.3); color: var(--c-champagne); border: 1px solid rgba(205,174,116,.7);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.hud__btn:hover { background: var(--c-champagne); color: var(--c-onyx); }

/* ==========================================================================
   After-film content
   ========================================================================== */
.after { position: relative; z-index: 70; background: var(--c-onyx); box-shadow: 0 -64px 96px 16px var(--c-onyx); }
.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }
.block { padding: var(--s-16) 0; border-top: 1px solid var(--c-line); }
.block:first-child { border-top: 0; }
.block__head { max-width: 760px; margin-bottom: var(--s-8); }
.eyebrow {
  display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3);
  font-size: var(--t-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--c-champagne);
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.display { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: var(--t-h2); line-height: 1.12; text-wrap: balance; }
.lede { margin: var(--s-3) 0 0; font-size: var(--t-body); line-height: 1.6; color: var(--c-stone); max-width: 56ch; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.card { background: var(--c-graphite); border: 1px solid var(--c-line); transition: border-color .4s var(--ease); }
.card:hover { border-color: rgba(205,174,116,.5); }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-slate); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: var(--s-3); }
.card__meta { margin: 0; font-size: var(--t-label); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--c-champagne); }
.card__title { margin: var(--s-1) 0 0; font-family: var(--f-display); font-weight: 400; font-size: var(--t-h3); line-height: 1.25; }
.card__facts { margin: var(--s-1) 0 0; font-size: 16px; color: var(--c-stone); }
.card__price { margin: var(--s-2) 0 0; padding-top: var(--s-2); border-top: 1px solid var(--c-line); font-size: var(--t-ui); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-10); align-items: start; }
.pillar { padding: var(--s-4) 0; border-top: 1px solid var(--c-line); }
.pillar:last-child { border-bottom: 1px solid var(--c-line); }
.pillar h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: var(--t-h3); line-height: 1.25; }
.pillar p { margin: var(--s-1) 0 0; color: var(--c-stone); font-size: var(--t-body); max-width: 52ch; }

.contact-list { margin: var(--s-5) 0 0; display: grid; gap: var(--s-3); }
.contact-list div { display: grid; gap: 4px; }
.contact-list dt { font-size: var(--t-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--c-stone); }
.contact-list dd { margin: 0; font-family: var(--f-display); font-size: var(--t-h4); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--c-champagne); }

.form { display: grid; gap: var(--s-3); background: var(--c-graphite); border: 1px solid var(--c-line); padding: var(--s-5); }
.field { display: grid; gap: var(--s-1); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.field label { font-size: 15px; font-weight: 500; color: var(--c-ivory); }
.field .opt { color: var(--c-stone); font-weight: 400; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 0;
  background: var(--c-onyx); color: var(--c-ivory); border: 1px solid rgba(244,239,230,.28);
  font: 400 16px/1.5 var(--f-body); color-scheme: dark; transition: border-color .3s var(--ease);
}
.field input:hover, .field textarea:hover { border-color: rgba(244,239,230,.48); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--c-champagne); box-shadow: 0 0 0 1px var(--c-champagne); }
.field input[aria-invalid="true"] { border-color: var(--c-error); }
.field__error { margin: 0; font-size: var(--t-ui); color: var(--c-error); }
.form__ok { margin: 0; font-size: 16px; color: var(--c-champagne); }

.footer { border-top: 1px solid var(--c-line); padding: var(--s-5) 0 calc(var(--s-5) + env(safe-area-inset-bottom)); }
.footer__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.footer__legal { margin: 0; font-size: var(--t-ui); color: var(--c-stone); }
.footer__top { font-size: var(--t-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; text-decoration: none; padding: 12px 0; }
.footer__top:hover { color: var(--c-champagne); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .site-nav, .site-header > .btn { display: none; }
  .menu-toggle { display: block; }
  .cards { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: var(--s-6); }
}
@media (max-width: 860px) {
  :root { --t-body: 17px; --t-h1: clamp(36px, 10vw, 56px); --t-h2: clamp(32px, 8.6vw, 48px); }
  .logo__name { font-size: 18px; letter-spacing: .16em; }
  .logo__sub { font-size: 12px; letter-spacing: .36em; }
  .sw-copylayer::before { background: linear-gradient(0deg, rgba(11,12,14,.94) 0%, rgba(11,12,14,.72) 45%, rgba(11,12,14,0) 78%); height: 100%; }
  .sw-copy { left: var(--gutter); right: calc(var(--gutter) + 24px); width: auto; top: auto; bottom: calc(144px + env(safe-area-inset-bottom)); }
  .sw-copy__cta .sw-btn { padding: 0 var(--s-3); }
  .sw-route { right: 8px; }
  .hud { left: var(--gutter); right: var(--gutter); bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); grid-template-columns: 1fr 48px; text-align: left; }
  .block { padding: var(--s-12) 0; }
  .cards { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .form { padding: var(--s-3); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
