/*
 * Jug Bogdanova Lounge
 * REF = read from hauser.rs (TheGem 5.11, custom-85ss5w0k.css and inline page styles), 2026-11-26.
 * IZV = derived (contrast, glass, status, fluid scale). See documents/STYLE_GUIDE.md.
 */

/* ---------- 1. Tokens ---------- */
:root {
  /* Colour: REF */
  --c-dark: #1c1b1f;
  --c-dark-2: #1d1c20;
  --c-accent: #ff5851;
  --c-white: #ffffff;
  --c-surface: #f4f6f7;
  --c-surface-warm: #f5f3f1;
  --c-line: #dfe5e8;
  --c-box-line: #f5f5f5;
  --c-muted: #5f727f;
  --c-muted-2: #99a9b5;          /* decorative only on light backgrounds */
  --c-button-basic: #b6c6c9;
  --c-link-hover: #818181;       /* fails AA on white, not used for text */

  /* Colour: IZV */
  --c-accent-strong: #cc312a;    /* accent text and button fill on light */
  --c-accent-light: #ff7a74;     /* accent on dark and over photos */
  --c-text: var(--c-dark);
  --c-text-on-dark: #ffffff;
  --c-text-on-dark-muted: rgb(255 255 255 / .72);
  --c-line-on-dark: rgb(255 255 255 / .1);
  --c-available: #4fbf8a;
  --c-reserved: #f2b33d;
  --c-sold: #8a8a90;
  --c-focus: var(--c-accent-strong);   /* .on-dark switches to the light accent */

  /* Glass: IZV */
  --glass-bg: rgb(28 27 31 / .55);
  --glass-bg-solid: rgb(28 27 31 / .88);
  --glass-bg-header: rgb(28 27 31 / .66);  /* white nav text stays AA even over a white frame */
  --glass-border: 1px solid rgb(255 255 255 / .14);
  --glass-blur: saturate(140%) blur(14px);
  --glass-shadow: 0 10px 40px rgb(0 0 0 / .25);

  /* Type: families REF */
  --ff-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --ff-body: Ubuntu, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Type scale: IZV, with REF values as end points */
  --fs-display: clamp(2.75rem, 1.6rem + 4.6vw, 5.5rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 1.9vw, 3.125rem);
  --fs-h3: clamp(1.5rem, 1.3rem + .8vw, 1.75rem);
  --fs-h4: clamp(1.1875rem, 1.05rem + .6vw, 1.5rem);
  --fs-eyebrow: .8125rem;
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-input: 1rem;
  --fs-nav: .875rem;
  --fs-btn: 1.1875rem;
  --fs-btn-sm: 1rem;
  --lh-display: .95;
  --lh-heading: 1.1;
  --lh-body: 1.5625;             /* REF 16/25 */
  --ls-display: .01em;
  --ls-eyebrow: .18em;
  --ls-nav: .08em;
  --ls-btn: .12em;
  --ls-btn-outline: .3em;        /* REF 5px */

  /* Spacing and layout */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 80px;
  --section-y: clamp(64px, 8vw, 120px);
  --gutter: clamp(16px, 4vw, 40px);
  --container: 1240px;
  --header-inset: 12px;
  --header-h: 56px;

  /* Corners and borders */
  --r-btn: 3px;                  /* REF */
  --r-sm: 4px;
  --r-card: 6px;
  --r-header: 8px;
  --r-pill: 9999px;
  --bw-btn: 2px;                 /* REF */

  /* Controls */
  --h-btn-sm: 44px;
  --h-btn: 50px;                 /* REF medium */
  --px-btn: 25px;                /* REF medium */
  --px-btn-sm: 17px;             /* REF small */
  --h-input: 52px;
  --t-hover: 200ms;
}

@media (min-width: 961px) {
  :root { --header-h: 64px; }
}

@media (orientation: landscape) and (max-height: 519px) {
  :root { --fs-display: clamp(2rem, 6vh + 1rem, 3rem); }
}

/* ---------- 2. Fonts ---------- */
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/bebas-neue-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: Ubuntu;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/ubuntu-latin-400-normal.woff2") format("woff2");
}

/* ---------- 3. Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* clip, never hidden: hidden would break the sticky stage */
body {
  margin: 0;
  overflow-x: clip;
  background: var(--c-white);
  color: var(--c-text);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  font-synthesis: none;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: 400;
  line-height: var(--lh-heading);
  text-transform: uppercase;
}

