/* ==========================================================================
   Villa Boa Vista: design system
   Palette, type and shapes follow the brief (Prompt.pdf mind map).
   ========================================================================== */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
/* Cormorant normal is a variable font: one file covers weights 500 and 600 */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url("../fonts/cormorantgaramond-500-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url("../fonts/cormorantgaramond-500-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorantgaramond-500-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap;
  src: url("../fonts/cormorantgaramond-500-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Krub"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/krub-400-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Krub"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/krub-400-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Krub"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/krub-500-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Krub"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/krub-500-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  /* Brief palette */
  --cream: #FAF6EF;        /* background / base: warm cream-white */
  --blue: #213E5A;         /* headings, large type, header, footer */
  --grey: #545253;         /* body copy, descriptions */
  --accent: #2860B0;       /* azulejo cobalt: calls to action */

  /* Derived tints (same hues, for surfaces and states) */
  --cream-soft: #F3ECE1;   /* alternate sections */
  --cream-paper: #FFFDF9;  /* cards, form */
  --cream-line: #E0D4C1;
  --blue-deep: #172D42;
  --blue-soft: #3A5874;
  --accent-deep: #1D4A8C;
  --accent-light: #9CC0EE; /* accent on dark blue */

  /* Section surfaces: calm cream tones (pastels were tried and rejected) */
  --sun: #F3ECE1;
  --mint: #F3ECE1;
  --rose: #F3ECE1;
  --sky: #F3ECE1;
  --error: #9E2B25;
  --success: #2E6340;

  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-body: "Krub", "Segoe UI", system-ui, sans-serif;

  --radius-card: 10px;
  --radius-btn: 5px; /* buttons: crisp, only just softened */
  --radius-sm: 6px;

  --shadow-1: 0 1px 2px rgba(23, 45, 66, 0.08), 0 4px 12px rgba(23, 45, 66, 0.08);
  --shadow-2: 0 2px 4px rgba(23, 45, 66, 0.10), 0 14px 34px rgba(23, 45, 66, 0.16);

  /* Motion (Emil Kowalski curves) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --header-h: 76px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1240px;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 64px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--grey);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--blue);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--blue); color: var(--cream-paper); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--blue);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 6.4vw, 5.75rem); }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); font-weight: 600; line-height: 1.15; }
p { margin: 0 0 1.1em; max-width: 65ch; text-wrap: pretty; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: color-mix(in srgb, var(--blue) 45%, transparent); }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: var(--radius-btn); }

html { scrollbar-color: var(--blue-soft) var(--cream-soft); }

.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;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--accent); color: #FFFDF9; padding: 0.6rem 1rem; border-radius: var(--radius-btn);
  font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.section--paper { background: var(--cream-soft); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.65; }
.muted { color: color-mix(in srgb, var(--grey) 82%, var(--cream)); font-size: 0.95rem; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: #FFFDF9;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0.75rem 1.4rem;
  border: 1px solid transparent; border-radius: var(--radius-btn);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 500 1rem/1.2 var(--font-body); letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(23, 45, 66, 0.12);
  transition: transform 160ms var(--ease-out), translate 300ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease, color 200ms ease, border-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-deep); box-shadow: 0 2px 4px rgba(23, 45, 66, 0.12), 0 8px 18px rgba(23, 45, 66, 0.14); }
  .btn:hover svg { transform: translateX(3px); }
  .btn:active { transform: scale(0.97); }
}
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--blue); border-color: color-mix(in srgb, var(--blue) 55%, transparent); box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .btn--ghost:hover { background: var(--blue); color: var(--cream-paper); border-color: var(--blue); }
}
.btn--light { --btn-fg: var(--cream-paper); border-color: rgba(246, 239, 227, 0.7); }
@media (hover: hover) and (pointer: fine) {
  .btn--light:hover { background: var(--cream-paper); color: var(--blue); border-color: var(--cream-paper); }
}
.btn--light:focus-visible { outline-color: var(--accent-light); }

.btn[aria-busy="true"] { cursor: progress; }
.btn:disabled { cursor: not-allowed; opacity: 0.6; box-shadow: none; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 500; color: var(--blue); text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 40%, transparent);
  padding-bottom: 2px; min-height: 44px;
  transition: border-color 200ms ease;
}
.text-link svg { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .text-link:hover { border-color: var(--blue); }
  .text-link:hover svg { transform: translateX(3px); }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--cream) 94%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 12%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  transition: background-color 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--blue); min-height: 44px; }
.brand__mark { width: 34px; height: 22px; flex: none; }
.brand__name { display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; line-height: 1; letter-spacing: 0.01em; white-space: nowrap; }
.brand__place { font-family: var(--font-body); font-weight: 500; font-size: 0.62rem; letter-spacing: 0.32em; text-transform: uppercase; margin-top: 0.3rem; opacity: 0.85; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 2.25rem); }
.nav__list { display: flex; gap: clamp(0.75rem, 2.2vw, 2rem); list-style: none; margin: 0; padding: 0; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  color: var(--blue); text-decoration: none; font-weight: 500; font-size: 0.98rem;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 220ms var(--ease-out);
}
.nav__link[aria-current="page"]::after { transform: scaleX(1); background: var(--accent); height: 2px; }
@media (hover: hover) and (pointer: fine) { .nav__link:hover::after { transform: scaleX(1); } }
.nav .btn { min-height: 42px; padding: 0.55rem 1.1rem; font-size: 0.95rem; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent);
  border-radius: var(--radius-btn); background: transparent; color: var(--blue); cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.nav-toggle:active { transform: scale(0.95); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Transparent header over the home hero until the visitor scrolls */
.page-home .site-header:not(.is-scrolled) { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.page-home .site-header:not(.is-scrolled) .brand,
.page-home .site-header:not(.is-scrolled) .nav__link { color: var(--cream-paper); }
.page-home .site-header:not(.is-scrolled) .nav-toggle { color: var(--cream-paper); border-color: rgba(246, 239, 227, 0.55); }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(23, 45, 66, 0.08); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 1.25rem;
    padding: 1.5rem var(--gutter) 2rem;
    background: var(--cream-paper);
    border-bottom: 1px solid color-mix(in srgb, var(--blue) 12%, transparent);
    box-shadow: 0 18px 30px rgba(23, 45, 66, 0.12);
    opacity: 0; transform: translateY(-8px); visibility: hidden;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s; }
  .nav__list { flex-direction: column; gap: 0.25rem; }
  .nav__link { font-family: var(--font-display); font-size: 1.85rem; font-weight: 500; color: var(--blue) !important; }
  .nav__link::after { bottom: 6px; }
  .nav .btn { min-height: 50px; font-size: 1rem; }
  .page-home .site-header.menu-open { background: var(--cream-paper); }
  .page-home .site-header.menu-open .brand { color: var(--blue); }
  .page-home .site-header.menu-open .nav-toggle { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 30%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .nav, .nav.is-open { transform: none; }
}

main { display: block; }
.page-inner main { padding-top: var(--header-h); }

/* ---------- Ornaments ---------- */
.wave-rule {
  height: 20px; width: 100%;
  background: url("../img/wave-light.svg") repeat-x left bottom / 44px 20px;
  opacity: 0.85;
}


.icon { width: 24px; height: 24px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Home: hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 920px); min-height: min(100vh, 920px);
  display: grid; align-items: end; overflow: hidden; isolation: isolate;
  color: var(--cream-paper);
}
@supports (min-height: 100svh) { .hero { min-height: min(100svh, 920px); } }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; transform-origin: 50% 70%; }
.js .hero__media img { animation: hero-settle 14s var(--ease-out) both; }
@keyframes hero-settle { from { transform: scale(1.07); } to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(23, 45, 66, 0.55) 0%, rgba(23, 45, 66, 0) 26%),
    linear-gradient(0deg, rgba(23, 45, 66, 0.9) 0%, rgba(23, 45, 66, 0.62) 38%, rgba(23, 45, 66, 0.12) 68%, rgba(23, 45, 66, 0) 80%),
    linear-gradient(90deg, rgba(23, 45, 66, 0.45) 0%, rgba(23, 45, 66, 0) 55%);
}
.hero__content { padding-block: calc(var(--header-h) + 3rem) clamp(3rem, 8vw, 6rem); }
.hero h1 { color: var(--cream-paper); max-width: 12ch; margin-bottom: 0.35em; }
.hero__text { font-size: clamp(1.08rem, 1.6vw, 1.3rem); line-height: 1.6; max-width: 46ch; color: rgba(246, 239, 227, 0.94); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }
.hero__place { display: flex; align-items: center; gap: 0.55rem; margin-top: 2.25rem; font-size: 0.95rem; color: rgba(246, 239, 227, 0.86); }
.hero__place svg { width: 18px; height: 18px; color: var(--accent-light); }

