/* ==========================================================================
   Interior pages — shared furniture plus the per-page blocks.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page title block ("— Title" artboards)
   -------------------------------------------------------------------------- */

.page-hero { padding-block: 110px 0; }
.page-hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 7vw, 54px);
  line-height: 1.1;
  max-width: 760px;
  margin: 0;
  text-wrap: pretty;
}
.page-hero__lede {
  font-size: 17px;
  line-height: 1.75;
  color: var(--slate);
  max-width: 640px;
  margin: 26px 0 0;
}
.page-hero__figure { margin: 80px auto 0; }
.page-hero__caption { margin-top: 14px; }

.frame--page { height: 520px; }

/* Generic section padding for interior pages */
.page-section { padding: 90px 0 0; }
.page-section--last { padding-bottom: 150px; }

/* --------------------------------------------------------------------------
   Document layout — Club rules, Legal.
   Sticky "on this page" rail beside a single measured column.
   -------------------------------------------------------------------------- */

/* The contents rail jumps within the page, so ease those jumps. */
html:has(.doc) { scroll-behavior: smooth; }

.doc {
  display: grid;
  grid-template-columns: 240px 680px;
  gap: 100px;
  max-width: var(--page);
  margin-inline: auto;
  padding: 110px var(--gutter) 150px;
}
.doc__rail { position: sticky; top: 150px; }
.doc__rail-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 20px;
}
.doc__toc { display: flex; flex-direction: column; gap: 14px; margin-bottom: 34px; }
.doc__toc a {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.25;
  color: var(--marine);
  opacity: .55;
  transition: opacity .35s ease;
}
.doc__toc a:hover, .doc__toc a.is-active { opacity: 1; color: var(--marine); }

.doc__aside { border-top: 1px solid var(--stone); padding-top: 24px; }
.doc__aside p { font-size: 15px; line-height: 1.7; color: var(--slate); margin: 0 0 16px; }

.doc__body > h1 { margin: 0 0 30px; }
.doc__body > p { font-size: 17px; line-height: 1.75; color: var(--slate); margin: 0 0 20px; }

.doc__section { border-top: 1px solid var(--stone); padding-top: 44px; margin-top: 54px; }
.doc__section > h2 { margin: 0 0 8px; }
.doc__section > h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  margin: 34px 0 10px;
}
.doc__section > p { font-size: 17px; line-height: 1.75; color: var(--slate); margin: 0 0 18px; }

/* Numbered rules — the 64px number column from the canvas */
.doc__section ol { list-style: none; counter-reset: none; margin: 0; padding: 0; }
.doc__section ol li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0 28px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(201, 188, 168, .5);
  font-size: 17px;
  line-height: 1.75;
  color: var(--slate);
}
.doc__section ol li::before {
  content: counter(rules);
  counter-increment: rules;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--coral);
  line-height: 1.5;
}
.doc__body { counter-reset: rules; }

/* --------------------------------------------------------------------------
   Food and drink — menus
   -------------------------------------------------------------------------- */

.menus { padding-block: 100px 150px; }
.menu { border-top: 1px solid var(--stone); padding: 44px 0 10px; }
.menu__head { display: grid; grid-template-columns: 240px 1fr; gap: 100px; align-items: start; }
.menu__head h2 { margin: 0; }
.menu__note { font-size: 15px; line-height: 1.7; color: var(--slate); margin: 10px 0 0; }
.menu__items { margin: 0; padding: 0; list-style: none; }
.menu__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid rgba(201, 188, 168, .5);
}
.menu__row:last-child { border-bottom: 0; }
.menu__dish { font-family: var(--serif); font-size: 22px; line-height: 1.25; color: var(--marine); }
.menu__desc { font-size: 15px; line-height: 1.7; color: var(--slate); margin-top: 4px; }
.menu__price { font-family: var(--serif); font-size: 20px; color: var(--taupe); white-space: nowrap; }

.menus__footnote {
  max-width: 680px;
  margin: 60px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--slate);
}

/* --------------------------------------------------------------------------
   Events
   -------------------------------------------------------------------------- */

.events { padding-block: 100px 150px; }
.events__group { border-top: 1px solid var(--stone); padding-top: 44px; margin-top: 54px; }
.events__group > h2 { margin: 0 0 30px; }

