/* ==========================================================================
   GROUNDUP SPORTS — layout.css
   Shell chrome: ticker, floating masthead, mobile drawer, social rail,
   footer, lightbox.
   ========================================================================== */

/* Page body is inset on the left to clear the fixed social rail. */
@media (min-width: 1180px) {
  .page { padding-left: var(--rail); }
}

/* --------------------------------------------------------------------------
   TICKER
   A slim forest strip above everything — club news, always moving.
   -------------------------------------------------------------------------- */
.ticker {
  background: var(--forest);
  color: #b7cdbe;
  font-family: var(--body);
  font-size: .78rem;
  letter-spacing: .01em;
  overflow: hidden;
  white-space: nowrap;
}
.ticker__inner {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  padding: .5rem 0;
  width: max-content;
  animation: slide 46s linear infinite;
}
.ticker__inner:hover { animation-play-state: paused; }
.ticker b { color: #fff; font-weight: 600; }
.ticker i { font-style: normal; color: #7fd3a8; }
@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   MASTHEAD
   A white pill floating over whatever section is beneath it. The bar itself
   is the card; the header only positions it.
   -------------------------------------------------------------------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  padding-block: .7rem;
  background: transparent;
  transition: background .25s ease, box-shadow .25s ease;
}
/* Filled in by site.js once the page has scrolled past the hero lip */
.masthead.is-stuck { background: rgba(255,255,255,.82); backdrop-filter: blur(12px); }

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: .55rem .7rem .55rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-card);
}

/* Nameplate: crest + stacked wordmark */
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex: none;
}
.brand svg { width: 26px; height: 32px; flex: none; color: var(--teal); }
.brand__name {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand__sub {
  display: block;
  font-family: var(--body);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}

/* Desktop nav — quiet links, mint pill on the active one */
.nav { display: flex; align-items: center; gap: clamp(.2rem, 1.2vw, .5rem); }

.nav__link {
  position: relative;
  font-family: var(--body);
  font-size: .93rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  color: var(--ink-2);
  padding: .5rem .85rem;
  border-radius: var(--r-pill);
  transition: background .2s ease, color .2s ease;
}
.nav__link:hover { background: var(--paper-2); color: var(--ink); }

.nav__link[aria-current="page"] { background: var(--paper-3); color: var(--ink); font-weight: 600; }

/* Register sits apart from the nav proper — it is the conversion */
.nav__cta {
  margin-left: .35rem;
  padding: .62rem 1.15rem;
  font-size: .88rem;
  background: var(--forest);
  border-color: var(--forest);
}
.nav__cta:hover { background: var(--teal); border-color: var(--teal); }

/* Hamburger */
.burger {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: none;
}
.burger i { display: block; width: 16px; height: 1.6px; border-radius: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

@media (max-width: 980px) {
  .burger { display: flex; }

  .nav {
    position: fixed;
    inset: .7rem .7rem auto auto;
    width: min(86vw, 330px);
    max-height: calc(100vh - 1.4rem);
    overflow-y: auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    padding: 1rem;
    transform: translateY(-12px) scale(.97);
    opacity: 0;
    visibility: hidden;
    transform-origin: top right;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1), opacity .22s ease, visibility .28s;
    z-index: 70;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }

  .nav__link {
    font-size: 1.05rem;
    padding: .85rem 1rem;
    border-radius: var(--r-md);
  }

  .nav__cta { margin: .8rem 0 0; justify-content: center; }

  .nav-veil {
    position: fixed;
    inset: 0;
    background: rgba(12, 46, 28, .38);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    z-index: 65;
  }
  .nav-veil.is-on { opacity: 1; visibility: visible; }
}

/* --------------------------------------------------------------------------
   SOCIAL RAIL
   A floating white capsule pinned to the left edge on wide screens.
   Collapses to a card strip above the footer on narrow ones.
   -------------------------------------------------------------------------- */
.rail {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow);
}
@media (max-width: 1179px) { .rail { display: none; } }

.rail__label { display: none; }

.rail__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  text-decoration: none;
  color: var(--ink);
  padding: .1rem 0;
}
.rail__item svg { width: 17px; height: 17px; fill: currentColor; transition: transform .2s ease; }
.rail__item:hover { color: var(--accent); }
.rail__item:hover svg { transform: translateY(-2px); }

/* Rotated follower count. tnum keeps digits from jittering as they tick up. */
.rail__count {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--body);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--ink-3);
  font-feature-settings: "tnum" 1;
}
.rail__item:hover .rail__count { color: var(--accent); }