.js .hero__content > * { animation: rise-in 900ms var(--ease-out) both; }
.js .hero__content > *:nth-child(2) { animation-delay: 80ms; }
.js .hero__content > *:nth-child(3) { animation-delay: 160ms; }
.js .hero__content > *:nth-child(4) { animation-delay: 240ms; }
/* With the motion script the title rises word by word; the rest follows it */
.motion .hero__content > h1 { animation: none; }
.motion .hero__content > *:nth-child(2) { animation-delay: 520ms; }
.motion .hero__content > *:nth-child(3) { animation-delay: 640ms; }
.motion .hero__content > *:nth-child(4) { animation-delay: 760ms; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .js .hero__media img { animation: none; }
  .js .hero__content > * { animation: fade-in 400ms ease both; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Fact line under the hero */
.facts { background: var(--blue); color: var(--cream-paper); }
/* Four equal columns; on narrower screens a tidy 2 × 2 grid */
.facts__list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem 1.5rem;
  list-style: none; margin: 0; padding: 1.15rem 0; font-size: 0.98rem;
}
.facts__list li { display: flex; align-items: center; justify-content: center; gap: 0.6rem; }
@media (max-width: 860px) {
  .facts__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts__list li { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .facts__list { grid-template-columns: auto auto; justify-content: space-between; gap: 0.85rem 0.75rem; font-size: 0.86rem; }
  .facts__list li { gap: 0.45rem; white-space: nowrap; }
  .facts__list svg { width: 19px; height: 19px; flex: none; }
}
.facts__list svg { color: var(--accent-light); width: 22px; height: 22px; }

/* ---------- Home: ocean section ----------
   Editorial and warm: a big headline, a loose collage of places, and wild flowers growing out of the footer. */
.ocean { padding-block: clamp(4.5rem, 10vw, 8.5rem); overflow-x: clip; }

.ocean__head {
  position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: end; margin-bottom: clamp(3rem, 7vw, 5.5rem);
}
.ocean__head h2 { margin: 0; max-width: 11ch; font-size: clamp(2.7rem, 6.2vw, 5.4rem); line-height: 1.02; text-wrap: balance; }
.ocean__head h2 em { font-style: italic; color: var(--accent); }
.ocean__head .lead { margin: 0; max-width: 40ch; }

/* Places: a loose collage beside a quiet list */
.places {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem);
  align-items: center;
}
.collage { grid-column: 1 / span 7; position: relative; aspect-ratio: 1 / 1.02; }
.collage__ph { position: absolute; margin: 0; }
.collage__ph .photo { width: 100%; height: 100%; }
.collage__ph--a { left: 0; top: 0; width: 74%; aspect-ratio: 4 / 3; }
.collage__ph--b { right: 0; top: 36%; width: 42%; aspect-ratio: 3 / 4; z-index: 2; border-radius: 999px 999px var(--radius-card) var(--radius-card); }
.collage__ph--b .photo { border-radius: inherit; }
.photo--sunset img { object-position: 34% 50%; }
/* Passe-partout ring + soft depth once the arch photo has appeared */
.collage__ph--b::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  box-shadow: 0 0 0 clamp(5px, 0.7vw, 9px) var(--cream), 0 18px 40px rgba(23, 45, 66, 0.18);
  transition: opacity 700ms ease 300ms;
}
.js .collage__ph--b:not(:has(.is-visible))::before { opacity: 0; }
.collage__ph--c { left: 6%; top: 64%; width: 46%; aspect-ratio: 4 / 3; }

