/* ========================================
   Human Credit — Main Stylesheet
   Palette: Navy #1a2332, Gold #c8a84e, Teal #2a9d8f
   Fonts: Playfair Display (headings), Source Sans Pro (body)
   ======================================== */

:root {
  --navy: #1a2332;
  --navy-light: #243044;
  --gold: #c8a84e;
  --gold-light: #d4b967;
  --teal: #2a9d8f;
  --teal-light: #3ab8a8;
  --red: #c0392b;
  --amber: #d4872a;
  --text: #333333;
  --text-light: #666666;
  --bg: #ffffff;
  --bg-warm: #faf9f6;
  --bg-cool: #f5f7fa;
  --border: #e0e0e0;
  --border-light: #eee;
}

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

/* Base Typography */
body {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy);
  line-height: 1.3;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold);
}

img, svg {
  max-width: 100%;
  height: auto;
}

/* ========================================
   Site Header / Navigation
   ======================================== */

.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
}

.site-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.site-logo span {
  color: var(--gold);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.site-nav .nav-cta {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  margin-left: 0.5rem;
}

.site-nav .nav-cta:hover {
  background: var(--gold-light);
  color: var(--navy);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ========================================
   Layout
   ======================================== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ========================================
   Hero / Landing
   ======================================== */

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 5rem 2rem 4rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.hero h1 span {
  color: var(--gold);
}

.hero .subtitle {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero .hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: 'Source Sans Pro', sans-serif;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--navy);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn-teal {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.btn-teal:hover {
  background: var(--teal-light);
  border-color: var(--teal-light);
  color: #fff;
}

/* ========================================
   Three-Pillar Overview (Landing)
   ======================================== */

.overview-section {
  padding: 4rem 2rem;
  background: var(--bg-warm);
}

.overview-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.overview-section .section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.pillar-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pillar-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.pillar-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.pillar-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

a.pillar-card-link {
  display: block;
  color: inherit;
  cursor: pointer;
}

a.pillar-card-link h3 {
  color: var(--navy);
}

a.pillar-card-link:hover h3 {
  color: var(--teal);
}

/* ========================================
   Core Mechanism (Landing)
   ======================================== */

.mechanism-section {
  padding: 4rem 2rem;
  background: var(--bg);
}

.mechanism-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2.5rem;
}

.mechanism-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.mechanism-step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.2rem;
}

.mechanism-step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.mechanism-step p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.5;
}

a.mechanism-step-link {
  display: flex;
  color: inherit;
  cursor: pointer;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.step-content {
  flex: 1;
}

a.mechanism-step-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

a.mechanism-step-link:hover h3 {
  color: var(--teal);
}

/* ========================================
   Section Cards (Landing explore)
   ======================================== */

.explore-section {
  padding: 4rem 2rem;
  background: var(--bg-cool);
}

.explore-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2.5rem;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.section-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  color: inherit;
}

.section-card .card-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 700;
}

.section-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* ========================================
   CTA Banner
   ======================================== */

.cta-banner {
  background: linear-gradient(135deg, var(--teal) 0%, #1a7a6f 100%);
  color: #fff;
  padding: 3.5rem 2rem;
  text-align: center;
}

.cta-banner h2 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   Page Content (sections, about, etc.)
   ======================================== */

.page-header {
  background: var(--navy);
  color: #fff;
  padding: 3rem 2rem 2.5rem;
  border-bottom: 3px solid var(--gold);
}

.page-header h1 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 0.3rem;
}

.page-header .page-subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  font-style: italic;
}

.page-header .breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.page-header .breadcrumb a {
  color: var(--gold);
}

.page-header .breadcrumb span {
  color: rgba(255, 255, 255, 0.5);
}

.page-body {
  padding: 3rem 0;
}

.page-body .content-container {
  font-size: 17px;
  line-height: 1.75;
}

.page-body .content-container h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.page-body .content-container p {
  margin-bottom: 1rem;
}

/* Whitepaper content styling (overrides for embedded HTML) */
.whitepaper-content h1 {
  font-size: 2em;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 0.3em;
  margin-top: 3em;
  margin-bottom: 0.6em;
}

.whitepaper-content h2 {
  font-size: 1.5em;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.2em;
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.whitepaper-content h3 {
  font-size: 1.2em;
  color: #2c3e50;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.whitepaper-content p {
  margin-bottom: 1em;
}

.whitepaper-content strong {
  color: var(--navy);
}

.whitepaper-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95em;
}

.whitepaper-content th,
.whitepaper-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.whitepaper-content th {
  background: #f5f5f5;
  font-weight: 600;
  color: var(--navy);
}

