/* ==========================================================================
   Jathan Properties — Design System
   Direction: "Quiet Luxury" — warm editorial. Paper, ink, evergreen, brass.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Neutrals — warm, never cold grey */
  --paper:        #FBF9F4;
  --paper-deep:   #F5F1E8;
  --surface:      #F1EBDE;
  --surface-2:    #E8E0CE;
  --line:         #E2DACA;
  --line-strong:  #CFC5B0;

  /* Ink */
  --ink:          #16150F;
  --ink-soft:     #3B382D;
  --muted:        #6B6659;

  /* Accents */
  --forest:       #22362C;
  --forest-2:     #2E4A3B;
  --forest-3:     #3D6151;
  --brass:        #A8823F;
  --brass-light:  #CBA96B;
  --brass-text:   #7A5C22;   /* AA-safe brass on paper */

  /* Semantic */
  --bg:           var(--paper);
  --fg:           var(--ink);

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans:    "Instrument Sans", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;

  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.1875rem;
  --step-2:  clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem);
  --step-3:  clamp(1.625rem, 1.3rem + 1.4vw, 2.125rem);
  --step-4:  clamp(2rem, 1.5rem + 2.4vw, 3.125rem);
  --step-5:  clamp(2.125rem, 1.25rem + 4.2vw, 4.5rem);
  --step-6:  clamp(2.5rem, 1.2rem + 6vw, 6rem);

  /* Space — 4px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  --gutter: clamp(20px, 5vw, 56px);
  --maxw: 1280px;
  --maxw-text: 68ch;

  /* Shape */
  --r-sm: 3px;
  --r-md: 5px;
  --r-pill: 999px;

  /* Elevation — soft, warm, never blue-black */
  --sh-1: 0 1px 2px rgba(34, 30, 18, .05);
  --sh-2: 0 4px 14px -6px rgba(34, 30, 18, .13), 0 1px 3px rgba(34, 30, 18, .05);
  --sh-3: 0 18px 44px -20px rgba(34, 30, 18, .30), 0 3px 10px -4px rgba(34, 30, 18, .10);
  --sh-4: 0 40px 90px -40px rgba(20, 18, 10, .55);

  /* Motion */
  --e-out: cubic-bezier(.22, 1, .36, 1);
  --e-io:  cubic-bezier(.65, .05, .36, 1);
  --t-fast: 150ms var(--e-out);
  --t-base: 240ms var(--e-out);
  --t-slow: 620ms var(--e-out);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; background-color: var(--surface); }

/* [hidden] must win over layout utilities set on the same element */
[hidden] { display: none !important; }

input, button, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

:where(h1, h2, h3, h4) {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.022em;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 100;
  text-wrap: balance;
}

/* Fraunces defaults to old-style figures; prices and counts need lining ones */
.card__price, .booking__price b, .booking__total b, .hero__stat b,
.split__badge b, .nearby span, .assurance__item h3, .feature-list__num,
.card__index, .lightbox__bar { font-variant-numeric: lining-nums tabular-nums; }

p { text-wrap: pretty; }

::selection { background: var(--brass-light); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--forest-3);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: var(--s-4); top: var(--s-4);
  z-index: 999; padding: 12px 20px;
  background: var(--forest); color: var(--paper);
  border-radius: var(--r-md);
  transform: translateY(-200%);
  transition: transform var(--t-base);
}
.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 940px; }

.section { padding-block: clamp(56px, 9vw, 128px); }
.section--tight { padding-block: clamp(40px, 6vw, 80px); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-6); flex-wrap: wrap;
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(28px, 4vw, 56px);
}
.section-head__title { font-size: var(--step-4); max-width: 18ch; }
.section-head__aside { max-width: 42ch; color: var(--muted); font-size: var(--step--1); }

/* Eyebrow — the small caps rule that ties the whole system together */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--brass-text);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--brass); flex: none;
}
.eyebrow--light { color: var(--brass-light); }
.eyebrow--light::before { background: var(--brass-light); }
.eyebrow--center { }

