/* =========================================================================
   Celine Pool Villa Cha-Am — styles
   Mobile-first. All colour, spacing and type come from the tokens in :root.
   ========================================================================= */

/* ---------- Fonts (self-hosted, no third-party request) ----------
   Playfair Display (headings) + DM Sans (body), variable weight axis,
   subset to Latin + Latin-Extended. Thai glyphs never match the
   unicode-range, so the Thai pages fall back to a system Thai face. */
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin-ext.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-display-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-display-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design tokens ---------- */
:root {
  /* Type */
  --font-body: "DM Sans", "Noto Sans Thai", "Leelawadee UI", system-ui,
               -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-display: "Playfair Display", "Noto Serif Thai", Georgia,
                  "Times New Roman", serif;
  --step--1: 0.83rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: clamp(1.3rem, 1.15rem + 0.7vw, 1.6rem);
  --step-3: clamp(1.65rem, 1.35rem + 1.4vw, 2.3rem);
  --step-4: clamp(2.1rem, 1.55rem + 2.6vw, 3.4rem);
  --step-5: clamp(2.7rem, 1.9rem + 4vw, 4.6rem);

  /* Colour — light (warm forest-green + cream) */
  --bg: #F6F1E7;
  --surface: #FFFDF8;
  --surface-sunk: #EFE8D8;
  --surface-glass: color-mix(in srgb, var(--surface) 84%, transparent);
  --text: #23201C;
  --text-muted: #5C5344;
  --accent: #1B4B44;
  --accent-hover: #123A34;
  --accent-text: #FFFFFF;
  --gold: #7C580F;
  --border: #E0D7C5;
  --focus: #1B4B44;
  --shadow-color: 32deg 24% 40%;
  --shadow-sm: 0 1px 2px hsl(var(--shadow-color) / 0.10);
  --shadow-md: 0 10px 30px -12px hsl(var(--shadow-color) / 0.18);
  --shadow-lg: 0 26px 60px -18px hsl(var(--shadow-color) / 0.28);

  /* Sketch map */
  --map-land: #EFE7D6;
  --map-water: #BFE0DB;
  --map-sand: #F0DCB8;
  --map-road: #FFFFFF;
  --map-ink: #4A3F2E;
  --map-pin: #1F5D5A;

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 7rem;
  --space-10: 8rem;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --measure: 66ch;
  --container: 1180px;

  --header-h: 4rem;

  /* Form-control border — meets 3:1 non-text contrast against surface and bg */
  --field-border: #807769;

  /* Light is the default; dark is opt-in via the header toggle (data-theme="dark"). */
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1A1714;
  --surface: #241F1B;
  --surface-sunk: #14110E;
  --text: #F2ECE1;
  --text-muted: #B7AC9B;
  --accent: #7FBFBB;
  --accent-hover: #9AD2CE;
  --accent-text: #10201F;
  --gold: #D6A24E;
  --border: #3A332C;
  --focus: #7FBFBB;
  --shadow-color: 32deg 20% 4%;
  --shadow-sm: 0 1px 2px hsl(var(--shadow-color) / 0.5);
  --shadow-md: 0 6px 20px -6px hsl(var(--shadow-color) / 0.6);
  --shadow-lg: 0 20px 48px -12px hsl(var(--shadow-color) / 0.7);

  --map-land: #2C2620;
  --map-water: #204542;
  --map-sand: #3A3121;
  --map-road: #5B5142;
  --map-ink: #D9CDB8;
  --map-pin: #7FBFBB;

  --field-border: #857B6C;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text);
  text-wrap: balance;
}
h1, h2 {
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
h3 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }

p { max-width: var(--measure); }

/* Visually-hidden but available to assistive tech */
.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;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

strong { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  z-index: 100;
  background: var(--accent);
  color: var(--accent-text);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
  transition: transform 0.15s ease;
}
.skip-link:focus { transform: translateY(0); color: var(--accent-text); }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 40rem) {
  .wrap { padding-inline: var(--space-6); }
}

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: var(--space-2);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--accent);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.7em 1.3em;
  border-radius: var(--radius-pill);
  border: 2px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease,
              transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { --btn-bg: var(--accent); --btn-fg: var(--accent-text); --btn-bd: var(--accent); }
