/*
Theme Name: Hall of Eagles
Theme URI: https://hallofeagles.org/
Author: Collision Industry Hall of Eagles
Description: Theme for the Collision Industry Hall of Eagles: a wall of brass nameplates by class year and a page for every Eagle. Requires the "Hall of Eagles — Eagles" plugin.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: hall-of-eagles
*/

:root {
  --sky: #EEF1F4;      /* page background */
  --paper: #FFFFFF;    /* raised surfaces */
  --ink: #1C2430;      /* text */
  --steel: #5B6675;    /* secondary text */
  --brass: #9A7330;    /* plaque edges, year numerals */
  --brass-deep: #7A5A22;
  --plate: #F3EBD8;    /* nameplate fill */
  --rule: #D5DBE2;
  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brass-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 10;
  background: var(--ink); color: #fff; padding: 0.5rem 0.9rem; border-radius: 4px;
}
.skip:focus { top: 0.75rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem; flex-wrap: wrap;
}
.wordmark {
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem;
  color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
}
.nav { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 0.55rem 0.7rem; color: var(--steel);
  text-decoration: none; font-weight: 600; font-size: 0.98rem; border-radius: 4px;
}
.nav a:hover { color: var(--ink); background: var(--sky); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brass); border-radius: 0; }

/* ---------- Home: hero ---------- */
.hero { background: var(--paper); border-bottom: 1px solid var(--rule); }
.hero-inner {
  display: grid; gap: 1.5rem; align-items: center;
  padding-top: 2rem; padding-bottom: 2.5rem;
}
.hero-art { order: -1; justify-self: center; max-width: 18rem; }
.hero-art img { mix-blend-mode: multiply; }
.hero h1 {
  font-size: clamp(3rem, 12vw, 6.25rem);
  font-weight: 600; letter-spacing: -0.01em; line-height: 0.95;
}
.hero .sub {
  font-family: var(--serif); font-size: clamp(1.35rem, 3.6vw, 1.75rem);
  font-style: italic; color: var(--steel); margin: 0.6rem 0 1.25rem;
}
.hero .lede { max-width: var(--measure); margin: 0 0 1.75rem; }
@media (min-width: 48rem) {
  .hero-inner { grid-template-columns: 1.25fr 1fr; padding-top: 3.5rem; padding-bottom: 4rem; }
  .hero-art { order: 0; max-width: 26rem; }
}

