/* The Survival Trip — dark, gritty, raw earth/jungle. Mobile-first.
   Inspired by the mood of survival-challenge television (dark stats, condensed type,
   torchlight accents) but original in wordmark, palette, and motifs. No tiki imagery. */

:root {
  --bg: #0c0b09;
  --bg-deep: #070605;
  --bg-panel: #14110e;
  --cream: #eadcc6;
  --card: #1a1612;
  --ink: #eadcc6;
  --ink-soft: #b9a890;
  --forest: #1a2418;
  --forest-mid: #3e5234;
  --forest-deep: #0c0b09;
  --moss: #5a6e3e;
  --rust: #c45a28;
  --rust-dark: #9a3e18;
  --ember: #e07030;
  --flame: #f0a040;
  --gold: #c9943a;
  --gold-soft: #d4b06a;
  --line: #3a3228;
  --water: #8aa3a0;
  --link: #d4a04a;
  --ash: #2a2420;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-tight: 0 2px 10px rgba(0, 0, 0, 0.35);
  --radius: 6px;
  --font-display: "Rubik Dirt", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-condensed: "Oswald", "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 4.25rem;
  --max: 70rem;
  --measure: 42rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg-deep);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(42, 24, 14, 0.45), transparent 55%),
    url("../icons/grain.svg");
  background-repeat: no-repeat, repeat;
  background-size: 100% 40rem, 256px 256px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--ember); }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--rust);
  color: var(--cream);
  padding: 0.5rem 0.9rem;
  z-index: 1000;
  border-radius: 0 0 4px 4px;
}
.skip-link:focus { top: 0; }

/* Header */
.site-header {
  background: #0a0908;
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(201, 148, 58, 0.35);
}
.site-header::after {
  content: "";
  display: block;
  height: 6px;
  background: url("../icons/tribal.svg") center / 64px 10px repeat-x;
  opacity: 0.85;
  pointer-events: none;
}

.site-header a { color: inherit; text-decoration: none; }

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex: 1;
}

.brand-mark {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: #120e0b;
  box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(224, 112, 48, 0.35);
}

.brand-text { min-width: 0; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  line-height: 1.15;
  display: block;
  text-transform: uppercase;
}

.brand-tag {
  display: none;
  font-family: var(--font-condensed);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
  line-height: 1.2;
  margin-top: 0.15rem;
}

.nav-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(201, 148, 58, 0.4);
  color: var(--cream);
  border-radius: 4px;
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--cream);
  border-radius: 1px;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle span { transition: transform 0.2s ease, opacity 0.2s ease; }

.site-nav {
  display: none;
  width: 100%;
  flex-basis: 100%;
}
.site-nav.open { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-nav a {
  display: block;
  padding: 0.65rem 0.8rem;
  border-radius: 4px;
  color: var(--cream);
  font-family: var(--font-condensed);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.site-nav a:hover,
.site-nav a:focus-visible { background: rgba(224, 112, 48, 0.12); }
.site-nav a[aria-current="page"] {
  background: rgba(201, 148, 58, 0.16);
  color: var(--gold-soft);
}

/* Main */
main {
  flex: 1;
  width: 100%;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.measure { max-width: var(--measure); }

/* Hero — torch-lit */
.hero {
  position: relative;
  color: var(--cream);
  isolation: isolate;
  min-height: 28rem;
  display: flex;
  align-items: flex-end;
  background: #120e0b center/cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0c0b09 0%, rgba(12, 11, 9, 0.88) 28%, rgba(12, 11, 9, 0.4) 58%, rgba(12, 11, 9, 0.62) 100%),
    linear-gradient(to right, rgba(12, 11, 9, 0.62), transparent 22%, transparent 78%, rgba(12, 11, 9, 0.62)),
    radial-gradient(ellipse at 50% 100%, rgba(196, 90, 40, 0.5) 0%, rgba(196, 90, 40, 0.14) 38%, transparent 64%);
  z-index: 1;
  pointer-events: none;
}
.hero-flame {
  position: absolute;
  inset: auto 0 0 0;
  height: 7rem;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 12% 100%, rgba(240, 160, 64, 0.35), transparent 42%),
    radial-gradient(ellipse at 88% 100%, rgba(240, 160, 64, 0.35), transparent 42%),
    radial-gradient(ellipse at 50% 120%, rgba(196, 90, 40, 0.4), transparent 50%);
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1rem 2.25rem;
  width: 100%;
  position: relative;
  z-index: 1;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 0.35rem;
  flex-wrap: wrap;
}
.wordmark-emblem {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gold), 0 0 28px rgba(224, 112, 48, 0.45);
  flex-shrink: 0;
}
.wordmark h1,
.hero h1,
.page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 12vw, 6.2rem);
  line-height: 0.95;
  margin: 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 2px 28px rgba(192, 70, 20, 0.4);
}
.wordmark h1 { flex: 1; min-width: 12rem; }
.wm-the {
  display: block;
  font-family: var(--font-condensed);
  font-weight: 500;
  font-size: 0.28em;
  letter-spacing: 0.42em;
  line-height: 1.2;
  color: var(--gold-soft);
  text-shadow: none;
  margin-bottom: 0.15em;
}
.wordmark-sub {
  font-family: var(--font-condensed);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
  margin: 0 0 1rem;
}

