/* ==========================================================================
   SECTIONS — page-level compositions
   ========================================================================== */

/* --------------------------------------------------------------------------
   HERO
   Full-viewport video. The scroll transition (scale + fade) is driven by JS
   writing --hero-progress; CSS owns the mapping so reduced-motion can opt out.
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  isolation: isolate;
  overflow: clip;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--c-ink);
}
.hero__media video,
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}
/* The stage holds the poster and the film, so the opening settle moves both
   as one. The poster sits under the film and is revealed if playback never
   starts. */
.hero__stage { position: absolute; inset: 0; transform-origin: center 45%; }
.hero__poster { position: absolute; inset: 0; display: block; }
.hero__video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1200ms var(--e-out);
}
.hero__video.is-playing { opacity: 1; }

/* Scroll-driven cinematic exit. Written by hero.js. */
.hero__media {
  transform: scale(var(--hero-scale, 1));
  transform-origin: center 40%;
  will-change: transform;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Two washes, both for legibility rather than mood.
     These values are not taste — they are the minimum that keeps cream type at
     WCAG AA over a *light* image, which is the worst case and the one the
     client's footage may well be. The right third of the frame stays almost
     untouched so the photograph still reads.
     Re-measure with `node tools/hero-contrast.mjs` if you change them. */
  background:
    linear-gradient(to right,
      rgba(18,18,16,0.62) 0%,
      rgba(18,18,16,0.56) 28%,
      rgba(18,18,16,0.48) 52%,
      rgba(18,18,16,0.30) 70%,
      rgba(18,18,16,0.08) 86%,
      rgba(18,18,16,0.00) 100%),
    linear-gradient(to bottom,
      rgba(18,18,16,0.44) 0%,
      rgba(18,18,16,0.20) 22%,
      rgba(18,18,16,0.24) 44%,
      rgba(18,18,16,0.52) 72%,
      rgba(18,18,16,0.78) 100%);
  opacity: var(--hero-scrim, 1);
}
@media (max-width: 860px) {
  /* The type runs the full width here, so the wash is vertical only: light
     through the top of the frame, where the film is the subject, and deep
     where the words sit. The text block carries its own wash as well. */
  .hero__scrim {
    background:
      linear-gradient(to bottom,
        rgba(18,18,16,0.46) 0%,
        rgba(18,18,16,0.22) 18%,
        rgba(18,18,16,0.26) 34%,
        rgba(18,18,16,0.56) 52%,
        rgba(18,18,16,0.78) 72%,
        rgba(18,18,16,0.90) 100%);
  }
}

.hero__inner {
  position: relative;
  align-self: end;
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding: 0 var(--s-gutter) var(--s-7);
  color: var(--c-text-invert);
  opacity: var(--hero-fade, 1);
}
/* Full-strength cream: this is the highest piece of type in the frame, where
   the vertical wash is lightest, so it cannot afford reduced opacity too. */
/* A wash anchored to the text block rather than to a percentage of the
   viewport. On a narrow screen the content stack is tall relative to the
   frame, so a viewport-proportional gradient always leaves the topmost line —
   the eyebrow — under-covered. This one grows with the text it protects. */
@media (max-width: 860px) {
  .hero__inner::before {
    content: '';
    position: absolute;
    left: calc(var(--s-gutter) * -1);
    right: calc(var(--s-gutter) * -1);
    bottom: calc(var(--s-7) * -1);
    top: calc(var(--s-7) * -2);
    z-index: -1;
    background: linear-gradient(to top,
      rgba(18,18,16,0.46) 0%,
      rgba(18,18,16,0.46) 70%,
      rgba(18,18,16,0.44) 84%,
      rgba(18,18,16,0.00) 100%);
    pointer-events: none;
  }
}

.hero__label { color: var(--c-text-invert); margin-bottom: var(--s-5); }
/* The eyebrow sits INSIDE the h1 so the name is part of the page's main
   heading (search), while it still looks like the small label above it. */
.hero__title > .hero__label { font-family: var(--font-sans); text-wrap: wrap; }
.hero__title { max-width: 16ch; margin-bottom: var(--s-5); }
/* Each line clips its own rise. The padding/margin pair gives descenders room
   inside the clip without moving the baseline. */
