/* =========================================================
   Berce Hotel İstanbul
   Palette: the plum ground of the oval sign by the door, and the
   sky blue of the roof terrace and of the painted iron banister
   at reception. Everything else is white and quiet.
   Type: Newsreader (display optical size) for headings and the
   italic "Berce" logotype; Schibsted Grotesk for reading and UI.
   The one bold element: the key board, where every room and
   apartment is a hotel key tag hanging from a rail.
   ========================================================= */

:root {
  --plum: #3A1F3D;
  --plum-2: #4B2A4F;
  --plum-3: #2B1530;
  --sky: #A9CFEA;
  --sky-2: #C3DFF2;
  --sky-pale: #EDF4F9;
  --surface: #FFFFFF;
  --ink: #2A2230;
  --muted: #6A6070;
  --line: #E2DEE4;

  --on-dark: #F4EEF4;
  --on-dark-muted: #C7B8CA;
  --line-dark: rgba(244, 238, 244, .18);

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --edge: clamp(16px, 3.2vw, 48px);
  --section: clamp(80px, 9vw, 136px);
  --header-h: 76px;
  --radius: 3px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
button, select { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
p, blockquote { margin: 0; }
dl, dd { margin: 0; }
address { font-style: normal; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
.site-header :focus-visible,
.hero :focus-visible,
.keys :focus-visible,
.closing :focus-visible,
.site-footer :focus-visible,
.sticky-book :focus-visible,
.mobile-menu :focus-visible,
.lightbox :focus-visible { outline-color: var(--sky); }
.hero .popover :focus-visible { outline-color: var(--plum); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--sky); color: var(--plum); padding: 10px 16px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }

/* ---------- Type ---------- */
.h2 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 440;
  font-size: clamp(2.1rem, 1.35rem + 2.3vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -.012em;
  color: var(--plum);
  margin: 0;
  text-wrap: balance;
}
.h2--light { color: #fff; }

.lead {
  font-size: clamp(1.125rem, 1.05rem + .3vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink);
}

/* ---------- Buttons & links ---------- */
.btn {
  --btn-bg: var(--plum);
  --btn-fg: #fff;
  --btn-bd: var(--btn-bg);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--sans);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn--plum:hover { --btn-bg: var(--plum-2); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: .875rem; }
.btn--lg { min-height: 56px; padding: 14px 30px; font-size: 1rem; }
.btn--sky { --btn-bg: var(--sky); --btn-fg: var(--plum); }
.btn--sky:hover { --btn-bg: var(--sky-2); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--plum); --btn-bd: var(--plum); }
.btn--ghost:hover { --btn-bg: var(--plum); --btn-fg: #fff; }

.text-link {
  color: var(--plum);
  font-weight: 550;
  text-decoration: underline;
  text-decoration-color: rgba(58, 31, 61, .35);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.text-link:hover { text-decoration-color: currentColor; }
.text-link--light { color: var(--on-dark); text-decoration-color: rgba(169, 207, 234, .6); }
.text-link--light:hover { color: #fff; text-decoration-color: var(--sky); }

.link-btn {
  background: none; border: 0; padding: 8px 4px; cursor: pointer;
  color: var(--muted); font-size: .9375rem;
  text-decoration: underline; text-underline-offset: 4px;
}
.link-btn:hover { color: var(--plum); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius);
  color: var(--plum); cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), opacity .2s;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--sky-pale); }
.icon-btn:disabled { opacity: .3; cursor: default; background: transparent; }
.icon-btn--round { border-radius: 50%; border-color: var(--line); }

/* ---------- Header ---------- */
/* Transparent over the photo, plum once the page moves */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--header-h);
  color: #fff;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled,
.site-header.is-menu { background: var(--plum); box-shadow: 0 1px 0 var(--line-dark); }
.site-header__inner {
  height: 100%;
  padding-inline: var(--edge);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: #fff; white-space: nowrap; }
.brand__name {
  font-family: var(--serif); font-style: italic; font-weight: 480;
  font-size: 2rem; line-height: 1; letter-spacing: -.01em;
}
.brand__sub { font-size: .8125rem; font-weight: 500; letter-spacing: .01em; color: rgba(255, 255, 255, .78); }

.nav__list { display: flex; gap: clamp(18px, 2.2vw, 34px); }
.nav__list a {
  text-decoration: none; color: #fff;
  font-size: .9375rem; font-weight: 500;
  padding-block: 8px;
  background: linear-gradient(var(--sky), var(--sky)) left bottom / 0 1px no-repeat;
  transition: background-size .3s var(--ease);
}
.nav__list a:hover { background-size: 100% 1px; }

.site-header__actions { display: flex; align-items: center; gap: 14px; }

.lang { display: flex; align-items: center; }
.lang__btn {
  background: none; border: 0; cursor: pointer;
  padding: 6px 7px; font-size: .8125rem; font-weight: 600; letter-spacing: .04em;
  color: rgba(255, 255, 255, .62);
}
.lang__btn + .lang__btn { border-left: 1px solid rgba(255, 255, 255, .28); }
.lang__btn.is-active { color: #fff; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 11px; right: 11px; height: 1.5px; background: #fff;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 55;
  background: var(--plum);
  color: var(--on-dark);
  padding-block: 16px 40px;
  overflow-y: auto;
}
.mobile-menu__list li { border-bottom: 1px solid var(--line-dark); }
.mobile-menu__list a {
  display: block; padding: 16px 0;
  font-family: var(--serif); font-weight: 420; font-size: 1.75rem; color: #fff; text-decoration: none;
}
.mobile-menu__foot { display: grid; gap: 10px; margin-top: 32px; color: var(--on-dark-muted); }
.mobile-menu__foot a { text-decoration: none; }

/* ---------- Hero ---------- */
/* Placeholder photo: the façade at dusk, with no sky in frame. The headline
   and the search are anchored to the left edge, where the evening veil is
   deepest; the lit sign and doorway stay clear on the right.
   When the final header photo arrives (sky on the left), lower --hero-veil
   (to about .3) and tune --hero-pos / --hero-copy-* so the headline sits
   in the sky. */
.hero {
  --hero-pos: 50% 46%;
  --hero-copy-top: clamp(40px, 9vh, 120px);
  --hero-copy-x: 0px;
  --hero-copy-w: 40rem;
  --hero-veil: .8;

  position: relative;
  min-height: min(100svh, 1100px);
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--plum-3);
  color: #fff;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--hero-pos);
  animation: lamps 2.6s var(--ease) .1s both;
}
/* The one automatic movement: the street lights come up once */
@keyframes lamps {
  from { filter: brightness(.58) saturate(.8); }
  to { filter: none; }
}
.hero__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(31, 14, 33, .5) 0, rgba(31, 14, 33, 0) 16%),
    linear-gradient(90deg, rgb(31 14 33 / var(--hero-veil)) 0%, rgb(31 14 33 / calc(var(--hero-veil) * .72)) 28%, rgb(31 14 33 / 0) 58%),
    linear-gradient(0deg, rgba(31, 14, 33, .4) 0, rgba(31, 14, 33, 0) 22%);
}

