/* ==========================================================================
   Villa Oliviers
   Fonts are self-hosted (no requests to Google). Colour and font tokens follow;
   everything else on the page reads from these variables.
   ========================================================================== */
@font-face {
  font-family: "Italiana";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/italiana-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: "Jost";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/jost-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;
}

:root {
  /* Colour, drawn from the villa photos */
  --chalk: #ffffff;       /* page background, the villa's white render */
  --travertine: #e8e1d5;  /* tinted sections, pool-deck stone */
  --iron: #1e211d;        /* text, buttons and frames, the black steel doors */
  --olive: #3f4a36;       /* dark band, palm and hedge green */
  --pool: #17707d;        /* links and the WhatsApp button */
  --pool-deep: #105862;
  --sea: #dde6e5;         /* map water */
  --land: #f4f0e8;        /* map land */

  --text: var(--iron);
  --text-muted: #5b5f57;
  --line: #d6cfc2;
  --field-line: #857d71;  /* 4:1 against white, visible form borders */
  --focus: var(--pool);
  --error: #a3261b;

  /* Type */
  --font-display: "Italiana", "Didot", "Bodoni 72", Georgia, serif;
  --font-body: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;

  /* Scale: perfect fourth (1.333), with larger display steps */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.333rem;
  --step-2: 1.777rem;
  --step-3: clamp(2rem, 1.5rem + 2vw, 2.5rem);
  --step-4: clamp(2.5rem, 1.4rem + 3.6vw, 4.25rem);
  --step-5: clamp(3.157rem, 1.6rem + 5.5vw, 6.25rem);

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --radius: 2px;
  --header-h: 4.5rem;
  --arch-gap: clamp(8px, 1.2vw, 14px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* header height plus room for the focus ring, so focused elements are never tucked under it */
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--chalk);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 400; }
h2 {
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 1.05;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h3 { font-size: var(--step-1); font-weight: 500; line-height: 1.3; }
p { margin: 0; }
p + p { margin-top: 1em; }

a { color: var(--pool); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--pool-deep); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.section-dark :focus-visible,
.site-footer :focus-visible,
.lightbox :focus-visible { outline-color: #f3f1ea; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--iron);
  color: var(--chalk);
}
.skip-link:focus { top: 1rem; color: var(--chalk); }

/* Placeholder marker, used only on the draft legal pages until details are filled in */
mark.tbc { background: #ffe68a; color: var(--iron); padding: 0 0.2em; border-radius: var(--radius); }

/* Buttons and links -------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--iron);
  border-radius: var(--radius);
  background: var(--iron);
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
  touch-action: manipulation;
}
.button:hover { background: var(--olive); border-color: var(--olive); color: #fff; }
.button-full { width: 100%; }
.button-wa { gap: 0.625rem; background: var(--pool); border-color: var(--pool); }
.button-wa:hover { background: var(--pool-deep); border-color: var(--pool-deep); }
.button-wa svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  color: var(--text);
  font-weight: 500;
}
.text-link:hover { color: var(--olive); }

.text-button {
  min-height: 2.75rem;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  color: var(--pool);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.text-button:hover { color: var(--pool-deep); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--chalk);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.625rem;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}
.brand-mark { flex: none; width: 2rem; height: 2rem; }
.wordmark:hover { color: var(--text); }

.site-nav ul { display: flex; align-items: center; gap: 2rem; }
.site-nav a:not(.nav-cta) {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease;
}
.site-nav a:not(.nav-cta):hover,
.site-nav a[aria-current="true"] { border-bottom-color: currentColor; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--iron);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}
.nav-cta:hover { background: var(--iron); color: var(--chalk); }

.lang-switch { display: flex; gap: 0.125rem; margin-left: -0.5rem; }
.site-nav .lang-switch a {
  display: inline-grid;
  place-items: center;
  min-width: 2.25rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  color: var(--text-muted);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-decoration: none;
}
.site-nav .lang-switch a:hover { color: var(--text); }
.site-nav .lang-switch a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 0.35em; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before {
  display: block;
  width: 1.375rem;
  height: 1px;
  background: currentColor;
  transition: transform 200ms var(--ease-out);
}
.nav-toggle-bars { position: relative; transform: translateY(-3px); }
.nav-toggle-bars::before { content: ""; position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(-6px) rotate(-90deg); }

@media (max-width: 1060px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto; /* phones in landscape can still reach every link */
    background: var(--chalk);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
  }
  .site-nav:not(.is-open) { display: none; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a:not(.nav-cta) { display: block; padding-block: 0.875rem; border-bottom: 1px solid var(--line); }
  .nav-cta { width: 100%; min-height: 3rem; margin-top: 1.25rem; }
  .lang-switch { justify-content: center; gap: 0.5rem; margin: 1rem 0 0; }
  .site-nav .lang-switch a { border-bottom: 0; }
}

/* Hero ------------------------------------------------------------------- */
.hero { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--step-5);
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin-left: -0.03em; /* optical alignment of the V */
  text-wrap: balance;
}

