/* ============================================
   Grain & Gravity — film photography + coaster log
   Design tokens: Kodak Gold 200 palette x coaster marquee energy
   ============================================ */
:root {
  --bg: #15120c;
  --surface: #1e1810;
  --surface-2: #271f14;
  --border: #3c3120;

  --text: #f4ecda;
  --text-muted: #a89878;

  --gold: #e8a53c;     /* Kodak Gold box / marquee bulb — primary accent */
  --rust: #d85a34;     /* film-box red / light-leak — secondary accent */
  --moss: #8a9a5b;     /* Gold 200's warm shadow-green — tertiary accent */
  --cream: #f4ecda;    /* print paper */

  --font-display: "Bungee", system-ui, sans-serif;
  --font-body: "Manrope", -apple-system, sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;

  --radius: 6px;
  --gap: 20px;
  --max-width: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* film grain overlay, sits above everything, blocks no clicks */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

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

a { color: inherit; }

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.stamp {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

/* ============================================
   Header / nav / sprocket strip
   ============================================ */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(21, 18, 12, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  color: var(--gold);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
  position: relative;
  z-index: 60;
}

.brand span { color: var(--text); font-size: 0.85em; }
.brand small {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

nav.site-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

nav.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s;
  position: relative;
  padding-bottom: 3px;
}
nav.site-nav a:hover { color: var(--gold); }
nav.site-nav a.active { color: var(--cream); }
nav.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--rust);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  width: 38px; height: 38px;
  font-size: 1.3rem;
  cursor: pointer;
  position: relative;
  z-index: 60;
}

/* sprocket strip — film-edge motif doubling as the marquee chase */
.sprocket-strip {
  height: 10px;
  background:
    repeating-linear-gradient(90deg, var(--bg) 0 6px, transparent 6px 22px),
    repeating-linear-gradient(90deg, var(--gold) 0 16px, var(--rust) 16px 32px);
  background-size: 22px 10px, 32px 10px;
  animation: chase 2.4s linear infinite;
}

@keyframes chase {
  to { background-position: 22px 0, 32px 0; }
}

@media (max-width: 720px) {
  /* backdrop-filter on the header would otherwise make it the containing
     block for the fixed-position nav overlay below, trapping it inside
     the header's own (tiny) box instead of covering the viewport. */
  header.site-header { backdrop-filter: none; }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  nav.site-nav {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 12, 8, 0.98);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  }

  nav.site-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  nav.site-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 34px;
    padding: 0;
    font-size: 1.2rem;
  }

  nav.site-nav a { padding: 4px 6px; }
  nav.site-nav a.active::after { bottom: -10px; }

  .header-inner { flex-wrap: nowrap; }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 88px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 -10% 0 -10%;
  background:
    radial-gradient(circle at 25% 25%, rgba(232, 165, 60, 0.18), transparent 55%),
    radial-gradient(circle at 75% 30%, rgba(216, 90, 52, 0.14), transparent 55%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 85%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 85%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.4rem, 7.5vw, 4.8rem);
  line-height: 1;
  margin: 0 0 18px;
  color: var(--text);
  text-shadow: 0 0 26px rgba(232, 165, 60, 0.3);
  position: relative;
}

.hero p.lede {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 auto;
  position: relative;
}

.hero .roll {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--moss);
  margin: 18px 0 0;
  position: relative;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
  position: relative;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1200;
  font-weight: 700;
}
.btn.primary:hover { box-shadow: 0 0 18px rgba(232, 165, 60, 0.45); }
.btn.ghost:hover { border-color: var(--rust); color: var(--rust); }

/* ============================================
   Section scaffolding
   ============================================ */
.section {
  padding: 64px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: 1.6rem;
  color: var(--text);
  margin: 0 0 10px;
}

.section-head p {
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 auto;
}

.section-head .stamp { display: block; margin-bottom: 10px; }

/* ============================================
   Filter tags
   ============================================ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0 24px 40px;
  font-family: var(--font-mono);
}

.filters button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.filters button:hover { color: var(--text); }

.filters button.active {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(232, 165, 60, 0.4);
}

/* ============================================
   Gallery — CSS-columns masonry
   ============================================ */
.gallery {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 96px;
  column-count: 1;
  column-gap: var(--gap);
}

@media (min-width: 640px)  { .gallery { column-count: 2; } }
@media (min-width: 980px)  { .gallery { column-count: 3; } }
@media (min-width: 1320px) { .gallery { column-count: 4; } }

.card {
  break-inside: avoid;
  margin-bottom: var(--gap);
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--rust);
  transform: translateY(-2px);
}

.card img {
  width: 100%;
  height: auto;
  filter: sepia(0.12) saturate(1.08) contrast(1.02);
}