.btn--primary:hover { --btn-bg: var(--accent-hover); --btn-fg: var(--accent-text); --btn-bd: var(--accent-hover); }

.btn--outline { --btn-bd: var(--accent); --btn-fg: var(--accent); }
.btn--outline:hover { --btn-bg: var(--accent); --btn-fg: var(--accent-text); }

.btn--ghost {
  --btn-bg: rgba(255,255,255,0.18);
  --btn-fg: #fff;
  --btn-bd: rgba(255,255,255,0.85);
}
.btn--ghost:hover { --btn-bg: rgba(255,255,255,0.30); --btn-fg: #fff; }

.btn--lg { font-size: var(--step-1); padding: 0.8em 1.6em; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-block;
  margin-top: var(--space-4);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease,
              box-shadow 0.3s ease, color 0.3s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--header-h);
  padding-block: var(--space-2);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  margin-right: auto;
}
.wordmark__mark {
  display: grid;
  place-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1.1rem;
}
.wordmark__text { display: flex; flex-direction: column; line-height: 1.1; font-size: 1.05rem; }
.wordmark__sub {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-nav { display: contents; }
.nav-list {
  list-style: none;
  padding: 0;
  display: flex;
  gap: var(--space-5);
}
.nav-list a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding-block: var(--space-2);
}
.nav-list a:hover { color: var(--text); }
/* "Check availability" inside the menu — mobile only (desktop has the header button) */
.nav-list__book { display: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  font: inherit;
  font-weight: 600;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle__bar::before { position: absolute; top: -5px; }
.nav-toggle__bar::after  { position: absolute; top: 5px; }

.site-header__cta { flex-shrink: 0; }

/* Theme toggle */
.theme-toggle {
  flex-shrink: 0;
  display: inline-grid;
  place-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--field-border); }
.theme-toggle__icon { width: 1.15rem; height: 1.15rem; }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }

/* Language switch (plain link, so it works without JS and is crawlable) */
.lang-switch {
  flex-shrink: 0;
  display: inline-grid;
  place-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 var(--space-3);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.lang-switch:hover { border-color: var(--field-border); color: var(--text); }

/* Header: mobile */
@media (max-width: 61.99rem) {
  .nav-toggle { display: inline-flex; }
  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: var(--space-2) var(--space-4) var(--space-4);
  }
  .nav-list a { display: block; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
  /* JS-enhanced: collapsed by default, toggled open */
  .js .nav-list { display: none; }
  .js .nav-list.is-open { display: flex; }
  .site-header__cta { display: none; }
  /* Without JS there is no toggle, so let the menu sit in the flow */
  .no-js .nav-list { position: static; box-shadow: none; border-bottom: 0; padding-inline: 0; }

  .nav-list__book { display: block; }
  .nav-list__book a {
    background: var(--accent);
    color: var(--accent-text);
    text-align: center;
    border-radius: var(--radius-pill);
    padding: var(--space-3) var(--space-4);
    border-bottom: 0;
    margin-block: var(--space-2);
  }
  .nav-list__book a:hover { background: var(--accent-hover); color: var(--accent-text); }
}
@media (max-width: 26rem) {
  .wordmark__text { font-size: 0.95rem; }
  .site-header__inner { gap: var(--space-2); }
  .lang-switch { padding: 0 var(--space-2); font-size: 0.82rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  animation: hero-zoom 20s ease-out both;
}
@keyframes hero-zoom {
  from { transform: scale(1.09); }
  to   { transform: scale(1); }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,18,18,0.5) 0%, rgba(10,18,18,0) 24%),
    linear-gradient(180deg, rgba(16,24,24,0.12) 42%, rgba(10,17,17,0.8) 100%);
}
/* thin light rule, bottom-right — a quiet "there's more" cue */
.hero::before {
  content: "";
  position: absolute;
  right: max(var(--space-6), 8vw);
  bottom: var(--space-7);
  z-index: 1;
  width: 1px;
  height: 3rem;
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0.6));
  pointer-events: none;
}
@media (max-width: 48rem) {
  .hero::before { display: none; }
}
.hero__panel {
  padding-block: var(--space-7) var(--space-8);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  font-size: var(--step--1);
  margin-bottom: var(--space-3);
  color: #F7EAD3;
}
.hero__title { color: #fff; font-size: var(--step-5); }
.hero__lead {
  margin-top: var(--space-4);
  font-size: var(--step-1);
  max-width: 46ch;
  color: #F7F3EC;
}
.hero__stats {
  list-style: none;
  padding: 0;
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}
.hero__stats li {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.95rem;
  color: #EAE3D7;
}
.hero__stats strong { display: inline; color: #fff; font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; }
.hero__stats li + li::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}
.hero__actions {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---------- Highlights strip ---------- */
.highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
}
.highlights strong { color: var(--text); }
.highlights p { max-width: none; }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-8); }
@media (min-width: 48rem) { .section { padding-block: var(--space-9); } }
.section--sunk { background: var(--surface-sunk); }

