/* ==========================================================================
   Kod Flo: a riad in the Marrakech Medina
   One token layer, mobile-first, logical properties throughout (EN + Darija RTL).
   The recurring motif is the riad's own keyhole arch; the signature is light.
   ========================================================================== */

/* --- 1. Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, svg, video, canvas, iframe { display: block; max-width: 100%; }
img, video, iframe { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

/* --- 2. Tokens ------------------------------------------------------------ */
:root {
  /* colour: one ground, one ink, one accent used twice on the whole page */
  --paper:  #ffffff;
  --veil:   #f7f7f6;          /* soft alabaster: the section tone step */
  --veil-2: #efeeec;          /* second step, quiet panels only */
  --ink:    #121212;          /* deep charcoal, never pure black */
  --ink-2:  #6d6b68;          /* warm stone grey: secondary notes only */
  --brass:  #b8912f;          /* decorative accent, dots and marks only */
  --brass-ink: #7d6220;       /* the same accent when it must carry text */
  --scrim:  rgb(12 12 12 / .34);
  --on-dark: #ffffff;
  --on-dark-2: rgb(255 255 255 / .74);

  /* type */
  --sans: "Inter Tight", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans-ar: "IBM Plex Sans Arabic", "Inter Tight", system-ui, sans-serif;
  --t-display: clamp(2.45rem, 12.5vw, 8.75rem);
  --t-h2:      clamp(1.85rem, 6.4vw, 4.25rem);
  --t-h3:      clamp(1.15rem, 3.4vw, 1.75rem);
  --t-lead:    clamp(1.0625rem, 1.15rem + 1.1vw, 1.5rem);
  --t-body:    1.0625rem;
  --t-small:   0.875rem;
  --t-micro:   0.8125rem;
  --track-display: -0.045em;
  --measure: 62ch;

  /* space */
  --pad: clamp(1.25rem, 5vw, 3.25rem);
  --frame: 1440px;
  --gutter: clamp(1rem, 2.4vw, 1.75rem);
  --section-y: clamp(5.5rem, 11vw, 10rem);
  --stack: clamp(0.75rem, 1.4vw, 1.25rem);

  /* geometry */
  --arch-r: clamp(1.5rem, 4vw, 3.5rem);
  --radius: 0px;              /* media is square unless the arch says otherwise */

  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --dur-fast: 140ms;
  --dur: 240ms;
  --dur-slow: 620ms;

  --header-h: 4.5rem;
  color-scheme: light;
}

/* Nothing may be wider than a 360px phone: every headline and every long word
   has to be able to break rather than push the page sideways. */
h1, h2, h3, p, li, dd, summary { overflow-wrap: break-word; }

html[dir="rtl"] {
  --track-display: 0;
  --measure: 46ch;
}

/* --- 3. Base type --------------------------------------------------------- */
html { background: var(--paper); }
body {
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[dir="rtl"] body { font-family: var(--sans-ar); line-height: 1.75; }

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: var(--track-display);
  line-height: 0.98;
  text-wrap: balance;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 { line-height: 1.16; }

h1 { font-size: var(--t-display); }
h2 { font-size: var(--t-h2); line-height: 1.02; }
h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.02em; }
html[dir="rtl"] h3 { letter-spacing: 0; }
p { text-wrap: pretty; }

.lead { font-size: var(--t-lead); line-height: 1.42; letter-spacing: -0.015em; max-width: 34ch; }
html[dir="rtl"] .lead { letter-spacing: 0; line-height: 1.6; }
.body-copy { max-width: var(--measure); }
.body-copy + .body-copy { margin-block-start: 1.1em; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-small); }
.micro { font-size: var(--t-micro); }

