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

*, *::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, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  font-size: 16px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

h1, h2, h3, h4, .heading-font {
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.15;
  color: var(--text-primary);
  font-weight: 700;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  letter-spacing: 0.1em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 1rem;
}

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

p {
  margin-bottom: 1.15rem;
  max-width: 70ch;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.25s var(--ease-kinetic);
}

.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header - Inset Floating Box in Normal Flow */
.site-header-wrap {
  padding: 1.25rem 1.25rem 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.site-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-elevation);
  position: relative;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-primary);
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  text-align: left;
  flex-shrink: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fffdf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

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

.nav-link {
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
  position: relative;
  padding: 0.25rem 0;
  white-space: nowrap;
}

.nav-link::after, .text-action::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width 0.3s var(--ease-kinetic);
}

.nav-link:hover::after, .nav-link[aria-current="page"]::after, .text-action:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.3rem;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-nav-drawer {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-main);
  margin-top: 0.6rem;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-elevation);
}

.mobile-nav-drawer.open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

/* Buttons & Actions */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-primary);
  color: #fffdf8;
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
  color: #fffdf8;
}

.text-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent-primary);
  position: relative;
  padding-bottom: 3px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

/* Hero - Cream to Terracotta Field without Hero Image */
.hero-field {
  margin: 1.5rem auto 2.5rem;
  border-radius: var(--radius-main);
  background: linear-gradient(135deg, #faf6ef 0%, #f3dfd3 48%, #c2562e 100%);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevation);
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
}

.hero-kicker {
  display: inline-block;
  background: var(--accent-secondary);
  color: #fffdf8;
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.15rem;
}

.hero-field h1 {
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-primary);
  max-width: 62ch;
  margin-bottom: 2rem;
  background: rgba(255, 253, 248, 0.78);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-main);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

/* Pathway Timeline Stream */
.pathway-container {
  position: relative;
  padding-left: 3.25rem;
  margin: 2rem 0 4rem;
}

.pathway-container::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
}

.pathway-section {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-main);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-elevation);
  clip-path: polygon(0 0, 100% 1.5%, 100% 100%, 0 98.5%);
  transition: transform 0.35s var(--ease-kinetic), box-shadow 0.35s var(--ease-kinetic);
}

.pathway-section:nth-child(even) {
  clip-path: polygon(0 1.5%, 100% 0, 100% 98.5%, 0 100%);
}

.pathway-node {
  position: absolute;
  left: -3.25rem;
  top: 1.75rem;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fffdf8;
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 5px var(--bg-canvas);
}

.pathway-section:nth-child(even) .pathway-node {
  background: var(--accent-secondary);
}

/* Grids & Render Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.render-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-main);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic);
}

.render-card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}

.render-media-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f3ede2;
}

.render-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border-subtle);
}

.straddle-badge {
  position: absolute;
  bottom: -0.85rem;
  left: 1.25rem;
  background: var(--accent-primary);
  color: #fffdf8;
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(43, 33, 26, 0.18);
}

.straddle-badge.olive {
  background: var(--accent-secondary);
}

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

/* Tables & Audit Matrix */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-main);
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  text-align: left;
  font-size: 0.94rem;
}

th, td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: #f3ede2;
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Expandable Checklists / Details */
details.check-panel {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-main);
  padding: 1rem 1.35rem;
  margin-bottom: 0.9rem;
}

details.check-panel summary {
  font-family: "Arial Narrow", "Helvetica Neue", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details.check-panel summary::after {
  content: "+";
  color: var(--accent-primary);
  font-size: 1.25rem;
}

details.check-panel[open] summary::after {
  content: "−";
}

details.check-panel .panel-content {
  padding-top: 0.9rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

/* Forms & Interactive Tools */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.25rem;
}

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

.field-group label {
  font-weight: 600;
  font-size: 0.9rem;
}

.field-group input, .field-group select, .field-group textarea {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.96rem;
}

.output-box {
  background: #f3ede2;
  border: 1px dashed var(--accent-primary);
  border-radius: var(--radius-main);
  padding: 1.25rem;
  margin-top: 1.25rem;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.9rem;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  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: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 1.25rem 2.5rem;
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-meta {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .pathway-container {
    padding-left: 2.4rem;
  }
  .pathway-node {
    left: -2.4rem;
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .mobile-nav-list {
    grid-template-columns: 1fr;
  }
  .hero-field {
    padding: 2rem 1.25rem;
  }
}

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