/* ILLUMINATIBELIEFS.ORG — Design System */
/* No gold. No amber. Red and off-white on near-black. */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Playfair+Display+SC:wght@400;500&display=swap');

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #161616;
  --bg-accent: #1c1c1c;
  --text-primary: #f5f0e8;
  --text-secondary: #b8b0a0;
  --text-muted: #6b6560;
  --accent-red: #c41e1e;
  --accent-red-dim: #7a1212;
  --accent-red-glow: rgba(196, 30, 30, 0.15);
  --white: #ffffff;
  --border: rgba(245, 240, 232, 0.08);
  --border-strong: rgba(245, 240, 232, 0.18);
  --nav-height: 72px;
  --nav-height-mobile: 64px;
  --container-padding: 40px;
  --container-padding-mobile: 20px;
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --safe-left: env(safe-area-inset-left, 0);
  --safe-right: env(safe-area-inset-right, 0);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img, svg, video { max-width: 100%; height: auto; display: block; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); }
::-webkit-scrollbar-thumb { background: var(--accent-red); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-red-dim); }

/* Layout */
.container { max-width: 1280px; margin: 0 auto; padding-left: var(--container-padding); padding-right: var(--container-padding); }
.container-narrow { max-width: 860px; margin: 0 auto; padding-left: var(--container-padding); padding-right: var(--container-padding); }
.container-wide { max-width: 1440px; margin: 0 auto; padding-left: var(--container-padding); padding-right: var(--container-padding); }
.section { padding-top: 120px; padding-bottom: 120px; }
.section-sm { padding-top: 70px; padding-bottom: 70px; }

@media (max-width: 768px) {
  .container, .container-narrow, .container-wide { padding-left: max(var(--container-padding-mobile), var(--safe-left)); padding-right: max(var(--container-padding-mobile), var(--safe-right)); }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .section-sm { padding-top: 48px; padding-bottom: 48px; }
}

/* Typography */
.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-red);
  margin-bottom: 1rem;
}
.title-display {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(5rem, 12vw, 11rem);
  line-height: 0.9;
  color: var(--text-primary);
  margin: 0;
}
.title-section {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.15;
  margin: 0 0 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.title-page {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.05;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.body-text {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
  letter-spacing: 0.01em;
}
.body-text:last-child { margin-bottom: 0; }
.caption, .meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Buttons */
.btn-primary {
  display: inline-block;
  font-family: 'Playfair Display SC', serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background: var(--accent-red);
  border: none;
  padding: 16px 40px;
  cursor: pointer;
  transition: filter 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 30px var(--accent-red-glow);
}
.btn-primary:active { filter: brightness(0.95); }
.btn-outline {
  display: inline-block;
  font-family: 'Playfair Display SC', serif;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background: transparent;
  border: 2px solid var(--white);
  padding: 14px 38px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--white); color: var(--bg-primary); }
.btn-outline:active { opacity: 0.9; }
.btn-text {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
}
.btn-text::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent-red);
  transition: width 0.3s ease;
}
.btn-text:hover::after { width: 100%; }

/* Dividers */
.divider { width: 100%; height: 1px; background: var(--border); border: none; margin: 0; }
.divider-strong { width: 100%; height: 1px; background: var(--border-strong); border: none; margin: 0; }
.divider-red { width: 100%; height: 3px; background: var(--accent-red); border: none; margin: 0; }

/* Tag */
.tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
  padding: 4px 10px;
  text-transform: uppercase;
}

/* Read progress bar */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-red);
  z-index: 9999;
  transition: width 0.05s linear;
}

