/* ==========================================================================
   Troop 927 — Philmont Cavalcade 2028
   Shared stylesheet. Self-contained; no external image dependencies.
   ========================================================================== */

:root {
  --pine:        #14361f;
  --pine-deep:   #0d2416;
  --forest:      #1f5133;
  --sage:        #7ba585;
  --sunset:      #e8663c;
  --sunset-2:    #ff8a4c;
  --gold:        #f4b942;
  --gold-soft:   #f7d488;
  --sky:         #8fc4de;
  --sky-deep:    #3f7ea0;
  --cream:       #f8f3e7;
  --cream-2:     #efe6d2;
  --charcoal:    #221f1a;
  --ink:         #2c2a24;
  --shadow:      0 10px 30px rgba(13, 36, 22, .18);
  --shadow-lg:   0 22px 55px rgba(13, 36, 22, .28);
  --radius:      18px;
  --maxw:        1120px;
  --ff-display:  "Rye", "Georgia", serif;
  --ff-head:     "Oswald", "Arial Narrow", sans-serif;
  --ff-body:     "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--forest); }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 36, 22, .92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--gold);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--cream);
}
.brand__badge {
  width: 42px; height: 42px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--gold-soft), var(--sunset) 70%);
  display: grid; place-items: center;
  font-size: 1.35rem;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.5);
}
.brand__name { font-family: var(--ff-head); font-weight: 600; letter-spacing: .5px; line-height: 1.25; }
.brand__name small { display: block; margin-top: 3px; font-size: .68rem; color: var(--gold-soft); letter-spacing: 2px; text-transform: uppercase; }