.places__list { grid-column: 9 / span 4; list-style: none; margin: 0; padding: 0; }
.place { padding-block: clamp(1.25rem, 2.2vw, 1.75rem); border-top: 1px solid var(--cream-line); }
.place:last-child { border-bottom: 1px solid var(--cream-line); }
.place h3 { font-style: italic; font-weight: 500; font-size: clamp(1.7rem, 2.6vw, 2.25rem); line-height: 1.1; margin: 0 0 0.35em; }
.place p { font-size: 1rem; margin: 0; max-width: 38ch; }

.photo { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--cream-line); }
.photo img { width: 100%; height: 100%; object-fit: cover; }

.js .reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 900ms var(--ease-in-out); }
.js .reveal-img img { transform: scale(1.06); transition: transform 1200ms var(--ease-out); }
.js .reveal-img.is-visible { clip-path: inset(0 0 0 0); }
.js .reveal-img.is-visible img { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal-img { clip-path: none; opacity: 0; transition: opacity 400ms ease; }
  .js .reveal-img img { transform: none; transition: none; }
  .js .reveal-img.is-visible { opacity: 1; }
}



/* ---------- Villa: sub navigation ---------- */
.subnav {
  position: sticky; top: var(--header-h); z-index: 50;
  background: color-mix(in srgb, var(--cream) 95%, transparent);
  border-block: 1px solid color-mix(in srgb, var(--blue) 12%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.subnav__list {
  display: flex; gap: 0.35rem; list-style: none; margin: 0 auto; padding: 0.6rem 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.subnav__list::-webkit-scrollbar { display: none; }
.subnav__link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0.35rem 0.95rem;
  border-radius: var(--radius-btn); white-space: nowrap; text-decoration: none;
  color: var(--blue); font-size: 0.93rem; font-weight: 500;
  transition: background-color 200ms ease, color 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .subnav__link:hover { background: color-mix(in srgb, var(--blue) 9%, transparent); } }
.subnav__link.is-active { background: var(--blue); color: var(--cream-paper); }

/* ---------- Villa: room sections ---------- */
.room { padding-block: clamp(4rem, 9vw, 7rem); border-top: 1px solid color-mix(in srgb, var(--blue) 12%, transparent); }
.room__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: center; }
.room:nth-of-type(even) .room__grid > .room__text { order: 2; }
.room__text h2 { margin-bottom: 0.4em; }
.room__list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.1rem; }
.room__list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 0; border-bottom: 1px solid color-mix(in srgb, var(--blue) 14%, transparent);
}
.room__list li span:first-child { color: var(--blue); font-weight: 500; }
.room__list li span:last-child { text-align: right; }

.notice {
  display: flex; gap: 0.85rem; align-items: flex-start; margin-top: 1.5rem;
  background: var(--cream-paper); border-radius: var(--radius-card); padding: 1rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--accent-deep) 70%, transparent);
  font-size: 0.97rem; line-height: 1.55;
}
.notice svg { color: var(--accent-deep); width: 22px; height: 22px; margin-top: 2px; }
.notice p { margin: 0; }
.notice strong { color: var(--blue); font-weight: 500; }

