:root {
  --bg-canvas: #fbf1f0;
  --bg-surface: #fffafa;
  --bg-surface-hover: #f5e6e8;
  --text-primary: #1c1917;
  --text-muted: #57534e;
  --accent-primary: #6b2155;
  --accent-secondary: #9d174d;
  --border-subtle: #dec9cb;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-offset: 4px 4px 0px #1c1917;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  overflow-wrap: anywhere;
  hyphens: auto;
}
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin-bottom: 1.1rem; max-width: 70ch; }
a { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
a:hover { color: var(--accent-secondary); }
img { max-width: 100%; height: auto; display: block; object-fit: cover; border-radius: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.reading-col { max-width: 70ch; margin: 0 auto; }

/* Header - Strictly Static/Relative, Left Brand, Centered Nav Row Below */
.site-header {
  position: relative;
  background: var(--bg-surface);
  border-bottom: 2px solid var(--text-primary);
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}
.brand-badge {
  width: 32px;
  height: 32px;
  background: var(--accent-primary);
  color: var(--bg-surface);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
}
.menu-toggle {
  display: none;
  background: var(--accent-primary);
  color: var(--bg-surface);
  border: 2px solid var(--text-primary);
  padding: 0.35rem 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--text-primary);
}
.nav-row {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
}
.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 0.75rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-list a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover, .nav-list a[aria-current="page"] {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* Sections & Plum Bands */
section { padding: 4rem 0; }
.surface-sec { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.plum-band {
  background: var(--accent-primary);
  color: var(--bg-surface);
  padding: 3rem 0;
  border-top: 2px solid var(--text-primary);
  border-bottom: 2px solid var(--text-primary);
}
.plum-band h2, .plum-band h3, .plum-band p, .plum-band a { color: var(--bg-surface); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent-primary);
  color: var(--bg-surface) !important;
  text-decoration: none;
  font-weight: 800;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--text-primary);
  box-shadow: var(--shadow-offset);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border-radius: 0;
  font-size: 0.95rem;
}
.btn:hover {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px var(--text-primary);
}
.btn-light {
  background: var(--bg-surface);
  color: var(--text-primary) !important;
}

/* Hero Overlapping Layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.overlap-gallery {
  position: relative;
  min-height: 440px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(12, 35px);
}
.overlap-img-1 {
  grid-column: 1 / 9;
  grid-row: 1 / 8;
  z-index: 1;
  border: 2px solid var(--text-primary);
  width: 100%;
  height: 100%;
}
.overlap-img-2 {
  grid-column: 5 / 13;
  grid-row: 4 / 10;
  z-index: 2;
  border: 2px solid var(--text-primary);
  box-shadow: -6px 6px 0 var(--accent-primary);
  width: 100%;
  height: 100%;
}
.overlap-img-3 {
  grid-column: 2 / 8;
  grid-row: 7 / 13;
  z-index: 3;
  border: 2px solid var(--text-primary);
  box-shadow: 6px 6px 0 var(--text-primary);
  width: 100%;
  height: 100%;
}

/* Stat Strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border: 2px solid var(--text-primary);
  background: var(--bg-surface);
  margin: 2rem 0;
}
.stat-item {
  padding: 1.25rem;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-item:last-child { border-right: none; }
.stat-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.stat-val { font-weight: 800; font-size: 1.3rem; display: block; line-height: 1.1; }
.stat-lbl { font-size: 0.85rem; color: var(--text-muted); }

/* Divider-Separated List Rows (No Cards) */
.ingenuity-list {
  border-top: 2px solid var(--text-primary);
  margin-top: 1.5rem;
}
.ingenuity-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: start;
}
.row-with-img {
  grid-template-columns: 48px 1fr 260px;
}
.row-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.row-meta {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.row-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 2px solid var(--text-primary);
}

/* Mechanism Tabs */
.tabs-wrap {
  border: 2px solid var(--text-primary);
  background: var(--bg-surface);
  margin-top: 1.5rem;
}
.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--text-primary);
  background: var(--bg-canvas);
}
.tab-btn {
  padding: 0.9rem 1.5rem;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-subtle);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
}
.tab-btn[aria-selected="true"] {
  background: var(--accent-primary);
  color: var(--bg-surface);
}
.tab-panel { padding: 2rem; display: none; }
.tab-panel.active { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: center; }

/* Accordions & History Notes */
.accordion-list { border-top: 2px solid var(--text-primary); }
details.acc-item {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
details.acc-item summary {
  padding: 1.25rem 1rem;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.acc-item summary::-webkit-details-marker { display: none; }
details.acc-item summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--bg-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
details.acc-item[open] summary::after { content: "−"; }
.acc-body { padding: 0 1rem 1.5rem 1rem; color: var(--text-primary); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 2px solid var(--text-primary); }
table { width: 100%; border-collapse: collapse; background: var(--bg-surface); text-align: left; }
th, td { padding: 0.9rem 1rem; border-bottom: 1px solid var(--border-subtle); }
th { background: var(--accent-primary); color: var(--bg-surface); font-weight: 800; }

/* Contact Tool */
.form-grid { display: grid; gap: 1.25rem; max-width: 640px; }
.form-group label { display: block; font-weight: 800; margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--text-primary);
  background: var(--bg-surface);
  font-family: inherit;
  font-size: 1rem;
  border-radius: 0;
}
.tool-output {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-surface);
  border: 2px solid var(--text-primary);
}
.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }

/* Reveal Animation */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease-kinetic), transform 0.6s var(--ease-kinetic); }
.reveal-visible { opacity: 1; transform: translateY(0); }

/* Footer */
.site-footer {
  background: var(--text-primary);
  color: var(--bg-canvas);
  padding: 3.5rem 0 2rem;
  border-top: 4px solid var(--accent-primary);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.site-footer a { color: #f5d0fe; }
.footer-bottom {
  border-top: 1px solid #44403c;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 768px) {
  .menu-toggle { display: inline-block; }
  .nav-row { display: none; }
  .nav-row.open { display: block; }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 1rem 1.5rem; }
  .hero-grid, .tab-panel.active, .row-with-img { grid-template-columns: 1fr; }
  .ingenuity-row { grid-template-columns: 40px 1fr; }
  .ingenuity-row > div:last-child { grid-column: 2; }
  .overlap-gallery { min-height: 320px; grid-template-rows: repeat(12, 26px); }
}

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