/* ═══════════════════════════════════════════════════════════════════════════
   BBCO.org — Design System
   Dark nav/footer + white body + bottom image fade
   Palette derived from cicaworld.com
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Dark palette (nav, footer, page-closer) ─── */
  --bg-deep:       #060e1a;
  --bg-primary:    #0a1628;
  --bg-secondary:  #0f2137;
  --bg-card:       #112845;
  --bg-tertiary:   #11436B;

  --text-on-dark:       #e2e8f0;
  --text-on-dark-secondary: #94a3b8;
  --text-on-dark-muted: #64748b;

  /* ── Light palette (body sections) ─── */
  --bg-body:       #ffffff;
  --bg-light-alt:  #f7f8fa;
  --bg-light-card: #ffffff;

  --text-primary:  #1e293b;
  --text-secondary:#475569;
  --text-heading:  #0f172a;
  --text-muted:    #94a3b8;

  /* ── Accent (shared) ─── */
  --accent:        #23BBE0;
  --accent-hover:  #1c96b3;
  --accent-dim:    rgba(35, 187, 224, 0.1);
  --accent-on-light: #0e8ca8;

  /* ── Borders ─── */
  --border:        #1e3a5f;
  --border-light:  #e2e8f0;
  --divider:       #204268;

  --max-width:     1100px;
  --nav-height:    72px;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Typography ────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.3;
}

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

p { margin-bottom: 1rem; }

a {
  color: var(--accent-on-light);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent-hover); }

strong { color: var(--text-heading); }

/* ── Include placeholders (JS-loaded nav/footer) ─────────────────────── */

#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(6, 14, 26, 0.92);
  z-index: 100;
}

#site-footer {
  background: var(--bg-deep);
}

/* ── Navigation ────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(6, 14, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 64px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-on-dark-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ── Nav dropdowns ──────────────────────────────────────────────────────── */

.nav-dropdown {
  position: relative;
}

.nav-dropdown > a::after {
  content: ' \25BE';
  font-size: 0.65em;
  margin-left: 0.15em;
  opacity: 0.5;
}

.nav-dropdown-menu {
  /* Hidden by default; fade in on hover for smooth feel */
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 12px);
  left: -1rem;
  min-width: 300px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0;
  list-style: none;
  z-index: 200;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  /* Small delay on hide prevents flicker when moving between adjacent dropdowns */
  transition: opacity 0.18s ease, visibility 0.18s ease;
  transition-delay: 0.06s;
}

/* Invisible bridge — covers the gap between nav item and dropdown */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
}

.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;   /* open immediately, delay only on close */
}

.nav-dropdown-menu li {
  border-bottom: 1px solid rgba(30, 58, 95, 0.4);
}
.nav-dropdown-menu li:last-child {
  border-bottom: none;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: normal;
  line-height: 1.4;
  transition: color 0.2s, background 0.2s;
}

.nav-dropdown-menu a:hover {
  color: var(--accent);
  background: var(--bg-secondary);
}

.nav-desc {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: #94a3b8;
  margin-top: 0.15rem;
  line-height: 1.45;
}

.nav-dropdown-menu a:hover .nav-desc {
  color: var(--text-on-dark-secondary);
}

/* ── Active page highlighting (via body[data-page]) ────────────────────── */

/* Foundations dropdown */
body[data-page="foundations"] .nav-dropdown > a[href="/foundations.html"],
body[data-page="focus"] .nav-dropdown > a[href="/foundations.html"],
/* Audiences dropdown */
body[data-page="focus"] .nav-dropdown > a[href="/focus.html"],
body[data-page="regulators"] .nav-dropdown > a[href="/focus.html"],
/* Community dropdown */
body[data-page="contribute"] .nav-dropdown > a[href="/contribute.html"],
body[data-page="governance"] .nav-dropdown > a[href="/contribute.html"],
body[data-page="events"] .nav-dropdown > a[href="/contribute.html"],
body[data-page="faq"] .nav-dropdown > a[href="/contribute.html"],
/* Direct links */
body[data-page="about"] .nav-links > li > a[href="/about.html"],
body[data-page="blog"] .nav-links > li > a[href="/blog.html"],
body[data-page="contact"] .nav-links > li > a[href="/contact.html"] {
  color: var(--accent);
}

