/* Hanu Homes v4: hanu.css with the blue replaced by Charcoal stone (option A) */
/* ==========================================================================
   Hanu Homes — immersive editorial landing
   Tokens: lime-plaster light ground, blue-hour night ground, brand ochre.
   ========================================================================== */

:root {
  --plaster: #E4E2DB;      /* lime-plaster light ground */
  --plaster-2: #D6D3CA;    /* deeper plaster for blocks */
  --paper: #F5F4F0;        /* lightest surface, text on dark */
  --night: #21201E;        /* blue-hour ground */
  --night-2: #2D2B29;      /* raised night surface */
  --granite: #262522;      /* text on light */
  --stone-ink: #5E5C56;    /* secondary text on light (4.9:1 on plaster) */
  --mist: #B4B2B1;         /* secondary text on night (7:1 on night) */
  --ochre: #C8861D;        /* Hanu Homes brand ochre: marks and large accents only */
  --ochre-ink: #93600F;    /* ochre for buttons/text/lines on light: white text 5.4:1, 4.1:1 vs plaster */
  --ochre-ink-hover: #74490A;
  --line: #8A877F;         /* form/control borders: 3.4:1 on white */
  --ochre-soft: #E0A64A;   /* ochre on dark, for small marks */
  --teak: #7A4E2E;

  --f-display: "Manrope", "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-text: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  /* Type scale (fluid, ~1.333 ratio at desktop) */
  /* One scale for every section: hero > h2 > h3 > lead > body > small > label */
  --t-hero: clamp(2.8rem, 6vw, 6.4rem);
  --t-h2: clamp(2.2rem, 4.2vw, 4.5rem);
  --t-h3: clamp(1.35rem, 1.9vw, 1.9rem);
  --t-lead: clamp(1.0625rem, 1.2vw, 1.25rem);
  --t-body: 1rem;
  --t-small: 0.875rem;
  --t-label: 0.8125rem;
  --s-lead: clamp(16px, 2.4vh, 24px);     /* heading to its supporting line */

  --gutter: clamp(16px, 4.2vw, 72px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 76px;

  /* Theme roles. Day is the plaster ground; night swaps these below. */
  --bg: var(--plaster);          /* page ground */
  --bg-2: var(--plaster-2);      /* media wells, blocks */
  --surface: var(--paper);       /* raised panels, dialog */
  --ink: var(--granite);         /* text on the ground */
  --ink-2: var(--stone-ink);     /* secondary text on the ground */
  --accent: var(--ochre-ink);    /* small ochre text, lines and focus on the ground */
  --rule: rgba(38, 37, 34, .16);
  --rule-2: rgba(38, 37, 34, .1);
  --teak-ink: var(--teak);
  --field: #fff;
  --danger: #A3361F;
  --strong: #000;

  /* Hero (framed scene) */
  --h-ink: var(--granite);                 /* text on the bright day sky */
  --h-word: rgba(255, 255, 255, .8);
  color-scheme: light;
}

html[data-mode="night"] {
  --night: #151412;
  --night-2: #22201E;
  --bg: #1B1A18;
  --bg-2: #282725;
  --surface: #21201E;
  --ink: #EEEBE4;
  --ink-2: #B9B8B6;
  --accent: var(--ochre-soft);
  --rule: rgba(238, 235, 228, .18);
  --rule-2: rgba(238, 235, 228, .1);
  --teak-ink: #DAA77F;
  --field: #171615;
  --danger: #F2937A;
  --strong: #fff;

  --h-ink: var(--paper);
  --h-word: rgba(245, 226, 196, .2);
  color-scheme: dark;
}

*, *::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; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: var(--t-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 200;
  background: var(--surface); color: var(--ink);
  padding: 10px 16px; transform: translateY(-160%);
  transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.homes :focus-visible, .closing :focus-visible, .footer :focus-visible, .nav[data-theme="clear"] :focus-visible, .nav[data-theme="night"] :focus-visible, .place:not(.is-static) .place-copy :focus-visible { outline-color: var(--ochre-soft); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Display type ------------------------------------------------------------ */
.display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}
.h2 { font-size: var(--t-h2); }
.h3 { font-family: var(--f-display); font-weight: 500; font-size: var(--t-h3); line-height: 1.08; letter-spacing: -0.03em; }
.lead { font-size: var(--t-lead); line-height: 1.5; max-width: 34em; }

/* Masked line reveal */
.ln { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.16em; }
.ln > span { display: block; will-change: transform; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  --bg: var(--ochre-ink); --fg: #fff;
  display: inline-flex; align-items: center; gap: .7em;
  min-height: 52px; padding: 0 1.6em;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--bg); border-radius: 999px;
  font-size: .975rem; font-weight: 500; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out), border-color .35s var(--ease-out);
}
.btn:hover { --bg: var(--ochre-ink-hover); }
.btn--ghost { --bg: transparent; --fg: currentColor; border-color: currentColor; }
.btn--ghost:hover { --bg: var(--paper); --fg: var(--granite); border-color: var(--paper); }
.btn--dark { --bg: var(--ink); --fg: var(--surface); }
.btn--dark:hover { --bg: var(--strong); }