.eyebrow {
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.hero .lede {
  font-size: 1.15rem;
  max-width: 36rem;
  color: var(--cream);
  opacity: 0.95;
  margin: 0 0 1.4rem;
}
.page-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  position: relative;
}
.page-head::after {
  content: "";
  display: block;
  height: 6px;
  margin-top: 1rem;
  background: url("../icons/tribal.svg") left center / 64px 10px repeat-x;
  opacity: 0.7;
}
.page-head h1,
h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 4.2rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.page-head .lede,
.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 0;
}

h2 {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  line-height: 1.15;
  margin: 2.2rem 0 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h3 {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
p { margin: 0 0 1rem; }
.muted { color: var(--ink-soft); }
.tbd {
  display: inline-block;
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #2a1c12;
  color: var(--gold-soft);
  border: 1px solid #5a4020;
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  vertical-align: middle;
}

/* Stat strip under the hero */
.stat-strip {
  background: #100e0c;
  border-top: 1px solid rgba(201, 148, 58, 0.25);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 12px 24px rgba(196, 90, 40, 0.06);
}
.stat-strip-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem 1.25rem;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: var(--cream);
}
.stat-label {
  font-family: var(--font-condensed);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.9rem 1.25rem;
  border-radius: 2px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  background: var(--rust);
  color: #fff;
  box-shadow: var(--shadow-tight);
}
.btn:hover { background: var(--rust-dark); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--cream);
  border-color: var(--gold);
}
.btn-secondary:hover { background: rgba(201, 148, 58, 0.16); color: var(--cream); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--line);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(234, 220, 198, 0.08); color: var(--cream); border-color: var(--gold); }
.page-head .btn-ghost,
.wrap .btn-ghost { color: var(--cream); }

/* Cards / grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem 1.3rem;
  box-shadow: var(--shadow-tight);
}
.card h2, .card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.year-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.year-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--rust);
  border-radius: var(--radius);
  padding: 1rem 0.9rem 1.1rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 7.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.year-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: inherit;
  border-top-color: var(--flame);
}
.year-card .yr {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  color: var(--cream);
  line-height: 0.9;
  letter-spacing: 0.04em;
}
.year-card .meta { font-size: 0.9rem; color: var(--ink-soft); }
.year-card.has-album .yr::after {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.4rem;
  margin-bottom: 0.2rem;
  background: var(--ember);
  border-radius: 50%;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--ember);
}

/* Story */
.story p { font-size: 1.1rem; }
.story .pull {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--gold-soft);
  border-left: 3px solid var(--rust);
  padding: 0.15rem 0 0.15rem 1rem;
  margin: 1.5rem 0;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 1.5rem;
}
.gallery figure {
  margin: 0;
  background: var(--bg-panel);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: pointer;
  filter: contrast(1.05) saturate(0.92);
}
.gallery figcaption {
  font-size: 0.82rem;
  padding: 0.45rem 0.6rem 0.6rem;
  color: var(--ink-soft);
}
.gallery-empty {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  background: rgba(20, 17, 14, 0.6);
  color: var(--ink-soft);
}
.placeholder-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}
.placeholder-tiles span {
  display: block;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, var(--ash) 25%, transparent 25%) -8px 0,
    linear-gradient(225deg, var(--ash) 25%, transparent 25%) -8px 0,
    linear-gradient(315deg, var(--ash) 25%, transparent 25%),
    linear-gradient(45deg, var(--ash) 25%, transparent 25%);
  background-size: 16px 16px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(7, 6, 5, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 4px; }
