/* ==========================================================================
   Nocturne — "AFTER DARK": a boutique hotel where a mechanical split-flap
   arrivals board clacks you into your room.
   A Templatorium template · https://templatorium.com

   THE IDEA. Every design-hotel site is one of three things: white airy
   minimalism, a warm-taupe story-scroller, or a dark cinematic hero-video with
   a date-picker stapled on top. Nocturne refuses all three. The ground is deep
   aubergine — a velvet after-dark concourse the shelf has never used — and the
   booking apparatus IS the arrivals board: dates and guests are departure-board
   fields, and availability CLACKS over mechanically on a hand-built Solari
   split-flap board. You don't fill in a form, you read the board.

   HOW TO RE-THEME (30-second version — full guide in docs/README.md):
   every colour, font and size lives as a custom property in the token block
   below (section 1). Change the values there and the whole concourse follows.
   Bring your own accent by swapping the single --amber token. Everything under
   the tokens is structure; you rarely touch it.

   THE CONTRAST PROMISE. Every text colour is LIGHT (warm bone, a muted mauve, or
   the amber signal) and every ground is a DEEP saturated aubergine, so every
   text/ground pair clears WCAG 2.2 AA computed. Worst real-text pair is
   bone-dim on the lit plum-lift panel at 5.3:1 (>0.3 headroom over the 4.5
   floor even with the film-grain overlay); primary bone-on-plum is 13.9:1; the
   amber signal is 8.5:1 and the amber buy-button label 9.3:1. The film-grain
   sits BEHIND opaque ground fills, never under copy. The light Deco display
   (Limelight) is used LARGE and ALL-CAPS only, on high-contrast grounds. Re-check
   any colour you change: https://webaim.org/resources/contrastchecker/
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. FONTS — vendored woff2, own licenses shipped (fonts/OFL.txt + LICENSE.txt).
      Limelight (OFL) is the Art-Deco marquee; General Sans (ITF Free Font
      License) is the concourse UI grotesk; Fragment Mono (OFL) is the
      departure-board machine-data voice. No network, no font CDN.
   -------------------------------------------------------------------------- */