.textlink {
  display: inline-block; text-decoration: none; padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .45s var(--ease-out);
}
.textlink:hover { background-size: 0% 1px; background-position: 100% 100%; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120;
  background: var(--ochre-soft); transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 110;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  color: var(--paper);
  transition: color .5s var(--ease-out), background-color .5s var(--ease-out), transform .6s var(--ease-out);
}
.nav[data-theme="light"] { color: var(--ink); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav[data-theme="night"] { background: rgba(33, 32, 30, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav[data-theme="hero"] { color: var(--h-ink); }
.nav[data-theme="hero"] :focus-visible { outline-color: var(--accent); }
.nav.is-hidden { transform: translateY(-100%); }
/* desktop: the framed hero carries its own navigation */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 34px; height: 31px; color: var(--ochre); flex: none; }
.brand-word { font-family: var(--f-display); font-weight: 600; font-size: .95rem; letter-spacing: .24em; text-transform: uppercase; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav-links a { font-size: .95rem; text-decoration: none; opacity: 1; transition: opacity .3s; }
.nav-links a:hover { opacity: 1; }
.nav .btn { min-height: 44px; padding: 0 1.3em; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 1.5px; background: currentColor; margin: 6px 0; transition: transform .4s var(--ease-out); }
.nav.is-open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav.is-open .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 22px;
    padding: 96px var(--gutter) 40px;
    background: var(--night); color: var(--paper);
    opacity: 0; visibility: hidden; transition: opacity .45s var(--ease-out), visibility .45s;
  }
  .nav-links a { font-family: var(--f-display); font-size: 2.4rem; line-height: 1; opacity: 1; }
  .nav-links .btn { font-family: var(--f-text); font-size: 1rem; margin-top: 12px; }
  .nav.is-open { color: var(--paper); background: transparent; backdrop-filter: none; }
  .nav.is-open .nav-links { opacity: 1; visibility: visible; }
}

/* ==========================================================================
   01 Hero — one full-bleed scene, day or night
   ========================================================================== */
.hero {
  position: relative; isolation: isolate;
  height: 100svh; min-height: 600px;
  color: var(--paper); background: var(--night-2); overflow: hidden;
}

/* day / night layers */
.is-night { opacity: 0; }
html[data-mode="night"] .is-day { opacity: 0; }
html[data-mode="night"] .is-night { opacity: 1; }
html.mode-fade .is-day, html.mode-fade .is-night { transition: opacity .22s ease-out; }
html.mode-fade body, html.mode-fade .nav, html.mode-fade section, html.mode-fade .footer { transition: background-color .22s ease-out, color .22s ease-out; }
/* the switch drives the page swap itself (see setMode) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

.hero-scene { position: absolute; inset: 0; transform-origin: 50% 60%; }
.hero-scene img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 0%; }
/* the word is sized to the photo (cover, anchored top) so it always sits just above the roof */
.hero-word {
  position: absolute; left: 0; right: 0; top: max(6.6vw, 9.9svh);
  display: flex; justify-content: center; gap: .01em;
  font-family: var(--f-display); font-weight: 700;
  font-size: max(17.5vw, 26.2svh); line-height: .74; letter-spacing: -.05em;
  color: var(--h-word); white-space: nowrap; user-select: none;
}
.hero-word span { display: block; will-change: transform; }
html[data-mode="night"] .hero-word span { background: linear-gradient(180deg, rgba(255, 238, 214, .62) 0%, rgba(255, 220, 172, .2) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(52% 50% at 0% 100%, rgba(17, 16, 16, .55), rgba(17, 16, 16, 0)),
    linear-gradient(0deg, rgba(17, 16, 16, .7) 0%, rgba(17, 16, 16, .4) 20%, rgba(17, 16, 16, 0) 42%),
    linear-gradient(180deg, var(--h-topveil, rgba(255, 255, 255, .28)) 0%, rgba(255, 255, 255, 0) 16%);
}
html[data-mode="night"] .hero-scrim { --h-topveil: rgba(13, 12, 11, .45); }

.hero-foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(28px, 6vh, 60px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.hero h1 { font-size: var(--t-hero); font-weight: 500; line-height: .98; letter-spacing: -.035em; text-shadow: 0 2px 30px rgba(13, 12, 11, .35); }

/* white pill with an arrow disc */
.pill-cta {
  display: inline-flex; align-items: center; gap: 16px; flex: none;
  height: 56px; padding: 0 6px 0 24px; border: 0; border-radius: 999px;
  background: #fff; color: var(--granite); font-size: 1rem; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 10px 30px -12px rgba(17, 16, 16, .45);
}
.pill-cta i { width: 44px; height: 44px; border-radius: 50%; background: var(--granite); color: #fff; display: grid; place-items: center; transition: transform .45s var(--ease-out), background-color .3s; }
.pill-cta i svg { width: 18px; height: 18px; }
.pill-cta:hover i { transform: rotate(45deg); background: var(--ochre-ink); }

/* day / night switch */
.theme-switch {
  position: relative; width: 72px; height: 40px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: space-between; padding: 0 11px;
  border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit;
}
.theme-switch svg { position: relative; z-index: 1; width: 16px; height: 16px; transition: color .4s var(--ease-out), opacity .4s; }
.ts-knob { position: absolute; top: 3px; left: 3px; width: 32px; height: 32px; border-radius: 50%; background: var(--ochre-ink); transition: transform .55s var(--ease-out), background-color .4s; }
.theme-switch .ts-sun { color: #fff; }
.theme-switch .ts-moon { opacity: .75; }
.theme-switch[aria-pressed="true"] .ts-knob { transform: translateX(32px); background: var(--paper); }
.theme-switch[aria-pressed="true"] .ts-sun { color: currentColor; opacity: .75; }
.theme-switch[aria-pressed="true"] .ts-moon { color: var(--night); opacity: 1; }

@media (max-width: 900px) {
  .hero-scene img { object-position: 38% 0%; }
  .hero-word { --ws: 25vw; font-size: 25vw; top: calc(var(--nav-h) + 8svh); }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 22px; }
  .hero-scrim { background:
    linear-gradient(0deg, rgba(17, 16, 16, .82) 0%, rgba(17, 16, 16, .6) 26%, rgba(17, 16, 16, 0) 50%),
    linear-gradient(180deg, var(--h-topveil, rgba(255, 255, 255, .28)) 0%, rgba(255, 255, 255, 0) 16%); }
}

/* ==========================================================================
   02 Study — the 3D moment
   ========================================================================== */
.study { position: relative; background: var(--bg); }
.study-stage { position: relative; height: 100svh; min-height: 600px; overflow: hidden; }
.study-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
/* keeps the copy column readable if the model drifts under it */
.study-stage::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 85%, transparent) calc(min(30rem, 33vw) + var(--gutter)), color-mix(in srgb, var(--bg) 0%, transparent) calc(min(30rem, 33vw) + var(--gutter) + 10vw)); }
.study.is-static .study-stage::before { display: none; }
.study-copy {
  position: absolute; z-index: 2;
  left: var(--gutter); top: calc(var(--nav-h) + 4vh); bottom: 12vh;
  width: min(30rem, 33vw);
  display: flex; flex-direction: column;
}
.study-steps { position: relative; margin-top: auto; min-height: 15rem; }
.study-step { position: absolute; inset: auto 0 0 0; }
.study-step h3 { margin-bottom: 10px; }
.study-step p { color: var(--ink-2); max-width: 27em; }
.study-ticks { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font-size: var(--t-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.study-ticks b { display: block; width: 28px; height: 2px; background: color-mix(in srgb, var(--ink) 38%, transparent); transition: background-color .4s; }
.study-ticks b.is-on { background: var(--accent); }
.study-note { position: absolute; z-index: 2; left: var(--gutter); bottom: 4.5vh; font-size: var(--t-label); color: var(--ink-2); max-width: 26em; }

.study-photo { position: absolute; inset: 0; z-index: 4; clip-path: inset(50% 50% 50% 50%); pointer-events: none; }
.study-photo-media { position: absolute; inset: 0; transform: scale(1.18); }
.study-photo-media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 18% 62%; }
/* the building stands on the left; the copy sits in the open sky on the right */
.study-photo::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 75% at 82% 48%, rgba(20, 18, 17, .5), rgba(20, 18, 17, 0) 75%), linear-gradient(270deg, rgba(20, 18, 17, .5) 0%, rgba(20, 18, 17, .26) 32%, rgba(20, 18, 17, 0) 58%); }
.study-photo-copy { position: absolute; z-index: 1; top: 0; bottom: 6vh; right: var(--gutter); width: min(42vw, 680px); display: flex; align-items: center; justify-content: flex-end; color: var(--paper); text-align: right; }
.study-photo-copy .h2 span { display: block; }
.study-photo-copy .h2 { margin-left: auto; text-shadow: 0 2px 28px rgba(13, 12, 11, .35); }

