/* ============================================================
   Memberships page — page-specific flourishes only.
   Builds entirely on the v4 shared kit in styles.css.
   ============================================================ */

/* Pastel ribbon colour for the flowing section dividers (meadow mix) +
   matching meadow bubble palette */
:root {
  --flow-accent: linear-gradient(90deg, var(--sage) 0%, var(--teal) 55%, var(--sky) 100%);
  --bub-1: var(--sage); --bub-2: var(--teal); --bub-3: var(--sky); --bub-4: var(--sun);
  /* section-rhythm washes — warm gold into meadow sage */
  --wash-1: #fbf0d2;  /* pale gold */
  --wash-2: #e7f0e0;  /* pale sage */
}

/* ---- Hero: same recipe as Fusion — a single signature tile (sparkles)
     repeated over a warm gold→peach gradient. Members feel like a glowing
     club, but the skeleton matches the rest of the site. ---- */
.page-hero.ph--member {
  background:
    url("../../img/sparkle-tile-v2.svg") center / 132px repeat,
    linear-gradient(180deg, #FFEAB3 0%, #F8D38E 58%, var(--base) 100%);
  padding-bottom: clamp(5.5rem, 4vw + 4rem, 7.5rem);
}
.ph--member .container {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 760px) {
  .ph--member .container { grid-template-columns: 1fr auto; }
}
/* Warm-gold partner-tag eyebrow */
.ph--member .partner-tag {
  background: rgba(255,255,255,0.85);
  color: #7a4a14;
  border: 1px solid rgba(176,122,47,0.30);
}

/* Hero sticker sits above the art, angled for playfulness */
.mem-hero-sticker {
  display: inline-flex;
  margin-bottom: 1rem;
}

/* Pill row on member hero — more saturated */
.ph--member .pill {
  background: rgba(255,255,255,0.9);
  border-color: rgba(214,160,82,0.4);
  font-weight: 600;
}

/* Hero art: bigger and centred on mobile, right-side on desktop */
.mem-hero-art {
  max-width: 320px;
  margin: 2rem auto 0;
  position: relative;
}
/* Soft sage glow behind the membership card — gives the art depth. */
.mem-hero-glow {
  position: absolute;
  inset: -14% -10%;
  z-index: 0;
  background: radial-gradient(closest-side, rgba(255,255,255,0.6), rgba(255,255,255,0) 72%);
  pointer-events: none;
}
/* Rotating light-rays behind the card — the "special offer" sunburst. */
.mem-hero-art::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%; top: 50%;
  width: 155%; aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg at 50% 50%,
    rgba(255,255,255,0.55) 0deg 5deg, rgba(255,255,255,0) 5deg 16deg);
  -webkit-mask: radial-gradient(closest-side, #000 36%, rgba(0,0,0,0.45) 56%, transparent 76%);
          mask: radial-gradient(closest-side, #000 36%, rgba(0,0,0,0.45) 56%, transparent 76%);
  pointer-events: none;
  opacity: 0.55;
}
@media (prefers-reduced-motion: no-preference) {
  .mem-hero-art::before { animation: memRays 70s linear infinite; }
}
@keyframes memRays { to { transform: translate(-50%, -50%) rotate(360deg); } }
.mem-hero-art img { position: relative; z-index: 1; }
@media (min-width: 760px) {
  .mem-hero-art { margin: 0 auto; }
}

/* Override .panel's white background so bg-meadow actually shows */
.panel.bg-meadow {
  background: var(--grad-meadow);
  overflow: hidden;            /* contain the celebratory confetti within the rounded panel */
}
/* Keep the panel's copy + stats above the confetti layer */
.panel.bg-meadow > :not(.confetti-rain) { position: relative; z-index: 1; }

/* ---- "Pays for itself" value strip ---- */
.value-strip {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .value-strip { grid-template-columns: repeat(3, 1fr); }
}

.value-strip .stat .num { color: var(--accent); }

/* Vertical divider between stats on desktop */
@media (min-width: 640px) {
  .value-strip .stat + .stat {
    border-left: 2px dashed rgba(58,49,40,0.22);
    padding-left: 1.2rem;
  }
}

/* ---- Plan jump links (scroll to the Monthly / Annual groups below) ----
   Replaces the old Monthly/Annual tab toggle. Both plan groups now stay
   visible at once, so these are plain in-page jump links — symmetric, with
   no "stuck selected" state, just a neobrutalist chip that presses on hover. */
.plan-jump-wrap {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2.4rem;
}

.plan-jump {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.7rem 1.3rem;
  min-height: 44px;
  border-radius: var(--r-sm);
  border: 2px solid var(--btn-edge);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--btn-hard);
  transition: transform 0.14s ease, box-shadow 0.14s ease, color 0.16s ease;
  white-space: nowrap;
}
/* Neobrutalist press — slide onto the shadow as it shrinks away */
.plan-jump:hover  { transform: translate(2px, 2px); box-shadow: var(--btn-hard-hover); color: var(--accent); }
.plan-jump:active { transform: translate(4px, 4px); box-shadow: 0 0 0 0 var(--btn-edge); }