.hero__inner {
  position: relative; z-index: 2;
  padding: calc(var(--header-h) + var(--hero-copy-top)) var(--edge) 48px;
}
.hero__copy {
  max-width: var(--hero-copy-w);
  margin-left: var(--hero-copy-x);
  display: grid; gap: 22px;
}
.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 420;
  font-size: clamp(3rem, 1.5rem + 4.4vw, 6.4rem);
  line-height: .96;
  letter-spacing: -.022em;
  text-wrap: balance;
  text-shadow: 0 2px 28px rgba(25, 10, 27, .35);
}
.hero__lead {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 14px rgba(25, 10, 27, .45);
}

/* The search sits on the bottom edge of the photo, like a doorstep */
.hero__booking {
  position: relative; z-index: 4;
  padding-inline: var(--edge);
}

/* ---------- Booking ---------- */
.booking {
  position: relative;
  max-width: 1180px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.05fr 1.25fr auto;
  background: var(--plum);
  color: var(--on-dark);
  border-radius: 14px 14px 0 0;
}
.booking__field {
  position: relative;
  display: grid; align-content: center; gap: 2px;
  text-align: left;
  padding: 18px 22px;
  min-height: 104px;
  background: none; border: 0;
  color: var(--on-dark);
  cursor: pointer;
  transition: background-color .2s var(--ease);
}
.booking__field + .booking__field,
.booking__submit { border-left: 1px solid var(--line-dark); }
.booking__field:first-child { border-top-left-radius: 14px; }
.booking__field:hover, .booking__field[aria-expanded="true"] { background: rgba(244, 238, 244, .06); }
.booking__label { font-size: .8125rem; font-weight: 500; color: var(--on-dark-muted); }
.booking__value {
  font-family: var(--serif); font-weight: 440; font-size: 1.45rem; line-height: 1.25; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.booking__value.is-empty { color: var(--on-dark-muted); }
.booking__sub { font-size: .8125rem; color: var(--on-dark-muted); min-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking__sub.is-warn { color: var(--sky); }

.booking__field--select { cursor: pointer; }
.booking__select {
  appearance: none; -webkit-appearance: none;
  width: 100%;
  margin: 0; padding: 0 26px 0 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C7B8CA' stroke-width='1.6'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 0 center / 18px no-repeat;
  border: 0; border-radius: 0;
  font-family: var(--serif); font-weight: 440; font-size: 1.45rem; line-height: 1.25; color: #fff;
  cursor: pointer;
  text-overflow: ellipsis;
}
.booking__select:focus { outline: none; }
.booking__field--select:focus-within { outline: 2px solid var(--sky); outline-offset: -4px; }
.booking__select option { color: var(--ink); background: #fff; font-family: var(--sans); font-size: 1rem; }

.booking__submit { display: grid; align-content: center; justify-items: center; gap: 8px; padding: 16px 20px; }
.booking__note { font-size: .75rem; line-height: 1.45; color: var(--on-dark-muted); text-align: center; max-width: 24ch; }
.booking__note a { color: #fff; text-underline-offset: 3px; }

/* Popovers (white surfaces floating over the photo) */
.popover {
  position: absolute; z-index: 40;
  bottom: calc(100% + 12px);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  box-shadow: 0 30px 70px -20px rgba(31, 14, 33, .6), 0 0 0 1px rgba(58, 31, 61, .08);
  animation: pop .22s var(--ease);
}
.popover.is-down { bottom: auto; top: calc(100% + 12px); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.datepicker { left: 0; width: min(720px, 100%); padding: 22px 24px 18px; }
.datepicker__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.datepicker__hint { font-size: .9375rem; color: var(--muted); }
.datepicker__nav { display: flex; gap: 4px; }
.datepicker__months { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.datepicker__foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px;
}

.month__caption { font-family: var(--serif); font-weight: 480; font-size: 1.2rem; color: var(--plum); margin: 4px 0 12px; text-transform: capitalize; }
.month__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.month__dow { font-size: .75rem; color: var(--muted); text-align: center; padding-bottom: 8px; }
.day {
  position: relative;
  aspect-ratio: 1 / 1; min-height: 40px;
  display: grid; place-items: center;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: .9375rem; font-variant-numeric: tabular-nums; color: var(--ink);
}
.day span {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  transition: background-color .15s, color .15s;
}
.day:hover:not(:disabled) span { background: var(--sky-pale); }
.day:disabled { color: #B9B1BC; cursor: default; }
.day:focus-visible { outline: none; }
.day:focus-visible span { box-shadow: 0 0 0 2px var(--plum); }
.day.is-today span { box-shadow: inset 0 0 0 1px var(--line); }
.day.in-range::before, .day.in-preview::before,
.day.is-start::before, .day.is-end::before {
  content: ""; position: absolute; inset: 4px 0; background: var(--sky-pale);
}
.day.is-start::before { left: 50%; }
.day.is-end::before { right: 50%; }
.day.is-start.is-end::before { display: none; }
.day.is-start:not(.has-range)::before { display: none; }
.day.is-start span, .day.is-end span { background: var(--plum); color: #fff; }
.day.is-start:hover span, .day.is-end:hover span { background: var(--plum-2); }
.day--blank { pointer-events: none; }

.guests { width: 360px; padding: 8px 24px 20px; }
.counter {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.counter__title { font-weight: 600; color: var(--plum); }
.counter__hint { font-size: .8125rem; color: var(--muted); }
.counter__ctrl { display: flex; align-items: center; gap: 14px; }
.counter__ctrl output { min-width: 1.5ch; text-align: center; font-variant-numeric: tabular-nums; font-size: 1.0625rem; }
.guests__ages { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guests__ages:not(:empty) { padding-top: 16px; }
.age-field { display: grid; gap: 4px; font-size: .8125rem; color: var(--muted); }
.age-field select {
  appearance: none; -webkit-appearance: none;
  width: 100%; padding: 10px 34px 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A1F3D' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
  font: inherit; font-size: .9375rem; color: var(--ink);
}
.age-field select[aria-invalid="true"] { border-color: #A3392B; }
.guests__note { font-size: .8125rem; line-height: 1.45; color: var(--muted); padding-top: 14px; }
.guests__error { font-size: .8125rem; font-weight: 600; color: #A3392B; padding-top: 10px; }
.guests__foot { display: flex; justify-content: flex-end; padding-top: 18px; }

.scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(31, 14, 33, .55);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }

/* ---------- Intro ---------- */
.intro__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 32px);
  align-items: start;
}
.intro__text { grid-column: 1 / span 6; grid-row: 1 / span 2; }
.intro__text .h2 { margin-bottom: 28px; max-width: 13ch; }
.intro__text p + p { margin-top: 18px; color: var(--muted); max-width: 58ch; }
.intro__media { grid-column: 8 / -1; grid-row: 1; }
.intro__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.intro__media figcaption { margin-top: 12px; font-size: .875rem; color: var(--muted); }

.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin-top: 44px;
}
.facts div { padding: 14px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: .8125rem; color: var(--muted); }
.facts dd { font-weight: 550; color: var(--plum); }

.scores {
  grid-column: 8 / -1; grid-row: 2;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px;
  margin-top: 36px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.score { display: grid; gap: 4px; }
.score__value { font-family: var(--serif); font-weight: 440; font-size: 2.6rem; line-height: 1; color: var(--plum); font-variant-numeric: lining-nums; }
.score__text { font-size: .875rem; color: var(--muted); }
.scores__note { grid-column: 1 / -1; font-size: .75rem; color: var(--muted); }

/* ---------- Key board: rooms and apartments ---------- */
.keys {
  background: var(--plum);
  color: var(--on-dark);
  padding-block: var(--section);
}
.keys__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 32px);
  align-items: end;
}
.keys__head .h2 { grid-column: 1 / span 6; }
.keys__intro { grid-column: 8 / -1; color: var(--on-dark-muted); max-width: 46ch; }

.board {
  display: flex; gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(48px, 5vw, 72px);
}
.rail { flex: 3 1 0; min-width: 0; }
.rail + .rail { flex-grow: 4; }
.rail__label { font-size: .875rem; font-weight: 500; color: var(--on-dark-muted); margin-bottom: 12px; }
/* The rail the keys hang from (a local background, so it runs the full
   length when the row scrolls sideways on small screens) */
.rail__hooks {
  position: relative;
  display: flex; gap: 14px;
  padding-top: 30px;
  background: linear-gradient(rgba(244, 238, 244, .34), rgba(244, 238, 244, .34)) 0 0 / 100% 3px no-repeat local;
}

.tag {
  --tilt: 0deg;
  position: relative;
  flex: 1 1 0; min-width: 0;
  min-height: 176px;
  padding: 48px 12px 30px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  background: rgba(244, 238, 244, .06);
  border: 1px solid rgba(244, 238, 244, .3);
  border-radius: 16px 16px 64px 64px / 16px 16px 52px 52px;
  color: #fff;
  cursor: pointer;
  transform: rotate(var(--tilt));
  transform-origin: 50% -26px;
  transition: transform .45s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
/* The punched hole */
.tag::before {
  content: ""; position: absolute; top: 17px; left: 50%;
  width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%;
  background: var(--plum);
  box-shadow: inset 0 0 0 1px rgba(244, 238, 244, .3);
}
/* The ring runs through the hole; a short wire ties it to the rail */
.tag__ring {
  position: absolute; top: 1px; left: 50%;
  width: 24px; height: 24px; margin-left: -12px;
  border: 2px solid rgba(244, 238, 244, .7);
  border-radius: 50%;
  pointer-events: none;
  transition: border-color .2s var(--ease);
}
.tag__ring::before {
  content: ""; position: absolute; bottom: 100%; left: 50%;
  width: 2px; height: 28px; margin-left: -1px;
  background: rgba(244, 238, 244, .7);
  transition: background-color .2s var(--ease);
}
.rail__hooks .tag:nth-child(4n + 1) { --tilt: -1.2deg; }
.rail__hooks .tag:nth-child(4n + 2) { --tilt: .8deg; }
.rail__hooks .tag:nth-child(4n + 3) { --tilt: -.5deg; }
.rail__hooks .tag:nth-child(4n + 4) { --tilt: 1.4deg; }
.tag:hover { --tilt: -3deg; border-color: rgba(244, 238, 244, .55); }
.tag__name {
  font-family: var(--serif); font-weight: 460;
  font-size: clamp(1.05rem, .95rem + .35vw, 1.3rem); line-height: 1.12;
  text-wrap: balance;
}
.tag__meta { font-size: .8125rem; line-height: 1.35; color: var(--on-dark-muted); }

.tag.is-active {
  --tilt: 0deg;
  background: var(--sky);
  border-color: var(--sky);
  color: var(--plum);
  transform: translateY(8px);
}
.tag.is-active .tag__ring { border-color: rgba(58, 31, 61, .75); }
.tag.is-active .tag__ring::before { background: var(--sky); }
.tag.is-active .tag__meta { color: rgba(58, 31, 61, .78); }
.tag:focus-visible { outline-offset: 4px; }

.units { margin-top: clamp(48px, 5vw, 72px); }
.unit {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 32px);
  align-items: center;
}
.unit:focus-visible { outline-offset: 8px; }
.unit__media { grid-column: 1 / span 7; }
.unit__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.unit__body { grid-column: 9 / -1; }
.unit__title {
  margin: 0 0 16px;
  font-family: var(--serif); font-weight: 440;
  font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.5rem); line-height: 1.05; color: #fff;
}
.unit__desc { color: var(--on-dark); max-width: 44ch; }
.unit__specs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px;
  margin: 28px 0 32px;
}
.unit__specs div { padding: 12px 0; border-top: 1px solid var(--line-dark); }
.unit__specs dt { font-size: .8125rem; color: var(--on-dark-muted); }
.unit__specs dd { color: #fff; font-weight: 500; }

.keys__common {
  margin-top: clamp(48px, 5vw, 72px); padding-top: 22px;
  border-top: 1px solid var(--line-dark);
  font-size: .9375rem; color: var(--on-dark-muted);
}
.keys__common-title { color: #fff; font-weight: 600; }

/* ---------- Roof ---------- */
.roof { background: var(--sky-pale); }
.roof__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 32px);
  align-items: start;
}
.roof__head .h2 { grid-column: 1 / span 5; }
.roof__text { grid-column: 7 / -1; }
.roof__text p + p { margin-top: 16px; color: var(--muted); max-width: 58ch; }
.roof__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-top: 28px; max-width: 520px; }
.roof__facts div { padding: 12px 0; border-top: 1px solid rgba(58, 31, 61, .14); }
.roof__facts dt { font-size: .8125rem; color: var(--muted); }
.roof__facts dd { font-weight: 550; color: var(--plum); }
.roof__strip {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(12px, 1.6vw, 20px);
  margin-top: clamp(40px, 5vw, 64px);
}
.roof__photo img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius); }
.roof__photo--wide img { aspect-ratio: 4 / 3; }
.roof__photo img.is-low { object-position: 55% 100%; }
.roof__photo figcaption { margin-top: 10px; font-size: .875rem; color: var(--muted); }

/* ---------- Section head ---------- */
.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 32px);
  align-items: end;
  margin-bottom: clamp(36px, 4vw, 56px);
}
.section-head .h2 { grid-column: 1 / span 5; }
.section-head__text { grid-column: 7 / -1; color: var(--muted); max-width: 56ch; }

