/* Club site (wcfa.club/site/). Loaded after the landing's styles.css, whose
   tokens, type, buttons, cards, quotes and footer it uses as they are. This
   file adds only what the landing has no need for: the header with its
   navigation, breadcrumbs, article cards, the article reading column, the
   gallery grid and its lightbox. */

/* ------------------------------------------------------------- header */
.club-header {
  background: var(--navy);
  color: var(--near-white);
}
/* The header's rows carry their side padding inside their max-width, while a
   .section puts it outside its 1180px .wrap; adding the padding back here
   puts the logo, the nav and the Call button on the content's edges. */
.club-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: calc(var(--content-max) + 2 * var(--pad-x));
  margin: 0 auto;
  padding: 14px var(--pad-x) 10px;
}
.club-header__brand {
  color: inherit;
  text-decoration: none;
  min-height: var(--target-min);
}
.club-header__mark {
  width: 44px;
  height: 44px;
}
/* The flex item of .brand is the <picture>, not the <img> that carries
   flex: none, so without this a long club name squeezed the logo into an
   oval on phones (26x44 at 360 px). */
.club-header__brand > picture {
  flex: none;
  display: block;
  line-height: 0;
}
/* The one call button in a club page's first screen, filled so it reads as
   the main action (near-white on navy, 16:1). */
.club-header__call {
  flex: none;
  min-height: var(--target-min);
  padding: 0 18px;
  font-size: var(--type-body-sm);
  background: var(--near-white);
  border-color: var(--near-white);
  color: var(--navy);
}
.club-header__call:hover {
  background: var(--pale-blue);
  border-color: var(--pale-blue);
}
.club-header__call-short {
  display: none;
}
@media (max-width: 559.98px) {
  .club-header__call-long {
    display: none;
  }
  .club-header__call-short {
    display: inline;
  }
}

/* The five club links plus the way back to the free class. On a phone the
   row scrolls sideways inside itself, so the page never does. */
.club-nav {
  border-top: var(--rule-hair) solid var(--slate);
}
.club-nav__list {
  display: flex;
  gap: 4px 18px;
  max-width: calc(var(--content-max) + 2 * var(--pad-x));
  margin: 0 auto;
  padding: 0 var(--pad-x);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.club-nav__list::-webkit-scrollbar {
  display: none;
}
.club-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  white-space: nowrap;
  color: var(--pale-blue);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-body-sm);
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.club-nav__link:hover {
  color: var(--near-white);
}
.club-nav__link[aria-current] {
  color: var(--near-white);
  border-bottom-color: var(--gold);
}
.club-nav__link--free {
  color: var(--gold);
}
.club-nav__link:focus-visible {
  outline: var(--focus-width) solid var(--gold);
  outline-offset: -3px;
}

/* --------------------------------------------------------- page hero */
.club-hero {
  padding-top: 36px;
  padding-bottom: 28px;
}
.club-hero .lead {
  color: var(--pale-blue);
}
/* A two-line eyebrow splits evenly instead of leaving one word alone. */
.club-hero .eyebrow {
  text-wrap: balance;
}
.club-hero__meta {
  color: var(--pale-blue);
}
@media (max-width: 719.98px) {
  .club-hero__title {
    font-size: 36px;
  }
}
/* The landing's .diagonal is a light wedge at the top of a navy band; under
   the page hero it is the navy band's own lower edge. */
.club-hero + .diagonal {
  background: var(--navy);
}
/* The landing draws the diagonal with clip-path. Its edge lands on a
   fractional pixel, the browser anti-aliases it, and a thin grey seam shows
   where the wedge meets the band above it (audit 2026-10-16, at 390 and
   1280 px, 1x and 3x). A gradient paints the same wedge on the element's own
   pixel-snapped box, so there is no edge to blend. The "to bottom right"
   gradient's 50% line runs from the top-right to the bottom-left corner,
   the same line the polygon cut along. Club pages only. */
.club .diagonal {
  clip-path: none;
  background: linear-gradient(to bottom right, var(--near-white) calc(50% - 0.5px), transparent calc(50% + 0.5px));
}
.club .club-hero + .diagonal {
  background: linear-gradient(to bottom right, var(--navy) calc(50% - 0.5px), transparent calc(50% + 0.5px));
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--type-label-sm);
  color: var(--pale-blue);
}
/* The slash ends the item before it, so a wrapped trail never starts a
   line with one. */
.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--slate);
}
.crumbs a {
  color: var(--pale-blue);
  text-underline-offset: 3px;
}
.crumbs a:hover {
  color: var(--near-white);
}

/* ------------------------------------------------------------ blocks */
.club-photo {
  height: auto;
  aspect-ratio: 4 / 5;
  max-height: 560px;
}
.club-photo--wide {
  aspect-ratio: 16 / 9;
}
.club-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
}
/* Content inside a navy band that starts with a .diagonal: the padding sits
   outside .wrap, as .section does, so the band's text lines up with every
   other section's left edge. */
.club-band {
  padding: 12px var(--pad-x) var(--section-y);
}
.club-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.club-cta__actions > * {
  align-self: center;
}
/* The section right under the page hero's diagonal: the wedge already
   gives it air. */
.club-hero + .diagonal + .section {
  padding-top: 24px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}
/* "Club" and "About" are shorter than a 44px target. */
.footer-nav .link {
  min-width: var(--target-min);
  justify-content: center;
}
/* Barlow's space is 3px wide, so an underlined "(408) 592-1244" read as one
   word. */
.club a[href^="tel:"]:not(.btn) {
  word-spacing: 0.15em;
}

/* Groups by age: Elite is a level, not an age band, so it sits under the
   four age cards as one wider slate card (round-3 design), never alone in a
   half-empty last row. */
