/* Herndon Home Museum — Design System */
:root {
  --burgundy: #5c1a1a;
  --burgundy-dark: #3d0f0f;
  --burgundy-light: #7a2e2e;
  --gold: #c9a227;
  --gold-light: #e8c547;
  --cream: #f7f3eb;
  --cream-dark: #ebe4d6;
  --charcoal: #2a2520;
  --text: #3d3830;
  --text-muted: #6b6358;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(61, 15, 15, 0.12);
  --shadow-lg: 0 12px 48px rgba(61, 15, 15, 0.18);
  --radius: 8px;
  --radius-lg: 16px;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 0.75rem);
}

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

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--burgundy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--gold);
  color: var(--burgundy-dark);
  padding: 0.5rem 1rem;
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--charcoal);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }

.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 42rem;
  margin-bottom: 1.25rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

p + p { margin-top: 1rem; }

/* Layout */
.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

section { padding: 5rem 0; }
#about,
#history,
#family,
#timeline,
#resources,
#visit { scroll-margin-top: var(--header-height); }

.section-white { background: var(--white); }
.section-cream { background: var(--cream); }
.section-quiet { background: var(--cream-dark); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.framed-image {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.framed-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.grid-2 > .framed-image,
.grid-2 .framed-image {
  min-height: 280px;
  max-height: 460px;
}
.grid-2 .framed-image img {
  min-height: 280px;
  max-height: 460px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 243, 235, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-dark);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--burgundy);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.logo:hover { color: var(--burgundy-dark); }

.main-nav { display: flex; align-items: center; gap: 0.15rem; }

.main-nav a {
  padding: 0.5rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--burgundy);
  background: var(--cream-dark);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  margin: 5px 0;
  transition: 0.3s;
}

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
  padding: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 50%, #4a1520 100%);
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  opacity: 0.42;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(61,15,15,0.88) 0%, rgba(61,15,15,0.32) 58%, transparent 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 6rem 0 4rem;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.35rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 1.25rem;
  color: var(--gold-light);
}
.hero-sub {
  font-size: 1.2rem;
  opacity: 0.92;
  max-width: 540px;
  color: var(--white);
  margin: 0;
}
.hero .section-label { color: var(--gold-light); }

/* Quote band */
.quote-band {
  background: var(--burgundy-dark);
  color: var(--white);
  text-align: center;
  padding: 3.25rem 0;
}
.quote-band blockquote {
  margin: 0;
}
.quote-band p {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 600;
  color: var(--white);
  margin: 0;
}

/* History */
.history-intro { margin-bottom: 3rem; }
.history-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.history-gallery figure {
  margin: 0;
  background: var(--cream);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.history-gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center 25%;
}
.history-gallery figure:last-child img {
  object-position: center 20%;
}
.history-gallery figcaption {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.85rem 1rem 1rem;
}

/* Family */
.family-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.family-member {
  text-align: center;
  padding: 1.75rem 1.15rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.family-member img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 3px solid var(--gold);
}
.family-member h3 {
  font-size: 1.125rem;
  margin-bottom: 0.2rem;
}
.family-dates {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--burgundy);
  margin: 0 0 0.65rem;
}
.family-member p:last-child {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}
.family-story {
  margin-top: 4rem;
  align-items: start;
}
.family-story .framed-image img {
  max-height: 420px;
  object-position: center;
}

/* Timeline */
.timeline-wrap { max-width: 760px; }
.timeline-wrap .container,
.container.timeline-wrap { width: min(100% - 2rem, 760px); }

.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 3px solid var(--gold);
  margin-top: 2rem;
}
.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.45rem;
  width: 14px;
  height: 14px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateX(-50%);
  margin-left: -1.5px;
}
.timeline-year {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--burgundy);
  margin-bottom: 0.25rem;
}

/* Bibliography */
.biblio-list {
  list-style: none;
  margin-top: 2rem;
  max-width: 46rem;
}
.biblio-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(61, 15, 15, 0.12);
  font-size: 0.9875rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.biblio-list li:first-child { border-top: 1px solid rgba(61, 15, 15, 0.12); }
.biblio-list cite {
  font-style: italic;
  color: var(--charcoal);
}
.biblio-list a {
  color: var(--charcoal);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.18em;
}
.biblio-list a:hover { color: var(--burgundy); }

/* Visit */
.visit-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
  align-items: start;
}
.visit-grid h3 { margin-top: 1.5rem; }
.visit-grid > div > h3:first-child { margin-top: 0; }
.visit-grid p { color: var(--text-muted); }
.plain-list {
  list-style: none;
  margin-top: 0.5rem;
}
.plain-list li { padding: 0.35rem 0; }

.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.25rem 0 0.5rem;
}
.hours-table th,
.hours-table td {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--cream-dark);
  font-weight: 500;
}
.hours-table th {
  text-align: left;
  font-weight: 600;
  color: var(--charcoal);
}
.hours-table td { text-align: right; color: var(--text-muted); }
.visit-image { margin-top: 1.25rem; }
.visit-image img { height: 220px; }

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.75);
  padding: 3rem 0 2rem;
}
.footer-simple { display: flex; flex-direction: column; gap: 2rem; }
.footer-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  font-size: 0.875rem;
}

/* Accessibility toolbar */
.a11y-toolbar {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.a11y-toolbar button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--burgundy);
  color: white;
  font-size: 1.125rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.a11y-toolbar button:hover { background: var(--burgundy-dark); }

body.high-contrast {
  filter: contrast(1.2);
}

/* Responsive */
@media (max-width: 1024px) {
  .family-grid,
  .history-gallery,
  .visit-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--cream-dark);
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 0.85rem 1rem;
  }
  .grid-2,
  .history-gallery,
  .visit-grid { grid-template-columns: 1fr; }
  .family-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .hero {
    min-height: auto;
  }
  .hero-inner {
    text-align: center;
    padding: 3.5rem 0 3rem;
  }
  .hero-content { margin-inline: auto; }
  .hero-sub { margin-inline: auto; }
  .history-gallery img,
  .visit-image img { height: 220px; }
  .family-story { margin-top: 3rem; }
  section { padding: 3.25rem 0; }
  .quote-band { padding: 2.5rem 0; }
}

@media (max-width: 480px) {
  .logo { font-size: 0.95rem; }
  .family-member { padding: 1.25rem 0.75rem 1.15rem; }
  .family-member img { width: 88px; height: 88px; }
}