h1 { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--ls-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
h4 { font-size: var(--fs-h4); }

ul[class], ol[class] { margin: 0; padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
input, select, textarea { font-size: var(--fs-input); }
button { cursor: pointer; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 0; }

.on-dark {
  --c-focus: var(--c-accent-light);
  color: var(--c-text-on-dark);
}

.hero, .reveal, .residences, .site-footer { background: var(--c-dark); }
.availability { background: var(--c-surface-warm); }

/* ---------- 4. Primitives ---------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: 100;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-btn);
  background: var(--c-white);
  color: var(--c-dark);
  transform: translateY(calc(-100% - var(--sp-7)));
}
.skip-link:focus { transform: none; }

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--h-btn);
  padding: 0 var(--px-btn);
  border: var(--bw-btn) solid transparent;
  border-radius: var(--r-btn);
  background: var(--c-accent-strong);
  color: var(--c-white);
  font-family: var(--ff-display);
  font-size: var(--fs-btn);
  line-height: 1;
  letter-spacing: var(--ls-btn);
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color var(--t-hover), color var(--t-hover), border-color var(--t-hover);
}
.btn:hover { background: var(--c-accent); color: var(--c-dark); }

.btn svg { width: 16px; height: 16px; flex: none; transition: transform var(--t-hover); }
.btn:hover svg { transform: translateX(4px); }

.btn--outline {
  border-color: currentColor;
  background: transparent;
  color: inherit;
  letter-spacing: var(--ls-btn-outline);
}
.btn--outline:hover { border-color: var(--c-white); background: var(--c-white); color: var(--c-dark); }

.btn--ghost { border-color: var(--c-dark); background: transparent; color: var(--c-dark); }
.btn--ghost:hover { background: var(--c-dark); color: var(--c-white); }

.btn--sm { min-height: var(--h-btn-sm); padding: 0 var(--px-btn-sm); font-size: var(--fs-btn-sm); }
.btn--block { display: flex; width: 100%; }

/* Links */
.link {
  color: var(--c-accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.link:hover { text-decoration-thickness: 2px; }
.on-dark .link { color: var(--c-accent-light); }

/* Glass */
.glass {
  border: var(--glass-border);
  background: var(--glass-bg-solid);
  box-shadow: var(--glass-shadow);
  color: var(--c-text-on-dark);
  --c-focus: var(--c-accent-light);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
  }
  .glass.is-on-light, .is-on-light .glass { background: var(--glass-bg-solid); }
}

/* Section heading: eyebrow, title, one-line lead */
.section-head { display: grid; justify-items: start; gap: var(--sp-3); }
.section-head--center { justify-items: center; text-align: center; }
.eyebrow {
  color: var(--c-muted);
  font-family: var(--ff-body);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
}
.on-dark .eyebrow { color: var(--c-accent-light); }
.eyebrow--rule::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin-top: var(--sp-2);
  background: var(--c-accent);
}
.section-head--center .eyebrow--rule::after { margin-inline: auto; }
.section-title { font-size: var(--fs-h2); }
.section-lead { max-width: 60ch; color: var(--c-muted); }
.on-dark .section-lead { color: var(--c-text-on-dark-muted); }

/* ---------- 5. Components, in page order ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Stroke style for the symbols themselves, wherever they are used. */
.sprite symbol {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Wordmark */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 44px;
  color: var(--c-white);
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark__name { font-family: var(--ff-display); font-size: 1.5rem; letter-spacing: .04em; }
.wordmark__sub { margin-top: 2px; font-size: .625rem; letter-spacing: .42em; }
.wordmark--lg { align-items: center; }
.wordmark--lg .wordmark__name { font-size: clamp(2.5rem, 8vw, 3.5rem); }
.wordmark--lg .wordmark__sub { margin-top: var(--sp-2); padding-left: .42em; font-size: .8125rem; }

/* Splash */
.splash {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  background: var(--c-dark);
  color: var(--c-text-on-dark);
}
.splash__track { width: min(240px, 60vw); height: 1px; background: rgb(255 255 255 / .18); }
.splash__fill {
  display: block;
  height: 100%;
  background: var(--c-accent);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}
.splash__percent {
  color: var(--c-text-on-dark-muted);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}

/* Header. The glass sits on a pseudo-element so the menu panel inside can blur the page too. */
.site-header {
  position: fixed;
  top: calc(var(--header-inset) + env(safe-area-inset-top, 0px));
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  right: max(var(--gutter), env(safe-area-inset-right, 0px));
  z-index: 50;
  max-width: var(--container);
  margin-inline: auto;
}
.site-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
  padding: 0 var(--sp-3) 0 var(--sp-4);
}
.site-header__bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: var(--glass-border);
  border-radius: var(--r-header);
  background: var(--glass-bg-solid);
  box-shadow: var(--glass-shadow);
}

.site-nav { display: flex; align-items: center; gap: var(--sp-6); }
.site-nav__list { display: flex; gap: var(--sp-5); }
.site-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--c-white);
  font-size: var(--fs-nav);
  letter-spacing: var(--ls-nav);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--c-accent-light);
  opacity: 0;
  transition: opacity var(--t-hover);
}
.site-nav__link:hover, .site-nav__link[aria-current] { color: var(--c-accent-light); }
.site-nav__link:hover::after, .site-nav__link[aria-current]::after { opacity: 1; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r-btn);
  background: transparent;
  color: var(--c-white);
}
.menu-toggle__close, .menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }

/* Hero: landscape first, portrait in the media queries */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
}
.hero__media {
  position: absolute;
  inset: 0;
  background: var(--c-dark) url("../assets/img/hero-poster.webp") center / cover no-repeat;
}
.hero__video { width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.hero.is-playing .hero__video { opacity: 1; }
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(28 27 31 / .85), rgb(28 27 31 / 0) 62%),
    linear-gradient(to right, rgb(28 27 31 / .85), rgb(28 27 31 / 0) 68%);
  pointer-events: none;
}
.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-5);
  --edge: max(var(--gutter), (100% - var(--container)) / 2);   /* left edge of .container */
  width: min(560px + var(--edge) + var(--gutter), 100%);
  padding: calc(var(--header-h) + 2 * var(--header-inset)) var(--gutter) clamp(24px, 7vh, 80px) var(--edge);
}
.hero__title { text-wrap: balance; }
.hero__lead { max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* #building: a sticky stage; --p (0 to 1, written by main.js) lifts the photo off the 3D model */
.reveal {
  --p: 0;
  height: 290vh;
  height: calc(100svh + 190vh);
}
.reveal__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;              /* the stage itself, never one of its ancestors */
  background: radial-gradient(ellipse at 50% 40%, rgb(255 255 255 / .08), transparent 60%), var(--c-dark);
}
.reveal__window { position: absolute; inset: 0; overflow: hidden; container-type: size; }
/* 16:9 "cover", exactly like object-fit: cover on the photo, so model and photo stay aligned */
.reveal__frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 177.78vh);
  width: max(100cqw, 177.78cqh);
  height: max(100vh, 56.25vw);
  height: max(100cqh, 56.25cqw);
  transform: translate(-50%, -50%);
}
.reveal__viewer, .reveal__photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.reveal__photo { max-width: none; }
.reveal__viewer canvas { cursor: grab; }
.reveal__viewer canvas:active { cursor: grabbing; }
/* the canvas edge can be outside the window, so the focus ring is drawn on the window */
.reveal__window:has(canvas:focus-visible)::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--c-focus);
  pointer-events: none;
}
/* The curtain only moves once there is a model under it (.is-live). */
.reveal.is-live .reveal__photo {
  --L: calc(var(--p) * 124%);
  -webkit-mask-image: linear-gradient(to top, transparent calc(var(--L) - 24%), #000 var(--L));
  mask-image: linear-gradient(to top, transparent calc(var(--L) - 24%), #000 var(--L));
}
.reveal.is-unlocked .reveal__photo { visibility: hidden; }

.reveal__shade, .reveal__title, .reveal__indicator { opacity: calc(1 - var(--p) * 3); }
.reveal__shade {
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(to top, rgb(28 27 31 / .92), rgb(28 27 31 / .7) 40%, rgb(28 27 31 / 0));
  pointer-events: none;
}
.reveal__intro {
  position: absolute;
  inset: 66.67% var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  text-align: center;
  pointer-events: none;
}
.reveal__title { text-wrap: balance; }
.reveal__indicator { display: grid; justify-items: center; height: 36px; }
.reveal__mouse {
  display: none;
  position: relative;
  width: 22px;
  height: 36px;
  border: 2px solid currentColor;
  border-radius: var(--r-pill);
}
.reveal__mouse::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 6px;
  margin-left: -2px;
  border-radius: var(--r-pill);
  background: currentColor;
  animation: reveal-wheel 1.6s ease-in-out infinite;
}
.icon.reveal__arrow {
  width: 32px;
  height: 32px;
  align-self: center;
  rotate: 90deg;
  animation: reveal-drop 1.4s ease-in-out infinite;
}
@media (pointer: fine) {
  .reveal__mouse { display: block; }
  .icon.reveal__arrow { display: none; }
}
@keyframes reveal-wheel {
  0% { transform: none; opacity: 1; }
  70%, 100% { transform: translateY(12px); opacity: 0; }
}
@keyframes reveal-drop {
  0% { transform: translateY(-6px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}

.reveal__controls {
  position: absolute;
  inset: auto var(--gutter) calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  pointer-events: none;
}
/* Both can sit over the beige model, so each carries its own dark backing. */
.reveal__hint, .reveal__cta { background: var(--glass-bg-solid); }
.reveal__hint {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  text-align: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--t-hover), visibility 0s var(--t-hover);
}
@media (pointer: fine) { .reveal__hint-touch { display: none; } }
@media not all and (pointer: fine) { .reveal__hint-fine { display: none; } }
.reveal__cta { visibility: hidden; pointer-events: auto; }
.reveal.is-unlocked .reveal__cta { visibility: visible; }
.reveal.is-unlocked:not(.is-hint-dismissed) .reveal__hint { visibility: visible; opacity: 1; transition-delay: 0s; }

/* Static: no WebGL2, a failed viewer, or no JavaScript. One screen, photo and button. */
.reveal.is-static, html.no-js .reveal { height: auto; }
.reveal.is-static .reveal__stage, html.no-js .reveal__stage { position: relative; }
.reveal.is-static :is(.reveal__shade, .reveal__indicator, .reveal__hint),
html.no-js .reveal :is(.reveal__shade, .reveal__indicator, .reveal__hint) { display: none; }
/* hidden from sight only: the section is still named by it */
.reveal.is-static .reveal__title, html.no-js .reveal__title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.reveal.is-static .reveal__cta, html.no-js .reveal__cta { visibility: visible; }

/* #residences: stacked first (title, switch, photo, card); the wide layout is in the media queries */
.residences { padding-block: max(var(--section-y), 96px) var(--section-y); }
.residences__picker { display: flex; flex-direction: column; align-items: center; }
.residences__head { display: grid; gap: var(--sp-3); width: 100%; padding-inline: var(--gutter); }
.residences__lead { color: var(--c-text-on-dark-muted); }
html.no-js .residences__lead { display: none; }
.residences__picker .noscript-note { max-width: none; }

.face-switch {
  display: inline-flex;
  gap: var(--sp-1);
  margin: var(--sp-5) var(--sp-3);
  padding: var(--sp-1);
  border-radius: var(--r-pill);
}
.face-switch__btn {
  min-height: 44px;
  padding: 0 var(--sp-4);
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--c-white);
  font-size: var(--fs-small);
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color var(--t-hover), color var(--t-hover);
}
.face-switch__btn[aria-pressed="true"] { background: var(--c-white); color: var(--c-dark); }

/* Never wider than 16:9 nor narrower than 4:5, so no residence is cut off. */
.res-stage {
  position: relative;
  width: 100%;
  height: clamp(56.25vw, 64vh, 125vw);
  height: clamp(56.25vw, 64svh, 125vw);
  overflow: hidden;
  perspective: 1400px;
}
.facade, .face, .face__img, .face__spots { position: absolute; inset: 0; width: 100%; height: 100%; }
.face__img { max-width: none; object-fit: cover; }
.face__spots { max-width: none; touch-action: manipulation; }
.face.is-entering { z-index: 1; }

.spot { cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.spot polygon, .spot circle { vector-effect: non-scaling-stroke; }
.spot__shape {
  fill: transparent;
  stroke: rgb(255 255 255 / .45);
  stroke-width: 1px;
  transition: fill var(--t-hover), stroke var(--t-hover);
}
.spot__hit { fill: transparent; pointer-events: all; }
.spot__dot, .spot__ring { pointer-events: none; }
.spot__dot { fill: var(--c-white); }
.spot__ring {
  fill: none;
  stroke: var(--c-white);
  stroke-width: 1.5px;
  transform-box: fill-box;
  transform-origin: center;
  animation: spot-pulse 2.4s ease-out infinite;
}
/* radius 4 px to 14 px */
@keyframes spot-pulse {
  from { transform: scale(1); opacity: .6; }
  to { transform: scale(3.5); opacity: 0; }
}
.spot:hover .spot__shape, .spot:focus-visible .spot__shape {
  fill: rgb(255 255 255 / .06);
  stroke: rgb(255 255 255 / .8);
  stroke-width: 1.5px;
}
.spot.is-selected .spot__shape {
  fill: rgb(255 122 116 / .28);
  stroke: var(--c-accent-light);
  stroke-width: 3px;
}
.spot.is-selected .spot__dot { fill: var(--c-accent-light); }
.spot.is-selected .spot__ring { display: none; }
/* keyboard focus: a white line with the accent showing on both sides of it */
.spot:focus-visible .spot__shape { stroke-width: 6px; stroke: var(--c-accent-light); }
.spot:focus-visible .spot__hit { stroke: var(--c-white); stroke-width: 2px; }

.link-line { display: none; }

/* While the building turns: no hotspots, no line, no pointer. */
.residences__picker.is-busy .res-stage { pointer-events: none; }
.residences__picker.is-busy :is(.face__spots, .link-line) { visibility: hidden; }

.res-card {
  position: relative;
  display: grid;
  gap: var(--sp-3);
  width: min(100% - 2 * var(--sp-3), 480px);
  margin-top: calc(-1 * var(--sp-5));   /* over the empty strip below the lowest residences */
  padding: var(--sp-5);
  border-radius: var(--r-card);
}
/* solid backing: the card sits over the photo, where thinner glass is not reliably readable */
.glass.res-card { background: var(--glass-bg-solid); }
.res-card__head { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-2) var(--sp-3); }
.res-card__status, .res-card__floor {
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
}
.res-card__status { display: flex; align-items: center; gap: var(--sp-2); }
.res-card__status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--c-available);
}
.res-card[data-status="reserved"] .res-card__status::before { background: var(--c-reserved); }
.res-card[data-status="sold"] .res-card__status::before { background: var(--c-sold); }
.res-card__floor { color: var(--c-text-on-dark-muted); text-align: right; }
.res-card__name { grid-column: 1 / -1; }
.res-card__type { margin-top: calc(-1 * var(--sp-2)); color: var(--c-text-on-dark-muted); font-size: var(--fs-small); }
.res-card__facts {
  display: grid;
  grid-template-columns: 1fr 1.2fr;   /* the right column holds "Courtyard View" */
  gap: var(--sp-3);
  margin: 0;
  padding-block: var(--sp-3);
  border-block: 1px solid var(--c-line-on-dark);
}
.res-card__fact { display: grid; grid-template-columns: 20px 1fr; column-gap: var(--sp-2); align-content: start; }
.res-card__fact .icon { grid-row: 1 / span 2; margin-top: 2px; color: var(--c-text-on-dark-muted); }
.res-card__fact dt { color: var(--c-text-on-dark-muted); font-size: .75rem; line-height: 1.4; }
.res-card__fact dd { font-size: .9375rem; line-height: 1.4; }
.res-card__price {
  font-family: var(--ff-display);
  font-size: var(--fs-h4);
  line-height: 1.2;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.res-card__ask { justify-self: center; display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-small); }