/* --- 4. Layout ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--frame);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.bleed { width: 100%; }
main > section { padding-block: var(--section-y); }
main > section:first-of-type { padding-block: 0; }
.section-head {
  display: grid;
  gap: var(--stack);
  margin-block-end: clamp(2.5rem, 6vw, 5rem);
}
.section-head h2 { max-width: 18ch; }
.stack-sm { display: grid; gap: 0.6rem; }
.stack { display: grid; gap: var(--stack); }
.stack-lg { display: grid; gap: clamp(1.5rem, 3.5vw, 3rem); }

/* A grid or flex child defaults to its content's minimum width, and one wide
   child then widens every track beside it. On a phone nothing may do that:
   the tracks shrink, and text wraps instead. */
.stack > *, .stack-sm > *, .stack-lg > *,
.about-grid > *, .location-grid > *, .contact-grid > *,
.amenities-grid > *, .footer-cols > *, .form > *, .field > *,
.gallery-grid > *, .rooms__track > *, .facts__row > * { min-width: 0; }

/* --- 5. Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;             /* 48px tap target */
  padding: 0.85rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn > span { position: relative; z-index: 1; }
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brass-ink);
  transform: translateY(101%);
  transition: transform var(--dur) var(--ease);
}
.btn:hover::after, .btn:focus-visible::after { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--paper); }
.btn:active { transform: scale(0.975); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.btn--ghost::after { background: var(--ink); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--paper); }

.btn--onDark { background: var(--paper); color: var(--ink); }
.btn--onDark::after { background: var(--brass-ink); }
.btn--onDark:hover, .btn--onDark:focus-visible { color: var(--paper); }

.btn--ghostDark { background: transparent; color: var(--on-dark); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .6); }
.btn--ghostDark::after { background: var(--paper); }
.btn--ghostDark:hover, .btn--ghostDark:focus-visible { color: var(--ink); }

/* self-erasing underline, sweeps inline-start to inline-end */
.ul-link {
  display: inline-block;
  position: relative;
  padding-block-end: 2px;
  color: inherit;
}
.ul-link::before, .ul-link::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: 0;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}
html[dir="rtl"] .ul-link::before, html[dir="rtl"] .ul-link::after { transform-origin: right center; }
.ul-link::before { opacity: .34; }
.ul-link::after { transform: scaleX(0); }
.ul-link:hover::after, .ul-link:focus-visible::after { transform: scaleX(1); }
.ul-link:hover::before, .ul-link:focus-visible::before { transform: scaleX(1) translateY(0); }

/* --- 6. Header ------------------------------------------------------------ */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  color: var(--on-dark);
  transition: background-color var(--dur-slow) var(--ease-soft), color var(--dur) var(--ease-soft);
}
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim);
  opacity: 1;
  transition: opacity var(--dur-slow) var(--ease-soft);
  pointer-events: none;
}
.site-header[data-solid="true"] { background: var(--paper); color: var(--ink); }
.site-header[data-solid="true"]::after { opacity: 0; }
.site-header__row {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--frame);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 2rem);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  min-height: 44px;
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand__mark { font-size: 1.0625rem; }
.brand__sub { font-size: var(--t-micro); color: currentColor; opacity: .72; font-weight: 400; letter-spacing: 0.01em; }
.brand__sub { display: none; }
@media (min-width: 30rem) { .brand__sub { display: inline; } }

.nav { display: none; }
@media (min-width: 62rem) {
  .nav { display: flex; align-items: center; gap: clamp(1rem, 2.1vw, 2rem); margin-inline-start: auto; }
  .nav a { font-size: var(--t-small); min-height: 44px; display: inline-flex; align-items: center; }
}
.nav__probe { position: fixed; visibility: hidden; }

.header-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 0.5rem; }
@media (min-width: 62rem) { .header-tools { margin-inline-start: 0; } }

/* language switcher */
.lang {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: rgb(255 255 255 / .16);
  border-radius: 999px;
  transition: background-color var(--dur) var(--ease-soft);
}
.site-header[data-solid="true"] .lang { background: var(--veil-2); }
.lang__btn {
  min-height: 44px;
  padding-inline: 0.85rem;
  border-radius: 999px;
  font-size: var(--t-micro);
  font-weight: 500;
  color: inherit;
  opacity: .68;
  transition: background-color var(--dur) var(--ease), opacity var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang__btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); opacity: 1; }
