/* Residensi Armani Putra concept
   World: sales-gallery scale model. Navy plinth + bronze linework from the logo,
   plan-sheet blue-grey paper for reading, white render light. */

:root {
  --ink: #121726;
  --navy: #1c2540;
  --navy-2: #26304f;
  --paper: #e6eaf0;
  --paper-2: #f4f6f9;
  --white: #ffffff;
  --bronze: #c99a68;
  --bronze-deep: #7d5531;
  --mist: #b7c0d1;
  --slate: #4a5470;
  --rule-dark: rgba(201, 154, 104, 0.28);
  --rule-light: rgba(28, 37, 64, 0.16);
  --danger: #a3261b;

  --display: "League Gothic", "Arial Narrow", sans-serif;
  --body: "Manrope", "Segoe UI", sans-serif;

  --gutter: clamp(16px, 3.2vw, 48px);
  --section: clamp(72px, 9vw, 136px);
  --radius: 2px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --focus: var(--navy);

  color-scheme: light;
  scrollbar-color: var(--navy) var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  caret-color: var(--bronze-deep);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

::selection { background: var(--bronze); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* Dark surfaces get a bronze focus ring for contrast */
.nav, .hero, .spec, .facil, .reg, .foot { --focus: var(--bronze); }
.reg .form, .reg .done { --focus: var(--navy); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 50;
  background: var(--bronze); color: var(--ink); padding: 10px 16px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Shared pieces ---------- */

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.75rem, 5.6vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: 0.005em;
  color: var(--navy);
  text-wrap: balance;
}
.display--light { color: var(--paper-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9375rem; text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn--light { background: var(--paper-2); color: var(--navy); }
.btn--light:hover { background: var(--bronze); color: var(--ink); }
.btn--navy { background: var(--navy); color: var(--paper-2); }
.btn--navy:hover { background: var(--navy-2); }
.btn--line { border-color: var(--navy); color: var(--navy); }
.btn--line:hover { background: var(--navy); color: var(--paper-2); }
.btn--bronze { background: var(--bronze); color: var(--ink); }
.btn--bronze:hover { background: #d8ad80; }
.btn[disabled] { cursor: progress; opacity: 0.8; }

.link {
  background: none; border: 0; padding: 0;
  color: var(--navy); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  text-decoration-color: var(--bronze);
}
.link:hover { color: var(--bronze-deep); }
.link--light { color: var(--paper-2); }
.link--light:hover { color: var(--bronze); }

/* ---------- Nav ---------- */

.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
  color: var(--paper-2);
}
.nav__brand {
  display: flex; align-items: center; gap: 12px;
  color: inherit; text-decoration: none;
  font-size: 0.75rem; font-weight: 600; line-height: 1.25;
  letter-spacing: 0.16em; text-transform: uppercase; /* echoes the spaced caps in their logo */
}
.nav__brand img { width: auto; height: 44px; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.nav__links a:not(.btn) {
  color: inherit; text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  padding: 10px 0; border-bottom: 1px solid transparent;
}
.nav__links a:not(.btn):hover { border-bottom-color: var(--bronze); }
.nav__toggle {
  display: none; align-items: center; gap: 10px; min-height: 44px;
  background: none; border: 1px solid rgba(244, 246, 249, 0.5); border-radius: var(--radius);
  padding: 0 14px; color: inherit; font-weight: 600; font-size: 0.875rem;
}
.nav__toggle-bars, .nav__toggle-bars::before {
  display: block; width: 16px; height: 1.5px; background: currentColor; position: relative;
}
.nav__toggle-bars::before { content: ""; position: absolute; top: 5px; }
.nav__toggle-bars { transform: translateY(-2.5px); }

/* ---------- Hero ---------- */

/* One honest layer: the official facade render, with the headline anchored
   bottom-left so the towers and the sunset stay clear above it. */
.hero {
  position: relative; overflow: hidden;
  height: clamp(520px, 64svh, 760px); /* leaves the area figure and stepper in a 900px fold */
  background: var(--ink);
  color: var(--white);
}
.hero__media { position: absolute; inset: -6% 0 0 0; } /* headroom for the scroll drift */
.hero__img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 22%;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 18, 30, 0.55) 0%, rgba(14, 18, 30, 0) 22%),
    linear-gradient(90deg, rgba(14, 18, 30, 0.35) 0%, rgba(14, 18, 30, 0) 70%),
    linear-gradient(0deg, rgba(14, 18, 30, 0.84) 0%, rgba(14, 18, 30, 0.72) 52%, rgba(14, 18, 30, 0) 74%);
}
.hero__copy {
  position: absolute; z-index: 1;
  left: var(--gutter); right: var(--gutter); bottom: clamp(32px, 4.5vw, 64px);
  max-width: 62%;
}
.hero__title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3.4rem, 8.4vw, 9rem);
  line-height: 0.88; letter-spacing: 0.005em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero__title .line > span { display: block; }
.hero__rule {
  display: block; width: min(320px, 40%); height: 1px; margin-top: 22px;
  background: var(--bronze); transform-origin: 0 50%;
}
.hero__sub { margin-top: 14px; font-size: 1rem; font-weight: 500; color: var(--paper); }

.inset {
  position: absolute; z-index: 3; right: var(--gutter); bottom: clamp(20px, 2.5vw, 36px);
  width: clamp(200px, 17vw, 260px);
  background: var(--paper-2); color: var(--navy);
  text-decoration: none; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 14px 34px rgba(8, 10, 18, 0.4);
  transition: transform 0.4s var(--ease);
}
.inset:hover, .js .hero.is-ready .inset:hover { transform: translateY(-4px); transition-delay: 0s; }
.inset img { aspect-ratio: 760 / 500; object-fit: cover; width: 100%; }
.inset__cap {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px 12px; font-size: 0.8125rem; font-weight: 600; line-height: 1.3;
}
.inset__go { color: var(--bronze-deep); }

/* ---------- Deck: spec panel + intro ---------- */

.deck {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
}

.spec {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 24px clamp(20px, 2vw, 32px); align-items: center;
  padding: clamp(28px, 3vw, 44px) var(--gutter);
  background: var(--ink); color: var(--paper-2);
}
.spec__plan {
  display: flex; align-items: center; justify-content: center;
  min-height: 220px;
}
.spec__plan > img {
  max-height: 280px; width: auto; max-width: 100%;
  object-fit: contain;
}
.spec__data { min-width: 0; }
.spec__label { font-size: 0.8125rem; font-weight: 600; color: var(--mist); }
.spec__area {
  font-family: var(--display); font-size: clamp(4.5rem, 7vw, 6rem);
  line-height: 0.9; margin-top: 2px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.spec__unit { font-size: 0.42em; margin-left: 0.12em; vertical-align: 0.95em; color: var(--bronze); }
.spec__type {
  font-family: var(--display); text-transform: uppercase;
  font-size: 2rem; line-height: 1; margin-top: 14px; color: var(--bronze);
}
.spec__meta { margin-top: 10px; font-size: 0.9375rem; line-height: 1.5; color: var(--mist); }

/* Split-flap style cells: each character rolls on its own */
.roll { display: inline-flex; }
.cell { position: relative; display: inline-block; overflow: hidden; height: 1em; line-height: 1; }
.cell > span { display: block; }
.cell > span + span { position: absolute; left: 0; top: 0; }

.spec__step {
  align-self: end;
  display: flex; flex-direction: column; gap: 10px;
}
.step {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: none; border: 1px solid rgba(244, 246, 249, 0.45); color: var(--paper-2);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.step:hover { background: var(--bronze); border-color: var(--bronze); color: var(--ink); }
.step svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.intro {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-rows: auto 1fr auto;
  gap: 16px clamp(24px, 3vw, 44px);
  padding: clamp(28px, 3vw, 44px) var(--gutter);
  background: var(--paper-2);
}
.intro__title {
  grid-column: 1 / -1;
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.5rem, 4vw, 3.75rem); line-height: 0.92; color: var(--navy);
}
.intro__body { font-size: 0.9375rem; color: var(--slate); max-width: 46ch; }
.intro .link { grid-column: 1; align-self: end; justify-self: start; padding: 10px 0; }
.intro__thumbs {
  grid-column: 2; grid-row: 2 / 4;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-self: start;
}
.thumb {
  position: relative; padding: 0; border: 0; background: var(--navy);
  border-radius: var(--radius); overflow: hidden; text-align: left;
}
.thumb img { aspect-ratio: 5 / 4; object-fit: cover; width: 100%; transition: transform 0.6s var(--ease); }
.thumb:hover img { transform: scale(1.04); }
.thumb span {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 12px 10px; color: var(--white); font-size: 0.8125rem; font-weight: 600;
  background: linear-gradient(180deg, rgba(14, 18, 30, 0), rgba(14, 18, 30, 0.82));
}

/* ---------- Unit plans ---------- */

.units { padding: var(--section) var(--gutter); }
.units__head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px clamp(24px, 4vw, 72px); align-items: end;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.units__head .display { grid-row: 1 / 3; }
.units__lede { color: var(--slate); max-width: 48ch; }

.filter { display: flex; flex-wrap: wrap; gap: 8px; }
.filter__btn {
  min-height: 44px; padding: 0 16px;
  background: transparent; border: 1px solid var(--rule-light); border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 600; color: var(--navy);
}
.filter__btn:hover { border-color: var(--navy); }
.filter__btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--paper-2); }