.hero-lede {
  max-width: 34rem;
  margin-top: 1.75rem;
  font-size: var(--step-1);
  line-height: 1.5;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 3rem;
  max-width: 30rem;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.facts dt { font-size: var(--step--1); color: var(--text-muted); }
.facts dd { margin: 0.25rem 0 0; font-size: var(--step-1); font-weight: 400; line-height: 1.2; font-variant-numeric: lining-nums; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: 2.5rem;
}

/* The arch: the villa's black steel doorways, used twice on the page */
.arch {
  position: relative;
  border-radius: 999px 999px 0 0;
  outline: 1px solid var(--iron);
  outline-offset: var(--arch-gap);
}
.arch img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.arch-hero {
  aspect-ratio: 5 / 7;
  /* sized by viewport height so the whole doorway fits above the fold */
  height: min(48rem, calc(100vh - var(--header-h) - 7rem));
  height: min(48rem, calc(100svh - var(--header-h) - 7rem));
  width: auto;
  max-width: calc(100% - 2 * var(--arch-gap));
  justify-self: end;
  margin: var(--arch-gap);
}
.arch-hero img { object-position: 28% 50%; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .arch-hero {
    order: -1;
    justify-self: center;
    height: auto;
    width: min(100% - 2 * var(--arch-gap), 22rem);
    /* never taller than a landscape phone screen */
    width: min(100% - 2 * var(--arch-gap), 22rem, (100svh - var(--header-h) - 5rem) * 5 / 7);
  }
}

/* Load moment: the only automatic motion on the page. The photo is visible at once (fast LCP). */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-copy > * { opacity: 0; }
  .is-loaded .hero-copy > * { animation: rise 900ms var(--ease-out) both; }
  .is-loaded .hero-copy > :nth-child(2) { animation-delay: 120ms; }
  .is-loaded .hero-copy > :nth-child(3) { animation-delay: 220ms; }
  .is-loaded .hero-copy > :nth-child(4) { animation-delay: 320ms; }
  .is-loaded .arch-hero img { animation: settle 2200ms var(--ease-out) both; }

  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }
}

/* Full-width photo bands ---------------------------------------------------- */
.bleed img {
  width: 100%;
  height: min(80vh, 52rem);
  height: min(80svh, 52rem);
  object-fit: cover;
}
@media (max-width: 860px) {
  .bleed img { height: 60vh; height: 60svh; }
}

/* Sections --------------------------------------------------------------- */
.section { padding-block: var(--section); }
.section-tinted { background: var(--travertine); }
.section-dark { background: var(--olive); color: #f3f1ea; }
.section-dark a { color: #fff; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

/* The villa -------------------------------------------------------------- */
.intro { max-width: 48rem; }
.intro p { max-width: 38rem; margin-top: 1.5rem; font-size: var(--step-1); line-height: 1.55; }

.space {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  margin-top: clamp(4rem, 9vw, 8rem);
}
.space-reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.space-reverse .space-media { order: 2; }
.space-copy { max-width: 28rem; }
.space-copy h3 { font-family: var(--font-display); font-size: var(--step-3); font-weight: 400; line-height: 1.1; }
.space-copy p { margin-top: 1.25rem; }

.space-media:not(.arch) img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

.arch-small {
  aspect-ratio: 4 / 5;
  width: min(100% - 2 * var(--arch-gap), 26rem);
  justify-self: center;
}
.arch-small img { object-position: 62% 50%; }

.amenities {
  margin-top: clamp(4rem, 9vw, 8rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.amenities.good-to-know,
.amenities.rates { margin-top: 3rem; }
.rate-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem 2rem;
  margin-top: 1.5rem;
}
.rate-list dt { color: var(--text-muted); font-size: var(--step--1); }
.rate-list dd { margin: 0.25rem 0 0; font-size: var(--step-1); }
.rate-note { margin-top: 1.5rem; max-width: 42rem; color: var(--text-muted); font-size: var(--step--1); }
.amenities ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem 2rem;
  margin-top: 1.5rem;
}
.amenities li { position: relative; padding-left: 1.25rem; }
.amenities li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 0.5rem; height: 1px;
  background: var(--iron);
}

@media (max-width: 860px) {
  .space, .space-reverse { grid-template-columns: 1fr; gap: 1.75rem; }
  .space-reverse .space-media { order: 0; }
}

/* Gallery ---------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 0 1.75rem; }
.filter {
  min-height: 2.75rem;
  padding: 0.5rem 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--iron); }

/* Phones: a single flowing column keeps each photo's own shape */
/* One even grid at every size, so rows always line up. Masonry staggered the
   columns on phones; the lightbox is where a photo gets looked at properly,
   so a uniform crop in the grid costs nothing. */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.gallery li { margin: 0; }
.gallery li[hidden] { display: none; }
.g-open { aspect-ratio: 1 / 1; }
.g-open img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 861px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .g-open { aspect-ratio: 4 / 3; }
}
@media (min-width: 1400px) {
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.g-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #d9d1c3;
  overflow: hidden;
  cursor: zoom-in;
}
.g-open img { width: 100%; transition: transform 500ms var(--ease-out); }
.g-open:hover img { transform: scale(1.03); }
.g-open:focus-visible { outline-offset: 4px; }