.site-header[data-solid="true"] .lang__btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lang__btn:hover { opacity: 1; }
.lang__btn:active { transform: scale(0.96); }

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: inherit;
}
@media (min-width: 62rem) { .burger { display: none; } }
.burger svg { width: 22px; height: 22px; }
/* a 360px phone must fit wordmark + language switch + menu on one row */
@media (max-width: 29.99rem) {
  .site-header__row { gap: 0.5rem; }
  .header-tools { gap: 0.375rem; }
  .lang { padding: 2px; }
  .lang__btn { padding-inline: 0.55rem; font-size: 0.75rem; min-height: 44px; }
  .brand { font-size: 1rem; gap: 0; }
}
.burger__close { display: none; }
.burger[aria-expanded="true"] .burger__open { display: none; }
.burger[aria-expanded="true"] .burger__close { display: block; }

/* mobile panel */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--paper);
  color: var(--ink);
  padding: calc(var(--header-h) + 2rem) var(--pad) calc(2rem + env(safe-area-inset-bottom));
  display: grid;
  align-content: start;
  gap: 0.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1.25rem);
  transition: opacity var(--dur) var(--ease-soft), transform var(--dur-slow) var(--ease),
              visibility 0s linear var(--dur-slow);
}
.mobile-nav[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.mobile-nav a {
  font-size: clamp(1.5rem, 8vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  padding-block: 0.55rem;
  min-height: 48px;
  display: flex;
  align-items: center;
}
html[dir="rtl"] .mobile-nav a { letter-spacing: 0; }
.mobile-nav__foot { margin-block-start: 2rem; display: grid; gap: 0.75rem; color: var(--ink-2); }

/* --- 7. Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: end;
  overflow: clip;
  background: var(--ink);
  color: var(--on-dark);
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: clip;
  will-change: clip-path;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  transform: scale(1.05);
  will-change: transform;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgb(10 10 10 / .72) 0%, rgb(10 10 10 / .30) 42%, rgb(10 10 10 / .22) 100%);
}

/* --- the signature: one sun, five layers of light ------------------------
   The sun is a point on the wall. Every layer is a fixed shape that never
   changes size or colour; the script writes transform and opacity only, so
   each frame is composited and the light stays smooth on a phone. Physical
   left/top/width on purpose: the sun has a physical side and these layers
   must not mirror when the page turns right-to-left. The transforms here are
   the resting position (sun at 40%, fairly high), so the hero is lit with
   scripts off; the script takes over from there. */
.hero__lights {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: clip;
}
.hero__lights > * {
  position: absolute;
  left: 0;
  pointer-events: none;
  backface-visibility: hidden;
}
.hero.is-lit .hero__lights > * { will-change: transform, opacity; }

/* the bright core of the beam: narrow, cool, leaning with the sun */
.hero__light {
  top: -30%;
  height: 168%;
  width: 30%;
  transform-origin: 50% 0;
  transform: translate3d(83.333%, 2.28%, 0) rotate(0.5deg);
  opacity: 0.78;
  background: linear-gradient(90deg,
    rgb(255 255 255 / 0) 0%,
    rgb(255 254 249 / .12) 16%,
    rgb(255 255 255 / .34) 50%,
    rgb(255 254 249 / .12) 84%,
    rgb(255 255 255 / 0) 100%);
}
/* the warm halo that grows as the sun drops toward the rooftops */
.hero__light--warm {
  top: -36%;
  height: 180%;
  width: 62%;
  transform-origin: 50% 0;
  transform: translate3d(14.516%, 3.04%, 0) rotate(0.35deg);
  opacity: 0.25;
  background: linear-gradient(90deg,
    rgb(255 214 150 / 0) 0%,
    rgb(255 208 138 / .16) 24%,
    rgb(255 198 120 / .26) 50%,
    rgb(255 208 138 / .16) 76%,
    rgb(255 214 150 / 0) 100%);
}
/* the air itself, lit: a bloom that sits over the picture and lifts it */
.hero__bloom {
  inset: 0;
  transform: translate3d(-10%, 16%, 0);
  opacity: 0.61;
  background: radial-gradient(42% 46% at 50% 44%,
    rgb(255 246 226 / .30) 0%,
    rgb(255 244 220 / .10) 46%,
    rgb(255 244 220 / 0) 74%);
  mix-blend-mode: screen;
}
/* the shadow the wall throws, always on the side away from the sun */
.hero__shade {
  top: -30%;
  height: 168%;
  width: 26%;
  transform-origin: 50% 0;
  transform: translate3d(180.769%, 1.9%, 0) rotate(-0.45deg) scaleX(1.01);
  opacity: 0.49;
  background: linear-gradient(90deg,
    rgb(0 0 0 / 0) 0%,
    rgb(0 0 0 / .16) 22%,
    rgb(0 0 0 / .26) 50%,
    rgb(0 0 0 / .16) 78%,
    rgb(0 0 0 / 0) 100%);
}
/* the light lying on the water of the basin */
.hero__pool {
  inset: 0;
  transform: translate3d(6%, 0.76%, 0);
  opacity: 0.45;
  background: radial-gradient(30% 11% at 50% 79%,
    rgb(255 252 242 / .22) 0%,
    rgb(255 250 236 / .07) 44%,
    rgb(255 250 236 / 0) 72%);
}
.hero__inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--frame);
  margin-inline: auto;
  padding: calc(var(--header-h) + 3rem) var(--pad) clamp(2rem, 6vh, 4rem);
  display: grid;
  gap: clamp(1.25rem, 3.2vh, 2.25rem);
  align-content: end;
}
.hero h1 {
  font-size: var(--t-display);
  font-weight: 500;
  max-width: 20ch;
  text-shadow: 0 1px 34px rgb(0 0 0 / .34);
}
.hero__lead { color: var(--on-dark-2); max-width: 46ch; }
@media (min-width: 48rem) { .hero__lead { max-width: 52ch; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block-start: clamp(1rem, 3vh, 2rem);
  color: var(--on-dark-2);
  font-size: var(--t-micro);
}
.scroll-cue { display: inline-flex; align-items: center; gap: 0.7rem; }
.scroll-cue__line {
  position: relative;
  width: 3.5rem; height: 1px;
  background: rgb(255 255 255 / .32);
  overflow: clip;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset-block-start: 0; inset-inline-start: 0;
  width: 40%; height: 100%;
  background: var(--paper);
  animation: cue 2.6s var(--ease-soft) infinite;
}
@keyframes cue {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(260%); }
}
html[dir="rtl"] .scroll-cue__line::after { animation-name: cue-rtl; }
@keyframes cue-rtl {
  0% { transform: translateX(100%); }
  60%, 100% { transform: translateX(-260%); }
}