.section h2 { margin-top: var(--space-1); }
.section__lead-text,
.section p.section__note { margin-top: var(--space-4); }
.section__note { color: var(--text-muted); font-size: 0.95rem; }
.section__lead p + p { margin-top: var(--space-4); }

.section__grid { display: grid; gap: var(--space-7); }
@media (min-width: 52rem) {
  .section__grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-8); align-items: start; }
}

/* ---------- Amenities ---------- */
.amenities {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
@media (min-width: 30rem) { .amenities { grid-template-columns: 1fr 1fr; gap: var(--space-2) var(--space-5); } }
.amenities li {
  position: relative;
  padding-left: 1.9rem;
  padding-block: var(--space-1);
}
.amenities li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 1.1rem;
  height: 0.6rem;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Gallery ---------- */
.gallery {
  list-style: none;
  padding: 0;
  margin-top: var(--space-6);
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
.gallery > li { display: grid; }
@media (min-width: 34rem) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
    gap: var(--space-4);
  }
  /* modifier lives on the <li> (the grid item), not the inner <a> */
  .gallery > li.g-feature { grid-column: 1 / -1; }
  .gallery > li.g-wide { grid-column: span 2; }
  .gallery > li.g-feature .gallery__item img,
  .gallery > li.g-wide .gallery__item img { aspect-ratio: 16 / 9; }
}
.gallery__item {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item::after {
  content: "View";
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  padding: 0.35em 0.85em;
  border-radius: var(--radius-pill);
  background: rgba(14, 26, 24, 0.72);
  color: #fff;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.gallery__item:hover::after,
.gallery__item:focus-visible::after { opacity: 1; transform: none; }
:lang(th) .gallery__item::after { content: "\0E14\0E39"; }

/* ---------- Rooms ---------- */
.rooms {
  list-style: none;
  padding: 0;
  margin-top: var(--space-5);
  display: grid;
  gap: var(--space-3);
}
@media (min-width: 40rem) { .rooms { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .rooms { grid-template-columns: repeat(3, 1fr); } }
.room {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-5) var(--space-6);
}
.room h3 { font-size: var(--step-1); }
.room p { color: var(--text-muted); font-size: 0.95rem; margin-top: var(--space-2); }

/* ---------- Facts strip ---------- */
.facts__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 40rem) { .facts__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 62rem) {
  .facts__grid { grid-template-columns: repeat(6, 1fr); gap: var(--space-4); }
}
.fact {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5) var(--space-4);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.fact__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 1.5rem + 2vw, 2.9rem);
  line-height: 1;
  color: var(--accent);
}
.fact__unit { font-size: 0.45em; margin-left: 0.15em; color: var(--text-muted); }
.fact__label {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-muted);
}

/* ---------- Address ---------- */
.address {
  font-style: normal;
  color: var(--text-muted);
  margin-block: var(--space-4);
  line-height: 1.7;
}

/* ---------- Map ---------- */
.mapfig { margin-top: var(--space-5); }
.mapsvg {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--map-land);
}
.mapfig figcaption {
  margin-top: var(--space-2);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* ---------- Distances (airy value-over-label strip) ---------- */
.side-h { font-size: var(--step-1); margin-bottom: var(--space-4); }
.distances {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--space-5) var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}
.distances > div {
  display: flex;
  flex-direction: column-reverse; /* value renders above label; DOM stays term-first */
  gap: 2px;
  padding: 0;
  border: 0;
}
.distances dt {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.distances dd {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--text);
  text-align: left;
  white-space: normal;
}