.lede {
  font-size: var(--step-1);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 58ch;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--forest);
  --btn-fg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  padding: 13px 26px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: var(--step--1); font-weight: 500; letter-spacing: .02em;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  position: relative; overflow: hidden;
  transition: background var(--t-base), color var(--t-base),
              transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  will-change: transform;
}
.btn:hover { background: var(--forest-2); transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { --btn-bg: var(--surface); border-color: var(--ink); box-shadow: none; }

.btn--brass { --btn-bg: var(--brass); --btn-fg: #1B1503; }
.btn--brass:hover { background: var(--brass-light); }

.btn--light { --btn-bg: var(--paper); --btn-fg: var(--ink); }
.btn--light:hover { background: #fff; }

.btn--outline-light { --btn-bg: transparent; --btn-fg: var(--paper); border-color: rgba(251,249,244,.34); }
.btn--outline-light:hover { --btn-bg: rgba(251,249,244,.09); border-color: rgba(251,249,244,.7); }

.btn--block { width: 100%; }
.btn--lg { min-height: 56px; padding: 16px 34px; font-size: var(--step-0); }

/* Text link with animated rule */
.link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--step--1); font-weight: 500;
  padding-bottom: 3px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size var(--t-base), color var(--t-base), gap var(--t-base);
}
.link:hover { gap: 12px; background-size: 0% 1px; }
.link svg { transition: transform var(--t-base); }
.link:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  border-bottom: 1px solid transparent;
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5); min-height: 78px;
}
.header--solid {
  background: rgba(251, 249, 244, .93);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--line);
}
.header--solid .nav__link,
.header--solid .brand { color: var(--ink); }
.header--solid .btn--outline-light { --btn-fg: var(--ink); border-color: var(--line-strong); }
.header--solid .btn--outline-light:hover { --btn-bg: var(--surface); border-color: var(--ink); }

/* Interior pages: the header sits on paper from the outset */
.header--static { position: sticky; background: var(--paper); border-bottom-color: var(--line); }
.header--static .nav__link,
.header--static .brand { color: var(--ink); }
.header--static .btn--outline-light { --btn-fg: var(--ink); border-color: var(--line-strong); }
.header--static .btn--outline-light:hover { --btn-bg: var(--surface); border-color: var(--ink); }
@media (max-width: 860px) {
  .header--static .nav { top: 78px; }
}

.brand {
  display: inline-flex; align-items: baseline; gap: 9px;
  color: var(--paper);
  transition: color var(--t-base), opacity var(--t-base);
}
.brand__mark {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 500; letter-spacing: -.03em;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 60;
}
.brand__sub {
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  font-weight: 500; opacity: .72;
}
.brand:hover { opacity: .82; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav__link {
  position: relative;
  font-size: var(--step--1); font-weight: 500;
  color: var(--paper);
  padding: 6px 0;
  transition: color var(--t-base), opacity var(--t-base);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--t-base);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"] { color: var(--brass-light); }
.header--solid .nav__link[aria-current="page"],
.header--static .nav__link[aria-current="page"] { color: var(--brass-text); }

.header__actions { display: flex; align-items: center; gap: var(--s-3); }

.nav-toggle {
  display: none; width: 46px; height: 46px;
  align-items: center; justify-content: center;
  color: var(--paper);
  border: 1px solid rgba(251, 249, 244, .34); border-radius: var(--r-md);
  transition: color var(--t-base), border-color var(--t-base);
}
.header--solid .nav-toggle,
.header--static .nav-toggle { color: var(--ink); border-color: var(--line-strong); }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: background var(--t-fast); }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: currentColor;
  transition: transform var(--t-base), top var(--t-base);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(100svh, 900px);
  display: flex; align-items: flex-end;
  padding-top: 120px; padding-bottom: clamp(48px, 7vw, 96px);
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  animation: kenburns 26s var(--e-io) infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(-1.2%, -1.4%, 0); }
}
/* Three stacked washes: a top band for the nav, a left column for the
   headline, and a deep foot so the availability card has something to sit on. */
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,13,10,.58) 0%, rgba(10,13,10,.10) 26%, rgba(10,13,10,.34) 58%, rgba(10,13,10,.90) 100%),
    linear-gradient(96deg, rgba(12,20,15,.86) 0%, rgba(12,20,15,.62) 34%, rgba(12,20,15,.18) 68%, transparent 92%),
    radial-gradient(130% 90% at 15% 105%, rgba(15,28,21,.72), transparent 62%);
}
.hero__scrim::after {
  content: ""; position: absolute; inset: 0;
  background-image: var(--grain); opacity: .11; mix-blend-mode: overlay;
}
.hero__inner { position: relative; width: 100%; text-shadow: 0 1px 24px rgba(8, 12, 9, .38); }
.hero__title {
  font-size: var(--step-6);
  font-weight: 300;
  letter-spacing: -.035em;
  max-width: 15ch;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 144;
}
.hero__title em {
  font-style: italic; font-weight: 400;
  color: var(--brass-light);
  font-variation-settings: "SOFT" 12, "WONK" 1, "opsz" 144;
}
.hero__sub { max-width: 46ch; margin-top: var(--s-5); font-size: var(--step-1); color: rgba(251,249,244,.86); }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: var(--s-5) var(--s-7);
  margin-top: var(--s-7); padding-top: var(--s-5);
  border-top: 1px solid rgba(251,249,244,.22);
}
.hero__stat { display: flex; flex-direction: column; gap: 2px; }
.hero__stat b {
  font-family: var(--font-display); font-size: var(--step-2); font-weight: 400;
  letter-spacing: -.02em;
}
.hero__stat span { font-size: var(--step--2); letter-spacing: .16em; text-transform: uppercase; color: rgba(251,249,244,.62); }