.event {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 44px;
  padding: 34px 0;
  border-bottom: 1px solid rgba(201, 188, 168, .5);
  align-items: start;
}
.event__when { font-family: var(--serif); font-size: 22px; line-height: 1.3; color: var(--marine); }
.event__time { display: block; font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--coral); margin-bottom: 6px; }
.event__title { margin: 0 0 10px; }
.event__body { font-size: 17px; line-height: 1.75; color: var(--slate); margin: 0; max-width: 620px; }
.event--past { opacity: .62; }

.empty-state {
  border: 1px solid var(--stone);
  padding: 44px 40px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--slate);
  max-width: 680px;
}

/* --------------------------------------------------------------------------
   Villas
   -------------------------------------------------------------------------- */

.villas { padding-block: 90px 150px; }
.villas__filter {
  display: flex; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
  padding: 18px 0;
  margin-bottom: 10px;
}
.villas__filter button {
  background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-weight: 500; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--taupe);
  padding: 8px 12px;
}
.villas__filter button:hover { color: var(--marine); }
.villas__filter button.is-active { color: var(--shell); background: var(--marine); border-radius: 2px; }
.villas__filter button[disabled] { opacity: .3; cursor: default; }

.villas__list { columns: 3; column-gap: 60px; margin-top: 26px; }
.villa {
  break-inside: avoid;
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid rgba(201, 188, 168, .5);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.3;
  color: var(--marine);
}
.villas__none { padding-block: 40px; color: var(--slate); }

.villas__footnote {
  max-width: 680px;
  margin: 60px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--slate);
}

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */

.gallery { padding-block: 80px 150px; }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gallery__item {
  position: relative; display: block;
  background: var(--shell-3);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 0; padding: 0; cursor: zoom-in;
}
.gallery__item img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.gallery__item:hover img { transform: scale(1.035); }
.gallery__item { opacity: 1; transition: opacity .35s ease; }
.lightbox:not([hidden]) ~ * .gallery__item,
.gallery__grid:has(.gallery__item.is-active) .gallery__item { opacity: .45; }
.gallery__grid .gallery__item.is-active { opacity: 1; }

/* The lightbox appears instantly by design — no fade, no scale. */
.lightbox {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(18, 36, 46, .97);
  display: flex; align-items: center; justify-content: center;
  padding: 110px 140px;
}
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; margin: 0 auto; }
.lightbox__caption {
  position: absolute; inset: auto 0 46px 0;
  text-align: center;
  font-family: var(--sans); font-weight: 500; font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--on-marine-faint);
}
.lightbox button {
  position: absolute;
  background: none; border: 0; cursor: pointer;
  color: var(--on-marine);
  font-family: var(--sans); font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase;
  padding: 14px 18px;
}
.lightbox__close { top: 26px; right: 26px; }
.lightbox__prev { left: 18px; top: 50%; transform: translateY(-50%); font-size: 28px; }
.lightbox__next { right: 18px; top: 50%; transform: translateY(-50%); font-size: 28px; }

/* --------------------------------------------------------------------------
   Forms — Contact and Register
   -------------------------------------------------------------------------- */

.form-panel {
  background: #FDFBF7;
  padding: 72px 80px;
  margin-top: 54px;
}
.form-panel__group { margin-bottom: 44px; }
.form-panel__group:last-child { margin-bottom: 0; }

.form-legend {
  font-family: var(--sans); font-weight: 500; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 16px;
}

.choice { display: flex; flex-wrap: wrap; gap: 10px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  font-family: var(--sans); font-weight: 500; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase;
  padding: 12px 20px;
  border: 1px solid var(--stone);
  border-radius: 2px;
  cursor: pointer;
  color: var(--marine);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.choice label:hover { border-color: var(--marine); }
.choice input:checked + label { background: var(--marine); border-color: var(--marine); color: var(--shell); }
.choice input:focus-visible + label { outline: 2px solid var(--coral); outline-offset: 2px; }

.field__hint { font-size: 13px; line-height: 1.6; color: var(--slate); margin: 2px 0 4px; }
.field__req { color: var(--coral); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }

.form-note { font-size: 15px; line-height: 1.75; color: var(--slate); margin: 0 0 24px; }

.notice {
  background: var(--seaglass);
  padding: 26px 32px;
  margin-bottom: 34px;
}
.notice__title { font-family: var(--serif); font-size: 22px; line-height: 1.25; margin-bottom: 4px; }
.notice p { font-size: 15px; line-height: 1.7; margin: 0; color: var(--marine); }
.notice--warn { background: #F6E7E0; }

.form-errors { border-left: 3px solid var(--coral); padding: 4px 0 4px 20px; margin-bottom: 30px; }
.form-errors ul { margin: 0; padding-left: 18px; }
.form-errors li { font-size: 15px; line-height: 1.7; color: var(--marine); }

/* --------------------------------------------------------------------------
   Contact — details beside the map, form full width beneath
   -------------------------------------------------------------------------- */

.contact-page { padding-block: 110px 150px; }
.contact-page > .page-hero__title { margin-bottom: 60px; }

.contact__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 110px;
  align-items: start;
  margin-bottom: 96px;
}

.cdetail { padding: 24px 0; }
.cdetail__label {
  font-family: var(--sans); font-weight: 500; font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--taupe); margin-bottom: 10px;
}
.cdetail__value {
  font-family: var(--serif); font-weight: 400;
  font-size: 26px; line-height: 1.25;
  color: var(--marine);
  border-bottom: 1px solid rgba(18, 36, 46, .25);
  padding-bottom: 2px;
}
.cdetail__value:hover { color: var(--coral); border-bottom-color: var(--coral); }
.cdetail__text { font-size: 17px; line-height: 1.85; color: var(--marine); margin: 0; }

