/* ============================================================
   Dane & Weiler Farmstay
   Brand theme system: charcoal + cream + olive-sage + gold.
   Two themes driven by CSS custom properties + [data-theme].
   Default = Cottage (light + olive). data-theme="estate" = dark premium.
   ============================================================ */

:root {
  /* Cottage: light + olive (default) */
  --page-bg: #F4EFE6;
  --page-ink: #2A2620;
  --muted: #6B6256;
  --heading: #3C4A2C;
  --accent: #5F6134;
  --accent-strong: #4E502A;
  --accent-ink: #F6F2E9;
  --gold: #C39B54;
  --surface: #E9DFC9;
  --line: rgba(58, 45, 30, 0.14);
  --panel-bg: #1E2016;
  --panel-ink: #EDE7D8;
  --panel-muted: rgba(237, 231, 216, 0.72);
  --panel-line: rgba(237, 231, 216, 0.16);
  --footer-bg: #1E2016;
  --nav-scrolled-bg: rgba(244, 239, 230, 0.92);
  --overlay: rgba(20, 22, 15, 0.5);
  --star: var(--gold);

  --white: #FAF7F1;

  /* One Cormorant, not two. Cormorant and Cormorant Garamond are siblings in the
     same superfamily and are near-indistinguishable at these sizes, so loading
     both cost 11 font files for no visible difference. Kept Cormorant because it
     carries the nav wordmark and hero title, which stay pixel-identical.
     Both roles are retained as separate tokens so they can diverge again later. */
  --font-display: "Cormorant", "Times New Roman", serif;
  --font-brand: "Cormorant", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1200px;
  --radius: 4px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --focus: #4E502A;
}

/* Estate: dark premium */
:root[data-theme="estate"] {
  --page-bg: #1A1916;
  --page-ink: #EDE7D8;
  --muted: rgba(237, 231, 216, 0.66);
  --heading: #F0EADB;
  --accent: #A6A863;
  --accent-strong: #BBBD79;
  --accent-ink: #17160F;
  --gold: #CBA765;
  --surface: #24231D;
  --line: rgba(237, 231, 216, 0.14);
  --panel-bg: #211F19;
  --panel-ink: #EDE7D8;
  --panel-muted: rgba(237, 231, 216, 0.70);
  --panel-line: rgba(237, 231, 216, 0.14);
  --footer-bg: #131209;
  --nav-scrolled-bg: rgba(26, 25, 22, 0.90);
  --overlay: rgba(10, 10, 8, 0.55);
  --focus: #CBA765;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Lenis smooth-scroll base: only active once Lenis adds its classes,
   so native smooth-scroll stays as the fallback if the module can't load. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--page-ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}
/* height:auto is not optional next to max-width:100%. The build stamps width and
   height on every image, which land as presentational hints; CSS aspect-ratio
   only fills an AUTO dimension, so without this the height attribute wins and
   any rule relying on aspect-ratio (.welcome__image, .room) renders full height. */
img { max-width: 100%; height: auto; display: block; }
/* <picture> is a wrapper only: let the <img> stay the real layout child so
   every existing `.thing img` rule and grid sizing keeps working untouched. */
picture { display: contents; }

/* Skip link: first thing in the tab order, off-screen until focused. */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.75em 1.25em;
  background: var(--page-bg);
  color: var(--heading);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }   /* programmatic target, not a control */

/* Anchor targets clear the fixed nav. Mirrors the -74px offset the Lenis
   handler uses in index.njk, so the smooth and native paths land identically.
   Without this, reduced-motion users (Lenis is skipped for them) land with the
   heading tucked under the nav bar. */
section[id],
main[id] { scroll-margin-top: 74px; }