/* Utilities */
.amenities { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.amenities li { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px solid color-mix(in srgb, var(--blue) 14%, transparent); }
.amenities svg { color: var(--blue); width: 28px; height: 28px; margin-top: 2px; }
.amenities strong { display: block; color: var(--blue); font-weight: 500; }
.amenities span { font-size: 0.96rem; }

/* ---------- Fan gallery (stacked cards that fan out) ---------- */
.fan {
  position: relative; display: block; width: 100%; max-width: 560px; margin-inline: auto;
  aspect-ratio: 1 / 0.92;
  padding: 0; border: 0; background: none;
}
.fan__cards { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
.fan__card { position: absolute; left: 50%; top: 4%; width: 58%; aspect-ratio: 4 / 5; margin-left: -29%; }
.fan__btn {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in;
  border-radius: var(--radius-card); overflow: hidden; background: var(--cream-line);
  box-shadow: var(--shadow-1);
  outline-offset: 4px;
  transform: var(--rest, none);
  transform-origin: 50% 115%;
  transition: transform 520ms var(--ease-out), box-shadow 300ms ease;
  transition-delay: var(--delay, 0ms);
}
.fan__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
.fan.is-open .fan__btn { transform: var(--spread, none); box-shadow: var(--shadow-2); }
@media (hover: hover) and (pointer: fine) {
  .fan:hover .fan__btn { transform: var(--spread, none); box-shadow: var(--shadow-2); }
  .fan .fan__btn:hover { transform: var(--spread, none) translateY(-16px); transition-delay: 0ms; transition-duration: 260ms; }
  .fan .fan__btn:hover img { transform: scale(1.04); }
}
.fan:focus-within .fan__btn { transform: var(--spread, none); }
.fan .fan__btn:focus-visible { transform: var(--spread, none) translateY(-16px); outline: 2px solid var(--blue); }

.fan__hint {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap;
  font-size: 0.9rem; color: var(--blue); background: var(--cream-paper);
  padding: 0.45rem 0.95rem; border-radius: var(--radius-btn); box-shadow: var(--shadow-1);
  transition: opacity 200ms ease;
}
.fan__hint svg { width: 16px; height: 16px; }
.fan.is-open .fan__hint { opacity: 0.0; }
@media (hover: hover) and (pointer: fine) { .fan:hover .fan__hint { opacity: 0; } }

/* Without JS the stack becomes a simple scrolling row */
.no-js .fan { aspect-ratio: auto; max-width: none; }
.no-js .fan__cards { position: static; display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; }
.no-js .fan__card { position: static; flex: 0 0 70%; margin: 0; scroll-snap-align: start; }
.no-js .fan__hint { display: none; }

@media (prefers-reduced-motion: reduce) {
  .fan__btn { transition: transform 1ms linear, box-shadow 200ms ease; }
  .fan__btn img { transition: none; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(16, 31, 46, 0.94); color: var(--cream-paper);
}
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { animation: lb-in 240ms var(--ease-out); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem var(--gutter); }
.lightbox__count { font-size: 0.95rem; font-variant-numeric: tabular-nums; color: rgba(246, 239, 227, 0.8); }
.lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 clamp(0.5rem, 5vw, 5rem); touch-action: pan-y; }
.lightbox__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--radius-sm); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); }
.lightbox__img.is-entering { animation: lb-img 260ms var(--ease-out); }
@keyframes lb-img { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.lightbox__caption { text-align: center; padding: 1rem var(--gutter) 1.4rem; font-size: 0.98rem; color: rgba(246, 239, 227, 0.88); }
.lb-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-btn);
  border: 1px solid rgba(246, 239, 227, 0.35); background: rgba(23, 45, 66, 0.6); color: var(--cream-paper);
  cursor: pointer; transition: background-color 200ms ease, transform 160ms var(--ease-out), border-color 200ms ease;
}
.lb-btn svg { width: 22px; height: 22px; }
.lb-btn:active { transform: scale(0.94); }
.lb-btn:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .lb-btn:hover { background: var(--accent); color: #FFFDF9; border-color: var(--accent); } }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev:active, .lb-next:active { transform: translateY(-50%) scale(0.94); }
.lb-prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lb-next { right: clamp(0.5rem, 2vw, 1.5rem); }
@media (prefers-reduced-motion: reduce) {
  .lightbox[open], .lightbox__img.is-entering { animation: fade-in 150ms ease; }
}
body.lb-open { overflow: hidden; }

/* ---------- Your Stay ---------- */
.location { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch; }
.map {
  position: relative; z-index: 0; isolation: isolate; /* keep Leaflet's panes below the fixed header */
  min-height: 440px; border-radius: var(--radius-card); overflow: hidden;
  box-shadow: var(--shadow-2); background: var(--cream-soft);
  border: 1px solid color-mix(in srgb, var(--blue) 14%, transparent);
}
.map:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.address { font-style: normal; font-size: 1.05rem; line-height: 1.6; color: var(--blue); }
.address strong { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; display: block; margin-bottom: 0.35rem; }
.arrival { list-style: none; padding: 0; margin: 1.75rem 0; display: grid; gap: 1rem; }
.arrival li { display: flex; gap: 0.85rem; align-items: flex-start; font-size: 0.98rem; line-height: 1.55; }
.arrival svg { color: var(--blue); margin-top: 2px; }

.map-pin { background: none; border: 0; }
.map-pin svg { width: 44px; height: 54px; filter: drop-shadow(0 4px 6px rgba(23, 45, 66, 0.35)); }
.leaflet-container { font-family: var(--font-body); background: var(--cream-soft); }
.leaflet-popup-content-wrapper { border-radius: var(--radius-card); color: var(--grey); }
/* Map zoom buttons follow the sharp-cornered buttons */
.leaflet-bar, .leaflet-bar a,
.leaflet-bar a:first-child, .leaflet-bar a:last-child,
.leaflet-touch .leaflet-bar a:first-child, .leaflet-touch .leaflet-bar a:last-child { border-radius: 0; }
.leaflet-bar { border-radius: var(--radius-btn) !important; overflow: hidden; }
.leaflet-popup-content { margin: 0.9rem 1.1rem; line-height: 1.5; font-size: 0.95rem; }
.leaflet-popup-content strong { color: var(--blue); font-family: var(--font-display); font-size: 1.25rem; }
.leaflet-control-zoom a { color: var(--blue) !important; }

/* Seasons (ABC model) */
.seasons { margin-top: clamp(2rem, 5vw, 3rem); border-top: 1.5px solid var(--blue); }
.season {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 1rem 2rem; align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(0.5rem, 2vw, 1.5rem);
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 18%, transparent);
  transition: background-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .season:hover { background-color: color-mix(in srgb, var(--cream-paper) 70%, transparent); } }
