/* =============================================
   THE CLUBHOUSE  (Figma 175:3668)
   ============================================= */

.sec-clubhouse {
  height: calc(100vh * 4);              /* stage + 3 viewports of pinned scroll (JS keeps exact) */
}

.sec-clubhouse .sec-canvas {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: calc(1080 * var(--dpx));
  transform: translateY(-50%);
  overflow: visible;                     /* the stage clips; the photo may extend past the canvas */
}

/* Rectangle 10 — full-bleed photo box; the photo covers it, centred */
.club-photo {
  position: absolute;
  left: 0;
  top: calc((1080 * var(--dpx) - 100vh) / 2);   /* covers the full 100vh stage, not just the canvas */
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
  background: var(--cream-dark);
}
.club-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 175:3670 — centred headline, top 84 */
.club-title {
  position: absolute;
  left: 0;
  right: 0;
  top: max(calc(84 * var(--dpx)), calc(var(--vis-top) + 24px));
  text-align: center;
  z-index: 2;
}

/* 175:3672 — card 670×833 @ 625,124 (final) */
.club-card {
  position: absolute;
  left: calc(625 * var(--dpx));
  top: calc(124 * var(--dpx));
  width: calc(670 * var(--dpx));
  height: calc(833 * var(--dpx));
  background: var(--cream);
  z-index: 3;
  overflow: hidden;
}
.club-card__title {
  position: absolute;
  left: 0;
  right: 0;
  top: max(calc(56 * var(--dpx)), calc(var(--vis-top) - 108 * var(--dpx)));   /* card top is 124 */
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: calc(64 * var(--dpx));
  line-height: calc(66 * var(--dpx));
  color: var(--gold);
  text-align: center;
  text-transform: none;
}
/* 175:3675 — 247×319 window @ 212,257 (the portal is clipped to exactly this box) */
.club-card__window {
  position: absolute;
  left: calc(202.5 * var(--dpx));       /* Figma's visible mask sits 9.5px left of frame 175:3675 */
  top: calc(257 * var(--dpx));
  width: calc(247 * var(--dpx));
  height: calc(319 * var(--dpx));
  background: var(--cream-dark);
}
/* 175:3674 — 611 wide, top 706 (4 lines → 31 above the card's bottom edge at 957) */
.club-card__text {
  position: absolute;
  left: 50%;
  bottom: max(calc(31 * var(--dpx)), calc(957 * var(--dpx) - var(--vis-bottom) + 16px));
  width: calc(611 * var(--dpx));
  margin: 0 0 0 calc(-305.5 * var(--dpx));
  font-family: var(--font-body);
  font-weight: 300;
  font-size: max(calc(16 * var(--dpx)), 12px);
  line-height: 1.5;
  letter-spacing: calc(0.8 * var(--dpx));
  color: var(--text-muted);
  text-align: center;
}

/* ---- portal + strip ---- */
.club-portal {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--cream);
  overflow: hidden;
  will-change: clip-path;
}
.club-strip {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(3840 * var(--dpx));
  height: calc(1080 * var(--dpx));
  display: flex;
  will-change: transform;
}
.club-panel {
  position: relative;
  flex: none;
  width: calc(1920 * var(--dpx));
  height: calc(1080 * var(--dpx));
  background: var(--cream);
  overflow: hidden;
}

.club-panel__title { position: absolute; margin: 0; }
/* 175:3681 — @133,94 */
.club-panel__title--a {
  left: calc(133 * var(--dpx));
  top: max(calc(94 * var(--dpx)), calc(var(--vis-top) + 24px));
}
/* 175:3703 — right edge 1820, top 867, 736 wide, right-aligned (2 lines → 49 above the canvas bottom) */
.club-panel__title--b {
  left: calc(1084 * var(--dpx));
  bottom: max(calc(49 * var(--dpx)), calc(1080 * var(--dpx) - var(--vis-bottom) + 20px));
  width: calc(736 * var(--dpx));
  text-align: right;
}

/* Panel B's list and photo start together; 24px below the visible band's top when the stage is short */
.club-panel--b { --b-top: max(calc(126 * var(--dpx)), calc(var(--vis-top) + 24px)); }