/* Split layouts (location, services) --------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
}
.split-reverse .split-media { order: -1; }
.split-copy > p { max-width: 34rem; margin-top: 1.5rem; }
.split-media img { width: 100%; border-radius: var(--radius); }

.distances { max-width: 34rem; margin: 2.5rem 0 0; }
.distances div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.875rem;
  border-bottom: 1px solid var(--line);
}
.distances div:first-child { border-top: 1px solid var(--line); }
.distances dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.services { display: grid; gap: 1.75rem; max-width: 34rem; margin-top: 2.75rem; }
.services li { padding-top: 1.25rem; border-top: 1px solid rgba(243, 241, 234, 0.3); }
.services h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 400; line-height: 1.15; }
.services p { margin-top: 0.375rem; color: rgba(243, 241, 234, 0.85); }

.section-dark .split-media img { aspect-ratio: 4 / 5; object-fit: cover; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-reverse .split-media { order: 0; }
  .section-dark .split-media img { aspect-ratio: 4 / 3; }
}

/* Guest reviews ---------------------------------------------------------- */
.reviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.review { display: grid; align-content: start; gap: 1rem; }
.review blockquote { margin: 0; font-size: var(--step-1); line-height: 1.5; }
.review-name { color: var(--text-muted); font-size: var(--step--1); }
.review-stars { display: flex; gap: 0.25rem; }
.review-stars svg { width: 0.9375rem; height: 0.9375rem; fill: var(--olive); }

@media (max-width: 860px) {
  .reviews { grid-template-columns: 1fr; }
}

/* Location map and drive times ----------------------------------------- */
.split-map { align-items: start; }
/* long heading in a half-width column: one step smaller so it doesn't run to six lines */
.split-map h2 { font-size: clamp(2.25rem, 1.4rem + 2.4vw, 3.25rem); }
.map-panel { display: grid; gap: 1rem; min-width: 0; }

