/* Hallmark · shape: Lenval-order project page · genre: editorial · theme: custom (by request: the Lenval project-page style) · job: register interest · idea: "the architects' own dusk render, on a cool ivory page, with the programme told as four named rooms" · vibe: "quiet, cool ivory, graphite, timber, slow"
 * paper: oklch(94.5% 0.003 100) · accent: oklch(48% 0.07 62) · display: Noto Serif Georgian 300 · body: FiraGO · hero: full-bleed render, name low and centred · nav: thin text bar, language, clock, one action · footer: dark close, architect credit and disclaimer · imagery: architect's sketch renders and two redrawn figures · signature: the render itself, with the name set low over the street
 * axes: cool-ivory/serif-light/timber · posture: stage · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E3 S4 R3 V3 · weakest: R, one reveal only (soft rise), stage motion limited to the hero entrance */
/* waive 54 67: the owner asked for the reference's small hairline-ruled labels; kept as small caps on Latin only (:lang(en)), plain sentence case on Georgian, no uppercase or tracking on Georgian */
:root {
  /* colour: every colour on the page is one of these */
  --ground: #EEEDEA;
  --ground-2: #E2E1DD;
  --ink: #1B1D20;
  --ink-soft: #55585C;
  --ink-soft-shade: #484B4F; /* grey text over the foliage shadow (overview) */
  --accent: #8C5E34;
  --on-accent: #EEEDEA;
  --dark: #1B1D20;
  --on-dark: #EEEDEA;
  --on-dark-soft: #B5B7B9;
  --accent-on-dark: #C49A6C;
  --on-image: #FBFAF7;
  --scrim-1: rgba(14, 15, 17, 0.66);
  --scrim-0: rgba(14, 15, 17, 0);
  --scrim-top: rgba(14, 15, 17, 0.5);
  --line: rgba(27, 29, 32, 0.2);
  --line-faint: rgba(27, 29, 32, 0.1);
  --line-dark: rgba(238, 237, 234, 0.22);
  --river: #C3C9CD;
  --river-bank: #D9DCDC;
  --hill: #E4E2DC;
  --hill-edge: rgba(27, 29, 32, 0.16);
  --backdrop: rgba(14, 15, 17, 0.92);
  --focus: #8C5E34;
  --mask-on: #000; /* mask alpha only, never painted */
  --focus-dark: #C49A6C;
  --error: #9A2F23;

  /* type */
  --font-display: "Noto Serif Georgian", Georgia, "Times New Roman", serif;
  --font-body: "FiraGO", system-ui, "Segoe UI", sans-serif;
  /* hero name: sized per language, Georgian is about 35% wider than Latin for the same name */
  --name-size: clamp(3.5rem, 8.2vw, 7.5rem);
  --name-size-ka: clamp(2.75rem, 6vw, 5.5rem);

  /* space and layout */
  --gutter: clamp(16px, 4vw, 64px);
  --gap: clamp(16px, 2.2vw, 32px);
  --container: 1320px;
  --sec: clamp(88px, 12vw, 176px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-body); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
:lang(ka) body, body:lang(ka), html:lang(ka) body { line-height: 1.78; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
svg { display: block; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; font-synthesis: none; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
ol { list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 100; background: var(--ink); color: var(--on-dark); padding: 12px 16px; transition: top 0s; }
.skip:focus { top: 12px; outline-color: var(--focus-dark); }

/* small labels: reference-style small caps on Latin only; plain, untracked sentence case on Georgian */
.lab, .spec dt, .stage-state, .bar, .hero-cap, figcaption, .form .field > span, .foot { font-size: 0.8125rem; line-height: 1.5; }
.lab:lang(en), .spec dt:lang(en), .stage-state:lang(en), .bar:lang(en), .form .field > span:lang(en) { font-variant-caps: all-small-caps; letter-spacing: 0.05em; font-size: 0.9rem; }
:lang(ka) { letter-spacing: 0; text-transform: none; font-variant-caps: normal; }

/* ---------- top bar ---------- */
.bar { position: absolute; inset: 0 0 auto 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 12px var(--gutter); color: var(--on-image); background: transparent; border-bottom: 1px solid transparent; min-height: 52px; transition: background-color 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease); }
.bar::before { content: ""; position: absolute; inset: 0 0 -48px 0; z-index: -1; background: linear-gradient(to bottom, var(--scrim-top), var(--scrim-0)); pointer-events: none; transition: opacity 0.5s var(--ease); }
html.js .bar { position: fixed; }
.bar.is-solid { background: var(--ground); color: var(--ink); border-bottom-color: var(--line); }
.bar.is-solid::before { opacity: 0; }
.bar a { text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; padding-inline: 2px; }
.bar a:hover { text-decoration: underline; text-underline-offset: 0.35em; }
.bar-nav { display: flex; align-items: center; }
.bar-menu { display: block; position: static; }
.bar-menu summary { cursor: pointer; list-style: none; min-height: 32px; display: inline-flex; align-items: center; }
.bar-menu summary::-webkit-details-marker { display: none; }
.bar-menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--ground); color: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(24px, 4vw, 56px) var(--gutter); display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap); align-items: end; max-height: calc(100svh - 52px); overflow-y: auto; }
.menu-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.bar .menu-links a { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.5rem, 1.6vw + 1rem, 2.5rem); line-height: 1.2; min-height: 48px; padding-block: 4px; font-variant-caps: normal; letter-spacing: 0; border-bottom: 1px solid var(--line); }
.bar .menu-links a[aria-current="page"] { color: var(--accent); }
.menu-desc { color: var(--ink-soft); font-variant-caps: normal; letter-spacing: 0; }
.bar-menu[open] summary { text-decoration: underline; text-underline-offset: 0.35em; }
.bar-end { justify-self: end; }
.wordmark { font-family: var(--font-display); font-weight: 400; font-size: 1.375rem; letter-spacing: 0.01em; font-variant-caps: normal; line-height: 1; justify-self: center; }
.wordmark:lang(ka), :lang(ka) .wordmark { letter-spacing: 0; font-size: 1.25rem; }
.bar-end { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); }
.clock { white-space: nowrap; }
.langs { display: inline-flex; gap: 12px; }
.langs a[aria-current="true"] { text-decoration: underline; text-underline-offset: 0.35em; }
.bar .bar-talk { background: var(--accent); color: var(--on-accent); padding: 4px 16px; white-space: nowrap; }
button, input, select, textarea { font: inherit; }
.bar .bar-talk:hover { text-decoration: none; background: var(--ink); }
.bar.is-solid .bar-talk:hover { background: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 640px; min-height: 100svh; display: grid; align-items: end; color: var(--on-image); background: var(--dark); overflow: clip; isolation: isolate; }
.hero-img { position: absolute; inset: 0; z-index: -2; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 96%; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: min(62%, 560px); z-index: -1; background: linear-gradient(to top, var(--scrim-1), var(--scrim-0)); pointer-events: none; }
.hero-copy { text-align: center; padding: 0 var(--gutter) clamp(44px, 9vh, 96px); display: grid; justify-items: center; gap: 0; }
.hero h1 { font-size: var(--name-size); line-height: 1; letter-spacing: -0.012em; }
:lang(ka) .hero h1, .hero h1:lang(ka) { font-size: var(--name-size-ka); letter-spacing: 0; line-height: 1.1; }
.hero-tag { font-size: clamp(1rem, 0.4vw + 0.9rem, 1.25rem); margin-top: clamp(12px, 1.6vh, 16px); }
.hero .btn { margin-top: clamp(20px, 3.6vh, 36px); }
.hero-cap { position: absolute; right: var(--gutter); bottom: 14px; opacity: 0.85; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 24px; font-family: var(--font-body); font-size: 0.9375rem; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease); }
.btn--ghost { color: var(--on-image); border-color: var(--on-image); background: transparent; }
.btn--ghost:hover { background: var(--on-image); color: var(--ink); }
.btn--solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn--solid:hover { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .field input:disabled, .field select:disabled, .field textarea:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline-color: var(--focus-dark); }