/* Site navigation */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  padding-top: var(--safe-top);
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: max(var(--container-padding), var(--safe-left));
  padding-right: max(var(--container-padding), var(--safe-right));
  transition: background 0.3s;
}
.site-nav.scrolled { background: rgba(10, 10, 10, 0.99); }
.site-nav .nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  min-height: 44px;
  min-width: 44px;
  justify-content: flex-start;
}
.site-nav .nav-brand .logo-svg { width: 28px; height: 28px; flex-shrink: 0; }
.site-nav .nav-brand .brand-text { font-family: 'Playfair Display SC', serif; font-weight: 500; font-size: 1rem; letter-spacing: 0.02em; }
.site-nav .nav-brand .brand-org { font-family: 'DM Mono', monospace; color: var(--accent-red); }
.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav .nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  opacity: 0.7;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
}
.site-nav .nav-links a:hover { opacity: 1; }
.site-nav .nav-links a.active { opacity: 1; border-bottom-color: var(--accent-red); }
.site-nav .nav-cta { margin-left: 24px; }
.site-nav .nav-cta .btn-primary { padding: 12px 28px; font-size: 12px; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1024px) {
  .site-nav .nav-links, .site-nav .nav-cta { display: none; }
  .nav-toggle { display: flex; min-width: 44px; min-height: 44px; justify-content: center; align-items: center; }
  .site-nav { height: calc(var(--nav-height-mobile) + var(--safe-top)); padding-left: max(var(--container-padding-mobile), var(--safe-left)); padding-right: max(var(--container-padding-mobile), var(--safe-right)); }
}
@media (max-width: 768px) {
  .site-nav .nav-brand {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
  }
  .site-nav .nav-brand .nav-brand-text { display: block; }
}
@media (max-width: 480px) {
  .site-nav .nav-brand .brand-text { font-size: 0.85rem; }
  .site-nav .nav-brand .brand-org { font-size: 0.8rem; }
}

/* Mobile overlay menu — compact, fits viewport */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height-mobile) + var(--safe-top)) max(16px, var(--safe-left)) max(24px, var(--safe-bottom)) max(16px, var(--safe-right));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-overlay.open { opacity: 1; visibility: visible; }
.nav-overlay .nav-overlay-inner {
  text-align: center;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.nav-overlay a {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
  padding: 12px 16px;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.nav-overlay a:hover { color: var(--accent-red); }
.nav-overlay .btn-primary {
  margin-top: 16px;
  min-height: 44px;
  padding: 12px 24px;
  font-size: 12px;
}
/* Even more compact on very small screens */
@media (max-width: 380px) {
  .nav-overlay { padding-left: max(12px, var(--safe-left)); padding-right: max(12px, var(--safe-right)); }
  .nav-overlay a { font-size: 1.05rem; padding: 10px 12px; min-height: 40px; }
  .nav-overlay .btn-primary { margin-top: 12px; padding: 10px 20px; font-size: 11px; }
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  padding-top: 60px;
  padding-bottom: 0;
}
.site-footer .footer-top { border-top: 3px solid var(--accent-red); padding-top: 48px; }
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
  margin-bottom: 48px;
}
.site-footer .footer-brand .logo-svg { width: 32px; height: 32px; margin-bottom: 12px; }
.site-footer .footer-brand .brand-name { font-family: 'Playfair Display SC', serif; font-size: 1rem; color: var(--white); margin-bottom: 12px; }
.site-footer .footer-brand .mission { font-family: 'Playfair Display', serif; font-style: italic; font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; }
.site-footer .footer-brand .social-links { display: flex; gap: 16px; }
.site-footer .footer-brand .social-links a { color: var(--text-muted); transition: color 0.2s; }
.site-footer .footer-brand .social-links a:hover { color: var(--accent-red); }
.site-footer h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer ul a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.site-footer ul a:hover { color: var(--accent-red); }
.site-footer .footer-contact input,
.site-footer .footer-contact textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 12px;
  resize: vertical;
}
.site-footer .footer-contact input::placeholder,
.site-footer .footer-contact textarea::placeholder { color: var(--text-muted); }
.site-footer .footer-contact .btn-primary { width: 100%; margin-top: 4px; }
.site-footer .footer-disclaimer { font-size: 0.75rem; color: var(--text-muted); margin-top: 12px; line-height: 1.5; }
.site-footer .footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-footer .footer-bottom .copyright { font-size: 0.8rem; color: var(--text-muted); }
.site-footer .footer-bottom .footer-links a { color: var(--text-muted); text-decoration: none; margin-left: 20px; font-size: 0.8rem; }
.site-footer .footer-bottom .footer-links a:hover { color: var(--accent-red); }
.site-footer .footer-bottom .tagline { font-family: 'Playfair Display', serif; font-style: italic; color: var(--text-muted); font-size: 0.9rem; }