.hero__line { display: block; overflow: clip; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.hero__line > span { display: block; }

/* ── The opening ─────────────────────────────────────────────────────────
   One sequence at every width, all CSS, running from first paint: the stage
   settles out of a slight push-in while the words arrive in reading order —
   eyebrow, headline line by line, lede, actions, rail. Transform and opacity
   only, on one long decelerating curve with no overshoot: nothing was thrown,
   so nothing bounces. `backwards` holds each start state through its delay and
   then lets go, so afterwards the scroll exit's custom properties own opacity. */
.hero__stage { animation: hero-settle 2800ms var(--e-settle) both; }
.hero__label,
.hero__lede,
.hero__actions,
.hero__rail-inner { animation: hero-rise 1100ms var(--e-settle) backwards; }
.hero__label      { animation-delay: 200ms; }
.hero__line > span {
  animation: hero-line 1300ms var(--e-settle) backwards;
  animation-delay: calc(380ms + var(--i, 0) * 130ms);
}
.hero__lede       { animation-delay: 760ms; }
.hero__actions    { animation-delay: 900ms; }
.hero__rail-inner { animation-delay: 1100ms; }

@keyframes hero-settle { from { transform: scale(1.1); } to { transform: none; } }
@keyframes hero-rise   { from { opacity: 0; transform: translateY(18px); } }
@keyframes hero-line   { from { transform: translateY(105%); } }

/* No film after all (Low Power Mode, a refused autoplay): the poster drifts,
   too slowly to read as motion, so the frame is still alive. hero.js sets it. */
.hero--still .hero__poster img {
  transform-origin: 55% 45%;
  animation: hero-drift 32s var(--e-inout) infinite alternate;
}
@keyframes hero-drift {
  from { transform: none; }
  to   { transform: scale(1.08) translate3d(-1.2%, -0.8%, 0); }
}
.hero__lede {
  max-width: 46ch;
  font-size: var(--t-body-l);
  color: rgba(240,237,230,0.86);
  line-height: 1.6;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

/* Bottom meta rail: place, live local time, scroll cue. */
.hero__rail {
  position: relative;
  border-top: 1px solid rgba(240,237,230,0.22);
  color: var(--c-text-invert);
  opacity: var(--hero-fade, 1);
}
.hero__rail-inner {
  max-width: var(--w-max);
  margin-inline: auto;
  padding: var(--s-4) var(--s-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.hero__place { letter-spacing: var(--ls-label-wide); color: rgba(240,237,230,0.86); }

/* The signature: live local time and today's sun at the property. */
.sunline {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  font-size: var(--t-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: rgba(240,237,230,0.66);
  font-variant-numeric: lining-nums tabular-nums;
}
.sunline__now { color: var(--c-text-invert); }
.sunline__sep { width: 22px; height: 1px; background: currentColor; opacity: 0.4; }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--t-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: rgba(240,237,230,0.7);
  transition: color var(--d-fast) var(--e-out);
}
.scroll-cue:hover { color: var(--c-text-invert); }
.scroll-cue__line {
  display: block;
  width: 1px; height: 34px;
  background: currentColor;
  transform-origin: top;
  animation: cue 2600ms var(--e-inout) infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.34); opacity: 0.35; }
  50%      { transform: scaleY(1);    opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue__line { animation: none; transform: none; }
  .hero__media { transform: none !important; }
  /* The global rule shortens durations but not delays, which would leave the
     words invisible for a beat and then pop them in. Arrive already settled. */
  .hero__stage, .hero__label, .hero__line > span, .hero__lede,
  .hero__actions, .hero__rail-inner, .hero--still .hero__poster img { animation: none; }
}

@media (max-width: 860px) {
  .hero__rail-inner { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
  .scroll-cue { display: none; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  /* Sized so each written line holds on one line down to a 360px phone: the
     headline keeps the shape it has on a desktop instead of stacking into
     four, and the film above it stays in view. */
  .hero__title { max-width: none; font-size: clamp(2.2rem, 10.2vw, 2.85rem); }
  .hero__lede { font-size: var(--t-body); }

  /* The rules between the three readings cost more width than they earn once
     the row has to wrap. A row of three plain values reads better. */
  .sunline { gap: var(--s-5); flex-wrap: wrap; }
  .sunline__sep { display: none; }
}
@media (max-width: 400px) {
  .sunline { gap: var(--s-4); font-size: 0.625rem; }
}

/* Compact hero for interior pages. */
.pagehero {
  position: relative;
  min-height: 72svh;
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: clip;
  background: var(--c-ink);
}
.pagehero__media { position: absolute; inset: 0; z-index: -2; }
.pagehero__media img { width: 100%; height: 100%; object-fit: cover; }
.pagehero__scrim {
  position: absolute; inset: 0; z-index: -1;
  /* Same reasoning as .hero__scrim: strong enough to hold cream type at AA
     over a light photograph, with the right of the frame left alone. */
  background:
    linear-gradient(to right,
      rgba(18,18,16,0.58) 0%,
      rgba(18,18,16,0.50) 30%,
      rgba(18,18,16,0.36) 56%,
      rgba(18,18,16,0.16) 76%,
      rgba(18,18,16,0.00) 100%),
    linear-gradient(to bottom,
      rgba(18,18,16,0.46) 0%,
      rgba(18,18,16,0.34) 34%,
      rgba(18,18,16,0.52) 66%,
      rgba(18,18,16,0.80) 100%);
}
@media (max-width: 860px) {
  .pagehero__scrim {
    background:
      linear-gradient(to bottom,
        rgba(18,18,16,0.54) 0%,
        rgba(18,18,16,0.52) 28%,
        rgba(18,18,16,0.68) 58%,
        rgba(18,18,16,0.80) 78%,
        rgba(18,18,16,0.88) 100%);
  }
}
.pagehero__inner {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding: var(--s-9) var(--s-gutter) var(--s-7);
  color: var(--c-text-invert);
}
.pagehero__label { color: var(--c-text-invert); margin-bottom: var(--s-4); }
.pagehero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5) var(--s-7);
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(240,237,230,0.22);
}
.pagehero__meta div { display: grid; gap: var(--s-1); }
.pagehero__meta dt, .pagehero__meta .k {
  font-size: var(--t-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: rgba(240,237,230,0.6);
}
.pagehero__meta dd, .pagehero__meta .v {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 300;
}

/* Simple heading block for pages without a media hero. */
.pagehead {
  padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 7rem));
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

/* --------------------------------------------------------------------------
   INTRO — editorial text beside a tall image
   -------------------------------------------------------------------------- */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-8) clamp(3rem, 7vw, 8rem);
  align-items: center;
}
.intro__text > * + * { margin-top: var(--s-5); }
.intro__text .display-l { margin-top: var(--s-6); }
.intro__figure { position: relative; }
/* Second, smaller image overlapping the first — an editorial device, not a card. */
.intro__inset {
  position: absolute;
  right: -8%;
  bottom: -12%;
  width: 46%;
  border: 8px solid var(--c-bg);
}
@media (max-width: 960px) {
  .intro { grid-template-columns: 1fr; gap: var(--s-7); }
  .intro__inset { position: static; width: 100%; border: 0; margin-top: var(--s-4); display: none; }
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-7);
  padding-top: var(--s-6);
  border-top: 1px solid var(--c-border);
}
.stat { display: block; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300;
  line-height: 1;
  margin-bottom: var(--s-2);
}
@media (max-width: 560px) { .stat-row { grid-template-columns: 1fr; gap: var(--s-4); } }