/* Paper grain: a faint film of texture over the whole page so surfaces
   read as crafted rather than flat/templated. Non-interactive. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;   /* above page content, BELOW the nav (50) and the lightbox (100) */
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.045;
  mix-blend-mode: multiply;
}
:root[data-theme="estate"] body::after {
  opacity: 0.08;
  mix-blend-mode: soft-light;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* Focus ring: one rule for the whole site. --focus flips per ground so the
   ring clears 3:1 on cream, sand, the forest panels and over the hero video. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.section--forest,
.book-invite,
.footer,
.hero,
.lightbox,
.nav:not(.is-scrolled) { --focus: var(--gold); }

/* ---------- Typography ---------- */
.h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0.4em 0 0.7em;
  color: var(--heading);
}
.h2--light { color: var(--panel-ink); }
.lede {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 56ch;
}
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.eyebrow--light { color: var(--gold); }

/* ---------- Layout ---------- */
.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}
.section {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
}
.section--cream  { background: var(--page-bg); }
.section--sand   { background: var(--surface); }
.section--forest {
  background: var(--panel-bg);
  color: var(--panel-ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0.95em 1.7em;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}
.btn--ghost {
  border-color: rgba(255,255,255,.7);
  color: var(--white);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.1);
  transform: translateY(-2px);
}
.btn--large { padding: 1.1em 2em; font-size: 1rem; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 1rem 0;
  transition: background .35s var(--ease), backdrop-filter .35s var(--ease), padding .35s var(--ease);
}
.nav.is-scrolled {
  background: var(--nav-scrolled-bg);
  backdrop-filter: blur(8px);
  padding: 0.5rem 0;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--page-ink) 6%, transparent);
}
.nav__inner {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  transition: color .3s var(--ease);
}
.nav.is-scrolled .nav__brand { color: var(--heading); }
.nav__brand-badge {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}
.nav__brand-text {
  white-space: nowrap;
  font-family: var(--font-brand);
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.nav__links a {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,.92);
  transition: color .25s var(--ease);
}
.nav__links a:hover { color: var(--white); }
.nav.is-scrolled .nav__links a { color: var(--page-ink); }
.nav.is-scrolled .nav__links a:hover { color: var(--accent); }

.nav__cta {
  background: var(--accent);
  color: var(--accent-ink) !important;
  padding: 0.7em 1.4em;
  border-radius: var(--radius);
  text-transform: uppercase;
}
.nav__cta:hover { background: var(--accent-strong); }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.35);
  transition: color .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.6);
  transform: translateY(-1px);
}
.nav.is-scrolled .theme-toggle {
  color: var(--page-ink);
  border-color: color-mix(in srgb, var(--page-ink) 22%, transparent);
}
.nav.is-scrolled .theme-toggle:hover {
  background: color-mix(in srgb, var(--page-ink) 8%, transparent);
  border-color: color-mix(in srgb, var(--page-ink) 40%, transparent);
}