@media (max-width: 1024px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .site-footer .footer-bottom { flex-direction: column; text-align: center; }
}

/* Animations */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Marquee */
.marquee-wrap { overflow: hidden; background: var(--accent-red); padding: 14px 0; }
.marquee {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee span { font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 0.8rem; letter-spacing: 2px; color: var(--white); white-space: nowrap; padding: 0 60px; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Accordion / FAQ */
.faq-category { margin-bottom: 32px; }
.faq-category h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 16px; color: var(--accent-red); }
details.faq-item {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
details.faq-item summary {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--accent-red); }
details.faq-item[open] summary::after { content: '−'; }
details.faq-item .faq-answer { padding: 0 0 24px; color: var(--text-secondary); }
details.faq-item .faq-answer p { margin: 0 0 12px; }

/* Tabs (FAQ) */
.faq-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; position: sticky; top: calc(var(--nav-height) + 20px); background: var(--bg-primary); padding: 12px 0; z-index: 10; }
.faq-tabs button {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 20px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.faq-tabs button:hover { color: var(--text-primary); }
.faq-tabs button.active { color: var(--accent-red); border-color: var(--accent-red); }
.faq-section { display: none; }
.faq-section.active { display: block; }

/* Form */
.form-group { margin-bottom: 24px; }
.form-group label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 2px var(--accent-red-glow);
}
.form-group .error { color: var(--accent-red); font-size: 0.8rem; margin-top: 6px; }
.form-group input.error-field,
.form-group select.error-field,
.form-group textarea.error-field { border-color: var(--accent-red); }
.form-checkbox { display: flex; align-items: flex-start; gap: 12px; }
.form-checkbox input { width: auto; margin-top: 4px; }
.form-checkbox label { margin-bottom: 0; text-transform: none; letter-spacing: 0; }

/* Cards */
.card {
  background: var(--bg-tertiary);
  padding: 32px;
  transition: border-color 0.2s, box-shadow 0.25s ease;
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
}
.card:hover { border-top-color: var(--accent-red); border-color: var(--border-strong); box-shadow: 0 4px 24px rgba(0,0,0,0.2); }
.card .card-title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.4rem; margin: 0 0 12px; letter-spacing: 0.01em; }
.card .card-meta { font-family: 'DM Mono', monospace; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }
.card .card-excerpt { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.7; }

/* Breadcrumb */
.breadcrumb {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-red); }
.breadcrumb span { margin: 0 8px; }

/* Timeline */
.timeline { position: relative; padding: 40px 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-red);
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 48px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.timeline-item:nth-child(odd) { flex-direction: row-reverse; }
.timeline-item .timeline-content { width: calc(50% - 40px); padding: 0 24px; }
.timeline-item .timeline-year { font-family: 'DM Mono', monospace; font-size: 1rem; color: var(--accent-red); margin-bottom: 8px; }
.timeline-item .timeline-title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.2rem; margin: 0 0 12px; }
.timeline-item .timeline-dot {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 16px;
  background: var(--accent-red);
  border-radius: 50%;
  transform: translate(-50%, 6px);
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .timeline::before { left: 20px; }
  .timeline-item { flex-direction: column !important; padding-left: 48px; }
  .timeline-item .timeline-content { width: 100%; padding: 0; }
  .timeline-item .timeline-dot { left: 20px; }
}

/* Symbol tiles horizontal scroll */
.symbols-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 24px 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.symbols-scroll::-webkit-scrollbar { height: 6px; }
.symbol-tile {
  flex: 0 0 200px;
  scroll-snap-align: start;
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  transition: box-shadow 0.3s, border-color 0.3s;
}
.symbol-tile:hover { border-color: var(--accent-red); box-shadow: 0 0 30px var(--accent-red-glow); }
.symbol-tile svg { width: 64px; height: 64px; margin-bottom: 12px; }