.contact__map-wrap { margin: 0; }
.contact__map {
  position: relative;
  height: 520px;
  background: var(--shell-3);
  overflow: hidden;
}
.contact__map--empty {
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 32px;
  border: 1px solid var(--stone); background: transparent;
}
.contact__map-note { font-size: 15px; line-height: 1.7; color: var(--slate); margin: 0 0 18px; }
.contact__map-caption { margin-top: 14px; }

/* Mapbox sits inside the palette rather than shouting over it. */
.contact__map .mapboxgl-ctrl-group { border-radius: 2px; box-shadow: 0 0 0 1px rgba(18, 36, 46, .12); }
.contact__map .mapboxgl-ctrl-bottom-left,
.contact__map .mapboxgl-ctrl-bottom-right { font-family: var(--sans); }
.contact__map .mapboxgl-ctrl-attrib { font-size: 10px; }

.slebc-pin {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--coral);
  border: 3px solid var(--shell);
  box-shadow: 0 2px 10px rgba(18, 36, 46, .35);
}

.contact__form-col { max-width: 680px; }
.contact__form-col > .h2 { margin-bottom: 34px; }
.contact__form { margin-top: 10px; }
.contact__form .field { margin-bottom: 34px; }
.contact__thanks { border-top: 1px solid var(--stone); padding-top: 40px; }
.contact__thanks p { font-size: 17px; line-height: 1.75; color: var(--slate); margin: 0 0 30px; }

/* Success panel */
.success { max-width: 680px; }
.success h1 { margin-bottom: 20px; }
.success p { font-size: 17px; line-height: 1.75; color: var(--slate); margin: 0 0 30px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .doc { grid-template-columns: 200px 1fr; gap: 60px; }
  .menu__head { grid-template-columns: 180px 1fr; gap: 50px; }
  .split__row { gap: 56px; }
  .villas__list { columns: 2; column-gap: 44px; }
  .frame--page { height: 42vw; max-height: 520px; }
  .form-panel { padding: 54px 46px; }
  .contact__top { gap: 60px; }
}