/* ---------- Booking ---------- */
.booking { display: grid; gap: var(--space-7); }
@media (min-width: 56rem) {
  .booking { grid-template-columns: 1fr 1fr; align-items: start; }
  .booking__intro { grid-column: 1 / -1; max-width: var(--measure); }
}
.rate-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  margin-top: var(--space-4);
}
.rate-note--muted { border-left-color: var(--border); color: var(--text-muted); font-size: 0.95rem; }

.booked { margin-top: var(--space-4); font-size: 0.95rem; }
.booked summary { cursor: pointer; font-weight: 600; }
.booked ul { margin-top: var(--space-2); padding-left: 1.2rem; color: var(--text-muted); }
.booked li { margin-block: var(--space-1); }

.booking__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}
@media (min-width: 56rem) { .booking__form { grid-column: 1; } }
.booking__form fieldset { border: 0; padding: 0; margin: 0; }
.booking__form fieldset + fieldset { margin-top: var(--space-5); }
.booking__form legend {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  margin-bottom: var(--space-3);
  padding: 0;
}
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-weight: 600; margin-bottom: var(--space-2); font-size: 0.95rem; }
.field .opt { font-weight: 400; color: var(--text-muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  padding: 0.6em 0.7em;
}
.field textarea { resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.field--invalid input,
.field--invalid select { border-color: #B3261E; }
:root[data-theme="dark"] .field--invalid input,
:root[data-theme="dark"] .field--invalid select { border-color: #F2B8B5; }

@media (min-width: 26rem) {
  /* No-JS baseline: the two native date inputs sit side by side. */
  .cal-fallback {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--space-4);
  }
}
.field--wide { grid-column: 1 / -1; }

.form-errors {
  background: #FBE9E7;
  color: #7A1C13;
  border: 1px solid #E6A29B;
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  font-size: 0.95rem;
  margin-bottom: var(--space-4);
}
:root[data-theme="dark"] .form-errors { background: #3B1614; color: #F2B8B5; border-color: #8C3B36; }

.estimate {
  background: var(--surface-sunk);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}
.estimate__row { display: flex; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-1); max-width: none; }
.estimate__row--total { font-weight: 700; font-size: var(--step-1); border-top: 1px solid var(--border); margin-top: var(--space-2); padding-top: var(--space-3); }
.estimate__row--muted { color: var(--text-muted); font-size: 0.9rem; }
.estimate__row--discount { color: var(--accent); font-weight: 600; }

.form-fineprint { font-size: var(--step--1); color: var(--text-muted); margin-top: var(--space-3); }

.confirm {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}
@media (min-width: 56rem) { .confirm { grid-column: 2; align-self: start; } }
.confirm h3 { margin-bottom: var(--space-3); }
.confirm dl { display: grid; gap: var(--space-1); margin-block: var(--space-3); }
.confirm dl div { display: flex; justify-content: space-between; gap: var(--space-4); border-bottom: 1px solid var(--border); padding-block: var(--space-2); }
.confirm dt { color: var(--text-muted); }
.confirm dd { font-weight: 600; text-align: right; }
.confirm__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }

/* ---------- Availability calendar (enhances the two date inputs) ---------- */
.js .cal-fallback { display: none; }
.cal[hidden], .cal-summary[hidden], .cal-msg[hidden] { display: none; }

.cal {
  margin-bottom: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
/* Inside the booking form card it sits flush — no card-in-card. */
.booking__form .cal { background: transparent; border: 0; padding: 0; }
.cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.cal__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--text);
}
.cal__nav {
  display: grid;
  place-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--field-border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.cal__nav:hover:not(:disabled) { background: var(--surface-sunk); }
.cal__nav:disabled { opacity: 0.35; cursor: not-allowed; }
.cal__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: var(--space-1);
}
.cal__weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-block: var(--space-2);
}
.cal__grid { display: grid; gap: 2px; }
.cal__week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal__day {
  aspect-ratio: 1 / 1;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.cal__day--empty { visibility: hidden; cursor: default; }
.cal__day:hover:not([aria-disabled="true"]):not(.is-in):not(.is-out) {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.cal__day[aria-disabled="true"] { color: var(--text-muted); opacity: 0.4; cursor: not-allowed; }
.cal__day.is-booked { text-decoration: line-through; }
.cal__day.is-range {
  /* The nights between check-in and check-out. This used to be 15% and read as
     "not included" — guests thought the middle days were being skipped. */
  background: color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--text);
  font-weight: 600;
  border-radius: 0;
}
.cal__day.is-in,
.cal__day.is-out {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  opacity: 1;
}
.cal__day.is-in { border-radius: var(--radius) 0 0 var(--radius); }
.cal__day.is-out { border-radius: 0 var(--radius) var(--radius) 0; }
.cal__day.is-in.is-out { border-radius: var(--radius); }
.cal__day:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

.cal-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-4);
}
.cal-summary__box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
}
.cal-summary__box + .cal-summary__box { border-left: 1px solid var(--border); }
.cal-summary__box > span {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.cal-summary__box strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
}
.cal-summary__box strong.is-placeholder {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  color: var(--text-muted);
}