/* keeps its space when hidden, so the card does not change height under the pointer */
.res-card .res-card__ask[hidden] { display: inline-flex !important; visibility: hidden; }

/* #availability and #contact: light sections */
.availability, .contact { padding-block: max(var(--section-y), 96px) var(--section-y); }
.noscript-note { max-width: 60ch; margin-top: var(--sp-4); }
.section-head--center + noscript .noscript-note { margin-inline: auto; text-align: center; }

/* Residence cards: one swipeable row on phones, a grid from 600 px (media queries) */
.units {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
}
/* room for the hover shadow and the focus ring: the row clips what leaves it
   ([class] outranks the list reset) */
.units[class] { margin: var(--sp-7) calc(-1 * var(--gutter)) 0; padding: var(--sp-2) var(--gutter) var(--sp-5); }
.unit__facts[class] { margin-block: var(--sp-1) var(--sp-2); }
.units__item { display: flex; flex: 0 0 82vw; min-width: 0; scroll-snap-align: start; }
.unit {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  background: var(--c-white);
  transition: box-shadow var(--t-hover);
}
.unit:hover { box-shadow: 0 12px 32px rgb(28 27 31 / .12); }
.unit__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: calc(var(--r-card) - 1px) calc(var(--r-card) - 1px) 0 0;
}
.unit__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-hover); }
.unit:hover .unit__media img { transform: scale(1.03); }
/* solid backing: white text over a photo */
.unit__status {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border: var(--glass-border);
  border-radius: var(--r-pill);
  background: var(--glass-bg-solid);
  color: var(--c-white);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
}
.unit__status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--c-available);
}
.unit[data-status="reserved"] .unit__status::before { background: var(--c-reserved); }
.unit[data-status="sold"] .unit__status::before { background: var(--c-sold); }
.unit__body { display: flex; flex: 1; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); }
.unit__name { font-size: 1.5rem; }
.unit__type { color: var(--c-muted); font-size: var(--fs-small); }
.unit__facts { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); font-size: var(--fs-small); }
.unit__facts li { display: flex; align-items: center; gap: var(--sp-1); white-space: nowrap; }
.unit__facts .icon { color: var(--c-muted); }
.unit__price {
  margin-top: auto;   /* prices and links line up across a row */
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-line);
  font-family: var(--ff-display);
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.unit__link {
  align-self: flex-start;
  color: var(--c-accent-strong);
  font-size: var(--fs-small);
  text-underline-offset: 3px;
  white-space: nowrap;
}
.unit__link::after { content: ""; position: absolute; inset: -1px; z-index: 1; border-radius: var(--r-card); }
.unit__link:focus-visible { outline: none; }
.unit__link:focus-visible::after { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.unit:hover .unit__link { text-decoration-thickness: 2px; }

/* Contact */
.contact__grid { display: grid; align-content: start; gap: var(--sp-7); }
.contact__address { display: grid; justify-items: start; gap: var(--sp-2); margin-top: var(--sp-6); font-style: normal; }
.contact__address a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.contact__form { display: grid; justify-items: start; gap: var(--sp-4); min-width: 0; }
.contact__form .noscript-note { margin: 0; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); width: 100%; }
.field label { font-size: var(--fs-small); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%;
  min-height: var(--h-input);
  padding: var(--sp-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background-color: var(--c-surface);
}
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: var(--sp-7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%231c1b1f' stroke-width='1.5'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-3) center;
}
.field textarea { resize: vertical; }
.field :is(input:not([type="checkbox"]), select, textarea):focus {
  border-color: var(--c-dark);
  outline: 2px solid transparent;   /* still drawn in forced-colors mode */
  box-shadow: 0 0 0 3px rgb(204 49 42 / .25);
}
.field [aria-invalid="true"]:not([type="checkbox"]) { border-color: var(--c-accent-strong) !important; }
.field--check { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--sp-3); }
.field--check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--c-dark); }
.field--check input[aria-invalid="true"] { outline: 2px solid var(--c-accent-strong); outline-offset: 1px; }
.field--check input:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; }
.field--check label { display: flex; flex: 1; align-items: center; min-width: 0; min-height: 44px; }
.field__error {
  display: flex;
  gap: var(--sp-2);
  color: var(--c-accent-strong);
  font-size: var(--fs-small);
}
.field--check .field__error { flex-basis: 100%; }
.field__error .icon { width: 16px; height: 16px; margin-top: 3px; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { background: var(--c-accent-strong); color: var(--c-white); }
.form-error { color: var(--c-accent-strong); overflow-wrap: anywhere; }
.form-error:empty { margin-top: calc(-1 * var(--sp-4)); }
.form-success { display: grid; align-content: start; justify-items: start; gap: var(--sp-4); min-width: 0; overflow-wrap: anywhere; }
.form-success__title { max-width: 100%; }
.form-success .btn { max-width: 100%; }

/* ---------- Residence page (residence.html) ---------- */
/* Stacked first: title, model, text. Two columns on landscape screens (media queries). */
.unit-page {
  --unit-top: calc(var(--header-h) + 2 * var(--header-inset) + env(safe-area-inset-top, 0px));
  padding-block: calc(var(--unit-top) + var(--sp-4)) var(--section-y);
  background: radial-gradient(ellipse at 65% 320px, rgb(255 255 255 / .07), transparent 560px), var(--c-dark);
}
.unit-page__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "view" "body";
  gap: var(--sp-5) var(--sp-7);
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}
.unit-page__head { grid-area: head; display: grid; justify-items: start; gap: var(--sp-2); }
.unit-page__back { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-small); }
.unit-page__title { font-size: clamp(2.25rem, 1.3rem + 2.8vw, 3.5rem); line-height: 1; text-wrap: balance; }
.unit-page__grid[data-status="reserved"] .res-card__status::before { background: var(--c-reserved); }
.unit-page__grid[data-status="sold"] .res-card__status::before { background: var(--c-sold); }
.unit-page__body { grid-area: body; display: grid; align-content: start; justify-items: start; gap: var(--sp-5); }
.unit-page__text { display: grid; gap: var(--sp-4); max-width: 62ch; color: var(--c-text-on-dark-muted); }
.unit-page__facts { justify-self: stretch; max-width: 520px; padding-block: var(--sp-4); }
.unit-page__cta { justify-self: stretch; max-width: 420px; }