.season__name { margin: 0 0 0.15rem; font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.season__months { margin: 0; font-size: 0.97rem; }
.season__price { font-family: var(--font-display); font-weight: 600; color: var(--blue); font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.season__price small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.86rem; color: var(--grey); margin-top: 0.35rem; }
.season__stay { font-size: 0.97rem; }
.season__stay strong { display: block; color: var(--blue); font-weight: 500; }
.price-note { margin-top: 1.25rem; font-size: 0.93rem; }

/* Contact form */
.contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact__aside h2 { max-width: 12ch; }
.form {
  background: var(--cream-paper); border-radius: var(--radius-card); padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-2);
}
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.form__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; margin-bottom: 1.25rem; min-width: 0; }
.field label { font-size: 0.93rem; font-weight: 500; color: var(--blue); margin-bottom: 0.4rem; }
.field label .opt { font-weight: 400; color: var(--grey); }
.form__row--3 { align-items: start; }
.form__row--3 .field label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form__hint { margin: -0.4rem 0 0.9rem; font-size: 0.88rem; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 50px; padding: 0.75rem 0.95rem;
  font: 400 1rem/1.4 var(--font-body); color: var(--blue-deep);
  background: #FFFDF9; border: 1px solid var(--cream-line); border-radius: var(--radius-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #75706A; }
@media (hover: hover) and (pointer: fine) { .field input:hover, .field textarea:hover, .field select:hover { border-color: var(--blue-soft); } }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--error); }
.field.is-invalid input:focus, .field.is-invalid textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--error) 22%, transparent); }
.field__error { display: none; align-items: center; gap: 0.4rem; margin-top: 0.4rem; font-size: 0.88rem; color: var(--error); }
.field__error svg { width: 16px; height: 16px; flex: none; }
.field.is-invalid .field__error { display: flex; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.5rem; }
.form__legal { font-size: 0.86rem; margin: 0; max-width: 38ch; }
.btn .spinner { display: none; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 800ms linear infinite; }
.btn[aria-busy="true"] .spinner { display: inline-block; }
.btn[aria-busy="true"] .btn__arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-status {
  display: none; gap: 0.75rem; align-items: flex-start; margin-top: 1.25rem;
  padding: 1rem 1.15rem; border-radius: var(--radius-card); font-size: 0.97rem; line-height: 1.55;
}
.form-status svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.form-status p { margin: 0; }
.form-status.is-success { display: flex; background: color-mix(in srgb, var(--success) 12%, var(--cream-paper)); color: var(--success); }
.form-status.is-error { display: flex; background: color-mix(in srgb, var(--error) 10%, var(--cream-paper)); color: var(--error); }
.form-status.is-visible { animation: rise-in 260ms var(--ease-out); }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue); color: rgba(246, 239, 227, 0.86); margin-top: 0; padding-bottom: 1.5rem; }
.site-footer .wave-rule { opacity: 0.9; margin-top: 0.5rem; }
.site-footer__inner { display: grid; grid-template-columns: repeat(2, minmax(0, 19rem)); gap: 2.5rem clamp(2.5rem, 8vw, 7rem); padding-block: clamp(2.5rem, 5vw, 3.75rem) 2rem; }
.site-footer .brand { color: var(--cream-paper); }
.site-footer p { font-size: 0.95rem; max-width: 36ch; margin-top: 1rem; }
.footer-title { font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-light); margin: 0 0 0.85rem; }
.site-footer address { font-style: normal; font-size: 0.97rem; line-height: 1.7; color: var(--cream-paper); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.footer-links a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 40px; color: var(--cream-paper); text-decoration: none; font-size: 0.97rem; transition: color 200ms ease; }
.footer-links svg { width: 18px; height: 18px; color: var(--accent-light); }
@media (hover: hover) and (pointer: fine) { .footer-links a:hover { color: var(--accent-light); } }
.site-footer a:focus-visible { outline-color: var(--accent-light); }
.site-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  padding-block: 1.25rem 1.75rem; border-top: 1px solid rgba(246, 239, 227, 0.16);
  font-size: 0.88rem; color: rgba(246, 239, 227, 0.72);
}
.site-footer__base ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-footer__base a { color: rgba(246, 239, 227, 0.86); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
@media (hover: hover) and (pointer: fine) { .site-footer__base a:hover { color: var(--accent-light); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .ocean__head, .room__grid, .location, .contact { grid-template-columns: minmax(0, 1fr); }
  .room:nth-of-type(even) .room__grid > .room__text { order: 0; }
  .collage, .places__list { grid-column: 1 / -1; }
  .places__list { margin-top: 2rem; }
  .map { min-height: 360px; }
}
@media (max-width: 640px) {
  :root { --header-h: 66px; }
  body { font-size: 1rem; }
  .brand__name { font-size: 1.35rem; }
  .season { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .season > div { grid-column: 1 / -1; }
  .form__row, .form__row--3 { grid-template-columns: minmax(0, 1fr); }
  .amenities { grid-template-columns: minmax(0, 1fr); }
  .fan { aspect-ratio: 1 / 1.05; }
  .fan__card { width: 64%; margin-left: -32%; }
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__actions .btn { flex: 1 1 auto; }
}

/* ---------- Accent details ---------- */
/* Brand mark curl follows the accent */
.brand__mark path:first-child { stroke: var(--accent); }
.page-home .site-header:not(.is-scrolled) .brand__mark path:first-child,
.site-footer .brand__mark path:first-child { stroke: var(--accent-light); }
.page-home .site-header.menu-open .brand__mark path:first-child { stroke: var(--accent); }

/* Focus rings stay visible on the dark hero and the transparent header */
.hero :focus-visible,
.page-home .site-header:not(.is-scrolled) :focus-visible { outline-color: var(--accent-light); }

/* Sub-navigation: active pill in the accent */
.subnav__link.is-active { background: var(--accent); color: #FFFDF9; }

/* ==========================================================================
   Motion layer (assets/js/motion.js adds .motion to <html>)
   Inspiration: masked text reveals, curtain image reveals, staggered rows.
   Only transform / opacity / clip-path; everything respects reduced motion.
   ========================================================================== */

/* Headings rise word by word from behind a mask */
.motion .split-head .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.06em 0.16em; margin: 0 -0.06em -0.16em; }
.motion .split-head .w__i {
  display: inline-block; transform: translate3d(0, 108%, 0);
  transition: transform 1100ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms + var(--head-delay, 0ms));
}
.motion .split-head.is-in .w__i { transform: none; }
.hero h1 { --head-delay: 120ms; }

/* Text blocks, cards and rows fade up in small staggered groups */
.motion .rv {
  opacity: 0; transform: translate3d(0, 22px, 0);
  transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out);
  transition-delay: calc(var(--rv-i, 0) * 80ms);
}
.motion .rv.is-in { opacity: 1; transform: none; }

/* List rows: the hairline draws itself from left to right */
.motion .room__list > li.rv,
.motion .amenities > li.rv,
.motion .season.rv {
  --rule: color-mix(in srgb, var(--blue) 16%, transparent);
  --d: calc(var(--rv-i, 0) * 80ms);
  border-bottom-color: transparent;
  background-image: linear-gradient(var(--rule), var(--rule));
  background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 1px;
  transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out), background-size 1200ms var(--ease-in-out), background-color 200ms ease;
  transition-delay: var(--d), var(--d), calc(var(--d) + 120ms), 0ms;
}
.motion .room__list > li.rv.is-in,
.motion .amenities > li.rv.is-in,
.motion .season.rv.is-in { background-size: 100% 1px; }

