/* ============================================================
   Orangerie Hills — design system
   Palette: charcoal / cream / muted gold
   Type: Cormorant Garamond (display) + Montserrat (body)
   Spacing scale: 8px base — tokens only, no magic numbers
   ============================================================ */

:root {
  /* color */
  --ink: #1c1b19;
  --ink-soft: #3d3b36;
  --paper: #faf8f3;
  --paper-alt: #f1ede4;
  /* charcoal with just a hint of blue — the tint should read as depth, not colour */
  --dark: #16181e;
  --dark-2: #1d2029;
  --navy-deep: #11141b;
  --on-dark: rgba(250, 248, 243, 0.94);
  --on-dark-soft: rgba(250, 248, 243, 0.74);
  --gold: #b8934e;
  --gold-soft: #d3b87e;
  --line: rgba(28, 27, 25, 0.14);
  --line-dark: rgba(250, 248, 243, 0.16);

  /* spacing scale */
  --s-xs: 0.25rem; /*  4 — badge/control insets */
  --s-1: 0.5rem;   /*  8 */
  --s-2: 1rem;     /* 16 */
  --s-3: 1.5rem;   /* 24 */
  --s-4: 2rem;     /* 32 */
  --s-5: 3rem;     /* 48 */
  --s-6: 4.5rem;   /* 72 */
  --section-pad: clamp(4.5rem, 9vw, 8rem);
  --gap-split: clamp(2.5rem, 6vw, 5.5rem);

  /* type */
  --font-display: "Cormorant Garamond", "Noto Serif Georgian", Georgia, serif;
  --font-body: "Montserrat", "Noto Sans Georgian", "Helvetica Neue", Arial, sans-serif;

  /* type scale — every font-size in this file comes from here.
     Never introduce a loose rem value; extend the scale instead. */
  --fs-nano: 0.72rem;    /* nav links, buttons, badges */
  --fs-micro: 0.78rem;   /* uppercase labels: eyebrow, stat, field, contact */
  --fs-small: 0.95rem;   /* secondary text: footer, notes, social */
  --text-body: clamp(1.02rem, 1.15vw, 1.15rem);  /* default reading size */
  --fs-lead: 1.15rem;    /* contact links */
  --fs-title-s: 1.35rem; /* small serif accents */
  --fs-title-m: 1.6rem;  /* pull-quotes */
  --fs-title-l: 1.8rem;  /* card & form titles */
  --fs-numeral: clamp(1.9rem, 2.6vw, 2.4rem);    /* big serif figures */
  --text-display: clamp(2.4rem, 4.6vw, 3.9rem);
  --text-hero: clamp(3rem, 7.5vw, 6rem);

  --container: 75rem; /* 1200 */
  --radius: 2px;
}

html[lang="ka"] {
  --font-display: "Noto Serif Georgian", "Cormorant Garamond", Georgia, serif;
  --font-body: "Noto Sans Georgian", "Montserrat", Arial, sans-serif;
  --text-hero: clamp(2.4rem, 6vw, 4.6rem);
  --text-display: clamp(2rem, 3.8vw, 3.2rem);
}
/* Georgian has no true italic — use weight for the accent word instead of a synthetic slant */
html[lang="ka"] .display em { font-style: normal; font-weight: 600; }
/* longer RU/KA nav labels: tighter tracking only — size stays on the scale */
html[lang="ka"] .main-nav a, html[lang="ru"] .main-nav a { letter-spacing: 0.1em; }
html[lang="ka"] .btn-header, html[lang="ru"] .btn-header { letter-spacing: 0.14em; }

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 500;   /* lightest weight used anywhere — nothing lighter than this */
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; }

/* ---------- shared primitives ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.section { padding-block: var(--section-pad); }
.section-alt { background: var(--paper-alt); }
.section-dark {
  background: linear-gradient(165deg, var(--dark) 0%, var(--navy-deep) 100%);
  color: var(--on-dark);
}
.section-dark .body-text { color: var(--on-dark-soft); }

.eyebrow {
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-2);   /* eyebrow sits close to its heading */
}

