/* 776FA Tribute — modern static redesign, 2026 restoration */
:root {
  --ink: #1c1a14;
  --ink-soft: #3f3b32;
  --muted: #5c574c;
  --paper: #f6f1e6;
  --paper-2: #ece5d4;
  --paper-3: #e2d8c0;
  --cream: #fbf8f1;
  --olive: #2b3524;
  --olive-2: #3d4a32;
  --olive-3: #1a2116;
  --brass: #a18448;
  --brass-2: #c4a862;
  --rule: #c4a862;
  --link: #2f3d28;
  --link-hover: #6b2d2d;
  --danger-soft: #6b2d2d;
  --focus: #1c4d8c;
  --shadow: 0 10px 30px rgba(28, 26, 20, 0.12);
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --measure: 68ch;
  --wide: 72rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, .nav-btn:focus-visible, .nav-toggle:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--olive-3);
  color: var(--cream);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus { top: 0.6rem; }

/* Header */
.site-header {
  background: var(--olive-3);
  color: var(--cream);
  border-bottom: 3px solid var(--brass);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  color: var(--cream);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand:hover { color: var(--brass-2); }
.brand-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-2);
  font-weight: 600;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--brass);
  color: var(--cream);
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--brass-2);
  border-bottom-color: var(--brass-2);
}

@media (max-width: 860px) {
  .nav-btn { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--olive);
    border-bottom: 3px solid var(--brass);
    padding: 0.5rem 1.25rem 1rem;
  }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 0.7rem 0; border-bottom: 1px solid rgba(196,168,98,0.25); }
}

/* Main layout */
.main { flex: 1; }
.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1rem; }
.prose h1, .prose h2, .prose h3,
.page-title, .hero-copy h1, .section-title {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--olive-3);
}
.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 700;
  margin: 0 0 0.4rem;
}
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); }
.gold-rule {
  display: block;
  width: 4.5rem;
  height: 3px;
  background: var(--brass);
  border: 0;
  margin: 0.9rem 0 1.3rem;
}

/* Hero */
.hero {
  background:
    linear-gradient(180deg, rgba(26,33,22,0.2), rgba(26,33,22,0.05)),
    var(--olive-3);
  color: var(--cream);
  padding: 0;
}
.hero-grid {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  align-items: stretch;
}
.hero-copy {
  padding: 2.75rem 1.5rem 2.75rem 1.5rem;
}
.hero-copy h1 {
  color: var(--cream);
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  margin: 0 0 0.75rem;
}
.hero-copy .gold-rule { background: var(--brass-2); }
.hero-copy p { margin: 0 0 1rem; color: #ebe4d4; }
.hero-copy .lede { color: #f3ecdc; }
.hero-art {
  margin: 0;
  background: #111;
  min-height: 100%;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-art figcaption {
  position: absolute;
  width: 1px; height: 1px; overflow: hidden;
}
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-height: 420px; }
  .hero-art img { max-height: 420px; object-fit: cover; }
  .hero-copy { padding: 2rem 1.25rem; }
}

/* Cards / collections */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.card {
  background: var(--cream);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: 0 1px 0 rgba(28,26,20,0.04);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
a.card:hover {
  border-color: var(--brass);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: inherit;
}
.card h2, .card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 0 0 0.45rem;
  color: var(--olive-3);
}
.card p { margin: 0; color: var(--ink-soft); flex: 1; }
.card .more {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--olive-2);
  letter-spacing: 0.02em;
}

/* Photo figures */
.photo {
  margin: 0 0 1.5rem;
  background: var(--cream);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  overflow: hidden;
}
.photo img { width: 100%; background: #1a1a16; }
.photo figcaption, .missing figcaption {
  padding: 0.8rem 1rem 1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.photo figcaption strong, .missing figcaption strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.gallery .photo, .gallery .missing { margin: 0; height: 100%; display: flex; flex-direction: column; }
.gallery .photo img { aspect-ratio: 4/3; object-fit: contain; background: #222; }

.missing {
  margin: 0;
  background: var(--cream);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.missing-frame {
  aspect-ratio: 4/3;
  background:
    repeating-linear-gradient(-45deg, #d9d0bb, #d9d0bb 10px, #e6deca 10px, #e6deca 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.missing-frame span {
  background: rgba(251,248,241,0.88);
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--paper-3);
}
.file-ref {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

.note, .gap-note, .warn {
  background: var(--paper-2);
  border-left: 4px solid var(--brass);
  padding: 0.9rem 1rem;
  margin: 1.25rem 0;
  color: var(--ink-soft);
}
.warn { border-left-color: var(--danger-soft); }
.gap-note { border-left-color: #6a6248; }

/* People list */
.person-grid, .roster {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
  font-size: 0.98rem;
}
.person-grid th, .person-grid td,
.roster th, .roster td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--paper-3);
  vertical-align: top;
}
.person-grid thead th, .roster thead th {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  background: var(--paper-2);
}
.person-grid tr:hover td, .roster tbody tr:hover td { background: #f3eee2; }

.pill {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--paper-3);
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  color: var(--muted);
}

/* Memoirs */
.memoir {
  max-width: 42rem;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
}
.memoir h1 { font-size: 2rem; margin-bottom: 0.2rem; }
.memoir .byline { color: var(--muted); margin-bottom: 1.5rem; }
.memoir p { margin: 0 0 1.05rem; }
.memoir-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--paper-3);
  margin-top: 2.5rem;
  padding-top: 1rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.chapter-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.chapter-list li {
  border-bottom: 1px solid var(--paper-3);
  padding: 0.55rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.chapter-list .missing-ch { color: var(--muted); font-style: italic; }
.index-list {
  columns: 2;
  column-gap: 2rem;
  padding: 0;
  margin: 0.5rem 0 1.5rem;
  list-style: none;
}
@media (max-width: 560px) { .index-list { columns: 1; } }
.index-list li { break-inside: avoid; padding: 0.15rem 0; }

/* Insignia / figures on home */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0 0;
  align-items: start;
}
@media (max-width: 800px) { .feature-row { grid-template-columns: 1fr; } }
.banner-art {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 1rem;
}
.banner-art img { width: min(680px, 100%); background: transparent; }
.tank-row { display: flex; justify-content: center; margin: 1.5rem 0; }
.tank-row img { width: min(615px, 100%); }

/* Footer */
.site-footer {
  background: var(--olive-3);
  color: #d9d1be;
  padding: 2rem 1.25rem 2.4rem;
  margin-top: auto;
  border-top: 3px solid var(--brass);
  font-size: 0.92rem;
}
.footer-inner { max-width: var(--wide); margin: 0 auto; }
.site-footer a { color: var(--brass-2); }
.site-footer .tiny { margin-top: 0.8rem; color: #b5ad9a; font-size: 0.82rem; }

/* 404 */
.notfound { text-align: left; padding: 4rem 1.25rem; max-width: 40rem; margin: 0 auto; }

/* Print */
@media print {
  .site-header, .site-footer, .nav-btn, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
  .wrap { padding: 0; }
}

/* Utilities */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.credits dt { font-weight: 700; margin-top: 0.8rem; }
.credits dd { margin: 0.15rem 0 0 0; }