.study.no-webgl .study-canvas { display: none; }
.study-fallback { display: none; }
.study.no-webgl .study-fallback { display: block; position: absolute; right: 0; top: 0; bottom: 0; width: 55%; }
.study.no-webgl .study-fallback img { width: 100%; height: 100%; object-fit: cover; }

/* Static/mobile layout of the study */
.study.is-static .study-stage { height: auto; min-height: 0; overflow: visible; display: flex; flex-direction: column; }
.study.is-static .study-copy { display: contents; }
.study.is-static .study-copy > h2 { order: 1; padding: calc(var(--nav-h) + 40px) var(--gutter) 8px; }
.study.is-static .study-canvas { position: relative; inset: auto; height: 62vh; min-height: 380px; order: 2; }
.study.is-static .study-steps { margin-top: 0; min-height: 0; order: 3; padding: 0 var(--gutter) 64px; display: grid; gap: 34px; }
.study.is-static .study-step { position: relative; inset: auto; opacity: 1 !important; transform: none !important; }
.study.is-static .study-ticks, .study.is-static .study-photo { display: none; }
.study.is-static .study-note { position: relative; inset: auto; order: 4; text-align: left; padding: 0 var(--gutter) 56px; right: auto; bottom: auto; }
.study.is-static.no-webgl .study-fallback { position: relative; width: auto; height: 56vh; order: 2; }

