/* Veterans Pathway Project — shared brand tokens for design previews */

:root {
  --navy-900: #001c44;
  --navy: #0d264a;
  --red: #b11c1c;
  --red-deep: #97031b;
  --gold: #f2cc61;
  --gold-deep: #c08a1e;   /* gold for TEXT only — never --gold on white */
  --sand: #faf7f0;
  --ink: #14202f;
  --muted: #55637a;
  --rule: rgba(20, 32, 47, 0.16);
  --rule-light: rgba(255, 255, 255, 0.22);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

/* Hard edges everywhere: no global border-radius. */

:focus-visible {
  outline: 3px solid rgba(177, 28, 28, 0.35);
  outline-offset: 2px;
}

/* Donate is the only red CTA in the system. */
.cta-donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  border: 0;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}
.cta-donate:hover { background: var(--red-deep); }

/* Secondary: navy outline, square. */
.cta-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--navy);
  color: var(--navy);
  background: transparent;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}
.cta-outline:hover { background: var(--navy); color: #fff; }

.cta-outline--light {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.cta-outline--light:hover { background: #fff; color: var(--navy-900); }

/* Small-caps eyebrow — used across both directions. */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.hairline { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.safe-x { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Fonts load from /assets/fonts.css after first paint (see build_worker). */

/* Direction 5 — "Horizon". Cinematic and expansive: full-viewport frames,
   anamorphic letterbox, wide letter-spaced condensed type, text parked in
   corners rather than centred. Shared by all d5 pages. */

html { scroll-behavior: auto; }

body {
  font-family: Barlow, Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.66;
  background: #050d1a;
  color: #f2efe8;
}

.cond { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; text-transform: uppercase; }

/* ---------- Frames (Option A: normal document scroll, no snap) ---------- */
main.reel {
  height: auto;
  overflow: visible;
}
main.reel::-webkit-scrollbar { display: none; }

.frame {
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: grid;
}
/* Hero keeps presence; later frames size to content so the page does not feel endless. */
.frame:has(.still) {
  min-height: 62vh;
  min-height: 62svh;
}
.frame--auto,
.frame:has(.scrim-navy) {
  min-height: 0;
}

/* Dark long-form content below hero (Ad Grants substantial text, no cream page). */
.dark-doc {
  max-width: 70ch;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) max(28px, env(safe-area-inset-right)) 80px max(28px, env(safe-area-inset-left));
  color: rgba(242,239,232,0.88);
  line-height: 1.7;
}
.dark-doc .meta {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: rgba(242,239,232,0.5);
  margin: 0 0 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.dark-doc h2 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.14em;
  font-size: clamp(22px, 3vw, 30px);
  color: #fff;
  margin: 40px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.dark-doc h2:first-of-type { margin-top: 0; }
.dark-doc p { margin: 0 0 16px; }
.dark-doc a { color: var(--gold); }
.dark-doc strong { color: #fff; font-weight: 500; }
.dark-doc ul { margin: 8px 0 18px; padding-left: 1.2em; }
.dark-doc li { margin: 0 0 8px; }
.dark-doc .legal { margin-top: 40px; font-size: 13px; color: rgba(242,239,232,0.45); }
.dark-doc .cta-donate { color: #fff; margin: 8px 0 20px; }

/* Help Me Vets store buttons (anchor target for ads / deep links) */
#get-app,
.app-get {
  scroll-margin-top: 88px;
  margin: 28px 0 8px;
  padding: 22px 20px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
}
.app-get-title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.14em;
  font-size: clamp(18px, 2.4vw, 24px);
  color: #fff;
  margin: 0 0 8px;
}
.app-get-lead {
  margin: 0 0 16px !important;
  color: rgba(242,239,232,0.78);
  max-width: 46ch;
}
.app-get-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.app-store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin: 0 !important;
}
.app-store-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
  user-select: none;
  border-color: rgba(255,255,255,0.28);
  color: rgba(242,239,232,0.85);
}

/* Hide the old frame-index dots used for snap navigation. */
.index { display: none !important; }

.still {
  position: absolute;
  inset: 0;
  background-image: url("/assets/bg.jpg");
  background-size: cover;
  background-repeat: no-repeat;
}
/* LCP-friendly photo: real <img> so the browser can discover + prioritize it. */
img.still-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
  z-index: 0;
  pointer-events: none;
}
.still:has(> img.still-photo) {
  background-image: none;
}
/* Each frame is a different crop of the same negative — the film pulls focus. */
.crop-open   { background-position: 50% 58%; filter: contrast(1.06) saturate(0.96); transform: scale(1.06); }
.crop-grade  { background-position: 22% 78%; filter: grayscale(0.9) contrast(1.2) brightness(0.6); }
.crop-far    { background-position: 80% 30%; filter: saturate(0.7) brightness(0.5); }
.crop-high   { background-position: 50% 20%; filter: contrast(1.1) brightness(0.55); }
.crop-low    { background-position: 35% 92%; filter: saturate(0.75) brightness(0.45); }
.crop-open > img.still-photo { object-position: 50% 58%; filter: contrast(1.06) saturate(0.96); transform: scale(1.06); }
.crop-grade > img.still-photo { object-position: 22% 78%; filter: grayscale(0.9) contrast(1.2) brightness(0.6); }
.crop-far > img.still-photo { object-position: 80% 30%; filter: saturate(0.7) brightness(0.5); }
.crop-high > img.still-photo { object-position: 50% 20%; filter: contrast(1.1) brightness(0.55); }
.crop-low > img.still-photo { object-position: 35% 92%; filter: saturate(0.75) brightness(0.45); }

/* Anamorphic bars: real letterbox that crops every frame, not decoration. */
.frame::before, .frame::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 5.4vh;
  background: #050d1a;
  z-index: 6;
  pointer-events: none;
}
.frame::before { top: 0; }
.frame::after { bottom: 0; }
.frame--auto::before, .frame--auto::after { display: none; }

.scrim { position: absolute; inset: 0; z-index: 2; }
.scrim-bottom { background: linear-gradient(180deg, rgba(5,13,26,0) 30%, rgba(5,13,26,0.86) 100%); }
.scrim-left { background: linear-gradient(90deg, rgba(5,13,26,0.90) 0%, rgba(5,13,26,0.38) 46%, rgba(5,13,26,0) 78%); }
.scrim-right { background: linear-gradient(270deg, rgba(5,13,26,0.92) 0%, rgba(5,13,26,0.34) 50%, rgba(5,13,26,0) 80%); }
.scrim-flat { background: rgba(5,13,26,0.74); }
.scrim-navy { background: var(--navy-900); }
.scrim-deep { background: #08182f; }

.overlay {
  position: relative;
  z-index: 8;
  width: 100%;
  display: grid;
  padding:
    calc(5.4vh + 90px)
    max(30px, env(safe-area-inset-right))
    calc(5.4vh + 40px)
    max(30px, env(safe-area-inset-left));
}
/* Text parks in a different corner in every frame. */
.place-bl { align-content: end; justify-items: start; }
.place-tr { align-content: start; justify-items: end; text-align: right; }
.place-br { align-content: end; justify-items: end; text-align: right; }
.place-tl { align-content: start; justify-items: start; }
.place-cl { align-content: center; justify-items: start; }
.place-c  { align-content: center; justify-items: center; text-align: center; }

.slate {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.62em;
  color: rgba(242,239,232,0.62);
  margin: 0 0 26px;
}
.slate .mk { color: var(--gold); }

h1.title {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(38px, 9vw, 128px);
  line-height: 0.94;
  letter-spacing: 0.16em;
  margin: 0;
  text-indent: 0.16em;
  color: #fff;
  text-shadow: 0 6px 40px rgba(0,0,0,0.6);
}
h1.title em {
  display: block;
  font-style: normal;
  font-weight: 300;
  letter-spacing: 0.30em;
  font-size: 0.42em;
  color: rgba(255,255,255,0.82);
  margin-top: 0.7em;
}

h2.card {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(26px, 5vw, 68px);
  line-height: 1.03;
  letter-spacing: 0.13em;
  margin: 0;
  color: #fff;
  max-width: 17ch;
}
h3.sub {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-weight: 500;
  font-size: clamp(18px, 2.4vw, 26px);
  letter-spacing: 0.18em;
  margin: 0 0 16px;
  color: #fff;
}

.caption {
  margin: 24px 0 0;
  max-width: 44ch;
  font-size: clamp(15px, 1.4vw, 18px);
  color: rgba(242,239,232,0.80);
  font-weight: 300;
}
.caption + .caption { margin-top: 14px; }
.caption a { color: var(--gold); }
.place-tr .caption, .place-br .caption { margin-left: auto; }
.place-c .caption { margin-left: auto; margin-right: auto; }

.hair { width: 88px; height: 1px; background: var(--red); margin: 0 0 22px; }
.place-tr .hair, .place-br .hair { margin-left: auto; }
.place-c .hair { margin-left: auto; margin-right: auto; }

.acts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.place-tr .acts, .place-br .acts { justify-content: flex-end; }
.place-c .acts { justify-content: center; }
.cta-donate, .cta-outline { font-family: "Barlow Condensed", sans-serif; letter-spacing: 0.22em; font-size: 12px; }

/* ---------- HUD ---------- */
header.hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  padding-top: calc(env(safe-area-inset-top) + 4.2vh);
}
/* The frame behind the nav can be a blown-out sunrise, so the HUD carries its
   own light-to-dark base rather than trusting the photograph. */
header.hud::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: calc(4.2vh + 168px);
  background: linear-gradient(180deg,
    rgba(5,13,26,0.88) 0%,
    rgba(5,13,26,0.72) 42%,
    rgba(5,13,26,0.34) 72%,
    rgba(5,13,26,0) 100%);
  pointer-events: none;
}
/* Social marks centered above the VPP logo column. */
.hud-social {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 204px;
  max-width: 204px;
  margin: 0 0 2px max(30px, env(safe-area-inset-left));
  padding: 0;
  box-sizing: border-box;
}
.hud-fb,
.hud-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  text-shadow: none;
  flex: none;
  opacity: 0.94;
  filter: drop-shadow(0 1px 3px rgba(5,13,26,0.75));
}
.hud-fb:hover,
.hud-social a:hover { opacity: 1; }
.hud-fb img,
.hud-social a img {
  display: block;
  width: 22px;
  height: 22px;
}
.hud-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 8px max(30px, env(safe-area-inset-right)) 16px max(30px, env(safe-area-inset-left));
}
.hud-bar img { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.65)); }
.hud-bar .cta-donate {
  box-shadow: 0 2px 14px rgba(0,0,0,0.5);
}
.hud-bar .cta-outline {
  box-shadow: 0 2px 14px rgba(0,0,0,0.35);
}
/* margin-right:auto must be on the flex child (the logo <a>), not the
   nested <img> — auto margins on a non-flex descendant compute to 0 and
   leave Home/Programs/About/Merch/Donate/Contact packed on the left. */