.nav__toggle {
  display: none;
  flex: 0 0 auto;       /* was shrinking to 43px as a flex item */
  width: 44px;          /* 44x44 hit area; the bars stay 24px so the mark is unchanged */
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  color: var(--white);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav.is-scrolled .nav__toggle span { background: var(--heading); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img,
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__media img,
.hero__media video {
  transform: scale(1.06);
  animation: heroKenBurns 28s ease-out forwards;
}
@keyframes heroKenBurns {
  from { transform: scale(1.06); }
  to   { transform: scale(1.17); }
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Cinematic scrim: let the landscape breathe up top, focus the centre,
     sink the base for legible type + scroll cue. Warm, not grey. */
  background:
    radial-gradient(125% 85% at 50% 34%, transparent 34%, rgba(18,16,10,0.34) 100%),
    linear-gradient(180deg, rgba(20,18,12,0.22) 0%, rgba(20,18,12,0.06) 42%, rgba(15,13,8,0.56) 100%);
}
.hero__content {
  text-align: center;
  padding: 0 1.5rem;
  max-width: 820px;
  text-shadow: 0 1px 18px rgba(15, 25, 15, 0.45);
  transform: translateY(20px);
  opacity: 0;
  animation: heroFade 1.2s var(--ease) 0.3s forwards;
}
@keyframes heroFade {
  to { transform: translateY(0); opacity: 1; }
}
.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  color: rgba(255,255,255,.88);
}
.hero__title {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: clamp(3rem, 9vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0.005em;
  margin: 0;
}
.hero__title span {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
.hero__lede {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  max-width: 55ch;
  margin: 1.6rem auto 2.4rem;
  color: rgba(255,255,255,.92);
}
.hero__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(255,255,255,.6);
  border-radius: 14px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}
/* Hit area only: the capsule stays 26px, the tappable box reaches 44px. */
.hero__scroll::after {
  content: "";
  position: absolute;
  inset: -9px;
}
.hero__scroll span {
  width: 2px;
  height: 8px;
  background: rgba(255,255,255,.85);
  border-radius: 1px;
  animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  60%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Welcome ---------- */
.welcome {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.welcome__copy p:not(.eyebrow):not(.lede) {
  color: var(--page-ink);
}
.welcome__image img {
  border-radius: var(--radius);
  aspect-ratio: 4/5;
  object-fit: cover;
  box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--page-ink) 35%, transparent);
}

/* ---------- Property stats ---------- */
.property__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 3rem 0;
}
.property__card {
  text-align: center;
  padding: 1.6rem 0.75rem 0;
  /* De-boxed: an editorial hairline column, not a bordered card */
  border-top: 1px solid color-mix(in srgb, var(--gold) 42%, transparent);
}
.property__num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--gold);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}
.property__label {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--panel-muted);
  margin-top: 0.75rem;
}
.property__feature {
  margin-top: 3rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.property__feature img {
  width: 100%;
  height: clamp(280px, 50vw, 540px);
  object-fit: cover;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 0.9rem;
  margin-top: 2.5rem;
}
.gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
  cursor: pointer;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--ease);
}
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 1.1rem 1rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(15,13,8,0.78));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  pointer-events: none;
}
.gallery__item:hover figcaption {
  opacity: 1;
  transform: none;
}
/* Touch devices have no hover, so these never appeared there. Made explicit
   rather than left as an accident of the hover default: the caption text is a
   verbatim copy of the image's alt, so screen readers already have it and a
   permanent overlay on every photo would only add clutter on a small screen. */
@media (hover: none) {
  .gallery__item figcaption { display: none; }
}
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }

/* Four-image gallery: two tall on left, one square top-right, one wide below */
.gallery--four {
  grid-template-columns: 1fr 1fr 1fr;
  grid-auto-rows: 280px;
  max-width: 1100px;
  margin-inline: auto;
}
.gallery--four .gallery__item--tall { grid-row: span 2; grid-column: span 1; }
.gallery--four .gallery__item--wide { grid-column: span 2; }

/* ---------- Experience / Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.feature {
  padding: 2rem;
  /* Borderless default; on hover the card lifts with a soft shadow (original effect) */
  background: var(--page-bg);
  border-radius: var(--radius);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -25px color-mix(in srgb, var(--page-ink) 25%, transparent);
}
.feature__icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.feature__icon svg { width: 100%; height: 100%; }
.feature h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  color: var(--heading);
}
.feature p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Location ---------- */
.location {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.location__list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.location__list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.location__list li strong { color: var(--page-ink); font-weight: 600; }
.location__map {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--page-ink) 35%, transparent);
}
.location__map img {
  aspect-ratio: 4/5;
  object-fit: cover;
  width: 100%;
}
.location__map__canvas {
  aspect-ratio: 4/5;
  width: 100%;
  height: auto;
  display: block;
  background: var(--page-bg); /* failed/loading tiles degrade to on-brand cream */
  z-index: 0;
}
.leaflet-container { font-family: inherit; background: var(--page-bg); }
a.location__pin {
  text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
a.location__pin:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--page-ink) 45%, transparent);
}
.location__pin {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: var(--page-bg);
  padding: 0.6em 1.1em;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--heading);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--page-ink) 35%, transparent);
  z-index: 1000; /* sit above Leaflet panes/controls (~z 800) */
}

/* ---------- Reviews ---------- */
.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  margin-top: 3rem;
}
.review {
  margin: 0;
  padding: 2.2rem;
  background: color-mix(in srgb, var(--panel-ink) 7%, transparent);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
}
.review__stars {
  color: var(--star);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}