/* ==========================================================================
   03 Homes — horizontal gallery
   ========================================================================== */
.homes { position: relative; background: var(--night); color: var(--paper); overflow: hidden; }
.homes-pin { position: relative; height: 100svh; min-height: 640px; display: flex; flex-direction: column; }
.homes-track {
  flex: 1; display: flex; align-items: center; gap: clamp(64px, 7vw, 140px);
  padding: calc(var(--nav-h) + 2vh) 12vw 6vh var(--gutter);
  width: max-content; will-change: transform; cursor: grab; user-select: none;
}
.homes-track.is-dragging { cursor: grabbing; }
.homes-intro { width: min(30rem, 34vw); flex: none; align-self: center; }
.homes-intro p { margin-top: var(--s-lead); color: var(--mist); max-width: 22em; font-size: var(--t-lead); line-height: 1.5; }
.homes-sub { margin-top: var(--s-lead); color: var(--mist); }
.homes-intro .note { font-size: var(--t-small); margin-top: 18px; }

.proj { position: relative; flex: none; display: grid; gap: 28px; }
.proj-media { position: relative; overflow: hidden; background: var(--night-2); }
.proj-media img, .proj-media video { max-width: none; position: absolute; top: 0; left: -8%; width: 116%; height: 100%; object-fit: cover; will-change: transform; }
.proj-inset { position: absolute; overflow: hidden; z-index: 2; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.proj-inset img { width: 100%; height: 100%; object-fit: cover; }
.proj-status { font-size: var(--t-label); font-weight: 500; letter-spacing: .02em; color: var(--ochre-soft); }
.proj h3 { margin: 6px 0 4px; }
.proj-loc { color: var(--mist); }
.proj-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin-top: 18px; font-size: var(--t-small); }
.proj-facts dt { color: var(--mist); }
.proj-facts dd { font-variant-numeric: tabular-nums; }
.proj-desc { margin-top: 14px; color: #E1E0E0; font-size: .95rem; max-width: 30em; }
.proj-actions { display: flex; align-items: center; gap: 24px; margin-top: 22px; }
.proj-actions .btn { min-height: 44px; padding: 0 1.3em; font-size: .9rem; }

/* Panel compositions — varied proportions */
.proj--a { grid-template-columns: 50vw 21vw; align-items: end; }
.proj--a .proj-media { height: 66vh; }
.proj--b { grid-template-columns: 27vw 20vw; align-items: start; align-self: stretch; padding-top: 2vh; }
.proj--b .proj-media { height: 74vh; }
.proj--b .proj-info { align-self: end; padding-bottom: 2vh; }
.proj--b .proj-inset { width: 15vw; height: 21vh; right: -4vw; top: 9vh; }
.proj--c { grid-template-columns: 36vw; align-self: end; padding-bottom: 2vh; }
.proj--c .proj-media { height: 48vh; order: 2; }
.proj--c .proj-info { order: 1; max-width: 30rem; }
.proj--d { grid-template-columns: 22vw 30vw; align-items: center; }
.proj--d .proj-media { height: 70vh; order: 2; }
.proj--d .proj-info { order: 1; }
.proj--e { grid-template-columns: 42vw 20vw; align-items: end; }
.proj--e .proj-media { height: 58vh; }
.proj--e .proj-inset { width: 13vw; height: 26vh; left: 3vw; bottom: -6vh; }
@media (min-width: 901px) and (max-width: 1280px) {
  .homes-intro { width: 40vw; }
  .proj--a { grid-template-columns: 46vw 31vw; }
  .proj--b { grid-template-columns: 30vw 30vw; }
  .proj--b .proj-inset { right: auto; left: 22vw; width: 17vw; }
  .proj--c { grid-template-columns: 46vw; }
  .proj--d { grid-template-columns: 32vw 32vw; }
  .proj--e { grid-template-columns: 40vw 30vw; }
  .homes-bar .homes-names { display: none; }
}

.homes-bar {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex; align-items: center; gap: 28px; font-size: var(--t-small);
}
.homes-count { font-variant-numeric: tabular-nums; color: var(--mist); min-width: 4.5em; }
.homes-line { position: relative; flex: 1; height: 1px; background: rgba(245, 244, 240, .3); }
.homes-line i { position: absolute; inset: 0; background: var(--ochre-soft); transform-origin: 0 50%; transform: scaleX(0); }
.homes-names { display: flex; gap: 22px; }
.homes-names button { background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--mist); transition: color .3s; }
.homes-names button[aria-current="true"] { color: var(--paper); }
.homes-names button:hover { color: var(--paper); }

