/* Airport Villa, Chiang Mai
   Tokens: deep lagoon teal + lime-wash cream, one accent (pool glass aqua).
   Shape rule: photographs of rooms framed as arches (the house's own arcade); every UI element is square. */
:root {
  --lagoon: #0E3A42;
  --lagoon-2: #0A2C33;
  --paper: #F4F3EE;
  --paper-2: #E9E9E2;
  --ink: #14282D;
  --muted: #55676A;
  --line: rgba(14, 58, 66, .16);
  --glass: #9FD4CC;
  --serif: "Taviraj", "Noto Serif Thai", Georgia, serif;
  --sans: "Anuphan", "IBM Plex Sans Thai", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(20px, 4.5vw, 64px);
  --max: 1320px;
  --nav-h: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lagoon); outline-offset: 3px; }
.nav:not(.solid) :focus-visible, .foot :focus-visible, .lb :focus-visible { outline-color: var(--glass); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--paper); padding: 10px 14px; }
.skip:focus { top: 12px; }

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

/* ---------- type ---------- */
.sec-title {
  font: 300 clamp(34px, 4.4vw, 58px)/1.2 var(--serif);
  letter-spacing: -.01em;
  color: var(--lagoon);
  text-wrap: balance;
}
h3 { font: 400 clamp(24px, 2.3vw, 32px)/1.3 var(--serif); color: var(--lagoon); }
figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; letter-spacing: .01em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 0;
  font-size: 15px; font-weight: 500; letter-spacing: .02em; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn i { font-size: 20px; }
.btn-solid { background: var(--lagoon); color: var(--paper); }
.btn-solid:hover { background: var(--lagoon-2); }
.btn-glass { background: var(--glass); color: var(--lagoon-2); }
.btn-glass:hover { background: var(--paper); }
.btn-line { border-color: var(--lagoon); color: var(--lagoon); background: transparent; }
.btn-line:hover { background: var(--lagoon); color: var(--paper); }
.btn-wide { width: 100%; }
.btn-text { background: none; border: 0; padding: 8px 0; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 30; height: var(--nav-h);
  color: var(--paper);
  transition: background-color .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.solid { background: rgba(244, 243, 238, .94); color: var(--lagoon); box-shadow: 0 1px 0 var(--line); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); }
.nav-in { height: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 28px; }
.mark { display: grid; text-decoration: none; line-height: 1.15; margin-right: auto; }
.mark-name { font: 400 22px/1.1 var(--serif); letter-spacing: .01em; }
.mark-sub { font-size: 11.5px; letter-spacing: .06em; opacity: .78; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14.5px; text-decoration: none; padding: 6px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.nav-links a:hover { background-size: 100% 1px; }
.nav-end { display: flex; align-items: center; gap: 18px; }
.lang { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.lang span { opacity: .4; }
.lang button { background: none; border: 0; padding: 8px 4px; cursor: pointer; opacity: .6; letter-spacing: .06em; }
.lang button[aria-pressed="true"] { opacity: 1; font-weight: 600; }
.btn-nav { min-height: 42px; padding: 0 18px; font-size: 14px; background: var(--glass); color: var(--lagoon-2); }
.btn-nav:hover { background: var(--paper); }
.nav.solid .btn-nav { background: var(--lagoon); color: var(--paper); }
.menu-btn { display: none; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0; cursor: pointer; font-size: 14px; }
.menu-btn i { font-size: 22px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  background: var(--lagoon);
  color: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "text arch";
  column-gap: clamp(40px, 6vw, 112px);
  padding: calc(var(--nav-h) + 24px) max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 0;
  isolation: isolate;
}
.hero-sentinel { position: absolute; top: 140px; left: 0; width: 1px; height: 1px; }
.hero-text { grid-area: text; align-self: center; padding-bottom: 150px; max-width: 620px; }
.kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--glass); margin-bottom: 28px; }
.hero h1 { font: 300 clamp(40px, 4.5vw, 66px)/1.22 var(--serif); letter-spacing: -.015em; }
.hero h1 .ln { display: block; white-space: nowrap; }
.hero-sub { margin-top: 26px; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.75; max-width: 34em; color: rgba(244, 243, 238, .82); }
.hero-arch {
  grid-area: arch; align-self: end;
  height: min(calc(100dvh - var(--nav-h) - 44px), 800px);
  aspect-ratio: 3 / 4;
  max-width: 44vw;
  border-radius: 999px 999px 0 0;
  overflow: hidden;
  background: #1d4d55;
}
.hero-arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; transform-origin: 50% 60%; }