.unit-page__missing, .unit-page__fallback { display: grid; align-content: start; justify-items: start; gap: var(--sp-5); min-height: 45vh; }
.unit-page__missing p, .unit-page__fallback p { max-width: 60ch; }
html.js .unit-page__fallback { display: none; }
.unit-plans[class] { display: grid; gap: var(--sp-6); width: 100%; max-width: 800px; margin: 0; padding: 0; list-style: none; }
.unit-plans__title { margin-bottom: var(--sp-2); font-size: var(--fs-h4); }
.unit-plans img { width: 100%; border-radius: var(--r-card); background: var(--c-white); }

/* The model: a framed stage. It never fills a portrait screen, so the page can still be swiped. */
.unit-view { grid-area: view; display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.unit-view__stage {
  position: relative;
  height: clamp(280px, 60vh, 125vw);
  height: clamp(280px, 60svh, 125vw);
  overflow: hidden;
  border: var(--glass-border);
  border-radius: var(--r-card);
  background: radial-gradient(ellipse at 50% 42%, rgb(255 255 255 / .1), transparent 70%), var(--c-dark-2);
}
.unit-view__canvas, .unit-view__plan { position: absolute; inset: 0; width: 100%; height: 100%; }
.unit-view__canvas canvas { cursor: grab; }
.unit-view__canvas canvas:active { cursor: grabbing; }
/* inside the frame, which clips anything outside it */
.unit-view__canvas canvas:focus-visible { outline-offset: -3px; }
.unit-view__plan { max-width: none; object-fit: contain; background: var(--c-white); }
/* the plan is wider than tall: a stage of its shape leaves no empty bands */
.unit-view.is-plan .unit-view__stage { height: auto; aspect-ratio: 4 / 3; }
.unit-view__loading {
  position: absolute;
  inset: 50% var(--sp-4) auto;
  color: var(--c-text-on-dark-muted);
  font-size: var(--fs-small);
  text-align: center;
  transform: translateY(-50%);
  pointer-events: none;
}
/* top left: reset view; top right: the tour button (phase 11) */
.unit-view__reset {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-btn);
  font-size: var(--fs-small);
  white-space: nowrap;
}
.glass.unit-view__reset { background: var(--glass-bg-solid); }
.unit-view__reset:hover { border-color: var(--c-white); }
.unit-view__reset:disabled { visibility: hidden; }
.unit-view__tour {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-btn);
  font-size: var(--fs-small);
  white-space: nowrap;
  cursor: pointer;
}
.unit-view__tour[hidden] { display: none; }
.glass.unit-view__tour { background: var(--glass-bg-solid); }
.unit-view__tour:hover { border-color: var(--c-white); }
@media (max-width: 420px) {
  .unit-view__reset, .unit-view__tour { padding: 0 var(--sp-3); gap: var(--sp-1); }
}
.unit-view__message { font-size: var(--fs-small); }
.unit-view__notes { display: grid; gap: var(--sp-1); color: var(--c-text-on-dark-muted); font-size: .8125rem; line-height: 1.5; }
.unit-view__note { color: var(--c-text-on-dark); }
@media (pointer: fine) { .unit-view__hint-touch { display: none; } }
@media not all and (pointer: fine) { .unit-view__hint-fine { display: none; } }
.unit-view.is-plan :is(.unit-view__reset, .unit-view__hint, .unit-view__disclaimer, .unit-view__note) { display: none; }