/* Mobile: native swipe carousel */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .homes-pin { height: auto; min-height: 0; }
  .homes-track {
    width: auto; cursor: auto; user-select: auto;
    display: flex; align-items: stretch; gap: 16px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    padding: 0 var(--gutter) 72px; scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .homes-track::-webkit-scrollbar { display: none; }
  .homes-head { padding: calc(var(--nav-h) + 48px) var(--gutter) 32px; }
  .proj, .proj--a, .proj--b, .proj--c, .proj--d, .proj--e {
    grid-template-columns: 1fr; width: min(84vw, 520px); align-self: stretch;
    padding: 0; scroll-snap-align: start; gap: 20px; align-items: start;
  }
  .proj .proj-media { height: auto !important; aspect-ratio: 4 / 5; order: 0 !important; }
  .proj .proj-info { order: 1 !important; }
  .proj-media img, .proj-media video { left: 0; width: 100%; }
  .proj-inset { display: none; }
  .homes-bar { position: relative; inset: auto; padding: 0 var(--gutter) 64px; gap: 16px; }
  .homes-names { display: none; }
}
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .homes-head { display: none; }
}
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .homes-track > .homes-intro { display: none; }
}

/* ==========================================================================
   04 Place — frame expansion
   ========================================================================== */
.place { position: relative; background: var(--bg); color: var(--ink); }
.place-stage { position: relative; height: 100svh; min-height: 600px; overflow: hidden; }
.place-names { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); pointer-events: none; }
.place-names span { font-family: var(--f-display); font-size: var(--t-h2); letter-spacing: -0.03em; line-height: 1; }
.place-names span:last-child { text-align: right; }
.place-media { position: absolute; inset: 0; clip-path: inset(22% 36% 22% 36%); will-change: clip-path; }
.place-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.3); }
.place-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 18, 17, .9) 0%, rgba(20, 18, 17, .7) 46%, rgba(20, 18, 17, .18) 100%); opacity: 0; transition: opacity .8s var(--ease-out); }
.place.is-static .place-media::after { display: none; }
.place.is-dim .place-media::after { opacity: 1; }
.place-copy {
  position: absolute; z-index: 2; left: var(--gutter); top: calc(var(--nav-h) + 6vh); bottom: 7vh;
  width: min(40rem, 48vw); color: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between;
}
.place-copy p { margin-top: var(--s-lead); color: #E1E0E0; max-width: 26em; font-size: var(--t-lead); line-height: 1.5; }
.place-list { display: grid; }
.place-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 12px 0; border-top: 1px solid rgba(245, 244, 240, .2);
}
.place-list li:last-child { border-bottom: 1px solid rgba(245, 244, 240, .2); }
.place-list b { font-weight: 400; }
.place-list span { font-family: var(--f-display); font-size: 1.25rem; font-variant-numeric: lining-nums; white-space: nowrap; }
.place-src { font-size: var(--t-label); color: var(--mist); margin-top: 12px; }

.place.is-static { background: var(--night); color: var(--paper); }
.place.is-static .place-stage { height: auto; min-height: 0; overflow: visible; }
.place.is-static .place-names { display: none; }
.place.is-static .place-media { position: relative; clip-path: none; aspect-ratio: 4 / 3; }
.place.is-static .place-media img { transform: none; }
.place.is-static .place-copy { position: relative; inset: auto; width: auto; padding: 40px var(--gutter) 72px; gap: 36px; }
.place.is-static .place-copy > * { opacity: 1 !important; transform: none !important; }

/* ==========================================================================
   05 Living
   ========================================================================== */
.living { background: var(--bg); padding: clamp(96px, 14vh, 180px) var(--gutter) clamp(80px, 12vh, 160px); }
.living-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); align-items: start; }
/* Film shown at its native 16:9, uncropped */
.living-main { grid-column: 1 / -1; grid-row: 1; position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--bg-2); }
.living-main video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.living-copy { grid-column: 1 / span 6; grid-row: 2; padding-top: clamp(48px, 8vh, 96px); }
.living-copy p { margin-top: var(--s-lead); color: var(--ink-2); }
.living-side { grid-column: 8 / span 5; grid-row: 2; align-self: start; margin-top: clamp(48px, 8vh, 96px); position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-2); }
.living-side img { width: 100%; height: 100%; object-fit: cover; }
.living-side + figcaption, .cap { font-size: var(--t-label); color: var(--ink-2); margin-top: 10px; }
.amenities { margin-top: clamp(72px, 12vh, 140px); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); row-gap: 40px; }
.amenities > h3 { grid-column: 1 / span 4; }
.amenities { grid-template-rows: auto 1fr; }
.amenities > p { grid-column: 1 / span 4; align-self: start; color: var(--ink-2); font-size: var(--t-small); margin-top: -30px; max-width: 24em; }
.amen-wrap { grid-column: 5 / span 8; grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: clamp(16px, 2vw, 32px); }
.amen-group h4 { margin: 0 0 14px; font-size: var(--t-label); font-weight: 500; letter-spacing: .02em; color: var(--teak-ink); }
.amen-group li { padding: 10px 0; border-top: 1px solid var(--rule); }