/* booking bar */
.bar {
  position: absolute; z-index: 2;
  left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  bottom: 44px;
  width: min(1040px, calc(100vw - 2 * var(--gutter)));
  display: grid; grid-template-columns: 1fr 1fr .8fr auto;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 24px 60px -24px rgba(6, 30, 35, .55);
}
.bar-field { display: grid; align-content: center; gap: 2px; padding: 14px 22px; border-right: 1px solid var(--line); min-width: 0; }
.bar-field span { font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.bar-field input, .bar-field select, .sum select {
  border: 0; background: transparent; padding: 2px 0; min-height: 30px; font-size: 16px; color: var(--ink); width: 100%; border-radius: 0;
}
.bar-field input:focus-visible, .bar-field select:focus-visible { outline-offset: 6px; }
.bar-in { position: relative; display: block; }
.bar-field .bar-ph { display: none; position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-size: 16px; letter-spacing: 0; color: var(--muted); pointer-events: none; }
.bar-field:has(input:invalid):not(:focus-within) .bar-ph { display: block; }
.bar-field:has(input:invalid):not(:focus-within) input { color: transparent; }
.bar-field:has(input:invalid):not(:focus-within) input::-webkit-datetime-edit { color: transparent; }
.bar-go { min-height: 76px; padding: 0 30px; font-size: 15.5px; background: var(--glass); color: var(--lagoon-2); }
.bar-go:hover { background: var(--lagoon-2); color: var(--paper); }

/* ---------- intro ---------- */
.intro { padding-block: clamp(96px, 12vw, 176px) clamp(80px, 10vw, 150px); }
.intro-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.intro-text { grid-column: 1 / span 7; display: grid; gap: 28px; }
.lead { font: 300 clamp(26px, 2.7vw, 38px)/1.5 var(--serif); color: var(--lagoon); text-wrap: pretty; }
.intro-text p { max-width: 36em; color: var(--muted); font-size: 17px; }
.intro-text .direct { display: flex; align-items: center; gap: 10px; color: var(--lagoon); font-weight: 500; font-size: 15.5px; }
.direct i { font-size: 20px; }
.ledger { grid-column: 9 / span 4; margin-top: 10px; }
.ledger div { display: flex; align-items: baseline; gap: 14px; padding: 13px 0; }
.ledger div::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted rgba(14, 58, 66, .38); transform: translateY(-5px); min-width: 16px; }
.ledger dt { order: 0; font-size: 15px; color: var(--muted); }
.ledger dd { order: 2; font: 300 32px/1 var(--serif); color: var(--lagoon); white-space: nowrap; }
.ledger dd small { font: 400 14px var(--sans); color: var(--muted); }
.ledger dd.word { font: 400 19px/1.2 var(--serif); }

/* ---------- spaces ---------- */
.spaces { padding-bottom: clamp(72px, 9vw, 140px); }
.spaces > .wrap:first-child { margin-bottom: clamp(48px, 6vw, 88px); }
.sp { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; margin-bottom: clamp(96px, 12vw, 180px); }
.sp img { width: 100%; height: 100%; object-fit: cover; }
.sp-copy h3 { margin-bottom: 18px; }
.sp-copy p { color: var(--muted); max-width: 30em; text-wrap: pretty; }
.sp-inset { margin-top: 48px; }
.sp-inset img { aspect-ratio: 4 / 5; }

.sp-pool .sp-main { grid-column: 1 / span 7; }
.sp-pool .sp-main img { aspect-ratio: 4 / 4.6; }
.sp-pool .sp-copy { grid-column: 9 / span 4; padding-top: clamp(40px, 9vw, 140px); }
.sp-pool .sp-inset { width: 78%; }

.sp-roof .sp-copy { grid-column: 1 / span 4; order: 0; }
.sp-roof .sp-inset { width: 82%; }
.sp-roof .sp-main { grid-column: 6 / span 7; margin-top: clamp(48px, 8vw, 120px); }
.sp-roof .sp-main img { aspect-ratio: 1108 / 960; }

.band { margin-bottom: clamp(96px, 12vw, 180px); }
.band img { width: 100%; height: clamp(300px, 62vh, 660px); object-fit: cover; }