.hud-bar > a:first-child { margin-right: auto; }
.hud-bar img {
  height: 30px;
  width: auto;
  max-width: 204px;
  aspect-ratio: 245 / 36;
  display: block;
}
nav.hudnav { display: flex; gap: 28px; }
nav.hudnav a {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.28em;
  font-weight: 500;
  color: rgba(255,255,255,0.94);
  text-shadow: 0 1px 3px rgba(5,13,26,0.85), 0 0 14px rgba(5,13,26,0.6);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
nav.hudnav a:hover { color: #fff; }
nav.hudnav a[aria-current="page"] { color: #fff; border-bottom-color: var(--red); }
.burger {
  display: none;
  width: 44px; height: 40px;
  background: rgba(5,13,26,0.5);
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0;
  cursor: pointer;
}
.burger span { display: block; width: 20px; height: 1px; margin: 5px auto; background: #fff; }

/* Timecode index down the right edge. */
.index {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: grid;
  gap: 16px;
  text-align: right;
}
.index a {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: rgba(242,239,232,0.42);
  text-decoration: none;
}
.index a:hover { color: #fff; }

/* ---------- Lists (programs, roster, ledger) ---------- */
.rows { display: grid; max-width: 760px; }
.rows > * { border-top: 1px solid rgba(255,255,255,0.22); padding: 18px 0; }
.rows > *:last-child { border-bottom: 1px solid rgba(255,255,255,0.22); }
.rows b {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-weight: 500;
  font-size: clamp(19px, 2.4vw, 28px);
  letter-spacing: 0.16em;
  color: #fff;
}
.rows span { display: block; margin-top: 8px; max-width: 54ch; color: rgba(242,239,232,0.74); font-size: 15.5px; }
.rows small {
  display: block;
  margin-top: 10px;
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11.5px;
  color: rgba(242,239,232,0.5);
}

.roster { display: grid; max-width: 560px; }
.roster div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255,255,255,0.20);
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 16px;
}
.roster div i { font-style: normal; color: rgba(242,239,232,0.56); letter-spacing: 0.1em; font-size: 13px; }

/* Board roster reads as the subject of its own frame: centred, stacked and
   set large enough to be read from across the room. */
.roster--feature {
  max-width: 720px;
  width: 100%;
  margin: 8px auto 0;
  text-align: center;
}
.roster--feature div {
  display: block;
  padding: clamp(18px, 2.6vh, 30px) 0;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  letter-spacing: normal;
  font-size: inherit;
}
.roster--feature div:first-child { border-top: 1px solid rgba(255,255,255,0.18); }
.roster--feature div span {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.08;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: #fff;
}
.roster--feature div i {
  display: block;
  margin-top: 10px;
  font-size: clamp(14px, 1.3vw, 17px);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: rgba(242,239,232,0.72);
}

.endcard { background: var(--navy-900); }
.endcard img.mark { width: 72px; margin: 0 0 30px; opacity: 0.92; }
.end {
  margin-top: 40px;
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5em;
  color: rgba(242,239,232,0.45);
}
.legal { margin-top: 18px; font-size: 13px; color: rgba(242,239,232,0.5); }
.legal a { color: rgba(242,239,232,0.78); }

/* ---------- Coming soon ---------- */
/* Gold-deep on dark, hairline box, no fill — reads as a production slate
   stamped on the frame rather than a marketing sticker. Red stays with Donate. */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin-bottom: 16px;
  padding: 5px 11px 4px;
  border: 1px solid rgba(242,204,97,0.55);
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--gold);
  background: rgba(242,204,97,0.06);
  white-space: nowrap;
}
.soon::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--gold);
  flex: none;
}
/* On light document pages gold-deep carries the contrast; --gold never sits on white. */
.doc .soon {
  color: var(--gold-deep);
  border-color: rgba(192,138,30,0.6);
  background: rgba(192,138,30,0.07);
}
.doc .soon::before { background: var(--gold-deep); }
.place-tr .soon, .place-br .soon { margin-left: auto; }
/* Inline variant for list rows. */
.soon--inline { margin: 0 0 0 14px; vertical-align: middle; }