/* ── Layout ────────────────────────────────────────────────────────────── */

.page-body {
  padding-top: var(--nav-height);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
  background: var(--bg-body);
}

.section--alt {
  background: var(--bg-light-alt);
}

/* ── Hero (light — no image) ──────────────────────────────────────────── */

.hero {
  position: relative;
  background: var(--bg-body);
}

.hero-content {
  position: relative;
  max-width: 1220px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

.hero-text {
  flex: 0 1 640px;
  min-width: 0;
}

.hero-video {
  flex: 1 1 0;
  max-width: 416px;
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

/* ── Video chapter pills (vertical, left of video) ─────────────────────── */

.video-chapters {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
  padding-top: 0.25rem;
}

.chapter-pill {
  display: block;
  padding: 0.45rem 0.75rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-light-alt);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  text-align: left;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.chapter-pill:hover {
  color: var(--accent-on-light);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.chapter-pill.active {
  color: var(--bg-deep);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.video-wrapper {
  position: relative;
  border-radius: 10px;
  border: 2px solid var(--accent);
  overflow: hidden;
  background: var(--bg-light-alt);
  box-shadow: 0 4px 16px rgba(35, 187, 224, 0.10);
  flex: 1;
  min-width: 0;
}

.hero-video video {
  width: 100%;
  height: auto;
  display: block;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 30%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.3s;
}

.video-play-overlay svg {
  width: 48px;
  height: 48px;
  fill: var(--navy);
  opacity: 0.9;
}

.video-play-overlay span {
  margin-top: 0.5rem;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.video-play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.video-fullscreen-btn {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 2;
}

.video-wrapper:hover .video-fullscreen-btn {
  opacity: 1;
}

.video-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text-heading);
}

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.hero .highlight {
  color: var(--accent-on-light);
  font-weight: 500;
}

/* ── Page Header (light — no image) ───────────────────────────────────── */

.page-header {
  position: relative;
  padding: 5rem 0 1rem;
  background: var(--bg-body);
}

.page-header + .section {
  padding-top: 2rem;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  margin-bottom: 0.75rem;
  color: var(--text-heading);
}

.page-header .lead {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 840px;
}

/* ── Page-header download button (top-right on desktop, below lead on mobile) */

.page-header-download {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-light-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.page-header-download:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.page-header-download .dl-icon {
  flex-shrink: 0;
  width: 40px;
  height: 52px;
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.page-header-download .dl-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.page-header-download .dl-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-heading);
}

.page-header-download .dl-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Reserve space so h1/lead don't run under the absolute button */
.page-header .container:has(.page-header-download) h1,
.page-header .container:has(.page-header-download) .lead {
  padding-right: 300px;
}

@media (max-width: 768px) {
  .page-header-download {
    position: static;
    margin-top: 1.25rem;
    width: fit-content;
  }

  .page-header .container:has(.page-header-download) h1,
  .page-header .container:has(.page-header-download) .lead {
    padding-right: 0;
  }
}

/* ── Page Closer (bottom dark section with background image) ──────────── */

.page-closer {
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

.page-closer-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  z-index: 0;
}

.page-closer-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--bg-body) 0%,
    rgba(10, 22, 40, 0.65) 35%,
    rgba(10, 22, 40, 0.95) 100%
  );
  z-index: 1;
}

.page-closer-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  text-align: center;
}

.page-closer h2 {
  color: #ffffff;
}

.page-closer p,
.page-closer li,
.page-closer ul,
.page-closer strong {
  color: var(--text-on-dark);
}

.page-closer a:not(.btn) {
  color: var(--accent);
}

.page-closer .divider {
  margin: 1.5rem auto 2rem;
}

/* ── Hero Parallax (bottom image band) ─────────────────────────────────── */

.hero-parallax {
  position: relative;
  height: 75vh;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-parallax-inner {
  position: absolute;
  inset: -20% 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.hero-parallax::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6, 14, 26, 0.55);
  z-index: 1;
}

.hero-parallax-content {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 1.5rem;
}

/* Light-source variant: heavier overlay for white-background images */
.hero-parallax--light::after {
  background: rgba(6, 14, 26, 0.90);
}