/* --------------------------------------------------------------------------
   THE DAY — the property told through the hours of its own light.

   Signature section. A triptych rather than a row of equal tiles: two upright
   frames for morning and midday, the second dropped so the pair reads as a
   composition, then a wide cinematic band for last light. The section builds
   toward the best hour of the day, which is the argument it is making.
   -------------------------------------------------------------------------- */
.day-arc {
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
}

.day-pair {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 3.5vw, 4rem);
  align-items: start;
}
/* The drop is what stops the pair reading as two columns of a table. */
.day-pair > :last-child { margin-top: clamp(2rem, 7vw, 7rem); }

.day-wide {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(1.5rem, 3.5vw, 4rem);
  align-items: end;
}

.day-item { display: grid; }
.day-item__note {
  margin-top: var(--s-4);
  font-size: var(--t-body-s);
  color: var(--c-text-muted);
  max-width: 40ch;
}

/* The aside beside the wide band: the day's length, and a way onward. */
.day-aside {
  display: grid;
  gap: var(--s-5);
  align-content: end;
  padding-bottom: var(--s-2);
}
.day-aside__length {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300;
  line-height: 1.1;
}

@media (max-width: 860px) {
  .day-pair,
  .day-wide { grid-template-columns: 1fr; }
  .day-pair > :last-child { margin-top: 0; }
  .day-aside { align-content: start; }
  /* 21:9 at phone width is a 150px sliver; give the last light a real frame. */
  .day-wide .media--21x9 { aspect-ratio: 4 / 3; }
}

/* The phase mark: time + name, joined by a rule. */
.phase {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.phase__time {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--c-accent);
  letter-spacing: 0.02em;
}
.phase__rule { flex: none; width: 28px; height: 1px; background: var(--c-border); align-self: center; }
.phase__name {
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   THE TWO STAYS — full-bleed visual halves, not pricing cards.
   -------------------------------------------------------------------------- */
.stays { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Four rooms: one row of four, or two by two — never three and an orphan. */
@media (max-width: 1200px) {
  .stays { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stays .stay-panel:nth-child(2n) { border-right: 0; }
  .stays .stay-panel:nth-child(-n + 2) { border-bottom: 1px solid rgba(240,237,230,0.14); }
}
@media (max-width: 700px) {
  .stays { grid-template-columns: 1fr; }
  .stays .stay-panel { border-right: 0; border-bottom: 1px solid rgba(240,237,230,0.14); }
}

/* Booking together: a quiet ledger under the room panels. */
.bundles { padding-block: clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--c-line); }
.bundles__head { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); max-width: 60ch; }
.bundles__list { list-style: none; margin: 0; padding: 0; display: grid; }
.bundle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13rem 13rem 12rem;
  gap: var(--s-4) var(--s-6);
  align-items: baseline;
  padding-block: var(--s-5);
  border-top: 1px solid var(--c-line);
}
.bundle__name { display: grid; gap: var(--s-1); }
.bundle > .link { justify-self: end; }
.bundle__price { font-family: var(--font-display); font-size: clamp(1.4rem, 2.2vw, 1.8rem); display: grid; font-variant-numeric: lining-nums tabular-nums; }
.bundle__price small { font-family: var(--font-sans); font-size: var(--t-body-s); color: var(--c-text-muted); }
.bundle__save { color: var(--c-text); font-weight: 500; font-size: var(--t-body-s); font-variant-numeric: lining-nums tabular-nums; }
@media (max-width: 1100px) {
  .bundle { grid-template-columns: 1fr auto; }
  .bundle > .link { justify-self: start; }
  .bundle__name { grid-column: 1 / -1; }
}