@font-face { font-family: "Limelight"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../fonts/limelight-400.woff2") format("woff2"); }
@font-face { font-family: "General Sans"; font-style: normal; font-weight: 200 700;
  font-display: swap; src: url("../fonts/general-sans-variable.woff2") format("woff2"); }
@font-face { font-family: "Fragment Mono"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../fonts/fragment-mono-400.woff2") format("woff2"); }

/* --------------------------------------------------------------------------
   1. TOKENS — the re-theme contract (the token block below is the first one the
      customizer reads; keep it first, do not move it)
   -------------------------------------------------------------------------- */
:root {
  /* --- The after-dark concourse (the IDENTITY) -----------------------------
     Deep aubergine / plum-violet: the one saturated ground the shelf never
     uses. Three depths carry the pacing; bone text reads on every one. */
  --plum:      #2A1130; /* page ground — the after-dark concourse */
  --plum-deep: #1C0A22; /* deeper bands · footer · lightbox scrim */
  --plum-lift: #3A1C42; /* raised "lit" surface — cards, the booking rail */
  --flap:      #241228; /* split-flap cell face (resting) */

  /* --- Light text treatments (carried by every ground) --------------------- */
  --bone:     #F0E6DA; /* primary text — warm bone (13.9:1 on plum) */
  --bone-dim: #A896A4; /* secondary / muted text — dusty mauve-bone */

  /* --- Structure ----------------------------------------------------------- */
  --line:     #4A2C52; /* hairlines / borders — violet-tinted, decorative */

  /* --- The one accent (a brass-neon signal) — the ONLY reskinnable colour ---
     Used on < 5% of any viewport: the one Check-availability button, the board
     glow-edge + an arriving flap, the AVAILABLE dot + price arrows, and focus
     rings. Swap this token to bring your brand colour. NOT used for eyebrows,
     body or headings — that keeps it meaning "this is the action / this just
     arrived." */
  --amber:     #EBA94E; /* THE accent (8.5:1 on plum — legible as a signal) */
  --amber-ink: #1C0A22; /* label on an amber fill (9.3:1) */

  /* --- Fonts --------------------------------------------------------------- */
  --deco: "Limelight", "Georgia", serif;        /* marquee — LARGE CAPS only */
  --sans: "General Sans", system-ui, sans-serif; /* concourse UI + body */
  --mono: "Fragment Mono", ui-monospace, monospace; /* machine data ONLY */

  /* --- Ground role variables (default = the concourse) ---------------------
     Every band reads these; a [data-ground] rule (section 3) swaps the whole
     set so a section's text follows its depth. */
  --g-bg:   var(--plum);
  --g-fg:   var(--bone);
  --g-mute: var(--bone-dim);
  --g-line: var(--line);

  /* --- Scale --------------------------------------------------------------- */
  --wrap: 1240px;
  --sp-section: clamp(72px, 10vw, 116px);
  --radius: 4px;   /* near-square, mechanical station-signage */
  --gutter: clamp(20px, 4vw, 56px);
  --nav-h: 64px;
  --rail-h: 76px;
}

/* --------------------------------------------------------------------------
   2. RESET + BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--bone);
  background: var(--plum);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Film grain — a faint tri-tone violet noise, BEHIND ground fills, never under
   copy. Fixed so it does not scroll. Taxes contrast ~0.1–0.3; the tightest text
   pair keeps >0.3 headroom. Retires under reduced-motion is unnecessary (it is
   static), but it is decorative and aria-hidden by being a ::before. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

:where(h1, h2, h3, h4) { font-weight: inherit; line-height: 1.1; }

/* Skip link + a11y helpers */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--amber); color: var(--amber-ink);
  padding: 10px 16px; border-radius: var(--radius);
  font-family: var(--sans); font-weight: 600;
  transition: top .18s ease;
}
.skip-link:focus { top: 8px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Focus-visible — computed on EVERY ground: amber ring on dark plum = 8.5:1. */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Sticky nav + rail clearance for every in-page target (promoted rule). */
[id] { scroll-margin-top: calc(var(--nav-h) + var(--rail-h) + 16px); }

/* Everything above the grain */
.nav, main, .footer { position: relative; z-index: 1; }

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

/* --------------------------------------------------------------------------
   3. GROUND ROLES — a section wears a depth; its text follows.
   -------------------------------------------------------------------------- */
[data-ground] { background: var(--g-bg); color: var(--g-fg); }
[data-ground="plum"]      { --g-bg: var(--plum); }
[data-ground="deep"]      { --g-bg: var(--plum-deep); }
[data-ground="lift"]      { --g-bg: var(--plum-lift); }
[data-ground] .muted, [data-ground] .lede { color: var(--g-mute); }

/* --------------------------------------------------------------------------
   4. TYPE PRIMITIVES
   -------------------------------------------------------------------------- */
/* Deco marquee — LARGE + ALL-CAPS ONLY. Never below 26px, never body. */
.deco {
  font-family: var(--deco);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.92;
}
.eyebrow {                      /* lobby-sign caps — Deco, NOT mono, NOT amber */
  font-family: var(--deco);
  text-transform: uppercase;
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.04em;
  color: var(--bone);
  display: inline-block;
}
.mono {                         /* machine data ONLY — rates, Nos, times, dates */
  font-family: var(--mono);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.lede {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--bone-dim);
  max-width: 64ch;
}
.muted { color: var(--bone-dim); }

.h2 {
  font-family: var(--deco);
  text-transform: uppercase;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 0.96;
  letter-spacing: 0.01em;
}
.h3 {
  font-family: var(--deco);
  text-transform: uppercase;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: 0.01em;
}

.section { padding-block: var(--sp-section); }
.section-head { max-width: 64ch; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head .h2 { margin-bottom: 18px; }

/* --------------------------------------------------------------------------
   5. NAV — Deco wordmark + amber "open" lamp + one amber CTA. Sticky, un-sticks
      with no JS (position: sticky is native; JS only adds a hairline on scroll).
   -------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--plum) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav > .wrap {
  height: 100%;
  display: flex; align-items: center; gap: 20px;
}
.wordmark {
  font-family: var(--deco);
  text-transform: uppercase;
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--bone);
  display: inline-flex; align-items: center; gap: 10px;
  white-space: nowrap;
}
.wordmark .lamp {                /* the small amber "open" lamp */
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber), 0 0 2px var(--amber);
  flex: none;
}
.nav nav { margin-left: auto; }
.nav-links {
  list-style: none; padding: 0;
  display: flex; gap: clamp(16px, 2vw, 30px); align-items: center;
}
.nav-links a {
  font-family: var(--sans);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--bone-dim);
  padding: 6px 0;
  transition: color .15s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--bone); }