.hero-parallax--light .hero-parallax-content {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  top: 0;
  bottom: 0;
}

@media (max-width: 768px) {
  /* Kill parallax on mobile — solid dark section instead */
  .hero-parallax {
    height: auto;
    min-height: 0;
    background: var(--bg-primary);
  }

  .hero-parallax-inner,
  .hero-parallax::after {
    display: none;
  }

  .hero-parallax-content {
    position: relative;
    bottom: auto;
    gap: 0.75rem;
    padding: 2.5rem 1.5rem;
  }

  .hero-parallax-content .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
  }

  .hero-parallax--light .hero-parallax-content {
    top: auto;
    padding: 2.5rem 1.25rem;
  }

  .hero-parallax--light .hero-parallax-content p {
    font-size: 0.95rem !important;
  }
}

/* ── Contact Form ──────────────────────────────────────────────────────── */

.contact-form-wrap {
  max-width: 680px;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.form-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.form-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.form-help {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-light-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-robo {
  background: var(--bg-alt);
  border: 1px dashed var(--border-light);
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 0.5rem;
}

.form-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.form-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-light-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 2rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  fill: none;
}

/* ── Bento grid (3-over-2 for 5 cards) ─────────────────────────────────── */

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

.card-grid--bento .card:nth-child(n+4) {
  grid-column: span 1;
}

/* Bottom row: 2 cards centered across 3-col grid */
.card-grid--bento .card:nth-child(4) {
  grid-column: 1 / 2;
}
.card-grid--bento .card:nth-child(5) {
  grid-column: 3 / 4;
}

/* Center the bottom pair by using a wrapper trick: offset with empty middle */
@supports (grid-template-columns: repeat(3, 1fr)) {
  .card-grid--bento {
    grid-template-columns: repeat(6, 1fr);
  }
  .card-grid--bento .card:nth-child(1),
  .card-grid--bento .card:nth-child(2),
  .card-grid--bento .card:nth-child(3) {
    grid-column: span 2;
  }
  .card-grid--bento .card:nth-child(4) {
    grid-column: 1 / 4;
  }
  .card-grid--bento .card:nth-child(5) {
    grid-column: 4 / 7;
  }
}

@media (max-width: 768px) {
  .card-grid--bento {
    grid-template-columns: 1fr !important;
  }
  .card-grid--bento .card:nth-child(n) {
    grid-column: span 1 !important;
  }
}

/* ── Pillar list (What We Build) ───────────────────────────────────────── */

.pillar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pillar-item {
  padding-left: 1.5rem;
  border-left: 3px solid var(--accent);
}

.pillar-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.pillar-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

/* ── Two-column layout ─────────────────────────────────────────────────── */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── Blog cards ────────────────────────────────────────────────────────── */

.blog-card {
  background: var(--bg-light-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.blog-card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  opacity: 0.6;
}

.blog-card-body {
  padding: 1.75rem;
  flex: 1;
}

.blog-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-card-body h3 {
  margin-bottom: 0.5rem;
}
.blog-card-body h3 a {
  color: var(--text-heading) !important;
}
.blog-card-body h3 a:hover {
  color: var(--accent-on-light) !important;
}

.blog-card-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── Featured blog card ────────────────────────────────────────────────── */

.blog-featured {
  display: flex;
  flex-direction: row;
  background: var(--bg-light-card);
  border: 2px solid var(--accent);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.blog-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(35, 187, 224, 0.12);
}
.blog-featured .blog-featured-img {
  flex: 0 0 44%;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  opacity: 0.75;
}
.blog-featured .blog-featured-body {
  flex: 1;
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-featured .blog-featured-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.75rem;
  width: fit-content;
}
.blog-featured .blog-card-meta {
  margin-bottom: 0.5rem;
}
.blog-featured h2 {
  font-size: 1.35rem;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}
.blog-featured p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}
@media (max-width: 768px) {
  .blog-featured {
    flex-direction: column;
  }
  .blog-featured .blog-featured-img {
    flex: none;
    min-height: 240px;
  }
  .blog-featured h2 {
    font-size: 1.3rem;
  }
  .blog-featured .blog-featured-body {
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(35, 187, 224, 0.04) 0%, transparent 60%);
  }
}
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr !important;
  }
  .blog-featured .blog-featured-img {
    min-height: 200px;
  }
  .blog-featured .blog-featured-body {
    padding: 1.25rem 1rem;
  }
  .blog-featured h2 {
    font-size: 1.2rem;
  }
}