.area-map {
  position: relative;
  container-type: inline-size; /* lets the labels adapt to the map's own width */
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sea);
}
.area-map-svg {
  --k: 1.9; /* map units per screen pixel; the script updates it while zooming so lines and dots keep their size */
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
}
.m-sea { fill: var(--sea); }
.m-land { fill: var(--land); stroke: var(--land); stroke-width: calc(1 * var(--k)); stroke-linejoin: round; }
.m-golf { fill: #dfe4d3; }
.m-road { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.m-road-secondary { stroke: #e0d8c9; stroke-width: calc(0.8 * var(--k)); }
.m-road-primary { stroke: #cdc2ad; stroke-width: calc(1.2 * var(--k)); }
.m-road-region { stroke: #cdc2ad; stroke-width: calc(1.3 * var(--k)); }
.m-route { fill: none; stroke: var(--pool); stroke-width: calc(2.6 * var(--k)); stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.m-route.is-active { opacity: 1; }
.m-estate { fill: rgba(63, 74, 54, 0.16); stroke: var(--olive); stroke-width: calc(1.5 * var(--k)); }
.m-marker { fill: var(--pool); stroke: #fff; stroke-width: calc(1.5 * var(--k)); opacity: 0.5; transition: opacity 200ms ease; }
.m-marker.is-active { opacity: 1; }

/* Wide view for the airport route: the rest of the coast fades in, local labels give way to regional ones */
.m-land-region, .m-road-region { transition: opacity 450ms ease; }
.area-map:not(.is-region) .m-land-region,
.area-map:not(.is-region) .m-road-region { opacity: 0; }
.area-map:not(.is-region) .m-label[data-view="region"],
.area-map.is-region .m-label[data-view="local"] { display: none; }
/* In the wide view the estate sits near the left edge, so its tag leans right to stay inside the map */
.area-map.is-region .m-label-estate { transform: translate(-15%, calc(-100% - 6px)); }

.m-label {
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px));
  color: var(--text);
  font-size: 0.8125rem;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 3px var(--land), 0 0 3px var(--land), 0 0 6px var(--land);
}
.m-label--right { transform: translate(12px, -50%); }
.m-label--left { transform: translate(calc(-100% - 12px), -50%); }
.m-label--below { transform: translate(-50%, 10px); }
.m-label-dest { font-weight: 500; }
.m-label-dest.is-active { color: var(--pool-deep); }
.m-label-place { transform: translate(-50%, -50%); color: var(--text-muted); font-size: 0.75rem; }
.m-label-sea {
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 6.5em;
  white-space: normal;
  text-align: center;
  line-height: 1.1;
  color: #566867;
  font-family: var(--font-display);
  font-size: clamp(0.875rem, 0.6rem + 0.8vw, 1.25rem);
  letter-spacing: 0.02em;
  text-shadow: none;
}
.m-label-sea--end { transform: translate(-100%, -50%); }
.m-label-estate {
  transform: translate(-50%, calc(-100% - 6px));
  width: max-content;
  max-width: 8em; /* longer translations wrap instead of colliding with nearby town names */
  white-space: normal;
  text-align: center;
  line-height: 1.15;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  background: var(--olive);
  color: #f3f1ea;
  font-weight: 500;
  text-shadow: none;
}

/* Small phones: drop secondary labels so the ones that matter never collide or spill off the map */
@container (max-width: 330px) {
  .m-label { font-size: 0.75rem; }
  .m-label-place,
  .m-label-estate { display: none; }
  .m-label[data-label="sainte_maxime"] { transform: translate(-50%, calc(-100% - 10px)); }
}

.map-caption { font-size: var(--step--1); color: var(--text-muted); }
.map-credit { margin-top: -0.5rem; font-size: 0.8125rem; color: var(--text-muted); }
.map-credit a { color: inherit; }
.drive-title { margin-top: 1rem; }

.routes { border-top: 1px solid var(--line); }
.route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 4.5rem;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.route:hover { background: rgba(30, 33, 29, 0.04); }
.route[aria-pressed="true"] { background: var(--travertine); box-shadow: inset 3px 0 0 var(--pool); }
.route-time { font-weight: 500; font-variant-numeric: tabular-nums; }
.route-km { color: var(--text-muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; text-align: right; }
.route-live { font-size: var(--step--1); }

@media (max-width: 400px) {
  .route { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.125rem; }
  .route-name { grid-column: 1 / -1; }
  .route-km { text-align: left; }
}

/* Enquiry: WhatsApp message builder ------------------------------------ */
.enquire-head { max-width: 40rem; }
.enquire-head > p { margin-top: 1.25rem; }
.enquire-head > .contact-direct { color: var(--text-muted); font-size: var(--step--1); }

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.composer-steps { display: grid; gap: 2.5rem; }

.step { display: grid; gap: 1rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.step legend { padding: 0; margin-bottom: 1rem; font-size: var(--step-1); font-weight: 500; }
.step-note { font-size: var(--step--1); color: var(--text-muted); }
.step-note.is-warning { color: var(--error); font-weight: 500; }

.field { display: grid; gap: 0.375rem; align-content: start; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

label { font-size: var(--step--1); font-weight: 500; }
.optional { font-weight: 400; color: var(--text-muted); }

input, select, textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--chalk);
  font-size: 1rem; /* 16px keeps iOS from zooming in on focus */
  transition: border-color 150ms ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--iron); }
input:focus-visible, select:focus-visible { outline-offset: 0; border-color: var(--focus); }
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.field-help { font-size: var(--step--1); color: var(--text-muted); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem;
  border: 1px solid var(--iron);
  border-radius: 1.5rem;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.chip:hover { background: rgba(30, 33, 29, 0.06); }
.chip[aria-pressed="true"] { background: var(--iron); color: var(--chalk); }
.chip[aria-pressed="true"]::before {
  content: "\2713\00a0";
  content: "\2713\00a0" / ""; /* decorative: aria-pressed already announces the state */
}

.composer-preview { display: grid; gap: 0.875rem; }
@media (min-width: 861px) and (min-height: 800px) {
  .composer-preview { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

.wa-card { overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: var(--travertine); }
.wa-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--olive);
  color: #f3f1ea;
}
.wa-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem; height: 2.25rem;
  border-radius: 999px;
  background: #f3f1ea;
}
.wa-avatar svg { width: 1.375rem; height: 1.375rem; fill: none; stroke: var(--olive); stroke-width: 5; }
.wa-avatar img { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; }
.wa-name { display: block; font-weight: 500; line-height: 1.2; }
.wa-status { display: block; font-size: 0.8125rem; opacity: 0.85; }
.wa-body { padding: 1.25rem 1rem 1.25rem 2.5rem; }

.wa-bubble {
  display: block;
  min-height: 13rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--field-line);
  border-radius: 4px;
  background: #fff;
  line-height: 1.5;
  resize: vertical;
}
.wa-bubble:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
}
.send-alt { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 2rem; }
.send-help { font-size: var(--step--1); color: var(--text-muted); text-align: center; }

@media (max-width: 860px) {
  .composer { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
}

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--iron); color: #d9d6cf; padding-block: clamp(3rem, 6vw, 5rem) 2rem; }
.site-footer a { color: #d9d6cf; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .wordmark { color: #fff; font-size: 2rem; }

.footer-inner { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2.5rem; }
.footer-brand p + p { max-width: 26rem; margin-top: 1rem; }
.footer-seal { display: block; width: clamp(92px, 11vw, 120px); height: auto; margin-bottom: 1.25rem; }
.footer-nav ul { display: grid; gap: 0.25rem; justify-items: start; }
.footer-nav a { display: inline-block; padding-block: 0.5rem; }
.footer-legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(217, 214, 207, 0.2);
  font-size: var(--step--1);
}
.legal-links { display: flex; gap: 1.5rem; }
.legal-links a { display: inline-block; padding-block: 0.5rem; }

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* Language chooser (site root) --------------------------------------------- */
.chooser { display: grid; min-height: 100vh; min-height: 100dvh; place-items: center; }
.chooser-inner { display: grid; justify-items: center; gap: 2rem; padding: 2rem; }
.chooser .wordmark { font-size: var(--step-4); }
.chooser-logo { width: min(420px, 88vw); height: auto; }
.chooser-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2rem; }
.chooser-langs a { display: inline-block; padding-block: 0.5rem; color: var(--text); font-size: var(--step-1); }

/* Legal pages ------------------------------------------------------------ */
.legal-page .site-header { position: static; }
.legal-inner { max-width: 44rem; }
.legal h1 { font-family: var(--font-display); font-size: var(--step-4); line-height: 1.05; }
.legal h2 { margin-top: 2.5rem; font-family: var(--font-body); font-size: var(--step-1); font-weight: 500; line-height: 1.3; }
.legal p { margin-top: 0.75rem; }
.legal-note { color: var(--text-muted); font-size: var(--step--1); }

/* Mobile and tablet: centred text wherever the layout is a single column.
   Forms, the distance table and route list stay left/right aligned so they remain easy to scan. */
@media (max-width: 860px) {
  .hero-copy,
  .intro,
  .space-copy,
  .amenities,
  .section-head,
  .split-copy,
  .enquire-head,
  .review,
  .map-caption,
  .map-credit,
  .drive-title,
  .route-live,
  .map-panel > .field-help,
  .footer-brand,
  .footer-nav,
  .footer-legal { text-align: center; }
  .footer-seal { margin-inline: auto; }

  .hero-lede,
  .facts,
  .intro p,
  .space-copy,
  .split-copy > p,
  .services,
  .enquire-head,
  .footer-brand p + p { margin-inline: auto; }

  .hero-title { margin-left: 0; }
  .hero-actions,
  .review-stars,
  .filters,
  .section-head,
  .footer-legal,
  .legal-links { justify-content: center; }

  .amenities li { padding-left: 0; }
  .amenities li::before { display: none; }

  .distances { margin-inline: auto; text-align: left; }
  .footer-nav ul { justify-items: center; }
}

/* Floating prompt to the enquiry form ------------------------------------ */
.cta-bar {
  position: fixed;
  z-index: 35;
  left: 1rem;
  right: 1rem;
  bottom: clamp(1rem, 3vw, 2rem);
  /* left/right plus auto margins centre it and, unlike left: 50%, leave the
     bar the full width of the screen to lay its text out in */
  margin-inline: auto;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: calc(100% - 2rem);
  padding: 0.625rem 0.625rem 0.625rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chalk);
  box-shadow: 0 6px 24px rgba(30, 33, 29, 0.12);
}
.cta-bar[hidden] { display: none; }
.cta-bar p { font-size: var(--step--1); white-space: nowrap; }
.cta-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem; height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}
.cta-close:hover { background: rgba(30, 33, 29, 0.06); color: var(--text); }
.cta-close svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