.sp-living .sp-copy { grid-column: 1 / span 7; margin-bottom: 56px; }
.sp-living .sp-copy p, .sp-rooms .sp-copy p { max-width: 40em; }
.stair-row { grid-column: 1 / -1; display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 24px; align-items: start; }
.stair-row img { aspect-ratio: 3 / 4; }
.stair-row figure:nth-child(2) { margin-top: 12%; }
.stair-row figure:nth-child(3) { margin-top: 26%; }

.sp-rooms { margin-bottom: 0; }
.sp-rooms .sp-copy { grid-column: 1 / span 7; margin-bottom: 56px; }
.arcade { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); }
.arch { border-radius: 999px 999px 0 0; overflow: hidden; aspect-ratio: 3 / 4.3; background: var(--paper-2); }
.arch img { height: 100%; transition: transform 1.2s var(--ease); }
.arcade figure:hover .arch img { transform: scale(1.03); }

/* ---------- gallery ---------- */
.gallery { padding-block: clamp(72px, 9vw, 140px) clamp(72px, 8vw, 120px); background: var(--paper-2); }
.gal-head { margin-bottom: clamp(36px, 4vw, 56px); }
/* 6 columns, row unit = 2/3 of a column: single = 3:4, .w = 3:2, .f = large 3:4 */
.gal {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding-inline: 6px;
  grid-auto-rows: calc((100vw - 42px) / 6 * .6667); grid-auto-flow: dense;
}
.g { display: block; min-width: 0; grid-row: span 2; padding: 0; border: 0; background: var(--paper); cursor: zoom-in; overflow: hidden; }
.g.w { grid-column: span 2; }
.g.f { grid-column: span 2; grid-row: span 4; }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), opacity .4s var(--ease); }
.g:hover img { transform: scale(1.025); }
.g:focus-visible { outline-offset: -4px; }
.gal-more { display: none; margin-top: 28px; }

/* lightbox */
.lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--lagoon-2); color: var(--paper); }
.lb::backdrop { background: var(--lagoon-2); }
.lb[open] { display: grid; place-items: center; }
.lb-fig { display: grid; justify-items: center; gap: 14px; padding: 64px 80px 32px; touch-action: pan-y; user-select: none; }
.lb-fig img { max-width: min(92vw, 1200px); max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; -webkit-user-drag: none; }
.lb-fig figcaption { display: flex; gap: 24px; justify-content: space-between; width: 100%; max-width: 900px; color: rgba(244, 243, 238, .78); font-size: 14px; margin: 0; }
#lbCount { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb-btn { position: absolute; width: 52px; height: 52px; display: grid; place-items: center; background: transparent; border: 1px solid rgba(244, 243, 238, .28); color: var(--paper); cursor: pointer; font-size: 22px; }
.lb-btn:hover { border-color: var(--glass); color: var(--glass); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- amenities ---------- */
.amen { padding-block: clamp(88px, 11vw, 160px); }
.amen-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.amen-grid .sec-title { grid-column: 1 / span 4; }
.amen-cols { grid-column: 6 / span 7; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.amen-cols h3 { font: 400 italic 19px/1.3 var(--serif); color: var(--muted); margin: 6px 0 14px; }
.amen-cols ul + h3 { margin-top: 40px; }
.amen-cols li { display: flex; align-items: center; gap: 16px; padding: 9px 0; font-size: 16px; }
.amen-cols li i { font-size: 26px; color: var(--lagoon); flex: none; }

/* ---------- location ---------- */
.loc { padding-block: clamp(88px, 11vw, 160px); border-top: 1px solid var(--line); }
.loc-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.loc-copy { grid-column: 1 / span 4; display: grid; gap: 22px; justify-items: start; }
.loc-copy p { color: var(--muted); }
.dist { grid-column: 6 / span 7; }
.dist-note { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.dist li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name name" "line km"; align-items: center; column-gap: 18px; padding: 16px 0; }
.dist-name { grid-area: name; font-size: 16px; margin-bottom: 8px; }
.dist-line { grid-area: line; position: relative; height: 1px; width: calc(var(--d) / 5 * 100%); background: var(--lagoon); transform-origin: 0 50%; }
.dist-line::before { content: ""; position: absolute; left: -4px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--lagoon); }
.dist-km { grid-area: km; font: 300 clamp(32px, 3.4vw, 46px)/1 var(--serif); color: var(--lagoon); min-width: 4.2ch; text-align: right; white-space: nowrap; }
.dist-km small { font: 400 14px var(--sans); color: var(--muted); }

/* ---------- availability ---------- */
.avail { padding-block: clamp(88px, 11vw, 160px); background: var(--paper-2); }
.avail-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 4vw, 56px); max-width: 44em; }
.avail-head p { color: var(--muted); }
.avail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(24px, 4vw, 64px); align-items: start; }