/* Testament / book layout */
.testament-nav { position: sticky; top: calc(var(--nav-height) + 24px); }
.testament-nav a { display: block; color: var(--text-secondary); text-decoration: none; padding: 8px 0; font-size: 0.9rem; border-left: 2px solid transparent; padding-left: 12px; margin-bottom: 4px; }
.testament-nav a:hover { color: var(--accent-red); border-left-color: var(--accent-red); }
.testament-content .chapter { margin-bottom: 64px; }
.testament-content .drop-cap::first-letter { font-family: 'Playfair Display', serif; font-size: 4rem; float: left; line-height: 0.9; margin-right: 12px; color: var(--accent-red); }

/* Archive layout */
.archive-masthead { border: 2px solid var(--border); padding: 24px 32px; margin-bottom: 48px; }
.archive-masthead h2 { font-family: 'Playfair Display SC', serif; font-size: 2rem; margin: 0 0 8px; }
.archive-masthead .edition { font-family: 'DM Mono', monospace; font-size: 0.8rem; color: var(--text-muted); }
.archive-index { background: var(--bg-tertiary); padding: 24px; }
.archive-index h4 { font-size: 0.75rem; letter-spacing: 2px; margin-bottom: 12px; color: var(--text-muted); }
.archive-index ul { list-style: none; padding: 0; margin: 0; }
.archive-index a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; }
.archive-index a:hover { color: var(--accent-red); }

/* ——— Mobile-first: perfect fit & classy refinements ——— */

/* Hero: single column on tablet/mobile, generous padding, no overflow */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 65% 1fr;
  gap: 48px;
  align-items: center;
  padding: calc(var(--nav-height) + 60px) var(--container-padding) 80px;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: max(var(--container-padding), var(--safe-left));
  padding-right: max(var(--container-padding), var(--safe-right));
}
.hero .hero-stats { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero .hero-stats > span { display: inline-block; }
.hero .hero-stats .stat-divider { width: 1px; height: 40px; background: var(--border); flex-shrink: 0; }
.hero .hero-buttons { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 48px; }
.hero .hero-buttons .btn-primary,
.hero .hero-buttons .btn-outline { min-height: 48px; padding: 16px 32px; }

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--nav-height-mobile) + var(--safe-top) + 40px);
    padding-bottom: 60px;
    padding-left: max(var(--container-padding-mobile), var(--safe-left));
    padding-right: max(var(--container-padding-mobile), var(--safe-right));
    gap: 40px;
  }
  .hero .eyebrow { text-align: center; }
  .hero h1 .hero-beliefs { margin-left: 0 !important; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero > div:last-child { order: -1; }
  .hero .hero-buttons { justify-content: center; margin-bottom: 40px; }
  .hero .hero-stats { justify-content: center; }
  .hero .hero-subline { margin-left: auto; margin-right: auto; }
}
@media (max-width: 600px) {
  .hero {
    padding-top: calc(var(--nav-height-mobile) + var(--safe-top) + 32px);
    padding-bottom: 48px;
    min-height: auto;
    padding-bottom: 56px;
  }
  .hero .title-display { font-size: clamp(2.75rem, 12vw, 4rem) !important; line-height: 0.92; }
  .hero .hero-subline { font-size: 1.15rem !important; }
  .hero .hero-stats { flex-direction: column; gap: 16px; align-items: center; }
  .hero .hero-stats .stat-divider { width: 60px; height: 1px; }
  .hero .hero-buttons { flex-direction: column; width: 100%; }
  .hero .hero-buttons .btn-primary,
  .hero .hero-buttons .btn-outline { width: 100%; justify-content: center; text-align: center; }
}