/* Footer */
.site-footer {
  padding-block: var(--sp-8) var(--sp-5);
  padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  color: var(--c-text-on-dark-muted);
}
.site-footer a { color: inherit; text-decoration: none; transition: color var(--t-hover); }
.site-footer a:hover { color: var(--c-white); }
.site-footer .wordmark { color: var(--c-white); }
.site-footer__top { display: grid; gap: var(--sp-6); }
.site-footer__brand { display: grid; justify-items: start; align-content: start; gap: var(--sp-3); max-width: 36ch; }
.site-footer__heading {
  margin-bottom: var(--sp-2);
  color: var(--c-white);
  font-size: var(--fs-btn);
  letter-spacing: .04em;
}
.site-footer__list a, .site-footer__legal a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.site-footer__list a { overflow-wrap: anywhere; }
.site-footer__address { padding-top: var(--sp-2); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-7);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-line-on-dark);
  font-size: .8125rem;
}
.site-footer__legal { display: flex; flex-wrap: wrap; gap: var(--sp-5); }

/* ---------- 6. States ---------- */
html.is-loading { overflow: hidden; }

html.js .splash { display: flex; }
html.js.is-returning .splash { display: none; }
html.js.is-ready .splash {
  visibility: hidden;
  transform: translateY(-100%);
  transition: transform 900ms cubic-bezier(.7, 0, .2, 1), visibility 0s 900ms;
}

html.js .site-header { transform: translateY(calc(-100% - 2 * var(--header-inset))); }
html.js.is-ready .site-header {
  transform: none;
  transition: transform 600ms cubic-bezier(.2, .7, .2, 1) 200ms;
}
html.js.is-ready .site-header.has-hidden { transition: transform 300ms ease; }
html.js.is-ready .site-header.is-hidden {
  /* the extra distance takes the shadow with it */
  transform: translateY(calc(-100% - var(--header-inset) - env(safe-area-inset-top, 0px) - 50px));
}
.site-header.is-on-light .site-header__bar::before { background: var(--glass-bg-solid); }

/* The only entrance animation on the page */
html.js .hero__content > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease-out, transform 700ms cubic-bezier(.2, .7, .2, 1);
}
html.js .hero__overlay { opacity: 0; transition: opacity 1200ms ease-out; }
html.js .hero.is-revealed .hero__content > * { opacity: 1; transform: none; }
html.js .hero.is-revealed .hero__lead { transition-delay: 90ms; }
html.js .hero.is-revealed .hero__actions { transition-delay: 180ms; }
html.js .hero.is-revealed .hero__overlay { opacity: 1; }
html.js .hero.is-instant .hero__content > *, html.js .hero.is-instant .hero__overlay { transition: none; }

/* ---------- 7. Media queries ---------- */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header__bar::before {
    background: var(--glass-bg-header);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
  }
}

@media (min-width: 600px) {
  .units[class] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-4);
    margin-inline: 0;
    padding: 0;
    overflow: visible;
  }
  .unit__body { padding: var(--sp-3); }
  .unit__price { font-size: 1.0625rem; }   /* "From €418,600 + VAT" on one line in a narrow column */
  .site-footer__top { grid-template-columns: repeat(3, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .units[class] { gap: var(--sp-5); }
  .unit__body { padding: var(--sp-4); }
  .unit__price { font-size: 1.25rem; }
  .contact__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-8); }
}

@media (min-width: 1100px) {
  .units[class] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 961px) {
  .site-footer__top { grid-template-columns: 2fr 1fr 1.6fr 1fr; }
  .site-footer__brand { grid-column: auto; }
}

/* Wide residence picker: the photo fills the stage, anchored right; the card floats over the free side.
   The same query is in main.js (env.wide). The 660 px floor keeps the card off every residence:
   the free strip right of x = 1347 is then always wider than the card and its margin. */
