/* ==========================================================================
   Casa Palmara — Design System
   Style:      Soft UI Evolution (softer than flat, clearer than neumorphism)
   Pattern:    Hero-Centric + Social Proof
   Direction:  Warm sand & palm
   Density:    Spacious (24–96px scale)

   Every foreground/background pair in this file has been contrast-checked.
   Ratios are noted inline. Do not introduce raw hex values in markup —
   use the tokens below so light/dark and future rebrands stay coherent.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* --- Neutrals (warm) --- */
  --bone:        #FBF9F5;  /* page background */
  --sand:        #F2ECE1;  /* alternating section background */
  --sand-deep:   #E5DCCB;  /* subtle fills, image placeholders */
  --line:        #E2DACB;  /* borders, dividers */
  --surface:     #FFFFFF;  /* cards */

  /* --- Ink (text) --- */
  --ink:         #1A1815;  /* 16.1:1 on bone — body + headings */
  --ink-soft:    #57514A;  /*  7.4:1 on bone — secondary copy */
  --ink-muted:   #6B6459;  /*  5.6:1 on bone — meta, captions */

  /* --- Brand --- */
  --palm:        #1F3D2F;  /* 11.4:1 on bone — primary */
  --palm-soft:   #2E5744;  /* hover / lighter fills */
  --palm-deep:   #14261D;  /* dark sections, footer */

  /* --- Accent (brass) ---
     --gold is WCAG-verified 4.68:1 on --bone and --surface.
     On --sand it drops to 4.16:1, so sand sections must use --gold-ink. */
  --gold:        #A16207;  /* 4.68:1 on bone/white */
  --gold-ink:    #7A5C2A;  /* 5.21:1 on sand — small text on sand only */
  --gold-lume:   #C8912F;  /* 5.66:1 on palm-deep — dark sections only */

  /* --- Semantic --- */
  --danger:      #B42318;
  --danger-bg:   #FEF3F2;
  --success:     #276749;
  --success-bg:  #F0F7F3;

  /* --- Typography --- */
  /* Karla, not Inter. Inter is the house sans of every startup on the web —
     it is a good typeface and a completely invisible choice, which on a page
     selling somewhere to stay is a wasted opportunity. Karla is a humanist
     grotesque with actual quirks (the flat-topped 'a', the curling 'y' and 'g',
     the slightly narrow set) so body copy carries a little warmth instead of
     reading as UI chrome. It also holds up at label sizes, which matters here
     because a lot of this page is small tracked-out caps.

     The system stack behind it is the fallback while the webfont loads, and
     with `display=swap` that is what a first-time visitor reads for a moment. */
  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body:    'Karla', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --fs-display: clamp(2.75rem, 6vw + 0.5rem, 5.5rem);
  --fs-h1:      clamp(2.25rem, 4vw + 0.5rem, 3.75rem);
  --fs-h2:      clamp(1.875rem, 2.4vw + 0.75rem, 2.75rem);
  --fs-h3:      clamp(1.375rem, 1vw + 1rem, 1.75rem);
  --fs-lead:    clamp(1.0625rem, 0.4vw + 1rem, 1.25rem);
  --fs-body:    1rem;      /* 16px floor — prevents iOS input auto-zoom */
  --fs-sm:      0.9375rem;
  --fs-label:   0.75rem;

  --lh-tight:   1.08;
  --lh-snug:    1.25;
  --lh-body:    1.7;

  --track-label: 0.18em;

  /* --- Spacing (8pt rhythm, spacious tier) --- */
  --s-1: 0.5rem;   --s-2: 1rem;    --s-3: 1.5rem;  --s-4: 2rem;
  --s-5: 3rem;     --s-6: 4rem;    --s-7: 6rem;    --s-8: 8rem;
  --section-y: clamp(4rem, 9vw, 8rem);
  --gutter:    clamp(1.25rem, 4vw, 3rem);
  --measure:   68ch;

  /* --- Radius --- */
  --r-sm: 2px;  --r-md: 4px;  --r-lg: 8px;  --r-pill: 999px;

  /* --- Elevation (Soft UI Evolution: soft but legible, never muddy) --- */
  --e-1: 0 1px 2px rgba(26, 24, 21, 0.04), 0 2px 8px rgba(26, 24, 21, 0.04);
  --e-2: 0 2px 4px rgba(26, 24, 21, 0.04), 0 8px 24px rgba(26, 24, 21, 0.07);
  --e-3: 0 4px 8px rgba(26, 24, 21, 0.05), 0 16px 40px rgba(26, 24, 21, 0.10);

  /* --- Motion --- */
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:  cubic-bezier(0.55, 0, 1, 0.45);

  /* --- Layering --- */
  --z-base: 0; --z-raised: 10; --z-sticky: 40; --z-header: 60;
  --z-overlay: 90; --z-modal: 100; --z-toast: 120;

  --header-h: 76px;
}