/* Fan galleries: cards are dealt onto the stack */
.motion .fan:not(.is-in) .fan__btn { opacity: 0; transform: translate3d(0, 40px, 0) scale(0.94); }
.motion .fan.is-dealing .fan__btn {
  transition: transform 950ms var(--ease-out), opacity 450ms ease, box-shadow 300ms ease;
  transition-delay: var(--deal, 0ms);
}

/* Large photos drift slightly against the scroll */
.motion [data-parallax] img { scale: 1.12; }

/* Hero: scroll cue */
.hero__scroll {
  position: absolute; right: max(var(--gutter), calc((100% - var(--max)) / 2)); bottom: clamp(3rem, 8vw, 6rem);
  width: 1px; height: 72px; overflow: hidden; background: rgba(246, 239, 227, 0.28);
}
.hero__scroll::after {
  content: ""; position: absolute; inset: 0; background: var(--cream-paper);
  transform: translateY(-100%); animation: scroll-cue 2400ms var(--ease-in-out) 1200ms infinite;
}
@keyframes scroll-cue { 0% { transform: translateY(-100%); } 55%, 100% { transform: translateY(100%); } }
@media (max-width: 860px) { .hero__scroll { display: none; } }

/* Footer wave drifts like a slow swell */
.motion .site-footer .wave-rule { animation: wave-drift 9s linear infinite; }
@keyframes wave-drift { to { background-position: 44px 100%; } }

/* Soft cross-fade between pages (Chrome, Edge, Safari; others simply load normally) */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out 200ms ease both; }
::view-transition-new(root) { animation: vt-in 520ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  .motion .split-head .w__i { transform: none; transition: none; }
  .motion .rv { transform: none; transition: opacity 400ms ease; transition-delay: 0ms; }
  .motion .room__list > li.rv, .motion .amenities > li.rv, .motion .season.rv { background-size: 100% 1px; transition: opacity 400ms ease; }
  .motion .fan:not(.is-in) .fan__btn { transform: var(--rest, none); }
  .motion [data-parallax] img { scale: none; }
  .hero__scroll::after, .motion .site-footer .wave-rule { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
/* ==========================================================================
   Editorial layer: Villa & Your Stay
   ========================================================================== */

/* ---------- Shared pieces ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 0.85rem; margin: 0 0 1.4rem; max-width: none;
  font: 500 0.78rem/1 var(--font-body); letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 2.75rem; height: 1px; background: currentColor; }

/* Outlined chapter numerals behind the section titles */
.room__num {
  display: block; position: relative; z-index: 0;
  font-family: var(--font-display); font-weight: 500; font-variant-numeric: lining-nums;
  font-size: clamp(4.5rem, 10vw, 8.5rem); line-height: 0.8; letter-spacing: -0.02em;
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 50%, transparent);
  margin: 0 0 -0.34em -0.04em; user-select: none; pointer-events: none;
}
@supports not (-webkit-text-stroke: 1px black) { .room__num { color: var(--cream-line); } }
.room__num + h2 { position: relative; z-index: 1; font-size: clamp(2.6rem, 5.4vw, 4.6rem); }

/* ---------- Villa: intro ---------- */
.v-intro { padding-top: clamp(3rem, 7vw, 5.5rem); }
.v-intro__head {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(1.5rem, 5vw, 5rem); align-items: end; padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.v-intro__head h1 { font-size: clamp(3.4rem, 9.5vw, 8.75rem); line-height: 0.92; margin: 0; max-width: 9ch; }
.v-intro__lead { margin: 0 0 0.5rem; }

/* The photo that opens to full width. --p: 0 (inset card) to 1 (full bleed); 1 without JS */
.v-expand { position: relative; --p: 1; }
.v-expand__sticky { position: relative; height: min(78vh, 62vw); overflow: hidden; }
.v-expand__media {
  --iy: 7%; --ix: max(var(--gutter), calc((100% - var(--max)) / 2));
  position: absolute; inset: 0;
  clip-path: inset(calc(var(--iy) * (1 - var(--p))) calc(var(--ix) * (1 - var(--p))) round calc(18px * (1 - var(--p))));
}
.v-expand__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%;
  transform: scale(calc(1.16 - 0.16 * var(--p))); transform-origin: 50% 55%;
}
.v-expand__media::after {
  content: ""; position: absolute; inset: 0; opacity: var(--p);
  background: linear-gradient(0deg, rgba(23, 45, 66, 0.62) 0%, rgba(23, 45, 66, 0) 58%);
}
.v-expand__caption {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: clamp(2rem, 6vw, 4.5rem);
  width: min(100% - 2 * var(--gutter), var(--max)); max-width: none; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 0 0.3em;
  font-family: var(--font-display); font-weight: 500; font-size: clamp(2.2rem, 6vw, 5.5rem); line-height: 1.02;
  color: var(--cream-paper);
}
.v-expand__caption span {
  --k: 0; --show: clamp(0, calc((var(--p) - 0.55 - var(--k) * 0.12) * 6), 1);
  display: inline-block; opacity: var(--show); transform: translateY(calc((1 - var(--show)) * 28px));
}
.v-expand__caption span:nth-child(2) { --k: 1; }
.v-expand__caption span:nth-child(3) { --k: 2; }
.motion-scroll .v-expand { height: 210vh; }
.motion-scroll .v-expand__sticky { position: sticky; top: var(--sticky-top, 140px); height: calc(100vh - var(--sticky-top, 140px)); }

.v-intro__body {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3rem) 0;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 3vw, 2rem);
}
.v-intro__text { grid-column: 1 / -1; justify-self: center; text-align: center; margin: 0; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.7; max-width: 52ch; }

