:root {
    --pine:   #06231a;
    --forest: #0a2f22;
    --field:  #0e3c2c;
    --chalk:  #f3f7f3;
    --mist:   #9db3a6;
    --flare:  #e0b95f;
    --hair:   rgba(243,247,243,.14);
    --lean:   skewX(-7deg);
    --display: "Big Shoulders Display", "Haettenschweiler", "Arial Narrow", sans-serif;
    --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
    --mono: "Space Mono", ui-monospace, "Courier New", monospace;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--pine);
    color: var(--chalk);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }

  .wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

  /* ---------- masthead ---------- */
  .masthead {
    border-bottom: 1px solid var(--hair);
    background:
      radial-gradient(120% 90% at 78% -10%, rgba(224,185,95,.10), transparent 60%),
      linear-gradient(180deg, var(--forest), var(--pine));
    overflow: hidden;
  }
  .tag-row {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
    text-transform: uppercase; color: var(--mist);
    padding: 20px 0 0;
  }
  .wordmark {
    margin: 26px 0 0;
    font-family: var(--display);
    font-weight: 800;
    line-height: .82;
    letter-spacing: -.005em;
    text-transform: uppercase;
    transform: var(--lean);
    transform-origin: left bottom;
  }
  .wordmark .city {
    display: block;
    font-size: clamp(28px, 5vw, 62px);
    font-weight: 500;
    color: var(--mist);
    letter-spacing: .06em;
  }
  .wordmark .club {
    display: block;
    font-size: clamp(64px, 17vw, 208px);
    color: var(--chalk);
    margin-left: -.02em;
  }
  .deck {
    max-width: 62ch;
    margin: 30px 0 0;
    color: var(--mist);
    font-size: 16.5px;
  }
  .deck strong { color: var(--chalk); font-weight: 600; }
  .strip {
    display: flex; flex-wrap: wrap; gap: 0;
    margin: 34px 0 0;
    border-top: 1px solid var(--hair);
  }
  .strip div {
    flex: 1 1 150px;
    padding: 16px 18px 20px 0;
  }
  .strip dt {
    font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
    text-transform: uppercase; color: var(--mist);
  }
  .strip dd {
    margin: 6px 0 0;
    font-family: var(--display); font-weight: 700;
    font-size: 26px; line-height: 1; text-transform: uppercase;
  }
  .strip dd .sw {
    display: inline-block; width: 13px; height: 13px; margin-right: 7px;
    border-radius: 2px; vertical-align: baseline;
  }
  .sw--green { background: var(--field); box-shadow: inset 0 0 0 1px var(--hair); }
  .sw--white { background: var(--chalk); }
  .masthead .wrap { padding-bottom: 8px; }

  /* ---------- units ---------- */
  main { padding: 8px 0 0; }
  .unit { padding: 58px 0 0; }
  .unit-head {
    display: flex; align-items: baseline; gap: 18px;
    margin: 0 0 26px;
  }
  .unit-name {
    margin: 0;
    font-family: var(--display); font-weight: 700;
    font-size: clamp(26px, 3.4vw, 40px);
    letter-spacing: .01em; text-transform: uppercase;
    white-space: nowrap;
  }
  .rule { flex: 1 1 auto; height: 1px; background: var(--hair); }
  .unit-meta {
    font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em;
    text-transform: uppercase; color: var(--mist); white-space: nowrap;
  }

  .grid { display: grid; gap: 22px; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); max-width: 780px; }
  .grid--1 { grid-template-columns: 1fr; max-width: 780px; }

  /* ---------- cards ---------- */
  .card {
    background: var(--forest);
    border: 1px solid var(--hair);
    display: flex; flex-direction: column;
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
  }
  .card:hover { transform: translateY(-4px); border-color: rgba(243,247,243,.32); }

  .frame { position: relative; overflow: hidden; }
  .frame::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(6,35,26,0) 42%, rgba(6,35,26,.55) 78%, var(--forest) 100%);
    pointer-events: none;
  }
  .shot {
    display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover;
    filter: saturate(.94) contrast(1.02);
    transition: filter .3s ease, transform .5s ease;
  }
  .card:hover .shot { filter: saturate(1.04) contrast(1.04); transform: scale(1.02); }

  .pending {
    display: grid; place-items: center;
    background:
      repeating-linear-gradient(-45deg, rgba(243,247,243,.05) 0 2px, transparent 2px 11px),
      var(--field);
  }
  .pending-tag {
    font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
    text-transform: uppercase; color: var(--flare);
    border: 1px dashed rgba(224,185,95,.5); padding: 8px 12px;
  }

  .pos {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    font-family: var(--mono); font-weight: 700; font-size: 10.5px;
    letter-spacing: .16em; text-transform: uppercase;
    background: rgba(6,35,26,.78); color: var(--chalk);
    padding: 5px 9px; backdrop-filter: blur(3px);
  }
  .badge {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    font-family: var(--mono); font-weight: 700; font-size: 10.5px;
    letter-spacing: .16em; text-transform: uppercase;
    color: var(--flare); border: 1px solid rgba(224,185,95,.65);
    padding: 4px 8px; background: rgba(6,35,26,.6);
  }

  .info { position: relative; padding: 0 20px 22px; }
  .digit {
    position: absolute; left: 12px; top: -54px; z-index: 3;
    font-family: var(--display); font-weight: 800;
    font-size: 96px; line-height: .78; letter-spacing: -.02em;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(243,247,243,.55);
    transform: var(--lean);
    transition: color .25s ease, -webkit-text-stroke-color .25s ease;
    pointer-events: none;
  }
  .card:hover .digit { color: var(--chalk); -webkit-text-stroke-color: var(--chalk); }
  .name {
    margin: 52px 0 8px;
    font-family: var(--display); font-weight: 700;
    font-size: 27px; line-height: 1.02; text-transform: uppercase;
    letter-spacing: .012em;
  }
  .read { margin: 0; color: var(--mist); font-size: 14.6px; line-height: 1.5; }

  .card--pending .digit { -webkit-text-stroke-color: rgba(224,185,95,.55); }
  .card--pending:hover .digit { color: var(--flare); -webkit-text-stroke-color: var(--flare); }

  .card--wide { flex-direction: row; }
  .card--wide .frame { flex: 0 0 34%; }
  .card--wide .shot { height: 100%; aspect-ratio: auto; min-height: 230px; }
  .card--wide .frame::after {
    background: linear-gradient(90deg, rgba(6,35,26,0) 55%, var(--forest) 100%);
  }
  .card--wide .info { flex: 1 1 auto; padding: 26px 26px 26px 8px; }
  .card--wide .digit { top: 10px; left: -4px; font-size: 58px; }
  .card--wide .name { margin-top: 46px; }
  .card--wide .read { max-width: 48ch; }

  /* ---------- footer ---------- */
  footer {
    margin: 76px 0 0;
    border-top: 1px solid var(--hair);
    padding: 22px 0 56px;
    font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
    text-transform: uppercase; color: var(--mist);
    display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  }

  /* ---------- responsive ---------- */
  @media (max-width: 900px) {
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 620px) {
    .wrap { padding: 0 18px; }
    .grid--3, .grid--2 { grid-template-columns: 1fr; }
    .grid--2, .grid--1 { max-width: none; }
    .unit-head { flex-wrap: wrap; gap: 10px; }
    .rule { display: none; }
    .card--wide { flex-direction: column; }
    .card--wide .frame { flex: none; }
    .card--wide .shot { aspect-ratio: 2 / 3; }
    .card--wide .frame::after { background: linear-gradient(180deg, rgba(6,35,26,0) 45%, var(--forest) 100%); }
    .card--wide .info { padding: 0 20px 22px; }
    .card--wide .digit { top: -54px; left: 12px; font-size: 96px; }
    .card--wide .name { margin-top: 52px; }
  }
  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
  }
  a:focus-visible, .card:focus-visible { outline: 2px solid var(--flare); outline-offset: 3px; }