.display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.01em;
  margin-bottom: var(--s-4);
}
/* final word of every section heading — gold italic */
.display em {
  font-style: italic;
  color: var(--gold);
}
.section-dark .display em { color: var(--gold-soft); }

.body-text {
  max-width: 36rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: var(--s-3);
}
.section-dark .body-text { max-width: 30rem; }

.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-title-m);
  line-height: 1.4;
  color: var(--gold);
  margin-top: var(--s-4);
}

/* buttons — one height, one letter-spacing everywhere */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 var(--s-4);
  font-size: var(--fs-nano);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.btn-gold {
  background: var(--gold);
  color: #fff;
  border: 1px solid var(--gold);
}
.btn-gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--dark); }
.btn-line {
  background: transparent;
  color: var(--on-dark);
  border: 1px solid var(--line-dark);
}
.btn-line:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-block: var(--s-2);
  transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}
.site-header .container { max-width: none; } /* header uses full width — long RU/KA nav fits longer */
.site-header.is-solid {
  background: rgba(20, 23, 30, 0.94);
  backdrop-filter: blur(12px);
  padding-block: var(--s-1);
  box-shadow: 0 1px 0 var(--line-dark);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  overflow: hidden; /* natural widths stay measurable; JS collapses to burger before clipping shows */
}
/* items never shrink below content — overflow is detected by JS, overlap is impossible */
.brand, .main-nav, .header-right { flex-shrink: 0; }
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  text-decoration: none;
  color: var(--on-dark);
}
.brand-logo { width: 2.75rem; height: 2.75rem; border-radius: var(--radius); }
.brand-name {
  font-family: var(--font-display);
  font-size: var(--fs-title-s);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.brand-name em { font-style: normal; color: var(--gold-soft); }

.main-nav {
  display: flex;
  gap: var(--s-3);
  margin-inline: auto;
}
.main-nav a {
  font-size: var(--fs-nano);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--on-dark-soft);
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--gold-soft); }

.header-right { display: flex; align-items: center; gap: var(--s-3); margin-left: auto; }
.lang-switch { display: flex; gap: 2px; }
.lang-link {
  padding: var(--s-xs) var(--s-1);
  font-size: var(--fs-nano);
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--on-dark-soft);
  border-bottom: 1px solid transparent;
}
.lang-link.is-active { color: var(--gold-soft); border-color: var(--gold); }
.btn-header { min-height: 2.6rem; padding-inline: var(--s-3); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: var(--s-xs);
  background: none;
  border: 0;
  padding: var(--s-1);
  cursor: pointer;
}
.nav-toggle span { width: 22px; height: 1px; background: var(--on-dark); transition: 0.25s; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden; /* clips the drifting background */
  color: var(--on-dark);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* barely-perceptible drift — the render breathes instead of sitting dead still */
  animation: hero-drift 28s ease-in-out infinite alternate;
}
@keyframes hero-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.09) translate3d(-1.2%, -1%, 0); }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* neutral black, only where the text needs it — keeps the render's own colour */
    linear-gradient(100deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.34) 40%, rgba(0, 0, 0, 0.06) 72%, transparent 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, transparent 32%, rgba(0, 0, 0, 0.34) 72%, rgba(0, 0, 0, 0.62) 100%);
}
.hero-content .eyebrow { color: var(--gold-soft); }
.hero-content { text-shadow: 0 2px 20px rgba(12, 13, 16, 0.75); }
.hero-content {
  position: relative;
  z-index: 2; /* above scrim and blurred veil */
  width: 100%;
  padding-block: var(--s-6) clamp(7.5rem, 15vh, 10rem);
}
.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0.02em;
  margin-bottom: var(--s-3);
}
.hero-title em { font-style: normal; color: var(--gold-soft); }
.hero-sub {
  max-width: 30rem;
  font-weight: 500;
  color: var(--on-dark-soft);
  margin-bottom: var(--s-5);
}

