/* ───────────────────────────────────────────────────────────────────
   ClubVIO block
   Design ref: Figma node 130:1875
   Dark hero w/ huge Cormorant wordmark + image + single tier card.
   ─────────────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────────
   ClubVIO layout — mirrors the 50/50 accordion block's
   image/content column treatment (full-viewport-height section,
   image column locked to section content area, content column
   padded + vertically centered, equal-width columns).
   ───────────────────────────────────────────────────────────────────── */
.vio-section.vio-club-vio {
  background: var(--wp--preset--color--vio-ink, #141414);
  color: var(--wp--preset--color--vio-lotion, #FEFFF9);
  box-sizing: border-box;
}

/* Desktop (≥1280px): section is at minimum 100dvh, 50px padding all
   sides, flex column so the wordmark header + body chain can pass
   the full available height down to the grid. Matches the accordion
   block's section override. */
@media (min-width: 1280px) {
  .vio-section.vio-club-vio,
  section.vio-section.vio-club-vio {
    padding: 50px;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    display: flex;
    flex-direction: column;
    contain: layout paint;
  }
  /* Strip the global .vio-section__inner max-width:1440px + padding:
     0 50px so the grid (and thus the media column) can span the
     actual section width — same fix the accordion block uses. */
  .vio-section.vio-club-vio .vio-section__inner,
  section.vio-section.vio-club-vio .vio-section__inner,
  .vio-section.vio-club-vio .vio-section__content,
  .vio-section.vio-club-vio .vio-section__body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }
}

.vio-club-vio__inner {
  /* Default (tablet/mobile) padding — desktop strips it back to 0
     because the section itself owns the 50px padding above. */
  padding: 50px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  /* 50px vertical rhythm between major rows: header → compare row
     (Signature + Elite) → founding feature row (image + card) →
     optional wellness row. Replaces the per-row margin-top values that
     were drifting out of sync as the block evolved. */
  gap: 50px;
}
@media (min-width: 1280px) {
  .vio-club-vio__inner {
    /* Desktop: padding lives on the section, inner just stretches. */
    padding: 0;
    flex: 1 1 auto;
    min-height: 0;
  }
}

/* ─── Header: wordmark + subtitle ───────────────────────────────── */
.vio-club-vio__header {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* Tight vertical overlap so the subtitle hugs the wordmark
     baseline (matches the -9px gap from the Figma comp). */
  gap: 0;
}

.vio-club-vio__wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(64px, 14vw, 216px);
  line-height: 0.82;
  letter-spacing: 0.052em;
  color: var(--wp--preset--color--vio-lotion, #FEFFF9);
  margin: 0;
  text-align: center;
}

.vio-club-vio__subtitle {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(20px, 3.5vw, 53px);
  line-height: 1.03;
  text-transform: uppercase;
  color: var(--wp--preset--color--vio-lotion, #FEFFF9);
  margin: -0.12em 0 0;
  letter-spacing: 0;
}
.vio-club-vio__subtitle strong,
.vio-club-vio__subtitle b {
  font-weight: 700;
}

/* Optional uploaded wordmark image (replaces text wordmark+subtitle
   when provided). Sized to a comfortable max so on wide viewports it
   doesn't stretch beyond the ~800px the designer composed at. */
.vio-club-vio__wordmark-image {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: min(900px, 92%);
  height: auto;
}

/* ─── Lead paragraph (under wordmark/subtitle) ──────────────────── */
.vio-club-vio__lead {
  margin: 24px auto 0;
  max-width: 560px;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
}

/* ─── Compare row: Signature + Elite side by side ───────────────── */
.vio-club-vio__compare {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  /* Default to a 2-card layout. The --count-N modifier overrides the
     column count when Wellness joins the row (PEN locations get 3) or
     in compact layout where Founding joins too (3 cards generic,
     4 cards on PEN). */
  .vio-club-vio__compare {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .vio-club-vio__compare--count-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .vio-club-vio__compare--count-4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}
@media (min-width: 1280px) {
  .vio-club-vio__compare {
    gap: 0;
  }
  /* All cards 2+ overlap their left border by -1px so the compare row
     reads as one continuous outline around the trio (or pair). */
  .vio-club-vio__compare > .vio-club-vio__tier:nth-child(n+2) {
    margin-left: -1px;
  }
}

/* ─── Feature row: image + tier card (founding / wellness) ────────
   Mobile-first: single column, image above card. DOM order is
   image → card, so stacking on mobile naturally puts the photo above
   the Founding Member tier card. The order swap for `image-right`
   only applies on desktop (>=1024px), so phones always render image
   first regardless of the desktop image_side setting.

   The container uses `.vio-club-vio__feature-row` (NOT `.vio-club-vio__feature`)
   because `__feature` is also used for individual bullet <li>s inside
   each tier card. Sharing the class caused display:grid (this row) to
   collide with display:flex (the bullet rows) in the cascade. */
.vio-club-vio__feature-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
/* Explicit order:0 on mobile so any desktop `order` overrides reset
   when we drop below the breakpoint. Without this, a re-render at a
   width boundary could leave stale order values from the desktop rules. */
.vio-club-vio__feature-media,
.vio-club-vio__feature-card {
  order: 0;
}
@media (min-width: 1024px) {
  .vio-club-vio__feature-row {
    /* True 50/50 layout for the founding row. Image lives in its half,
       Founding Member card in the other half. Each is capped + centered
       within its column so neither one bleeds across the midline. */
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
  }
  /* Image-on-right: swap source order so the card visually leads on
     the left. Columns stay symmetric (1fr 1fr) regardless of side. */
  .vio-club-vio__feature-row--image-right .vio-club-vio__feature-media {
    order: 2;
  }
  .vio-club-vio__feature-row--image-right .vio-club-vio__feature-card {
    order: 1;
  }
}
.vio-club-vio__feature-card {
  display: flex;
  flex-direction: column;
}
@media (min-width: 1024px) {
  /* Founding/Wellness card: cap width and center within its 50% column
     so it visually mirrors the image's centered placement on the other
     side. 480px keeps the card comfortably narrower than its column
     while still fitting the bullet content + CTA without wrapping
     awkwardly. */
  .vio-club-vio__feature-card {
    max-width: 480px;
    width: 100%;
    justify-self: center;
  }
}
/* When a feature row has no image (e.g. wellness card without a paired
   photo), the single card centers within the row instead of taking up
   only one of two columns. */
.vio-club-vio__feature-row:not(:has(.vio-club-vio__feature-media)) {
  grid-template-columns: 1fr;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Feature-row media — portrait photo paired with the Founding Member
   (or Wellness) card. 4:5 crop, capped at 480px wide so the image
   stays visually proportional to the card next to it (otherwise
   width:100% of the wide grid cell yields a 700-900px tall image
   that dwarfs the card). Image hugs the inner edge of its cell so
   image + card sit close together regardless of image_side. */
.vio-club-vio__feature-media {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 600px;
  overflow: hidden;
}
@media (min-width: 1024px) {
  /* Image: centered within its 50% column. The 600px max-width above
     keeps it from filling the full half. */
  .vio-club-vio__feature-media {
    justify-self: center;
  }
}
.vio-club-vio__feature-media .vio-club-vio__img,
.vio-club-vio__feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Gradient overlay — same dark fade on BOTH the left edge AND the
   top edge of the photo. Two stacked linear-gradients composite
   together so the top-left corner reads darkest (where both fades
   overlap), the rest of the left and top edges read dark, and the
   bottom-right area stays clean. Same alpha values as the Figma
   fill (rgba(3,3,3,1) and rgba(0,0,0,0.1)). */
.vio-club-vio__media-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(3, 3, 3, 1) 0%, rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 0) 100%),
    linear-gradient(to right,  rgba(3, 3, 3, 1) 0%, rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

/* Tier card — one cell in the tiers grid. Border-only by default so the
   card blends with whatever section bg is active. When a tierBg attr is
   set, the global `vio-bg--{slug}` utility class added in render.php
   fills the card with that color (and switches text/border to the right
   on-color values via the global utility). Featured tier (Founding
   Member) gets a slightly stronger border to differentiate it. */
.vio-club-vio__tier {
  border: 1px solid var(--wp--preset--color--vio-mtn-greige, #362B26);
  border-color: #362B26;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 0;
}
/* When no tierBg utility class is present, keep the original subtle
   translucent fill so cards aren't pure transparent on dark sections. */
.vio-club-vio__tier:not([class*="vio-bg--"]) {
  background: rgba(255, 255, 255, 0.015);
}
/* Featured tier (Founding Member) intentionally matches the other tier
   cards' border + background so the four-card series reads as a uniform
   set. Visual emphasis comes from the dedicated row + paired image, not
   from a different card chrome. */
.vio-club-vio__tier-tagline {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 400;
  /* Body-copy floor (18px / 28px) — matches .vio-club-vio__feature so the
     tagline sits visually flush with the rest of the card content. */
  font-size: 18px;
  line-height: 28px;
  color: rgba(255, 255, 255, 0.75);
  margin: 8px 0 0;
}
.vio-club-vio__tier-note {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}
.vio-club-vio__feature-label {
  font-weight: 700;
  color: #FFFFFF;
  margin-right: 4px;
}

/* Head: eyebrow / name / price */
.vio-club-vio__tier-head {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.vio-club-vio__tier-eyebrow,
.vio-club-vio__header--override .vio-section__eyebrow {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 30px;
  letter-spacing: 0.1538em;
  text-transform: uppercase;
  color: #AF998D; /* VIO/Mouse/400 — 5.5:1 on dark tier bg */
  opacity: 1; /* override the 0.85 from the global .vio-section__eyebrow rule */
  margin: 0;
}

.vio-club-vio__tier-name {
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 35px);
  line-height: 1.2;
  color: var(--wp--preset--color--vio-lotion, #FEFFF9);
  margin: 0;
}

.vio-club-vio__tier-price {
  margin: 8px 0 0;
  font-family: "Nunito", system-ui, sans-serif;
  line-height: 1.2;
}
.vio-club-vio__tier-price-amount {
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 35px);
  color: #AF998D; /* VIO/Mouse/400 */
}
.vio-club-vio__tier-price-period {
  font-weight: 700;
  font-size: 18px;
  line-height: 28px;
  color: #AF998D;
}
/* Inline price fallback message (e.g. "Inquire at your VIO for monthly
   pricing" on Elite tier when no numeric amount is set). Matches the
   $99 amount color so the messaging reads as a price substitute. */
.vio-club-vio__tier-price-subtitle {
  margin: 8px 0 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.4;
  color: #AF998D; /* VIO/Mouse/400 — same as .vio-club-vio__tier-price-amount */
}

/* Feature list — tight bullet spacing per ss1 reference (bullets sit
   close together so the card reads as a cohesive list, not airy rows).
   text-align reset prevents any inherited centering from an ancestor
   (e.g. tier-head-center) from bleeding into the bullet row layout. */
.vio-club-vio__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  align-items: stretch;
}
/* Default each LI to a left layout — base rule, overridden by the
   --features-{center|right} modifier classes when set. */
.vio-club-vio__feature {
  justify-content: flex-start;
  text-align: left;
}
.vio-club-vio__feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  color: #FFFFFF;
}
/* The "—" mark in front of each feature. 21px wide column to match
   Figma layout_KJYERF. Drawn with a flex item so it sits on the
   baseline of the first text line. */
.vio-club-vio__feature-mark {
  flex: 0 0 21px;
  height: 28px;
  display: flex;
  align-items: center;
}
.vio-club-vio__feature-mark::before {
  content: "";
  display: block;
  width: 14px;
  height: 1px;
  /* Match the tier eyebrow color (Mouse/600) instead of inheriting
     the feature text color (white). Same hex used on the eyebrow
     rule above so editor changes stay in sync. */
  background: #725C50;
  opacity: 1;
}
.vio-club-vio__feature-text {
  flex: 1 1 auto;
}

/* CTA — anchored to the bottom of the tier card. The card itself uses
   `flex-direction: column`, so `margin-top: auto` on this wrap pushes
   the button to the bottom regardless of content height above it. That
   keeps the buttons of side-by-side cards (Signature + Elite) aligned
   even when their bullet lists differ in length. */
.vio-club-vio__cta-wrap {
  margin: 0;
  margin-top: auto;
}

/* ─── Per-section alignment modifiers ─────────────────────────────
   Driven by .vio-club-vio__tier--head-{left|center|right} etc. set
   by render.php from the headAlign / featuresAlign / ctaAlign block
   attrs. text-align controls inline content; for the CTA we also flex
   the wrap so the button itself can left/center/right within its row. */
.vio-club-vio__tier--head-left    .vio-club-vio__tier-head { text-align: left; }
.vio-club-vio__tier--head-center  .vio-club-vio__tier-head { text-align: center; }
.vio-club-vio__tier--head-right   .vio-club-vio__tier-head { text-align: right; }

.vio-club-vio__tier--features-left    .vio-club-vio__features { text-align: left; }
.vio-club-vio__tier--features-center  .vio-club-vio__features { text-align: center; }
.vio-club-vio__tier--features-right   .vio-club-vio__features { text-align: right; }
/* Each <li> is a flex container (dash mark + text). The row's
   justify-content controls where that flex content sits along the row's
   width. Explicit values for each alignment so we don't rely on
   inheritance from any ancestor (e.g. a centered section could otherwise
   bleed text-align down to the LIs). */
.vio-club-vio__tier--features-left   .vio-club-vio__feature { justify-content: flex-start; }
.vio-club-vio__tier--features-center .vio-club-vio__feature { justify-content: center; }
.vio-club-vio__tier--features-right  .vio-club-vio__feature { justify-content: flex-end; }

.vio-club-vio__tier--cta-left   .vio-club-vio__cta-wrap { text-align: left; }
.vio-club-vio__tier--cta-center .vio-club-vio__cta-wrap { text-align: center; }
.vio-club-vio__tier--cta-right  .vio-club-vio__cta-wrap { text-align: right; }
.vio-club-vio__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  background: #FFFFFF;
  color: var(--wp--preset--color--vio-ink, #141414);
  border: 1px solid #FFFFFF;
  border-radius: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.vio-club-vio__cta:hover,
.vio-club-vio__cta:focus-visible {
  background: transparent;
  color: #FFFFFF;
}

/* ─── Tablet / mobile ───────────────────────────────────────────── */
@media (max-width: 1023px) {
  .vio-club-vio__inner {
    gap: 32px;
  }
  .vio-club-vio__tiers {
    gap: 20px;
    margin-top: 32px;
  }
  .vio-club-vio__tier {
    padding: 28px;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .vio-club-vio__inner {
    padding: 32px 20px;
    gap: 24px;
  }
  .vio-club-vio__wordmark {
    font-size: clamp(56px, 18vw, 100px);
    letter-spacing: 0.03em;
  }
  .vio-club-vio__subtitle {
    font-size: clamp(16px, 5.2vw, 24px);
    margin-top: -0.06em;
  }
  .vio-club-vio__tiers {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
  }
  .vio-club-vio__tier {
    padding: 24px;
    gap: 20px;
  }
  .vio-club-vio__feature {
    font-size: 16px;
    line-height: 24px;
  }
  .vio-club-vio__feature-mark {
    height: 24px;
  }
}