.nav-cta {
  display: inline-flex; align-items: center;
  background: var(--amber); color: var(--amber-ink);
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 9px 18px; border-radius: 999px;
  transition: filter .2s ease, box-shadow .2s ease;
}
.nav-cta:hover { filter: brightness(1.08); box-shadow: 0 0 20px -4px var(--amber); }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none; border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 42px; height: 38px;
  align-items: center; justify-content: center;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; display: block; width: 18px; height: 2px;
  background: var(--bone); position: relative;
}
.nav-toggle .bars::before { position: absolute; top: -6px; }
.nav-toggle .bars::after  { position: absolute; top: 6px; }

/* --------------------------------------------------------------------------
   6. THE SPLIT-FLAP BOARD — the signature.
      Resting markup is plain text inside [data-board]; JS builds the cells and
      clacks them in. No-JS: the text you see IS the resting semantic markup.
      Reduced-motion: cells snap to final (JS respects the media query).
   -------------------------------------------------------------------------- */
.board {
  display: block;
  font-family: var(--deco);
  text-transform: uppercase;
  color: var(--bone);
}
/* Once JS upgrades a board it gets .board--live and we lay cells in a wrapping
   flex row (fixed-width cells wrap, never overflow — audited at 375/768/1440). */
.board--live {
  display: flex; flex-wrap: wrap;
  gap: var(--flap-gap, 4px);
  perspective: 700px;
}
/* Word grouping: each word's cells sit in a nowrap inline-flex group, so whole
   WORDS wrap to the next row but glyphs within a word never split. Spaces are
   the board's direct children — the only break points. Gap inherits so the
   inter-letter and inter-word spacing stay identical. */
.flap-word { display: inline-flex; flex-wrap: nowrap; gap: var(--flap-gap, 4px); }
.flap-cell {
  --cell-w: 0.72em;
  position: relative;
  width: var(--cell-w);
  min-width: var(--cell-w);
  aspect-ratio: 3 / 4;
  background: var(--flap);
  border-radius: 3px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  overflow: hidden;
  transform-style: preserve-3d;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--plum-deep) 60%, transparent);
}
.flap-cell::after {              /* the mechanical mid seam */
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--plum-deep); z-index: 3;
}
.flap-cell .glyph {
  display: block;
  line-height: 1;
  font-size: 1em;
  color: var(--bone);
  transform-origin: center;
  will-change: transform;
}
.flap-cell.is-space { background: transparent; border-color: transparent; box-shadow: none; }
.flap-cell.is-space::after { display: none; }
/* an arriving cell warms to amber */
.flap-cell.is-arriving {
  border-color: var(--amber);
  box-shadow: 0 0 14px -3px var(--amber), inset 0 0 12px -6px var(--amber);
}
.flap-cell.is-arriving .glyph { color: var(--amber); }

/* The hero board block */
.hero {
  padding-block: clamp(48px, 8vw, 96px) var(--sp-section);
}
.hero .board-line { display: block; margin: 0; }
/* Once JS upgrades a hero line it must lay its cells in the same wrapping flex
   row as every other board — raise specificity past the display:block above. */
.hero .board-line.board--live { display: flex; }
.hero .line-1 { font-size: clamp(18px, 3vw, 30px); letter-spacing: 0.16em; color: var(--bone-dim); margin-bottom: 18px; }
.hero .line-2 { font-size: clamp(44px, 11vw, 132px); letter-spacing: 0.02em; line-height: 0.92; }
.hero .line-3 { font-size: clamp(18px, 3.4vw, 34px); letter-spacing: 0.1em; color: var(--bone-dim); margin-top: 20px; }
.hero .board--live.line-1, .hero .board--live.line-3 { --flap-gap: 3px; }
.hero-meta {
  margin-top: clamp(32px, 5vw, 56px);
  display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline;
}
.hero-meta .eyebrow { color: var(--bone-dim); }
.hero-meta .mono { font-size: 14px; color: var(--bone-dim); }

/* --------------------------------------------------------------------------
   7. THE BOOKING RAIL — the arrivals desk. Departure-board fields, sticky under
      the nav. Split-booking: the amber CTA links OUT to any engine (editable
      href); the native Request-to-book form on Contact is the fallback.
   -------------------------------------------------------------------------- */