/* ---------- Services ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 32px);
}
.services__head { grid-column: 1 / span 4; }
.services__head .h2 { margin-bottom: 20px; }
.services__intro { color: var(--muted); margin-bottom: 18px; max-width: 34ch; }
.services__list {
  grid-column: 6 / -1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(20px, 3vw, 44px);
}
.services__list div { padding: 18px 0 20px; border-top: 1px solid var(--line); }
.services__list dt { font-family: var(--serif); font-weight: 480; font-size: 1.28rem; color: var(--plum); margin-bottom: 4px; }
.services__list dd { color: var(--muted); font-size: .9688rem; }

/* ---------- Voices ---------- */
.voices { padding-top: 0; }
.voices .container {
  padding-top: clamp(56px, 6vw, 88px);
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.voices__list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  margin-top: clamp(32px, 4vw, 48px);
}
.voice blockquote p {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.18rem, 1.08rem + .35vw, 1.38rem); line-height: 1.42; color: var(--ink);
}
.voice__by { margin-top: 16px; font-size: .875rem; color: var(--muted); }

/* ---------- Location ---------- */
.location { background: var(--sky-pale); }
.location__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 32px);
  align-items: stretch;
}
.location__map { grid-column: 1 / span 7; min-height: 560px; }
.location__map iframe { width: 100%; height: 100%; min-height: 560px; border: 0; display: block; border-radius: var(--radius); filter: saturate(.85); }
.location__info { grid-column: 9 / -1; display: flex; flex-direction: column; gap: 28px; }
.location__address { display: grid; font-family: var(--serif); font-size: 1.35rem; line-height: 1.35; color: var(--plum); }
.distances__title { font-size: .875rem; font-weight: 600; color: var(--plum); margin: 0 0 6px; }
.distances ul + .distances__title { margin-top: 22px; }
.distances li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; border-bottom: 1px solid rgba(58, 31, 61, .12);
  font-size: .9375rem;
}
.distances li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.location__info .btn { align-self: flex-start; }