@media (min-width: 900px) and (min-aspect-ratio: 4/3) and (min-height: 560px) {
  .residences { padding-block: 0; }
  .residences.is-built .residences__picker {
    position: relative;
    display: block;
    height: max(100vh, 46vw, 660px);
    height: max(100svh, 46vw, 660px);
  }
  .residences:not(.is-built) { padding-block: max(var(--section-y), 96px) var(--section-y); }
  .residences.is-built .res-stage { position: absolute; inset: 0; height: auto; }
  /* a soft dark corner behind the title */
  .residences.is-built .residences__picker::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(760px, 70%);
    height: 220px;
    background: radial-gradient(farthest-side at 0 100%, rgb(28 27 31 / .92), rgb(28 27 31 / .7) 55%, rgb(28 27 31 / 0));
    pointer-events: none;
  }
  .residences.is-built .residences__head {
    position: absolute;
    left: 0;
    bottom: var(--sp-3);
    z-index: 2;
    width: auto;
    pointer-events: none;
  }
  .face-switch { position: absolute; top: 88px; left: var(--sp-5); z-index: 2; margin: 0; }
  .res-card {
    position: absolute;
    top: 50%;
    right: var(--sp-5);
    z-index: 2;
    width: 320px;
    margin: 0;
    transform: translateY(-50%);
  }
  .link-line {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    overflow: visible;
    pointer-events: none;
  }
  .link-line__path { fill: none; stroke: var(--c-accent-light); stroke-width: 1.5px; opacity: .8; }
  .link-line__start { fill: var(--c-accent-light); }
}

/* Menu */
@media (max-width: 960px) {
  html.js .menu-toggle { display: inline-flex; }
  html.js .site-nav {
    position: absolute;
    top: calc(100% + var(--sp-2));
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-3);
    max-height: calc(100vh - var(--header-h) - 3 * var(--header-inset));
    max-height: calc(100svh - var(--header-h) - 3 * var(--header-inset));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--sp-3) var(--sp-4) var(--sp-4);
    border: var(--glass-border);
    border-radius: var(--r-header);
    background: var(--glass-bg-solid);
    box-shadow: var(--glass-shadow);
  }
  html.js .site-header.is-menu-open .site-nav { display: flex; }
  html.js .site-nav__list { flex-direction: column; gap: 0; }
  html.js .site-nav__link { min-height: 48px; font-size: 1.125rem; }
  html.js .site-nav__link::after { right: auto; width: 32px; bottom: 6px; }
  html.js .site-nav__cta { flex: none; }

  /* Without JavaScript there is no toggle: the links wrap and the header sits above the hero. */
  html.no-js .site-header {
    position: static;
    padding: var(--header-inset);
    background: var(--c-dark);
  }
  html.no-js .site-header__bar { flex-wrap: wrap; gap: 0 var(--sp-4); padding-block: var(--sp-2); }
  html.no-js .site-nav, html.no-js .site-nav__list { flex-wrap: wrap; gap: 0 var(--sp-4); }
  html.no-js .unit-page { padding-top: var(--sp-5); }
}

/* Portrait: the square video on top, the text on the solid background below */
@media (max-aspect-ratio: 1/1) {
  .hero { justify-content: flex-start; }
  .hero__media {
    position: relative;
    inset: auto;
    flex: none;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-image: url("../assets/img/hero-poster-mobile.webp");
  }
  /* The picture occupies 21.7% to 77.8% of the square. Both fades are solid at those edges,
     which hides the pad edges of the video. */
  .hero__media::after {
    content: "";
    position: absolute;
    inset: 0 0 -1px;
    background: linear-gradient(to bottom,
      var(--c-dark) 21.8%, rgb(28 27 31 / .5) 24.5%, rgb(28 27 31 / 0) 29%,
      rgb(28 27 31 / 0) 66%, var(--c-dark) 77.5%);
  }
  .hero__overlay { display: none; }
  .hero__content {
    flex: 1;
    justify-content: center;
    width: 100%;
    margin-top: -14vw;      /* into the solid lower pad of the square */
    padding-block: 0 clamp(24px, 5vh, 56px);
  }

  /* #building: title above a full-width 4:5 window, indicator then button below it.
     The hint takes the place of the title. On short screens the window gets lower. */
  .reveal { height: 250vh; height: calc(100svh + 150vh); }
  .reveal__stage {
    --reveal-head: calc(var(--header-h) + 2 * var(--header-inset));
    --reveal-row: 88px;
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: var(--reveal-row) auto var(--reveal-row);
    align-content: center;
    padding-top: var(--reveal-head);
  }
  .reveal__window {
    position: relative;
    inset: auto;
    grid-area: 2 / 1;
    height: 125vw;
    max-height: calc(100vh - var(--reveal-head) - 2 * var(--reveal-row));
    max-height: calc(100svh - var(--reveal-head) - 2 * var(--reveal-row));
  }
  .reveal__shade { display: none; }
  .reveal__intro, .reveal__controls { display: contents; }
  .reveal__title, .reveal__hint { grid-area: 1 / 1; place-self: center; margin-inline: var(--gutter); text-align: center; }
  .reveal__indicator, .reveal__cta { grid-area: 3 / 1; place-self: center; }
}

@media (max-aspect-ratio: 1/1) and (max-width: 479px) {
  .hero__actions { flex-direction: column; align-self: stretch; }
}

/* Residence page, landscape: information on the left, the model on the right, in view while the text scrolls */
@media (min-aspect-ratio: 1001/1000) and (min-width: 640px) {
  .unit-page__grid {
    grid-template-columns: minmax(280px, 2fr) minmax(0, 3fr);
    grid-template-areas: "head view" "body view";
    grid-template-rows: auto 1fr;
    column-gap: clamp(24px, 4vw, 56px);
  }
  .unit-view {
    position: sticky;
    top: var(--unit-top);
    align-self: start;
    height: calc(100vh - var(--unit-top) - var(--sp-4));
    height: calc(100svh - var(--unit-top) - var(--sp-4));
    min-height: 280px;
  }
  .unit-view__stage, .unit-view.is-plan .unit-view__stage { flex: 1; height: auto; min-height: 0; aspect-ratio: auto; }
}