/* ---------- layout grid and rail ---------- */
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.rail { position: relative; }
.rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); left: calc(var(--gutter) + (100% - 2 * var(--gutter) - 11 * var(--gap)) / 6 + 1.5 * var(--gap)); }
.sec { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-block: var(--sec) 0; }
.sec:last-child { padding-bottom: var(--sec); }
.sec > .lab { grid-column: 1 / 3; align-self: start; color: var(--ink-soft); padding-top: 0.45em; margin: 0; font-weight: 400; font-family: var(--font-body); text-wrap: wrap; }
.sec > .sec-body { grid-column: 3 / 13; padding-inline-start: var(--gap); min-width: 0; }

/* ---------- overview + spec ---------- */
.sec--overview { padding-top: clamp(72px, 10vw, 144px); }
.lead { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.5rem, 1.5vw + 1rem, 2.5rem); line-height: 1.28; max-width: 24em; text-wrap: balance; }
:lang(ka) .lead { line-height: 1.5; font-size: clamp(1.375rem, 1.2vw + 0.95rem, 2.125rem); }
.lead--s { font-size: clamp(1.25rem, 1vw + 1rem, 1.875rem); max-width: 28em; }
.body-s { margin-top: clamp(20px, 2.4vw, 32px); max-width: 36em; color: var(--ink-soft); font-size: 1rem; }
.spec { margin-top: clamp(48px, 6vw, 88px); border-top: 1px solid var(--line); max-width: 52rem; }
.spec-row .rule { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); transform-origin: 0 50%; }
.spec-row { position: relative; display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: var(--gap); padding: 16px 0; align-items: baseline; }
.spec dt { color: var(--ink-soft); }
.spec dd { text-align: end; font-size: 0.9375rem; }