/* ---------- Gallery ---------- */
.gallery .h2 { margin-bottom: clamp(32px, 4vw, 48px); }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(150px, 17vw, 250px);
  gap: clamp(10px, 1.2vw, 16px);
}
.gallery__grid li { min-width: 0; }
.g-a { grid-column: 1 / span 7; grid-row: span 2; }
.g-b { grid-column: 8 / -1; }
.g-c { grid-column: 8 / -1; }
.g-d { grid-column: 1 / span 4; }
.g-e { grid-column: 5 / span 4; }
.g-f { grid-column: 9 / -1; }
.g-g { grid-column: 1 / span 5; }
.g-h { grid-column: 6 / -1; }
.gallery__item {
  display: block; width: 100%; height: 100%;
  padding: 0; border: 0; background: var(--sky-pale); cursor: zoom-in;
  overflow: hidden; border-radius: var(--radius);
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery__item:hover img { transform: scale(1.03); }

/* ---------- Closing ---------- */
.closing {
  background: var(--plum);
  color: var(--on-dark);
  padding-block: clamp(72px, 8vw, 120px);
}
.closing__inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px 48px; align-items: end; }
.closing__title {
  margin: 0;
  font-family: var(--serif); font-weight: 420;
  font-size: clamp(2.2rem, 1.4rem + 2.8vw, 4.2rem); line-height: 1.02; letter-spacing: -.015em;
  color: #fff; text-wrap: balance;
}
.closing__actions { display: grid; justify-items: start; gap: 18px; justify-self: end; }
.closing__actions .btn { margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--plum-3); color: var(--on-dark-muted); font-size: .9375rem; }
.site-footer__grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px;
  padding-block: 64px 48px;
}
.site-footer__name { font-family: var(--serif); font-style: italic; font-weight: 480; font-size: 2.4rem; line-height: 1; color: #fff; }
.site-footer__sub { margin-top: 6px; font-size: .8125rem; }
.site-footer__title { font-size: .8125rem; font-weight: 600; color: #fff; margin: 0 0 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-block: 22px calc(22px + env(safe-area-inset-bottom));
  font-size: .8125rem;
  background: linear-gradient(var(--line-dark), var(--line-dark)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}

/* ---------- Sticky mobile CTA ---------- */
.sticky-book { display: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(31, 14, 33, .96);
  color: #fff;
}
.lightbox[open] { display: grid; place-items: center; animation: fade .25s ease; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: min(92vw, 1600px); max-height: 82vh; object-fit: contain; }
.lightbox__cap { position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; font-size: .9375rem; color: var(--on-dark-muted); padding-inline: 72px; }
.lightbox__btn {
  position: absolute; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: #fff; cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .16); }
.lightbox__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
  .booking { grid-template-columns: 1fr 1fr 1fr 1.2fr; }
  .booking__submit { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line-dark); grid-template-columns: auto 1fr; justify-items: start; align-items: center; gap: 20px; }
  .booking__note { text-align: left; max-width: 40ch; }
}

@media (max-width: 1023px) {
  .intro__text, .intro__media, .scores,
  .keys__head .h2, .keys__intro,
  .unit__media, .unit__body,
  .roof__head .h2, .roof__text,
  .services__head, .services__list,
  .location__map, .location__info,
  .section-head .h2, .section-head__text { grid-column: 1 / -1; grid-row: auto; }
  .intro__media { margin-top: 44px; }
  .keys__intro, .section-head__text { margin-top: 16px; }
  .unit__body { margin-top: 28px; }
  .roof__text { margin-top: 24px; }
  .roof__strip { grid-template-columns: 1fr 1fr; }
  .roof__photo--wide { grid-column: 1 / -1; }
  .roof__photo img { aspect-ratio: 4 / 5; }
  .roof__photo--wide img { aspect-ratio: 4 / 3; }
  .services__list { margin-top: 36px; }
  .location__info { margin-bottom: 40px; grid-row: 1; }
  .location__map { grid-row: 2; }
  .voices__list { grid-template-columns: 1fr; }
  .closing__inner { grid-template-columns: 1fr; }
  .closing__actions { justify-self: start; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }

  /* Key rails stack, each scrolls sideways if it needs to */
  .board { flex-direction: column; gap: 36px; }
  .rail__hooks {
    overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    padding: 30px var(--gutter) 16px;
    margin-inline: calc(-1 * var(--gutter));
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .rail__hooks::-webkit-scrollbar { display: none; }
  .tag { flex: 0 0 168px; scroll-snap-align: start; }
}

@media (max-width: 899px) {
  /* Photo on top with the headline in its upper part, search right below */
  .hero { min-height: 0; display: block; }
  .hero__media { position: relative; height: clamp(460px, 70svh, 660px); }
  .hero__veil {
    height: clamp(460px, 70svh, 660px); bottom: auto;
    background:
      linear-gradient(180deg, rgb(31 14 33 / .84) 0%, rgb(31 14 33 / .6) 30%, rgb(31 14 33 / 0) 54%),
      linear-gradient(0deg, rgba(31, 14, 33, .35) 0, rgba(31, 14, 33, 0) 18%);
  }
  .hero__inner { position: absolute; left: 0; right: 0; top: 0; padding-bottom: 0; }
  .hero__booking { padding: 0; max-width: none; }
  .booking { border-radius: 0; grid-template-columns: 1fr 1fr; }
  .booking__field:first-child { border-top-left-radius: 0; }
  .booking__field { min-height: 86px; padding: 14px var(--gutter); }
  .booking__field:nth-child(2) { border-left: 1px solid var(--line-dark); }
  #guestsField { border-left: 0; border-top: 1px solid var(--line-dark); }
  .booking__field--select { border-top: 1px solid var(--line-dark); }
  .booking__submit { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line-dark); padding: 16px var(--gutter) 24px; display: grid; grid-template-columns: 1fr; justify-items: stretch; gap: 12px; }
  .booking__submit .btn { width: 100%; }
  .booking__note { text-align: center; max-width: none; }

  /* Popovers become bottom sheets */
  .popover {
    position: fixed; z-index: 80;
    left: 0 !important; right: 0 !important; top: auto; bottom: 0;
    width: 100% !important; max-height: 88vh; overflow-y: auto;
    border-radius: 14px 14px 0 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    animation: sheet .3s var(--ease);
  }
  .datepicker { display: flex; flex-direction: column; overflow: hidden; padding-inline: 16px; }
  .datepicker__months { grid-template-columns: 1fr; gap: 20px; overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; }
  .datepicker__foot { flex: none; }
  .day span { width: 44px; height: 44px; }
  .popover :focus-visible { outline-color: var(--plum); }

  .sticky-book {
    display: flex; gap: 10px; align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(58, 31, 61, .95);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 -1px 0 var(--line-dark);
    transform: translateY(110%);
    transition: transform .35s var(--ease);
  }
  .sticky-book .btn { flex: 1; }
  .sticky-book__icon { width: 48px; height: 48px; flex: none; color: var(--on-dark); border-color: rgba(244, 238, 244, .35); }
  .sticky-book__icon:hover { background: rgba(244, 238, 244, .08); }
  .sticky-book.is-visible { transform: none; }
  .site-footer { padding-bottom: 76px; }

  .gallery__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: clamp(140px, 36vw, 240px); }
  .gallery__grid li { grid-column: auto; grid-row: auto; }
  .gallery__grid .g-a { grid-column: 1 / -1; grid-row: span 2; }
  .gallery__grid .g-h { grid-column: 1 / -1; }
}
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .site-header__inner { gap: 10px; }
  .site-header__actions { gap: 4px; }
  .brand__name { font-size: 1.75rem; }
  .brand__sub { font-size: .75rem; }
  .site-header__cta { display: none; }
  .hero { --hero-copy-top: 22px; }
  .hero__copy { gap: 14px; }
  .hero__lead { display: none; }
  .booking__value, .booking__select { font-size: 1.25rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .services__list { grid-template-columns: 1fr; }
  .unit__specs { grid-template-columns: 1fr 1fr; }
  .location__map, .location__map iframe { min-height: 360px; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .closing__actions .btn { width: 100%; }
  .tag { flex-basis: 148px; min-height: 164px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 64px; transform: none; }
  .lightbox__cap { bottom: 132px; padding-inline: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__media img { animation: none; }
  .tag, .tag:hover { --tilt: 0deg; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