.rail {
  position: sticky; top: var(--nav-h); z-index: 40;
  background: var(--plum-lift);
  border-block: 1px solid var(--line);
}
.rail > .wrap {
  min-height: var(--rail-h);
  display: flex; flex-wrap: wrap; align-items: end;
  gap: 14px 22px;
  padding-block: 14px;
}
.rail-field { display: flex; flex-direction: column; gap: 5px; }
.rail-field > .flabel {
  font-family: var(--deco); text-transform: uppercase;
  font-size: 11px; letter-spacing: 0.14em; color: var(--bone-dim);
}
.rail-field input[type="date"],
.rail-field .guests-btn {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  background: var(--flap);
  color: var(--bone);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  min-width: 150px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rail-field input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.7) sepia(1) hue-rotate(-10deg); }
.rail-field input[type="date"]:focus,
.rail-field .guests-btn:focus,
.rail-field input[type="date"]:hover,
.rail-field .guests-btn:hover {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber);   /* the amber glow-liner on the active field */
  outline: none;
}
.rail-cta { margin-left: auto; }

/* Guests popover (Popover API + CSS anchor positioning, native, JS-free). */
.guests-btn { display: inline-flex; align-items: center; gap: 10px; text-align: left; }
.guests-btn .caret { color: var(--bone-dim); font-family: var(--sans); }
.guests-panel {
  margin: 0; border: 1px solid var(--line);
  background: var(--plum-lift); color: var(--bone);
  border-radius: var(--radius);
  padding: 16px; width: 240px;
  box-shadow: 0 24px 60px -20px var(--plum-deep);
}
/* anchor-positioned where supported; falls back to normal popover centering. */
@supports (anchor-name: --a) {
  .guests-btn { anchor-name: --guests-anchor; }
  .guests-panel { position-anchor: --guests-anchor; position-area: bottom span-right; margin-top: 8px; }
}
.guests-panel .g-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.guests-panel .g-row:last-child { border-bottom: 0; }
.guests-panel .g-row label { font-size: 14px; }
.guests-panel input[type="number"] {
  width: 72px; text-align: center;
  font-family: var(--mono);
  background: var(--flap); color: var(--bone);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 8px;
}

/* --------------------------------------------------------------------------
   8. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px;
  padding: 12px 26px; border-radius: 999px;
  border: 1px solid transparent;
  transition: filter .2s ease, box-shadow .25s ease, background .2s ease, color .2s ease;
}
.btn--fill {                    /* the buy-action — amber neon lozenge */
  background: var(--amber); color: var(--amber-ink);
  box-shadow: 0 0 0 0 var(--amber);
}
.btn--fill:hover, .btn--fill:focus-visible {
  filter: brightness(1.08);
  box-shadow: 0 0 26px -4px var(--amber);   /* neon warm-up */
}
.btn--line {
  background: transparent; color: var(--bone);
  border-color: var(--line); border-radius: var(--radius);
}
.btn--line:hover { border-color: var(--bone); }
/* reduced-motion: the neon ships statically lit, no warm-up transition */
@media (prefers-reduced-motion: reduce) {
  .btn, .btn--fill { transition: none; }
  .btn--fill { box-shadow: 0 0 18px -6px var(--amber); }
}

/* --------------------------------------------------------------------------
   9. ROOM PLATES (cards) — plum-lift panel, image window, Deco name, oversized
      off-centre mono room No., mono data row.
   -------------------------------------------------------------------------- */
.rooms-grid {
  display: grid; gap: clamp(18px, 2.4vw, 28px);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.plate {
  position: relative;
  background: var(--plum-lift);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .18s ease, transform .18s ease;
}
.plate:hover { border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); }
/* image window (4:5) — full-bleed within the plate, height-capped */
.win {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 420px;
  overflow: hidden;
  background: var(--plum-deep);
}
.win img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plate-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.plate-name { font-family: var(--deco); text-transform: uppercase; font-size: clamp(20px, 2.4vw, 26px); letter-spacing: 0.01em; }
/* oversized off-centre room No. — mono, machine data */
.plate .rm-no {
  position: absolute; top: 10px; right: 14px; z-index: 2;
  font-family: var(--mono); font-size: clamp(30px, 5vw, 52px);
  color: color-mix(in srgb, var(--bone) 45%, transparent); /* ≥3:1 on --plum-deep (large text floor) */
  letter-spacing: -0.02em; pointer-events: none;
}
.plate-data { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--mono); font-size: 13px; color: var(--bone-dim); }
.plate-data .avail { color: var(--amber); display: inline-flex; align-items: center; gap: 6px; }
.plate-data .avail .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.plate-amenity { color: var(--bone-dim); font-size: 14px; }
.plate-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.plate-foot .price { font-family: var(--mono); font-size: 15px; color: var(--bone); }
.plate-foot .go { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; font-weight: 600; color: var(--amber); }