.cal-msg {
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: #FBE9E7;
  color: #7A1C13;
  border: 1px solid #E6A29B;
  max-width: none;
}
:root[data-theme="dark"] .cal-msg { background: #3B1614; color: #F2B8B5; border-color: #8C3B36; }

@media (prefers-reduced-motion: reduce) {
  .cal__day, .cal__nav { transition: none; }
}
@media (max-width: 22rem) {
  .cal__day { min-height: 2.25rem; font-size: 0.9rem; }
  .cal__nav { width: 2.5rem; height: 2.5rem; }
}

/* ---------- Rules ---------- */
.rules {
  list-style: none;
  padding: 0;
  margin-top: var(--space-5);
  display: grid;
  gap: var(--space-3);
  max-width: var(--measure);
}
.rules li {
  padding-left: 1.6rem;
  position: relative;
}
.rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface-sunk);
  border-top: 1px solid var(--border);
  padding-block: var(--space-8) var(--space-5);
  margin-top: var(--space-9);
}
.site-footer__inner {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 40rem) { .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-name { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; }
.footer-h { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: var(--space-3); }
.footer-links { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-legal {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: var(--step--1);
  color: var(--text-muted);
  max-width: none;
}
.site-footer .wrap { }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: rgba(15, 20, 20, 0.85);
}
.lightbox[hidden] { display: none; }
.lightbox__inner { position: relative; max-width: 860px; width: 100%; }
.lightbox__img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--surface);
}
.lightbox__cap { color: #EDE6DA; font-size: 0.9rem; margin-top: var(--space-2); text-align: center; max-width: none; }
.lightbox__count { color: #EDE6DA; opacity: 0.65; }
.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: grid;
  place-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: 0;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
}
.lightbox__close {
  top: -3.25rem;
  right: 0;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.8rem;
  line-height: 1;
  background: none;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  font-size: 2rem;
  line-height: 1;
}
.lightbox__nav--prev { left: -1rem; }
.lightbox__nav--next { right: -1rem; }
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 48rem) {
  .lightbox__close { top: 0; right: 0; background: rgba(0, 0, 0, 0.5); }
  .lightbox__nav--prev { left: 0.25rem; }
  .lightbox__nav--next { right: 0.25rem; }
}

/* ---------- Consent banner ---------- */
.consent {
  position: fixed;
  z-index: 150;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  display: flex;
  justify-content: center;
}
.consent[hidden] { display: none; }
.consent__inner {
  width: 100%;
  max-width: 34rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  display: grid;
  gap: var(--space-3);
}
.consent__text { max-width: none; font-size: 0.95rem; }
.consent__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.consent__actions .btn { flex: 1 1 auto; min-width: 8rem; }

/* ---------- Legal / text page ---------- */
.site-header__back {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text-muted);
}
.site-header__back:hover { color: var(--text); }
/* On a narrow screen the arrow alone carries the link — keep the label for
   screen readers but take it out of the flow so the header fits. */