.rail__item--fb { --accent: #1877f2; }
.rail__item--ig { --accent: #c9317f; }
.rail__item--yt { --accent: #d3202a; }

.rail__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }

/* Mobile / tablet strip */
.social-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
  max-width: var(--maxw);
  margin: 0 auto clamp(1.4rem, 4vw, 2.4rem);
  padding-inline: var(--gut);
}
@media (min-width: 1180px) { .social-strip { display: none; } }

.social-strip a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .95rem .4rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper-2);
  border-radius: var(--r-md);
}
.social-strip a:hover { background: var(--paper-3); }
.social-strip svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.social-strip b {
  font-family: var(--display);
  font-size: .95rem;
  letter-spacing: -.01em;
  font-feature-settings: "tnum" 1;
}
.social-strip span {
  font-size: .78rem;
  color: var(--ink-3);
}
@media (max-width: 520px) {
  .social-strip span { display: none; }
}

/* --------------------------------------------------------------------------
   FOOTER
   Deep forest slab, rounded at the top, with a soft green horizon glow so it
   reads like the far end of a pitch rather than a black box.
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  background: var(--forest);
  color: #b7cdbe;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  margin-inline: clamp(10px, 2vw, 26px);
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -46%;
  width: min(160%, 1500px);
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(126, 198, 148, .3), transparent 72%);
  pointer-events: none;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.2rem;
  padding-block: clamp(2.4rem, 5vw, 4rem);
}
@media (max-width: 900px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px)  { .footer__top { grid-template-columns: 1fr; gap: 1.8rem; } }

.footer h4 {
  font-family: var(--body);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #86ac95;
  margin-bottom: 1rem;
}
.footer a { color: #b7cdbe; text-decoration: none; }
.footer a:hover { color: #fff; }

.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .94rem; }

.footer .brand svg { width: 30px; height: 36px; color: #7fd3a8; }
.footer .brand__name { color: #fff; font-size: 1.2rem; line-height: 1.05; }
.footer__blurb { font-size: .93rem; color: #8fa998; margin-top: 1rem; max-width: 34ch; }

/* Oversized sign-off, printed under the footer wordmark */
.footer__shout {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: .98;
  letter-spacing: -.026em;
  text-transform: uppercase;
  color: #fff;
  margin: 1.4rem 0 0;
}

/* Newsletter + socials row, injected by site.js on every page */
.footer__sign {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.6rem;
  padding-block: 1.4rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.subscribe { display: flex; gap: .5rem; flex-wrap: wrap; }
.subscribe input {
  min-width: min(260px, 62vw);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-pill);
  padding: .68rem 1.1rem;
  color: #fff;
  font-size: .92rem;
}
.subscribe input::placeholder { color: #7d9a88; }
.subscribe input:focus { outline: 0; border-color: #7fd3a8; background: rgba(255,255,255,.1); }
.subscribe button {
  border-radius: var(--r-pill);
  padding: .68rem 1.3rem;
  background: #7fd3a8;
  color: var(--forest);
  font-size: .92rem;
  font-weight: 600;
  transition: background .2s ease, transform .16s ease;
}
.subscribe button:hover { background: #fff; transform: translateY(-1px); }
.subscribe .ok { align-self: center; color: #7fd3a8; font-size: .9rem; }

.socials { display: flex; gap: .5rem; }
.socials a {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  transition: background .2s ease, color .2s ease, transform .16s ease;
}
.socials svg { width: 15px; height: 15px; fill: currentColor; }
.socials a:hover { background: #fff; color: var(--forest); transform: translateY(-2px); }

.footer__base {
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding-block: 1.1rem;
  font-size: .82rem;
  color: #7d9a88;
}

/* --------------------------------------------------------------------------
   VIDEO LIGHTBOX
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--gut);
  background: rgba(9, 30, 19, .88);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__frame {
  width: min(1040px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--r-lg);
  overflow: hidden;
  transform: scale(.97);
  transition: transform .3s ease;
}
.lightbox.is-open .lightbox__frame { transform: none; }
.lightbox__frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.lightbox__close {
  position: absolute;
  top: 1.2rem; right: 1.4rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--forest);
  background: #fff;
  font-size: .88rem;
  border-radius: var(--r-pill);
  padding: .5rem 1rem;
}
.lightbox__close:hover { background: #7fd3a8; }

body.is-locked { overflow: hidden; }
