:root {
  --bg-canvas: #f7f5f0;
  --bg-surface: #ffffff;
  --bg-surface-hover: #fcfaf7;
  --text-primary: #111111;
  --text-muted: #524d46;
  --accent-primary: #d62828;
  --accent-secondary: #8f1a1a;
  --border-subtle: #e2ddd4;
  --badge-ochre: #b5651d;
  --badge-forest: #2d5a27;
  --badge-plum: #6d2e46;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(17, 17, 17, 0.12);
  --glow-accent: 0 0 24px -4px rgba(214, 40, 40, 0.25);
  --font-main: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html, body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.65;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: inherit;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 1rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
p { margin-bottom: 1.15rem; max-width: 70ch; }
a { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s ease; }
a:hover { color: var(--accent-secondary); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.band-paper { background-color: var(--bg-canvas); color: var(--text-primary); padding: 4.5rem 0; }
.band-white { background-color: var(--bg-surface); color: var(--text-primary); padding: 4.5rem 0; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.band-red { background-color: var(--accent-primary); color: #ffffff; padding: 4.5rem 0; }
.band-red a:not(.btn-pill) { color: #ffffff; font-weight: 700; }
.band-red .text-muted { color: #fce8e8; }

.site-header-wrap {
  padding: 1.25rem 1.5rem 0;
  position: relative;
  z-index: 50;
}

.site-header {
  max-width: 1100px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  border: 2px solid var(--text-primary);
  border-radius: 9999px;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-elevation);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-color: var(--accent-primary);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
}

.desktop-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
}

.desktop-nav a:hover, .desktop-nav a[aria-current="page"] {
  color: var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--text-primary);
  border-radius: 9999px;
  padding: 0.3rem 0.75rem;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-primary);
}

.mobile-nav-panel {
  display: none;
  max-width: 1100px;
  margin: 0.5rem auto 0;
  background: var(--bg-surface);
  border: 2px solid var(--text-primary);
  padding: 1.25rem;
}

.mobile-nav-panel.is-open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.mobile-nav-list a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
}

.btn-pill {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #ffffff !important;
  border: none;
  border-radius: 9999px;
  padding: 0.85rem 1.75rem;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-kinetic), box-shadow 0.25s var(--ease-kinetic), background-color 0.2s ease;
}

.btn-pill:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
  background-color: var(--accent-secondary);
}

.band-red .btn-pill {
  background-color: var(--text-primary);
  color: #ffffff !important;
}

.band-red .btn-pill:hover {
  background-color: #2b2b2b;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
  padding: 2.5rem 0 1.5rem;
}

.hero-renders {
  position: relative;
  min-height: 360px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(12, 30px);
}

.render-frame {
  background: var(--bg-surface);
  border: 2px solid var(--text-primary);
  box-shadow: var(--shadow-elevation);
  overflow: hidden;
  position: relative;
}

.render-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.render-1 { grid-column: 1 / 8; grid-row: 1 / 8; z-index: 3; }
.render-2 { grid-column: 5 / 13; grid-row: 3 / 10; z-index: 2; }
.render-3 { grid-column: 2 / 10; grid-row: 7 / 13; z-index: 4; }

.illustration-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  display: block;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.atlas-card {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 2px solid var(--text-primary);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic);
}

.atlas-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-elevation);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: #eae6df;
  border-bottom: 2px solid var(--text-primary);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-badge {
  position: absolute;
  bottom: -13px;
  left: 1.25rem;
  background-color: var(--accent-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border: 2px solid var(--text-primary);
}

.badge-ochre { background-color: var(--badge-ochre); }
.badge-forest { background-color: var(--badge-forest); }
.badge-plum { background-color: var(--badge-plum); }

.card-body {
  padding: 1.65rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 0.4rem;
}

.band-red .section-eyebrow {
  color: #ffffff;
  border-bottom: 2px solid #ffffff;
}

.table-scroll {
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 2px solid var(--text-primary);
  background: var(--bg-surface);
  color: var(--text-primary);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.94rem;
}

th {
  background-color: var(--text-primary);
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.timeline-list {
  list-style: none;
  border-left: 3px solid var(--text-primary);
  margin: 2rem 0 2rem 1rem;
  padding-left: 1.75rem;
}

.band-red .timeline-list {
  border-left-color: #ffffff;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.25rem;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  background-color: var(--accent-primary);
  border: 2px solid var(--text-primary);
}

.band-red .timeline-item::before {
  background-color: #ffffff;
  border-color: var(--text-primary);
}

.timeline-year {
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.reading-column {
  max-width: 70ch;
}

.form-panel {
  background: var(--bg-surface);
  border: 2px solid var(--text-primary);
  padding: 2rem;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--text-primary);
  border-radius: 0;
  background: var(--bg-canvas);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
}

.output-box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-canvas);
  border: 2px solid var(--text-primary);
  font-family: monospace;
  white-space: pre-wrap;
  font-size: 0.9rem;
}

.site-footer {
  background-color: var(--text-primary);
  color: #f7f5f0;
  padding: 4rem 0 2.5rem;
  border-top: 4px solid var(--accent-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.site-footer h3 {
  color: #ffffff;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.site-footer a {
  color: #e2ddd4;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid #333333;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: #b8b2a8;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.reveal-item {
  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);
}

@media (max-width: 860px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: inline-block; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-renders { min-height: 300px; }
}

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