/* Convenerra4 – Home Front Museum Heritage Site
   Responsive, semantic, Core Web Vitals friendly */

:root {
  --navy: #1a2744;
  --navy-light: #2a3a5c;
  --gold: #b8860b;
  --gold-muted: #c9a227;
  --grey-deep: #3d3d3d;
  --grey-muted: #6b6b6b;
  --white: #fafafa;
  --off-white: #f5f4f0;
  --max-width: 1200px;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--grey-deep);
  background: var(--off-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

img[loading="lazy"] {
  content-visibility: auto;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  color: var(--gold);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--navy);
  color: var(--white);
  z-index: 100;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.site-header .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-logo {
  height: 48px;
  width: auto;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-nav a {
  color: var(--white);
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--gold-muted);
}

/* Hero */
.hero {
  background: var(--navy) linear-gradient(180deg, rgba(26,39,68,0.92) 0%, rgba(26,39,68,0.85) 100%);
  color: var(--white);
  padding: 4rem 1rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 1rem;
  font-weight: 600;
}

.hero .tagline {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 42ch;
  margin: 0 auto 1.5rem;
}

.hero .cta {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  border-radius: 4px;
  margin-top: 0.5rem;
}

.hero .cta:hover {
  background: var(--gold-muted);
  color: var(--navy);
}

/* Sections */
section {
  padding: 3rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

section:nth-of-type(even) {
  background: var(--white);
}

section h2 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
}

section h3 {
  font-size: 1.2rem;
  color: var(--navy-light);
  margin: 1.5rem 0 0.75rem;
}

/* Page banner (subfolder pages) */
.page-banner {
  background: var(--navy);
  color: var(--white);
  padding: 2.5rem 1rem;
  text-align: center;
  position: relative;
}

.page-banner img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.4;
  z-index: 0;
}

.page-banner .wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-banner h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.9rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 0.5rem;
  color: var(--gold-muted);
}

.breadcrumb a {
  color: var(--white);
  opacity: 0.9;
}

.breadcrumb a:hover {
  opacity: 1;
  color: var(--gold-muted);
}

.breadcrumb [aria-current="page"] {
  color: var(--gold-muted);
  font-weight: 500;
}

/* Content */
.content-wrap {
  max-width: 720px;
  margin: 0 auto;
}

/* Cards / links grid */
.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.link-card {
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.link-card:hover {
  border-color: var(--gold-muted);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.link-card h3 {
  margin-top: 0;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.site-footer .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--gold-muted);
}

.site-footer a:hover {
  color: var(--white);
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
}

/* Utilities */
.wrap { padding: 0 1rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) {
  .site-header .wrap { padding: 0 1.5rem; }
  section { padding: 4rem 1.5rem; }
  .page-banner { padding: 3rem 1.5rem; }
}