/* ---------- media ---------- */
.media { position: relative; }
.media img { width: 100%; height: auto; background: var(--ground-2); }
figcaption { margin-top: 12px; color: var(--ink-soft); max-width: 44em; }
.media--full img { aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- what's inside ---------- */
.inside-rows { display: grid; gap: clamp(64px, 9vw, 128px); }
.row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: var(--gap); align-items: end; }
.row--a .media { grid-column: 1 / 7; }
.row--a .row-text { grid-column: 7 / 10; }
.row--b .row-text { grid-column: 1 / 4; order: -1; }
.row--b .media { grid-column: 4 / 10; }
.row-text h3 { font-size: clamp(1.75rem, 1.4vw + 1.2rem, 2.5rem); line-height: 1.12; margin-bottom: 16px; }
:lang(ka) .row-text h3 { line-height: 1.3; font-size: clamp(1.5rem, 1.1vw + 1.1rem, 2.125rem); }
.row-text p { color: var(--ink-soft); max-width: 24em; }
.media--figure { background: var(--ground-2); padding: clamp(20px, 3vw, 40px); }
.media--figure figcaption { margin-top: 20px; }

/* building level figure (redrawn, schematic, not to scale) */
.levels { display: grid; gap: 0; max-width: 28rem; margin-inline: auto; }
.lv { border: 1px solid var(--line); border-top-width: 0; padding: 12px 16px; font-size: 0.875rem; background: var(--ground); }
.lv:first-child { border-top-width: 1px; }
.lv--tower { margin-inline-end: 24%; }
.lv--ground { border-style: dashed; background: transparent; color: var(--ink-soft); }

/* terrace plan (SVG) */
.plan { width: 100%; height: auto; max-width: 30rem; margin-inline: auto; }
.plan polygon, .plan rect { stroke: var(--ink); stroke-width: 1.4; fill: none; }
.plan .p-terrace { fill: var(--ground); }
.plan .p-pool { fill: var(--ground-2); }
.plan .p-garden { fill: var(--ground); stroke-dasharray: 5 4; }
.plan .p-bar { fill: var(--ground); }
.plan .p-spa { fill: var(--ground); }
.plan .p-rec { fill: var(--ground-2); }
.plan-text text { font-family: var(--font-body); font-size: 19px; fill: var(--ink); }
.plan-text:lang(ka) text, :lang(ka) .plan-text text { font-size: 17px; }

/* ---------- progress ---------- */
.stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(36px, 5vw, 64px); }
.stage { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 8px; align-content: start; }
.stage-name { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.0625rem, 0.6vw + 0.95rem, 1.375rem); line-height: 1.25; }
:lang(ka) .stage-name { line-height: 1.4; }
.stage-state { color: var(--ink-soft); }
.stage.is-current .stage-state { color: var(--accent); }
.note { margin-top: 28px; font-size: 0.875rem; }

/* ---------- contact (dark) ---------- */
.contact { background: var(--dark); color: var(--on-dark); padding-block: var(--sec); }
.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 48px; }
.contact-intro { grid-column: 1 / 6; }
.contact-intro h2 { font-size: clamp(2.25rem, 3.2vw + 1rem, 4.25rem); line-height: 1.08; }
:lang(ka) .contact-intro h2 { line-height: 1.25; font-size: clamp(2rem, 2.6vw + 1rem, 3.5rem); }
.contact-intro p { margin-top: 24px; color: var(--on-dark-soft); max-width: 24em; }
.form { grid-column: 7 / 13; display: grid; gap: 24px; }
.field { display: grid; gap: 8px; }
.field > span { color: var(--on-dark-soft); }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; background: transparent; color: var(--on-dark); border: 0; border-bottom: 1px solid var(--on-dark-soft); border-radius: 0; padding: 8px 0; font-size: 1rem; }
.field select { appearance: none; background-image: none; cursor: pointer; }
.field select option { color: var(--ink); background: var(--ground); }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus-dark); outline-offset: 4px; }
.field input:user-invalid { border-bottom-color: var(--accent-on-dark); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 8px; }
.form-note { color: var(--on-dark-soft); font-size: 0.875rem; max-width: 24em; }
.form-direct { color: var(--on-dark-soft); font-size: 0.9375rem; }
.form-direct a { color: var(--on-dark); display: inline-block; min-height: 24px; }

