/* Memoirs of a Warfighter — shared presentation.
   Navy, crimson, cream, and gold. Motion respects prefers-reduced-motion. */
:root {
  --sky: #f4f0e6;
  --paper: #fbf8f2;
  --ink: #142033;
  --muted: #3e4c5e;
  --line: #ddd4c4;
  --red: #8e1c2c;
  --blue: #0c3d78;
  --dawn: #c6a15a;
  --dawn-ink: #5c4310;
  --night: #071525;
  --gold: #f3d9a0;
  --ok: #1e5c38;
  --focus: #0c3d78;
  --font-display: "Cormorant Garamond", "Cormorant Fallback", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Source Sans Fallback", system-ui, sans-serif;
  --font-stencil: Oswald, "Arial Narrow", sans-serif;
  --font-mono: "Courier Prime", ui-monospace, monospace;
  --wrap: 1120px;
  color-scheme: light;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/cormorant-garamond-600.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Fallback";
  src: local("Liberation Serif"), local("Times New Roman");
  size-adjust: 100%;
  ascent-override: 92.4%;
  descent-override: 28.7%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Source Sans Fallback";
  src: local("Liberation Sans"), local("Arial");
  size-adjust: 91.64%;
  ascent-override: 111.74%;
  descent-override: 43.65%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/source-sans-3-400.woff2") format("woff2");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: #0b1220; --paper: #121c2e; --ink: #f3efe4; --muted: #c5d0df; --line: #2c3c54;
    --red: #ffb4bc; --blue: #9ec0ff; --dawn: #f0d48a; --dawn-ink: #f0d48a; --night: #050d18;
    --gold: #f0d48a; --ok: #8fd0a8; --focus: #f0d48a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--sky); color: var(--ink);
  font: 400 18px/1.6 var(--font-body);
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 72px); }
h2 { font-size: clamp(30px, 4vw, 46px); }
h3 { font-size: 26px; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: #fff; color: #071525; padding: 8px 12px; font-weight: 600;
}
.skip:focus { top: 8px; }
.eyebrow {
  font: 600 13px/1.3 var(--font-stencil); letter-spacing: .14em;
  text-transform: uppercase; color: var(--red);
}
.lede { font-size: 19px; color: var(--muted); max-width: 66ch; }
.section { padding: 72px 0; }
.section-head { display: grid; gap: 12px; margin-bottom: 28px; max-width: 760px; }
.section-head h2::after {
  content: ""; display: block; width: 72px; height: 3px; margin-top: 14px;
  background: linear-gradient(90deg, var(--red), var(--dawn));
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px/1 var(--font-body); padding: 14px 18px; border-radius: 4px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #e0bc6a; color: #1a1408; }
.btn-primary:hover { background: #efd08a; color: #1a1408; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-small { padding: 9px 12px; font-size: 14px; }
.btn-ink { background: var(--ink); color: var(--paper); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.crisis {
  background: var(--night); color: #f3efe4; font-size: 15px; text-align: center; padding: 10px 16px;
}
.crisis a { color: #f3d9a0; font-weight: 700; }
.vday {
  display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap;
  background: #10243f; color: #f7f3ea; padding: 10px 16px; text-align: center;
}
.vday p { font-size: 15px; }
.flag {
  width: 42px; height: 28px; flex: none; position: relative; overflow: hidden;
  background: repeating-linear-gradient(#b22234 0 2px, #fff 2px 4px);
  box-shadow: 0 0 0 1px rgba(255,255,255,.25);
  transform-origin: left center;
  animation: flag-wave 3.6s ease-in-out infinite;
}
.flag .canton {
  position: absolute; left: 0; top: 0; width: 18px; height: 15px; background: #1d3557;
  background-image: radial-gradient(#fff 0.6px, transparent 0.7px);
  background-size: 4px 3.2px;
}
@keyframes flag-wave {
  0%, 100% { transform: perspective(80px) rotateY(0deg); }
  50% { transform: perspective(80px) rotateY(14deg); }
}
@media (prefers-reduced-motion: reduce) {
  .flag { animation: none; }
}
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  border-top: 3px solid #c6a15a;
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font: 600 26px/1 var(--font-display); }
.brand-sub { display: block; font: 500 11px/1.2 var(--font-stencil); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nav-toggle {
  display: none; font: 600 14px/1 var(--font-stencil); letter-spacing: .08em; text-transform: uppercase;
  background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 8px 12px; cursor: pointer;
}
.nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.nav a {
  color: var(--ink); text-decoration: none; font: 500 14px/1 var(--font-stencil);
  letter-spacing: .04em; text-transform: uppercase; padding: 8px 8px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--red); }
.nav a[aria-current="page"] { border-bottom-color: var(--red); color: var(--red); }
@media (max-width: 980px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-header .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 10px; }
  .js .site-header.nav-open .nav { display: flex; }
  .js .nav a { padding: 10px 4px; }
}
.hero-page {
  background: radial-gradient(1200px 480px at 80% -10%, rgba(198,161,90,.28), transparent 55%), var(--night);
  color: #f7f3ea; padding: 64px 0 72px; position: relative; overflow: hidden;
}
.hero-page .eyebrow { color: #f3d9a0; }
.hero-page .lede { color: #d5deea; }
.hero-page a { color: #f3d9a0; }
.stars {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(1px 1px at 12% 30%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 40% 18%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.4px 1.4px at 70% 26%, rgba(243,217,160,.8), transparent),
    radial-gradient(1px 1px at 88% 40%, rgba(255,255,255,.55), transparent);
}
.portrait-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 28px; }
@media (max-width: 720px) { .portrait-grid { grid-template-columns: 1fr; } }
figure.portrait { margin: 0; background: #1a1408; padding: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.28); }
figure.portrait img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center 18%; filter: sepia(.18) contrast(1.04); }
figure.portrait figcaption { color: #f3d9a0; font: 500 13px/1.4 var(--font-stencil); letter-spacing: .08em; text-transform: uppercase; padding: 10px 4px 4px; }
.prose { display: grid; gap: 16px; max-width: 72ch; }
.prose p { font-size: 18px; }
.close-line { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); color: var(--ink); }
.motto {
  background: var(--night); color: #f3d9a0; overflow: hidden; border-block: 1px solid rgba(243,217,160,.3);
}
.motto-track {
  display: flex; gap: 28px; width: max-content; padding: 14px 0;
  font: 500 14px/1 var(--font-stencil); letter-spacing: .22em;
  animation: motto 28s linear infinite;
}
@keyframes motto { to { transform: translateX(-50%); } }
.motto:hover .motto-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .motto-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; padding-inline: 16px; }
  .motto-track [aria-hidden="true"] { display: none; }
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.res-card, .choice {
  background: var(--paper); border: 1px solid var(--line); padding: 18px; display: grid; gap: 8px; align-content: start;
  text-decoration: none; color: inherit;
}
.res-card h3, .choice h3 { font-size: 22px; }
.res-card p, .choice p { color: var(--muted); font-size: 16px; }
.choice:hover, .res-card:hover { border-color: var(--dawn); }
.kicker { font: 600 12px/1 var(--font-stencil); letter-spacing: .12em; text-transform: uppercase; color: var(--dawn-ink); }
.crisis-panel {
  background: var(--night); color: #f7f3ea; padding: 28px; display: grid; gap: 12px; margin-bottom: 28px;
}
.crisis-panel a { color: #f3d9a0; font-weight: 700; }
.crisis-panel h2 { color: #fff; }
.group { margin-top: 36px; }
.group h2 { font-size: clamp(26px, 3vw, 36px); }
.notice, .gentle {
  background: color-mix(in srgb, var(--dawn) 16%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--dawn) 45%, var(--line));
  padding: 14px 16px; font-size: 16px;
}
form.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .label { font: 600 12px/1.2 var(--font-stencil); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input[type="text"], input[type="email"], input[type="search"], select, textarea, input[type="file"] {
  width: 100%; font: 400 16px/1.4 var(--font-body); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); padding: 10px 12px;
}
textarea { min-height: 120px; resize: vertical; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.templates, .formats { display: flex; gap: 8px; flex-wrap: wrap; }
.templates button, .formats button { font: inherit; cursor: pointer; }
.templates button[aria-pressed="true"], .formats button[aria-pressed="true"] { outline: 3px solid var(--dawn); }
.preview-frame { background: var(--night); padding: 16px; overflow: auto; }
.preview-frame canvas { width: 100%; height: auto; background: #000; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.site-footer { padding: 40px 0 56px; color: var(--muted); border-top: 1px solid var(--line); font-size: 15px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.site-footer h2, .site-footer h3 { font-size: 20px; color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.draft-banner {
  background: #5c4310; color: #fff8e8; padding: 14px 16px; text-align: center; font-weight: 700;
}
.leader li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
.honored-line { font: 600 15px/1.3 var(--font-stencil); letter-spacing: .06em; text-transform: uppercase; color: var(--dawn-ink); }