@media (prefers-reduced-motion: no-preference) {
  .cta-bar { transition: opacity 250ms ease, transform 250ms var(--ease-out); }
  .cta-bar.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
}
@media (max-width: 520px) {
  /* on a phone the button says it on its own: the sentence would only make
     the pill two lines tall */
  .cta-bar { gap: 0.25rem; padding: 0.5rem 0.5rem 0.5rem 0.75rem; }
  .cta-bar p { display: none; }
  .cta-close { width: 2.75rem; height: 2.75rem; }
}

/* Language offer ---------------------------------------------------------- */
.lang-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  padding: 0.75rem var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--travertine);
  font-size: var(--step--1);
}
.lang-offer[hidden] { display: none; }
.lang-offer p { margin: 0; }
.lang-offer-others { display: flex; flex-wrap: wrap; gap: 1rem; }
.lang-offer-others a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;          /* a finger, not a hairline */
  color: var(--text-muted);
  text-underline-offset: 0.2em;
}
.lang-offer-others a:hover { color: var(--text); }
.lang-offer-close {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  margin-inline-start: auto;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}
.lang-offer-close:hover { background: rgba(30, 33, 29, 0.06); color: var(--text); }
.lang-offer-close svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@media (max-width: 860px) {
  .lang-offer { justify-content: center; text-align: center; }
  .lang-offer-close { margin-inline-start: 0; }
}