.review p {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.5;
  margin: 0 0 1.2rem;
}
.review footer {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--panel-muted);
}
.review--platform {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
}
a.review--platform:hover {
  transform: translateY(-4px);
  background: color-mix(in srgb, var(--panel-ink) 12%, transparent);
  border-color: color-mix(in srgb, var(--panel-ink) 35%, transparent);
}
.review--platform .review__stars { letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.9rem; }
.review--soon { opacity: 0.82; }
.lede--light { color: var(--panel-muted); max-width: 640px; }

/* Featured pull-quote: the pinned review, given room to breathe */
.review--featured {
  /* Full content width so its edges line up with the row of cards below */
  margin: 3.2rem 0 0;
  padding: clamp(2.4rem, 5vw, 3.4rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}
.review--featured .review__stars {
  color: var(--star);
  letter-spacing: 0.28em;
  margin-bottom: 1.4rem;
}
.review--featured blockquote {
  margin: 0 auto;
  max-width: 780px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.34;
  color: var(--panel-ink);
}
.review--featured footer {
  margin-top: 1.6rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--panel-muted);
}
/* Remaining reviews auto-fit so 2 (or any count) fill the row cleanly */
.reviews--rest {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2.6rem;
  align-items: start;
}

/* ---------- Reviews carousel (JS-enhanced; static grid without it) ---------- */
.reviews__rotator { position: relative; }

/* Controls are built by JS only; hidden until the carousel activates */
.reviews__controls { display: none; }
.js .reviews__rotator.is-carousel .reviews__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.6rem;
}

/* Stack every page in a single grid cell → the track auto-sizes to the tallest
   page, so uneven testimonial lengths never clip and never jump the layout. */
.js .reviews__rotator.is-carousel .reviews--rest {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 2.6rem;
}
.js .reviews__rotator.is-carousel .reviews__page {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
  align-items: start;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s var(--ease);
}
.js .reviews__rotator.is-carousel .reviews__page.is-active {
  opacity: 1;
  visibility: visible;
}

/* Controls: dark forest theme, reuse tokens */
.reviews__nav { display: inline-flex; gap: 0.5rem; }
/* Dots stay 9px visually. ::after gives each a 27px hit area, and the gap is
   widened to 1.15rem so adjacent targets sit 27.4px apart and never overlap. */
.reviews__pager { display: inline-flex; align-items: center; gap: 1.15rem; }

.reviews__ctrl {
  font: inherit;
  line-height: 1;
  cursor: pointer;
  color: var(--panel-ink);
  background: color-mix(in srgb, var(--panel-ink) 7%, transparent);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
  transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.reviews__ctrl:hover {
  background: color-mix(in srgb, var(--panel-ink) 14%, transparent);
  border-color: color-mix(in srgb, var(--gold) 60%, transparent);
}
.reviews__ctrl:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.reviews__ctrl--prev,
.reviews__ctrl--next {
  font-size: 1rem;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
}

.reviews__dot {
  width: 9px; height: 9px; padding: 0;
  position: relative;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--panel-ink) 45%, transparent);
  background: transparent;
  cursor: pointer;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.reviews__dot::after { content: ""; position: absolute; inset: -9px; }
.reviews__dot:hover { border-color: var(--gold); }
.reviews__dot.is-active {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.15);
}
.reviews__dot:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Reduced motion: no cross-fade even if a carousel exists mid-session */
@media (prefers-reduced-motion: reduce) {
  .js .reviews__rotator.is-carousel .reviews__page { transition: none; }
}

/* Live Airbnb rating badge */
.reviews__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
  padding: 0.6rem 1.1rem;
  background: color-mix(in srgb, var(--panel-ink) 7%, transparent);
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.reviews__badge:hover {
  background: color-mix(in srgb, var(--panel-ink) 12%, transparent);
  border-color: color-mix(in srgb, var(--panel-ink) 38%, transparent);
  transform: translateY(-2px);
}
.reviews__badge-stars { color: var(--star); letter-spacing: 0.12em; }
.reviews__badge-score { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.reviews__badge-count {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--panel-muted);
}