/* --- 8. Statement / about ------------------------------------------------ */
.statement {
  font-size: clamp(1.6rem, 7.4vw, 3.4rem);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -0.035em;
  max-width: 22ch;
}
html[dir="rtl"] .statement { letter-spacing: 0; line-height: 1.32; max-width: 24ch; }
.statement .w { display: inline-block; }
.no-js .statement .w, .reduced .statement .w { opacity: 1; }

.about-grid { display: grid; gap: clamp(2rem, 6vw, 4.5rem); }
@media (min-width: 60rem) {
  .about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); align-items: start; }
}
.about-figure { position: relative; }
.arch {
  position: relative;
  overflow: clip;
  border-radius: 46% 46% var(--radius) var(--radius) / 24% 24% var(--radius) var(--radius);
  background: var(--veil-2);
}
.arch img { width: 100%; aspect-ratio: 3 / 4.1; object-fit: cover; }
.arch--wide img { aspect-ratio: 4 / 3.2; }
.arch--tall img { aspect-ratio: 3 / 4.6; }
.figure-cap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-block-start: 0.9rem;
  font-size: var(--t-micro);
  color: var(--ink-2);
}
.facts { display: grid; gap: 0; border-block-start: 0; }
.facts__row {
  display: grid;
  gap: 0.15rem 1rem;
  grid-template-columns: minmax(0, 1fr);
  padding-block: 0.9rem;
  background: var(--paper);
}
@media (min-width: 30rem) { .facts__row { grid-template-columns: 9rem minmax(0, 1fr); } }
.facts__row + .facts__row { box-shadow: inset 0 1px 0 var(--veil-2); }
.facts__k { font-size: var(--t-small); color: var(--ink-2); }
.facts__v { font-size: var(--t-body); font-weight: 400; }