.nav__links { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav__links a {
  color: var(--cream);
  text-decoration: none;
  font-family: var(--ff-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: .82rem;
  padding: .5rem .8rem;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav__links a:hover { background: rgba(244, 185, 66, .2); }
.nav__links a.active { background: var(--gold); color: var(--pine-deep); }
.nav__links a.nav__back {
  background: rgba(244, 185, 66, .14);
  border: 1px solid rgba(244, 185, 66, .55);
  color: var(--gold-soft);
}
.nav__links a.nav__back:hover { background: var(--gold); color: var(--pine-deep); }

.nav__toggle { display: none; background: none; border: 0; color: var(--cream); font-size: 1.6rem; cursor: pointer; }

/* ---------- Hero (animated sky: sunrise → day → sunset → night) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--cream);
  /* fallback / reduced-motion still-frame = the sunset look */
  background: linear-gradient(180deg, #17324a 0%, #3f6d84 30%, #d98a55 62%, #f4b26a 82%, #f6d9a0 100%);
  isolation: isolate;
  animation: skyCycle 60s linear infinite;
}
/* starfield — only visible during the night phase */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 24% 12%, #eaf2ff, transparent),
    radial-gradient(1.2px 1.2px at 33% 30%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 46% 16%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 57% 26%, #dfe9ff, transparent),
    radial-gradient(1.5px 1.5px at 66% 12%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 74% 28%, #fff, transparent),
    radial-gradient(1.7px 1.7px at 83% 18%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 90% 32%, #eaf2ff, transparent),
    radial-gradient(1.4px 1.4px at 18% 40%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 40% 44%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 62% 40%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 79% 46%, #dfe9ff, transparent),
    radial-gradient(1.2px 1.2px at 6% 30%, #fff, transparent);
  animation: starsFade 60s linear infinite, starTwinkle 4s ease-in-out infinite;
}

@keyframes skyCycle {
  0%   { background: linear-gradient(180deg, #16204a 0%, #3a4a7d 26%, #c96f4a 62%, #f0a35c 84%, #f6d9a0 100%); } /* sunrise */
  20%  { background: linear-gradient(180deg, #2f6ea8 0%, #67a9d4 34%, #a9d4e8 66%, #dfeef5 88%, #eaf4e0 100%); } /* midday */
  45%  { background: linear-gradient(180deg, #17324a 0%, #3f6d84 30%, #d98a55 62%, #f4b26a 82%, #f6d9a0 100%); } /* sunset */
  60%  { background: linear-gradient(180deg, #241b3f 0%, #4a3a6b 30%, #8a4a6b 60%, #c76a52 82%, #e0a37a 100%); } /* dusk */
  78%  { background: linear-gradient(180deg, #05060f 0%, #0b1027 32%, #141a3a 60%, #1c2440 82%, #2a3350 100%); } /* night */
  90%  { background: linear-gradient(180deg, #05060f 0%, #0b1027 32%, #141a3a 60%, #1c2440 82%, #2a3350 100%); } /* hold night */
  100% { background: linear-gradient(180deg, #16204a 0%, #3a4a7d 26%, #c96f4a 62%, #f0a35c 84%, #f6d9a0 100%); } /* → sunrise */
}
@keyframes starsFade {
  0%, 55%   { opacity: 0; }
  68%, 88%  { opacity: 1; }
  97%, 100% { opacity: 0; }
}
@keyframes starTwinkle {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.5); }
}

.hero--tall { min-height: 82vh; }
.hero--short { min-height: 46vh; }
.hero__sun {
  position: absolute;
  left: 50%; top: 30%;
  width: 190px; height: 190px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fff7e0 0%, var(--gold) 45%, var(--sunset) 100%);
  box-shadow: 0 0 90px 30px rgba(244,185,66,.55);
  z-index: -2;
  animation: sunArc 60s linear infinite;
}
/* sun rises + arcs + sets (0–52%), then a silver moon rises + sets (58–98%) */
@keyframes sunArc {
  0%   { left: 10%; top: 60%; background: radial-gradient(circle, #fff2d0 0%, var(--gold) 45%, var(--sunset) 100%); box-shadow: 0 0 70px 22px rgba(233,111,74,.5); opacity: 1; }
  18%  { left: 50%; top: 15%; background: radial-gradient(circle, #fff7e0 0%, var(--gold) 45%, #f4b26a 100%); box-shadow: 0 0 95px 34px rgba(244,185,66,.6); opacity: 1; }
  42%  { left: 88%; top: 52%; background: radial-gradient(circle, #ffe6c2 0%, var(--sunset) 55%, #c85a30 100%); box-shadow: 0 0 80px 26px rgba(232,102,60,.55); opacity: 1; }
  52%  { left: 96%; top: 82%; background: radial-gradient(circle, #ffdca8 0%, var(--sunset) 60%, #a8471f 100%); box-shadow: 0 0 60px 18px rgba(232,102,60,.4); opacity: 0; }
  57%  { left: 12%; top: 84%; background: radial-gradient(circle, #f3f6ff 0%, #cdd6e8 55%, #97a2c0 100%); box-shadow: 0 0 50px 14px rgba(210,220,245,.35); opacity: 0; }
  66%  { left: 20%; top: 52%; background: radial-gradient(circle, #f6f8ff 0%, #d3dbef 55%, #9aa6c6 100%); box-shadow: 0 0 55px 16px rgba(210,220,245,.4); opacity: 1; }
  80%  { left: 50%; top: 20%; background: radial-gradient(circle, #ffffff 0%, #dbe2f2 55%, #a6b1cf 100%); box-shadow: 0 0 60px 18px rgba(220,228,250,.45); opacity: 1; }
  92%  { left: 82%; top: 54%; background: radial-gradient(circle, #f6f8ff 0%, #d3dbef 55%, #9aa6c6 100%); box-shadow: 0 0 50px 14px rgba(210,220,245,.4); opacity: 1; }
  98%  { left: 92%; top: 80%; background: radial-gradient(circle, #eef2fb 0%, #cad3e8 55%, #93a0c0 100%); box-shadow: 0 0 40px 10px rgba(210,220,245,.25); opacity: 0; }
  100% { left: 10%; top: 60%; background: radial-gradient(circle, #fff2d0 0%, var(--gold) 45%, var(--sunset) 100%); box-shadow: 0 0 70px 22px rgba(233,111,74,.5); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
  .hero__sun { animation: none; top: 26%; }
  .hero::before { animation: none; opacity: 0; }
}

.hero__range { position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; }
.hero__range svg { width: 100%; height: auto; display: block; }

.hero__content {
  position: relative;
  z-index: 2;
  padding: 5.5rem 0 8rem;
  text-align: center;
}
.hero--short .hero__content { padding: 3.2rem 0 5rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--ff-head);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: .82rem;
  font-weight: 600;
  background: rgba(13,36,22,.35);
  border: 1px solid rgba(255,255,255,.4);
  padding: .35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.08;
  margin: 0 0 1.4rem;
  text-shadow: 0 2px 6px rgba(13,36,22,.55), 0 6px 22px rgba(13,36,22,.45);
}
.hero__sub {
  font-family: var(--ff-head);
  font-weight: 300;
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(13,36,22,.6), 0 3px 12px rgba(13,36,22,.45);
  margin: 0 auto;
  max-width: 40ch;
}

/* ---------- Countdown ---------- */
.countdown {
  position: relative;
  z-index: 3;
  margin: -4.5rem auto 0;
  width: min(100% - 2.5rem, 760px);
  background: rgba(248, 243, 231, .97);
  border: 1px solid rgba(20,54,31,.1);
  border-top: 6px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.6rem 1.4rem 1.3rem;
  text-align: center;
}
.countdown h2 {
  font-family: var(--ff-head);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
  color: var(--forest);
  margin: 0 0 .1rem;
  font-size: 1rem;
}
.countdown__date { font-family: var(--ff-display); color: var(--sunset); font-size: 1.5rem; margin-bottom: 1rem; }
.countdown__grid { display: flex; justify-content: center; gap: .7rem; flex-wrap: wrap; }
.cd-cell {
  min-width: 92px;
  background: linear-gradient(180deg, var(--pine) 0%, var(--pine-deep) 100%);
  color: var(--cream);
  border-radius: 14px;
  padding: .9rem .4rem .7rem;
  box-shadow: var(--shadow);
}
.cd-cell b { display: block; font-family: var(--ff-head); font-size: 2.2rem; line-height: 1; color: var(--gold-soft); }
.cd-cell span { font-family: var(--ff-head); text-transform: uppercase; letter-spacing: 2px; font-size: .68rem; color: var(--sage); }
.countdown__note {
  margin: 1rem auto 0;
  max-width: 60ch;
  font-size: .85rem;
  color: var(--ink);
  background: rgba(244,185,66,.16);
  border: 1px dashed var(--gold);
  border-radius: 12px;
  padding: .55rem .8rem;
}
.countdown__note strong { color: var(--sunset); }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section--tint { background: var(--cream-2); }
.section--pine { background: linear-gradient(180deg, var(--pine) 0%, var(--pine-deep) 100%); color: var(--cream); }
.section--pine a { color: var(--gold-soft); }

.section__head { text-align: center; max-width: none; margin: 0 auto 2.6rem; }
.section__head > p { max-width: 62ch; margin-left: auto; margin-right: auto; }
.section__kicker {
  font-family: var(--ff-head);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--sunset);
}
.section h2 {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: .2rem 0 .6rem;
  line-height: 1.1;
  white-space: nowrap;
}
.section--pine h2 { color: var(--gold-soft); }
.lead { font-size: 1.12rem; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(20,54,31,.08);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__art { height: 120px; display: grid; place-items: center; font-size: 3rem; }
.card__body { padding: 1.1rem 1.2rem 1.4rem; }
.card__body h3 { font-family: var(--ff-head); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 .4rem; color: var(--forest); font-size: 1.12rem; }
.card__body p { margin: 0; font-size: .96rem; }

/* art fills */
.art-mtn   { background: linear-gradient(160deg, #3f6d84, #17324a); }
.art-horse { background: linear-gradient(160deg, #b5744a, #6e3d24); }
.art-sun   { background: linear-gradient(160deg, var(--sunset-2), var(--sunset)); }
.art-pine  { background: linear-gradient(160deg, var(--forest), var(--pine-deep)); }
.art-gold  { background: linear-gradient(160deg, var(--gold), #d99a24); }
.art-sky   { background: linear-gradient(160deg, var(--sky), var(--sky-deep)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--ff-head);
  text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600;
  font-size: .9rem;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn--gold { background: var(--gold); color: var(--pine-deep); box-shadow: var(--shadow); }
.btn--gold:hover { transform: translateY(-2px); background: var(--gold-soft); }
.btn--ghost { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn--ghost:hover { background: rgba(248,243,231,.15); }
.btn-row { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; margin-top: 1.6rem; }

/* ---------- Resource links ---------- */
.linklist { display: grid; gap: .8rem; }
.linkrow {
  display: flex; align-items: center; gap: 1rem;
  background: var(--cream);
  border: 1px solid rgba(20,54,31,.1);
  border-left: 5px solid var(--sunset);
  border-radius: 12px;
  padding: .9rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.linkrow:hover { transform: translateX(4px); border-left-color: var(--gold); }
.linkrow__icon { font-size: 1.6rem; }
.linkrow__txt b { font-family: var(--ff-head); font-weight: 600; letter-spacing: .5px; display: block; color: var(--forest); }
.linkrow__txt span { font-size: .88rem; color: var(--ink); }
.linkrow__go { margin-left: auto; color: var(--sunset); font-weight: 700; }

/* ---------- Video ---------- */
.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--pine-deep);
  background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-caption { text-align: center; font-family: var(--ff-head); text-transform: uppercase; letter-spacing: 2px; font-size: .82rem; color: var(--sage); margin-top: .7rem; }

/* ---------- Requirement callouts ---------- */
.req { display: grid; gap: 1.1rem; }
.req__item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 1rem;
  align-items: start;
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(20,54,31,.08);
}
.req__num {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--gold), var(--sunset));
  color: var(--pine-deep);
  display: grid; place-items: center;
  font-family: var(--ff-head); font-weight: 700; font-size: 1.5rem;
}
.req__item h3 { font-family: var(--ff-head); text-transform: uppercase; letter-spacing: 1px; color: var(--forest); margin: .1rem 0 .3rem; }
.req__item p { margin: 0; }

.alert {
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}
.alert--danger { background: #fff0eb; border: 2px solid var(--sunset); }
.alert--info   { background: rgba(143,196,222,.18); border: 2px solid var(--sky-deep); }
.alert h3 { margin: 0 0 .4rem; font-family: var(--ff-head); text-transform: uppercase; letter-spacing: 1px; }
.alert--danger h3 { color: var(--sunset); }
.alert p:last-child { margin-bottom: 0; }

/* checklist */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.checklist li {
  display: flex; gap: .7rem; align-items: flex-start;
  background: var(--cream);
  border: 1px solid rgba(20,54,31,.09);
  border-radius: 12px;
  padding: .7rem .9rem;
  box-shadow: 0 4px 12px rgba(13,36,22,.07);
}
.checklist li::before { content: "🐎"; flex: none; }
.checklist--pack li::before { content: "🎒"; }
.checklist li b { color: var(--forest); }

/* height/weight chart */
.hw-wrap { max-width: 460px; margin: 0 auto; }
.hw-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-family: var(--ff-head);
}
.hw-table caption {
  caption-side: top;
  font-family: var(--ff-head);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--forest);
  padding-bottom: .7rem;
}
.hw-table th, .hw-table td {
  padding: .5rem .9rem;
  text-align: center;
  border-bottom: 1px solid rgba(20,54,31,.1);
  font-size: .98rem;
}
.hw-table thead th {
  background: linear-gradient(180deg, var(--pine) 0%, var(--pine-deep) 100%);
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: .82rem;
}
.hw-table tbody tr:nth-child(even) { background: rgba(244,185,66,.1); }
.hw-table tbody tr:last-child td { font-weight: 700; color: var(--sunset); border-bottom: 0; }
.hw-foot { text-align: center; font-size: .85rem; color: var(--ink); margin-top: .8rem; }

/* gear codes legend */
.codes {
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
  margin-bottom: 2rem;
}
.codes span {
  background: var(--cream);
  border: 1px solid rgba(20,54,31,.12);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: .35rem .7rem;
  font-size: .82rem;
  box-shadow: 0 3px 10px rgba(13,36,22,.06);
}
.codes b { color: var(--forest); font-family: var(--ff-head); }

.stat-band { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; text-align: center; }
.stat b { display: block; font-family: var(--ff-display); font-size: 2.2rem; color: var(--gold-soft); line-height: 1; }
.stat span { font-family: var(--ff-head); text-transform: uppercase; letter-spacing: 1.5px; font-size: .8rem; color: var(--sage); }

/* ---------- Footer ---------- */
.footer {
  background: var(--pine-deep);
  color: var(--sage);
  padding: 2.6rem 0 2rem;
  text-align: center;
  border-top: 4px solid var(--gold);
}
.footer a { color: var(--gold-soft); text-decoration: none; }
.footer__hymn { font-family: var(--ff-display); color: var(--gold-soft); font-size: 1.2rem; margin-bottom: .6rem; }
.footer small { display: block; margin-top: 1rem; color: #6b7f6f; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stat-band { grid-template-columns: repeat(2,1fr); gap: 1.4rem; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(13,36,22,.98);
    padding: .5rem 1rem 1rem;
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__toggle { display: block; }
}
@media (max-width: 780px) {
  .section h2 { white-space: normal; }
}
@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .req__item { grid-template-columns: 1fr; }
  .req__num { margin-bottom: -.3rem; }
}