@media (max-width: 767px) { :root { --header-h: 64px; } }

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-3));
}

body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* Guards against any stray full-bleed child.
     MUST be `clip`, not `hidden`. `overflow-x: hidden` forces the computed
     `overflow-y` to `auto`, which turns <body> into a scroll container — and a
     scroll container breaks `position: fixed` for its descendants. That is what
     ScrollTrigger uses to pin, so the pinned hero detached and slid down the
     page leaving a blank gap. `clip` clips identically without establishing a
     scrolling box, so fixed positioning keeps working. */
  overflow-x: clip;
}

/* The `hidden` attribute has to actually hide things.

   Browsers implement it as `[hidden] { display: none }` in the *user agent*
   stylesheet, and any author rule beats the whole user agent stylesheet no
   matter how weak its selector. `.gallery__item { display: block }` was enough
   to defeat it, so the gallery filter set `hidden` on 26 of 35 photographs and
   all 35 stayed on screen — the JavaScript was right and invisible.

   `!important` is the only thing that survives an author `display` on the same
   element, which is exactly why every reset ships this line. */
[hidden] { display: none !important; }

img, picture, video, svg { display: block; max-width: 100%; }
img { height: auto; background-color: var(--sand-deep); }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }

/* Visible focus everywhere. Never remove this. */
:focus-visible {
  outline: 2px solid var(--palm);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.on-dark :focus-visible { outline-color: var(--gold-lume); }

::selection { background: var(--palm); color: var(--bone); }

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: var(--lh-snug);
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.t-display { font-size: var(--fs-display); line-height: var(--lh-tight); font-weight: 300; }
.t-h1      { font-size: var(--fs-h1); }
.t-h2      { font-size: var(--fs-h2); }
.t-h3      { font-size: var(--fs-h3); font-weight: 400; }

.t-lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: var(--measure);
  text-wrap: pretty;
}

.t-body   { max-width: var(--measure); text-wrap: pretty; }
.t-sm     { font-size: var(--fs-sm); }
.t-muted  { color: var(--ink-muted); }
.t-soft   { color: var(--ink-soft); }

/* Eyebrow label — the signature small-caps rule above section titles.
   Gold on bone/white (4.68:1). Sections with a sand background must add
   .section--sand, which swaps in --gold-ink (5.21:1). */
.t-label {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-2);
}
.t-label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  flex: none;
  /* Aligned to the first line, not the centre of the block. Centring looks
     right on a one-line label and visibly wrong the moment one wraps. */
  align-self: flex-start;
  margin-top: 0.55em;
}

/* Karla sets a little wider than the sans it replaced, which pushed the
   longest of these labels onto a second line on a phone. Tightening the
   tracking buys the width back; at this size it is still clearly a tracked-out
   small-caps rule. */
@media (max-width: 479px) {
  .t-label { letter-spacing: 0.1em; gap: var(--s-1); }
  .t-label::before { width: 20px; }
}
.section--sand .t-label { color: var(--gold-ink); }
.on-dark .t-label { color: var(--gold-lume); }

/* Tabular figures for prices, dates, and counts — prevents width jitter. */
.t-num { font-variant-numeric: tabular-nums; }

.on-dark { color: var(--bone); }                 /* 15.2:1 on --palm-deep */
.on-dark .t-lead,
.on-dark .t-soft  { color: rgba(251, 249, 245, 0.82); }
.on-dark .t-muted { color: rgba(251, 249, 245, 0.68); }

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 860px; }
.container--wide   { max-width: 1520px; }

