:root {
  --green: #205b41;
  --teal: #003136;
  --teal-2: #00474e;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.65);
  --line: rgba(255, 255, 255, 0.12);
  --gold: #d09a3e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito Sans', system-ui, sans-serif;
  background: var(--teal);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar { display: none; width: 0; }
h1, h2, h3 { font-weight: 900; letter-spacing: -0.02em; margin: 0; }
img { display: block; }
button { font: inherit; color: inherit; }

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}
.wiggle:hover { animation: wiggle 0.45s ease-in-out infinite; }

/* =================================================================
   INTRO SCENE
   ================================================================= */
.intro-wrap {
  position: relative;
  height: 220vh;
  background: var(--teal);
}
.intro-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.poster {
  position: absolute;
  inset: 0;
  background-color: var(--teal);
  overflow: hidden;
  will-change: opacity, transform;
  cursor: pointer;
}
.poster img {
  position: absolute;
  will-change: transform, left, top, width, height;
  pointer-events: none;
  user-select: none;
}

.gold-float {
  position: absolute;
  pointer-events: none;
  will-change: transform, left, top, width;
  transform: translate(-50%, -50%);
}
.gold-float img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(0,0,0,0.35));
}

.intro-tagline {
  position: absolute;
  left: 50%;
  bottom: 6vh;
  transform: translate(-50%, 0);
  width: min(780px, 88vw);
  text-align: center;
  opacity: 0;
  will-change: opacity, transform;
  pointer-events: none;
}
.intro-tagline h1 {
  font-size: clamp(22px, 3.2vw, 38px);
  color: var(--white);
  line-height: 1.2;
  text-wrap: balance;
}
.intro-tagline .chev {
  margin-top: 18px;
  display: inline-block;
  width: 28px;
  height: 28px;
  border-right: 3px solid rgba(255,255,255,0.9);
  border-bottom: 3px solid rgba(255,255,255,0.9);
  transform: rotate(45deg);
  animation: nudge 1.6s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50%      { transform: rotate(45deg) translate(8px, 8px); }
}

/* =================================================================
   PAGES
   ================================================================= */