.stay-panel {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(84svh, 820px);
  overflow: hidden;
  isolation: isolate;
  color: var(--c-text-invert);
  border-right: 1px solid rgba(240,237,230,0.14);
}
.stays .stay-panel:last-child { border-right: 0; }
.stay-panel__media { position: absolute; inset: 0; z-index: -2; background: var(--c-ink); }
.stay-panel__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1400ms var(--e-out);
}
.stay-panel:hover .stay-panel__media img { transform: scale(1.05); }
.stay-panel__scrim {
  position: absolute; inset: 0; z-index: -1;
  /* Light at the top so the photograph reads; dense where the words sit, so
     a white bed or a bright curtain can never wash the type out. */
  background: linear-gradient(to bottom,
    rgba(18,18,16,0.14) 0%, rgba(18,18,16,0.20) 28%, rgba(18,18,16,0.62) 52%,
    rgba(18,18,16,0.84) 74%, rgba(18,18,16,0.92) 100%);
  transition: opacity var(--d-slow) var(--e-out);
}
.stay-panel:hover .stay-panel__scrim { opacity: 0.88; }
.stay-panel__body { padding: var(--s-7) clamp(1.5rem, 2.6vw, 3rem); display: grid; gap: var(--s-4); }
.stay-panel__index {
  font-family: var(--font-display);
  font-size: var(--t-body-s);
  letter-spacing: 0.1em;
  color: rgba(240,237,230,0.82);
  font-variant-numeric: lining-nums tabular-nums;
}
.stay-panel__name { font-size: clamp(1.875rem, 2.5vw, 2.5rem); text-wrap: balance; max-width: 16ch; }
.stay-panel__desc { color: rgba(240,237,230,0.82); max-width: 34ch; font-size: var(--t-body-s); }

/* Supporting facts expand on hover. The price and the link never do — a guest
   should not have to hover to find out what a room costs, and on a trackpad or
   a touch laptop that discovery may never happen at all. */
.stay-panel__more {
  display: grid;
  gap: var(--s-4);
  overflow: hidden;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .stay-panel__more {
    max-height: 0;
    opacity: 0;
    transition:
      max-height var(--d-slow) var(--e-out),
      opacity var(--d-base) var(--e-out);
  }
  .stay-panel:hover .stay-panel__more,
  .stay-panel:focus-within .stay-panel__more {
    max-height: 120px;
    opacity: 1;
  }
}
.stay-panel__facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.stay-panel__fact {
  font-size: var(--t-caption);
  color: rgba(240,237,230,0.78);
}
/* Price, then the way in, the same in every panel: a wrapping row put the link
   beside the price in one panel and under it in the next. */
.stay-panel__foot {
  padding-top: var(--s-4);
  border-top: 1px solid rgba(240,237,230,0.24);
  display: grid;
  justify-items: start;
  gap: var(--s-4);
}
.stay-panel__price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 300; }
.stay-panel__price small {
  font-family: var(--font-sans);
  font-size: var(--t-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: rgba(240,237,230,0.72);
  display: block;
  margin-top: var(--s-1);
}
/* The whole panel is one target; the visible link stays the accessible name. */
.stay-panel__link::after { content: ''; position: absolute; inset: 0; }

/* --------------------------------------------------------------------------
   GALLERY — asymmetric editorial grid
   -------------------------------------------------------------------------- */
.gal {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2.2vw, 2.5rem);
}
.gal__item { grid-column: span 6; }
.gal__item--wide  { grid-column: span 8; }
.gal__item--slim  { grid-column: span 4; }
.gal__item--third { grid-column: span 4; }
.gal__item--full  { grid-column: span 12; }
.gal__item--offset { margin-top: clamp(2rem, 6vw, 6rem); }
@media (max-width: 860px) {
  .gal { grid-template-columns: repeat(2, 1fr); }
  .gal__item, .gal__item--wide, .gal__item--slim,
  .gal__item--third, .gal__item--full { grid-column: span 2; }
  .gal__item--offset { margin-top: 0; }
}

.media-link { display: block; cursor: pointer; text-align: left; width: 100%; }

/* Horizontal swipe rail — used for mobile galleries. */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(78%, 1fr);
  gap: var(--s-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-inline: var(--s-gutter);
  margin-inline: calc(var(--s-gutter) * -1);
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 861px) {
  .rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    padding-inline: 0;
    margin-inline: 0;
  }
  /* A lead photograph closes the grid for any count, so no row is left with
     a gap. Two over (8 photos): the first spans two columns and fills the
     row its neighbour sets. One over (4 photos): it takes the whole row. */
  .rail > :first-child:nth-last-child(3n + 2) { grid-column: span 2; position: relative; }
  .rail > :first-child:nth-last-child(3n + 2) > .media { position: absolute; inset: 0; aspect-ratio: auto; }
  .rail > :first-child:nth-last-child(3n + 1):not(:only-child) { grid-column: 1 / -1; }
  .rail > :first-child:nth-last-child(3n + 1):not(:only-child) > .media { aspect-ratio: 21 / 9; }
}