.section { padding-block: var(--section-y); }
.section--sand { background: var(--sand); }
.section--dark { background: var(--palm-deep); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.stack > * + * { margin-top: var(--s-3); }
.stack-lg > * + * { margin-top: var(--s-5); }

.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1023px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.section-head { max-width: 640px; margin-bottom: var(--s-6); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .t-label { justify-content: center; }
.section-head--center .t-lead { margin-inline: auto; }
.section-head > * + * { margin-top: var(--s-2); }

.divider { height: 1px; background: var(--line); border: 0; }
.on-dark .divider { background: rgba(251, 249, 245, 0.15); }

/* --------------------------------------------------------------------------
   5. BUTTONS
   Every button is >=44px tall to satisfy the touch-target minimum.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-height: 48px;
  padding: 0 var(--s-4);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  touch-action: manipulation;   /* removes the 300ms tap delay */
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--palm);
  color: var(--bone);           /* 11.9:1 */
  box-shadow: var(--e-1);
}
.btn--primary:hover { background: var(--palm-soft); box-shadow: var(--e-2); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--palm); color: var(--palm); }

.btn--gold {
  background: var(--gold);
  color: #FFFFFF;               /* 4.7:1 */
  box-shadow: var(--e-1);
}
.btn--gold:hover { background: #8A5406; box-shadow: var(--e-2); }

.on-dark .btn--ghost { color: var(--bone); border-color: rgba(251, 249, 245, 0.3); }
.on-dark .btn--ghost:hover { border-color: var(--gold-lume); color: var(--gold-lume); }

/* Heroes are light-on-dark but carry no .on-dark class (they set their own
   colour), so a ghost button inside one would inherit the dark ink meant for
   light surfaces and disappear against the scrim. */
.hero .btn--ghost,
.page-hero .btn--ghost,
.scroll-hero__content .btn--ghost { color: var(--bone); border-color: rgba(251, 249, 245, 0.38); }
.hero .btn--ghost:hover,
.page-hero .btn--ghost:hover,
.scroll-hero__content .btn--ghost:hover { border-color: var(--gold-lume); color: var(--gold-lume); }

.btn--block { width: 100%; }

.btn[disabled], .btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Loading state — the label is swapped for a spinner without resizing
   the button, so nothing on the page shifts. */
.btn[data-loading='true'] { color: transparent; position: relative; pointer-events: none; }
.btn[data-loading='true']::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--bone);
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Text link with an underline that draws in on hover */
.link-underline {
  position: relative;
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 2px;
}
.link-underline::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-out);
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* These two ("Open in Google Maps", "See every room") stand on their own
   rather than sitting inside a sentence, so on a touch screen they are
   buttons in everything but name and were only 28px tall. The underline still
   hugs the text — the extra height is padding above it, not a bigger rule. */
@media (hover: none) and (pointer: coarse) {
  .link-underline {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .link-underline::after { bottom: calc(50% - 0.85em); }
}

/* --------------------------------------------------------------------------
   6. HEADER / NAVIGATION
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--s-2); top: var(--s-2);
  z-index: var(--z-toast);
  padding: var(--s-2) var(--s-3);
  background: var(--palm);
  color: var(--bone);
  border-radius: var(--r-md);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform var(--dur-base) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding-top: env(safe-area-inset-top);
  transition: background-color var(--dur-slow) var(--ease-out),
              box-shadow var(--dur-slow) var(--ease-out),
              color var(--dur-slow) var(--ease-out);
}

/* Transparent over a hero image, solid once scrolled or on inner pages. */
.header[data-transparent='true'] { background: transparent; color: var(--bone); }
.header[data-transparent='true']::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20, 38, 29, 0.55), transparent);
  pointer-events: none;
}
.header[data-solid='true'] {
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header[data-solid='true']::before { opacity: 0; }

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  width: 100%;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;              /* the wordmark is a link — give it a real target */
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
  line-height: 1;
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;   /* 11px floor — 9px was unreadable */
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  opacity: 0.72;
  margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: var(--s-1); }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-2);
  font-size: var(--fs-sm);
  text-decoration: none;
  white-space: nowrap;   /* Spanish labels are longer; never let them wrap */
  border-radius: var(--r-md);
  transition: opacity var(--dur-base) var(--ease-out);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: var(--s-2); right: var(--s-2); bottom: 14px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

/* Current page is marked with weight + a persistent rule, never colour alone. */
.nav__link[aria-current='page'] { font-weight: 600; }
.nav__link[aria-current='page']::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: var(--s-2); }

.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid;
  border-color: currentColor;   /* fallback for browsers without color-mix */
  border-color: color-mix(in srgb, currentColor 45%, transparent);
  border-radius: var(--r-pill);
  padding: 3px;
}
.lang-toggle__btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--s-1);
  border-radius: var(--r-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: inherit;
  opacity: 0.75;
  transition: background-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              opacity var(--dur-base) var(--ease-out);
}
.lang-toggle__btn:hover { opacity: 1; }