/* Land the group heading clear of the sticky header when jumped to */
.plan-group { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* Annual badge on toggle button */
.toggle-annual-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--sun);
  color: #5a3d12;
  border-radius: var(--r-pill);
  padding: 0.12rem 0.5rem;
  margin-left: 0.4rem;
  vertical-align: middle;
  line-height: 1.5;
}

/* Both plan groups are always visible, divided by .plan-sep */
.plan-group + .plan-group { margin-top: 3rem; }

/* ---- Group headers ---- */
.plan-group-header {
  text-align: center;
  margin-bottom: 1.6rem;
}

.plan-group-header h3 {
  font-size: clamp(1.3rem, 2.8vw, 1.7rem);
  margin-bottom: 0.3rem;
}

/* Subtle coloured pill behind the group label */
.group-pill {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: var(--r-pill);
  margin-bottom: 0.7rem;
}

.group-pill--monthly {
  background: var(--sky-tint);
  color: #08323d;
}

.group-pill--annual {
  background: var(--grad-meadow);
  color: var(--ink);
}

/* ---- Price card upgrades ---- */
.mem-price-card {
  /* stacks cleanly; min-height keeps short cards even with the featured one */
  display: flex;
  flex-direction: column;
}

/* Featured "most popular" card gets a meadow-gradient header strip */
.price-card.featured {
  border-color: var(--teal);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: visible; /* allow sticker to hang outside */
}

