:root {
  --bg-canvas: #160f2e;
  --bg-surface: #281b3d;
  --bg-surface-hover: #352450;
  --text-primary: #ffffff;
  --text-muted: #d1c4e9;
  --accent-primary: #e0409b;
  --accent-secondary: #bef264;
  --border-subtle: rgba(255, 255, 255, 0.14);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.45);
  --glow-accent: 0 0 24px -4px var(--accent-primary);
  --glass-backdrop: blur(16px) saturate(180%);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
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;
  overflow-wrap: anywhere;
  hyphens: auto;
}
h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); color: var(--accent-secondary); }
p { margin-bottom: 1.2rem; color: var(--text-muted); max-width: 70ch; }
a { color: var(--accent-secondary); text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s ease; }
a:hover, a:focus-visible { color: var(--accent-primary); }
img { max-width: 100%; height: auto; display: block; border-radius: 4px; object-fit: cover; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: 70ch; margin: 0 auto; }

/* Header - Inset Rounded-End Box in Normal Flow */
.site-header {
  position: relative;
  padding: 1.25rem 1.5rem 0;
  max-width: 1200px;
  margin: 0 auto 2rem;
}
.header-inset {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-elevation);
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}
.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.main-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  background: var(--bg-surface-hover);
  color: var(--accent-secondary);
}
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 9999px;
  width: 40px;
  height: 40px;
  font-size: 1.35rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Pill Buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--accent-primary);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.75rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.25s var(--ease-kinetic), box-shadow 0.25s var(--ease-kinetic);
}
.btn-pill:hover, .btn-pill:focus-visible {
  color: #ffffff;
  transform: translateY(-3px) scale(1.015);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}
.btn-secondary {
  background-color: var(--bg-surface-hover);
  color: var(--accent-secondary);
  border: 1px solid var(--accent-secondary);
}

/* Hero Section with Floating Facts Panel */
.hero-section {
  position: relative;
  padding: 1rem 0 4rem;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-media {
  position: relative;
}
.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevation);
}
.facts-panel {
  background: rgba(40, 27, 61, 0.92);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: var(--shadow-elevation), var(--glow-accent);
  margin-top: -3.5rem;
  margin-left: 2rem;
  margin-right: 1rem;
  position: relative;
  z-index: 2;
}
.facts-panel h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-secondary);
  margin-bottom: 0.85rem;
}
.fact-row {
  display: flex;
  gap: 0.85rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.92rem;
}
.fact-row:first-of-type { border-top: none; padding-top: 0; }
.fact-num {
  font-family: Georgia, serif;
  font-weight: 700;
  color: var(--accent-primary);
  min-width: 3.5rem;
}

/* Diagonal / Clipped Alternating Sections */
.section-band {
  padding: 5rem 0;
  position: relative;
}
.section-band.alt-surface {
  background-color: var(--bg-surface);
  clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
  padding: 6.5rem 0;
}
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.split-row.reverse .split-text { order: 2; }
.split-row.reverse .split-media { order: 1; }
.split-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevation);
}
.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-secondary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

/* Thin-Divider List Rows with Left-Hand Icons (Replacing Repeated Cards) */
.divider-list {
  list-style: none;
  margin: 1.5rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
}
.divider-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 1rem;
  padding: 1.15rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  align-items: start;
  transition: background-color 0.2s ease;
}
.divider-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}
.item-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--bg-surface-hover);
  border: 1px solid var(--accent-primary);
  color: var(--accent-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 0.15rem;
}
.item-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}
.item-body p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Data Tables & Diagrams */
.table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}
th, td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
th {
  background: var(--bg-surface-hover);
  color: var(--accent-secondary);
  font-family: Georgia, serif;
}
.connector-diagram {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.diagram-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1.25rem;
}
.pin-schematic {
  font-family: monospace;
  background: var(--bg-canvas);
  color: var(--accent-secondary);
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.85rem;
  text-align: center;
  border: 1px dashed var(--border-subtle);
}

/* Forms & Interactive Tools */
.form-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2rem;
  margin: 2rem 0;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 1rem;
}
.form-control:focus {
  outline: 2px solid var(--accent-primary);
  border-color: transparent;
}
.preview-box {
  background: var(--bg-canvas);
  border: 1px solid var(--accent-secondary);
  border-radius: 4px;
  padding: 1rem;
  font-family: monospace;
  white-space: pre-wrap;
  color: var(--text-muted);
  margin: 1rem 0;
  min-height: 110px;
}

/* Reveal Animations */
.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: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2.5rem;
  margin-top: 4rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero-grid, .split-row, .footer-grid { grid-template-columns: 1fr; }
  .split-row.reverse .split-text { order: 1; }
  .split-row.reverse .split-media { order: 2; }
  .facts-panel { margin: -1.5rem 0.5rem 0; }
}
@media (max-width: 768px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1.5rem;
    right: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--accent-primary);
    border-radius: 4px;
    padding: 1rem;
    z-index: 50;
    box-shadow: var(--shadow-elevation);
  }
  .main-nav.nav-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .main-nav a { display: block; padding: 0.6rem 0.8rem; }
}

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