/* The selected language must stay legible against whichever surface the
   toggle is sitting on, so both sides of the pair are set explicitly —
   `background: currentColor` would paint the pill the same colour as its
   own label. Dark header: palm on bone (15.2:1). Light header: bone on
   palm (11.9:1). */
.lang-toggle__btn[aria-pressed='true'] {
  background: var(--palm);
  color: var(--bone);
  opacity: 1;
}
.header[data-transparent='true'] .lang-toggle__btn[aria-pressed='true'],
.mobile-nav .lang-toggle__btn[aria-pressed='true'] {
  background: var(--bone);
  color: var(--palm-deep);
}

/* Hamburger — 48px hit area, animated to an X */
.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  flex: none;
}
.nav-toggle__bars { position: relative; width: 22px; height: 14px; }
.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 6.25px; }
.nav-toggle__bars span:nth-child(3) { top: 12.5px; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(1) { transform: translateY(6.25px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6.25px) rotate(-45deg); }

/* While the drawer is open the header rides ABOVE it, which is the whole
   reason the panel reserves `--header-h` of padding at the top.

   It used to sit at --z-header (60) under a --z-modal (100) panel, so that
   reserved strip was just empty dark blue and the hamburger — already
   animated into an X below — was painted underneath and could not be tapped.
   On a phone that left the menu with no exit at all: no close button, no
   backdrop, and the only two ways out were following a nav link or pressing
   Escape, which is not a key a phone has. The brand also disappears, so the
   open menu reads as a page with no masthead.

   The header is forced into its transparent/light-ink state here rather than
   left to whatever the scroll position last set, so it sits on the dark panel
   instead of dropping a cream bar across the top of it. */
body[data-drawer-open='true'] .header {
  z-index: calc(var(--z-modal) + 1);
  background: transparent;
  color: var(--bone);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body[data-drawer-open='true'] .header::before { opacity: 0; }

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--palm-deep);
  color: var(--bone);
  padding: calc(var(--header-h) + env(safe-area-inset-top) + var(--s-3)) var(--gutter)
           calc(var(--s-4) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* Stops a scroll gesture inside the panel from chaining through to the page
     behind it. Deliberately not `overflow: hidden` on <body>: this project
     already learned that clamping body overflow breaks `position: fixed`,
     which is exactly what the header and this panel both rely on. */
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.mobile-nav[data-open='true'] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Deliberately NOT hidden with `visibility`.
   `visibility` is a discrete, inherited, transitionable property: while its
   transition resolves, descendants still compute to hidden — and focus() is a
   silent no-op on a hidden element, so moving focus into the panel on open
   fails. `inert` (set in the markup, removed by main.js on open) already
   removes the closed panel from the tab order and the accessibility tree,
   which is what visibility:hidden was there for. pointer-events handles the
   mouse. Nothing here blocks focus. */
.mobile-nav[inert] { pointer-events: none; }
/* Sized so all eight destinations plus the booking CTA clear the fold on a
   375×812 phone without scrolling — the CTA is the point of the menu.
   52px keeps every row above the 44px touch minimum. */
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.2;
  text-decoration: none;
  border-bottom: 1px solid rgba(251, 249, 245, 0.12);
}
.mobile-nav__link[aria-current='page'] { color: var(--gold-lume); font-weight: 400; }
.mobile-nav__link[aria-current='page']::after { content: '—'; opacity: 0.6; }
.mobile-nav__footer { margin-top: auto; padding-top: var(--s-4); }
.mobile-nav__footer p a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 1023px) {
  .nav, .header__actions .btn { display: none; }
  .nav-toggle { display: flex; }
}

/* Phones: the brand, the language pill and the hamburger together overrun a
   375px bar, and because the body clips horizontal overflow the hamburger
   would silently disappear off the right edge rather than produce a
   scrollbar. The language pill goes — it is duplicated inside the drawer,
   and the initial language is picked from the browser anyway — and the
   wordmark steps down so the tap target always has room. */
@media (max-width: 767px) {
  .header .lang-toggle { display: none; }
  .brand { font-size: 1.25rem; }
  .brand small { font-size: 0.6875rem; letter-spacing: 0.1em; }
}