@media (max-width: 900px) {
  .living-main { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
  .living-copy { grid-column: 1 / -1; grid-row: auto; padding-top: 40px; }
  .living-side { grid-column: 4 / -1; grid-row: auto; margin-top: 40px; }
  .amenities { grid-template-columns: 1fr; }
  .amenities > h3, .amenities > p { grid-column: 1; }
  .amenities > p { margin-top: -24px; }
  .amen-wrap { grid-column: 1; grid-row: auto; grid-template-columns: 1fr; row-gap: 32px; }
}

/* ==========================================================================
   06 About — credibility
   ========================================================================== */
.about { background: var(--surface); padding: clamp(96px, 14vh, 180px) var(--gutter); }
.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); }
.about-media { grid-column: 1 / span 5; position: relative; align-self: start; position: sticky; top: calc(var(--nav-h) + 4vh); height: min(78vh, 760px); }
.about-media figure { position: absolute; overflow: hidden; background: var(--bg-2); }
.about-media .m1 { inset: 0 14% 22% 0; }
.about-media .m2 { width: 52%; height: 40%; right: 0; bottom: 0; outline: 10px solid var(--surface); }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-body { grid-column: 7 / span 6; }
.about-body .lead { margin-top: var(--s-lead); color: var(--ink-2); }
.timeline { position: relative; margin-top: clamp(56px, 9vh, 96px); padding-left: 40px; }
.timeline::before, .timeline-fill { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--rule); }
.timeline-fill { background: var(--accent); transform-origin: 50% 0; transform: scaleY(0); }
.timeline li { position: relative; padding-bottom: 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -38px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent); }
.timeline .when { font-family: var(--f-display); font-size: clamp(1.2rem, 1.5vw, 1.45rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.timeline p { margin-top: 6px; color: var(--ink-2); max-width: 32em; }
.spec { margin-top: clamp(64px, 10vh, 110px); padding-top: 34px; border-top: 1px solid var(--rule); }
.spec ul { margin-top: 22px; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 32px; }
.spec li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule-2); }
.spec li span:last-child { color: var(--ink-2); text-align: right; }
.spec .cap { margin-top: 18px; max-width: 40em; }
.services { margin-top: 48px; color: var(--ink-2); }
.services strong { color: var(--ink); font-weight: 500; }

@media (max-width: 900px) {
  .about-media { grid-column: 1 / -1; position: relative; top: auto; height: 70vh; margin-bottom: 56px; }
  .about-body { grid-column: 1 / -1; }
  .spec ul { grid-template-columns: 1fr; }
}

/* ==========================================================================
   07 Closing + contact + footer
   ========================================================================== */
.closing { position: relative; background: var(--night); color: var(--paper); }
.closing-film { position: relative; height: 112svh; min-height: 620px; overflow: hidden; }
.closing-film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.closing-film::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(33, 32, 30, .35) 0%, rgba(33, 32, 30, 0) 30%, rgba(33, 32, 30, .55) 70%, var(--night) 100%); }
.closing-copy { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 12vh; }
.closing-copy .display { font-size: var(--t-hero); max-width: 12em; }
.closing-copy .btn { margin-top: 40px; }
.contact { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); row-gap: 40px; padding: 40px var(--gutter) 80px; }
.contact > div { grid-column: span 4; }
.contact p { max-width: 24em; }
.contact h3 { font-size: var(--t-label); font-weight: 500; letter-spacing: .02em; color: var(--mist); margin: 0 0 12px; }
.contact a { text-decoration: none; }
.contact a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact p, .contact li { line-height: 1.7; }
.footer { border-top: 1px solid rgba(245, 244, 240, .14); padding: 36px var(--gutter) 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; font-size: var(--t-small); color: var(--mist); background: var(--night); }
.footer .brand { color: var(--paper); }
.footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--paper); }
.disclaimer { flex-basis: 100%; font-size: var(--t-label); }

@media (max-width: 900px) {
  .contact > div { grid-column: span 6; }
}
@media (max-width: 560px) {
  .contact > div { grid-column: 1 / -1; }
}

/* ==========================================================================
   Enquiry dialog
   ========================================================================== */
.enquiry {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100svh - 32px);
  padding: 0; border: 0; background: var(--surface); color: var(--ink);
  border-radius: 6px; overflow: auto;
}
.enquiry::backdrop { background: rgba(23, 22, 21, .66); backdrop-filter: blur(4px); }
.enquiry[open] { animation: dlg .5s var(--ease-out); }
@keyframes dlg { from { opacity: 0; transform: translateY(24px); } }
.enquiry form { padding: clamp(24px, 4vw, 44px); display: grid; gap: 18px; }
.enquiry header { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.enquiry header p { margin-top: 8px; color: var(--ink-2); font-size: var(--t-small); }
.dlg-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; padding: 6px 10px; margin: -6px -10px 0 0; cursor: pointer; color: var(--ink-2); }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--t-small); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: inherit; background: var(--field);
  border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; min-height: 48px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-error { font-size: .8125rem; color: var(--danger); min-height: 1em; }
