:root {
  --bg-canvas: #faf6ef;
  --bg-surface: #eee7dc;
  --bg-surface-hover: #e5dccf;
  --text-primary: #2b211a;
  --text-muted: #63554b;
  --accent-primary: #c2562e;
  --accent-secondary: #6b7a3a;
  --border-subtle: #d6ccc0;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(43, 33, 26, 0.14);
  --glow-accent: 0 0 24px -4px rgba(194, 86, 46, 0.35);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-wrap: anywhere;
  hyphens: auto;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.35rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1.25rem; max-width: 70ch; }
a { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s ease; }
a:hover { color: #9a3f1e; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: 70ch; margin: 0 auto; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.35rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.5rem; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; }

/* Header - Strictly Static/Relative, Left-Aligned Brand */
.site-header {
  position: relative;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.1rem 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  margin-right: auto;
}
.brand-mark {
  width: 28px;
  height: 28px;
  background: var(--accent-primary);
  display: inline-grid;
  place-items: center;
  color: #faf6ef;
  font-size: 0.85rem;
  font-weight: 800;
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-group {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
}
.nav-group + .nav-group {
  padding-left: 1.5rem;
  border-left: 1px solid var(--border-subtle);
}
.nav-group a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.92rem;
}
.nav-group a:hover, .nav-group a[aria-current="page"] {
  color: var(--accent-primary);
}
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}
.mobile-nav-panel {
  display: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
}
.mobile-nav-panel.open { display: block; }
.mobile-nav-panel ul { list-style: none; display: grid; gap: 0.85rem; }
.mobile-nav-panel a { text-decoration: none; color: var(--text-primary); font-weight: 700; font-size: 1rem; }

/* Buttons - Terracotta Pill Buttons (Explicit Style Exception to Square Corners) */
.btn-pill {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #faf6ef;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.9rem 1.85rem;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-kinetic), box-shadow 0.25s var(--ease-kinetic), background-color 0.2s ease;
}
.btn-pill:hover {
  background-color: #a84622;
  color: #faf6ef;
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}
.btn-pill.secondary {
  background-color: var(--accent-secondary);
}
.btn-pill.secondary:hover {
  background-color: #56632d;
}

/* Viewport Hero */
.hero-viewport {
  position: relative;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #1f1712;
  overflow: hidden;
  padding: 4rem 1.5rem;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 20, 15, 0.65) 0%, rgba(28, 20, 15, 0.85) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  color: #faf6ef;
}
.hero-content h1 { color: #faf6ef; margin-bottom: 1.25rem; }
.hero-content p {
  color: #e6dfd5;
  font-size: 1.18rem;
  margin: 0 auto 2rem;
  max-width: 62ch;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}
.hero-content .eyebrow { color: #f29a76; }

/* Page Header Subpages */
.page-banner {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 4rem 0 3.25rem;
  background-image: radial-gradient(circle at 85% 20%, rgba(194, 86, 46, 0.12), transparent 55%),
                    radial-gradient(circle at 15% 80%, rgba(107, 122, 58, 0.12), transparent 50%);
}
.page-banner p { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 0; }

/* Alternating Full-Width Bands */
.band { padding: 4.5rem 0; position: relative; }
.band-cream { background-color: var(--bg-canvas); }
.band-earth { background-color: var(--bg-surface); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.band-radial {
  background-image: radial-gradient(circle at 15% 30%, rgba(194, 86, 46, 0.10), transparent 50%),
                    radial-gradient(circle at 85% 75%, rgba(107, 122, 58, 0.11), transparent 50%);
}

.section-intro { margin-bottom: 2.5rem; }
.section-intro p { color: var(--text-muted); font-size: 1.08rem; }

/* Thin-Divided List Rows (No Cards) */
.research-list {
  border-top: 1px solid var(--border-subtle);
  list-style: none;
}
.research-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 1.25rem;
  align-items: start;
  padding: 1.6rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease;
}
.research-row:hover { background-color: rgba(194, 86, 46, 0.04); }
.row-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.band-earth .row-icon { background: var(--bg-canvas); }
.row-body h3 { margin-bottom: 0.35rem; font-size: 1.18rem; }
.row-body p { margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.98rem; }
.row-meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }

/* Maturity Badges (Square) */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.6rem;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.badge-deployed { color: var(--accent-secondary); background: rgba(107, 122, 58, 0.1); }
.badge-pilot { color: var(--accent-primary); background: rgba(194, 86, 46, 0.1); }
.badge-concept { color: var(--text-muted); background: rgba(99, 85, 75, 0.1); }

/* Split Media & Copy */
.split-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 2.5rem;
}
.media-frame {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.media-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.media-caption {
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
}

/* Claim vs Evidence Pairs */
.claim-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border-subtle);
  margin: 2rem 0;
  background: var(--bg-canvas);
}
.claim-col, .evidence-col { padding: 1.5rem; }
.claim-col { border-right: 1px solid var(--border-subtle); background: rgba(194, 86, 46, 0.05); }
.evidence-col { background: rgba(107, 122, 58, 0.06); }
.pair-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.5rem;
}
.claim-col .pair-label { color: var(--accent-primary); }
.evidence-col .pair-label { color: var(--accent-secondary); }