/* Low landscape (phone on its side) */
@media (orientation: landscape) and (max-height: 519px) {
  .hero__content {
    gap: var(--sp-3);
    padding-top: calc(var(--header-h) + 2 * var(--header-inset));
    padding-bottom: var(--sp-4);
  }
  .hero__lead { font-size: var(--fs-small); }
  .hero__actions .btn { min-height: var(--h-btn-sm); font-size: var(--fs-btn-sm); }

  .unit-page { padding-top: var(--unit-top); }
  .unit-page__grid { row-gap: var(--sp-3); }
  .unit-page__title { font-size: 2rem; }
  .unit-view__notes { font-size: .75rem; line-height: 1.35; }

  .reveal__intro { gap: var(--sp-2); }
  .reveal__controls { flex-direction: row; justify-content: center; bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); }
  .reveal__cta { min-height: var(--h-btn-sm); font-size: var(--fs-btn-sm); }
}

@media (max-width: 359px) {
  .unit-page__cta { padding-inline: var(--sp-3); font-size: var(--fs-btn-sm); letter-spacing: .06em; }
}

/* ---------- 8. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn svg, .site-footer a, .site-nav__link::after { transition: none; }
  .btn:hover svg { transform: none; }
  .reveal__mouse::after, .icon.reveal__arrow { animation: none; }
  .reveal__hint { transition: none; }
  .spot__ring { animation: none; opacity: 0; }
  .spot__shape, .face-switch__btn, .unit, .unit__media img { transition: none; }
  .unit:hover .unit__media img { transform: none; }

  html.js.is-ready .splash {
    opacity: 0;
    transform: none;
    transition: opacity 200ms, visibility 0s 200ms;
  }
  html.js .site-header, html.js.is-ready .site-header { transform: none; transition: none; }
  /* still hides and returns, just without sliding (comes after the rule above on purpose) */
  html.js.is-ready .site-header.has-hidden { transition: none; }
  html.js.is-ready .site-header.is-hidden { transform: translateY(calc(-100% - var(--header-inset) - env(safe-area-inset-top, 0px) - 50px)); }
  html.js .hero__content > *, html.js .hero__overlay {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 3D Apartment Tour (FR-12, D-68) ---------- */
html.is-tour-open { overflow: hidden; overscroll-behavior: none; }
.tour {
  --tour-pad: var(--sp-3);
  --tour-chrome: 148px;   /* title bar, slider and hint, so a low landscape screen still fits the video */
  --tour-w: min(854px, 100vw - 2 * var(--tour-pad) - 16px, (100vh - var(--tour-chrome)) * 16 / 9);
  --tour-w: min(854px, 100vw - 2 * var(--tour-pad) - 16px, (100svh - var(--tour-chrome)) * 16 / 9);
  box-sizing: border-box;
  width: calc(var(--tour-w) + 2 * var(--tour-pad));
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100svh;
  margin: auto;
  padding: var(--tour-pad);
  overflow: hidden;
  overscroll-behavior: contain;
  border: var(--glass-border);
  border-radius: var(--r-card);
  background: var(--c-dark-2);
  color: var(--c-text-on-dark);
  --c-focus: var(--c-accent-light);
}
.tour[open] { display: grid; gap: var(--sp-2); }
.tour::backdrop { background: rgb(0 0 0 / .72); }
.tour__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.tour__title { margin: 0; font-size: var(--fs-small); font-family: inherit; font-weight: 400; letter-spacing: .02em; }
.tour__close {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--r-btn);
  cursor: pointer;
}
.tour__close:hover { border-color: var(--c-white); }
.tour__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-btn);
  background: #000;
  touch-action: none;       /* a swipe on the video moves the tour, never the page */
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.tour__stage.is-dragging { cursor: grabbing; }
.tour__stage:not(.is-ready) { cursor: default; }
.tour__video { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.tour__status {
  position: absolute;
  inset: auto 0 var(--sp-3);
  margin: 0;
  color: var(--c-text-on-dark);
  font-size: var(--fs-small);
  text-align: center;
  pointer-events: none;
}
/* spinner while loading; the status text above says the same in words */
.tour__stage.is-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgb(255 255 255 / .3);
  border-top-color: var(--c-white);
  border-radius: 50%;
  animation: tour-spin .9s linear infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .tour__stage.is-loading::before { animation-duration: 3s; } }
@keyframes tour-spin { to { transform: rotate(360deg); } }
.tour__stage.is-loading .tour__video { opacity: .5; }
.tour__error {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: rgb(0 0 0 / .78);
  text-align: center;
}
.tour__error[hidden] { display: none; }
.tour__error-text { margin: 0; }
.tour__controls { display: flex; }
.tour__slider { width: 100%; height: 28px; margin: 0; accent-color: var(--c-accent-light); cursor: pointer; }
.tour__slider:disabled { cursor: default; opacity: .5; }
.tour__hint { margin: 0; color: var(--c-text-on-dark-muted); font-size: .8125rem; line-height: 1.4; }
@media (pointer: fine) { .tour__hint-touch { display: none; } }
@media not all and (pointer: fine) { .tour__hint-fine { display: none; } }
/* low landscape: less air around the video */
@media (orientation: landscape) and (max-height: 519px) {
  .tour { --tour-pad: var(--sp-2); --tour-chrome: 136px; gap: var(--sp-1); }
  .tour__close { width: 36px; height: 36px; }
  .tour__slider { height: 22px; }
}
