/* VG Run Club — design system v2
   Palette: Venture Guides blues (#406DDC, #326AF4, #243152) on a dark navy base
   Style: hoop.dev-inspired — Inter + JetBrains Mono, rounded cards, mono labels,
   sentence-case headlines, subtle blue glows */

:root {
  --bg: #0a0a0a;
  --panel: #141414;
  --raised: #1c1c1c;
  --line: #262626;
  --white: #fafafa;
  --muted: #9a9a9a;
  --blue: #326af4;
  --bright: #4f83ff;
  --sans: "Ranade", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", monospace;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--blue); color: var(--white); }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Background FX ---------- */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(250, 250, 250, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 250, 250, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, black 40%, transparent 100%);
}

.bg-fx::before,
.bg-fx::after {
  content: "";
  position: absolute;
  width: 55vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}

.bg-fx::before {
  top: -20%;
  right: -15%;
  background: radial-gradient(circle, rgba(50, 106, 244, 0.14), transparent 60%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.bg-fx::after {
  bottom: -25%;
  left: -15%;
  background: radial-gradient(circle, rgba(79, 131, 255, 0.08), transparent 60%);
  animation: drift-b 34s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-12vw, 14vh) scale(1.15); }
}

@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.1); }
  to   { transform: translate(10vw, -12vh) scale(0.95); }
}

/* Boston street map behind the hero (pulse animation lives inside the SVG) */

.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; width: 100%; text-align: center; }

.hero-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 42%;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 85% 80% at 55% 45%, black 30%, transparent 98%);
  -webkit-mask-image: radial-gradient(ellipse 85% 80% at 55% 45%, black 30%, transparent 98%);
  animation: map-in 1.6s ease both;
}

@keyframes map-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-fx::before, .bg-fx::after, .hero-map { animation: none; }
}

/* ---------- Header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.logo span { color: var(--bright); }

.nav-links {
  display: flex;
  gap: 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a { color: var(--muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--white); border-bottom: 2px solid var(--bright); padding-bottom: 2px; }

/* ---------- Hero ---------- */

.hero {
  min-height: 78svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 0;
  background:
    radial-gradient(ellipse 70% 55% at 75% 15%, rgba(50, 106, 244, 0.10), transparent),
    var(--bg);
}

.kicker {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--bright);
  margin-bottom: 1.25rem;
}

h1 {
  font-weight: 700;
  font-size: clamp(2.8rem, 7.5vw, 5.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

h1 .accent { color: var(--bright); }

.hero p {
  margin-top: 1.5rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-block;
  margin-top: 2.5rem;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 0 1px rgba(50, 106, 244, 0.4), 0 8px 24px rgba(50, 106, 244, 0.25);
}

.btn:hover {
  background: var(--bright);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(50, 106, 244, 0.6), 0 12px 32px rgba(50, 106, 244, 0.35);
}

.btn.ghost {
  background: var(--panel);
  color: var(--white);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.ghost:hover { border-color: var(--bright); color: var(--bright); }

.text-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--bright);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s;
}

.text-link:hover { border-color: var(--bright); }

.text-link::after { content: " →"; }

/* ---------- Sections ---------- */

section { padding: 6rem 0; }

section.panel {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

h2 {
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

h2 .accent { color: var(--bright); }

.section-intro { max-width: 38rem; color: var(--muted); }

/* ---------- Stats band ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  text-align: center;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1rem;
}

.stat .num {
  font-weight: 700;
  font-size: 2.75rem;
  letter-spacing: -0.02em;
  color: var(--bright);
  line-height: 1;
}

.stat .label {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

/* ---------- Cards (routes) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.card .tag {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--bright);
}

.card h3 {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0.6rem 0 0.6rem;
}

.card p { color: var(--muted); font-size: 0.92rem; flex-grow: 1; }

.card .meta {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  color: var(--white);
}

/* ---------- Strava embed (inside route cards) ---------- */

.card .embed {
  margin-top: 1.25rem;
}

.card .embed iframe {
  border: 1px solid var(--line) !important;
  border-radius: 8px;
  max-width: 100%;
}

/* ---------- Spotify playlist ---------- */

.playlist {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.gallery-grid img,
.gallery-grid .ph {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.gallery-grid .ph {
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.7rem;
  color: var(--muted);
}

.gallery-grid figure {
  margin: 0;
}

.gallery-grid figcaption {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  padding: 0.75rem 0.25rem 0;
}

.gallery-grid figcaption .accent { color: var(--bright); }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.footer-inner a:hover { color: var(--bright); }

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  .nav-links { gap: 1rem; font-size: 0.82rem; }
  section { padding: 4rem 0; }
}