/* Belt and braces: the wordmark yields before the controls do. */
.brand { min-width: 0; flex-shrink: 1; }
.header__actions { flex: none; }

body[data-nav-open='true'] { overflow: hidden; }

/* --------------------------------------------------------------------------
   7. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;              /* svh avoids the mobile URL-bar jump */
  display: flex;
  align-items: flex-end;
  overflow: clip;
  color: var(--bone);
  background: var(--palm-deep);
}
.hero--short { min-height: 68svh; }

.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* Scrim.
   Text sits in the bottom third of the default hero, so that band is taken to
   88% — enough to hold 4.5:1 for bone text over all but a blown-out white
   frame. Guaranteeing it against a pure-white photo would need ~84% flat,
   which would destroy the image, so the remaining margin comes from the
   imagery rule documented in assets/img/IMAGE-MANIFEST.md plus the hairline
   shadow below. */
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(20, 38, 29, 0.88) 0%, rgba(20, 38, 29, 0.40) 50%, rgba(20, 38, 29, 0.46) 100%);
}

/* Centred copy lands mid-frame, where the gradient above is at its weakest.
   These heroes get their own radial scrim anchored on the text instead. */
.hero--center { align-items: center; }
.hero--center .hero__media::after {
  background:
    radial-gradient(ellipse 90% 70% at 50% 50%, rgba(20, 38, 29, 0.80) 0%, rgba(20, 38, 29, 0.55) 60%, rgba(20, 38, 29, 0.45) 100%);
}

/* Second line of defence: too faint to read as a shadow, enough to keep
   letterforms separated if a photo turns out brighter than intended. */
.hero__title,
.hero .t-lead,
.hero__meta,
.hero--center h2,
.page-hero h1,
.page-hero .t-lead {
  text-shadow: 0 1px 3px rgba(11, 20, 15, 0.35);
}

/* The hero lead inherits `max-width: 68ch` from .t-lead, which measured out at
   93% of the hero width — running the line straight into the weak end of the
   scrim, where contrast drops below 4.5:1. Two reasons to cap it: that, and
   the fact that 68ch is a poor measure for a display-sized lead anyway.

   The colour is here for a related reason. `.page-hero` sets `color: var(--bone)`
   on itself, but `.t-lead` carries its own `color: var(--ink-soft)` — a dark
   grey — which wins over the inherited value. Every page-hero used to paper
   over that with an inline `style="color:..."` on the element, and the moment
   one of those was dropped in a rewrite the lead went dark grey on a dark
   scrim. Setting it in the stylesheet is the fix; an inline colour is a fuse
   waiting to be pulled. */
.page-hero .t-lead {
  max-width: min(44rem, 62%);
  color: rgba(253, 251, 246, 0.88);
}
@media (max-width: 767px) { .page-hero .t-lead { max-width: 100%; } }

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: var(--s-7) var(--s-6);
}
.hero__title { font-size: var(--fs-display); line-height: var(--lh-tight); font-weight: 300; }
.hero__title em { font-style: italic; color: var(--gold-lume); }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  font-size: var(--fs-sm);
  color: rgba(251, 249, 245, 0.86);
}
.hero__meta li { display: flex; align-items: center; gap: var(--s-1); list-style: none; }
.hero__meta svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.scroll-cue {
  position: absolute;
  left: 50%; bottom: var(--s-4);
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  font-size: 0.6875rem;   /* 11px floor */
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: rgba(251, 249, 245, 0.75);
  text-decoration: none;
}
.scroll-cue__line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(251,249,245,0.7), transparent);
}
@media (max-width: 767px) { .scroll-cue { display: none; } }

/* Page banner for inner pages */
.page-hero {
  position: relative;
  padding-block: calc(var(--header-h) + var(--s-7)) var(--s-6);
  background: var(--palm-deep);
  color: var(--bone);
  overflow: clip;
}
.page-hero__media { position: absolute; inset: 0; z-index: 0; opacity: 0.55; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* Scrim behind the hero copy.
   The 0.55 opacity above is not enough on its own. Over a bright photograph —
   sunlit water, white render, a pale sky — the composite lands around 2.5:1
   against the bone-white text, which fails even the 3:1 large-text bar. The
   text-shadow below helps the eye and counts for nothing in a contrast check.

   The weight runs left-to-right rather than bottom-up, because the copy sits
   on the left and a bottom-weighted scrim would flatten the part of the
   picture usually worth looking at. Measured on the actual pixels of v-hero,
   this takes the worst glyph from 2.5:1 to comfortably past 4.5:1. */
.page-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(6, 50, 60, 0.82) 0%,
    rgba(6, 50, 60, 0.68) 34%,
    rgba(6, 50, 60, 0.28) 68%,
    rgba(6, 50, 60, 0.10) 100%);
}