/* --- 9. Rooms (chapter 3: pinned horizontal) ----------------------------- */
.rooms { background: var(--veil); }
.rooms__viewport { overflow: visible; }
.rooms__track {
  display: grid;
  gap: var(--gutter);
  /* phone: a normal stacked list, the section simply reads down the page */
}
@media (min-width: 62rem) {
  /* without the scroll script this stays a swipeable row, never a clipped one */
  .rooms__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding-block-end: 0.6rem;
    scrollbar-width: thin;
  }
  .rooms--pinned .rooms__viewport { overflow: clip; padding-block-end: 0; }
  .rooms__track {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 34rem);
    align-items: stretch;
  }
}
@media (max-width: 61.99rem) { .rooms__hint { display: none; } }
.room {
  display: grid;
  gap: 1.1rem;
  align-content: start;
  min-width: 0;
}
.room__fig { overflow: clip; background: var(--veil-2); border-radius: var(--radius); }
.room__fig img { width: 100%; aspect-ratio: 4 / 3.1; object-fit: cover; transition: transform 900ms var(--ease); }
.room:hover .room__fig img { transform: scale(1.035); }
.room__body { display: grid; gap: 0.7rem; }
.room__meta {
  display: grid;
  gap: 0;
  font-size: var(--t-small);
}
.room__meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.45rem;
}
.room__meta div + div { box-shadow: inset 0 1px 0 rgb(18 18 18 / .08); }
.room__meta dt { color: var(--ink-2); }
.room__meta dd { margin: 0; text-align: end; }
.rooms__hint { display: flex; align-items: center; gap: 0.75rem; font-size: var(--t-micro); color: var(--ink-2); }
.rooms__hint svg { width: 1.15rem; height: 1.15rem; flex: none; }
html[dir="rtl"] .rooms__hint svg { transform: scaleX(-1); }