/* --------------------------------------------------------------------------
   SURROUNDINGS — numbered editorial list with imagery
   -------------------------------------------------------------------------- */
.around { display: grid; gap: 0; }
.around__item {
  display: grid;
  grid-template-columns: 4rem minmax(0, 4fr) minmax(0, 5fr);
  gap: var(--s-5) clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3.5rem);
  border-top: 1px solid var(--c-border);
  align-items: start;
}
.around__item:last-child { border-bottom: 1px solid var(--c-border); }
/* Text-only row (no photograph of the place yet): name left, story and time right,
   with the travel time set as a display figure so the row still has a focal point. */
.around__item--text { align-items: baseline; padding-block: clamp(1.75rem, 3vw, 2.75rem); }
.around__item--text .around__travel { margin-top: var(--s-5); }
.around__item--text .around__travel b {
  font-family: var(--font-display);
  font-size: var(--t-display-s);
  font-weight: 400;
  color: var(--c-text);
  line-height: 1;
}
.around__body > * + * { margin-top: var(--s-3); }
.around__travel {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-3);
  margin-top: var(--s-4);
  font-size: var(--t-caption);
  color: var(--c-text-muted);
}
.around__dist {
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--c-text-faint);
}
.around__travel b {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--c-text);
  font-variant-numeric: lining-nums tabular-nums;
}
@media (max-width: 860px) {
  .around__item { grid-template-columns: 1fr; gap: var(--s-4); }
  .around__index { display: none; }
}

/* --------------------------------------------------------------------------
   LOCATION — map held to a quiet, non-dominant proportion
   -------------------------------------------------------------------------- */
.location {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: var(--s-8) clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .location { grid-template-columns: 1fr; } }

.map {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--c-border);
  background: var(--c-surface-sunk);
  overflow: hidden;
}
.map iframe {
  position: relative;  /* above .map__placeholder, which is the fallback floor */
  z-index: 1;
  width: 100%; height: 100%; border: 0; display: block;
}
/* Desaturate the tiles so the map never competes with the photography. */
.map--quiet iframe { filter: grayscale(1) contrast(0.92) brightness(1.04); }
.map__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--s-3);
  text-align: center;
  padding: var(--s-6);
}

.travel { display: grid; gap: 0; }
.travel__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--c-border);
}
.travel__row:first-child { border-top: 1px solid var(--c-border); }
.travel__name { font-size: var(--t-body-s); }
/* Distance sits with the name, not with the time: the time column is a single
   tabular figure and stays scannable down the page. */
.travel__km {
  margin-left: var(--s-3);
  font-size: var(--t-caption);
  color: var(--c-text-faint);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
.travel__time {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   AMENITIES — typographic columns, no icon grid
   -------------------------------------------------------------------------- */
.amenities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: var(--s-7) clamp(2rem, 4vw, 4rem);
}
.amenity-group__title { margin-bottom: var(--s-5); padding-bottom: var(--s-3); border-bottom: 1px solid var(--c-border); }
.amenity-group ul { display: grid; gap: var(--s-3); }
.amenity-group li { font-size: var(--t-body-s); color: var(--c-text-muted); }

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer { background: var(--c-ink); color: var(--c-text-invert); }
.footer a { transition: opacity var(--d-fast) var(--e-out); }
.footer a:hover { opacity: 0.66; }

.footer__cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-6);
  align-items: end;
  padding-block: clamp(3.5rem, 8vw, 7rem);
  border-bottom: 1px solid var(--c-border-invert);
}
@media (max-width: 760px) { .footer__cta { grid-template-columns: 1fr; align-items: start; } }

.footer__cols {
  display: grid;
  /* The house, then the four link groups of siteNav, all on one line. */
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
  gap: var(--s-7) var(--s-6);
  padding-block: clamp(3rem, 6vw, 5rem);
}
/* Narrower: the house takes its own row and the four groups share the next. */
@media (max-width: 1100px) {
  .footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) { .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.footer__col ul { display: grid; gap: var(--s-1); }
/* Links need real vertical padding: at 19px tall they were an unreliable
   tap target on a phone. Padding grows the hit area without moving the type. */
.footer__col li a,
.footer__legal a {
  display: inline-block;
  padding-block: var(--s-2);
}
.footer__col li, .footer__col p, .footer__col address {
  font-size: var(--t-body-s);
  color: var(--c-text-invert-muted);
  font-style: normal;
}
.footer__col .label { margin-bottom: var(--s-5); }
.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 300;
  margin-bottom: var(--s-4);
}
.footer__mark { flex: none; height: 1.6em; width: auto; overflow: visible; }
.footer__mark .acc { fill: var(--c-brass-bright); }
.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-5);
  border-top: 1px solid var(--c-border-invert);
}
.footer__bar p, .footer__bar a { font-size: var(--t-caption); color: var(--c-text-invert-muted); }
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-5); }