.stats {
  grid-column: 1 / -1; list-style: none; margin: clamp(1rem, 3vw, 2rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid color-mix(in srgb, var(--blue) 18%, transparent);
}
.stats li {
  display: flex; flex-direction: column; gap: 0.7rem;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(0.75rem, 2vw, 1.5rem) 0;
  border-left: 1px solid color-mix(in srgb, var(--blue) 14%, transparent);
}
.stats li:first-child { border-left: 0; padding-left: 0; }
.stats__n { font-family: var(--font-display); font-weight: 500; font-size: clamp(3.5rem, 8vw, 7rem); line-height: 0.85; color: var(--blue); font-variant-numeric: lining-nums tabular-nums; }
.stats__l { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding-block: clamp(2.25rem, 5vw, 3.75rem); border-bottom: 1px solid color-mix(in srgb, var(--blue) 12%, transparent); }
.marquee__track { display: flex; align-items: center; width: max-content; will-change: transform; }
.marquee__track > * { margin-right: clamp(1.5rem, 3vw, 3rem); flex: none; }
.marquee span {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(2.5rem, 7vw, 6rem); line-height: 1.1; color: var(--blue); white-space: nowrap;
}
.marquee span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1px var(--blue); }
.marquee i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--accent); }

/* ---------- Utilities: icon badges that draw themselves ---------- */
.amenities svg {
  width: 52px; height: 52px; padding: 13px; margin-top: -4px; border-radius: 50%;
  background: var(--cream-paper); border: 1px solid color-mix(in srgb, var(--blue) 14%, transparent);
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease, transform 400ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .amenities li:hover svg { background: var(--accent); border-color: var(--accent); color: #FFFDF9; transform: rotate(-10deg) scale(1.06); }
}
.motion-scroll .amenities li.rv svg,
.motion-scroll .arrival li.rv svg { stroke-dasharray: 90; stroke-dashoffset: 90; transition: stroke-dashoffset 1600ms var(--ease-in-out), background-color 300ms ease, color 300ms ease, border-color 300ms ease, transform 400ms var(--ease-out); transition-delay: calc(var(--rv-i, 0) * 80ms + 250ms), 0ms, 0ms, 0ms, 0ms; }
.motion-scroll .amenities li.rv.is-in svg,
.motion-scroll .arrival li.rv.is-in svg { stroke-dashoffset: 0; }

/* ---------- Your Stay: intro with chapter index ---------- */
.stay-hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 6vw, 4.5rem); }
.stay-hero h1 { font-size: clamp(3.6rem, 11vw, 10rem); line-height: 0.9; margin: 0 0 clamp(1.75rem, 4vw, 3rem); }
.stay-hero__row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.stay-hero .lead { margin: 0; }
.chapters { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--blue); }
.chapters a {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto 1.5rem; align-items: center; gap: 1rem;
  padding: 1.2rem 0.9rem; min-height: 72px;
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 18%, transparent);
  color: var(--blue); text-decoration: none;
  transition: color 350ms var(--ease-out);
}
.chapters a::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--blue);
  transform: scaleY(0); transform-origin: 50% 100%; transition: transform 480ms var(--ease-out);
}
.chapters__n { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.16em; color: var(--accent); transition: color 350ms ease; }
.chapters__t { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1; }
.chapters__d { font-size: 0.92rem; color: var(--grey); transition: color 350ms ease; }
.chapters svg { width: 20px; height: 20px; transform: rotate(90deg); transition: transform 400ms var(--ease-out); }
.chapters a:focus-visible { outline-offset: -2px; }
.chapters a:focus-visible::before { transform: scaleY(1); }
.chapters a:focus-visible, .chapters a:focus-visible .chapters__d { color: var(--cream-paper); }
@media (hover: hover) and (pointer: fine) {
  .chapters a:hover { color: var(--cream-paper); }
  .chapters a:hover::before { transform: scaleY(1); }
  .chapters a:hover .chapters__n { color: var(--accent-light); }
  .chapters a:hover .chapters__d { color: rgba(246, 239, 227, 0.8); }
  .chapters a:hover svg { transform: rotate(90deg) translateX(5px); }
}

/* ---------- Your Stay: map pin ---------- */
.map-pin { position: relative; }
.map-pin svg { position: relative; z-index: 1; }
.map-pin__pulse {
  position: absolute; left: 50%; bottom: 2px; width: 18px; height: 18px; margin: 0 0 -9px -9px;
  border-radius: 50%; background: color-mix(in srgb, var(--accent) 50%, transparent);
  animation: pin-pulse 2400ms var(--ease-out) infinite;
}
@keyframes pin-pulse { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(3.4); opacity: 0; } }
.motion .map:not(.is-in) .map-pin svg { opacity: 0; }
.motion .map.is-in .map-pin svg { animation: pin-drop 900ms cubic-bezier(0.34, 1.56, 0.64, 1) 450ms both; }
@keyframes pin-drop { from { transform: translateY(-46px); opacity: 0; } 50% { opacity: 1; } to { transform: none; opacity: 1; } }

