/* The Velmar — scroll climbs the tower. Flat page by default; html.motion pins the stage and drives it by floor. */

@font-face { font-family: "Playfair Display"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/playfair-600.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 300 600; font-style: normal; font-display: swap; src: url("fonts/inter-tight.woff2") format("woff2"); }

:root {
  --navy: #0b1220;
  --navy-2: #111a2e;
  --champ: #d8c39a;
  --champ-2: #b89d6a;
  --ink: #efe8d8;
  --mute: rgba(239, 232, 216, 0.62);
  --line: rgba(216, 195, 154, 0.22);
  --line-2: rgba(216, 195, 154, 0.5);
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(18px, 4vw, 56px);
  --fh: 180px; /* scroll pixels per floor in motion mode */
}
@media (max-width: 768px) { :root { --fh: 130px; } }

* { box-sizing: border-box; }
html { background: var(--navy); color: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-weight: 300; font-size: clamp(16px, 1.1vw + 10px, 19px); line-height: 1.5; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
a { color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
svg text { font-family: var(--body); font-weight: 400; }
:focus-visible { outline: 2px solid var(--champ); outline-offset: 4px; }

.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 50; padding: 10px 14px; background: var(--champ); color: var(--navy); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 18px; padding: 16px var(--gutter); border-bottom: 1px solid var(--line); background: linear-gradient(var(--navy), rgba(11, 18, 32, 0.72)); }
.brand { font-family: var(--display); font-size: 22px; text-decoration: none; letter-spacing: 0.01em; }
.top__where { margin: 0; color: var(--mute); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.top__nav { display: flex; gap: 20px; font-size: 14px; }
.top__nav a { text-decoration: none; color: var(--mute); border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.top__nav a:hover, .top__nav a:focus-visible, .top__nav a.is-here { color: var(--champ); border-color: var(--champ); }
@media (max-width: 768px) {
  .top { grid-template-columns: auto 1fr; row-gap: 6px; padding: 12px var(--gutter) 10px; }
  .brand { white-space: nowrap; font-size: 20px; }
  .top__where { justify-self: end; font-size: 11px; }
  .top__nav { grid-column: 1 / -1; justify-content: space-between; gap: 8px; font-size: 13px; }
  .top__nav a { white-space: nowrap; }
}

/* ---------- intro ---------- */
.intro { padding: clamp(56px, 10vh, 120px) var(--gutter) clamp(32px, 6vh, 72px); max-width: 1100px; }
.intro__title { font-size: clamp(34px, 6vw, 84px); line-height: 1.02; max-width: 14ch; }
.intro__lead { max-width: 52ch; margin: 24px 0 0; font-size: clamp(17px, 1.4vw, 22px); color: var(--ink); }
.intro__note { margin: 14px 0 0; color: var(--mute); font-size: 14px; }

/* ---------- the climb: flat layout (no JS, reduced motion) ---------- */
.climb { padding: 0 var(--gutter) 40px; }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px var(--gutter); align-items: start; }
.views { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.view { margin: 0; }
.view__v { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--navy-2); border: 1px solid var(--line); }
.view figcaption { margin-top: 8px; font-size: 13px; color: var(--mute); letter-spacing: 0.04em; }
.glass, .counter, .hint { display: none; }

.elev { grid-column: 1; margin: 0; }
.elev__svg { width: 100%; max-width: 280px; max-height: 72vh; height: auto; display: block; overflow: visible; }
.elev__floors path { stroke: var(--line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.elev__fill { fill: var(--champ); opacity: 0.2; }
.elev__outline, .elev__mast { fill: none; stroke: var(--champ); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.elev__ground { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.elev__ticks path { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.elev__ticks text { fill: var(--mute); font-size: 11px; }
.elev__mark { stroke: var(--champ); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.elev__cap { margin-top: 10px; font-size: 13px; color: var(--mute); }

.cards { grid-column: 2; display: grid; gap: 24px; }
.card { padding: 22px 22px 18px; border: 1px solid var(--line); background: rgba(17, 26, 46, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.card__floors { margin: 0; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--champ); }
.card__title { font-size: clamp(26px, 2.6vw, 36px); margin-top: 6px; }
.card__text { margin: 10px 0 0; color: var(--mute); font-size: 15px; }
.card__media { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; align-items: stretch; }
.card__media--wide { grid-template-columns: 1fr; }
.plan { width: 100%; height: auto; display: block; border: 1px solid var(--line); background: rgba(11, 18, 32, 0.5); }
.plan rect, .plan path { fill: none; stroke: var(--champ); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan .plan__balc { stroke: var(--line-2); stroke-dasharray: 3 3; }
.plan text { fill: var(--mute); font-size: 9px; text-anchor: middle; }
.card__v { display: block; width: 100%; height: 100%; aspect-ratio: 220 / 140; object-fit: cover; border: 1px solid var(--line); background: var(--navy); }
.card__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 16px 0 0; }
.card__facts div { border-top: 1px solid var(--line); padding-top: 8px; }
.card__facts dt { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.card__facts dd { margin: 2px 0 0; font-weight: 500; font-size: 15px; }
.card__note { margin: 10px 0 0; font-size: 12px; color: var(--mute); }

.summit { grid-column: 1 / -1; margin-top: 16px; padding: 28px 0 0; border-top: 1px solid var(--line); max-width: 640px; }
.summit__floors { margin: 0; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--champ); }
.summit__title { font-size: clamp(32px, 4.4vw, 60px); margin-top: 8px; }
.summit__text { color: var(--mute); margin: 12px 0 0; max-width: 46ch; }
.summit__links { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }
.btn { display: inline-block; padding: 12px 18px; background: var(--champ); color: var(--navy); text-decoration: none; font-weight: 500; font-size: 15px; letter-spacing: 0.01em; transition: transform 0.25s, background-color 0.25s; }
.btn:hover, .btn:focus-visible { background: #e6d4b2; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--champ); border: 1px solid var(--champ-2); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: rgba(216, 195, 154, 0.12); }
.summit__note { margin: 12px 0 0; font-size: 12px; color: var(--mute); }

.foot { padding: 28px var(--gutter) 40px; border-top: 1px solid var(--line); color: var(--mute); font-size: 13px; }
.foot p { margin: 4px 0; }
.foot a { color: var(--champ); }

@media (max-width: 768px) {
  .stage { grid-template-columns: 1fr; }
  .elev, .cards { grid-column: 1; }
  .card__media { grid-template-columns: 1fr; }
}

/* ---------- motion mode: the stage pins, the floor drives everything ---------- */
.motion body { overscroll-behavior: none; }
.motion .top { position: fixed; left: 0; right: 0; background: linear-gradient(rgba(11, 18, 32, 0.9), rgba(11, 18, 32, 0)); border-bottom: 0; }
.motion .intro { padding-top: clamp(96px, 16vh, 160px); min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.motion .climb { padding: 0; height: calc(100vh + 34 * var(--fh)); }
.motion .stage { position: sticky; top: 0; height: 100vh; height: 100dvh; display: block; overflow: hidden; background: var(--navy); }

.motion .views { position: absolute; inset: 0; display: block; }
.motion .view { position: absolute; inset: -6% 0; margin: 0; opacity: 0; will-change: opacity, transform; }
.motion .view.is-live { opacity: 1; }
.motion .view__v { width: 100%; height: 100%; aspect-ratio: auto; border: 0; object-fit: cover; }
.motion .view figcaption { display: none; }

.motion .glass { display: block; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 18, 32, 0.82) 0%, rgba(11, 18, 32, 0.25) 30%, rgba(11, 18, 32, 0.18) 60%, rgba(11, 18, 32, 0.9) 100%),
    linear-gradient(90deg, rgba(11, 18, 32, 0.55), rgba(11, 18, 32, 0) 35%, rgba(11, 18, 32, 0) 65%, rgba(11, 18, 32, 0.55)),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 25vw),
    linear-gradient(180deg, transparent calc(38% - 1px), var(--line) calc(38% - 1px) 38%, transparent 38%);
}
.motion .glass__shine { position: absolute; top: -20%; bottom: -20%; left: 0; width: 55vw; transform: translate3d(-60vw, 0, 0) skewX(-18deg); background: linear-gradient(90deg, rgba(239, 232, 216, 0) 0%, rgba(239, 232, 216, 0.07) 45%, rgba(239, 232, 216, 0.1) 50%, rgba(239, 232, 216, 0) 100%); will-change: transform; }

.motion .counter { display: grid; position: absolute; left: var(--gutter); bottom: clamp(24px, 6vh, 64px); z-index: 3; pointer-events: none; }
.motion .counter__label { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--champ); }
.motion .counter__num { display: block; font-weight: 500; font-size: clamp(120px, 20vw, 280px); line-height: 0.9; letter-spacing: -0.04em; min-width: 2.1ch; transform-origin: 0% 100%; will-change: transform; color: var(--ink); text-shadow: 0 2px 30px rgba(11, 18, 32, 0.7); }
.motion .counter__type { margin-top: 10px; font-family: var(--display); font-size: clamp(22px, 2.2vw, 32px); color: var(--champ); }
.motion .counter__view { font-size: 14px; color: var(--mute); letter-spacing: 0.06em; }

.motion .elev { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); height: 78vh; z-index: 3; pointer-events: none; }
.motion .elev__svg { height: 100%; width: auto; max-width: none; }
.motion .elev__cap { display: none; }
.motion .elev__fill { opacity: 0.28; }

.motion .cards { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 38vw); z-index: 3; display: block; pointer-events: none; }
.motion .card { position: absolute; left: 0; top: 50%; width: 100%; transform: translateY(-50%); opacity: 0; visibility: hidden; pointer-events: none; will-change: transform, opacity; }
.motion .card.is-live { visibility: visible; pointer-events: auto; }
.motion .card__title { font-size: clamp(24px, 2.2vw, 32px); }

.motion .summit::before { content: ""; position: absolute; inset: -18% -14%; z-index: -1; background: radial-gradient(closest-side, rgba(11, 18, 32, 0.78), rgba(11, 18, 32, 0)); }
.motion .summit { position: absolute; left: 50%; top: 50%; width: min(560px, 86vw); transform: translate(-50%, -50%); margin: 0; padding: 0; border: 0; text-align: center; z-index: 4; opacity: 0; visibility: hidden; will-change: opacity, transform; }
.motion .summit.is-live { visibility: visible; }
.motion .summit__text { margin-left: auto; margin-right: auto; }
.motion .summit__links { justify-content: center; }

.motion .hint { display: block; position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); z-index: 3; transition: opacity 0.6s; }
.motion .hint::after { content: ""; display: block; width: 1px; height: 28px; margin: 8px auto 0; background: var(--champ); animation: drop 1.6s ease-in-out infinite; }
.motion .hint.is-gone { opacity: 0; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* reveal on load */
.motion .elev__outline, .motion .elev__mast { stroke-dasharray: 2600; stroke-dashoffset: 2600; transition: stroke-dashoffset 1.6s cubic-bezier(0.6, 0, 0.2, 1) 0.1s; }
.motion.ready .elev__outline, .motion.ready .elev__mast { stroke-dashoffset: 0; }
.motion .counter { opacity: 0; transform: translateY(16px); transition: opacity 0.8s 0.5s, transform 0.8s 0.5s; }
.motion.ready .counter { opacity: 1; transform: none; }

@media (max-width: 768px) {
  .motion .counter { left: var(--gutter); top: 104px; bottom: auto; }
  .motion .counter__num { font-size: clamp(96px, 30vw, 150px); }
  .motion .counter__type { font-size: 20px; }
  .motion .elev { right: 12px; top: 108px; transform: none; height: 44vh; }
  .motion .cards { left: var(--gutter); right: var(--gutter); top: auto; bottom: 20px; width: auto; transform: none; }
  .motion .card { top: auto; bottom: 0; transform: none; padding: 16px 16px 14px; max-height: 58vh; overflow: hidden; }
  .motion .card__text { display: none; }
  .motion .card__media { grid-template-columns: 1fr 1fr; margin-top: 12px; }
  .motion .card__facts { grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 12px; }
  .motion .card__facts dd { font-size: 14px; }
  .motion .card__note { display: none; }
  .motion .summit { top: auto; bottom: 10vh; transform: translateX(-50%); }
  .motion .hint { bottom: 10px; }
  .motion .glass { background:
    linear-gradient(180deg, rgba(11, 18, 32, 0.9) 0%, rgba(11, 18, 32, 0.3) 32%, rgba(11, 18, 32, 0.2) 55%, rgba(11, 18, 32, 0.92) 100%),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 50vw),
    linear-gradient(180deg, transparent calc(42% - 1px), var(--line) calc(42% - 1px) 42%, transparent 42%); }
}