/* Page header for interior pages */
.pagehead { padding-top: 130px; padding-bottom: clamp(36px, 5vw, 64px); background: var(--paper); }
.pagehead__title { font-size: var(--step-5); font-weight: 300; letter-spacing: -.032em; max-width: 16ch; }
.pagehead__title em { font-style: italic; color: var(--brass-text); }
.pagehead__sub { margin-top: var(--s-4); }

/* --------------------------------------------------------------------------
   7. Availability bar
   -------------------------------------------------------------------------- */
.availability {
  position: relative; z-index: 5;
  margin-top: calc(-1 * clamp(40px, 5vw, 60px));
}
.availability__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  padding: var(--s-3);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: var(--s-2);
  align-items: stretch;
}
.field { display: flex; flex-direction: column; gap: 4px; padding: 10px 16px; border-radius: var(--r-sm); transition: background var(--t-fast); position: relative; }
.field + .field::before {
  content: ""; position: absolute; left: calc(var(--s-2) * -1 / 2 - 1px); top: 18%; bottom: 18%;
  width: 1px; background: var(--line);
}
.field:focus-within { background: var(--surface); }
.field label { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.field input, .field select {
  border: 0; background: transparent; padding: 2px 0;
  font-size: var(--step--1); font-weight: 500; color: var(--ink);
  width: 100%; min-height: 26px;
}
.field input:focus, .field select:focus { outline: none; }
.field select { appearance: none; cursor: pointer; }

/* --------------------------------------------------------------------------
   8. Property cards
   -------------------------------------------------------------------------- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: clamp(28px, 3.4vw, 52px) clamp(20px, 2.6vw, 36px);
}

.card { position: relative; display: flex; flex-direction: column; }
.card__media {
  position: relative; overflow: hidden;
  border-radius: var(--r-md);
  background: var(--surface);
  aspect-ratio: 4 / 3;
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 900ms var(--e-out), filter var(--t-base);
}
.card:hover .card__media img { transform: scale(1.05); }
.card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,16,12,.28) 0%, transparent 32%, transparent 58%, rgba(14,16,12,.42) 100%);
  opacity: .9;
  pointer-events: none;
}
.card__index {
  position: absolute; top: 14px; left: 16px; z-index: 2;
  font-family: var(--font-display); font-size: var(--step--1); font-weight: 500;
  color: rgba(251,249,244,.9); letter-spacing: .04em;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
.card__city {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: rgba(251,249,244,.92);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
  color: var(--ink);
}
.card__price {
  position: absolute; left: 16px; bottom: 14px; z-index: 2;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: var(--step-2); font-weight: 400; letter-spacing: -.02em;
  text-shadow: 0 1px 10px rgba(0,0,0,.45);
}
.card__price small { font-family: var(--font-sans); font-size: var(--step--2); font-weight: 500; opacity: .8; letter-spacing: .04em; }

.card__body { padding-top: var(--s-4); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { font-size: var(--step-2); letter-spacing: -.02em; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: var(--r-md); }
.card__excerpt { font-size: var(--step--1); color: var(--muted); line-height: 1.55; }
.card__specs {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: auto; padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  font-size: var(--step--2); color: var(--ink-soft);
  letter-spacing: .01em;
}
.card__specs span { display: inline-flex; align-items: center; gap: 6px; }
.card__specs svg { width: 15px; height: 15px; color: var(--brass-text); flex: none; }

/* Featured / editorial card variant */
.card--wide { grid-column: span 2; }
.card--wide .card__media { aspect-ratio: 16 / 9; }
@media (max-width: 780px) { .card--wide { grid-column: span 1; } .card--wide .card__media { aspect-ratio: 4/3; } }

/* --------------------------------------------------------------------------
   9. Filter rail
   -------------------------------------------------------------------------- */
.filters {
  position: sticky; top: 78px; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-block: var(--s-4);
  margin-bottom: clamp(28px, 4vw, 48px);
}
.filters__row { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; justify-content: space-between; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  min-height: 40px; padding: 8px 18px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  font-size: var(--step--1); font-weight: 500; color: var(--ink-soft);
  transition: all var(--t-fast);
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.chip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.chip[aria-pressed="true"]:hover { background: var(--forest-2); }

.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select {
  appearance: none; min-height: 40px; padding: 8px 40px 8px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: transparent; font-size: var(--step--1); font-weight: 500; cursor: pointer;
  transition: border-color var(--t-fast);
}
.select-wrap select:hover { border-color: var(--ink); }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; width: 7px; height: 7px;
  border-right: 1.5px solid var(--ink-soft); border-bottom: 1.5px solid var(--ink-soft);
  transform: translateY(-2px) rotate(45deg); pointer-events: none;
}
.result-count { font-size: var(--step--1); color: var(--muted); }
.result-count b { color: var(--ink); font-weight: 600; }

.empty-state {
  text-align: center; padding: clamp(48px, 8vw, 96px) 0;
  border: 1px dashed var(--line-strong); border-radius: var(--r-md);
}
.empty-state h3 { font-size: var(--step-3); margin-bottom: var(--s-3); }
.empty-state p { color: var(--muted); max-width: 42ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   10. Detail page
   -------------------------------------------------------------------------- */
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: var(--step--2); color: var(--muted); letter-spacing: .05em; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { opacity: .5; }

.detail-head { padding-top: 110px; padding-bottom: var(--s-5); }
.detail-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; margin-top: var(--s-4); }
.detail-head__title { font-size: var(--step-4); font-weight: 300; letter-spacing: -.03em; max-width: 20ch; }
.detail-head__loc { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s-3); color: var(--muted); font-size: var(--step--1); }
.detail-head__loc svg { width: 16px; height: 16px; color: var(--brass-text); }