.dlg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 6px; }
.dlg-actions .btn--dark { flex: 1 1 auto; justify-content: center; }
.dlg-status { font-size: var(--t-small); color: var(--ink-2); }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   Initial states (only when JS + motion are available)
   ========================================================================== */
.motion .hero .ln > span { transform: translateY(105%); }
.motion .hero-word span { transform: translateY(70%); opacity: 0; }
.motion .hero-foot .pill-cta { opacity: 0; }
.motion .study-step { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .scroll-cue i::after { animation: none; transform: none; }
}

/* ==========================================================================
   Loader — a stone tower assembles in CSS 3D as the page loads
   ========================================================================== */
.loader { display: none; }
.js .loader {
  --W: clamp(160px, 22vw, 300px);
  --D: calc(var(--W) * .62);
  --T: calc(var(--W) * .05);
  --FH: calc(var(--W) * .2);
  display: block; position: fixed; inset: 0; z-index: 400;
  background: radial-gradient(ellipse 70% 60% at 50% 55%, #33312F 0%, var(--night) 62%);
  color: var(--paper);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.15s cubic-bezier(.77, 0, .18, 1);
  /* failsafe: never trap the page if scripting stalls */
  animation: ld-failsafe .4s 14s forwards;
}
@keyframes ld-failsafe { to { opacity: 0; visibility: hidden; } }
html.is-loading, html.is-loading body { overflow: hidden; }

.ld-scene {
  position: absolute; inset: 0; perspective: 1700px; perspective-origin: 50% 40%;
  transition: transform 1.15s cubic-bezier(.77, 0, .18, 1);
}
.ld-rig {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  transform-style: preserve-3d;
  transform: rotateX(56deg) rotateZ(-42deg) translateZ(calc(var(--FH) * -2.6));
  animation: ld-sway 7s ease-in-out infinite alternate;
}
@keyframes ld-sway {
  from { transform: rotateX(57deg) rotateZ(-52deg) translateZ(calc(var(--FH) * -2.6)); }
  to   { transform: rotateX(52deg) rotateZ(-30deg) translateZ(calc(var(--FH) * -2.6)); }
}
.ld-rig i { display: block; font-style: normal; }

/* soft contact shadow that deepens as the tower grows */
.ld-shadow {
  position: absolute; left: calc(var(--W) * -.75); top: calc(var(--D) * -.8);
  width: calc(var(--W) * 1.5); height: calc(var(--D) * 1.6);
  background: radial-gradient(closest-side, rgba(9, 8, 8, .7), rgba(9, 8, 8, 0));
  filter: blur(6px);
  opacity: calc(.2 + var(--h, 0) * .12);
  transform: translateZ(-1px);
  transition: opacity .9s ease;
}

/* generic box: 6 faces around its centre */
.ld-box {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  transform-style: preserve-3d;
  transform: translate3d(var(--x, 0px), var(--y, 0px), calc(var(--z, 0px) + var(--bh) / 2));
}
.ld-f {
  position: absolute; left: 0; top: 0; backface-visibility: hidden;
  box-shadow: inset 0 0 0 .5px rgba(30, 26, 22, .4);
}
.ld-f--t, .ld-f--b { width: var(--bw); height: var(--bd); margin: calc(var(--bd) / -2) 0 0 calc(var(--bw) / -2); }
.ld-f--t { transform: translateZ(calc(var(--bh) / 2)); background: var(--c-t); }
.ld-f--b { transform: rotateX(180deg) translateZ(calc(var(--bh) / 2)); background: var(--c-b); }
.ld-f--s, .ld-f--n { width: var(--bw); height: var(--bh); margin: calc(var(--bh) / -2) 0 0 calc(var(--bw) / -2); }
.ld-f--s { transform: rotateX(-90deg) translateZ(calc(var(--bd) / 2)); background: var(--c-s); }
.ld-f--n { transform: rotateX(90deg) translateZ(calc(var(--bd) / 2)); background: var(--c-n); }
.ld-f--e, .ld-f--w { width: var(--bh); height: var(--bd); margin: calc(var(--bd) / -2) 0 0 calc(var(--bh) / -2); }
.ld-f--e { transform: rotateY(90deg) translateZ(calc(var(--bw) / 2)); background: var(--c-e); }
.ld-f--w { transform: rotateY(-90deg) translateZ(calc(var(--bw) / 2)); background: var(--c-w); }

/* stone palette: lit top, shaded sides (matches the 3D study) */
.ld-slab, .ld-col, .ld-core {
  --c-t: #F4F1EA; --c-s: #CFC5B4; --c-e: #A99E8B; --c-w: #C0B6A3; --c-n: #9A907F; --c-b: #8A8172;
}
.ld-slab { --bw: var(--W); --bd: var(--D); --bh: var(--T); }
.ld-slab--plinth { --bw: calc(var(--W) * 1.1); --bd: calc(var(--D) * 1.14); --bh: calc(var(--T) * 1.4);
  --c-t: #B9AF9D; --c-s: #988E7D; --c-e: #7E7565; --c-w: #8E8574; }
.ld-slab--roof { --bw: calc(var(--W) * .62); --bd: calc(var(--D) * .8); }
.ld-col { --bw: calc(var(--W) * .028); --bd: calc(var(--W) * .028); --bh: calc(var(--FH) - var(--T)); --z: var(--T);
  --c-s: #8C8375; --c-e: #6F675B; --c-w: #7E766A; --c-n: #665F54; }
.ld-col--nw { --x: calc(var(--W) * -.42); --y: calc(var(--D) * -.36); }
.ld-col--ne { --x: calc(var(--W) * .42); --y: calc(var(--D) * -.36); }
.ld-col--sw { --x: calc(var(--W) * -.42); --y: calc(var(--D) * .36); }
.ld-col--se { --x: calc(var(--W) * .42); --y: calc(var(--D) * .36); }
.ld-core { --bw: calc(var(--W) * .14); --bd: calc(var(--W) * .14); --bh: calc(var(--h, 0) * var(--FH) + 2px); --x: calc(var(--W) * -.06); --z: 0px;
  --c-t: #9C9384; --c-s: #7C7468; --c-e: #635C52; --c-w: #716A5F; --c-n: #5B554C; }
.ld-core, .ld-core .ld-f { transition: all .9s cubic-bezier(.16, 1, .3, 1); }

/* each level drops in from above and settles */
.ld-level {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  transform-style: preserve-3d;
  --lift: calc(var(--FH) * 5);
  transform: translate3d(var(--sx), 0, calc(var(--i) * var(--FH) + var(--lift)));
  opacity: 0;
  transition: transform 1s cubic-bezier(.16, 1, .3, 1), opacity .45s ease;
}
.ld-level.is-set { --lift: 0px; opacity: 1; }

/* teak fins rise when the build completes */
.ld-fins { position: absolute; left: 0; top: 0; transform-style: preserve-3d;
  transform: translate3d(calc(var(--W) * .12), calc(var(--D) / 2 + 1px), var(--T)); }
.ld-fin {
  position: absolute; left: calc(var(--k) * var(--W) * .052); top: 0;
  width: calc(var(--W) * .03); height: calc(var(--FH) - var(--T));
  background: linear-gradient(90deg, #7A4D2B, #5A361C);
  transform-origin: 0 0; transform: rotateX(90deg) scaleY(0);
  transition: transform .7s cubic-bezier(.16, 1, .3, 1) calc(var(--k) * 45ms + var(--i) * 60ms);
}
.loader.is-built .ld-fin { transform: rotateX(90deg) scaleY(1); }

/* interface */
.ld-ui { position: absolute; inset: 0; pointer-events: none; transition: opacity .6s ease; }
.ld-top, .ld-bottom { position: absolute; left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; gap: 24px; }
.ld-top { top: 0; height: var(--nav-h); align-items: center; }
.ld-top .brand-word { font-size: 1.02rem; }
.ld-top p { font-size: var(--t-small); color: var(--mist); margin: 0; }
.ld-bottom { bottom: clamp(24px, 5vh, 52px); align-items: flex-end; }
.ld-count { font-family: var(--f-display); font-weight: 400; font-size: clamp(4.2rem, 11vw, 10rem); line-height: .8; letter-spacing: -.03em; font-variant-numeric: lining-nums tabular-nums; margin: 0; }
.ld-count b { font-weight: 400; }
.ld-count span { font-size: .28em; letter-spacing: 0; margin-left: .15em; vertical-align: top; color: var(--mist); }
.ld-stage { margin: 0; font-size: var(--t-lead); text-align: right; min-height: 1.5em; }
.ld-bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(24px, 5vh, 52px); height: 1px; background: rgba(245, 244, 240, .16); transform: translateY(18px); }
.ld-bar i { display: block; height: 100%; background: var(--ochre-soft); transform-origin: 0 50%; transform: scaleX(0); }

/* exit: the loader lifts like a curtain, the tower rises a little faster */
.loader.is-leaving { clip-path: inset(0 0 100% 0); }
.loader.is-leaving .ld-scene { transform: translateY(-16vh) scale(1.05); }
.loader.is-leaving .ld-ui { opacity: 0; }

@media (max-width: 700px) {
  .js .loader { --W: clamp(130px, 44vw, 200px); }
  .ld-top p { display: none; }
  .ld-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ld-stage { text-align: left; font-size: 1rem; }
  .ld-bar { transform: translateY(14px); }
}
@media (prefers-reduced-motion: reduce) {
  .ld-rig { animation: none; }
  .ld-level { transition: opacity .3s ease; }
  .js .loader { transition: opacity .4s ease; }
  .loader.is-leaving { clip-path: inset(0 0 0 0); opacity: 0; }
  .loader.is-leaving .ld-scene { transform: none; }
}