/* --------------------------------------------------------------------------
   10. DESIGNED EMPTY-STATES — a faint Art-Deco neon-sign motif drawn in CSS,
       masked from --line so it re-themes, with an off-centre corner spec label.
       Retires under a real photo via :has(img). NEVER a bare centred box.
   -------------------------------------------------------------------------- */
.win.is-empty,
.hero-photo.is-empty { background: var(--plum-deep); }
.win.is-empty::before,
.hero-photo.is-empty::before { /* deco marquee-bulb keyhole motif (masked token colour) */
  content: "";
  position: absolute; inset: 12px;
  border-radius: 3px;
  background: var(--line);
  -webkit-mask: var(--deco-motif) center / 90% 90% no-repeat;
          mask: var(--deco-motif) center / 90% 90% no-repeat;
  opacity: 0.5;
}
.win .spec,
.hero-photo .spec {              /* corner spec label, anchored off-centre top-left */
  position: absolute; top: 12px; left: 14px; z-index: 2;
  font-family: var(--deco); text-transform: uppercase;
  font-size: 11px; letter-spacing: 0.1em; color: var(--bone-dim);
  display: flex; flex-direction: column; gap: 2px;
  line-height: 1.3;
}
.win .spec b,
.hero-photo .spec b { font-family: var(--mono); font-weight: 400; letter-spacing: 0.02em; color: var(--bone); }
/* the moment a real photo lands, the motif + spec label retire */
.win:has(img) .spec,
.win:has(img)::before,
.hero-photo:has(img) .spec,
.hero-photo:has(img)::before { display: none; }

/* the neon-sign motif — a deco sunburst keyhole, drawn as an inline SVG token */
:root {
  --deco-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 120'%3E%3Cg fill='none' stroke='black' stroke-width='2'%3E%3Crect x='8' y='8' width='84' height='104' rx='3'/%3E%3Cpath d='M50 24 a10 10 0 1 0 0.01 0 M46 43 h8 l3 20 h-14 z'/%3E%3Cg%3E%3Cline x1='50' y1='72' x2='50' y2='92'/%3E%3Cline x1='34' y1='78' x2='42' y2='90'/%3E%3Cline x1='66' y1='78' x2='58' y2='90'/%3E%3Cline x1='26' y1='90' x2='38' y2='96'/%3E%3Cline x1='74' y1='90' x2='62' y2='96'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Full-bleed hero photo (16:9, height-capped so it reads as a band). */
.hero-photo {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: clamp(360px, 52vw, 560px);
  overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--plum-deep);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* --------------------------------------------------------------------------
   11. STORY / SPLIT LAYOUTS
   -------------------------------------------------------------------------- */
.split {
  display: grid; gap: clamp(28px, 5vw, 64px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 860px) { .split { grid-template-columns: 1.05fr 0.95fr; } .split.flip > :first-child { order: 2; } }
.prose p { margin-bottom: 1em; max-width: 60ch; }
.prose p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   12. THE :has() ROOM FILTER — real interactivity, zero JS.
       Radios per axis; a non-"all" choice hides rooms that do not match.
   -------------------------------------------------------------------------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  margin-bottom: 28px;
}
.filter-group { display: flex; align-items: center; gap: 8px; overflow-x: auto; }
.filter-group > .glabel {
  font-family: var(--deco); text-transform: uppercase;
  font-size: 11px; letter-spacing: 0.12em; color: var(--bone-dim);
  white-space: nowrap;
}
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block;
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 12px; font-weight: 500; color: var(--bone-dim);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  white-space: nowrap; transition: color .15s, border-color .15s, background .15s;
}
/* Selected chip: amber TEXT + a 1px amber hairline, NOT an amber fill. The solid
   amber fill is reserved for the single "Check availability" CTA so the buy-signal
   stays scarce (amber-on-plum text ≈ 8.5:1, AA — DESIGN.md §2). */
.chip input:checked + span { color: var(--amber); background: transparent; border-color: var(--amber); }
.chip input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.chip:hover span { border-color: var(--bone-dim); }