.button {
  display: inline-block; background: var(--ink); color: #fff;
  font-weight: 600; text-decoration: none; padding: 0.8rem 1.3rem; border-radius: 4px;
}
.button:hover { background: var(--brass-deep); color: #fff; }
.button.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.button.quiet:hover { background: var(--ink); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Home: sections ---------- */
.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section h2 { font-size: clamp(2rem, 6vw, 2.75rem); margin-bottom: 1rem; }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1rem; }

.steps { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.steps li { counter-increment: step; padding-top: 0.25rem; border-top: 2px solid var(--brass); }
.steps li::before {
  content: counter(step); display: block;
  font-family: var(--serif); font-weight: 600; font-size: 2.25rem; color: var(--brass); line-height: 1.2;
}
.steps h3 { font-size: 1.5rem; margin-bottom: 0.35rem; }
.steps p { margin: 0; color: var(--steel); }

.recent { display: grid; gap: 1.75rem; margin: 1.5rem 0 1.75rem; }
@media (min-width: 48rem) { .recent { grid-template-columns: repeat(3, 1fr); } }

.contact-card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px;
  padding: 1.5rem; max-width: var(--measure);
}
.contact-card .who { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin: 0; }
.contact-card .role { color: var(--steel); margin: 0 0 1rem; }
.contact-card .addr { word-break: break-word; margin: 1rem 0 0; font-size: 0.95rem; color: var(--steel); }

/* ---------- Wall of nameplates (shared) ---------- */
.class { display: grid; gap: 0.6rem; padding: 1.4rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.class:first-child { border-top: 0; }
@media (min-width: 40rem) { .class { grid-template-columns: 7rem 1fr; gap: 1.5rem; align-items: start; } }
.class-year { font-size: 2.5rem; color: var(--brass); font-weight: 600; line-height: 1; padding-top: 0.2rem; }

.plates {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem;
}
@media (min-width: 40rem) { .plates { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); } }
.plate {
  background: linear-gradient(180deg, #F7F1E3 0%, var(--plate) 100%);
  border: 1px solid #C9AD74;
  box-shadow: inset 0 0 0 3px #F7F1E3, inset 0 0 0 4px #D9C291;
  border-radius: 3px;
  padding: 0.7rem 0.8rem;
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem; line-height: 1.2;
  color: #2A2416; text-align: center;
  display: flex; align-items: center; justify-content: center; min-height: 3.4rem;
}

/* home preview variant: one year per column */
.recent .class { grid-template-columns: 1fr; border-top: 0; padding: 0; gap: 0.6rem; }
.recent .plates { grid-template-columns: 1fr; }

/* ---------- Inductees page ---------- */
.page-head { padding-top: 2.25rem; padding-bottom: 0.5rem; }
.page-head h1 { font-size: clamp(2.75rem, 10vw, 4.5rem); }
.page-head .lede { color: var(--steel); margin: 0.4rem 0 1.5rem; max-width: var(--measure); }

.finder { max-width: 26rem; margin-bottom: 1.25rem; }
.finder label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.finder input {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid #AEB7C2; border-radius: 4px;
  padding: 0.7rem 0.85rem; min-height: 2.9rem;
}
.finder input:focus-visible { border-color: var(--brass); outline-offset: 1px; }
.finder-status { margin: 0.4rem 0 0; color: var(--steel); font-size: 0.95rem; min-height: 1.5em; }

.year-index ul {
  list-style: none; margin: 0; padding: 0 0 0.75rem;
  display: flex; gap: 0.35rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
@media (min-width: 48rem) { .year-index ul { flex-wrap: wrap; overflow: visible; } }
.year-index a {
  display: block; padding: 0.35rem 0.6rem; border-radius: 4px; white-space: nowrap;
  background: var(--paper); border: 1px solid var(--rule);
  color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; font-size: 0.95rem;
}
.year-index a:hover { border-color: var(--brass); color: var(--brass-deep); }

.wall { padding-bottom: 3rem; }
.empty { padding: 2rem 0; color: var(--steel); }

/* ---------- Linked nameplates ---------- */
.plate.linked { padding: 0; }
.plate.linked a {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; min-height: 3.4rem; padding: 0.7rem 0.8rem;
  color: inherit; text-decoration: none; border-radius: 3px;
}
.plate.linked { position: relative; }
.plate.linked::after {
  content: ""; position: absolute; right: 0.45rem; bottom: 0.4rem;
  width: 0.4rem; height: 0.4rem; border-right: 1.5px solid var(--brass); border-bottom: 1.5px solid var(--brass);
  transform: rotate(-45deg); opacity: 0.8;
}
.plate.linked:hover { border-color: var(--brass-deep); box-shadow: inset 0 0 0 3px #F7F1E3, inset 0 0 0 4px var(--brass); }
.plate.linked a:hover { color: var(--brass-deep); }

/* ---------- Eagle page ---------- */
.eagle { padding-top: 1.75rem; padding-bottom: 3rem; }
.crumbs { margin: 0 0 1rem; font-size: 0.95rem; color: var(--steel); }
.crumbs a { color: var(--steel); }
.crumbs span { margin: 0 0.35rem; }
.eagle h1 { font-size: clamp(2.5rem, 9vw, 4.25rem); }
.eagle-class {
  display: inline-block; margin: 0.6rem 0 1.75rem;
  background: linear-gradient(180deg, #F7F1E3 0%, var(--plate) 100%);
  border: 1px solid #C9AD74; box-shadow: inset 0 0 0 3px #F7F1E3, inset 0 0 0 4px #D9C291;
  border-radius: 3px; padding: 0.35rem 0.9rem;
  font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: #2A2416;
}
.eagle-body { display: grid; gap: 1.75rem; }
@media (min-width: 48rem) { .eagle-body.has-photo { grid-template-columns: 17rem 1fr; gap: 2.5rem; align-items: start; } }
.eagle-photo { margin: 0; max-width: 20rem; }
.eagle-photo img {
  width: 100%; height: auto; border-radius: 4px;
  border: 1px solid #C9AD74; box-shadow: 0 0 0 4px var(--plate), 0 0 0 5px #D9C291;
}
.eagle-photo figcaption { margin-top: 0.75rem; font-size: 0.9rem; color: var(--steel); }
.eagle-bio { max-width: var(--measure); margin: 0 0 2rem; font-size: 1.12rem; line-height: 1.7; }
.eagle-bio.pending { color: var(--steel); font-style: italic; }
.invite {
  max-width: var(--measure); background: var(--paper); border: 1px solid var(--rule);
  border-left: 4px solid var(--brass); border-radius: 4px; padding: 1.25rem 1.4rem;
}
.invite h2 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.invite p { margin: 0 0 1rem; color: var(--steel); }
.classmates { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.classmates h2 { font-size: 1.9rem; margin-bottom: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #D7DDE4; padding: 2rem 0; font-size: 0.95rem; }
.site-footer a { color: #E9D8AE; }
.site-footer a:hover { color: #fff; }
.footer-inner p { margin: 0 0 0.5rem; max-width: var(--measure); }
.site-footer .updated { color: #9AA6B4; margin: 0; }

@media print {
  .site-header nav, .finder, .year-index, .skip { display: none; }
  body { background: #fff; }
  .site-footer { background: #fff; color: #000; }
}

/* ---------- Home: full-width image hero ---------- */
.hero-bg {
  position: relative; isolation: isolate; color: #fff; text-align: center;
  background: #1C2430 var(--hero-img, none) center 35% / cover no-repeat;
  border-bottom: 0;
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(16, 20, 27, 0.6) 40%, rgba(16, 20, 27, 0.88) 100%);
}
.hero-bg::after { /* thin brass rule along the bottom edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, #7A5A22, #C9A55C, #7A5A22);
}
.hero-bg-inner { max-width: 50rem; padding-top: clamp(4rem, 12vw, 8rem); padding-bottom: clamp(4rem, 12vw, 8rem); }
.hero-bg .eyebrow {
  margin: 0 0 1.1rem; color: #E9D8AE; font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.hero-bg .eyebrow span { white-space: nowrap; }
@media (max-width: 34rem) {
  .hero-bg .eyebrow span { display: block; }
  .hero-bg .eyebrow .dot { display: none; }
}
.hero-bg h1 {
  font-size: clamp(2.6rem, 7.5vw, 4.9rem); font-weight: 600; line-height: 1.04; letter-spacing: -0.005em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); text-wrap: balance;
}
.hero-bg .lede { max-width: 38rem; margin: 1.4rem auto 2.1rem; color: #E4E8ED; font-size: 1.12rem; }
.hero-bg .actions { justify-content: center; }
.button.brass { background: var(--brass); color: #fff; }
.button.brass:hover { background: #B8893C; color: #fff; }
.button.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85); }
.button.ghost:hover { background: #fff; color: var(--ink); }
.hero-bg :focus-visible { outline-color: #E9D8AE; }

/* ---------- WordPress additions ---------- */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.screen-reader-text:focus { clip: auto; width: auto; height: auto; margin: 0; }
.admin-bar .skip:focus { top: 2.75rem; }

/* Editor content (bios, pages) */
.entry-content > * { max-width: var(--measure); }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1rem; }
.entry-content h2 { font-size: clamp(1.75rem, 5vw, 2.25rem); margin: 2rem 0 0.75rem; }
.entry-content h3 { font-size: 1.5rem; margin: 1.5rem 0 0.5rem; }
.entry-content img { border-radius: 4px; }
.entry-content figure { margin: 1.5rem 0; }
.entry-content figcaption { font-size: 0.9rem; color: var(--steel); margin-top: 0.5rem; }
.entry-content .wp-block-image.alignwide, .entry-content .alignwide { max-width: 100%; }
.entry-content blockquote {
  margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 4px solid var(--brass);
  font-family: var(--serif); font-size: 1.35rem; line-height: 1.4;
}
.page-content { padding-top: 2.25rem; padding-bottom: 3rem; }
.page-content h1 { font-size: clamp(2.5rem, 9vw, 4rem); margin-bottom: 1.25rem; }
.eagle-bio.entry-content p { font-size: 1.12rem; line-height: 1.7; }
.eagle-bio { margin-bottom: 2rem; }
.no-results { padding: 3rem 0; }