.units__body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px); align-items: start;
}

.utable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.utable th {
  text-align: left; font-size: 0.8125rem; font-weight: 600; color: var(--slate);
  padding: 0 12px 12px; border-bottom: 1px solid var(--navy);
}
.utable .num { text-align: right; }
.utable td {
  padding: 0 12px; height: 64px; border-bottom: 1px solid var(--rule-light);
  font-size: 0.9375rem; vertical-align: middle;
}
.utable tbody tr { cursor: pointer; transition: background-color 0.2s var(--ease); }
.utable tbody tr:hover { background: rgba(28, 37, 64, 0.06); }
.utable tbody tr.is-active { background: var(--navy); color: var(--paper-2); }
.utable tbody tr.is-active .type-btn { color: var(--bronze); }
.type-btn {
  background: none; border: 0; padding: 4px 0; min-width: 48px; min-height: 44px; text-align: left;
  font-family: var(--display); font-size: 2rem; line-height: 1; color: var(--navy);
}
.utable tr.is-active .type-btn:focus-visible { outline-color: var(--bronze); }

.empty { padding: 24px 12px; color: var(--slate); }

.plan { position: sticky; top: 24px; }
.plan__sheet {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 1.12; padding: clamp(16px, 3vw, 36px);
  background: var(--white); border-radius: var(--radius);
}
.plan__sheet img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; transition: opacity 0.3s var(--ease); }
.plan__status { position: absolute; inset: auto 0 50% 0; text-align: center; color: var(--slate); font-size: 0.9375rem; display: none; }
.plan__sheet[data-state="loading"] img { opacity: 0.25; }
.plan__sheet[data-state="loading"] .plan__status--loading { display: block; }
.plan__sheet[data-state="error"] img { display: none; }
.plan__sheet[data-state="error"] .plan__status--error { display: block; }
.plan__cap {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding-top: 14px; font-size: 0.9375rem;
}
.plan__name { font-weight: 600; color: var(--navy); }

