/* ==========================================================================
   Stacked On Track — design system
   Brand palette sampled from the original wordmark:
     cyan #00F0F0 -> magenta #F014B4, on black.
   ========================================================================== */

:root {
  /* brand */
  --cyan: #00f0f0;
  --magenta: #f014b4;
  --violet: #a064c8;
  --grad: linear-gradient(100deg, var(--cyan) 0%, var(--violet) 52%, var(--magenta) 100%);

  /* surfaces */
  --bg: #08080a;
  --bg-2: #101014;
  --bg-3: #17171d;
  --line: #26262e;
  --line-soft: #1c1c23;

  /* text */
  --fg: #f6f6f7;
  --fg-muted: #a3a3ad;
  --fg-dim: #70707c;

  /* type */
  --display: "Barlow Condensed", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* metrics */
  --shell: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* --------------------------------------------------------------- typography */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.95;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.75rem, 8vw, 5.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.25rem); }
h3 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); letter-spacing: 0.02em; }
h4 { font-size: 1.125rem; letter-spacing: 0.06em; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

strong { color: #fff; font-weight: 650; }

.eyebrow {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 1rem;
}

.lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 62ch;
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------------- layout */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(3.5rem, 9vw, 7rem); }

.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 5vw, 3.25rem); }

.rule {
  height: 3px;
  width: 72px;
  background: var(--grad);
  border: 0;
  margin: 0 0 1.75rem;
}

.alt { background: var(--bg-2); }

/* ------------------------------------------------------------------ skip nav */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: #000;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  z-index: 200;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 10, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 74px;
}

.brand { display: block; flex-shrink: 0; }
.brand img { width: clamp(132px, 17vw, 176px); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: var(--radius);
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
}

.nav a {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav a:hover { color: var(--fg); text-decoration: none; }

.nav a[aria-current="page"] {
  color: var(--fg);
  border-bottom-color: var(--cyan);
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 1.7rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--grad);
  color: #05050a;
}
.btn-primary:hover { box-shadow: 0 10px 34px -10px rgba(0, 240, 240, 0.65); }

.btn-ghost {
  border-color: var(--line);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* --------------------------------------------------------------------- hero */

.hero {
  position: relative;
  min-height: min(86vh, 760px);
  display: flex;
  align-items: center;
  padding-block: clamp(4rem, 10vw, 7rem);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  filter: grayscale(0.35) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(8,8,10,0.96) 0%, rgba(8,8,10,0.82) 45%, rgba(8,8,10,0.55) 100%),
    linear-gradient(to top, var(--bg) 2%, transparent 45%);
}

.hero .shell { position: relative; z-index: 1; }

.hero-logo {
  width: min(560px, 82vw);
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}

.hero h1 { max-width: 16ch; }

/* --------------------------------------------------------------- stats strip */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
}

.stat { background: var(--bg); padding: clamp(1.5rem, 4vw, 2.25rem) var(--gutter); }

.stat .n {
  font-family: var(--display);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1;
  display: block;
  margin-bottom: 0.35rem;
}

.stat .l {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* -------------------------------------------------------------------- cards */

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.5rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.card:hover::before { opacity: 1; }

.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--fg-muted); font-size: 1rem; }

.card .tag {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #05050a;
  background: var(--cyan);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 0.9rem;
}