/* Gallery mosaic */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(140px, 1fr));
  gap: 8px;
  height: clamp(340px, 52vw, 560px);
  border-radius: var(--r-md);
  overflow: hidden;
}
.gallery__item { position: relative; overflow: hidden; background: var(--surface); }
.gallery__item:first-child { grid-row: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 800ms var(--e-out), opacity var(--t-base); }
.gallery__item:hover img { transform: scale(1.045); }
.gallery { position: relative; }
.gallery__more {
  position: absolute; right: 16px; bottom: 16px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-md);
  background: rgba(251,249,244,.95); color: var(--ink);
  font-size: var(--step--1); font-weight: 500; white-space: nowrap;
  box-shadow: var(--sh-2);
  transition: background var(--t-fast), transform var(--t-fast);
}
.gallery__more svg { width: 16px; height: 16px; color: var(--brass-text); }
.gallery__more:hover { background: #fff; transform: translateY(-1px); }
@media (max-width: 860px) {
  .gallery { grid-template-columns: 1fr 1fr; height: clamp(260px, 62vw, 400px); }
  .gallery__item:nth-child(n+4) { display: none; }
}

/* Detail layout */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-block { padding-block: clamp(32px, 4vw, 52px); border-top: 1px solid var(--line); }
.detail-block:first-child { border-top: 0; padding-top: 0; }
.detail-block h2 { font-size: var(--step-3); margin-bottom: var(--s-5); }
.detail-block h3 { font-size: var(--step-1); font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; margin-bottom: 6px; }
.prose p { color: var(--ink-soft); margin-bottom: var(--s-4); max-width: var(--maxw-text); }
.prose p:last-child { margin-bottom: 0; }

.feature-list { display: grid; gap: var(--s-5); }
.feature-list > li { list-style: none; display: grid; grid-template-columns: 34px 1fr; gap: var(--s-4); }
.feature-list__num {
  font-family: var(--font-display); font-size: var(--step--1); color: var(--brass-text);
  padding-top: 3px; letter-spacing: .04em;
}
.feature-list p { color: var(--muted); font-size: var(--step--1); line-height: 1.6; margin: 0; }

.amenities { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s-4) var(--s-5); padding: 0; margin: 0; }
.amenities li { list-style: none; display: flex; align-items: center; gap: 12px; font-size: var(--step--1); color: var(--ink-soft); }
.amenities svg { width: 18px; height: 18px; color: var(--forest-3); flex: none; }

