/* NXL Tour — global base stylesheet.
   Loaded on EVERY page via the base master template (base/assets), after
   Bootstrap and before section-scoped sheets (precheckin's wizard.css), so a
   section's own CSS can override. Covers the shared site chrome, base
   typography, the home page (featured event + events list) and the footer.

   NXL brand palette — red + blue (matches the league/event logos). */
:root {
  --grw-red: #e31837;
  --grw-blue: #003da5;
  --grw-navy: #041e42;
  --grw-ink: #0f172a;
  --grw-muted: #64748b;
  --grw-line: #e2e8f0;
  --grw-content: 1040px;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: var(--grw-ink);
  background: #0b1220; /* dark slate with a blue tint */
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ---- App shell: header / content / footer stacked; sidebar floats ---- */
.grw {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.grw-main {
  flex: 1;
  width: 100%;
  max-width: var(--grw-content);
  margin: 0 auto;
  padding: 28px 20px 56px;
}

/* ---- Site header (brand) — solid two-tone, mirrors the NXL badge ---- */
.grw-header {
  position: sticky;
  top: 0;
  z-index: 20;
  /* Hard color stops render as two solid panels (red brand side, blue side). */
  background: linear-gradient(90deg, var(--grw-red) 0%, var(--grw-red) 55%, var(--grw-blue) 55%, var(--grw-blue) 100%);
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
  isolation: isolate;
}
/* Header background photos — one on the red side, one on the blue side, kept
   subtle (opacity) so the red/blue brand panels stay dominant. The pseudo
   layers paint above the gradient but below the brand content (z-index -1
   inside the isolated .grw-header stacking context). */
.grw-header::before,
.grw-header::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: .4;
  z-index: -1;
  pointer-events: none;
}
.grw-header::before { left: 0; right: 45%; background-image: url("header-red.jpg"); }
.grw-header::after  { left: 55%; right: 0; background-image: url("header-blue.jpg"); }
.grw-header-inner {
  max-width: var(--grw-content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.grw-brand { display: flex; align-items: center; gap: 12px; }
.grw-logo {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  padding: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.grw-brand-text { min-width: 0; }
.grw-title { margin: 0; font-size: 1.2rem; letter-spacing: .01em; }
.grw-tagline { margin: 2px 0 0; font-size: .85rem; color: rgba(255, 255, 255, .88); }

/* ---- Language picker — compact side rail (fixed, right edge) ---- */
.grw-side {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: var(--grw-blue);
  border-radius: 12px 0 0 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .35);
}
.grw-langs-label {
  font-size: .6rem;
  color: rgba(255, 255, 255, .8);
  text-transform: uppercase;
  letter-spacing: .08em;
  writing-mode: vertical-rl;
  margin: 2px 0 6px;
}
.grw-lang {
  appearance: none;
  border: none;
  background: transparent;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
}
.grw-lang:hover { background: rgba(255, 255, 255, .16); }
.grw-lang[aria-current="true"] {
  background: #fff;
  box-shadow: 0 0 0 2px var(--grw-red);
}
.grw-lang-flag { font-size: 1.05rem; line-height: 1; }

/* ---- Home: featured (upcoming) event ---- */
.grw-featured {
  max-width: 720px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.grw-featured-logo-link {
  flex: none;
  display: block;
  width: 240px;
}
.grw-featured-logo {
  display: block;
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
}
.grw-featured-info { flex: 1; min-width: 0; }
.grw-featured-kicker {
  margin: 0 0 4px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #f87171;
  font-weight: 700;
}
.grw-featured-name { margin: 0; font-size: 1.6rem; color: #fff; }
.grw-featured-date { margin: 4px 0 0; color: #93c5fd; font-weight: 600; }
.grw-featured-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 0 22px;
  text-decoration: none;
}

/* ---- Home / events list ---- */
.grw-events { max-width: 720px; margin: 0 auto; }
.grw-events h2 { font-size: 1.35rem; margin: 0 0 12px; color: #ecf5ff; }
.grw-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.grw-event {
  background: #fff;
  border: 1px solid var(--grw-line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .08);
}
.grw-event-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}
.grw-event-name { font-weight: 600; }
.grw-event-date { color: var(--grw-muted); font-size: .85rem; white-space: nowrap; }
.grw-no-events { color: #93c5fd; }

/* ---- Home: about / intro ---- */
.grw-about {
  max-width: 720px;
  margin: 28px auto 0;
  padding: 24px 26px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
}
.grw-about h2 { color: #fff; margin: 0 0 8px; font-size: 1.35rem; }
.grw-about p { margin: 0; color: #cbd5e1; }

/* ---- Wizard action bar (in-flow; sticky bottom on the wizard page) ---- */
.grw-nav {
  max-width: 720px;
  margin: 28px auto 0;
  display: flex;
  gap: 10px;
}
.grw-section-home .grw-nav,
.grw-section-privacy-notice .grw-nav { display: none; }
.grw-btn {
  flex: 1;
  min-height: 50px;
  border-radius: 12px;
  border: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.grw-btn-next { background: var(--grw-red); color: #fff; }
.grw-btn-back { background: #e2e8f0; color: var(--grw-ink); flex: .7; }
.grw-btn-reset { background: transparent; color: #93c5fd; text-decoration: underline; }
.grw-btn[hidden] { display: none; }

/* ---- Site footer: partner logos, links, version ---- */
.grw-footer {
  background: var(--grw-navy);
  color: rgba(255, 255, 255, .85);
  border-top: 2px solid var(--grw-red);
  padding: 26px 20px calc(26px + env(safe-area-inset-bottom));
}
.grw-footer-inner {
  max-width: var(--grw-content);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  justify-content: space-between;
}
.grw-footer-partners { display: flex; align-items: center; gap: 20px; }
.grw-footer-logo-link { display: inline-flex; align-items: center; opacity: .95; }
.grw-footer-logo-link:hover { opacity: 1; }
.grw-footer-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}
.grw-footer-logo-pbleague {
  height: 44px;
  background: #fff;
  border-radius: 8px;
  padding: 3px 6px;
}
.grw-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  font-size: .92rem;
}
.grw-footer-links a { color: #93c5fd; text-decoration: none; }
.grw-footer-links a:hover { text-decoration: underline; }
.grw-footer-mail { font-weight: 600; color: #bfdbfe; }
.grw-footer-meta { margin: 0; }
.grw-version {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .55);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.grw-version-sep { opacity: .6; }

/* ---- Pre-check-in closed legend ---- */
.grw-closed {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px;
  text-align: center;
}
.grw-closed h2 { font-size: 1.35rem; margin: 0 0 8px; color: #fff; }
.grw-closed p { margin: 0; color: #93c5fd; }

/* ---- Home: pending event note (registration opens soon) ---- */
.grw-featured-pending {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: #93c5fd;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.grw-event-upcoming {
  padding: 4px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #0369a1;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ---- Static content pages (e.g. privacy notice) ---- */
.grw-prose { max-width: 720px; margin: 0 auto; color: #e2e8f0; }
.grw-prose h1 { color: #fff; margin: 0 0 10px; }
.grw-prose h2 { color: #fff; margin: 22px 0 6px; font-size: 1.2rem; }
.grw-prose p, .grw-prose li { color: #cbd5e1; }
.grw-prose-body h2:first-child { margin-top: 0; }
.grw-lead { color: #93c5fd; font-size: 1.05rem; margin: 0 0 12px; }
.grw-delete {
  margin-top: 28px;
  padding: 18px 20px;
  background: rgba(0, 61, 165, .18);
  border: 1px solid rgba(0, 61, 165, .5);
  border-radius: 14px;
}
.grw-delete h2 { margin-top: 0; }
.grw-email { color: #93c5fd; font-weight: 700; }
.grw-back-home {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  text-decoration: none;
}

/* ---- Responsive ---- */
@media (min-width: 720px) {
  .grw-event-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grw-main { padding: 20px 16px 48px; }
  .grw-tagline { display: none; }
  /* Side rail collapses into a horizontal strip between header and content. */
  .grw-side {
    position: static;
    transform: none;
    flex-direction: row;
    align-self: center;
    gap: 2px;
    margin: 12px 12px 0;
    border-radius: 12px;
    padding: 6px 8px;
  }
  .grw-langs-label { display: none; }
  .grw-lang { width: 30px; height: 30px; font-size: .95rem; }
  .grw-featured { flex-direction: column; text-align: center; gap: 18px; }
  .grw-featured-logo-link { width: 200px; }
  .grw-featured-info { text-align: center; }
  .grw-footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}