/* --- 10. Amenities ------------------------------------------------------- */
.amenities-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 62rem) {
  .amenities-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); align-items: start; }
  .amenities-lead { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.amenity-list { display: grid; }
.amenity {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.25rem 1.1rem;
  padding-block: clamp(1.25rem, 2.6vw, 1.9rem);
  align-items: start;
}
.amenity + .amenity { box-shadow: inset 0 1px 0 var(--veil-2); }
.amenity svg { width: 1.6rem; height: 1.6rem; margin-block-start: 0.15rem; color: var(--ink); }
.amenity h3 { grid-column: 2; font-size: var(--t-h3); font-weight: 500; }
.amenity p { grid-column: 2; color: var(--ink-2); max-width: 46ch; font-size: var(--t-body); }
.amenity--lead { padding-block-start: 0; }
.amenity--lead p { color: var(--ink); }

/* --- 11. Gallery --------------------------------------------------------- */
.gallery-grid {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}
@media (min-width: 48rem) {
  .gallery-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gutter); }
  .g-wide { grid-column: span 4; }
  .g-narrow { grid-column: span 2; }
  .g-half { grid-column: span 3; }
  .g-third { grid-column: span 2; }
}
.gallery-item {
  position: relative;
  display: block;
  overflow: clip;
  background: var(--veil-2);
  width: 100%;
  padding: 0;
  border-radius: var(--radius);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease), opacity var(--dur-slow) var(--ease);
}
.gallery-item[data-tall] img { aspect-ratio: 3 / 4; }
.gallery-item[data-wide] img { aspect-ratio: 4 / 3; }
.gallery-item[data-square] img { aspect-ratio: 1 / 1; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(12 12 12 / 0);
  transition: background-color var(--dur) var(--ease);
}
.gallery-item:hover::after, .gallery-item:focus-visible::after { background: rgb(12 12 12 / .1); }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--ink);
  color: var(--on-dark);
  display: grid;
  grid-template-rows: auto 1fr auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease-soft), visibility 0s linear var(--dur-slow);
}
.lightbox[data-open="true"] { opacity: 1; visibility: visible; transition-delay: 0s; }
.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--pad);
  min-height: var(--header-h);
}
.lightbox__count { font-size: var(--t-micro); color: var(--on-dark-2); font-variant-numeric: tabular-nums; }
.lightbox__stage { display: grid; place-items: center; padding: 0.5rem var(--pad); min-height: 0; }
.lightbox__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox__foot { padding: 0.75rem var(--pad) calc(1.25rem + env(safe-area-inset-bottom)); display: grid; gap: 0.75rem; }
.lightbox__cap { font-size: var(--t-small); color: var(--on-dark-2); max-width: 60ch; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 44px; min-height: 44px;
  padding-inline: 0.85rem;
  color: var(--on-dark);
  font-size: var(--t-small);
  transition: opacity var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.icon-btn:hover { opacity: .72; }
.icon-btn:active { transform: scale(0.96); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }
.lightbox__nav { display: flex; gap: 0.5rem; }
html[dir="rtl"] .lightbox__nav svg { transform: scaleX(-1); }

/* --- 12. Location ------------------------------------------------------- */
.path-block { background: var(--veil); }
.route-figure { margin-block-end: clamp(2rem, 5vw, 3.5rem); }
.route-figure svg { width: 100%; height: auto; overflow: visible; }
.route-line { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.route-thin { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .28; stroke-linecap: round; }
.route-dot { fill: var(--brass); }
.route-label { font-family: var(--sans); font-size: 12px; fill: var(--ink-2); letter-spacing: 0.02em; }
html[dir="rtl"] .route-label { font-family: var(--sans-ar); letter-spacing: 0; }
.route-ring { fill: none; stroke: var(--brass); stroke-width: 1.4; transform-origin: center; animation: pulse 3.4s var(--ease-soft) infinite; }
@keyframes pulse {
  0% { transform: scale(.55); opacity: .85; }
  70%, 100% { transform: scale(1.9); opacity: 0; }
}
.reduced .route-ring { animation: none; opacity: .5; }

.location-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 62rem) {
  .location-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
}
.map-frame {
  position: relative;
  background: var(--veil-2);
  width: 100%;
  min-width: 0;
  /* a definite height with an aspect ratio also fixes a width, and a 22rem
     height would fix a 414px one: wider than a phone. The height floor is
     therefore capped against the screen so it can never push the page wide. */
  aspect-ratio: 4 / 3.4;
  min-height: min(22rem, 68vw);
  overflow: clip;
}
@media (min-width: 62rem) { .map-frame { aspect-ratio: 4 / 3.6; } }
#map { position: absolute; inset: 0; background: var(--veil-2); }
#map .leaflet-tile-pane { filter: grayscale(1) contrast(1.03) brightness(1.02); }
#map .leaflet-control-zoom { display: none; }
#map .leaflet-control-attribution {
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.5;
  white-space: nowrap;
  /* the credit is Latin text in a right-to-left page: without this the flag is
     pushed to the far end of the line and the two credits land on each other */
  direction: ltr;
  text-align: left;
  background: rgb(255 255 255 / .78);
  color: var(--ink-2);
}
#map .leaflet-control-attribution a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
/* The credit line is one inline anchor holding a flag, a separator and a second
   anchor. The global reset makes every svg a block, which stretches that first
   anchor across the whole line and lands it on top of the OpenStreetMap credit
   beside it: inside the credit line the flag stays inline. */