/* print-plaque caption, stamped like the back of a photo */
.plaque {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px 12px;
  background: linear-gradient(to top, rgba(21,18,12,0.94), rgba(21,18,12,0));
  transform: translateY(60%);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.card:hover .plaque,
.card:focus-within .plaque {
  transform: translateY(0);
  opacity: 1;
}

.plaque .title {
  font-weight: 700;
  font-size: 0.95rem;
}

.plaque .meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.gallery-empty {
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  padding: 64px 0;
  display: none;
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 5, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 40px 24px;
}

.lightbox.open { display: flex; }

.lightbox-inner {
  max-width: 1100px;
  max-height: 90vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: pop-in 0.18s ease;
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox img {
  max-height: 70vh;
  width: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  filter: sepia(0.12) saturate(1.08) contrast(1.02);
}

.lightbox .plaque-static {
  margin-top: 16px;
  text-align: center;
}

.lightbox .plaque-static .title {
  font-weight: 700;
  font-size: 1.05rem;
}

.lightbox .plaque-static .meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.lightbox .plaque-static .exif {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--moss);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: border-color 0.15s;
}

.lightbox-close:hover,
.lightbox-nav:hover { border-color: var(--gold); }

.lightbox-close { top: 24px; right: 24px; }
.lightbox-nav.prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 24px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lightbox-nav { display: none; }
}

/* ============================================
   Coaster-track timeline (Record of Parks & Rides)
   ============================================ */
.track-page-intro {
  text-align: center;
  padding: 56px 24px 8px;
}

.track-wrap {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.track-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.track-ties {
  fill: none;
  stroke: var(--border);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 4 14;
}

.track-rail {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(232, 165, 60, 0.35));
}

.track-cart {
  position: absolute;
  top: 0; left: 0;
  width: 34px;
  height: 26px;
  z-index: 2;
  opacity: 0;
  transform: translate(-17px, -13px);
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  transition: opacity 0.2s;
}

.station {
  position: relative;
  z-index: 1;
  width: 46%;
  margin-bottom: 64px;
  opacity: 0.35;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.station.in-view { opacity: 1; transform: translateY(0); }

.station.left { margin-right: 54%; text-align: right; }
.station.right { margin-left: 54%; text-align: left; }

.station-dot {
  position: absolute;
  top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--rust);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border);
}
.station.left .station-dot { right: -33px; }
.station.right .station-dot { left: -33px; }

.station-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: inline-block;
  text-align: left;
  max-width: 100%;
}

.station-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--moss);
}

.station-park {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  margin: 6px 0 8px;
}

.station-rides {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  font-size: 0.9rem;
}
.station-rides li {
  padding: 3px 0;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.station-rides li:first-child { border-top: none; }
.station-rides li .tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--rust);
}
.station-rides li .count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--moss);
}

.station-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.station-link {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-decoration: none;
}
.station-link:hover { color: var(--rust); }

@media (max-width: 680px) {
  .track-svg { display: none; }
  .track-cart { display: none; }
  .station, .station.left, .station.right {
    width: 100%;
    margin: 0 0 40px;
    text-align: left;
  }
  .station-dot { display: none; }
}

/* ============================================
   Stat strip (record page summary numbers)
   ============================================ */
.stat-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 36px;
  padding: 8px 24px 48px;
  text-align: center;
}
.stat-strip .stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
}
.stat-strip .stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ============================================
   Trip reports
   ============================================ */
.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
  padding: 0 24px 96px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.trip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.2s, transform 0.2s;
}
.trip-card:hover { border-color: var(--rust); transform: translateY(-2px); }
.trip-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; filter: sepia(0.12) saturate(1.08); }
.trip-card .body { padding: 16px 18px 20px; }
.trip-card .stamp { display: block; margin-bottom: 8px; }
.trip-card h3 { font-size: 1.05rem; margin: 0 0 8px; color: var(--text); }
.trip-card p { color: var(--text-muted); font-size: 0.88rem; margin: 0; }

.trip-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.trip-detail .stamp { display: block; margin-bottom: 10px; }
.trip-detail h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 16px; }
.trip-detail .trip-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--moss);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 28px;
}
.trip-detail figure { margin: 28px 0; }
.trip-detail figure img { border-radius: var(--radius); border: 1px solid var(--border); filter: sepia(0.12) saturate(1.08); }
.trip-detail figcaption { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); margin-top: 8px; }
.trip-detail p { color: var(--text); font-size: 1rem; line-height: 1.75; }
.trip-detail .back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}
.trip-detail .back-link:hover { color: var(--rust); }
.trip-not-found { text-align: center; padding: 96px 24px; color: var(--text-muted); font-family: var(--font-mono); }

/* ============================================
   About / gear page
   ============================================ */
.about-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 40px;
  text-align: center;
}
.about-hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin: 0 0 16px; }
.about-hero p { color: var(--text-muted); font-size: 1.05rem; }

.gear-strip {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 96px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
}

.gear-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.gear-card .stamp { display: block; margin-bottom: 10px; }
.gear-card h3 { font-size: 1.05rem; margin: 0 0 10px; color: var(--gold); }
.gear-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.about-body {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 96px;
}
.about-body p { color: var(--text); font-size: 1rem; line-height: 1.8; margin-bottom: 20px; }

/* ============================================
   Footer
   ============================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

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

/* ============================================
   Motion preference
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sprocket-strip { animation: none; background-position: 0 0; }
  .card, .filters button, .lightbox-inner, .station, .btn, nav.site-nav { transition: none; animation: none; }
}