/* System Diagram Block */
.system-diagram {
  border: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  padding: 1.75rem;
  margin: 2.25rem 0;
}
.diagram-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.diagram-node {
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  background: var(--bg-surface);
  position: relative;
}
.diagram-node strong { display: block; font-size: 0.9rem; margin-bottom: 0.3rem; color: var(--accent-primary); }
.diagram-node span { font-size: 0.84rem; color: var(--text-muted); line-height: 1.45; display: block; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--border-subtle); }
table { width: 100%; border-collapse: collapse; background: var(--bg-canvas); text-align: left; font-size: 0.92rem; }
th, td { padding: 0.95rem 1.1rem; border-bottom: 1px solid var(--border-subtle); }
th { background: var(--bg-surface); font-weight: 800; color: var(--text-primary); white-space: nowrap; }
tr:last-child td { border-bottom: none; }

/* Expandable FAQ Rows */
.faq-list { border-top: 1px solid var(--border-subtle); }
.faq-item { border-bottom: 1px solid var(--border-subtle); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.35rem 0.5rem;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent-primary);
  font-weight: 400;
  line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 0.5rem 1.5rem; color: var(--text-muted); max-width: 72ch; }

/* Contact Form (Square inputs, Pill buttons) */
.lead-form { display: grid; gap: 1.25rem; max-width: 640px; }
.form-field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.4rem; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  color: var(--text-primary);
  font: inherit;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: -1px;
}
.output-panel {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: none;
}
.output-panel.visible { display: block; }
.output-pre {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  margin: 1rem 0;
}
.btn-group { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }

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

/* Footer */
.site-footer {
  background: #231b15;
  color: #dfd7cc;
  padding: 3.5rem 0 2.5rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(250, 246, 239, 0.14);
}
.site-footer h3 { color: #faf6ef; font-size: 1rem; margin-bottom: 0.85rem; }
.site-footer p { color: #bfb3a5; font-size: 0.88rem; margin-bottom: 0.6rem; }
.site-footer a { color: #f0b096; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #faf6ef; }
.footer-links { list-style: none; display: grid; gap: 0.5rem; }
.footer-bottom {
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: #a89b8d;
  font-size: 0.84rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .diagram-flow { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: inline-block; }
  .split-feature, .claim-pair, .footer-grid { grid-template-columns: 1fr; }
  .claim-col { border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .research-row { grid-template-columns: 36px 1fr; }
  .row-meta { grid-column: 2; align-items: flex-start; text-align: left; margin-top: 0.35rem; }
  .hero-viewport { min-height: 75vh; }
}
@media (max-width: 480px) {
  .diagram-flow { grid-template-columns: 1fr; }
  .band { padding: 3.25rem 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}}