.rest { background: var(--teal); }
section.page {
  min-height: 100vh;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* -------- Requirements -------- */
.requirements {
  justify-content: flex-start;
  padding-top: 64px;
  gap: 64px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.requirements h2 { font-size: clamp(28px, 4vw, 40px); color: var(--white); }
.sub-label {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  align-self: flex-start;
}
.group { width: 100%; }
.challenge-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 8px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}
.row {
  display: flex;
  overflow-x: auto;
  padding: 4px 0 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}
.row-page {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 8px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.row::-webkit-scrollbar { display: none; width: 0; height: 0; }

.badge {
  width: 120px;
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.badge img {
  width: 100px; height: 100px;
  object-fit: contain;
  margin: 0 auto 8px;
}
.badge span {
  font-size: 12px; font-weight: 700;
  line-height: 1.25; color: #fff;
}

/* -------- Are you a... -------- */
.areyou { gap: 40px; }
.areyou h2 { font-size: clamp(30px, 5vw, 44px); color: var(--white); }
.uniforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 720px;
  width: 100%;
}
.uniform {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
}
.uniform img { width: 100%; max-width: 220px; height: auto; margin-bottom: 16px; }
.uniform span { font-size: 18px; font-weight: 700; color: #fff; }

/* -------- Upload -------- */
.upload { gap: 24px; }
.upload h2 { font-size: clamp(26px, 4vw, 36px); }
.upload p.hint { color: var(--muted); max-width: 520px; line-height: 1.5; }
.dropzone {
  width: min(560px, 90vw);
  min-height: 200px;
  border: 2px dashed rgba(255,255,255,0.35);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  background: rgba(255,255,255,0.02);
}
.dropzone:hover,
.dropzone.dragover {
  background: rgba(255,255,255,0.06);
  border-color: var(--gold);
}
.dropzone .dz-title { font-size: 18px; font-weight: 700; }
.dropzone .dz-sub { font-size: 13px; color: var(--muted); }
.dropzone input[type=file] { display: none; }
.upload-error {
  color: #ff8c8c;
  font-size: 14px;
  min-height: 20px;
}

/* -------- Dashboard -------- */
.dashboard {
  justify-content: flex-start;
  padding: 64px 0 64px;
  width: 100%;
  max-width: none;
  display: none;
}
.dashboard.visible { display: flex; }
.dashboard h2 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 8px; }
.dashboard .sub { color: var(--muted); margin-bottom: 32px; font-size: 14px; }

.columns {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
.column {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  min-height: 60vh;
  text-align: left;
  scroll-snap-align: start;
}
.column h3 {
  font-size: 18px;
  letter-spacing: 0;
  margin-bottom: 4px;
}
.column .col-sub {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  display: block;
}
button.col-sub.sortable {
  background: none;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
button.col-sub.sortable:hover {
  border-color: var(--gold);
  color: var(--white);
  background: rgba(208, 154, 62, 0.08);
}

/* Scout cards */
.scout-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  background: rgba(0,0,0,0.15);
}
.scout-card .init-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.scout-card .initials {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.scout-card .count {
  font-size: 12px;
  color: var(--muted);
}
.scout-card .mini-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 8px;
}
.mini-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
  -webkit-appearance: none;
  appearance: none;
  overflow: visible;
}
.mini-badge:hover { background: rgba(255,255,255,0.06); }
.mini-badge img { width: 48px; height: 48px; object-fit: contain; }
.mini-badge span {
  font-size: 10px;
  text-align: center;
  line-height: 1.2;
  color: var(--muted);
}

/* Summary rows */
.summary-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border-radius: 10px;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
  color: inherit;
  border-bottom: 1px solid var(--line);
  -webkit-appearance: none;
  appearance: none;
  overflow: visible;
}
.summary-row:hover { background: rgba(255,255,255,0.04); }
.summary-row img { width: 48px; height: 48px; object-fit: contain; }
.summary-row .s-name { font-weight: 700; font-size: 14px; }
.summary-row .s-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.summary-bar {
  grid-column: 2 / 4;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.summary-bar > span {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
}

/* Plan column */
.plan-search {
  position: relative;
  margin-bottom: 16px;
}
.plan-search input {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  outline: none;
}
.plan-search input:focus { border-color: var(--gold); }
.plan-results {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
  margin-top: 6px;
}
.plan-results:empty { display: none; }
.plan-result {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.plan-result:last-child { border-bottom: none; }
.plan-result:hover { background: rgba(255,255,255,0.06); }

.plan-selected {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,0.15);
}
.plan-selected .p-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.plan-selected img { width: 56px; height: 56px; object-fit: contain; }
.plan-selected .p-title { font-weight: 900; font-size: 16px; }
.plan-selected .p-type { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.plan-selected ol {
  list-style: none;
  margin: 0;
  padding-left: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.88);
}
.plan-selected li {
  margin-bottom: 8px;
  padding-left: 1.8em;
  text-indent: -1.8em;
}
.plan-selected li .note {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-style: italic;
}
.p-stage {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.p-stage:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.p-stage-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.p-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.p-link:hover { border-bottom-color: var(--gold); }
.plan-empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 24px 12px;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 900px) {
  .columns {
    grid-template-columns: 100%;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 16px;
    gap: 12px;
  }
  .column { min-height: 70vh; }
  .columns::-webkit-scrollbar { display: none; }
}

@media (max-width: 700px) {
  section.page { padding: 40px 20px; }
  .badge { width: 92px; }
  .badge img { width: 78px; height: 78px; }
  .requirements { gap: 48px; padding-top: 48px; }
}

@media (max-width: 600px) {
  .uniforms {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 280px;
  }
}