.whitepaper-content ul {
  margin: 0.8em 0 1.2em 1.5em;
}

.whitepaper-content li {
  margin-bottom: 0.4em;
  line-height: 1.6;
}

.whitepaper-content .callout {
  background: #f8f6f0;
  border-left: 4px solid var(--gold);
  padding: 16px 20px;
  margin: 1.5em 0;
  font-style: italic;
}

.whitepaper-content .figure-container {
  margin: 2em 0;
  text-align: center;
}

.whitepaper-content .figure-container svg {
  max-width: 100%;
  height: auto;
}

.whitepaper-content .figure-caption {
  font-size: 0.9em;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.5em;
}

.whitepaper-content .deep-dive-ref {
  color: var(--teal);
  font-style: italic;
  font-size: 0.95em;
}

.whitepaper-content .back-ref {
  color: var(--gold);
  font-style: italic;
  font-size: 0.95em;
}

/* ========================================
   Section Navigation
   ======================================== */

.section-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  gap: 1rem;
}

.section-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.section-nav a:hover {
  background: var(--bg-cool);
  border-color: var(--teal);
  color: var(--teal);
}

.section-nav .nav-spacer {
  flex: 1;
}

/* ========================================
   Deep Dive Links (in section pages)
   ======================================== */

.deep-dive-links {
  background: #f0f8f7;
  border-left: 4px solid var(--teal);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 2rem;
  margin-top: 2rem;
}

.deep-dive-links h3 {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.deep-dive-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.deep-dive-links a {
  color: var(--navy);
  font-weight: 600;
}

/* ========================================
   Download Page
   ======================================== */

.download-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: box-shadow 0.2s;
}

.download-row:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.download-info {
  flex: 1;
}

.download-info h3 {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.download-info p {
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 0;
}

.download-row .btn {
  flex-shrink: 0;
}

.download-list.compact {
  gap: 0.5rem;
}

.download-list.compact .download-row {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
}

.download-list.compact .btn {
  padding: 0.4rem 1.4rem;
  font-size: 0.9rem;
}

/* ========================================
   Author Profile
   ======================================== */

.author-profile {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin: 1.5rem 0 2.5rem;
}

.author-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--border);
}

.author-bio h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.author-bio p {
  margin-bottom: 0.75rem;
}

@media (max-width: 600px) {
  .author-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-photo {
    width: 140px;
    height: 140px;
  }
}

/* ========================================
   Get Involved / Sign Up
   ======================================== */

.signup-form {
  max-width: 500px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--navy);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Source Sans Pro', sans-serif;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.1);
}

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

.checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400 !important;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.checkbox-label span {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

.supporter-counter {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.supporter-counter .count {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}

.supporter-counter p {
  color: var(--text-light);
  margin-top: 0.25rem;
}

.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.alert-error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.alert-info {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 2rem 2rem;
  margin-top: 0;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-about h3 {
  color: var(--gold);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links h4 {
  color: #fff;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
}

/* ========================================
   Whitepaper TOC Sidebar (full scroll)
   ======================================== */

.whitepaper-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.whitepaper-toc {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 1rem;
}

.whitepaper-toc h3 {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.whitepaper-toc ul {
  list-style: none;
}

.whitepaper-toc li {
  margin-bottom: 0.3rem;
}

.whitepaper-toc a {
  color: var(--text-light);
  font-size: 0.85rem;
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border-left: 2px solid transparent;
}

.whitepaper-toc a:hover {
  color: var(--navy);
  background: var(--bg-cool);
  border-left-color: var(--teal);
}

/* ========================================
   Share Buttons
   ======================================== */

.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.share-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  margin-right: 0.25rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Source Sans Pro', sans-serif;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover {
  background: var(--bg-cool);
  border-color: var(--teal);
  color: var(--teal);
}

/* ========================================
   Media page (coming soon)
   ======================================== */

.coming-soon {
  text-align: center;
  padding: 4rem 2rem;
}

.coming-soon h2 {
  color: var(--text-light);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.coming-soon p {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  .site-header .container {
    padding: 0 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 3px solid var(--gold);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .site-nav .nav-cta {
    margin-left: 0;
    margin-top: 0.5rem;
    text-align: center;
  }

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

  .hero .subtitle {
    font-size: 1.05rem;
  }

  .pillars {
    grid-template-columns: 1fr;
  }

  .mechanism-steps {
    grid-template-columns: 1fr 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .whitepaper-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .whitepaper-toc {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }

  .section-nav {
    flex-direction: column;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  .download-row {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 1rem 2.5rem;
  }

  .mechanism-steps {
    grid-template-columns: 1fr;
  }
}