@media (max-width: 30rem) {
  .site-header__back-text {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}
.legal .wrap { max-width: 46rem; }
.legal h1 { font-size: var(--step-4); }
.legal h2 { font-size: var(--step-2); margin-top: var(--space-7); }
.legal p, .legal ul { margin-top: var(--space-4); }
.legal ul { padding-left: 1.4rem; }
.legal li { margin-top: var(--space-2); }
.legal .updated { color: var(--text-muted); font-size: var(--step--1); margin-top: var(--space-2); }
.legal .consent-controls { margin-top: var(--space-4); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  .gallery__item img, .gallery__item:hover img { transition: none; transform: none; }
  .gallery__item::after { transition: none; }
  .hero__img { animation: none; transform: none; }
  .skip-link { transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Location map (click-to-load) ---------- */
.mapfig { margin: var(--space-5) 0 0; }
.mapfig__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.mapfig__prompt {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
  text-align: center;
  padding: var(--space-5);
  max-width: 34ch;
}
.mapfig__note { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.mapfig figcaption {
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Chat (WhatsApp / LINE) ---------- */
.chat[hidden] { display: none; }
.chat {
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.chat__h { margin: 0 0 var(--space-3); font-weight: 700; }
.chat__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.chat__btn[hidden] { display: none; }
.chat__note { margin: var(--space-3) 0 0; color: var(--text-muted); font-size: 0.9rem; }
.chat__line[hidden] { display: none; }
.chat__line {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
}
.chat__qr-link {
  display: block;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.chat__qr { display: block; width: 100%; height: auto; }
.chat__line-label { margin: 0; font-weight: 700; letter-spacing: 0.08em; }
.chat__line-copy .chat__note { margin: 0.35rem 0 var(--space-3); }

@media (max-width: 30rem) {
  .chat__line { grid-template-columns: 6rem minmax(0, 1fr); }
}

/* ---------- Guest reviews (one at a time, rotating) ---------- */
#reviews[hidden] { display: none; }

.reviews__score { margin: var(--space-3) 0 0; font-size: var(--step-1); font-weight: 600; }
.rev-stars { color: var(--gold); letter-spacing: 0.08em; }

.reviews {
  margin-top: var(--space-5);
  min-height: 12rem;          /* holds height so the page never jumps mid-rotation */
  display: grid;
  align-items: center;
}
.review { margin: 0; text-align: center; max-width: 46rem; margin-inline: auto; animation: rev-in 420ms ease both; }
@keyframes rev-in { from { opacity: 0; transform: translateY(6px); } }
.review blockquote {
  margin: var(--space-3) 0 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.45;
  font-weight: 500;
}
.review blockquote::before { content: "\201C"; }
.review blockquote::after  { content: "\201D"; }
.review__by { margin: var(--space-4) 0 0; color: var(--text-muted); font-size: 0.95rem; }
.review__date::before { content: "\00B7\00A0"; }

.reviews__nav { display: flex; align-items: center; justify-content: center; gap: var(--space-3); margin-top: var(--space-5); }
.reviews__nav[hidden] { display: none; }
.reviews__arrow {
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--field-border);
  background: var(--surface); color: var(--text);
  border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.reviews__arrow:hover { background: var(--surface-sunk); }
.reviews__dots { display: flex; gap: var(--space-2); }
.rev-dot {
  width: 0.6rem; height: 0.6rem; padding: 0; border: 0; border-radius: 50%;
  background: var(--border); cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.rev-dot[aria-current="true"] { background: var(--accent); transform: scale(1.35); }
.reviews__arrow:focus-visible, .rev-dot:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.reviews__src { margin: var(--space-4) 0 0; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
.reviews__src[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .review { animation: none; }
  .rev-dot { transition: none; }
}
/* Honeypot: off-screen, never shown, never focusable. A bot fills it; a guest cannot. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Night count under the calendar — spells out that a stay is priced per night,
   which is what guests miss when they count days instead. */
.cal-nights[hidden] { display: none; }
.cal-nights {
  margin: var(--space-3) 0 0;
  padding: var(--space-3);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  text-align: center;
}
.cal-nights strong { font-size: var(--step-1); }