/* ---------- Facilities ---------- */

.facil { padding: var(--section) var(--gutter); background: var(--ink); color: var(--paper-2); }
.facil .display { margin-bottom: clamp(32px, 4vw, 56px); }
.facil__body {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 3.4fr);
  gap: clamp(24px, 4vw, 64px); align-items: start;
}
.viewer { position: sticky; top: 24px; }
.viewer__frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--navy); border-radius: var(--radius);
}
.viewer__frame img { width: 100%; height: 100%; object-fit: cover; }
.viewer__frame img { transition: opacity 0.2s ease-out; }
.viewer__frame[data-state="loading"] img { opacity: 0.6; }
.viewer:has([data-state="loading"]) .viewer__cap { opacity: 0.6; }
.viewer__frame[data-state="error"]::after {
  content: "This render didn't load. Try another facility.";
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--mist);
}
.viewer__cap {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 14px; font-weight: 600;
}
.viewer__views { display: flex; gap: 4px; }
.view-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; padding: 0;
}
.view-btn::before {
  content: ""; width: 28px; height: 3px; background: rgba(183, 192, 209, 0.45);
  transition: background-color 0.2s var(--ease);
}
.view-btn[aria-pressed="true"]::before { background: var(--bronze); }
.view-btn:hover::before { background: var(--paper-2); }