/* ---------- site nav ---------- */
.nav { display: flex; gap: 20px; }
.nav a {
  color: var(--mist); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: color .2s ease, border-color .2s ease;
}
.nav a:hover { color: var(--chalk); border-color: var(--hair); }
.nav a[aria-current="page"] { color: var(--chalk); border-color: var(--flare); }

/* ---------- compact masthead (gallery) ---------- */
.masthead--sub .wordmark { margin-top: 20px; }
.masthead--sub .wordmark .club { font-size: clamp(46px, 11vw, 132px); }
.masthead--sub .wordmark .city { font-size: clamp(22px, 3.4vw, 40px); }
.masthead--sub .deck { margin-bottom: 30px; }

/* ---------- gallery grid ---------- */
.gallery {
  columns: 3;
  column-gap: 18px;
  padding-top: 46px;
}
.shot-tile {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  border: 1px solid var(--hair);
  background: var(--forest);
  break-inside: avoid;
  position: relative;
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
.shot-tile img {
  display: block; width: 100%; height: auto;
  filter: saturate(.94) contrast(1.02);
  transition: filter .3s ease, transform .5s ease;
}
.shot-tile:hover { border-color: rgba(243,247,243,.34); transform: translateY(-3px); }
.shot-tile:hover img { filter: saturate(1.04) contrast(1.04); transform: scale(1.02); }
.shot-tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,35,26,0) 62%, rgba(6,35,26,.42) 100%);
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.shot-tile:hover::after { opacity: 1; }
.shot-tile .idx {
  position: absolute; left: 12px; bottom: 10px; z-index: 2;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  color: var(--chalk); opacity: 0;
  transition: opacity .25s ease;
}
.shot-tile:hover .idx { opacity: .85; }

@media (max-width: 900px) { .gallery { columns: 2; } }
@media (max-width: 620px) { .gallery { columns: 1; } }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: none; align-items: center; justify-content: center;
  background: rgba(3,18,13,.95);
  padding: 44px 20px;
}
.lightbox[open], .lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border: 1px solid var(--hair);
}
.lb-btn {
  position: absolute; z-index: 2;
  background: rgba(6,35,26,.72);
  border: 1px solid var(--hair);
  color: var(--chalk);
  font-family: var(--mono); font-size: 16px; line-height: 1;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.lb-btn:hover { border-color: var(--flare); background: rgba(6,35,26,.92); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  color: var(--mist);
}
@media (max-width: 620px) {
  .lightbox { padding: 60px 10px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* ---------- deferred rendering & progressive image loading ---------- */

/* Skip layout/paint for off-screen roster sections. The reserved height keeps
   the scrollbar honest, so this stays cheap as the roster grows. */
.unit { content-visibility: auto; contain-intrinsic-size: auto 1000px; }

/* Fade images in as they decode. Gated behind .js-fade so that with JS
   disabled the images simply render at full opacity. */
.js-fade .shot,
.js-fade .shot-tile img {
  opacity: 0;
  transition: opacity .45s ease, filter .3s ease, transform .5s ease;
}
.js-fade .shot.is-loaded,
.js-fade .shot-tile img.is-loaded { opacity: 1; }

/* Reserve tile space before the thumbnail arrives, so the masonry
   columns don't reflow underneath the reader. */
.shot-tile { background-image: linear-gradient(160deg, var(--field), var(--forest)); }

@media (prefers-reduced-motion: reduce) {
  .js-fade .shot,
  .js-fade .shot-tile img { opacity: 1; transition: none; }
}