.card.level-2 .tag { background: var(--violet); color: #fff; }
.card.level-3 .tag { background: var(--magenta); color: #fff; }
.card.level-4 .tag { background: #fff; color: #05050a; }

/* --------------------------------------------------------------- prose body */

.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.5em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2em; color: var(--fg); }
.prose ul { padding-left: 1.3em; margin: 0 0 1.4em; }
.prose li { margin-bottom: 0.6em; color: var(--fg-muted); }
.prose li strong { color: #fff; }
.prose > p { color: var(--fg-muted); }

.callout {
  border-left: 3px solid var(--cyan);
  background: var(--bg-2);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout p { color: var(--fg-muted); font-size: 1rem; }
.callout.warn { border-left-color: var(--magenta); }

/* table of contents */
.toc {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 3rem;
}
.toc h4 { color: var(--fg-dim); margin-bottom: 0.85rem; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: 0.35em; }

/* --------------------------------------------------------- flags / data list */

.deflist { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.deflist > div { background: var(--bg-2); padding: 1.1rem 1.35rem; display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 1.25rem; }
.deflist dt { font-family: var(--display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; font-size: 1.05rem; }
.deflist dd { margin: 0; color: var(--fg-muted); font-size: 1rem; }

.flag-chip {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 2px;
  margin-right: 0.55rem;
  vertical-align: -1px;
  border: 1px solid rgba(255,255,255,0.25);
}

/* ------------------------------------------------------------------ gallery */

.gallery {
  columns: 4 250px;
  column-gap: 12px;
}
.gallery figure { margin: 0 0 12px; break-inside: avoid; }
.gallery img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--bg-3);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.gallery a:hover img { transform: scale(1.015); filter: brightness(1.08); }

.album-nav { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.5rem; }
.album-nav a {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--fg-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45rem 0.95rem;
}
.album-nav a:hover, .album-nav a[aria-current="true"] {
  color: #05050a; background: var(--cyan); border-color: var(--cyan); text-decoration: none;
}

/* --------------------------------------------------------------- event list */

.events { display: grid; gap: 1px; background: var(--line-soft); border-block: 1px solid var(--line-soft); }

.event {
  background: var(--bg);
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.4rem var(--gutter);
}

.event .date {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  color: var(--cyan);
}
.event .date span { display: block; font-size: 0.85rem; letter-spacing: 0.18em; color: var(--fg-dim); margin-top: 0.3rem; }
.event .where { font-family: var(--display); font-size: 1.4rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.event .meta { color: var(--fg-dim); font-size: 0.95rem; }

/* ------------------------------------------------------------------- footer */

.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-bottom: 2.5rem;
}

.footer-grid img { width: 170px; margin-bottom: 1rem; }
.footer-grid p { color: var(--fg-dim); font-size: 0.95rem; }
.footer-grid h4 { color: var(--fg); margin-bottom: 0.9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-grid li a { color: var(--fg-muted); font-size: 0.97rem; }
.footer-grid li a:hover { color: var(--cyan); }

.colophon {
  border-top: 1px solid var(--line-soft);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  color: var(--fg-dim);
  font-size: 0.875rem;
}

/* -------------------------------------------------------------------- forms */

.form { max-width: 560px; display: grid; gap: 1.15rem; }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--fg-muted);
}
.field input, .field textarea {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  padding: 0.8rem 1rem;
  width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--cyan); outline: none; }
.field textarea { min-height: 150px; resize: vertical; }

/* ----------------------------------------------------------------- lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(4, 4, 6, 0.96);
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox[hidden] { display: none; }

.lb-stage { margin: 0; display: grid; justify-items: center; gap: 1rem; min-width: 0; }
.lb-stage img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  border-radius: var(--radius);
}
.lb-stage figcaption {
  font-family: var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--fg-dim);
}

.lightbox button {
  background: none;
  border: 0;
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 2.75rem;
  line-height: 1;
  padding: 0.5rem;
}
.lightbox button:hover { color: var(--cyan); }

.lb-close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  font-size: 2.25rem !important;
}

@media (max-width: 640px) {
  .lightbox { grid-template-columns: 44px 1fr 44px; padding-inline: 0.25rem; }
  .lightbox button { font-size: 2rem; }
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .nav:not(.open) { display: none; }
  .nav a { padding-block: 0.8rem; border-bottom: 1px solid var(--line-soft); }
  .nav a[aria-current="page"] { border-bottom-color: var(--cyan); }

  .event { grid-template-columns: 1fr; gap: 0.5rem; }
  .deflist > div { grid-template-columns: 1fr; gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ------------------------------------------------- utilities (CSP: no inline styles) */

.pb-0 { padding-bottom: 0; }
.pb-sm { padding-bottom: 2rem; }
.mt-sm { margin-top: 1.5rem; }
.mt-md { margin-top: 2rem; }
.mt-lg { margin-top: 2.5rem; }
.muted { color: var(--fg-muted); }
.dim { color: var(--fg-dim); }
.quote-lede { margin-bottom: 1.5rem; }
.past-head { margin-top: 3.5rem; color: var(--fg-dim); }
.contact-cols { align-items: start; gap: clamp(2rem, 5vw, 4rem); }

/* flag swatches */
.flag-yellow     { background: #f5d300; }
.flag-black      { background: #111; }
.flag-red        { background: #d81228; }
.flag-blueyellow { background: linear-gradient(135deg, #1a63c4 50%, #f5d300 50%); }
.flag-checkered  { background: repeating-conic-gradient(#fff 0 25%, #111 0 50%) 0 0 / 8px 8px; }

/* honeypot — must be reachable to bots but never to people or screen readers */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: 0; font-size: 0.97rem; min-height: 1.5em; }
.form-status.ok   { color: var(--cyan); }
.form-status.err  { color: var(--magenta); }