.directory { display: grid; gap: 28px; }
.directory h3 {
  font-size: 0.8125rem; font-weight: 600; color: var(--bronze);
  letter-spacing: 0.08em; text-transform: uppercase; /* reads as a building directory board */
  padding-bottom: 8px; border-bottom: 1px solid var(--rule-dark);
}
.dir-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px;
  background: none; border: 0; border-bottom: 1px solid rgba(183, 192, 209, 0.12);
  padding: 8px 0; text-align: left; font-size: 1.0625rem; font-weight: 500; color: var(--mist);
  transition: color 0.2s var(--ease);
}
.dir-btn::before {
  content: ""; width: 8px; height: 8px; flex: none;
  background: transparent; border: 1px solid rgba(183, 192, 209, 0.45);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.dir-btn:hover { color: var(--paper-2); }
.dir-btn[aria-pressed="true"] { color: var(--paper-2); }
.dir-btn[aria-pressed="true"]::before { background: var(--bronze); border-color: var(--bronze); }

/* ---------- Location ---------- */

.loc {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 72px); align-items: start;
  padding: var(--section) var(--gutter);
}
.loc__map {
  display: block; border-radius: var(--radius); overflow: hidden;
  background: #e3e9ec; border: 1px solid rgba(28, 37, 64, 0.14); /* frames the map's own pale sheet */
}
.loc__map img { width: 100%; transition: transform 0.8s var(--ease); }
.loc__map:hover img { transform: scale(1.02); }
.loc__text > p { margin-top: 20px; color: var(--slate); max-width: 44ch; }
.loc__sub { margin-top: 32px; font-size: 0.9375rem; font-weight: 700; color: var(--navy); }
.landmarks {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px;
  margin-top: 12px; font-size: 0.9375rem;
}
.landmarks li { display: flex; gap: 10px; align-items: baseline; }
.landmarks li::before { content: ""; width: 6px; height: 6px; flex: none; background: var(--bronze-deep); transform: translateY(-2px); }

.gallery-card {
  margin-top: 36px; padding: 24px;
  background: var(--paper-2);
}
.gallery-card h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 2rem; line-height: 1; color: var(--navy); }
.gallery-card p { margin-top: 8px; color: var(--slate); }
.gallery-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ---------- Register ---------- */

.reg {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 4vw, 72px); align-items: start;
  padding: var(--section) var(--gutter);
  background: var(--navy); color: var(--paper-2);
}
.reg__intro > p { margin-top: 20px; color: var(--mist); max-width: 42ch; }
.reg__note { font-size: 0.875rem; padding-top: 20px; border-top: 1px solid var(--rule-dark); }
.reg__note a { color: var(--paper-2); text-underline-offset: 4px; text-decoration-color: var(--bronze); }
.reg__note a:hover { color: var(--bronze); }

.form, .done {
  padding: clamp(24px, 3vw, 40px);
  background: var(--paper-2); color: var(--ink); border-radius: var(--radius);
}
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.field { display: grid; gap: 6px; align-content: start; }
.field:nth-of-type(1), .field--check { grid-column: 1 / -1; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--navy); }
.field input:not([type="checkbox"]), .field select {
  width: 100%; min-height: 48px; padding: 0 14px;
  background: var(--white); border: 1px solid #8f99ad; border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input::placeholder { color: #69738a; }
.field input:focus, .field select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(28, 37, 64, 0.25); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
/* Error lines keep their space so fields never jump under the pointer */
.field__err, .form__err { font-size: 0.8125rem; font-weight: 600; line-height: 1.35; color: var(--danger); min-height: 1.35em; }
.form__err { grid-column: 1 / -1; }
.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: 12px; }
.field--check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); }
.field--check label { font-weight: 500; color: var(--slate); line-height: 1.5; }
.field--check label a { color: var(--navy); text-underline-offset: 3px; }
.field--check .field__err { grid-column: 2; }
.form .btn { grid-column: 1 / -1; justify-self: start; min-width: 200px; }
.btn.is-loading .btn__label::after {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  vertical-align: -2px; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.done h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 2.5rem; line-height: 1; color: var(--navy); }
.done p { margin: 12px 0 20px; color: var(--slate); max-width: 46ch; }
.done:focus { outline: none; }

/* ---------- Footer ---------- */

