:root {
  --bg-canvas: #ffffff;
  --bg-surface: #f4f4f3;
  --bg-surface-hover: #eae8e6;
  --text-primary: #292524;
  --text-muted: #57534e;
  --accent-primary: #b42332;
  --accent-secondary: #8f1b27;
  --border-subtle: #e7e5e4;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 10px 28px -6px rgba(41, 37, 36, 0.12);
  --shadow-hover: 0 16px 36px -6px rgba(41, 37, 36, 0.2), 0 0 0 1px rgba(180, 35, 50, 0.2);
}

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

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  line-height: 1.65;
  scroll-behavior: smooth;
}

body {
  overflow-wrap: anywhere;
  hyphens: auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.prose p, .prose ul, .prose ol {
  max-width: 70ch;
}

.prose ul, .prose ol {
  margin: 0 0 1.25rem 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

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

.link-underline {
  display: inline-block;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 2px;
}

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

.link-underline:hover::after {
  width: 100%;
}

.btn-primary {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #ffffff;
  font-weight: 700;
  padding: 0.875rem 1.75rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-kinetic), transform 0.25s var(--ease-kinetic);
  text-align: center;
}

.btn-primary:hover {
  background-color: var(--accent-secondary);
  color: #ffffff;
  transform: translateY(-2px);
}

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

.site-header {
  position: relative;
  background-color: transparent;
  transition: background-color 0.3s ease;
  border-bottom: 1px solid var(--border-subtle);
  z-index: 20;
}

.site-header.scrolled {
  background-color: #ffffff;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  text-align: left;
}

.brand-mark {
  width: 28px;
  height: 28px;
  background-color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 800;
}

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

.desktop-nav a {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.25rem 0;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width 0.25s var(--ease-kinetic);
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.mobile-nav-panel {
  display: none;
  background-color: #ffffff;
  border-bottom: 2px solid var(--accent-primary);
  padding: 1rem 1.5rem 1.5rem;
}

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

.mobile-nav-panel a {
  display: block;
  padding: 0.65rem 0;
  color: var(--text-primary);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.band-white { background-color: var(--bg-canvas); padding: 4.5rem 0; }
.band-grey { background-color: var(--bg-surface); padding: 4.5rem 0; }

.hero-section {
  padding: 3.5rem 0 4.5rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

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

.hero-illustration-wrap {
  position: relative;
  background-color: #ffffff;
  box-shadow: var(--shadow-elevation);
  padding: 1.5rem;
}

.floating-facts-panel {
  background-color: #ffffff;
  box-shadow: var(--shadow-elevation);
  border-left: 4px solid var(--accent-primary);
  padding: 1.25rem;
  margin-top: -2rem;
  margin-left: 1.5rem;
  position: relative;
  z-index: 2;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.fact-item strong {
  display: block;
  font-size: 1.15rem;
  color: var(--accent-primary);
  font-weight: 800;
}

.fact-item span {
  font-size: 0.825rem;
  color: var(--text-muted);
}

.pathway-wrapper {
  position: relative;
  padding-left: 3rem;
}

.pathway-wrapper::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--accent-primary);
}

.pathway-node {
  position: relative;
  margin-bottom: 0;
}

.node-badge {
  position: absolute;
  left: -3rem;
  top: 0.25rem;
  width: 40px;
  height: 40px;
  background-color: var(--accent-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

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

.card {
  background-color: #ffffff;
  padding: 1.75rem;
  box-shadow: var(--shadow-elevation);
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.card-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 1.25rem;
  display: block;
  background-color: var(--bg-surface);
}

.banner-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 1.5rem 0;
  display: block;
  background-color: var(--bg-surface);
}

.split-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background-color: #ffffff;
  padding: 2rem;
  box-shadow: var(--shadow-elevation);
  align-items: center;
  margin-top: 2rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.75rem 0;
  background-color: #ffffff;
  box-shadow: var(--shadow-elevation);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

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

th {
  background-color: var(--text-primary);
  color: #ffffff;
  font-weight: 800;
}

.checklist {
  list-style: none;
  margin: 1.5rem 0;
}

.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.checklist li::before {
  content: "■";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-primary);
}

.faq-item {
  background-color: #ffffff;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-elevation);
  border-left: 3px solid var(--accent-primary);
}

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

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

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--text-muted);
  background-color: #ffffff;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}

.form-control:focus {
  outline: 2px solid var(--accent-primary);
  border-color: var(--accent-primary);
}

.output-panel {
  background-color: var(--bg-surface);
  padding: 1.5rem;
  border-left: 4px solid var(--accent-primary);
  margin-top: 1.5rem;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.9rem;
}

.subnav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}

.site-footer {
  margin-top: auto;
  background-color: var(--text-primary);
  color: #ffffff;
  padding: 3.5rem 0 2.5rem;
}

.site-footer p, .site-footer a {
  color: #e7e5e4;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

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

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

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-kinetic), transform 0.6s var(--ease-kinetic);
}

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

@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: inline-block; }
  .hero-grid, .split-card, .footer-grid, .facts-grid {
    grid-template-columns: 1fr;
  }
  .floating-facts-panel {
    margin-top: 1rem;
    margin-left: 0;
  }
  .pathway-wrapper {
    padding-left: 2.25rem;
  }
  .pathway-wrapper::before {
    left: 14px;
  }
  .node-badge {
    left: -2.25rem;
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }
}

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