/* ---------- atmosphere band ----------
   A full-bleed image with a single line over it: a breath between chapters. */
.band {
  position: relative;
  min-height: clamp(22rem, 62vh, 34rem);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.band-media {
  position: absolute;
  inset: -10% 0;          /* extra height so the parallax shift never shows an edge */
  z-index: -2;
  will-change: transform;
}
.band-media img { width: 100%; height: 100%; object-fit: cover; }
.band-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.28) 50%, rgba(0, 0, 0, 0.48) 100%);
}
.band-line {
  max-width: 46rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.6rem, 3.4vw, 2.9rem);
  line-height: 1.3;
  text-align: center;
  color: var(--paper);
  text-shadow: 0 2px 24px rgba(12, 13, 16, 0.6);
}

/* ---------- hero scroll cue ---------- */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  color: var(--on-dark-soft);
  font-size: var(--fs-nano);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 2.4rem;
  background: linear-gradient(var(--gold-soft), transparent);
  animation: cue-drip 2.2s ease-in-out infinite;
}
@keyframes cue-drip {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } }

/* ---------- split layout (used by 4 sections — identical rhythm) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-split);
  align-items: center;
}
.split-rev .split-copy { order: 2; }
.split-rev .split-media { order: 1; }
.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.split-media.tall { aspect-ratio: 4 / 5; }
.split-media:not(.tall) { aspect-ratio: 5 / 4; }
.split-media { overflow: hidden; }

/* ---------- stats — same component in light & dark ---------- */
/* each .stat carries its own rule, so the row needs no border of its own */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
  margin-top: var(--s-6);
}
.stat-row-price { grid-template-columns: repeat(3, 1fr); }
/* label first on a shared top line, value beneath — a wrapping value can never
   open a gap, and each pair stays tightly coupled */
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--line);
}
.section-dark .stat { border-color: var(--line-dark); }
.stat-value {
  font-family: var(--font-display);
  font-size: var(--fs-numeral);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
}
.section-dark .stat-value { color: var(--gold-soft); }
.stat-label {
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.section-dark .stat-label { color: var(--on-dark-soft); }

.media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  margin-top: var(--s-5);
}
.media-pair img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- collection slider ----------
   Mobile: native horizontal swipe.
   Desktop (JS adds .is-pinned): the section pins while vertical scrolling drives
   the villas sideways, then the page continues normally past the last one. */
.villa-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.villa-track::-webkit-scrollbar { display: none; }
.villa-slide {
  /* next slide peeks in at the edge — makes it obvious there is more to scroll */
  flex: 0 0 86%;
  margin-right: var(--s-3);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.villa-slide:last-child { margin-right: 0; }
.villa-media { overflow: hidden; border-radius: var(--radius); }
.villa-media img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

/* pinned mode */
.villa-pin.is-pinned {
  /* one viewport to read each villa, plus one to hold the last */
  height: calc(var(--slides) * 82vh);
  position: relative;
}
.villa-pin.is-pinned .villa-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-3);
  overflow: hidden;
  padding-block: clamp(4.5rem, 9vh, 6rem) var(--s-4);
}
.villa-pin.is-pinned .villa-viewport { flex: 1; min-height: 0; overflow: hidden; }
.villa-pin.is-pinned .villa-track {
  height: 100%;
  overflow: visible;
  scroll-snap-type: none;
  will-change: transform;
}
.villa-pin.is-pinned .villa-slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.villa-pin.is-pinned .villa-media { flex: 1; min-height: 0; }
.villa-pin.is-pinned .villa-media img { height: 100%; aspect-ratio: auto; }
.villa-pin.is-pinned .villa-caption { flex: 0 0 auto; padding-top: var(--s-3); }
.villa-caption {
  max-width: 40rem;
  padding-top: var(--s-4);
}
.villa-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.villa-num {
  font-family: var(--font-display);
  font-size: var(--fs-title-s);
  color: var(--gold);
  letter-spacing: 0.12em;
}
.villa-sold {
  font-size: var(--fs-nano);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink-soft);
  padding: var(--s-xs) var(--s-1);
  border-radius: var(--radius);
}
.villa-name {
  font-family: var(--font-display);
  font-size: var(--fs-title-l);
  font-weight: 500;
  margin-bottom: var(--s-2);
}
.villa-body { font-size: var(--text-body); font-weight: 500; color: var(--ink-soft); }
.villa-slide.is-sold .villa-media img { filter: grayscale(0.5); opacity: 0.85; }