.price-card.featured .mem-card-header {
  /* Pull it flush to card edges, then re-add the padding */
  margin: calc(-1 * clamp(1.3rem, 2.5vw, 1.9rem));
  margin-bottom: 1rem;
  padding: 1.1rem clamp(1.3rem, 2.5vw, 1.9rem);
  background: var(--grad-meadow);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.price-card.featured .mem-card-header h4 {
  color: var(--ink);
  margin-bottom: 0;
}

/* Default (non-featured) header — no visual treatment, just structural spacing */
.mem-card-header {
  /* No negative margins for non-featured; the card padding handles spacing. */
  margin-bottom: 0.5rem;
}
.mem-card-header h4 { margin-bottom: 0; }

/* Featured card price colour */
.price-card.featured .price-tag { color: var(--accent-teal); }

/* Savings sticker on annual cards */
.savings-sticker {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.32rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--sun);
  color: #5a3d12;
  box-shadow: var(--shadow-sm);
  transform: rotate(-2.5deg);
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* "Most popular" sticker: hangs off the top-right of the featured card */
.most-popular-sticker {
  position: absolute;
  top: -0.9rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.38rem 0.85rem;
  border-radius: var(--r-pill);
  background: var(--sun);
  color: #5a3d12;
  box-shadow: var(--shadow-sm);
  transform: rotate(2.5deg);
  white-space: nowrap;
  z-index: 2;
}

/* ---- How it works steps ---- */
.steps-section .step-no {
  /* override to use meadow gradient to feel on-brand for memberships */
  background: var(--grad-meadow);
}

/* ---- Parent quote card ---- */
.mem-quote {
  max-width: 640px;
  margin-inline: auto;
}

/* ---- Perks section ---- */
.perks-chip-teal   { background: var(--teal-tint);  }
.perks-chip-wood   { background: var(--wood-tint);  }
.perks-chip-coral  { background: var(--coral-tint); }

/* ---- Day-pass crosslink panel ---- */
.daypass-panel {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: clamp(1.6rem, 4vw, 2.8rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  justify-content: space-between;
  border: 1px solid rgba(80,60,30,0.07);
}

.daypass-panel-copy { flex: 1 1 18rem; }
.daypass-panel-cta  { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---- Annual separator (between plan groups on no-JS view) ---- */
.plan-sep {
  text-align: center;
  margin-block: 1.5rem;
}
.plan-sep-line {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink-soft);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
}
.plan-sep-line::before,
.plan-sep-line::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: rgba(80,60,30,0.12);
  border-radius: 2px;
}

/* ---- Extra button colour (sky blue — used on monthly plan cards) ---- */
.btn--sky { --btn-bg: var(--sky); --btn-fg: #08323d; }

/* ---- Misc helpers ---- */
.mem-section-intro { max-width: 50ch; margin-inline: auto; }

/* Ensure price cards grid never overflows on narrow screens */
@media (max-width: 500px) {
  .grid.grid-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   MOBILE POLISH — memberships page
   All changes gated behind max-width queries so desktop is
   completely untouched. Primary target: 360–414 px phones;
   verified safe at 320 px.
   ============================================================ */

/* ---- Hero: comfortable on phones -------------------------
   The art column stacks below the copy on mobile.
   At narrow widths the SVG card is a decorative bonus — we
   shrink it so it doesn't steal too much vertical space and
   make sure the gap between copy and art is tight enough. ---- */
@media (max-width: 759px) {
  /* Let the hero breathe without being wasteful */
  .page-hero.ph--member {
    padding-bottom: clamp(2.5rem, 6vw, 4rem);
  }

  /* Art sits after copy — narrower and centred */
  .mem-hero-art {
    max-width: 240px;
    margin-top: 1.4rem;
  }

  /* Subtler sunburst rays on mobile (still pretty, but less battery) */
  .mem-hero-art::before { opacity: 0.35; }

  /* Hero sticker: pull it in from the right so it doesn't clip */
  .mem-hero-sticker { margin-bottom: 0.6rem; }
}

@media (max-width: 480px) {
  /* Cap the card image further so it doesn't crowd 320–400 px screens */
  .mem-hero-art { max-width: 200px; }
}

/* ---- Plan toggle: keeps in one row on all phones -----------
   The annual badge text "Save up to $190" can force a second
   line at 320 px — we shrink the font and allow wrap on the
   badge itself while keeping the button single-line. ---- */
@media (max-width: 600px) {
  .plan-jump-wrap {
    /* A little extra bottom breathing room before the cards */
    margin-bottom: 1.6rem;
  }

  .plan-jump {
    /* Slightly smaller to fit both chips comfortably at 320 px */
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
  }
}

@media (max-width: 380px) {
  /* Shrink the savings badge so it doesn't push the chip off-screen */
  .toggle-annual-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    margin-left: 0.25rem;
  }

  /* Allow the chip text to wrap if needed rather than stretching
     past the viewport — the badge can sit on its own line at 320 px */
  .plan-jump {
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    padding: 0.55rem 0.75rem;
    min-height: 44px;  /* keep tap-target compliant even when wrapping */
  }
}

/* ---- Pricing cards: clean single-column stacking ----------
   The shared styles.css already collapses the grid to 1-col.
   Here we clean up the per-card concerns:
   - Card rotation: small rotations cause left/right clips at
     320 px when combined with the offset box-shadow. We reduce
     the rotation angles and shrink the shadow accordingly.
   - .cp-popular sticker: position:absolute top/right can hang
     outside the container and trigger horizontal scroll. We
     pull it fully on-screen and remove its own rotation so it
     reads cleanly at a glance.
   - Card padding: a touch tighter so the price + list are
     never cramped or awkwardly wide on a narrow phone.
   - .cp-cta button: already 50 px tall (≥44 px) — good; just
     confirm full-width is enforced (it is via width:100%). ---- */
@media (max-width: 600px) {
  /* Tighter card padding on narrow phones */
  .cp-card {
    padding: clamp(1.1rem, 4vw, 1.5rem);
  }

  /* Smaller rotations stop the offset shadow from peeking
     past the grid's padding-inline:0.25rem guard */
  .cp-grid--3 .cp-card:nth-child(1) { transform: rotate(-0.5deg); }
  .cp-grid--3 .cp-card:nth-child(2) { transform: rotate(0.5deg); }
  .cp-grid--3 .cp-card:nth-child(3) { transform: rotate(-1deg); }

  /* Matching shrunken shadows so nothing bleeds off screen */
  .cp-card { box-shadow: 4px 4px 0 0 var(--ink); }
  .cp-card--featured { box-shadow: 5px 5px 0 0 var(--ink); }
}

@media (max-width: 480px) {
  /* At 480 px and below, kill the rotation entirely so the
     offset shadow is fully contained. The playful feel is
     carried by the sticker, colours and bold border. */
  .cp-grid--3 .cp-card:nth-child(1),
  .cp-grid--3 .cp-card:nth-child(2),
  .cp-grid--3 .cp-card:nth-child(3) { transform: none; }

  /* Most-popular sticker: pull it inside the card so it can
     never cause horizontal overflow. Flatten the rotation so
     it's easy to read on a small screen. */
  .cp-popular {
    position: absolute;
    top: -0.75rem;
    right: 0.6rem;       /* was -0.7 rem — now well inside the card edge */
    transform: rotate(3deg);
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }

  /* Tighten the price display slightly — still punchy */
  .cp-price-amount { font-size: clamp(2rem, 7vw, 2.4rem); }

  /* Featured card's meadow header: use the card padding for
     the negative-margin pull — needs recalculating for the
     tighter mobile padding set above */
  .price-card.featured .mem-card-header {
    margin: calc(-1 * clamp(1.1rem, 4vw, 1.5rem));
    margin-bottom: 1rem;
    padding: 1rem clamp(1.1rem, 4vw, 1.5rem);
  }
}

/* ---- Plan group header: less vertical gap on phones ------- */
@media (max-width: 600px) {
  .plan-group-header { margin-bottom: 1.1rem; }
  .plan-group-header h3 { font-size: clamp(1.15rem, 4.5vw, 1.4rem); }
}

/* ---- Steps: tighter horizontal padding between number + text */
@media (max-width: 600px) {
  /* Steps are already single-column; just reduce the gap so the
     numbered circles don't look orphaned with space below them */
  .steps-section .steps { gap: clamp(0.9rem, 3vw, 1.5rem); }

  /* Smaller step-number circle at the narrowest widths */
  .steps-section .step .step-no {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    margin-bottom: 0.55rem;
  }

  /* Headings inside steps */
  .steps-section .step h3 {
    font-size: clamp(1rem, 3.8vw, 1.2rem);
    margin-bottom: 0.3rem;
  }

  .steps-section .step p {
    font-size: 0.93rem;
  }
}

/* ---- FAQ accordion: comfortable reading on narrow phones -- */
@media (max-width: 600px) {
  /* The shared styles already bump acc-trigger padding-block.
     Here we tighten the side padding so long question text
     wraps neatly rather than being cut off by the icon. */
  .acc-trigger {
    font-size: 0.97rem;
    /* Right padding leaves room for the + icon without collision */
    padding-right: 3rem;
    line-height: 1.4;
  }

  /* Expand the panel text slightly looser for reading */
  .acc-panel p {
    font-size: 0.94rem;
    padding: 0 1rem 1rem;
    line-height: 1.65;
  }
}

/* ---- Closing CTA band ------------------------------------ */
@media (max-width: 600px) {
  /* Trim the outer padding so the band doesn't feel cramped
     against the container edges at 360 px */
  .cta-band {
    padding: clamp(1.5rem, 5vw, 2.5rem) clamp(1.2rem, 4vw, 2rem);
  }

  /* Headline scales comfortably */
  .cta-band h2 { font-size: clamp(1.5rem, 5.5vw, 2rem); }

  /* Description text: tighten the max-width so it reads
     neatly in 2–3 lines rather than a narrow river */
  .cta-band p { max-width: 34ch; font-size: 0.95rem; }

  /* Breathing room between body copy and the CTA buttons */
  .cta-band .flex-cta { margin-top: 1.2rem; }
}

/* ---- Confetti rain: pause it when the OS requests less motion
   (the shared styles kill card animations; we extend that to
   the confetti inside the CTA band on this page) ---- */
@media (prefers-reduced-motion: reduce) {
  .confetti-rain i { animation: none !important; }
}

/* (Section-spacing override removed — memberships now shares the site-wide
   .section rhythm so phone spacing matches every other page.) */