.nearby { display: grid; gap: 0; }
.nearby li {
  list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4);
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
}
.nearby li:first-child { border-top: 1px solid var(--line); }
.nearby b { font-weight: 500; color: var(--ink); }
.nearby span { color: var(--brass-text); font-family: var(--font-display); white-space: nowrap; letter-spacing: .01em; }
.nearby__dots { flex: 1; border-bottom: 1px dotted var(--line-strong); transform: translateY(-4px); }

/* Booking card */
.booking {
  position: sticky; top: 104px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-2);
  padding: var(--s-5);
}
.booking__price { display: flex; align-items: baseline; gap: 8px; padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.booking__price b { font-family: var(--font-display); font-size: var(--step-3); font-weight: 400; letter-spacing: -.025em; }
.booking__price span { font-size: var(--step--1); color: var(--muted); }
.booking__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); margin: var(--s-4) 0; overflow: hidden; }
.booking__fields .field { background: var(--paper); border-radius: 0; }
.booking__fields .field + .field::before { display: none; }
.booking__fields .field--full { grid-column: span 2; }
.booking__lines { display: grid; gap: 10px; margin: var(--s-4) 0; font-size: var(--step--1); }
.booking__lines div { display: flex; justify-content: space-between; gap: var(--s-4); color: var(--muted); }
.booking__lines div u { text-decoration: none; border-bottom: 1px dotted var(--line-strong); }
.booking__total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: var(--s-4); border-top: 1px solid var(--line);
  margin-bottom: var(--s-4);
}
.booking__total b { font-family: var(--font-display); font-size: var(--step-2); font-weight: 400; }
.booking__note { margin-top: var(--s-3); font-size: var(--step--2); color: var(--muted); text-align: center; }
.booking__host { display: flex; align-items: center; gap: 12px; margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.booking__host-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--forest); color: var(--brass-light);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: var(--step--1);
}
.booking__host p { font-size: var(--step--2); color: var(--muted); line-height: 1.45; }
.booking__host b { display: block; color: var(--ink); font-size: var(--step--1); font-weight: 600; }

/* --------------------------------------------------------------------------
   11. Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(11, 13, 10, .965);
  display: grid; grid-template-rows: auto 1fr auto;
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.lightbox[data-open="true"] { opacity: 1; visibility: visible; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; padding: var(--s-4) var(--gutter); color: rgba(251,249,244,.8); font-size: var(--step--1); }
.lightbox__stage { position: relative; display: grid; place-items: center; padding: 0 var(--gutter); min-height: 0; }
.lightbox__stage img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: var(--r-sm); box-shadow: var(--sh-4);
  animation: lbIn 380ms var(--e-out);
}
@keyframes lbIn { from { opacity: 0; transform: scale(.985) } to { opacity: 1; transform: none } }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(251,249,244,.1); color: var(--paper);
  display: grid; place-items: center;
  border: 1px solid rgba(251,249,244,.2);
  transition: background var(--t-fast), transform var(--t-fast);
}
.lightbox__nav:hover { background: rgba(251,249,244,.22); }
.lightbox__nav--prev { left: max(12px, calc(var(--gutter) - 62px)); }
.lightbox__nav--next { right: max(12px, calc(var(--gutter) - 62px)); }
.lightbox__thumbs { display: flex; gap: 8px; overflow-x: auto; padding: var(--s-4) var(--gutter); scrollbar-width: thin; }
.lightbox__thumbs img {
  width: 84px; height: 58px; object-fit: cover; border-radius: 2px; flex: none;
  opacity: .38; cursor: pointer; transition: opacity var(--t-fast), outline-color var(--t-fast);
  outline: 1.5px solid transparent; outline-offset: 2px;
}
.lightbox__thumbs img:hover { opacity: .75; }
.lightbox__thumbs img[data-active="true"] { opacity: 1; outline-color: var(--brass); }
.lightbox__close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--paper); transition: background var(--t-fast); }
.lightbox__close:hover { background: rgba(251,249,244,.14); }
body[data-lb-open="true"] { overflow: hidden; }

/* --------------------------------------------------------------------------
   12. Dark editorial band
   -------------------------------------------------------------------------- */