.club-panel__img {
  position: absolute;
  margin: 0;
  overflow: hidden;
  background: var(--cream-dark);
}
.club-panel__img img { position: absolute; display: block; max-width: none; transition: opacity 0.25s ease; }
.club-panel__title--b { transition: opacity 0.25s ease; }
/* 175:3682 — final box 1084×597 @ 400.5,311 (starts 599×331 @ 596.5,374); photo: centred cover */
.club-panel__img--a {
  left: calc(400.5 * var(--dpx));
  top: max(calc(311 * var(--dpx)), calc(var(--vis-top) + 24px + 188 * var(--dpx)));   /* stays 24 below the 2-line title */
  width: calc(1084 * var(--dpx));
  height: calc(597 * var(--dpx));
  transform-origin: 50% 50%;
  will-change: transform;
}
.club-panel__img--a img { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* 175:3689 — 1065×685 @ 783,126; photo: centred cover (the box height flexes, so the crop must not be pinned).
   The box gives up height, never the text: it ends 32 above the 2-line headline's clamped top. */
.club-panel__img--b {
  left: calc(783 * var(--dpx));
  top: var(--b-top);
  width: calc(1065 * var(--dpx));
  height: min(calc(685 * var(--dpx)), calc(var(--vis-bottom) - 20px - 196 * var(--dpx) - var(--b-top)));
}
.club-panel__img--b img { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* 175:3683 — 265 wide @ 1547,614, 14/21 tracking 0.7 */
.club-panel__text {
  position: absolute;
  left: calc(1547 * var(--dpx));
  bottom: max(calc(172 * var(--dpx)), calc(1080 * var(--dpx) - var(--vis-bottom) + 20px));   /* top 614, 14 lines */
  width: calc(265 * var(--dpx));
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: max(calc(14 * var(--dpx)), 11px);
  line-height: 1.5;
  letter-spacing: calc(0.7 * var(--dpx));
  color: var(--dark);
}

/* 175:3690 — list @194,126, 517 wide, gap 36 */
.club-list {
  position: absolute;
  left: calc(194 * var(--dpx));
  top: var(--b-top);
  width: calc(517 * var(--dpx));
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  /* 10 rows of 32; the gap closes up only when the visible band cannot hold the full list */
  gap: min(calc(36 * var(--dpx)), calc((var(--vis-bottom) - var(--vis-top) - 44px - 320 * var(--dpx)) / 9));
  font-family: var(--font-body);
  font-weight: 200;
  font-size: calc(25 * var(--dpx));
  line-height: 1.2;
  letter-spacing: calc(1.25 * var(--dpx));
  text-transform: uppercase;
  color: var(--dark);
  white-space: nowrap;
}
.club-list__icon {
  width: calc(32 * var(--dpx));
  height: calc(32 * var(--dpx));
  flex: none;
}

/* amenity tabs — click one to swap the photo + headline on the right */
.club-list__item {
  display: flex;
  align-items: center;
  gap: calc(14 * var(--dpx));
  cursor: pointer;
  transition: color 0.25s ease, font-weight 0.25s ease;
}
.club-list__item:hover:not(.is-active) { color: var(--gold); }
.club-list__item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
}
.club-list__item.is-active { font-weight: 400; }
.club-list__icon--tab {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.club-list__item.is-active .club-list__icon--tab {
  opacity: 1;
  transform: scale(1);
}

/* decorations: SWO mark bottom-left of panel A; column ornaments at the outer edges */
.club-mark {
  position: absolute;
  left: calc(-80 * var(--dpx));
  bottom: calc(-80 * var(--dpx));
  width: calc(258 * var(--dpx));
  height: calc(258 * var(--dpx));
  max-width: none;
  pointer-events: none;
}
.club-column {
  position: absolute;
  top: calc(178 * var(--dpx));
  width: calc(166 * var(--dpx));
  height: calc(901.5 * var(--dpx));
  max-width: none;
  pointer-events: none;
}
.club-column--right { left: calc(1837 * var(--dpx)); }
.club-column--left  { left: calc(-83 * var(--dpx)); }

/* ---- flow layout: below 992px or reduced motion (class set by JS) ---- */
.sec-clubhouse.is-flow { height: auto; }
.sec-clubhouse.is-flow .pin-stage { height: auto; overflow: visible; }
.sec-clubhouse.is-flow .sec-canvas {
  position: relative;
  top: auto;
  height: auto;
  transform: none;
  overflow: visible;
  padding-top: 64px;
  display: flex;
  flex-direction: column;
}
.sec-clubhouse.is-flow .club-title {
  position: relative;
  top: auto;
  order: -1;                              /* heading above the photo in the stacked layout */
  margin: 0 20px 32px;
}
.sec-clubhouse.is-flow .club-photo {
  position: relative;
  top: auto;
  height: auto;
  aspect-ratio: 16 / 9;
  transform: none;
}
.sec-clubhouse.is-flow .club-card {
  position: relative;
  left: auto;
  top: auto;
  width: min(100% - 40px, 670px);
  height: auto;
  margin: -48px auto 0;
  padding: 40px 24px 32px;
  transform: none;
}
.sec-clubhouse.is-flow .club-card__title {
  position: relative;
  top: auto;
  font-size: 2.25rem;
  line-height: 1.1;
  margin-bottom: 20px;
}
.sec-clubhouse.is-flow .club-card__window { display: none; }
.sec-clubhouse.is-flow .club-card__text {
  position: relative;
  left: auto;
  top: auto;
  bottom: auto;
  width: 100%;
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
}
.sec-clubhouse.is-flow .club-portal {
  position: relative;
  inset: auto;
  clip-path: none;
  overflow: visible;
}
.sec-clubhouse.is-flow .club-strip {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  transform: none;
}
.sec-clubhouse.is-flow .club-panel {
  width: 100%;
  height: auto;
  padding: 48px 20px;
}
.sec-clubhouse.is-flow .club-panel__title {
  position: relative;
  left: auto;
  top: auto;
  bottom: auto;
  width: 100%;
  text-align: left;
  margin-bottom: 24px;
}
.sec-clubhouse.is-flow .club-panel__title--b { text-align: right; margin-top: 24px; }
.sec-clubhouse.is-flow .club-panel__img {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 1084 / 597;
  transform: none;
}
.sec-clubhouse.is-flow .club-panel__img--b { aspect-ratio: 1065 / 685; }
.sec-clubhouse.is-flow .club-panel__text {
  position: relative;
  left: auto;
  top: auto;
  bottom: auto;
  width: 100%;
  margin-top: 24px;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
}
.sec-clubhouse.is-flow .club-list {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  margin-bottom: 24px;
  gap: 14px;
  font-size: 1rem;
  letter-spacing: 0.05em;
  white-space: normal;
}
.sec-clubhouse.is-flow .club-list__icon { width: 24px; height: 24px; }
.sec-clubhouse.is-flow .club-list__item { gap: 10px; }
.sec-clubhouse.is-flow .club-mark,
.sec-clubhouse.is-flow .club-column { display: none; }

@media (max-width: 767px) {
  .sec-clubhouse.is-flow .club-panel { padding: 40px 20px; }
}
