:root {
  --bg-canvas: #1e1612;
  --bg-surface: #2b201a;
  --bg-surface-hover: #382b23;
  --text-primary: #f5ecdf;
  --text-muted: #c4b5a2;
  --accent-primary: #f59e0b;
  --accent-secondary: #d97706;
  --border-subtle: #4a382d;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 28px -4px rgba(0, 0, 0, 0.45);
  --glow-accent: 0 0 20px -3px rgba(245, 158, 11, 0.35);
  --max-width: 1180px;
}

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

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  font-size: 16px;
  overflow-wrap: anywhere;
  hyphens: auto;
  border: 1px solid var(--border-subtle);
  margin: 8px;
  min-height: calc(100vh - 16px);
}

h1, h2, h3, h4 {
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.25;
}

h1 { font-size: 2.5rem; margin-bottom: 1.25rem; }
h2 { font-size: 1.85rem; margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1.25rem; }

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease-kinetic);
}

a:hover {
  color: #fbbf24;
}

/* Site Layout */
.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
header.site-header {
  position: static;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  padding: 1.25rem 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-insignia {
  font-family: "Georgia", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

nav.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--accent-primary);
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  line-height: 1;
}

.mobile-menu-drawer {
  display: none;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.mobile-menu-drawer.is-open {
  display: block;
}

.mobile-menu-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-menu-drawer a {
  text-decoration: none;
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 1rem;
  display: block;
  padding: 0.5rem 1rem;
}

/* Hero Section */
.hero-band {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 3rem;
}

.hero-band .category-chip {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero-band p.lede {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 68ch;
  line-height: 1.7;
}

/* Button */
.btn-ledger {
  display: inline-block;
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s var(--ease-kinetic);
  margin-top: 1rem;
}

.btn-ledger:hover {
  background: var(--accent-primary);
  color: var(--bg-canvas);
  box-shadow: var(--glow-accent);
}

/* Hairline Spine & Dossiers */
.dossier-stream {
  position: relative;
  margin: 2.5rem 0;
  padding-left: 2.5rem;
}

.dossier-stream::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background-color: var(--border-subtle);
}

.dossier-node {
  position: relative;
  margin-bottom: 3.5rem;
}

.dossier-node::before {
  content: attr(data-step);
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 24px;
  height: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.surface-card {
  background: var(--bg-surface);
  padding: 2rem;
  box-shadow: var(--shadow-elevation);
  transition: transform 0.25s var(--ease-kinetic), background-color 0.25s var(--ease-kinetic);
  margin-bottom: 2rem;
}

.surface-card:hover {
  transform: translateY(-4px);
  background: var(--bg-surface-hover);
}

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

.grid-three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Image Elements */
.ledger-img-wrap {
  width: 100%;
  overflow: hidden;
  margin: 1.5rem 0;
  background: #150f0c;
  border: 1px solid var(--border-subtle);
}

.ledger-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s var(--ease-kinetic);
}

.ledger-img-wrap.aspect-16-9 img { aspect-ratio: 16 / 9; }
.ledger-img-wrap.aspect-4-3 img { aspect-ratio: 4 / 3; }

.surface-card:hover .ledger-img-wrap img {
  transform: scale(1.02);
}

/* Craft Spec List */
.craft-spec-list {
  list-style: none;
  margin: 1.25rem 0;
  border-top: 1px solid var(--border-subtle);
}

.craft-spec-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.craft-spec-list span.label {
  color: var(--text-muted);
}

.craft-spec-list span.val {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

/* Interactive Finder Form */
.provenance-tool {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  margin: 3rem 0;
}

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

.tool-inputs input,
.tool-inputs select {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  flex: 1;
  min-width: 200px;
  font-size: 0.95rem;
}

.tool-inputs input:focus,
.tool-inputs select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.finder-output {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--accent-primary);
  display: none;
}

/* Contact Message Console */
.contact-console {
  background: var(--bg-surface);
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Reveal classes */
.reveal-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-kinetic), transform 0.6s var(--ease-kinetic);
}

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

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  margin-top: 4rem;
  background: #17110e;
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

.footer-top .footer-col {
  flex: 1;
  min-width: 220px;
}

.footer-col h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  line-height: 1.8;
}

.footer-bottom a {
  color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 768px) {
  nav.main-nav { display: none; }
  .mobile-nav-toggle { display: block; }
  .dossier-stream { padding-left: 1.5rem; }
  .dossier-stream::before { left: 4px; }
  .dossier-node::before { left: -1.75rem; width: 20px; height: 20px; font-size: 0.65rem; }
  h1 { font-size: 2rem; }
  body { margin: 0; border: none; }
}

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