@media (max-width: 860px) {
  /* Centring suits a headline and a two-line lead. Over about four lines the eye
     loses the start of each line, so the long copy reads left-aligned. */
  .space-copy p,
  .split-copy p,
  .intro p,
  .hero-copy p,
  .review p,
  .enquire-head p { text-align: left; }
  .map-panel p,
  .rate-note,
  .section-head p { text-align: center; }
}

/* Lightbox --------------------------------------------------------------- */
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 22, 19, 0.96);
  color: #f3f1ea;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; }

.lightbox-figure {
  display: grid;
  justify-items: center;
  gap: 1rem;
  max-width: 100%;
  max-height: 100%;
  padding: 4.5rem 5rem 2rem;
}
.lightbox-figure img {
  width: auto;
  max-width: min(100%, 1600px);
  max-height: calc(100vh - 9rem);
  max-height: calc(100dvh - 9rem);
  object-fit: contain;
  transition: opacity 200ms ease;
}
.lightbox-figure img.is-loading { opacity: 0; }
.lightbox-figure figcaption { font-size: var(--step--1); text-align: center; }

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3rem; height: 3rem;
  border: 1px solid rgba(243, 241, 234, 0.45);
  border-radius: 999px;
  background: rgba(20, 22, 19, 0.5);
  color: #f3f1ea;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.lb-btn:hover { background: rgba(243, 241, 234, 0.15); }
.lb-btn svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lb-next { right: 1rem; top: 50%; translate: 0 -50%; }

@media (max-width: 640px) {
  .lightbox-figure { padding: 4.5rem 0.75rem 5.5rem; }
  .lightbox-figure img { max-height: calc(100vh - 12.5rem); max-height: calc(100dvh - 12.5rem); }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; translate: none; }
  .lb-prev { left: calc(50% - 3.5rem); }
  .lb-next { right: calc(50% - 3.5rem); }
}
@media (max-height: 500px) {
  .lightbox-figure { padding: 1rem 4.5rem; }
  .lightbox-figure img { max-height: calc(100vh - 4.5rem); max-height: calc(100dvh - 4.5rem); }
  .lb-prev, .lb-next { top: 50%; bottom: auto; translate: 0 -50%; }
  .lb-prev { left: 1rem; }
  .lb-next { right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