/* --------------------------------------------------------------------------
   THE LAMP: a pull-cord pendant hanging into the day section.
   Pull the cord (drag, tap, or Space) and the house is lit for the evening:
   the section warms to night, and each photograph crossfades to its relit
   night version in turn. Behaviour: assets/js/ui/lamp.js. Motion is transform
   and opacity only; reduced motion gets a calm crossfade with no sway.
   -------------------------------------------------------------------------- */
.daylight {
  position: relative;
  overflow: clip;
  transition: background-color 1100ms var(--e-inout), color 900ms var(--e-inout);
}
.daylight > .shell { position: relative; z-index: 1; }

.lamp-rail {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.lamp-rail--light { z-index: 0; }
/* Sticky inside a rail as tall as the section: the lamp hangs from the top of the
   section, then from just under the header while the section is being read, and
   leaves with the section. `overflow: clip` on .daylight keeps sticky working. */
.lamp {
  --wire: clamp(88px, 12vw, 160px);
  --shade: 84px;
  position: sticky;
  top: var(--nav-h);
  width: var(--shade);
  margin-left: auto;
  margin-right: clamp(1.5rem, 10vw, 12rem);
  pointer-events: none;
  /* Reads as an object in front of the photographs it passes over. */
  filter: drop-shadow(0 10px 14px rgba(20, 16, 10, 0.22));
}
.lamp__rig {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 0;
  will-change: transform;
}
.lamp.is-armed .lamp__rig { transform: translateY(-110%); }
.lamp__wire { width: 1px; height: var(--wire); background: #45423B; }
.lamp__shade {
  position: relative;
  width: var(--shade);
  height: calc(var(--shade) * 0.5);
  border-radius: 50% 50% 4px 4px / 100% 100% 4px 4px;
  background: linear-gradient(155deg, #D2B57E 0%, #A5854F 42%, #6F5733 100%);
  box-shadow: inset 0 -2px 0 rgba(30, 22, 10, 0.25);
}
.lamp__bulb {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #F4F0E8, #CFC7B7);
  transition: background 500ms var(--e-out), box-shadow 700ms var(--e-out);
}
.lamp__pull {
  position: absolute;
  top: calc(100% - 6px);
  left: calc(50% + var(--shade) * 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}
.lamp__cord {
  width: 1px;
  height: 58px;
  background: #5A564D;
  transform-origin: 50% 0;
  transform: scaleY(var(--stretch, 1));
}
.lamp__handle {
  position: relative;
  width: 12px;
  height: 26px;
  margin-top: -1px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #7A6038, #D5B983 45%, #8E7043);
  box-shadow: 0 2px 4px rgba(30, 22, 10, 0.25);
  cursor: grab;
  touch-action: none;
  transform: translateY(var(--pull, 0px));
}
/* A generous invisible hit area: the handle is small, fingers are not. */
.lamp__handle::before { content: ''; position: absolute; inset: -16px -18px; }
.lamp__handle:active { cursor: grabbing; }
.lamp__handle:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 6px; }
.lamp__hint {
  position: absolute;
  top: 64px;
  right: 22px;                      /* grows leftwards, into the page, never off its edge */
  text-align: right;
  text-shadow: 0 0 12px var(--c-surface-sunk), 0 0 3px var(--c-surface-sunk);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--c-text-muted);
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 600ms var(--e-out), transform 600ms var(--e-out), color 900ms var(--e-inout);
}
.lamp.is-in .lamp__hint { opacity: 1; transform: none; transition-delay: 900ms; }
.lamp.is-used .lamp__hint { opacity: 0; transition-delay: 0ms; }
/* After the lamp has pulled itself: the hint becomes the guest's prompt. */
.lamp.is-prompt .lamp__hint { opacity: 1; transform: none; transition-delay: 1400ms; }
.daylight.is-lit .lamp.is-prompt .lamp__hint { color: var(--c-brass-bright); }

/* Warm light spilling from the lamp across the section. */
.lamp-light {
  position: sticky;
  top: 0;
  height: 100svh;
  pointer-events: none;
  background:
    radial-gradient(55vmax 42vmax at var(--lamp-x, 86%) calc(var(--nav-h) + 10%), rgba(255, 186, 112, 0.20), rgba(255, 160, 90, 0.07) 42%, transparent 72%);
  opacity: 0;
  transition: opacity 1400ms var(--e-out);
}

/* Night photographs sit on top of their day twins, hidden until the lamp is on. */
.media__night {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1200ms var(--e-inout) var(--lamp-delay, 0ms);
}

/* ── Lights on ─────────────────────────────────────────────────────────── */
.daylight.is-lit { background-color: #14130F; color: var(--c-text-invert); }
.daylight.is-lit .lamp-light { opacity: 1; }
.daylight.is-lit .media__night { opacity: 1; }
.daylight.is-lit .media { background: #1E1C17; }
.daylight.is-lit .lede,
.daylight.is-lit .text-muted,
.daylight.is-lit .day-item__note { color: var(--c-text-invert-muted); }
.daylight.is-lit .label--accent,
.daylight.is-lit .phase__time { color: var(--c-brass-bright); }
.daylight.is-lit .phase__rule { background: var(--c-border-invert); }
.daylight.is-lit .link { color: var(--c-text-invert); }
.daylight.is-lit .lamp__wire { background: #6E6A60; }
.daylight.is-lit .lamp__cord { background: #8A857A; }
.daylight.is-lit .lamp__hint { color: var(--c-text-invert-muted); text-shadow: 0 0 14px rgba(20, 19, 15, 0.95), 0 0 6px rgba(20, 19, 15, 0.95), 0 0 2px rgba(20, 19, 15, 1); }
.daylight.is-lit .lamp__bulb {
  background: radial-gradient(circle at 45% 40%, #FFFBF2, #FFDCA6 58%, #F1B866);
  box-shadow: 0 0 16px 5px rgba(255, 200, 128, 0.55), 0 0 70px 24px rgba(255, 170, 90, 0.22);
}
.daylight.is-lit .lamp__shade {
  background: linear-gradient(155deg, #E0C58E 0%, #B08D57 42%, #7A6038 100%);
  box-shadow: inset 0 -2px 0 rgba(255, 214, 150, 0.35);
}
/* A filament does not snap on: it catches, dips, then holds. */
.lamp.is-flicker .lamp__bulb { animation: lamp-flicker 520ms linear 1; }
@keyframes lamp-flicker {
  0% { opacity: 0.2; } 18% { opacity: 1; } 30% { opacity: 0.45; } 46% { opacity: 1; } 58% { opacity: 0.8; } 100% { opacity: 1; }
}

@media (max-width: 860px) {
  .daylight { padding-top: calc(var(--s-section) + 96px); }
  .lamp { --wire: 44px; --shade: 62px; margin-right: 1.25rem; }
  .lamp__cord { height: 44px; }
  .lamp__hint { top: 50px; right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .daylight, .media__night, .lamp-light, .lamp__bulb, .lamp__hint { transition-duration: 200ms; transition-delay: 0ms; }
  .lamp.is-armed .lamp__rig { transform: none; }
  .lamp.is-flicker .lamp__bulb { animation: none; }
}

/* --------------------------------------------------------------------------
   BACKDROPS: every page opens on the property (tools/make-backdrops.mjs).
   A photograph drifting very slowly, or a short film of the house, behind the
   opening section; the header sits transparent over it (body.has-hero).
   -------------------------------------------------------------------------- */
.has-backdrop {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: min(68svh, 720px);
  display: grid;
  align-content: end;
  padding-top: calc(var(--nav-h) + clamp(4rem, 9vw, 8rem));
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
}
.backdrop { position: absolute; inset: 0; z-index: -1; background: var(--c-ink); }
.backdrop__media { width: 100%; height: 100%; object-fit: cover; }
video.backdrop__media { opacity: 1; }
/* Stills: a slow drift, too slow to notice as motion, enough to feel alive. */
.backdrop__media--drift { transform-origin: 60% 40%; animation: backdrop-drift 28s var(--e-inout) infinite alternate; }
@keyframes backdrop-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(-1.4%, -1%, 0); }
}
.backdrop__scrim {
  position: absolute;
  inset: 0;
  /* Held at AA for ivory type over a light photograph; darkest where the words sit. */
  background:
    linear-gradient(to bottom, rgba(18, 18, 16, 0.60) 0%, rgba(18, 18, 16, 0.58) 38%, rgba(18, 18, 16, 0.70) 72%, rgba(18, 18, 16, 0.88) 100%),
    linear-gradient(to right, rgba(18, 18, 16, 0.45), rgba(18, 18, 16, 0) 70%);
}
/* Royal pages: the scrim leans indigo so the brass and ivory keep their palette. */
.section--royal.has-backdrop .backdrop__scrim {
  background:
    linear-gradient(to bottom, rgba(14, 26, 44, 0.66) 0%, rgba(14, 26, 44, 0.66) 40%, rgba(14, 26, 44, 0.80) 78%, rgba(14, 26, 44, 0.92) 100%);
}
.section--royal.has-backdrop .crown { position: relative; }

/* Plain page heads turn dark over the photograph. */
.pagehead.has-backdrop { color: var(--c-text-invert); }
/* Small labels over a photograph: ivory, not brass, so they hold 4.5:1 on the brightest pixels. */
.has-backdrop .label,
.has-backdrop .label--accent,
.section--royal.has-backdrop .crown__label { color: var(--c-text-invert); }
.pagehead.has-backdrop .lede,
.pagehead.has-backdrop .text-muted { color: rgba(240, 237, 230, 0.78); }
.pagehead.has-backdrop .toolbar .tabtn { color: rgba(240, 237, 230, 0.82); border-color: rgba(240, 237, 230, 0.34); background: rgba(18, 18, 16, 0.18); }
.pagehead.has-backdrop .toolbar .tabtn:hover { color: var(--c-text-invert); border-color: var(--c-text-invert); }
.pagehead.has-backdrop .toolbar .tabtn[aria-pressed='true'] { background: var(--c-bg); color: var(--c-ink); border-color: var(--c-bg); }
.pagehead.has-backdrop .btn:not(.btn--ghost) { background: var(--c-bg); color: var(--c-ink); border-color: var(--c-bg); }
.pagehead.has-backdrop .btn--ghost { color: var(--c-text-invert); border-color: rgba(240, 237, 230, 0.5); }

@media (max-width: 860px) {
  .has-backdrop { min-height: 56svh; padding-top: calc(var(--nav-h) + 4rem); }
}
@media (prefers-reduced-motion: reduce) {
  .backdrop__media--drift { animation: none; transform: scale(1.04); }
}

/* --------------------------------------------------------------------------
   SCROLL-SCRUBBED HEROES (ui/scrub.js, tools/make-backdrops.mjs `scrub`).
   Before JS, or when motion is declined: the ordinary backdrop, with the
   chapter lines as a quiet row of facts under the title. With `is-scrubbing`
   the section becomes a tall stage: film, title and chapters are three
   sticky layers pinned to the viewport while the page scrolls through them.
   -------------------------------------------------------------------------- */
.has-scrub .shell { order: 1; }
.has-scrub .scrub__layer { order: 2; position: relative; }
.scrub__chapters {
  list-style: none; margin: var(--s-5) auto 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2) var(--s-5);
  font-size: var(--t-caption); letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-on-royal, var(--c-text-invert));
}
.scrub__cue, .scrub__bar { display: none; }

.has-scrub.is-scrubbing {
  display: block;
  /* Chrome honours align-content on block containers: the backdrop's `end`
     would stack the whole stage at the foot of the tall section. */
  align-content: normal;
  height: 300svh;
  min-height: 0;
  padding: 0;
  overflow: visible;
}
.has-scrub.is-scrubbing > .backdrop {
  inset: auto;
  position: sticky; top: 0;
  height: 100svh;
}
.has-scrub.is-scrubbing > .shell,
.has-scrub.is-scrubbing > .scrub__layer {
  position: sticky; top: 0;
  margin-top: -100svh;
  height: 100svh;
}
.has-scrub.is-scrubbing > .shell {
  display: grid; align-content: center;
  padding-top: var(--nav-h);
  /* The title leaves in the first fifth of the travel. */
  opacity: calc(1 - var(--p, 0) * 6);
  transform: translate3d(0, calc(var(--p, 0) * -14vh), 0) scale(calc(1 - var(--p, 0) * 0.25));
  will-change: opacity, transform;
}
.has-scrub.is-scrubbing > .scrub__layer { pointer-events: none; }
.has-scrub.is-scrubbing .scrub__chapters {
  position: absolute; inset: 0; margin: 0;
  display: grid; place-items: center;
  text-transform: none; letter-spacing: 0;
}
.has-scrub.is-scrubbing .scrub__chapter {
  grid-area: 1 / 1;
  max-width: 18ch; padding-inline: var(--s-5);
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.6vw, 4.6rem);
  line-height: 1.08;
  font-weight: 300;
  color: var(--c-text-invert);
  text-shadow: 0 2px 30px rgba(10, 14, 24, 0.45);
  opacity: var(--o, 0);
  transform: translate3d(0, var(--y, 0), 0);
  will-change: opacity, transform;
}
.has-scrub.is-scrubbing .scrub__cue {
  display: grid; justify-items: center; gap: var(--s-2);
  position: absolute; left: 50%; bottom: clamp(1.5rem, 4vh, 2.5rem);
  transform: translateX(-50%);
  font-size: var(--t-label); letter-spacing: var(--ls-label); text-transform: uppercase;
  color: rgba(240, 237, 230, 0.8);
  opacity: calc(1 - var(--p, 0) * 10);
}
.has-scrub.is-scrubbing .scrub__cue::after {
  content: ''; width: 1px; height: 2.6rem;
  background: linear-gradient(to bottom, rgba(240, 237, 230, 0.85), rgba(240, 237, 230, 0));
  transform-origin: top;
  animation: scrub-cue 2.2s var(--e-inout) infinite;
}
@keyframes scrub-cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}
.has-scrub.is-scrubbing .scrub__bar {
  display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: rgba(240, 237, 230, 0.14);
}
.has-scrub.is-scrubbing .scrub__bar span {
  display: block; height: 100%;
  background: var(--c-brass-bright, var(--c-accent-mark));
  transform: scaleX(0); transform-origin: left;
}
@media (max-width: 860px) {
  .has-scrub.is-scrubbing { height: 260svh; }
}