/* ---------- Rooms (Where you'll sleep) ---------- */
.rooms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  margin-top: 3rem;
}
.room {
  margin: 0;
  cursor: pointer;
}
.room img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform .6s var(--ease);
}
.room:hover img { transform: scale(1.03); }
.room figcaption strong { font-weight: 600; }   /* 700 is not loaded; avoid a synthesised bold */
.room figcaption {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ---------- Book details list ---------- */
.book__details {
  list-style: none;
  padding: 0;
  margin: 1.8rem auto 0.5rem;
  max-width: 460px;
  text-align: left;
  display: grid;
  gap: 0.7rem;
}
.book__details li {
  padding-left: 1.4rem;
  position: relative;
  font-size: 0.97rem;
  color: var(--page-ink);
}
.book__details li::before {
  content: "\00B7";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Book ---------- */
.book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.book--centered {
  display: block;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.book--centered .lede {
  margin-left: auto;
  margin-right: auto;
}
.book--centered .btn { margin-top: 0; }

/* Book: a full-bleed invitation band. One warm image, one button, nothing else */
.book-invite {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(360px, 44vw, 520px);
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.book-invite__media { position: absolute; inset: 0; z-index: -2; }
.book-invite__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}
.book-invite__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 95% at 50% 50%, transparent 32%, rgba(15,13,8,0.52) 100%),
    linear-gradient(180deg, rgba(15,13,8,0.42) 0%, rgba(15,13,8,0.16) 46%, rgba(15,13,8,0.58) 100%);
}
.book-invite__inner { text-align: center; }
.book-invite__title {
  margin: 0 0 1.6rem;
  color: var(--white);
  text-shadow: 0 1px 18px rgba(15, 25, 15, 0.5);
}
.book-invite .btn--large {
  box-shadow: 0 18px 44px -18px rgba(0,0,0,0.6);
}
.book__sub {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.book__sub a {
  color: var(--heading);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity .25s var(--ease);
}
.book__sub a:hover { opacity: 0.7; }
.book__form {
  background: var(--page-bg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius);
  display: grid;
  gap: 1.2rem;
  box-shadow: 0 30px 80px -40px color-mix(in srgb, var(--page-ink) 35%, transparent);
}
.field { display: grid; gap: 0.4rem; }
.field--row {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field--row > div { display: grid; gap: 0.4rem; }
.field label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea {
  font: inherit;
  padding: 0.85em 1em;
  border: 1px solid color-mix(in srgb, var(--page-ink) 18%, transparent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--page-ink);
  transition: border .25s var(--ease), background .25s var(--ease);
}
.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: var(--page-bg);
}
.book__note {
  font-size: 0.95rem;
  padding: 0.8em 1em;
  border-radius: var(--radius);
  margin: 0;
}
.book__note.is-success {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--heading);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.book__note.is-error {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--footer-bg);
  color: color-mix(in srgb, var(--panel-ink) 85%, transparent);
  padding-top: 4rem;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding-bottom: 3rem;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer__mark {
  font-family: var(--font-display);
  font-size: 1.1rem;
  border: 1.5px solid currentColor;
  width: 2.6em;
  height: 2.6em;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.footer__brand p { margin: 0; font-size: 0.92rem; line-height: 1.5; }
.footer__logo { width: 132px; height: auto; flex: 0 0 auto; display: block; }
.footer__links {
  display: flex;
  gap: 1.6rem;
  justify-content: center;
  font-size: 0.9rem;
}
.footer__links a:hover { color: var(--panel-ink); }
.footer__social {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}
.footer__social a {
  width: 44px;
  height: 44px;
  border: 1px solid var(--panel-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: border .25s var(--ease), color .25s var(--ease);
}
.footer__social a:hover {
  border-color: var(--panel-ink);
  color: var(--panel-ink);
}
.footer__base {
  border-top: 1px solid var(--panel-line);
  padding: 1.5rem 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  display: flex;
  justify-content: space-between;
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
  color: var(--panel-muted);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--panel-bg) 94%, transparent);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 2rem;
  opacity: 0;
  animation: fadeIn .25s var(--ease) forwards;
}
.lightbox[hidden] { display: none; }
@keyframes fadeIn { to { opacity: 1; } }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 40px 120px rgba(0,0,0,.5);
}
.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.5rem;
  color: var(--panel-ink);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  line-height: 1;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: var(--panel-ink);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  line-height: 1;
  border-radius: 50%;
  background: color-mix(in srgb, var(--panel-ink) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--panel-ink) 25%, transparent);
  cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease);
  z-index: 101;
}
.lightbox__nav:hover {
  background: color-mix(in srgb, var(--panel-ink) 20%, transparent);
  transform: translateY(-50%) scale(1.06);
}
.lightbox__nav--prev { left: 1.5rem; }
.lightbox__nav--next { right: 1.5rem; }
.lightbox__count {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--panel-muted);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
}
@media (max-width: 720px) {
  .lightbox { padding: 1rem; }
  .lightbox__nav { width: 44px; height: 44px; font-size: 2.2rem; }
  .lightbox__nav--prev { left: 0.6rem; }
  .lightbox__nav--next { right: 0.6rem; }
}