/* ---------- footer ---------- */
.foot { background: var(--dark); color: var(--on-dark-soft); padding-bottom: 28px; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 12px; border-top: 1px solid var(--line-dark); padding-top: 24px; }
.foot-arch { grid-column: 1 / 4; }
.foot-note { grid-column: 4 / 11; max-width: 46em; }
.foot-top { grid-column: 11 / 13; justify-self: end; color: var(--on-dark); display: inline-flex; align-items: center; min-height: 32px; }

/* ---------- motion support (MOTION.md). All start states are set by motion.js; without JS everything is visible ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
/* curtain: the hero stays while the page slides over it (pure CSS, works without JS) */
.hero { position: sticky; top: 0; z-index: 0; }
main, .foot { position: relative; z-index: 1; }
main { background: var(--ground); }
.bar-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.frame { overflow: hidden; background: var(--ground-2); }
.frame picture { display: block; }
.frame img { will-change: transform; }
/* palm-frond shadow on the overview (owner's reference, 2026-11-24): pre-blurred images from tools/make_frond.py,
   moved only with transform properties, so the browser never blurs or filters per frame.
   .fr = one frond, sways round a pivot above the top right (rotate) and takes the odd slower gust (transform);
   .lf = a group of its leaflets, fluttering out of phase with the others (rotate + translate).
   Unrelated durations + alternate direction = no loop seam. Text contrast is measured in the browser (>= 4.5:1). */
.sec--overview { --ink-soft: var(--ink-soft-shade); }
main { overflow-x: clip; } /* the frond box reaches the window's right edge; nothing may scroll sideways */
.leaves { position: absolute; top: 0; bottom: 0; right: calc((100% - 100vw) / 2); width: min(62vw, 900px); z-index: -1; pointer-events: none; overflow: hidden; contain: strict;
  -webkit-mask-image: linear-gradient(to bottom, var(--mask-on) 75%, transparent); mask-image: linear-gradient(to bottom, var(--mask-on) 75%, transparent); } /* no hard edge where the section ends */