/* the filtering itself — pure CSS, on the rooms section wrapper */
.roomfilter:has(#occ-2:checked)   .plate:not([data-occ~="2"])   { display: none; }
.roomfilter:has(#occ-3:checked)   .plate:not([data-occ~="3"])   { display: none; }
.roomfilter:has(#bed-king:checked) .plate:not([data-bed~="king"]) { display: none; }
.roomfilter:has(#bed-twin:checked) .plate:not([data-bed~="twin"]) { display: none; }
.roomfilter:has(#view-city:checked) .plate:not([data-view~="city"]) { display: none; }
.roomfilter:has(#view-court:checked) .plate:not([data-view~="court"]) { display: none; }
/* empty-result note appears only when every plate is filtered out */
.no-match { display: none; color: var(--bone-dim); }
.roomfilter:has(#occ-2:checked):not(:has(.plate[data-occ~="2"])) .no-match,
.roomfilter:has(#occ-3:checked):not(:has(.plate[data-occ~="3"])) .no-match { display: block; }

/* --------------------------------------------------------------------------
   13. DINING MENU (text, not an image of text)
   -------------------------------------------------------------------------- */
.menu { display: grid; gap: clamp(28px, 4vw, 44px); grid-template-columns: 1fr; }
@media (min-width: 720px) { .menu { grid-template-columns: 1fr 1fr; } }
.menu-col h3 { margin-bottom: 16px; }
.menu-item { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.menu-item .mi-name { flex: none; }
.menu-item .mi-lead { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.menu-item .mi-price { font-family: var(--mono); color: var(--bone); }
.menu-item .mi-desc { display: block; color: var(--bone-dim); font-size: 14px; width: 100%; margin-top: 2px; }

/* --------------------------------------------------------------------------
   14. OFFER / PACKAGE CARDS
   -------------------------------------------------------------------------- */
.offer {
  background: var(--plum-lift); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.offer.feature { border-color: color-mix(in srgb, var(--amber) 50%, var(--line)); }
.offer .tag { font-family: var(--deco); text-transform: uppercase; font-size: 12px; letter-spacing: 0.12em; color: var(--amber); }
.offer .price { font-family: var(--mono); font-size: 22px; }
.offer .price small { font-size: 13px; color: var(--bone-dim); }
.offer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--bone-dim); font-size: 14px; }
.offer li { display: flex; gap: 10px; }
.offer li::before { content: "—"; color: var(--amber); }
.offer .btn { margin-top: auto; }

/* --------------------------------------------------------------------------
   15. FORMS — board-card styling
   -------------------------------------------------------------------------- */
.form-card { background: var(--plum-lift); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 36px); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-family: var(--deco); text-transform: uppercase; font-size: 12px; letter-spacing: 0.1em; color: var(--bone-dim); }
.field input, .field select, .field textarea {
  background: var(--flap); color: var(--bone);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 13px;
}
.field input[type="date"], .field input[type="number"] { font-family: var(--mono); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber);
}
.field textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* --------------------------------------------------------------------------
   16. TONIGHT'S SERVICE board (dining) + arrivals ledger rows
   -------------------------------------------------------------------------- */
.service-board { background: var(--plum-deep); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.service-row { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.service-row:last-child { border-bottom: 0; }
.service-row .sittings { font-family: var(--mono); color: var(--bone); min-width: 92px; }
.service-row .sv-name { font-family: var(--deco); text-transform: uppercase; letter-spacing: 0.04em; }
.service-row .sv-note { color: var(--bone-dim); font-size: 14px; margin-left: auto; }

/* --------------------------------------------------------------------------
   17. CTA CLOSER — plum-deep + amber top-glow
   -------------------------------------------------------------------------- */
.closer { position: relative; text-align: center; }
.closer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  box-shadow: 0 0 24px 2px color-mix(in srgb, var(--amber) 50%, transparent);
}
.closer .h2 { margin: 0 auto 20px; max-width: 20ch; }
.closer .lede { margin: 0 auto 28px; }

/* trust strip */
.trust-logos { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; }
.trust-logos span { font-family: var(--deco); text-transform: uppercase; letter-spacing: 0.08em; color: var(--bone-dim); font-size: clamp(14px, 1.6vw, 18px); }
.book-direct { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; font-weight: 600; }
.book-direct .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* --------------------------------------------------------------------------
   18. FOOTER
   -------------------------------------------------------------------------- */
.footer { background: var(--plum-deep); border-top: 1px solid var(--line); padding-block: clamp(48px, 7vw, 80px) 32px; }
.footer-top { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h4 { font-family: var(--deco); text-transform: uppercase; font-size: 13px; letter-spacing: 0.1em; color: var(--bone-dim); margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer a:hover { color: var(--bone); }
.footer .muted, .footer li { color: var(--bone-dim); font-size: 14px; }
.footer .mono { font-size: 13px; }
.footer .tag { color: var(--bone-dim); max-width: 40ch; margin-top: 12px; }
.footer-base {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between;
  color: var(--bone-dim); font-size: 13px;
}

/* --------------------------------------------------------------------------
   19. UTILITIES / DETAIL PAGE
   -------------------------------------------------------------------------- */
.stack-lg > * + * { margin-top: clamp(28px, 5vw, 56px); }
.amenities { list-style: none; padding: 0; display: grid; gap: 10px 24px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.amenities li { display: flex; gap: 10px; color: var(--bone-dim); font-size: 15px; }
.amenities li::before { content: "◦"; color: var(--amber); }
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery .win { aspect-ratio: 3 / 2; max-height: 320px; border-radius: var(--radius); border: 1px solid var(--line); }
.oversized-no { font-family: var(--mono); font-size: clamp(60px, 14vw, 150px); line-height: 0.85; color: color-mix(in srgb, var(--bone) 14%, transparent); letter-spacing: -0.03em; }
.spec-sheet { list-style: none; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.spec-sheet li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.spec-sheet dt, .spec-sheet .k { font-family: var(--deco); text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; color: var(--bone-dim); }
.spec-sheet .v { font-family: var(--mono); color: var(--bone); }

.pagehead { padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 44px); }
.pagehead .h1 { font-family: var(--deco); text-transform: uppercase; font-size: clamp(36px, 8vw, 92px); line-height: 0.92; letter-spacing: 0.01em; }
.pagehead .eyebrow { margin-bottom: 16px; color: var(--bone-dim); }
.pagehead .lede { margin-top: 20px; }

/* --------------------------------------------------------------------------
   20. RESPONSIVE — mobile nav + the fixed bottom booking pill (:target sheet)
   -------------------------------------------------------------------------- */
.mobile-book { display: none; }
.rail-close { display: none; }

@media (max-width: 860px) {
  .nav nav { position: fixed; inset: var(--nav-h) 0 auto 0; background: var(--plum-deep); border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility .18s; margin: 0; }
  .nav nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; }
  .nav .nav-cta { display: none; }
}

@media (max-width: 640px) {
  /* rail collapses to a fixed bottom Check-availability pill that opens the
     rail as a :target sheet — JS-free. */
  .rail { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60;
    transform: translateY(100%); transition: transform .22s ease; box-shadow: 0 -20px 50px -20px var(--plum-deep);
    border-top: 1px solid var(--line); border-bottom: 0; max-height: 82vh; overflow-y: auto; }
  .rail:target { transform: none; }
  .rail > .wrap { flex-direction: column; align-items: stretch; padding-top: 22px; }
  .rail-field input[type="date"], .rail-field .guests-btn { min-width: 0; width: 100%; }
  .rail-cta { margin-left: 0; }
  .rail-cta .btn { width: 100%; justify-content: center; }
  .rail-close { display: inline-flex; align-self: flex-end; background: none; border: 1px solid var(--line); border-radius: var(--radius); color: var(--bone); width: 38px; height: 34px; align-items: center; justify-content: center; margin-bottom: 4px; }
  .mobile-book { display: inline-flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 55; justify-content: center; }
  .mobile-book .btn { width: 100%; justify-content: center; }
  main { padding-bottom: 84px; }        /* clear the fixed pill */
  .hero .line-2 { font-size: clamp(40px, 13vw, 68px); }
}

/* --------------------------------------------------------------------------
   21. REDUCED MOTION — freeze everything decorative; resting state is the page.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Reveal-on-scroll: nothing is pre-hidden without JS. The .js flag (added by
   main.js) is what arms the hidden start state, so no-JS shows everything. */
/* Rest VISIBLE (axe-clean at load; below-fold content is never pre-hidden);
   the entrance rise plays only when IntersectionObserver adds .in. */
@keyframes reveal-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.js .reveal.in { animation: reveal-rise .6s ease backwards; }