.foot {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px 40px; align-items: end;
  padding: 48px var(--gutter);
  background: var(--ink); color: var(--mist); font-size: 0.875rem;
}
.foot__logo { height: 96px; width: auto; }
.foot__text { display: grid; gap: 8px; max-width: 70ch; }
.foot a:not(.link) { color: var(--paper-2); text-underline-offset: 3px; text-decoration-color: var(--bronze); }
.foot a:not(.link):hover { color: var(--bronze); }
.foot__credit { color: #8f99ad; }
.foot__top { padding: 10px 0; }

/* ---------- Floating register button (phones only) ---------- */

.fab { display: none; }
@media (max-width: 860px) {
  .fab {
    position: fixed; z-index: 30; right: var(--gutter); bottom: max(16px, env(safe-area-inset-bottom));
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
    background: var(--bronze); color: var(--ink); border-radius: var(--radius);
    font-weight: 600; font-size: 0.9375rem; text-decoration: none;
    box-shadow: 0 10px 28px rgba(8, 10, 18, 0.35);
    opacity: 0; transform: translateY(16px); pointer-events: none;
    transition: opacity 0.25s ease-out, transform 0.3s var(--ease);
  }
  .fab.is-on { opacity: 1; transform: none; pointer-events: auto; }
  .foot { padding-bottom: 88px; } /* the last lines clear the floating button */
  .fab:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
}

/* ---------- Load moment ----------
   Starts only when js/site.js adds .is-ready (hero image decoded + display font
   loaded), so nothing pops or reflows mid-animation. Transform and opacity only. */

@media (prefers-reduced-motion: no-preference) {
  .js .hero__img { opacity: 0; transform: scale(1.05); }
  .js .hero__title .line > span { transform: translateY(105%); }
  .js .hero__rule { transform: scaleX(0); }
  .js .hero__sub, .js .inset { opacity: 0; transform: translateY(12px); }

  .js .hero.is-ready .hero__img {
    opacity: 1; transform: none;
    transition: opacity 0.7s ease-out, transform 1.4s var(--ease);
  }
  .js .hero.is-ready .hero__title .line > span { transform: none; transition: transform 0.75s var(--ease); }
  .js .hero.is-ready .hero__title .line:nth-child(1) > span { transition-delay: 0.12s; }
  .js .hero.is-ready .hero__title .line:nth-child(2) > span { transition-delay: 0.2s; }
  .js .hero.is-ready .hero__rule { transform: none; transition: transform 0.6s 0.45s var(--ease); }
  .js .hero.is-ready .hero__sub { opacity: 1; transform: none; transition: opacity 0.5s 0.55s ease-out, transform 0.6s 0.55s var(--ease); }
  .js .hero.is-ready .inset { opacity: 1; transform: none; transition: opacity 0.5s 0.65s ease-out, transform 0.6s 0.65s var(--ease); }

  /* Scroll drift: the photo moves slower than the page. Runs on the compositor
     where supported; other browsers simply keep it still. */
  @supports (animation-timeline: scroll()) {
    .hero__media {
      animation: drift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
  }
}
@keyframes drift { to { transform: translateY(14%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .deck { grid-template-columns: 1fr; }
  .intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; top: 100%; left: var(--gutter); right: var(--gutter);
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 20px 20px; background: var(--ink); border-radius: var(--radius);
    box-shadow: 0 18px 40px rgba(8, 10, 18, 0.45);
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid rgba(183, 192, 209, 0.15); }
  .nav__links .btn { margin-top: 16px; }

  .units__head, .units__body, .facil__body, .loc, .reg { grid-template-columns: 1fr; }
  .units__head .display { grid-row: auto; }
  .plan { position: static; order: -1; }
  .viewer { position: sticky; top: 0; z-index: 2; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px; background: var(--ink); }
  .foot { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 600px) {
  /* Phone: shorter hero so the spec panel peeks above the fold */
  .hero { height: clamp(520px, 78svh, 700px); }
  .hero__img { object-position: 30% 20%; } /* keep the tall tower in frame */
  .hero__copy { max-width: none; bottom: 104px; } /* clears the map strip */
  .hero__title { font-size: 15vw; }
  .hero__rule { margin-top: 16px; }
  .hero__sub { font-size: 0.9375rem; }
  /* Compact map strip so the render still shows on phones */
  .inset { left: var(--gutter); right: var(--gutter); width: auto; display: grid; grid-template-columns: 96px 1fr; }
  .inset img { aspect-ratio: auto; height: 100%; min-height: 64px; object-position: 47% 52%; }
  .inset__cap { flex-direction: column; gap: 2px; align-self: center; }

  .spec { grid-template-columns: minmax(0, 1fr) auto; }
  .spec__plan { grid-column: 1 / -1; min-height: 0; }
  .spec__plan > img { max-height: 220px; }

  .intro { grid-template-columns: 1fr; }
  .intro__thumbs { grid-column: 1; grid-row: auto; }
  .intro .link { grid-column: 1; }

  .utable .col-ft2 { display: none; }
  .utable th, .utable td { padding-left: 8px; padding-right: 8px; }
  .utable td { font-size: 0.875rem; }
  .type-btn { font-size: 1.75rem; }

  .landmarks { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .form .btn { width: 100%; }
}