/* What Is / two-column sections: stack on mobile */
.what-is-grid { min-width: 0; }
@media (max-width: 768px) {
  .what-is-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

/* Three pillars: single column, no vertical red dividers on small screens */
.three-pillars-grid .divider-vert { background: var(--accent-red); width: 1px; }
@media (max-width: 1024px) {
  .three-pillars-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .three-pillars-grid > .divider-vert { display: none !important; }
  .three-pillars-grid .card { padding: 32px 24px !important; }
}
@media (max-width: 600px) {
  .three-pillars-grid .card { padding: 24px 20px !important; }
}

/* Beliefs seven bands: stack numeral above text on mobile */
@media (max-width: 900px) {
  #seven-beliefs article { grid-template-columns: 1fr !important; text-align: left; padding: 48px max(var(--container-padding-mobile), var(--safe-left)) 48px max(var(--container-padding-mobile), var(--safe-right)) !important; }
  #seven-beliefs article span { font-size: 4rem !important; position: static !important; margin-bottom: 16px !important; display: block !important; }
}
@media (max-width: 600px) {
  #seven-beliefs article { padding: 32px max(var(--container-padding-mobile), var(--safe-left)) 32px max(var(--container-padding-mobile), var(--safe-right)) !important; }
  #seven-beliefs article span { font-size: 3rem !important; }
}

/* Symbols scroll: smaller tiles on mobile, safe padding */
.symbols-scroll { padding-left: max(var(--container-padding-mobile), var(--safe-left)); padding-right: max(var(--container-padding-mobile), var(--safe-right)); -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) {
  .symbol-tile { flex: 0 0 160px; padding: 24px 16px; }
  .symbol-tile svg { width: 48px; height: 48px; }
}

/* Footer: classy spacing, mobile stack */
.site-footer { padding-left: max(var(--container-padding), var(--safe-left)); padding-right: max(var(--container-padding), var(--safe-right)); padding-bottom: var(--safe-bottom); }
@media (max-width: 600px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 40px; margin-bottom: 40px; }
  .site-footer .footer-bottom { flex-direction: column; text-align: center; padding-bottom: max(24px, var(--safe-bottom)); }
  .site-footer .footer-bottom .footer-links a { margin-left: 0; margin-right: 16px; }
}

/* Marquee: prevent layout shift on mobile */
.marquee-wrap { padding-left: var(--safe-left); padding-right: var(--safe-right); }
@media (max-width: 600px) { .marquee span { font-size: 0.75rem; padding: 0 40px; } }

/* Join CTA / full-viewport sections: safe padding */
#join-cta.section { padding-left: max(var(--container-padding-mobile), var(--safe-left)); padding-right: max(var(--container-padding-mobile), var(--safe-right)); padding-bottom: max(80px, var(--safe-bottom)); }
@media (max-width: 600px) { #join-cta .title-section { font-size: clamp(2rem, 8vw, 3rem) !important; } }

/* People section: scale down giant number on mobile */
@media (max-width: 768px) {
  #people .container-wide > div[style*="font-size: 20rem"] { font-size: 10rem !important; opacity: 0.03 !important; }
}
@media (max-width: 600px) {
  #people .container-wide > div[style*="font-size: 20rem"] { font-size: 6rem !important; }
}

/* Forms: full width, touch-friendly on mobile */
.form-group input, .form-group select, .form-group textarea { min-height: 48px; }
.form-group textarea { min-height: 120px; }
@media (max-width: 600px) {
  .form-group { margin-bottom: 20px; }
  .btn-primary { min-height: 48px; padding: 14px 28px; width: 100%; text-align: center; }
}

/* FAQ tabs: horizontal scroll on small screens */
.faq-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 8px; }
.faq-tabs::-webkit-scrollbar { display: none; }
.faq-tabs button { flex-shrink: 0; min-height: 44px; }

/* Timeline: already responsive; ensure padding */
@media (max-width: 600px) {
  .timeline-item { padding-left: 40px !important; }
  .timeline::before { left: 12px !important; }
  .timeline-item .timeline-dot { left: 12px !important; width: 12px; height: 12px; }
}

/* Testament / archives layout */
@media (max-width: 1024px) {
  .testament-nav { position: static; }
  .testament-layout { grid-template-columns: 1fr !important; }
  .archives-layout { grid-template-columns: 1fr !important; }
  .archive-index.testament-nav { margin-top: 32px; }
}

/* General: prevent any grid from overflowing */
.container, .container-narrow, .container-wide { min-width: 0; }
main { min-width: 0; }

/* ——— Mobile: logo/visual on top, text below (no parallel layout) ——— */

/* Symbol sections: always visual on top, then text */
.symbol-section { min-width: 0; }
.symbol-section .symbol-visual,
.symbol-section .symbol-text { min-width: 0; }
@media (max-width: 768px) {
  .symbol-section {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    align-items: start !important;
  }
  .symbol-section .symbol-visual { order: -1; text-align: center; }
  .symbol-section .symbol-visual svg { margin: 0 auto; }
  .symbol-section .symbol-text { order: 0; }
}