.lightbox button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--gold);
  border-radius: 999px;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.4rem;
  cursor: pointer;
}

/* Badges — tribe medallions */
.badge-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-condensed);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  cursor: pointer;
}
.chip[aria-pressed="true"],
.chip:hover { background: var(--rust); color: #fff; border-color: var(--rust); }

.badge-list { display: none; } /* legacy list kept in DOM unused; tribe-grid is primary */
.tribe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.5rem;
}
.tribe-badge {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 0.8rem 0.95rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.tribe-medallion {
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 40% 35%, #2a1c12, #0c0b09 70%);
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 2px #0c0b09, 0 0 0 3px rgba(201, 148, 58, 0.4), 0 0 16px rgba(196, 90, 40, 0.2);
  margin-bottom: 0.25rem;
}
.tribe-river .tribe-medallion { border-color: #6a8a88; }
.tribe-camp .tribe-medallion { border-color: #5a6e3e; }
.tribe-fire .tribe-medallion { border-color: var(--ember); }
.tribe-hunt .tribe-medallion { border-color: #c4b494; }
.tribe-medallion .badge-code {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--cream);
  background: none;
  padding: 0;
  min-width: 0;
  line-height: 1;
}
.tribe-level {
  font-family: var(--font-condensed);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 0.15rem;
}
.tribe-badge .cat {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  font-weight: 600;
  font-family: var(--font-condensed);
  margin: 0;
}
.tribe-badge .desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--ink);
}
.psr-mini {
  width: 100%;
  margin-top: 0.25rem;
}
.psr-pts {
  display: block;
  font-family: var(--font-condensed);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.2rem;
}

.badge-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem 0.9rem;
  align-items: start;
}
.badge-code {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--cream);
  background: var(--bg-panel);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  min-width: 2.6rem;
  text-align: center;
}
.badge-item .desc { margin: 0; }
.badge-item .cat {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  font-weight: 600;
}
.badge-meta {
  text-align: right;
  font-size: 0.9rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.badge-meta strong { display: block; color: var(--ink); font-size: 1rem; }

table.badge-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  display: none;
}
table.badge-table th,
table.badge-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
table.badge-table th {
  background: #120e0b;
  color: var(--gold-soft);
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
table.badge-table tr:nth-child(even) td { background: rgba(255, 255, 255, 0.03); }
.table-heading { display: none; }

/* PSR / year record */
.psr-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ember);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.25rem;
  margin: 0 0 1.75rem;
  box-shadow: var(--shadow-tight);
}
.psr-panel > .eyebrow { margin-bottom: 0.85rem; }
.psr-bars { display: flex; flex-direction: column; gap: 0.7rem; }
.psr-row-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.28rem;
}
.psr-k {
  font-family: var(--font-condensed);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--gold-soft);
}
.psr-v { font-size: 0.92rem; color: var(--ink); text-align: right; }
.psr-bar {
  display: block;
  height: 0.45rem;
  background: #2a221c;
  border: 1px solid #3a3228;
  border-radius: 1px;
  overflow: hidden;
}
.psr-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--rust), var(--flame));
  box-shadow: 0 0 8px rgba(224, 112, 48, 0.45);
}
.psr-catalog {
  margin-top: 1.4rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.psr-hero-stat {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0.2rem 0 0.7rem;
}
.psr-number {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 12vw, 5rem);
  line-height: 0.8;
  letter-spacing: 0.02em;
  color: var(--cream);
  text-shadow: 0 0 24px rgba(224, 112, 48, 0.35);
}
.psr-number-label {
  font-family: var(--font-condensed);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold);
}

