:root {
  --bg-canvas: #f7f5f0;
  --bg-surface: #ffffff;
  --bg-tinted: #fbf1f1;
  --text-primary: #111111;
  --text-muted: #5a554c;
  --accent-primary: #d62828;
  --accent-hover: #ba1e1e;
  --border-subtle: #e3ded5;
  --border-strong: #111111;
  --font-stack: "Trebuchet MS", "Segoe UI", sans-serif;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-stack);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.text-muted {
  color: var(--text-muted);
}

.annotation-label {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
  border-left: 2px solid var(--accent-primary);
  padding-left: 0.5rem;
}

/* Header & Inset Capsule Nav */
.header-wrapper {
  padding: 1.5rem 1.5rem 0.5rem;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

.header-capsule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.brand-anchor {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}

.brand-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  display: inline-block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s var(--ease-kinetic);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  line-height: 1;
}

.mobile-nav-pane {
  display: none;
  flex-direction: column;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.25rem;
  margin-top: 0.75rem;
  gap: 1rem;
}

.mobile-nav-pane.open {
  display: flex;
}

.mobile-nav-pane .nav-link {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

/* Layout Containers */
.main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  width: 100%;
}

.content-measure {
  max-width: 72ch;
  margin: 0 auto;
}

/* Hero Section */
.hero-paper {
  background-color: var(--bg-canvas);
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-paper-inner {
  max-width: 1000px;
}

.hero-lead-text {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Buttons */
.btn-archive {
  display: inline-block;
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-strong);
  border-radius: 0;
  padding: 0.9rem 1.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-kinetic);
}

.btn-archive:hover {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.btn-archive-accent {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.btn-archive-accent:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Section Fields & Dividers */
.section-field {
  padding: 4rem 0;
  position: relative;
}

.section-tinted {
  background-color: var(--bg-tinted);
  clip-path: polygon(0 2%, 100% 0%, 100% 98%, 0% 100%);
  padding: 5.5rem 0;
}

.two-col-archive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  margin-top: 2rem;
}

/* Icon-Led Archival List Rows (Strict No-Cards) */
.archive-list {
  list-style: none;
  margin-top: 1.5rem;
}

.archive-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.archive-row:last-child {
  border-bottom: none;
}

.archive-mark {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.85rem;
}

.archive-row-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.archive-row-body p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.provenance-tag {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-primary);
  font-weight: 600;
}

/* Standalone Panels & Imagery */
.archive-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.25rem;
  margin: 2.5rem 0;
}

.archive-img-wrap {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin: 1.5rem 0;
  background-color: #eee;
}

.archive-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 480px;
}

.archive-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  font-style: italic;
}

/* Notice / Boundary Callout */
.notice-box {
  background-color: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 20px 20px 0;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}

.notice-box h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}

.notice-box p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Interactive Reference Helper Tool */
.reference-tool-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
}

.form-control:focus {
  outline: 2px solid var(--accent-primary);
  background-color: var(--bg-surface);
}

.tool-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.tool-output {
  margin-top: 1rem;
  background-color: var(--bg-canvas);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  padding: 1rem;
  font-family: monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  display: none;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 1.5rem 2.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.footer-brand a {
  color: var(--text-primary);
  text-decoration: none;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 40ch;
}

.footer-nav {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-legal-line {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Scroll reveal helper */
.scroll-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-kinetic), transform 0.65s var(--ease-kinetic);
}

.scroll-reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Rules */
@media (max-width: 860px) {
  .two-col-archive {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .header-wrapper {
    padding: 1rem 1rem 0.25rem;
  }
  .header-capsule {
    padding: 0.6rem 1.25rem;
  }
  .section-field {
    padding: 2.5rem 0;
  }
  .section-tinted {
    padding: 3.5rem 0;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