/* ── Blog post (full article) ──────────────────────────────────────────── */

.article {
  max-width: 900px;
  margin: 0 auto;
}

.article h2 { margin-top: 2.5rem; }
.article h3 { margin-top: 2rem; }

.article .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}
.article .table-scroll table {
  margin: 0;
}
@media (max-width: 600px) {
  .article .table-scroll table {
    font-size: 0.78rem;
  }
  .article .table-scroll th,
  .article .table-scroll td {
    padding: 0.35rem 0.45rem !important;
  }
}

.article ul, .article ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}
.article li { margin-bottom: 0.4rem; }

.article blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  background: var(--accent-dim);
  border-radius: 0 6px 6px 0;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

/* ── Whitepaper download ───────────────────────────────────────────────── */

.paper-card {
  background: var(--bg-light-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.paper-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.paper-icon {
  flex-shrink: 0;
  width: 56px;
  height: 72px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
}

.paper-details h3 { margin-bottom: 0.4rem; }
.paper-details p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-deep);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent-dim);
}

/* ── FAQ accordion ─────────────────────────────────────────────────────── */

.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 1.5rem 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-heading);
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--accent);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-answer {
  padding-top: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Events timeline ───────────────────────────────────────────────────── */

.timeline {
  list-style: none;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
}

.timeline li {
  position: relative;
  padding-bottom: 2rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-body);
}

.timeline h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.timeline .date {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 1rem;
  margin-top: 0;
  color: var(--text-on-dark);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-on-dark-secondary);
  font-size: 0.85rem;
}
.footer-links a:hover { color: var(--accent); }

.footer-right {
  color: var(--text-on-dark-muted);
  font-size: 0.8rem;
  text-align: right;
}

/* ── Divider ───────────────────────────────────────────────────────────── */

.divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 1.5rem 0 2rem;
  border-radius: 2px;
}

/* ── Badge / Tag ───────────────────────────────────────────────────────── */

.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .nav-logo img { height: 56px; }

  .hero h1 { font-size: 1.75rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }

  .card-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-content {
    padding: 3rem 1.5rem 2rem;
    flex-direction: column;
    gap: 2rem;
  }

  .hero-text { flex: 1 1 100%; }

  .hero-video {
    flex: 1 1 100%;
    max-width: 100%;
    flex-direction: column;
  }

  .video-chapters {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.35rem;
    padding-bottom: 0.5rem;
  }
  .video-chapters::-webkit-scrollbar { display: none; }

  .chapter-pill {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
  }

  #site-nav,
  .nav {
    overflow: visible;
  }

  .nav-links { display: none; }
  .nav-hamburger { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem 2rem;
    gap: 1rem;
  }

  /* Mobile: show dropdown items inline, indented */
  .nav-dropdown > a::after { display: none; }

  .nav-dropdown-menu {
    /* Override desktop visibility/opacity with display for mobile */
    visibility: visible;
    opacity: 1;
    display: flex;
    flex-direction: column;
    position: static;
    transform: none;
    min-width: 0;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0.25rem 0 0 1.25rem;
    box-shadow: none;
    gap: 0.5rem;
    transition: none;
  }

  .nav-dropdown-menu::before { display: none; }

  .nav-dropdown-menu a {
    padding: 0.25rem 0;
    font-size: 0.82rem;
    color: var(--text-on-dark-muted);
  }

  .nav-dropdown-menu a:hover {
    background: none;
    color: var(--accent);
  }

  .nav-dropdown-menu li {
    border-bottom: none;
  }

  .nav-desc {
    display: none;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-inner {
    flex-direction: column;
  }

  .page-closer-content {
    padding: 3rem 1.25rem 2.5rem;
  }

  .section { padding: 3rem 0; }
  .container { padding: 0 1.25rem; }

  .paper-card {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
    gap: 1rem;
  }

  .paper-icon {
    width: 40px;
    height: 48px;
    font-size: 1.1rem;
  }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 1.35rem; }
  .hero .subtitle { font-size: 0.95rem; line-height: 1.7; }
  .hero-content { padding: 2rem 1rem 1.5rem; gap: 1.5rem; }
  .hero-video { border-radius: 8px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Legal Foundations — Parallax presentation page
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --plum:       #75507B;
  --plum-light: #9C7CA1;
  --plum-dim:   rgba(117, 80, 123, 0.08);
  --plum-border:rgba(117, 80, 123, 0.25);
}