.band {
  position: relative;
  background: var(--forest);
  color: var(--paper);
  isolation: isolate;
  overflow: hidden;
}
.band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--grain); opacity: .13; mix-blend-mode: overlay;
}
.band::after {
  content: ""; position: absolute; inset: -30% -10% auto auto; z-index: -1;
  width: 60vw; height: 60vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(168,130,63,.20), transparent 62%);
}
.band h2 { color: var(--paper); }
.band p { color: rgba(251,249,244,.76); }

.assurance { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(28px, 4vw, 56px); }
.assurance__item { display: flex; flex-direction: column; gap: 10px; padding-top: var(--s-4); border-top: 1px solid rgba(251,249,244,.2); }
.assurance__item svg { width: 24px; height: 24px; color: var(--brass-light); margin-bottom: 6px; }
.assurance__item h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 400; }
.assurance__item p { font-size: var(--step--1); line-height: 1.58; }

/* --------------------------------------------------------------------------
   13. Reviews
   -------------------------------------------------------------------------- */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: clamp(20px, 2.6vw, 32px); }
.review {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-4);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.review:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.review__stars { display: flex; gap: 3px; color: var(--brass); }
.review__stars svg { width: 15px; height: 15px; }
.review__quote { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.42; letter-spacing: -.012em; color: var(--ink); }
.review__by { margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--line); font-size: var(--step--2); color: var(--muted); }
.review__by b { display: block; color: var(--ink); font-size: var(--step--1); font-weight: 600; letter-spacing: 0; }

/* --------------------------------------------------------------------------
   14. Split feature (about)
   -------------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 88px); align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--r-md); }
.split__media--stack { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); align-items: start; }
.split__media--stack img:first-child { aspect-ratio: 3/4; }
.split__media--stack img:last-child { aspect-ratio: 3/4; margin-top: clamp(24px, 5vw, 56px); }
.split__badge {
  position: absolute; z-index: 2; right: -14px; bottom: 28px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 22px; box-shadow: var(--sh-3);
  text-align: center;
}
.split__badge b { display: block; font-family: var(--font-display); font-size: var(--step-3); font-weight: 400; letter-spacing: -.02em; }
.split__badge span { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* --------------------------------------------------------------------------
   15. CTA + Footer
   -------------------------------------------------------------------------- */
.cta { text-align: center; }
.cta h2 { font-size: var(--step-5); font-weight: 300; letter-spacing: -.032em; margin-inline: auto; max-width: 16ch; }
.cta h2 em { font-style: italic; color: var(--brass-light); }
.cta p { margin: var(--s-5) auto 0; max-width: 48ch; }
.cta__actions { display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; margin-top: var(--s-7); }