.cal { --cp: clamp(18px, 2.4vw, 34px); position: relative; background: var(--paper); padding: var(--cp); min-height: 420px; }
.cal-sync { display: grid; place-content: center; text-align: center; gap: 8px; min-height: 360px; color: var(--muted); }
.cal-sync-t { font: 300 28px/1.3 var(--serif); color: var(--lagoon); }
/* arrows sit on the month-title row, outer edges of the calendar */
.cal-nav { position: absolute; top: var(--cp); left: var(--cp); right: var(--cp); display: flex; justify-content: space-between; pointer-events: none; }
.cal-nav button { pointer-events: auto; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 1px solid var(--line); cursor: pointer; font-size: 20px; color: var(--lagoon); }
.cal-nav button:disabled { opacity: .3; cursor: default; }
.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 44px); }
.cal-month h4 { margin: 0 0 14px; font: 400 21px/44px var(--serif); color: var(--lagoon); text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { font-size: 12px; color: var(--muted); text-align: center; padding-bottom: 8px; }
.day {
  position: relative; aspect-ratio: 1; min-height: 40px; display: grid; place-items: center;
  background: none; border: 0; padding: 0; font-size: 15px; cursor: pointer; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.day:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--lagoon); }
.day:disabled { color: rgba(20, 40, 45, .28); cursor: default; }
.day.booked { color: rgba(20, 40, 45, .42); text-decoration: line-through; text-decoration-thickness: 1px; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(14, 58, 66, .07) 6px 7px); }
.day.today::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.day.in { background: rgba(159, 212, 204, .45); }
.day.start, .day.end { background: var(--lagoon); color: var(--paper); text-decoration: none; }
.day.err { background: rgba(176, 58, 46, .12); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; font-size: 13px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 8px; }
.cal-legend b { width: 16px; height: 16px; display: inline-block; border: 1px solid var(--line); }
.cal-legend .lg-booked { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(14, 58, 66, .25) 4px 5px); }
.cal-legend .lg-sel { background: var(--lagoon); border-color: var(--lagoon); }