/* ── Parallax section divider ─────────────────────────────────────────── */

.legal-parallax {
  position: relative;
  min-height: 41vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
}

.legal-parallax-bg {
  position: absolute;
  top: -20%;
  left: 0;
  right: 0;
  bottom: -20%;
  width: 100%;
  background-color: var(--bg-deep);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.legal-parallax::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6, 14, 26, 0.70);
  z-index: 1;
}

.legal-parallax-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.legal-parallax-content h2 {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.legal-parallax-content p {
  color: var(--text-on-dark-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.legal-parallax-content .divider {
  margin: 1rem auto 1.5rem;
  background: var(--plum-light);
}

/* ── Legal content section ────────────────────────────────────────────── */

.legal-content {
  padding: 4rem 0;
  background: var(--bg-body);
}

.legal-content--alt {
  background: var(--bg-light-alt);
}

.legal-cards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.legal-card {
  padding: 1.75rem 1.75rem 1.75rem 2rem;
  border-left: 4px solid var(--plum);
  background: var(--bg-light-card);
  border-radius: 0 8px 8px 0;
  border-top: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.legal-card:hover {
  border-left-color: var(--plum);
  box-shadow: 0 4px 12px rgba(117, 80, 123, 0.10);
}

.legal-card h3 {
  color: var(--plum);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.legal-card .legal-citation {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.legal-card .legal-doctrine {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.legal-card .legal-bbco {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--plum, #9b59b6);
  background: rgba(155, 89, 182, 0.04);
  border-radius: 0 4px 4px 0;
}

.legal-card .legal-bbco strong {
  color: var(--plum);
}

/* Sector evidence variant — cyan accent instead of plum */
.legal-card--sector {
  border-left-color: var(--accent-on-light);
  background: linear-gradient(135deg, rgba(35, 187, 224, 0.03) 0%, var(--bg-light-card) 60%);
}
.legal-card--sector h3 {
  color: var(--accent-on-light);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.legal-card--sector:hover {
  border-left-color: var(--accent);
  box-shadow: 0 4px 12px rgba(35, 187, 224, 0.10);
}
.legal-card--sector .legal-bbco {
  border-left-color: var(--accent-on-light);
  background: rgba(35, 187, 224, 0.04);
}
.legal-card--sector .legal-bbco strong {
  color: var(--accent-on-light);
}
.legal-card--sector ul {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
  list-style: none;
}
.legal-card--sector ul li {
  position: relative;
  padding-left: 0.75rem;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}
.legal-card--sector ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-on-light);
}
.legal-card--sector .legal-bbco ul li {
  color: var(--text-primary);
}

/* ── Legal page tablet ───────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .legal-parallax {
    min-height: 45vh;
  }

  .legal-parallax-content {
    padding: 2.5rem 1.5rem;
  }
}

/* ── Legal page mobile ────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .legal-parallax {
    min-height: auto;
    background: var(--bg-primary);
  }

  .legal-parallax-bg,
  .legal-parallax::after {
    display: none;
  }

  .legal-parallax-content {
    padding: 2rem 1.25rem;
  }

  .legal-parallax-content h2 {
    font-size: 1.5rem;
  }

  .legal-parallax-content p {
    font-size: 0.95rem;
  }

  .legal-content {
    padding: 2rem 0;
  }

  .legal-cards {
    gap: 1.25rem;
  }

  .legal-card {
    padding: 1.25rem 1rem 1.25rem 1.25rem;
  }

  .legal-card h3 {
    font-size: 1rem;
  }

  .legal-card .legal-citation {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .legal-card .legal-doctrine,
  .legal-card .legal-bbco {
    font-size: 0.9rem;
    line-height: 1.65;
  }
  .legal-card .legal-bbco {
    padding: 0.6rem 0.75rem;
  }
}

/* ── Legal page small screens ─────────────────────────────────────────── */

@media (max-width: 400px) {
  .legal-parallax-content h2 {
    font-size: 1.3rem;
  }

  .legal-parallax-content p {
    font-size: 0.88rem;
    line-height: 1.6;
  }

  .legal-card {
    padding: 1rem 0.85rem 1rem 1rem;
    border-left-width: 3px;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   ACTUARIAL FOUNDATIONS PAGE
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  --actuarial:       #1B6B7D;
  --actuarial-light: #4A9BAD;
  --actuarial-dim:   rgba(27, 107, 125, 0.08);
  --actuarial-border:rgba(27, 107, 125, 0.25);
}

/* ── Parallax section divider ─────────────────────────────────────────── */

.actuarial-parallax {
  position: relative;
  min-height: 41vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
}

.actuarial-parallax-bg {
  position: absolute;
  top: -20%;
  left: 0;
  right: 0;
  bottom: -20%;
  width: 100%;
  background-color: var(--bg-deep);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.actuarial-parallax::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6, 14, 26, 0.70);
  z-index: 1;
}

.actuarial-parallax-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.actuarial-parallax-content h2 {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.actuarial-parallax-content p {
  color: var(--text-on-dark-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.actuarial-parallax-content .divider {
  margin: 1rem auto 1.5rem;
  background: var(--actuarial-light);
}

/* ── Actuarial content section ────────────────────────────────────────── */

.actuarial-content {
  padding: 4rem 0;
  background: var(--bg-body);
}

.actuarial-content--alt {
  background: var(--bg-light-alt);
}

.actuarial-cards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.actuarial-card {
  padding: 1.75rem 1.75rem 1.75rem 2rem;
  border-left: 4px solid var(--actuarial);
  background: var(--bg-light-card);
  border-radius: 0 8px 8px 0;
  border-top: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.actuarial-card:hover {
  border-left-color: var(--actuarial);
  box-shadow: 0 4px 12px rgba(27, 107, 125, 0.10);
}

.actuarial-card h3 {
  color: var(--actuarial);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.actuarial-card .actuarial-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.actuarial-card .actuarial-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.actuarial-card .actuarial-relevance {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.7;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.actuarial-card .actuarial-relevance strong {
  color: var(--actuarial);
}

/* ── Actuarial page tablet ───────────────────────────────────────────── */

@media (max-width: 1024px) {
  .actuarial-parallax {
    min-height: 45vh;
  }

  .actuarial-parallax-content {
    padding: 2.5rem 1.5rem;
  }
}

/* ── Actuarial page mobile ────────────────────────────────────────────── */

@media (max-width: 768px) {
  .actuarial-parallax {
    min-height: auto;
    background: var(--bg-primary);
  }

  .actuarial-parallax-bg,
  .actuarial-parallax::after {
    display: none;
  }

  .actuarial-parallax-content {
    padding: 2rem 1.25rem;
  }

  .actuarial-parallax-content h2 {
    font-size: 1.5rem;
  }

  .actuarial-parallax-content p {
    font-size: 0.95rem;
  }

  .actuarial-content {
    padding: 2rem 0;
  }

  .actuarial-cards {
    gap: 1.25rem;
  }

  .actuarial-card {
    padding: 1.25rem 1rem 1.25rem 1.25rem;
  }

  .actuarial-card h3 {
    font-size: 1rem;
  }

  .actuarial-card .actuarial-subtitle {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .actuarial-card .actuarial-body {
    font-size: 0.9rem;
    line-height: 1.65;
  }
}

/* ── Actuarial page small screens ─────────────────────────────────────── */

@media (max-width: 400px) {
  .actuarial-parallax-content h2 {
    font-size: 1.3rem;
  }

  .actuarial-parallax-content p {
    font-size: 0.88rem;
    line-height: 1.6;
  }

  .actuarial-card {
    padding: 1rem 0.85rem 1rem 1rem;
    border-left-width: 3px;
  }
}