/* On a phone the copy spans the full width, so a sideways scrim protects the
   wrong half. It goes flat instead — there is no uncovered picture left to
   preserve at that size anyway. */
@media (max-width: 767px) {
  .page-hero__media::after { background: rgba(6, 50, 60, 0.62); }
}
.page-hero__inner { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   8. CARDS & MEDIA
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.card__body { padding: var(--s-4); }
.card__body > * + * { margin-top: var(--s-2); }

/* Hover lift is done in GSAP (transform only) so it never triggers reflow. */
.card--interactive { cursor: pointer; }
.card--interactive:hover { border-color: var(--sand-deep); box-shadow: var(--e-3); }

.media { position: relative; overflow: hidden; background: var(--sand-deep); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--4x3  { aspect-ratio: 4 / 3; }
.media--3x2  { aspect-ratio: 3 / 2; }
.media--1x1  { aspect-ratio: 1 / 1; }
.media--3x4  { aspect-ratio: 3 / 4; }
.media--16x9 { aspect-ratio: 16 / 9; }

/* Slow zoom on hover — transform only, stays on the compositor. */
.media--zoom img { transition: transform 600ms var(--ease-out); will-change: transform; }
.card--interactive:hover .media--zoom img,
.gallery__item:hover .media--zoom img { transform: scale(1.05); }

.amenity {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
}
.amenity__icon {
  flex: none;
  width: 24px; height: 24px;
  color: var(--gold);
  margin-top: 2px;
}
.section--sand .amenity__icon { color: var(--gold-ink); }
.amenity__title { font-weight: 500; font-size: var(--fs-body); }
.amenity__desc  { font-size: var(--fs-sm); color: var(--ink-muted); }

/* Stat / social-proof row */
.stat { text-align: center; padding: var(--s-3) var(--s-2); }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 3.5vw, 3rem);
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  margin-top: var(--s-1);
  font-size: var(--fs-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-muted);
}
.on-dark .stat__label { color: rgba(251, 249, 245, 0.7); }

/* Testimonial */
.quote {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.quote__stars { display: flex; gap: 2px; color: var(--gold); margin-bottom: var(--s-2); }
.quote__stars svg { width: 16px; height: 16px; }
.quote__text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  flex: 1;
}
.quote__author { margin-top: var(--s-3); font-size: var(--fs-sm); }
.quote__author strong { display: block; font-weight: 600; }
.quote__author span { color: var(--ink-muted); }

/* --------------------------------------------------------------------------
   9. GALLERY
   -------------------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-2);
}
.gallery__item {
  position: relative;
  display: block;
  border: 0;
  padding: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--sand-deep);
}
.gallery__item--wide { grid-column: span 2; }
@media (max-width: 639px) { .gallery__item--wide { grid-column: span 1; } }

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 38, 29, 0);
  transition: background-color var(--dur-base) var(--ease-out);
}
.gallery__item:hover::after { background: rgba(20, 38, 29, 0.18); }

.gallery__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: var(--s-4) var(--s-3) var(--s-2);
  background: linear-gradient(to top, rgba(20, 38, 29, 0.75), transparent);
  color: var(--bone);
  font-size: var(--fs-sm);
  text-align: left;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.gallery__item:hover .gallery__caption,
.gallery__item:focus-visible .gallery__caption { opacity: 1; transform: translateY(0); }
/* Touch devices have no hover, so captions are always shown there. */
@media (hover: none) {
  .gallery__caption { opacity: 1; transform: none; }
}