/* ---------- Scroll reveal ----------
   Default: visible (so no-JS / SEO / print all work).
   Only hidden when JS has added .js to <html>. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}
/* Stagger grid children in one-by-one as their section reveals */
.js .stagger-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-in .stagger-item {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .welcome,
  .location,
  .book {
    grid-template-columns: 1fr;
  }
  .property__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery,
  .gallery.gallery--four {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
  /* Uniform tiles from 960px down. With mixed spans in a 2-column grid,
     grid-auto-flow:dense back-fills gaps and the visual order stops matching
     the DOM order, which is now the tab order too (the figures are focusable).
     Measured: reordered at 768px, correct once the spans are dropped. The
     <=720px block already did this; this just starts it one breakpoint earlier. */
  .gallery .gallery__item--wide,
  .gallery .gallery__item--tall { grid-column: span 1; grid-row: span 1; }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .reviews {
    grid-template-columns: 1fr;
  }
  .rooms {
    grid-template-columns: 1fr;
  }
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer__brand { justify-content: center; }
  .footer__links { justify-content: center; flex-wrap: wrap; }
  .footer__social { justify-content: center; }
  .footer__base { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* Nav collapses to the menu button below 1080px.
   Measured, not guessed: seven links plus the CTA, the theme toggle and a
   Cormorant wordmark only sit on one line at 1080px and up. At 900-1024 the
   wordmark broke to two lines (nav 107px tall); from 721-880 it broke to three
   and the bar overflowed its track at 144px tall, swallowing the theme toggle.
   768px is iPad portrait, so that range was not a corner case. */
@media (max-width: 1080px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--page-bg);
    padding: 1.5rem;
    gap: 1.2rem;
    box-shadow: 0 12px 30px -15px rgba(0,0,0,.2);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { color: var(--page-ink) !important; }
  .nav__cta { display: inline-block; align-self: flex-start; }
  .nav__toggle { display: flex; }
}

/* Very narrow phones: the wordmark no longer wraps (it used to break mid-name),
   so the bar needs the room back. Measured at 320px: 277px of content in a
   280px track. */
@media (max-width: 380px) {
  .nav__inner { gap: 1rem; }
  .nav__brand { gap: 0.5rem; }
  .nav__brand-text { font-size: 1.15rem; }
}

@media (max-width: 720px) {
  .features {
    grid-template-columns: 1fr;
  }
  .gallery,
  .gallery.gallery--four {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }
  .gallery .gallery__item--wide,
  .gallery .gallery__item--tall,
  .gallery--four .gallery__item--wide,
  .gallery--four .gallery__item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }
  .property__grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .field--row { grid-template-columns: 1fr; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .stagger-item { opacity: 1; transform: none; }
}