/* Map */
.map-layout {
  display: grid;
  gap: 1rem;
}
#trip-map {
  width: 100%;
  height: 18rem;
  order: -1;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-panel);
  z-index: 1;
  filter: saturate(0.85) contrast(1.05);
}
.year-list { margin: 0; padding: 0; list-style: none; }
.year-list li { margin: 0; }
.year-list a,
.year-list .row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.year-list a:hover { color: var(--ember); }
.leaflet-popup-content-wrapper {
  border-radius: 4px;
  font-family: var(--font-body);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.leaflet-popup-tip { background: var(--card); }
.leaflet-container a { color: var(--link); }
.leaflet-container { background: #1a1814; }

/* Forms */
form.stack { display: flex; flex-direction: column; gap: 0.9rem; max-width: 32rem; }
label { font-weight: 600; display: block; margin-bottom: 0.3rem; }
.hint { font-weight: 400; color: var(--ink-soft); font-size: 0.9rem; }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #120f0c;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.65rem 0.75rem;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 148, 58, 0.25);
}
textarea { min-height: 7rem; resize: vertical; }
.radio-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.1rem; }
.radio-row label { font-weight: 500; display: flex; align-items: center; gap: 0.35rem; margin: 0; }
fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
legend {
  font-family: var(--font-condensed);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0.35rem;
}
.form-note, .callout {
  background: var(--card);
  border-left: 3px solid var(--gold);
  padding: 0.9rem 1rem;
  margin: 1rem 0 1.5rem;
  border-radius: 0 6px 6px 0;
}
.form-status[data-state="ok"] { color: #8fbf6a; font-weight: 600; }
.form-status[data-state="err"] { color: #e07040; font-weight: 600; }

/* Install */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0.8rem 0 0.8rem 3.2rem;
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 2px;
  background: var(--rust);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-banner {
  display: none;
  background: #120e0b;
  color: var(--cream);
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(201, 148, 58, 0.3);
}
.install-banner.open { display: block; }
.install-banner .inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
}
.install-banner p { margin: 0; flex: 1; min-width: 12rem; }
.install-banner a { color: var(--gold-soft); }
.install-banner button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--cream);
  cursor: pointer;
  font: inherit;
  padding: 0.3rem;
}

/* Footer */
.site-footer {
  background: #080706;
  color: var(--gold-soft);
  margin-top: auto;
  padding: 2rem 1rem 2.4rem;
  font-size: 0.92rem;
  position: relative;
}
.site-footer::before {
  content: "";
  display: block;
  height: 8px;
  margin: -2rem -1rem 1.4rem;
  background: url("../icons/tribal.svg") center / 64px 10px repeat-x;
  opacity: 0.75;
}
.site-footer a { color: var(--cream); }
.site-footer strong {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.08em;
  font-size: 1.35rem;
  display: block;
  margin-bottom: 0.35rem;
  color: var(--cream);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.copyright { margin: 0; color: rgba(201, 148, 58, 0.7); }

/* Offline */
.offline-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.offline-card { text-align: center; padding: 2rem 1rem; }

/* Facts list */
.facts { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.facts li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.5rem;
}
.facts dt, .facts .k {
  font-family: var(--font-condensed);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--gold);
}

@media (min-width: 640px) {
  .brand-tag { display: block; }
  .brand-name { font-size: 1.3rem; line-height: 1.15; }
  .year-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .card-grid.thirds { grid-template-columns: 1fr 1fr; }
  table.badge-table { display: table; }
  .table-heading { display: block; }
  #trip-map { height: 24rem; }
  .stat-strip-inner { grid-template-columns: repeat(4, 1fr); }
  .wordmark-emblem { width: 5.5rem; height: 5.5rem; }
}