.sum { position: sticky; top: calc(var(--nav-h) + 24px); background: var(--paper); padding: 28px; display: grid; gap: 18px; }
.sum-list div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sum-list dt { font-size: 14px; color: var(--muted); }
.sum-list dd { font: 400 18px/1.3 var(--serif); color: var(--lagoon); text-align: right; }
.sum-list dd.empty { font: 400 14px var(--sans); color: var(--muted); }
.sum select { width: auto; font: 400 17px var(--serif); color: var(--lagoon); text-align: right; cursor: pointer; }
.msg { min-height: 3.2em; font-size: 14.5px; line-height: 1.55; color: var(--lagoon); }
.msg.bad { color: #9A3A2F; }
.msg.ok { color: #1E6A5E; }
.sum-foot { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.sum .btn-text { justify-self: start; }

/* ---------- rules ---------- */
.rules { padding-block: clamp(88px, 11vw, 160px); }
.rules .sec-title { margin-bottom: clamp(36px, 4vw, 56px); }
.rules-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(28px, 4vw, 64px); }
.rules-grid h3 { font-size: 22px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rules-grid li { padding: 7px 0; color: var(--ink); text-wrap: pretty; }
.times div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.times dt { color: var(--muted); }
.times dd { font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.foot { background: var(--lagoon-2); color: rgba(244, 243, 238, .78); padding-block: 64px 48px; font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr; gap: 32px; align-items: start; }
.foot-mark { font: 300 30px/1.1 var(--serif); color: var(--paper); margin-bottom: 8px; }
.foot-by { color: var(--glass); margin-bottom: 6px; }
.foot-end { display: grid; gap: 18px; justify-items: end; }
.foot-copy { font-size: 12.5px; opacity: .7; }

/* ---------- mobile bar + toast ---------- */
.mbar { display: none; }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 40; transform: translate(-50%, 16px);
  background: var(--lagoon-2); color: var(--paper); padding: 14px 20px; font-size: 14.5px; max-width: calc(100vw - 32px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-arch img { animation: kenburns 32s ease-in-out infinite alternate; }
  .js .rv { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .js .rv.in { opacity: 1; transform: none; }
  .js .dist .dist-line { transform: scaleX(0); transition: transform 1.1s var(--ease) .15s; }
  .js .dist.in .dist-line { transform: scaleX(1); }
  .js .hero-text > * { animation: rise .9s var(--ease) both; }
  .js .hero-text > :nth-child(2) { animation-delay: .08s; }
  .js .hero-text > :nth-child(3) { animation-delay: .16s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.11) translate3d(-1.2%, -1.6%, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- tablet / mobile ---------- */
@media (max-width: 1100px) {
  .nav-links { gap: 20px; }
  .nav-in { gap: 20px; }
}
@media (max-width: 959px) {
  :root { --nav-h: 60px; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto; display: none; flex-direction: column; gap: 0;
    background: var(--paper); color: var(--lagoon); padding: 8px var(--gutter) 20px; box-shadow: 0 18px 40px -20px rgba(6, 30, 35, .4);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font: 300 24px/1.3 var(--serif); padding: 12px 0; border-bottom: 1px solid var(--line); background: none; }
  .btn-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .mark-name { font-size: 20px; }
  .mark-sub { font-size: 11px; }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "arch" "text" "bar";
    padding: calc(var(--nav-h) + 8px) var(--gutter) 28px;
    align-content: start;
    row-gap: 24px;
  }
  .hero-arch { width: 100%; max-width: none; height: min(42dvh, 470px); aspect-ratio: auto; }
  .hero-text { padding-bottom: 0; }
  .kicker { margin-bottom: 14px; font-size: 12px; }
  .hero h1 { font-size: clamp(34px, 9.4vw, 52px); line-height: 1.24; }
  .hero-sub { margin-top: 14px; font-size: 15.5px; line-height: 1.65; }
  .bar { grid-area: bar; position: static; width: 100%; grid-template-columns: 1fr 1fr; }
  .bar-field { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .bar-field:nth-child(2) { border-right: 0; }
  .bar-field:nth-child(3) { border-bottom: 0; }
  .bar-go { min-height: 60px; font-size: 15px; padding: 0 12px; }

  .intro-text, .ledger, .sp-pool .sp-main, .sp-pool .sp-copy, .sp-roof .sp-copy, .sp-roof .sp-main,
  .sp-living .sp-copy, .sp-rooms .sp-copy, .amen-grid .sec-title, .amen-cols, .loc-copy, .dist { grid-column: 1 / -1; }
  .ledger { margin-top: 56px; }
  .sp-pool .sp-copy { padding-top: 36px; }
  .sp-roof .sp-main { margin-top: 40px; order: -1; }
  .sp-roof .sp-copy { margin-top: 36px; }
  .sp-inset { margin-top: 32px; margin-left: auto; }
  .stair-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stair-row figure:first-child { grid-column: 1 / -1; }
  .stair-row figure:nth-child(2) { margin-top: 0; }
  .stair-row figure:nth-child(3) { margin-top: 18%; }
  .arcade { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; gap: 14px; }
  .arcade::-webkit-scrollbar { display: none; }
  .arcade figure { flex: 0 0 72vw; scroll-snap-align: center; }

  .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding-inline: 4px; grid-auto-rows: calc((100vw - 12px) / 2 * .6667); }
  .g:nth-child(n+9) { display: none; }
  .gal-more { display: block; }

  .amen-grid .sec-title { margin-bottom: 36px; }
  .amen-cols { grid-template-columns: 1fr; }
  .dist { margin-top: 48px; }

  .avail-grid { grid-template-columns: 1fr; }
  .sum { position: static; }
  .cal-months { grid-template-columns: 1fr; gap: 32px; }

  .rules-grid { grid-template-columns: 1fr; gap: 40px; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-end { justify-items: start; }
  .foot { padding-bottom: 112px; }

  .lb-fig { padding: 64px 0 24px; }
  .lb-fig img { max-width: 100vw; }
  .lb-fig figcaption { padding-inline: 16px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }

  .mbar {
    position: fixed; z-index: 25; inset: auto 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: var(--paper); box-shadow: 0 -1px 0 var(--line), 0 -12px 30px -18px rgba(6, 30, 35, .35);
    transform: translateY(110%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s;
  }
  .mbar.show { transform: none; visibility: visible; }
  .mbar p { font-size: 13px; color: var(--muted); line-height: 1.4; }
  .mbar .btn { min-height: 46px; padding: 0 22px; }
  .toast { bottom: 92px; }
}
@media (max-width: 400px) {
  .menu-btn span { display: none; }
  .nav-in { gap: 14px; }
}