.fr { position: absolute; inset: -4% -2% -4% -6%; transform-origin: 104% -12%; will-change: transform; }
.lf { position: absolute; inset: 0; background: no-repeat 100% 0 / cover; will-change: transform; }
.fr--a .lf { opacity: 0.24; }
.fr--b .lf { opacity: 0.15; }
.lf--a1 { background-image: url(../img/frond-a1.webp); transform-origin: 82% 18%; animation: lf-flutter 1.9s ease-in-out infinite alternate; }
.lf--a2 { background-image: url(../img/frond-a2.webp); transform-origin: 78% 30%; animation: lf-flutter2 2.3s ease-in-out -0.7s infinite alternate; }
.lf--a3 { background-image: url(../img/frond-a3.webp); transform-origin: 80% 44%; animation: lf-flutter 2.7s ease-in-out -1.5s infinite alternate; }
.lf--b1 { background-image: url(../img/frond-b1.webp); transform-origin: 85% 60%; animation: lf-flutter2 2.9s ease-in-out -0.4s infinite alternate; }
.lf--b2 { background-image: url(../img/frond-b2.webp); transform-origin: 85% 75%; animation: lf-flutter 3.4s ease-in-out -2s infinite alternate; }
.fr--a { animation: fr-sway 5.2s ease-in-out infinite alternate, fr-gust 14s ease-in-out -5s infinite alternate; }
.fr--b { animation: fr-sway2 6.6s ease-in-out -2.2s infinite alternate, fr-gust 17.5s ease-in-out -12s infinite alternate; }
@keyframes fr-sway { 0% { rotate: -1.6deg; } 45% { rotate: 0.5deg; } 65% { rotate: 0.2deg; } 100% { rotate: 1.6deg; } }
@keyframes fr-sway2 { 0% { rotate: 1.2deg; } 50% { rotate: -0.6deg; } 100% { rotate: -1.4deg; } }
@keyframes fr-gust { 0%, 58% { transform: none; } 80% { transform: rotate(-2.2deg) translate(-10px, 4px); } 100% { transform: rotate(-0.8deg) translate(-4px, 2px); } }
@keyframes lf-flutter { 0% { rotate: -0.9deg; translate: 0 0; } 100% { rotate: 0.8deg; translate: -3px 2px; } }
@keyframes lf-flutter2 { 0% { rotate: 0.8deg; translate: -2px 0; } 100% { rotate: -1deg; translate: 2px 3px; } }
.leaves.is-still .fr, .leaves.is-still .lf { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .fr, .lf { animation: none; } }
/* peak: the aerial opens from a framed picture to the full screen */
.peak { position: relative; padding-top: var(--sec); }
.peak-head { margin-bottom: 28px; }
.peak-head .lab { color: var(--ink-soft); font-weight: 400; font-family: var(--font-body); }
.peak-stage { position: relative; height: 100svh; min-height: 520px; overflow: hidden; }
.peak-frame { position: absolute; inset: 0; overflow: hidden; background: var(--ground-2); }
.peak-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.peak-cap { margin-top: 12px; color: var(--ink-soft); }
/* progress track and current-stage bar are drawn with custom properties so they can be animated */
.stages { position: relative; }
.stages::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink-soft); transform: scaleX(var(--track, 1)); transform-origin: 0 50%; }
.stage.is-current { position: relative; border-top: 1px solid var(--line); padding-top: 16px; }
.stage.is-current::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 3px; background: var(--accent); transform: scaleX(var(--bar, 1)); transform-origin: 0 50%; }
/* level figure: the two office floors fill with timber */
.lv { position: relative; isolation: isolate; }
.lv.is-on { background: var(--ground); color: var(--ink); border-color: var(--line); transition: color 0.4s var(--ease); }
.lv.is-on::before { content: ""; position: absolute; inset: -1px; z-index: -1; background: var(--accent); transform: scaleX(var(--fill, 1)); transform-origin: 0 50%; }
.lv.is-on.is-filled, html:not(.js) .lv.is-on { color: var(--on-accent); }
/* split lines: keep descenders and Georgian ascenders inside the mask */
.split-mask { padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* ---------- multi-page additions (2026-11-23) ---------- */
/* pages without a picture hero: the bar is solid from the start, also without JS */
body.is-plain .bar { background: var(--ground); color: var(--ink); border-bottom-color: var(--line); }
body.is-plain .bar::before { opacity: 0; }
.main--plain { padding-top: 52px; }
.phead { padding-top: clamp(72px, 11vw, 160px); padding-bottom: clamp(40px, 6vw, 88px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.phead h1 { grid-column: 1 / 10; font-size: clamp(3rem, 6.4vw, 7rem); line-height: 1.02; letter-spacing: -0.015em; }
:lang(ka) .phead h1 { font-size: clamp(2.5rem, 5vw, 5.5rem); line-height: 1.2; letter-spacing: 0; }
.phead-lead { grid-column: 3 / 10; margin-top: clamp(20px, 2.4vw, 32px); font-size: clamp(1.125rem, 0.6vw + 1rem, 1.5rem); line-height: 1.5; color: var(--ink-soft); max-width: 32em; }
.hero--page { min-height: 86svh; }
.hero--page .hero-copy { padding-bottom: clamp(44px, 8vh, 88px); }
.hero--page h1 { font-size: clamp(3rem, 6.6vw, 6.5rem); }
:lang(ka) .hero--page h1 { font-size: clamp(2.5rem, 5vw, 5rem); }
.sec--first { padding-top: clamp(56px, 8vw, 120px); }
.more { display: inline-flex; align-items: center; min-height: 32px; margin-top: 16px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.3em; }
.more:hover { color: var(--accent); }
.ph { color: var(--ink-soft); text-decoration: underline dashed var(--ink-soft); text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
.cta-line { margin-top: clamp(36px, 4vw, 56px); }
.media--inset { margin-top: clamp(32px, 4vw, 56px); max-width: 44rem; }
.media--stack .levels { max-width: 30rem; }
.media--plan-wide { padding: clamp(16px, 2.4vw, 32px); }
/* apartment floor plan */
.plan--apt { max-width: 56rem; }
.plan--apt .u rect { fill: var(--ground); transition: fill 0.25s var(--ease); }
.plan--apt .u--2 rect { fill: var(--ground-2); }
.plan--apt .u--core rect { fill: var(--hill); }
.plan--apt .u--hall rect { fill: var(--hill); stroke-dasharray: none; }
.plan--apt .p-stair { fill: var(--hill); }
.plan--apt text { font-family: var(--font-body); font-size: 15px; fill: var(--ink); pointer-events: none; }
:lang(ka) .plan--apt text { font-size: 13px; }
.plan--apt .u--1:hover rect, .plan--apt .u--2:hover rect { fill: var(--accent); }
.plan--apt .u--1:hover text, .plan--apt .u--2:hover text { fill: var(--on-accent); }
.key { display: inline-flex; align-items: center; gap: 8px; margin-inline-end: 16px; }
.key::before { content: ""; width: 14px; height: 14px; border: 1px solid var(--ink); }
.key--2::before { background: var(--ground-2); }
.key--1::before { background: var(--ground); }
/* next page */
.nextpage { display: grid; gap: 8px; padding-block: clamp(72px, 10vw, 160px); border-top: 1px solid var(--line); }
.nextpage-lab { color: var(--ink-soft); font-size: 0.8125rem; }
.nextpage-lab:lang(en), :lang(en) .nextpage-lab { font-variant-caps: all-small-caps; letter-spacing: 0.05em; font-size: 0.9rem; }
.nextpage-link { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.5rem, 5.5vw, 5.5rem); line-height: 1.05; text-decoration: none; justify-self: start; }
:lang(ka) .nextpage-link { font-size: clamp(2rem, 4.2vw, 4.25rem); line-height: 1.25; }
.nextpage-link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; text-decoration-color: var(--accent); }
/* home: closing invitation */
.close { padding-block: clamp(96px, 12vw, 176px); }
.close-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 32px; align-items: end; }
.close-grid h2 { grid-column: 1 / 8; font-size: clamp(2.5rem, 4.6vw, 5rem); line-height: 1.05; }
:lang(ka) .close-grid h2 { font-size: clamp(2rem, 3.4vw, 3.75rem); line-height: 1.25; }
.close-side { grid-column: 9 / 13; display: grid; gap: 24px; justify-items: start; }
.close-side p { color: var(--on-dark-soft); }
/* contact page */
.contact--page { padding-block: clamp(64px, 8vw, 128px); }
.contact--page .contact-grid { align-items: start; }
.contact--page .contact-intro { grid-column: 1 / 6; }
.contact--page .form-wrap { grid-column: 7 / 13; }
.lab--dark { color: var(--on-dark-soft); font-family: var(--font-body); font-weight: 400; margin-bottom: 24px; }
.contact--page .spec { border-top-color: var(--line-dark); margin-top: 0; }
.contact--page .spec-row .rule { background: var(--line-dark); }
.contact--page .spec dt { color: var(--on-dark-soft); }
.contact--page .spec dd { color: var(--on-dark); text-align: start; }
.contact--page .spec-row { grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); }
.contact--page .ph { color: var(--on-dark-soft); text-decoration-color: var(--on-dark-soft); }
.err { display: block; min-height: 1.2em; font-style: normal; font-size: 0.875rem; color: var(--accent-on-dark); }
.field input[aria-invalid="true"] { border-bottom-color: var(--accent-on-dark); }
.form-done { display: grid; gap: 20px; justify-items: start; padding-top: 8px; }
.form-done h3 { font-size: clamp(2rem, 2.4vw + 1rem, 3rem); }
.form-done p { color: var(--on-dark-soft); max-width: 30em; }
.btn--ghost-dark { color: var(--on-dark); border-color: var(--on-dark-soft); background: transparent; }
.btn--ghost-dark:hover { background: var(--on-dark); color: var(--ink); }
/* gallery */
.g-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(48px, 7vw, 112px); padding-bottom: clamp(48px, 6vw, 96px); }
.g-item { min-width: 0; }
.g-item--0 { grid-column: 1 / 13; }
.g-item--1 { grid-column: 1 / 8; }
.g-item--2 { grid-column: 9 / 13; align-self: end; }
.g-item--3 { grid-column: 3 / 11; }
.g-item--4 { grid-column: 1 / 6; }
.g-item--5 { grid-column: 7 / 13; align-self: end; }
.g-link { display: block; cursor: zoom-in; }
.g-link .frame { display: block; }
.g-link img { width: 100%; height: auto; }
.g-link:hover + figcaption, .g-link:focus-visible + figcaption { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.3em; }
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; inset: 0; padding: clamp(16px, 3vw, 40px); border: 0; background: var(--backdrop); color: var(--on-dark); }
.lightbox::backdrop { background: var(--backdrop); }
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; }
.lb-fig { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; min-height: 0; }
.lb-img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.lb-cap { color: var(--on-dark-soft); }
.lb-ctrl { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.lb-btn { min-height: 44px; padding: 8px 20px; background: transparent; color: var(--on-dark); border: 1px solid var(--on-dark-soft); cursor: pointer; }
.lb-btn:hover { background: var(--on-dark); color: var(--ink); }
.lb-btn:focus-visible { outline-color: var(--focus-dark); }
/* footer */
.foot { padding-top: clamp(64px, 8vw, 120px); }
.foot-top-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 32px; padding-bottom: clamp(40px, 5vw, 72px); align-items: end; }
.foot-mark { grid-column: 1 / 7; font-family: var(--font-display); font-weight: 300; font-size: clamp(3.5rem, 9vw, 9rem); line-height: 0.95; color: var(--on-dark); letter-spacing: -0.01em; }
:lang(ka) .foot-mark { letter-spacing: 0; font-size: clamp(3rem, 7vw, 7rem); line-height: 1.1; }
.foot-links { grid-column: 8 / 13; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.foot-links a { color: var(--on-dark); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; font-size: 0.9375rem; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.foot-social { grid-column: 1 / 4; }
.foot .ph { color: var(--on-dark-soft); text-decoration-color: var(--on-dark-soft); }
.foot :focus-visible { outline-color: var(--focus-dark); }
/* location: self-built 3D map */
.map-sec { padding-top: clamp(24px, 3vw, 40px); }
.map-head { margin-bottom: 16px; }
.map-head .lab { color: var(--ink-soft); font-family: var(--font-body); font-weight: 400; }
.map3d { --tilt: 56deg; --rz: -18deg; --size: min(86vw, 980px, 118svh); position: relative; height: clamp(440px, 82svh, 900px); perspective: 1600px; perspective-origin: 50% 30%; overflow: clip; background: var(--ground); border-block: 1px solid var(--line); cursor: grab; touch-action: pan-y; outline-offset: -4px; }
.map3d.is-dragging { cursor: grabbing; }
.m-plane { position: absolute; left: 50%; top: 52%; width: var(--size); height: var(--size); margin-left: calc(var(--size) / -2); margin-top: calc(var(--size) / -2); transform-style: preserve-3d; transform: rotateX(var(--tilt)) rotateZ(var(--rz)); }
.m-base { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.m-ground { fill: var(--ground-2); }
.m-grid line { stroke: var(--line-faint); stroke-width: 1; vector-effect: non-scaling-stroke; }
.m-bank { fill: none; stroke: var(--river-bank); stroke-linecap: round; stroke-linejoin: round; }
.m-river { fill: none; stroke: var(--river); stroke-linecap: round; stroke-linejoin: round; }
.m-dot { fill: var(--ink); }
.m-plotfoot { fill: var(--accent); }
.m-layer { position: absolute; inset: 0; transform: translateZ(calc(var(--z) * 6px)); pointer-events: none; }
.m-layer svg { width: 100%; height: 100%; overflow: hidden; }
.m-layer ellipse { fill: var(--hill); stroke: var(--hill-edge); stroke-width: 1; vector-effect: non-scaling-stroke; }
.m-tower { position: absolute; width: 0; height: 0; transform-style: preserve-3d; }
.t-box { --tw: calc(var(--size) * 0.024); --td: calc(var(--size) * 0.012); --th: calc(var(--size) * 0.07); position: absolute; transform-style: preserve-3d; transform: rotateZ(-28deg); }
.t-face { position: absolute; left: calc(var(--tw) / -2); top: calc(var(--td) / -2); background: var(--ink); backface-visibility: visible; }
.t-front, .t-back { width: var(--tw); height: var(--th); }
.t-front { transform-origin: 0 0; transform: translateY(var(--td)) rotateX(90deg); }
.t-back { transform-origin: 0 0; transform: rotateX(90deg); }
.t-left, .t-right { width: var(--td); height: var(--th); transform-origin: 0 0; }
.t-left { transform: rotateZ(90deg) rotateX(90deg); background: var(--ink-soft); }
.t-right { transform: translateX(var(--tw)) rotateZ(90deg) rotateX(90deg); background: var(--ink-soft); }
.t-top { width: var(--tw); height: var(--td); transform: translateZ(var(--th)); background: var(--on-dark-soft); }
.t-front::after, .t-back::after { content: ""; position: absolute; inset: 8% 10%; border-left: 1px solid var(--on-dark-soft); border-right: 1px solid var(--on-dark-soft); }
.m-pin { position: absolute; width: 0; height: 0; transform-style: preserve-3d; }
.m-bill { position: absolute; left: 0; bottom: 0; transform-origin: 0 100%; transform: rotateZ(calc(var(--rz) * -1)) rotateX(calc(var(--tilt) * -1)); display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; }
.m-stick { width: 1px; height: 36px; background: var(--ink); order: 2; }
.m-stick--tall { height: calc(var(--size) * 0.12); background: var(--accent); }
.m-label { order: 1; transform: translateX(-50%); white-space: nowrap; background: var(--ground); color: var(--ink); padding: 4px 12px; font-size: 0.8125rem; border: 1px solid var(--line); }
.m-pin--l .m-label { transform: translateX(-100%); }
.m-pin--r .m-label { transform: translateX(0); }
.m-label--plot { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-family: var(--font-display); font-size: 1rem; }
.m-label--river { background: transparent; border: 0; color: var(--ink-soft); font-family: var(--font-display); font-size: 1rem; }
.map-foot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 16px; padding-top: 20px; align-items: start; }
.map-hint { grid-column: 1 / 6; color: var(--ink-soft); font-size: 0.875rem; }
.map-ctrl { grid-column: 6 / 13; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.m-btn { min-height: 40px; padding: 8px 16px; background: transparent; color: var(--ink); border: 1px solid var(--ink-soft); cursor: pointer; font-size: 0.875rem; }
.m-btn:hover, .m-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }
.map-note { grid-column: 1 / -1; color: var(--ink-soft); font-size: 0.8125rem; }
html:not(.js) .map-ctrl, html:not(.js) .map-hint, html:not(.js) #enquiry { display: none; }


/* ---------- responsive ---------- */
@media (max-width: 62rem) {
  .rail::before { display: none; }
  .sec { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .sec > .lab, .sec > .sec-body { grid-column: 1 / -1; padding-inline-start: 0; }
  .sec > .lab { padding-top: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .row, .row--a, .row--b { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .row--a .media, .row--b .media, .row--a .row-text, .row--b .row-text { grid-column: 1 / -1; order: 0; }
  .row-text { order: 1; }
  .stages { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stage { padding-block: 16px; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .contact-intro, .form { grid-column: 1 / -1; }
  .foot-arch, .foot-note, .foot-top { grid-column: 1 / -1; justify-self: start; }
  .stages::before { display: none; }
  .peak-stage { height: 72svh; min-height: 360px; }
}
@media (max-width: 40rem) {
  .plan-text text { font-size: 24px; }
  :lang(ka) .plan-text text { font-size: 21px; }
  .spec-row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 0; }
  .spec dd { text-align: start; }
  .stage { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .bar-end { gap: 12px; }
  .bar .bar-talk { padding-inline: 12px; }
  .hero-cap { left: var(--gutter); right: auto; bottom: 10px; }
  .hero-copy { padding-bottom: 56px; }
}
@media (min-width: 120rem) { :root { --container: 1440px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 62rem) {
  .phead h1, .phead-lead { grid-column: 1 / -1; }
  .bar-menu-panel { grid-template-columns: minmax(0, 1fr); }
  .menu-links { grid-template-columns: minmax(0, 1fr); }
  .close-grid h2, .close-side { grid-column: 1 / -1; }
  .contact--page .contact-intro, .contact--page .form-wrap { grid-column: 1 / -1; }
  .g-item--0, .g-item--1, .g-item--2, .g-item--3, .g-item--4, .g-item--5 { grid-column: 1 / -1; }
  .foot-mark, .foot-links, .foot-social { grid-column: 1 / -1; }
  .map-hint, .map-ctrl { grid-column: 1 / -1; justify-content: flex-start; }
  .map3d { --size: min(118vw, 760px); height: clamp(420px, 70svh, 640px); }
}
@media (max-width: 40rem) {
  .wordmark { font-size: 1.125rem; }
  .bar { gap: 8px; }
  .langs a[aria-current="true"] { display: none; }
  .map3d { --size: 94vw; --tilt: 50deg; --rz: -6deg; height: 64svh; min-height: 400px; }
  .bar .bar-talk { display: none; }
  .m-pin--l .m-label { transform: translateX(-12%); }
  .plan--apt .u--1 text, .plan--apt .u--2 text { display: none; }
  .m-pin--oldtown .m-stick { height: 22px !important; }
  .m-pin--abanotubani .m-stick { height: 56px !important; }
  .m-pin--metekhi .m-stick { height: 92px !important; }
  .m-pin--narikala .m-stick { height: 128px !important; }
  .bar-end .langs a { white-space: nowrap; }
  .m-label { font-size: 0.75rem; padding: 4px 8px; }
  .m-stick { height: 24px; }
}
/* palm shadow on narrow screens: one frond in the top-right corner, behind the heading */
@media (max-width: 40rem) { .leaves { bottom: auto; height: 460px; width: 80vw; } .fr--b { display: none; } }
/* top bar: below 66rem the clock and the current-language link give way so the talk button never meets the wordmark (measured, KA is the longest) */
@media (max-width: 66rem) { .clock { display: none; } .langs a[aria-current="true"] { display: none; } }