@media (min-width: 880px) {
  .hero { min-height: 34rem; }
  .nav-toggle { display: none; }
  .header-inner { padding: 0.5rem 1.5rem; }
  .site-nav {
    display: block;
    width: auto;
    flex-basis: auto;
    margin-left: auto;
  }
  .site-nav ul {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 0.15rem;
  }
  .site-nav a { padding: 0.45rem 0.65rem; font-size: 0.85rem; }
  .wrap { padding: 2.25rem 1.5rem 4rem; }
  .year-grid { grid-template-columns: repeat(4, 1fr); }
  .card-grid.thirds { grid-template-columns: repeat(3, 1fr); }
  .map-layout { grid-template-columns: 16.5rem 1fr; align-items: start; }
  #trip-map { order: 0; height: 32rem; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: end; }
  .badge-item { grid-template-columns: auto 1fr auto; }
  .tribe-grid { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .year-card { transition: none; }
  .nav-toggle span { transition: none; }
}

/* Meals board */
.meals-banner { margin-bottom: 1.5rem; }
.meals-banner.is-err { border-left-color: #e07040; }
.meal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.meal-day {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.9rem 0.85rem 1rem;
}
.meal-day-head { margin-bottom: 0.7rem; }
.meal-day-head h2 {
  margin: 0;
  font-size: 1.35rem;
}
.meal-day-head .meta { margin: 0.2rem 0 0; color: var(--ink-soft); }
.meal-slot {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.75rem 0.8rem;
  margin: 0 0 0.55rem;
  background: #120f0c;
}
.meal-slot:last-child { margin-bottom: 0; }
.meal-slot.claimed { border-left: 3px solid var(--gold); }
.meal-slot.open { border-left: 3px solid var(--ember); }
.meal-kicker {
  font-family: var(--font-condensed);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.35rem;
}
.meal-open-label {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  line-height: 0.9;
  margin: 0 0 0.55rem;
  color: var(--cream);
}
.meal-claim-name {
  font-family: var(--font-condensed);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}
.meal-crew { font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.meal-dish { margin: 0 0 0.2rem; }
.meal-bring { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.meal-state {
  font-family: var(--font-condensed);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0.45rem 0 0;
}
.meal-slot .btn { width: 100%; }
.meal-slot.is-readonly .muted { margin: 0; font-size: 0.9rem; }

.meal-dialog {
  border: 1px solid var(--line);
  border-top: 3px solid var(--ember);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  padding: 1.25rem 1.15rem 1.35rem;
  width: calc(100% - 2rem);
  max-width: 28rem;
  box-shadow: var(--shadow);
}
.meal-dialog::backdrop { background: rgba(7, 6, 5, 0.8); }
.meal-dialog h2 { margin-top: 0; }
.meal-dialog .stack { max-width: none; }

@media (min-width: 720px) {
  .meal-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .meal-grid { grid-template-columns: repeat(5, 1fr); }
  .meal-day-head h2 { font-size: 1.15rem; }
}


/* Home hero slideshow */
.hero-slideshow { background-color: #120e0b; }
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
.hero-slide.is-current { opacity: 1; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-flame,
.hero-inner { z-index: 2; }
.hero-slideshow .hero-inner { padding-bottom: 4.25rem; }
.hero-caption-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.9rem;
  padding: 0.55rem 1rem 0.7rem;
  max-width: var(--max);
  margin: 0 auto;
  pointer-events: none;
}
.hero-caption-bar > * { pointer-events: auto; }
.hero-caption {
  margin: 0;
  flex: 1 1 10rem;
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 1px 8px rgba(0,0,0,0.7);
  min-height: 1.2em;
}
.hero-caption .yr {
  color: var(--gold);
  margin-right: 0.5rem;
}
.hero-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.hero-btn {
  appearance: none;
  background: rgba(12, 11, 9, 0.55);
  color: var(--cream);
  border: 1px solid rgba(201, 148, 58, 0.45);
  border-radius: 2px;
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}
.hero-btn:hover,
.hero-btn[aria-pressed="true"] {
  background: rgba(196, 90, 40, 0.55);
  border-color: var(--gold);
}
.hero-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  width: 100%;
}
.hero-dots button {
  appearance: none;
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  background: transparent;
  cursor: pointer;
}
.hero-dots button[aria-current="true"] {
  background: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}