.footer { background: var(--paper-deep); border-top: 1px solid var(--line); padding-top: clamp(48px, 6vw, 88px); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: clamp(28px, 4vw, 56px); padding-bottom: clamp(36px, 5vw, 64px); }
@media (max-width: 880px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__top { grid-template-columns: 1fr; } }
.footer .brand { color: var(--ink); }
.footer__blurb { margin-top: var(--s-4); font-size: var(--step--1); color: var(--muted); max-width: 34ch; }
.footer h4 { font-family: var(--font-sans); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: var(--s-4); }
.footer ul { list-style: none; padding: 0; display: grid; gap: 11px; }
.footer li a, .footer address a { font-size: var(--step--1); color: var(--ink-soft); transition: color var(--t-fast); }
.footer li a:hover, .footer address a:hover { color: var(--brass-text); }
.footer address { font-style: normal; font-size: var(--step--1); color: var(--muted); line-height: 1.75; }
.footer__bottom {
  display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  padding-block: var(--s-5); border-top: 1px solid var(--line);
  font-size: var(--step--2); color: var(--muted);
}
.footer__bottom a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   16. Contact
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 5vw, 80px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { display: grid; gap: var(--s-5); }
.contact-list > div { padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.contact-list h4 { font-family: var(--font-sans); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.contact-list p, .contact-list a { font-size: var(--step-1); color: var(--ink); }
.contact-list a:hover { color: var(--brass-text); }
.contact-list address { font-style: normal; font-size: var(--step-0); line-height: 1.7; color: var(--ink-soft); }

.form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(24px, 3vw, 40px); box-shadow: var(--sh-2); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.form__grid > .form-row--full { grid-column: span 2; }
@media (max-width: 620px) { .form__grid { grid-template-columns: 1fr; } .form__grid > .form-row--full { grid-column: span 1; } }
.form-row { display: flex; flex-direction: column; gap: 7px; }
.form-row label { font-size: var(--step--2); font-weight: 600; letter-spacing: .04em; color: var(--ink-soft); text-transform: uppercase; }
.form-row input, .form-row select, .form-row textarea {
  min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--paper); font-size: var(--step-0);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.form-row textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.form-row select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.form-row :is(input, select, textarea):focus {
  outline: none; border-color: var(--forest-3);
  box-shadow: 0 0 0 3px rgba(61, 97, 81, .14);
}
.form__note { margin-top: var(--s-4); font-size: var(--step--2); color: var(--muted); }
.form__success {
  display: none; align-items: center; gap: 12px;
  margin-top: var(--s-4); padding: 14px 18px;
  background: rgba(61,97,81,.09); border: 1px solid rgba(61,97,81,.25);
  border-radius: var(--r-sm); font-size: var(--step--1); color: var(--forest-2);
}
.form__success[data-show="true"] { display: flex; }
.form__success svg { width: 18px; height: 18px; flex: none; }

.map-strip { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.map-strip iframe { width: 100%; height: 340px; border: 0; display: block; filter: grayscale(.32) sepia(.12) contrast(1.02); }

/* --------------------------------------------------------------------------
   17. Reveal on scroll
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: 70ms; }
[data-reveal-delay="2"] { transition-delay: 140ms; }
[data-reveal-delay="3"] { transition-delay: 210ms; }
[data-reveal-delay="4"] { transition-delay: 280ms; }

/* --------------------------------------------------------------------------
   18. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 940px) {
  .availability__card { grid-template-columns: 1fr 1fr; }
  .availability__card .btn { grid-column: span 2; }
  .field + .field::before { display: none; }
  .field { border: 1px solid var(--line); border-radius: var(--r-sm); }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 84px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 78px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: var(--s-4) var(--gutter) var(--s-6);
    box-shadow: var(--sh-3);
    transform: translateY(-8px);
    opacity: 0; visibility: hidden;
    transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
  }
  .nav[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
  .nav__link { color: var(--ink); padding: 15px 0; border-bottom: 1px solid var(--line); font-size: var(--step-1); }
  .nav__link::after { display: none; }
  .header__actions .btn { display: none; }
  .hero { min-height: 88svh; }
  .filters { top: 78px; }
  .filters__row { gap: var(--s-3); }
  .chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  .booking { position: static; }
  .split__badge { right: 12px; }
}

@media (max-width: 620px) {
  .grid-cards { grid-template-columns: 1fr; }
  .availability__card { grid-template-columns: 1fr; }
  .availability__card .btn { grid-column: span 1; }
  /* Four stats in a row will not fit a phone — pair them up instead */
  .hero__meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-5); }
  .hero__stat b { font-size: var(--step-1); }
  .lightbox__nav { width: 44px; height: 44px; }
  .detail-head__title, .pagehead__title, .cta h2 { max-width: none; }
  .section-head { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
  .section-head__title { max-width: none; }
  .booking__fields { grid-template-columns: 1fr; }
  .booking__fields .field--full { grid-column: span 1; }
  .footer__bottom { flex-direction: column; gap: 10px; }
}

/* Nothing in the layout may push the page wider than the phone */
@media (max-width: 620px) {
  .hero__title, .pagehead__title, .detail-head__title,
  .section-head__title, .cta h2, .review__quote {
    overflow-wrap: break-word;
  }
}

/* --------------------------------------------------------------------------
   19. Preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__media img { animation: none; }
}

@media print {
  .header, .footer, .booking, .lightbox, .scroll-cue, .filters { display: none !important; }
  body { background: #fff; }
}