/* ---------- Your Stay: year timeline + season rows ---------- */
.year { margin-top: clamp(2rem, 5vw, 3rem); padding-top: 2.6rem; }
.year__bar { position: relative; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; height: 56px; }
.year__seg {
  --s: 0;
  display: flex; align-items: center; padding-inline: 0.8rem; border-radius: var(--radius-btn); overflow: hidden; white-space: nowrap;
  font-size: 0.76rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  transition: opacity 250ms ease, clip-path 900ms var(--ease-out);
}
.year__seg--low { background: color-mix(in srgb, var(--blue) 12%, var(--cream)); color: var(--blue); }
.year__seg--mid { background: var(--accent-light); color: var(--blue-deep); }
.year__seg--main { background: var(--accent); color: #FFFDF9; }
.year__seg--a { grid-column: 1 / 7; }
.year__seg--b { grid-column: 7 / 12; --s: 1; }
.year__seg--c { grid-column: 12 / 18; --s: 2; }
.year__seg--d { grid-column: 18 / 21; --s: 3; }
.year__seg--e { grid-column: 21 / 25; --s: 4; }
.year[data-active] .year__seg { opacity: 0.28; }
.year[data-active="low"] .year__seg--low,
.year[data-active="mid"] .year__seg--mid,
.year[data-active="main"] .year__seg--main { opacity: 1; }
.year__months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-top: 0.65rem; font-size: 0.78rem; }
.year__months span { padding-left: 0.2rem; }
.year__now { position: absolute; z-index: 1; top: -10px; bottom: -10px; left: var(--pos, 0); width: 2px; margin-left: -1px; border-radius: 2px; background: var(--blue); }
.year__now span {
  position: absolute; bottom: 100%; right: 0; transform: translate(50%, -6px); white-space: nowrap;
  font-size: 0.75rem; font-weight: 500; color: var(--blue); background: var(--cream-paper);
  padding: 0.3rem 0.7rem; border-radius: var(--radius-btn); box-shadow: var(--shadow-1);
}
.motion .year.rv .year__seg { clip-path: inset(0 100% 0 0 round var(--radius-btn)); transition-delay: 0ms, calc(var(--s) * 110ms + 200ms); }
.motion .year.rv.is-in .year__seg { clip-path: inset(0 0 0 0 round var(--radius-btn)); }
.motion .year.rv .year__now { opacity: 0; transform: scaleY(0.3); transition: opacity 400ms ease 900ms, transform 600ms var(--ease-out) 900ms; }
.motion .year.rv.is-in .year__now { opacity: 1; transform: none; }

.season { position: relative; }
.season::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent);
  transform: scaleY(0); transform-origin: top; transition: transform 420ms var(--ease-out);
}
.season.is-linked { background-color: color-mix(in srgb, var(--cream-paper) 70%, transparent); }
.season.is-linked::before { transform: scaleY(1); }
.season__price { font-size: clamp(2.4rem, 4.5vw, 3.8rem); }
.season[data-season="main"] .season__price { color: var(--accent); }

.contact__aside .room__num + h2 { font-size: clamp(2.8rem, 6vw, 5rem); }

/* ---------- Cursor, magnetic buttons, reading progress ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 300; width: 0; height: 0; pointer-events: none; }
.cursor span {
  position: absolute; left: -44px; top: -44px; width: 88px; height: 88px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #FFFDF9;
  font: 500 0.82rem/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(23, 45, 66, 0.28);
  transform: scale(0); opacity: 0; transition: transform 380ms var(--ease-out), opacity 200ms ease;
}
.cursor.is-on span { transform: scale(1); opacity: 1; }
.has-cursor .fan__btn { cursor: none; }

.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .v-intro__head, .stay-hero__row { grid-template-columns: minmax(0, 1fr); }
  .v-intro__text { grid-column: 1 / -1; }
  .motion-scroll .v-expand { height: 170vh; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats li:nth-child(n+3) { margin-top: 1rem; border-top: 1px solid color-mix(in srgb, var(--blue) 14%, transparent); }
  .chapters a { grid-template-columns: 2.2rem minmax(0, 1fr) 1.25rem; padding-inline: 0.4rem; }
  .chapters__d { display: none; }
  .year__seg { padding-inline: 0.35rem; font-size: 0.6rem; letter-spacing: 0.06em; }
  .year__months { font-size: 0.66rem; }
  .year__months span { padding-left: 0.1rem; }
  .v-expand__sticky { height: 62vh; }
}

@media (prefers-reduced-motion: reduce) {
  .map-pin__pulse { animation: none; opacity: 0; }
  .motion .map.is-in .map-pin svg { animation: none; }
  .motion .map:not(.is-in) .map-pin svg { opacity: 1; }
  .motion .year.rv .year__seg { clip-path: none; }
  .motion .year.rv .year__now { transform: none; }
  .chapters a::before, .season::before { transition-duration: 1ms; }
}
/* ---------- Legal pages: Impressum & Privacy Policy ---------- */
.legal-hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 4vw, 3rem); }
.legal-hero h1 { font-size: clamp(3.2rem, 9vw, 7.5rem); line-height: 0.92; margin: 0 0 clamp(1.25rem, 3vw, 2rem); }
.legal-hero .lead { margin: 0; max-width: 44ch; }
.legal { padding-bottom: clamp(4.5rem, 10vw, 8rem); }
.legal__block {
  display: grid; grid-template-columns: 5.5rem minmax(0, 46rem); gap: 0 clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
  border-top: 1px solid color-mix(in srgb, var(--blue) 16%, transparent);
}
.legal__block:last-child { border-bottom: 1px solid color-mix(in srgb, var(--blue) 16%, transparent); }
.legal__n {
  font-family: var(--font-display); font-weight: 500; font-variant-numeric: lining-nums;
  font-size: 2.6rem; line-height: 0.9; color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 60%, transparent);
}
.legal h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.1; margin: 0 0 0.75rem; }
.legal address { font-style: normal; margin: 0 0 1.1em; }
.legal p:last-child, .legal address:last-child { margin-bottom: 0; }
.legal .text-link { margin-top: 0.25rem; }
.legal__notice {
  padding: 1.1rem 1.25rem; border-left: 2px solid var(--accent);
  background: var(--cream-paper); border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
}
.legal__notice strong { font-weight: 500; color: var(--blue); }
@media (max-width: 640px) {
  .legal__block { grid-template-columns: minmax(0, 1fr); }
  .legal__n { font-size: 2rem; margin-bottom: 0.6rem; }
}