/* About: origin grid — 1776 on top, text below */
.origin-grid { min-width: 0; }
@media (max-width: 768px) {
  .origin-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .origin-grid .origin-visual { order: -1; text-align: center; font-size: 6rem !important; }
  .origin-grid .origin-text { order: 0; }
}

/* About: how we operate — single column on mobile */
.operate-grid { min-width: 0; }
@media (max-width: 768px) {
  .operate-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

/* History: era grid — callout (DID YOU KNOW) on top, then content */
.era-grid { min-width: 0; }
@media (max-width: 768px) {
  .era-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .era-grid .era-callout { order: -1; }
  .era-grid > div { order: 0; }
}

/* Join: stage row — numeral on top, text below */
.stage-row { min-width: 0; }
@media (max-width: 768px) {
  .stage-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 32px 0 !important;
  }
  .stage-row .stage-num { order: -1; font-size: 3rem !important; }
}

/* Beliefs: triangle grid and myth grid — single column on mobile */
.triangle-grid,
.myth-grid { min-width: 0; }
@media (max-width: 768px) {
  .triangle-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }
  .myth-grid { grid-template-columns: 1fr !important; }
}

/* Archives: cards grid — single column on mobile */
.archive-cards-grid { min-width: 0; }
@media (max-width: 768px) {
  .archive-cards-grid { grid-template-columns: 1fr !important; }
}

/* Members: member cards — single column on small mobile */
.members-cards-grid { min-width: 0; }
@media (max-width: 480px) {
  .members-cards-grid { grid-template-columns: 1fr !important; }
}

/* ——— Mobile readability: larger body text, comfortable line length ——— */
@media (max-width: 768px) {
  body { font-size: 1.08rem; }
  .body-text { font-size: 1.08rem; line-height: 1.85; max-width: 100%; }
  .section .container,
  .section .container-narrow,
  .section .container-wide { padding-left: max(20px, var(--safe-left)); padding-right: max(20px, var(--safe-right)); }
  .title-section { font-size: clamp(1.75rem, 5vw, 2.5rem); margin-bottom: 1.25rem; }
  .title-page { font-size: clamp(2rem, 8vw, 3.5rem); }
  .card .card-title { font-size: 1.25rem; }
  blockquote p { font-size: clamp(1.1rem, 4vw, 1.5rem) !important; }
  /* Page heroes (about, join, beliefs, etc.): account for mobile nav height */
  .section.container[style*="padding-top: calc(var(--nav-height)"] { padding-top: calc(var(--nav-height-mobile) + var(--safe-top) + 32px) !important; }
}
@media (max-width: 480px) {
  body { font-size: 1.05rem; }
  .body-text { font-size: 1.05rem; }
}

/* ——— Mobile: no parallel layout — image/visual on top, then text (stacked) ——— */
@media (max-width: 768px) {
  /* Symbol sections: single column, visual (SVG) always on top */
  .symbol-section {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .symbol-section .symbol-visual { order: -1; }
  .symbol-section .symbol-visual svg { margin: 0 auto; }

  /* About origin: big date on top, then text */
  .origin-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .origin-grid .origin-visual { order: -1; font-size: 6rem !important; text-align: center; }

  /* History era: callout/sidebar on top, then main content */
  .era-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .era-grid .era-callout { order: -1; }

  /* Join stages: numeral on top, then text */
  .stage-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 32px 0 !important;
  }
  .stage-row .stage-num { order: -1; text-align: center; }

  /* Beliefs: Triangle of Enlightenment + myth cards — single column */
  .triangle-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }
  .triangle-grid .card { max-width: none !important; }
  .myth-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  /* About: How the Illuminati Operates — 3 cols to 1 */
  .operate-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Archives: article cards 3-col to 1-col */
  .archive-cards-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
}

/* Utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-red { color: var(--accent-red); }
.bg-secondary { background: var(--bg-secondary); }
.bg-red { background: var(--accent-red); }