#map .leaflet-control-attribution svg {
  display: inline;
  width: 1em;
  height: 1em;
  max-width: none;
  vertical-align: baseline;
}
.map-frame__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
  background: var(--veil);
  color: var(--ink-2);
  font-size: var(--t-small);
  z-index: 2;
}
.map-frame[data-ready="true"] .map-frame__fallback { display: none; }
.map-pin {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
}
.map-pin::before {
  content: "";
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 7px rgb(184 145 47 / .22);
}
.directions { counter-reset: step; display: grid; gap: 0; }
.directions li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.35rem 1rem;
  padding-block: 1rem;
  font-size: var(--t-body);
}
.directions li + li { box-shadow: inset 0 1px 0 var(--veil-2); }
.directions li::before {
  content: counter(step);
  font-size: var(--t-small);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  padding-block-start: 0.2rem;
}
.directions strong { display: block; font-weight: 500; }
.directions span { color: var(--ink-2); grid-column: 2; }

/* --- 13. Contact -------------------------------------------------------- */
.contact-grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
@media (min-width: 62rem) {
  .contact-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr); align-items: start; }
}
.form { display: grid; gap: 1.15rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--t-small); color: var(--ink-2); }
.field input, .field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.8rem 0.9rem;
  font-size: 1rem;                 /* 16px: phones must not zoom on tap */
  background: var(--veil);
  border: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.6; }