.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  margin-bottom: var(--s-4);
}
.gallery-filter__btn {
  min-height: 44px;
  padding: 0 var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  transition: all var(--dur-base) var(--ease-out);
}
.gallery-filter__btn:hover { border-color: var(--palm); color: var(--palm); }
.gallery-filter__btn[aria-pressed='true'] {
  background: var(--palm);
  border-color: var(--palm);
  color: var(--bone);
  font-weight: 500;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: var(--s-3);
  background: rgba(11, 20, 15, 0.94);   /* strong scrim, isolates the photo */
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
/* Same reasoning as the drawer above — see the note there. */
.lightbox[data-open='true'] { opacity: 1; pointer-events: auto; }
.lightbox[inert] { pointer-events: none; }
.lightbox__figure { max-width: min(1200px, 92vw); max-height: 82svh; margin: 0; }
.lightbox__figure img {
  max-height: 74svh;
  width: auto;
  margin-inline: auto;
  border-radius: var(--r-md);
  object-fit: contain;
}
.lightbox__caption {
  margin-top: var(--s-2);
  text-align: center;
  color: rgba(251, 249, 245, 0.85);
  font-size: var(--fs-sm);
}
.lightbox__btn {
  position: absolute;
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(251, 249, 245, 0.1);
  color: var(--bone);
  border: 1px solid rgba(251, 249, 245, 0.2);
  transition: background-color var(--dur-base) var(--ease-out);
}
.lightbox__btn:hover { background: rgba(251, 249, 245, 0.22); }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__close { top: max(var(--s-3), env(safe-area-inset-top)); right: var(--s-3); }
.lightbox__prev  { left: var(--s-2);  top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: var(--s-2); top: 50%; transform: translateY(-50%); }
.lightbox__count {
  position: absolute;
  bottom: max(var(--s-3), env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-sm);
  color: rgba(251, 249, 245, 0.75);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 639px) {
  .lightbox__prev { left: var(--s-1); }
  .lightbox__next { right: var(--s-1); }
}

/* --------------------------------------------------------------------------
   10. FORMS
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--s-3); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
@media (max-width: 639px) { .form__row { grid-template-columns: 1fr; } }

.field { display: grid; gap: 6px; }

/* Visible label always — never placeholder-only. */
.field__label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
}
.field__label .req { color: var(--danger); margin-left: 2px; }

.field__hint { font-size: 0.8125rem; color: var(--ink-muted); }

.field__input,
.field__select,
.field__textarea {
  width: 100%;
  min-height: 52px;                 /* comfortably above the 44px minimum */
  padding: var(--s-2) var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-body);        /* 16px stops iOS zooming on focus */
  color: var(--ink);
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.field__textarea { min-height: 132px; padding-top: var(--s-2); resize: vertical; line-height: 1.6; }

.field__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2357514A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s-2) center;
  background-size: 20px;
  padding-right: var(--s-6);
}