@media (max-width: 920px) {
  .page-hero { padding-top: 64px; }
  .page-hero__figure { margin-top: 40px; }
  .frame--page { height: 56vw; min-height: 240px; }
  .page-section { padding-top: 56px; }
  .page-section--last { padding-bottom: 72px; }

  /* Document pages: the rail stops being sticky and the TOC leads the page */
  .doc { grid-template-columns: 1fr; gap: 34px; padding: 64px var(--gutter) 72px; }
  .doc__rail { position: static; top: auto; }
  .doc__toc { flex-direction: row; flex-wrap: wrap; gap: 10px 22px; }
  .doc__toc a { font-size: 17px; opacity: 1; }
  .doc__section ol li { grid-template-columns: 40px 1fr; gap: 0 16px; padding: 20px 0; }

  .menus { padding-block: 56px 72px; }
  .menu__head { grid-template-columns: 1fr; gap: 18px; }

  .events { padding-block: 56px 72px; }
  .event { grid-template-columns: 1fr; gap: 14px; padding: 26px 0; }

  .split { padding-block: 56px 72px; }
  .split__row { grid-template-columns: 1fr; gap: 34px; padding-top: 40px; margin-top: 40px; }
  .split__row--flip .split__media { order: 0; }
  .facts li { grid-template-columns: 1fr; gap: 4px; }

  .villas { padding-block: 56px 72px; }
  .villas__list { columns: 1; }
  .villas__filter { gap: 2px; padding-block: 12px; }
  .villas__filter button { padding: 7px 9px; font-size: 11px; }

  .gallery { padding-block: 46px 72px; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .lightbox { padding: 80px 18px 108px; }

  .form-panel { padding: 34px 22px; margin-top: 34px; }
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .contact-page { padding-block: 64px 72px; }
  .contact-page > .page-hero__title { margin-bottom: 32px; }
  .contact__top { grid-template-columns: 1fr; gap: 44px; margin-bottom: 56px; }
  .contact__map { height: 62vw; min-height: 260px; }
  .cdetail__value { font-size: 22px; }
}

@media (max-width: 560px) {
  .gallery__grid { grid-template-columns: 1fr; }
  .choice label { padding: 11px 15px; font-size: 11px; }
}

/* OpenStreetMap fallback — muted to sit inside the palette rather than shout. */
.contact__map--osm .leaflet-tile-pane { filter: saturate(.5) contrast(.94) brightness(1.04); }
.contact__map--osm .leaflet-container { background: var(--shell-3); font-family: var(--sans); }
.contact__map--osm .leaflet-control-attribution { font-size: 10px; background: rgba(247, 243, 236, .82); }
.contact__map--osm .leaflet-bar a {
  border-radius: 0; color: var(--marine); border-bottom-color: var(--stone);
}
.contact__map--osm .slebc-pin { border-radius: 50%; }

/* --------------------------------------------------------------------------
   "Coming soon" panel — used where content isn't published yet
   -------------------------------------------------------------------------- */

.soon {
  border: 1px solid var(--stone);
  padding: 64px 60px;
  max-width: 760px;
}
.soon .eyebrow { margin-bottom: 18px; }
.soon .h2 { margin: 0 0 24px; }
.soon__body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--slate);
  margin: 0 0 16px;
  max-width: 560px;
}
.soon__body:last-child { margin-bottom: 0; }

@media (max-width: 920px) {
  .soon { padding: 40px 24px; }
}

/* --------------------------------------------------------------------------
   Tennis and golf — the artboard layout: image one side, facts the other
   -------------------------------------------------------------------------- */

.tg { padding-block: 110px 0; }
.tg--golf { padding-block: 130px 150px; }

.tg__row {
  display: grid;
  grid-template-columns: 46% 1fr;
  gap: 100px;
  align-items: start;
}
.tg__row--flip { grid-template-columns: 1fr 46%; }

.tg__media { margin: 0; }
.tg__caption { margin-top: 14px; }

.frame--tg { height: 560px; }

/* Waiting on photography — the slot still reads as part of the design. */
.frame__waiting {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 40px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--taupe);
}

.tg__copy { max-width: 560px; }
.tg__copy .h2 { margin: 0 0 22px; }
.tg__body { font-size: 17px; line-height: 1.75; color: var(--slate); margin: 0 0 34px; }

.tg__facts { margin: 0; display: grid; grid-template-columns: 170px 1fr; }
.tg__facts dt,
.tg__facts dd {
  border-top: 1px solid var(--stone);
  padding: 18px 0;
  margin: 0;
}
.tg__facts dt {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--taupe);
  padding-right: 20px;
}
.tg__facts dd { font-size: 16px; line-height: 1.6; color: var(--marine); }
.tg__facts dd a { border-bottom: 1px solid rgba(196, 98, 63, .4); }

@media (max-width: 1180px) {
  .tg__row, .tg__row--flip { gap: 56px; }
  .frame--tg { height: 46vw; max-height: 560px; }
}

@media (max-width: 920px) {
  .tg { padding-block: 56px 0; }
  .tg--golf { padding-block: 56px 72px; }
  .tg__row, .tg__row--flip { grid-template-columns: 1fr; gap: 34px; }
  /* Image first in both sections on a phone. */
  .tg__row--flip .tg__media { order: -1; }
  .frame--tg { height: 62vw; min-height: 260px; }
  .tg__copy { max-width: none; }
  .tg__facts { grid-template-columns: 1fr; }
  .tg__facts dt { padding: 16px 0 0; border-top: 1px solid var(--stone); }
  .tg__facts dd { padding: 4px 0 16px; border-top: 0; }
}

.event__place {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0 0 12px;
}