.field input:hover, .field textarea:hover { background: var(--veil-2); }
.field input:focus, .field textarea:focus {
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  outline: none;
}
.field input:focus-visible, .field textarea:focus-visible { outline: none; }
.field[data-invalid="true"] input, .field[data-invalid="true"] textarea {
  box-shadow: inset 0 0 0 1.5px #9c2b23;
  background: #fdf6f5;
}
.field__msg { font-size: var(--t-micro); color: #8d241c; min-height: 1.1em; }
.field__hint { font-size: var(--t-micro); color: var(--ink-2); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp input, .hp label { width: 100%; min-width: 0; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  background: var(--veil);
  font-size: var(--t-small);
  border-radius: var(--radius);
}
.form-status[hidden] { display: none; }
.form-status[data-state="error"] { background: #fdf6f5; }
.form-status strong { font-weight: 500; }
.form-status[data-state="success"] strong { color: var(--brass-ink); }
.btn[data-loading="true"] { pointer-events: none; opacity: .8; }
.spin { width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.contact-card { display: grid; gap: 1.6rem; }
.contact-list { display: grid; gap: 0; }
.contact-list a, .contact-list p {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding-block: 1rem;
  align-items: baseline;
  min-height: 44px;
}
.contact-list > * + * { box-shadow: inset 0 1px 0 var(--veil-2); }
.contact-list dt, .contact-list .k { font-size: var(--t-small); color: var(--ink-2); }
.contact-list .v { font-size: var(--t-body); overflow-wrap: anywhere; }
.socials { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 44px; min-height: 44px;
  padding-inline: 0.9rem;
  background: var(--veil);
  border-radius: var(--radius);
  font-size: var(--t-small);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.social:hover, .social:focus-visible { background: var(--ink); color: var(--paper); }
.social:active { transform: scale(0.97); }
.social svg { width: 1.15rem; height: 1.15rem; }

/* --- 14. FAQ ------------------------------------------------------------ */
.faq-list { display: grid; gap: 0; }
@media (min-width: 62rem) { .faq-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4.5rem); } }
.faq-item { padding-block: 1.4rem; }
.faq-item + .faq-item { box-shadow: inset 0 1px 0 var(--veil-2); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  font-size: var(--t-h3);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
html[dir="rtl"] .faq-item summary { letter-spacing: 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-mark { flex: none; width: 1.1rem; height: 1.1rem; margin-block-start: 0.35rem; position: relative; }
.faq-mark::before, .faq-mark::after {
  content: "";
  position: absolute;
  inset-block-start: 50%; inset-inline-start: 0;
  width: 100%; height: 1.5px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease);
}
.faq-mark::after { transform: rotate(90deg); }
.faq-item[open] .faq-mark::after { transform: rotate(0deg); }
.faq-item summary:hover { color: var(--ink-2); }
.faq-item p { padding-block-start: 0.85rem; color: var(--ink-2); max-width: 60ch; }
.faq-item p strong { color: var(--ink); font-weight: 500; }

/* --- 15. Footer --------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--on-dark); padding-block: clamp(3rem, 8vw, 6rem) 2rem; }
.footer-name {
  font-size: clamp(3.5rem, 22vw, 15rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.86;
  margin-block-end: clamp(2rem, 6vw, 4rem);
  overflow-wrap: anywhere;
}
html[dir="rtl"] .footer-name { letter-spacing: 0; }
.footer-cols { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.footer-cols h3 { font-size: var(--t-micro); font-weight: 500; color: var(--on-dark-2); margin-block-end: 0.75rem; letter-spacing: 0; }
.footer-cols ul { display: grid; gap: 0.4rem; }
.footer-cols a { font-size: var(--t-small); color: rgb(255 255 255 / .86); min-height: 44px; display: inline-flex; align-items: center; }
.footer-cols a:hover { color: var(--paper); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  margin-block-start: clamp(2.5rem, 6vw, 4rem);
  padding-block-start: 1.5rem;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .16);
  font-size: var(--t-micro);
  color: var(--on-dark-2);
}

/* --- 16. Motion foundations -------------------------------------------- */
.reveal { opacity: 0; transform: translateY(1.25rem); }
.reduced .reveal, .no-js .reveal { opacity: 1; transform: none; }
.reveal--in { opacity: 1; transform: none; transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
/* Parked above the page, never beside it: a sideways offset widens the document
   in one direction only, and in a right-to-left page that is the wrong one. */
.skip-link {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 100;
  padding: 0.9rem 1.2rem;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--t-small);
  transform: translateY(-110%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0.5rem); }

/* Sticky header offset for anchors */
:target { scroll-margin-block-start: calc(var(--header-h) + 1rem); }
section[id] { scroll-margin-block-start: calc(var(--header-h) + 0.5rem); }

/* --- 17. Small tweaks -------------------------------------------------- */
.pill-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--t-micro);
  color: var(--ink-2);
}
.pill-note svg { width: 1rem; height: 1rem; flex: none; color: var(--brass); }
.wifi-note { display: grid; gap: 0.5rem; }
.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;
}

/* --- 18. The two small pages (privacy, not found) --------------------- */
.page-body { padding-block: calc(var(--header-h) + clamp(2.5rem, 7vw, 5rem)) var(--section-y); }
.page-body h1 { font-size: clamp(2.1rem, 8vw, 4.5rem); max-width: 20ch; }
.page-body h2 { font-size: clamp(1.25rem, 3.4vw, 1.9rem); margin-block-start: clamp(2rem, 4vw, 3rem); }
.page-body p, .page-body li { max-width: 68ch; color: var(--ink); }
.page-body > p:first-of-type { font-size: var(--t-lead); line-height: 1.45; max-width: 46ch; }
.page-body ul { display: grid; gap: 0.5rem; }
.page-body li { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: 0.6rem; }
.page-body li::before { content: ""; inline-size: 5px; block-size: 5px; margin-block-start: 0.62em; background: var(--brass); border-radius: 50%; }
.page-body .back { margin-block-start: clamp(2.5rem, 6vw, 4rem); display: inline-flex; }