.field__input::placeholder, .field__textarea::placeholder { color: #9A9288; }

.field__input:focus, .field__select:focus, .field__textarea:focus {
  outline: none;
  border-color: var(--palm);
  box-shadow: 0 0 0 3px rgba(31, 61, 47, 0.12);
}

/* Error state carries an icon + text, so it never depends on colour alone. */
.field[data-invalid='true'] .field__input,
.field[data-invalid='true'] .field__select,
.field[data-invalid='true'] .field__textarea {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.field__error {
  display: none;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--danger);           /* 5.9:1 on white */
}
.field__error svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.field[data-invalid='true'] .field__error { display: flex; }

.form__note { font-size: 0.8125rem; color: var(--ink-muted); }

.form__status {
  display: none;
  gap: var(--s-2);
  align-items: flex-start;
  padding: var(--s-3);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
}
.form__status[data-state='success'] {
  display: flex;
  background: var(--success-bg);
  border: 1px solid #BFD9C9;
  color: var(--success);
}
.form__status[data-state='error'] {
  display: flex;
  background: var(--danger-bg);
  border: 1px solid #F5C8C4;
  color: var(--danger);
}
.form__status svg { width: 20px; height: 20px; flex: none; }

/* Honeypot — hidden from humans, catches naive bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------------------
   11. RATES TABLE
   -------------------------------------------------------------------------- */
.rates-wrap {
  overflow-x: auto;                  /* the table scrolls, never the page */
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.rates {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.rates th, .rates td {
  padding: var(--s-3);
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.rates thead th {
  background: var(--sand);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.rates tbody tr:last-child td { border-bottom: 0; }
.rates tbody tr:hover { background: var(--bone); }
.rates td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rates .season { font-weight: 500; color: var(--ink); }
.rates .season small { display: block; font-weight: 400; color: var(--ink-muted); font-size: 0.8125rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px var(--s-1);
  border-radius: var(--r-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge--peak  { background: #FBEFD9; color: #7A5C2A; }
.badge--value { background: #E4EFE8; color: var(--success); }

.scroll-hint {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: var(--s-2);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
@media (max-width: 767px) { .scroll-hint { display: flex; } }

/* --------------------------------------------------------------------------
   12. ACCORDION (FAQ)
   -------------------------------------------------------------------------- */
.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  width: 100%;
  min-height: 64px;
  padding: var(--s-3) 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
}
.accordion__icon {
  flex: none;
  width: 22px; height: 22px;
  color: var(--gold);
  transition: transform var(--dur-base) var(--ease-out);
}
.section--sand .accordion__icon { color: var(--gold-ink); }
.accordion__trigger[aria-expanded='true'] .accordion__icon { transform: rotate(45deg); }

/* Height is animated by GSAP on a wrapper, so this stays at 0 by default. */
.accordion__panel { overflow: hidden; height: 0; }
.accordion__panel-inner { padding-bottom: var(--s-3); }
.accordion__panel-inner p { max-width: var(--measure); color: var(--ink-soft); }
.accordion__panel-inner > * + * { margin-top: var(--s-2); }

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--palm-deep);
  color: var(--bone);
  padding-block: var(--s-7) var(--s-4);
  padding-bottom: calc(var(--s-4) + env(safe-area-inset-bottom));
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: var(--s-5);
}
@media (max-width: 1023px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px)  { .footer__grid { grid-template-columns: 1fr; } }

.footer__title {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--gold-lume);
  margin-bottom: var(--s-2);
}
.footer__list { list-style: none; padding: 0; }
.footer__list li + li { margin-top: 2px; }
.footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fs-sm);
  color: rgba(251, 249, 245, 0.82);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
}
.footer__list a:hover { color: var(--gold-lume); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  margin-top: var(--s-6);
  padding-top: var(--s-3);
  border-top: 1px solid rgba(251, 249, 245, 0.15);
  font-size: 0.8125rem;
  color: rgba(251, 249, 245, 0.68);
}

.social { display: flex; gap: var(--s-1); }
.social a {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(251, 249, 245, 0.22);
  border-radius: 50%;
  color: var(--bone);
  transition: border-color var(--dur-base) var(--ease-out),
              background-color var(--dur-base) var(--ease-out);
}
.social a:hover { border-color: var(--gold-lume); background: rgba(200, 145, 47, 0.12); }
.social svg { width: 18px; height: 18px; }

/* Sticky mobile booking bar — only where it helps conversion. */
.book-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-sticky);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-2) var(--gutter);
  padding-bottom: calc(var(--s-2) + env(safe-area-inset-bottom));
  background: rgba(251, 249, 245, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
}
.book-bar[data-visible='true'] { transform: translateY(0); }
.book-bar__price { font-size: var(--fs-sm); line-height: 1.3; }
.book-bar__price strong { display: block; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.book-bar__price span { color: var(--ink-muted); font-size: 0.8125rem; }

@media (max-width: 767px) {
  .book-bar { display: flex; }
  /* Reserve space so the footer is never hidden behind the fixed bar. */
  body[data-bookbar='true'] .footer { padding-bottom: calc(var(--s-6) + env(safe-area-inset-bottom)); }
}

/* --------------------------------------------------------------------------
   14. UTILITIES
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }
.mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); }
.full { width: 100%; }

/* --------------------------------------------------------------------------
   15. MOTION PRE-STATES
   These hide elements before GSAP reveals them. They are applied ONLY when
   the .js class is present (set by an inline script in <head>), so with
   JavaScript disabled every element renders visible and crawlable.
   -------------------------------------------------------------------------- */
.js [data-reveal],
.js [data-reveal-children] > * {
  opacity: 0;
  will-change: opacity, transform;
}

/* Once GSAP has run, will-change is dropped to release GPU memory. */
[data-revealed='true'] { will-change: auto; }

/* --------------------------------------------------------------------------
   16. REDUCED MOTION
   A full stop. Anything hidden for animation is forced visible, and every
   transition/animation collapses to effectively zero.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal],
  .js [data-reveal-children] > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .media--zoom img { transition: none; }
  .gallery__caption { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   17. PRINT
   -------------------------------------------------------------------------- */
@media print {
  .header, .mobile-nav, .book-bar, .scroll-cue, .lightbox, .footer { display: none !important; }
  body { background: #fff; color: #000; }
  .js [data-reveal], .js [data-reveal-children] > * { opacity: 1 !important; transform: none !important; }
  .section { padding-block: 1.5rem; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 0.75rem; }
}