.villa-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-3);
}
.villa-dots { display: flex; gap: var(--s-2); }
.villa-dot {
  width: 2rem;
  height: 2px;
  padding: 0;
  border: 0;
  background: var(--line);
  cursor: pointer;
  transition: background 0.25s;
}
.villa-dot.is-active { background: var(--gold); }
.villa-arrows { display: flex; gap: var(--s-1); }
.villa-arrow {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  font-size: var(--fs-title-m);
  line-height: 1;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.villa-arrow:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- gallery ---------- */
.gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}
.gallery-head .display { margin-bottom: 0; }
.gallery-hint {
  font-size: var(--fs-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: var(--s-1);
}
.gallery-strip {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
  padding-bottom: var(--s-2);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}
.gal-item {
  flex: 0 0 auto;
  height: clamp(16rem, 40vh, 26rem);
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  scroll-snap-align: start;
}
.gal-item img {
  height: 100%;
  width: auto;
  border-radius: var(--radius);
  transition: opacity 0.25s;
}
.gal-item:hover img { opacity: 0.85; }

/* ---------- map ---------- */
.map-embed {
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- facts (why batumi) — editorial rows, no orphan cells ---------- */
.fact-list {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
/* number in its own column; title and body stack beside it. Cross-column baseline
   matching is impossible with three different type sizes, so nothing is baseline-
   aligned — the number and the title share one top line, which holds in every
   language and at every width. */
.fact {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  align-items: start;
  column-gap: var(--s-3);
  row-gap: var(--s-1);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.fact-num {
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: var(--fs-numeral);
  font-weight: 500;
  line-height: 1.2;
  color: var(--gold);
}
.fact-title {
  font-family: var(--font-display);
  font-size: var(--fs-title-l);
  font-weight: 500;
  line-height: 1.2;
}
.fact-body {
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 44rem;
}

/* same structure on mobile — only the scale tightens */
@media (max-width: 48rem) {
  .fact {
    grid-template-columns: 3rem 1fr;
    column-gap: var(--s-2);
    padding-block: var(--s-3);
  }
}

/* ---------- contact ---------- */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-top: var(--s-5);
}
.contact-item { display: flex; flex-direction: column; gap: var(--s-xs); }
.contact-label {
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.contact-item a {
  color: var(--on-dark);
  text-decoration: none;
  font-size: var(--fs-lead);
}
.contact-item a:hover { color: var(--gold-soft); }
.social-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.social-row a { font-size: var(--fs-small); border-bottom: 1px solid var(--line-dark); padding-bottom: 2px; }

.lead-form {
  background: var(--dark-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  align-self: start;
}
.form-title {
  font-family: var(--font-display);
  font-size: var(--fs-title-l);
  font-weight: 500;
  margin-bottom: var(--s-1);
}
.field { display: flex; flex-direction: column; gap: var(--s-1); }
.field span {
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}
.field input,
.field select {
  min-height: 3rem;
  padding: 0 var(--s-2);
  font: inherit;
  font-size: var(--text-body);
  color: var(--on-dark);
  background: rgba(250, 248, 243, 0.05);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus,
.field select:focus { border-color: var(--gold); }
.field select option { color: var(--ink); }
.form-note { font-size: var(--fs-small); color: var(--gold-soft); }
.form-note a { color: var(--gold-soft); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--dark);
  color: var(--on-dark-soft);
  border-top: 1px solid var(--line-dark);
  padding-block: var(--s-5) var(--s-4);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-3);
  border-bottom: 1px solid var(--line-dark);
}
.footer-addr { font-size: var(--fs-small); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: var(--fs-micro);
}
.footer-disc { max-width: 34rem; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(13, 16, 22, 0.96);
}
.lightbox.is-open { display: flex; }
.lb-img { max-width: min(92vw, 70rem); max-height: 88vh; border-radius: var(--radius); }
.lb-close, .lb-nav {
  position: absolute;
  background: none;
  border: 0;
  color: var(--on-dark);
  font-size: var(--fs-numeral);
  line-height: 1;
  cursor: pointer;
  padding: var(--s-2);
  opacity: 0.75;
  transition: opacity 0.2s;
}
.lb-close:hover, .lb-nav:hover { opacity: 1; }
.lb-close { top: var(--s-2); right: var(--s-3); }
.lb-prev { left: var(--s-2); top: 50%; transform: translateY(-50%); }
.lb-next { right: var(--s-2); top: 50%; transform: translateY(-50%); }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  /* --d is set per element by JS so siblings enter in sequence, not all at once */
  transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) var(--d, 0ms),
              transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
  .band-media { transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- compact header (applied by JS whenever the inline nav doesn't fit) ---------- */
.site-header.is-compact .main-nav { display: none; }
.site-header.is-compact .btn-header { display: none; }
.site-header.is-compact .nav-toggle { display: flex; }
.site-header.is-compact.nav-open { background: var(--dark); }
.site-header.is-compact.nav-open .main-nav {
  display: flex;
  position: absolute; /* anchored to the header itself — no gap at any header height */
  inset: 100% 0 auto;
  flex-direction: column;
  gap: 0;
  background: var(--dark);
  padding: var(--s-2) clamp(1.25rem, 5vw, 3rem) var(--s-4);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.4);
}
.site-header.is-compact.nav-open .main-nav a {
  padding-block: var(--s-2);
  border-bottom: 1px solid var(--line-dark);
  font-size: var(--fs-micro);
}

@media (max-width: 56rem) {
  .split { grid-template-columns: 1fr; gap: var(--s-5); }
  .split-rev .split-copy { order: 1; }
  .split-rev .split-media { order: 2; }
  .split-media.tall { aspect-ratio: 4 / 3; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-row-price { grid-template-columns: 1fr 1fr; }
  .stat-row-price .stat:first-child { grid-column: 1 / -1; }
  .media-pair { grid-template-columns: 1fr; }
  .gallery-head { flex-direction: column; align-items: flex-start; gap: var(--s-2); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .villa-media img { aspect-ratio: 16 / 10; }
}

/* small phones: stacked full-width CTAs, wrappable labels, no input zoom on iOS */
@media (max-width: 34rem) {
  .header-inner { gap: var(--s-2); }
  .brand { gap: var(--s-1); }
  .brand-logo { width: 2.1rem; height: 2.1rem; }
  .brand-name { font-size: var(--fs-lead); }
  .lang-link { padding: var(--s-xs); }
  .header-right { gap: var(--s-1); }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn { white-space: normal; text-align: center; padding-inline: var(--s-3); }
  .btn-header { white-space: nowrap; }
  .field input, .field select { font-size: 16px; }
  .villa-controls { flex-direction: column-reverse; align-items: stretch; }
  .villa-arrows { justify-content: space-between; }
  .villa-dots { justify-content: center; }
  .hero-content { padding-bottom: var(--s-5); }
  .scroll-cue { display: none; }
}