.card--elite {
  grid-column: 1 / -1;
  max-width: none;
}
/* Four age cards: two per row on a tablet, four from 1000px, so no width
   leaves one alone (auto-fit gave 3 + 1 at 1024px). */
@media (min-width: 720px) {
  .groups-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .groups-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 720px) {
  .card--elite {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 28px;
  }
  .card--elite .card__head {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }
}

/* A heading in the middle of a .stack--tight column needs more air above it
   than the 16px gap gives. */
.club-subhead {
  margin-top: 24px;
}

/* A section on the full 1180px grid whose paragraphs keep a reading
   width, so its heading and rule share the left edge of the wide sections
   around it. */
.measure-text > p {
  max-width: 68ch;
}
/* The article's reading column starts at the page's left edge, under the
   H1, instead of being centred inside the 1180px grid. */
.wrap--left {
  margin-left: max(0px, calc((100% - var(--content-max)) / 2));
}

/* A short call block in the middle of a long article: from 720px the
   sticky call bar is off and the header has scrolled away. Below 720px the
   call bar does this job, so the block stays hidden there. */
.cta-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 2em;
  padding: 20px 22px;
  border: var(--rule-hair) solid var(--slate);
}
.cta-inline__text {
  flex: 1 1 100%;
  margin: 0;
  font-weight: 500;
}
.prose .cta-inline .btn {
  color: var(--near-white);
  text-decoration: none;
}
.prose .cta-inline .btn:hover {
  color: var(--near-white);
}
@media (max-width: 719.98px) {
  .cta-inline {
    display: none;
  }
}

.article-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: var(--gap-card-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-card__link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  color: var(--navy);
  text-decoration: none;
}
.article-card__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.article-card__title {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.article-card__link:hover .article-card__title {
  text-decoration-color: var(--gold);
}
.article-card__link:focus-visible {
  outline: var(--focus-width) solid var(--navy);
  outline-offset: var(--focus-offset);
}
.article-card__meta {
  color: var(--slate);
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .photo-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}
.photo-strip__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

/* ---------------------------------------------------------- articles */
.prose {
  font-size: var(--type-body);
  line-height: 1.65;
}
.prose > * {
  max-width: 68ch;
}
.prose > * + * {
  margin-top: 1em;
}
.prose p,
.prose ul,
.prose ol {
  margin-bottom: 0;
}
.prose h2 {
  margin-top: 1.8em;
  margin-bottom: 0;
  font-family: var(--font-display);
  font-variation-settings: var(--wdth-wide);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.12;
  text-transform: uppercase;
  text-wrap: balance;
}
.prose h3 {
  margin-top: 1.5em;
  margin-bottom: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-h3-lg);
  line-height: var(--type-h3-lh);
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 0.4em;
}
.prose a {
  color: var(--navy);
  text-underline-offset: 3px;
}
.prose a:hover {
  color: var(--slate);
}
.prose strong {
  font-weight: 600;
}
.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding-left: 18px;
  border-left: 4px solid var(--gold);
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--type-body-sm);
}
.prose th,
.prose td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--pale-blue);
  text-align: left;
  vertical-align: top;
}
.prose th {
  font-family: var(--font-display);
  font-weight: 600;
}
.prose .table-wrap {
  overflow-x: auto;
}
.prose .table-wrap:focus-visible {
  outline: var(--focus-width) solid var(--navy);
  outline-offset: var(--focus-offset);
}
/* At 360px the groups table was 15px wider than the column and cut off the
   Price column. */
@media (max-width: 479.98px) {
  .prose th,
  .prose td {
    padding: 10px 6px 10px 0;
  }
  .prose th:last-child,
  .prose td:last-child {
    padding-right: 0;
  }
}

/* ----------------------------------------------------------- gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px 18px;
  }
}
@media (min-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}
.gallery__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gallery__link {
  display: block;
}
.gallery__link:focus-visible {
  outline: var(--focus-width) solid var(--navy);
  outline-offset: var(--focus-offset);
}
.gallery__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--pale-blue);
}
.gallery__caption {
  font-size: var(--type-label-sm);
}

/* The photo viewer. A native <dialog>: the browser keeps focus inside it,
   Escape closes it, and focus returns to the photo that opened it. */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 30, 50, 0.97);
  color: var(--near-white);
}
.lightbox::backdrop {
  background: rgba(10, 15, 25, 0.7);
}
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__figure {
  margin: 0;
  padding: 64px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  touch-action: pan-y;
}
.lightbox__caption {
  color: var(--pale-blue);
  text-align: center;
  max-width: 60ch;
}
.lightbox__count {
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600;
}
.lightbox__btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: var(--rule-hair) solid var(--pale-blue);
  border-radius: 50%;
  background: rgba(20, 30, 50, 0.8);
  color: var(--near-white);
  cursor: pointer;
}
.lightbox__btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.lightbox__btn:focus-visible {
  outline: var(--focus-width) solid var(--gold);
  outline-offset: 3px;
}
.lightbox__close {
  top: 10px;
  right: 12px;
}
.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__prev {
  left: 10px;
}
.lightbox__next {
  right: 10px;
}
@media (max-width: 719.98px) {
  /* On a phone the arrows sit under the photo, clear of it, and a swipe
     does the same job. */
  .lightbox__prev,
  .lightbox__next {
    top: auto;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    transform: none;
  }
  .lightbox__figure {
    padding-bottom: 76px;
  }
}

/* At 390 px the five header links fit in one row only with tighter type;
   below that width the row scrolls inside itself. */
@media (max-width: 439.98px) {
  .club-nav__list {
    gap: 4px 11px;
  }
  .club-nav__link {
    font-size: 15px;
    letter-spacing: 0.02em;
  }
}