.backchip {
  position: fixed;
  z-index: 90;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 13px;
  background: rgba(5,13,26,0.82);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-decoration: none;
}
.backchip:hover { background: #fff; color: var(--navy-900); border-color: #fff; }

@media (max-width: 900px) {
  .index { display: none; }
}
@media (max-width: 760px) {
  .burger { display: block; }
  nav.hudnav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(5,13,26,0.96);
    border-top: 1px solid rgba(255,255,255,0.18);
  }
  nav.hudnav.open { display: flex; }
  nav.hudnav a {
    padding: 15px max(30px, env(safe-area-inset-left));
    border-bottom: 1px solid rgba(255,255,255,0.12);
    border-top: 0;
  }
  header.hud::before { height: calc(2.6vh + 140px); }
  header.hud { padding-top: calc(env(safe-area-inset-top) + 2.6vh); }
  .hud-social {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding: 0 max(16px, env(safe-area-inset-right)) 4px max(16px, env(safe-area-inset-left));
    gap: 12px;
    justify-content: center;
  }
  /* The 245x36 wordmark plus burger, Cart and Donate cannot fit a phone row.
     Crop to the emblem at the left of the same file (it occupies x 29-77 of
     245). Keep the logo link out of the flex shrink pool so the mark's box
     cannot be squeezed; the nested img is sized explicitly. */
  .hud-bar { gap: 10px; }
  .hud-bar > a:first-child { flex: none; }
  .hud-bar img {
    width: 42px;
    height: 28px;
    object-fit: cover;
    object-position: left center;
  }
  .hud-bar .cta-donate,
  .hud-bar .cta-outline,
  .hud-bar .cart-btn { padding: 0 12px; letter-spacing: 0.1em; }
  .frame::before, .frame::after { height: 3.4vh; }
  /* On a phone the corner placements collapse to bottom-left — right-aligned
     text at this width reads like a mistake rather than a composition. */
  .place-tr, .place-br, .place-tl, .place-cl { align-content: end; justify-items: start; text-align: left; }
  .place-tr .caption, .place-br .caption { margin-left: 0; }
  .place-tr .hair, .place-br .hair { margin-left: 0; }
  .place-tr .soon, .place-br .soon { margin-left: 0; }
  .place-tr .acts, .place-br .acts { justify-content: flex-start; }
  /* The 3.4vh letterbox bar alone does not clear the iOS home indicator. */
  .overlay {
    padding-bottom: calc(3.4vh + 66px + env(safe-area-inset-bottom));
    padding-top: calc(3.4vh + 86px);
  }
  h1.title { letter-spacing: 0.1em; text-indent: 0.1em; }
  .roster div { flex-direction: column; gap: 4px; }
  /* Tracked-out nowrap badge text overflows its clipped frame on a phone. */
  .soon {
    white-space: normal;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
  }
}

