/* =============================================================
   research.css — Research & Foundations Page Styles
   The Resilience Atlas™
   ============================================================= */

/* ── Variables ────────────────────────────────────────────────── */
:root {
  --research-blue:       #4F46E5;
  --research-blue-dark:  #4338CA;
  --research-blue-light: #E0E7FF;
  --research-teal:       #059669;
  --research-teal-light: #D1FAE5;
  --research-orange:     #F59E0B;
  --research-orange-lt:  #FEF3C7;
  --research-slate-900:  #0F172A;
  --research-slate-800:  #1E293B;
  --research-slate-600:  #475569;
  --research-slate-400:  #94A3B8;
  --research-slate-200:  #E2E8F0;
  --research-slate-100:  #F1F5F9;
  --research-slate-50:   #F8FAFC;
  --research-white:      #ffffff;
  --research-radius:     12px;
  --research-shadow:     0 4px 16px rgba(0, 0, 0, 0.08);
  --research-transition: 200ms ease;
}

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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--research-slate-900);
  background: #F8FAFC;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--research-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Skip Link ────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 16px;
  background: var(--research-blue);
  color: #fff;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
}
.skip-link:focus { left: 8px; }

/* ── Header ───────────────────────────────────────────────────── */
.site-header {
  background: var(--research-white);
  border-bottom: 1px solid var(--research-slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 1.25rem;
  max-width: 1080px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--research-slate-900);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }

.logo-icon { display: flex; align-items: center; }
.logo-icon img { width: 36px; height: 36px; display: block; }

.header-nav { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.3rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--research-transition), transform var(--research-transition), box-shadow var(--research-transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--research-blue); outline-offset: 2px; }
.btn-primary {
  background: var(--research-blue);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.btn-primary:hover { background: var(--research-blue-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); text-decoration: none; }
.btn-secondary {
  background: var(--research-white);
  color: var(--research-slate-800);
  border-color: var(--research-slate-200);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.btn-secondary:hover { background: var(--research-slate-100); text-decoration: none; }

/* ── Layout ───────────────────────────────────────────────────── */
.research-main { padding-bottom: 4rem; }

.research-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.research-section {
  padding: 4rem 0;
}

.research-section + .research-section {
  border-top: 1px solid var(--research-slate-200);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--research-blue);
  background: var(--research-blue-light);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.section-headline {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--research-slate-900);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--research-slate-600);
  max-width: 700px;
  line-height: 1.7;
}

/* ── Hero / Overview ──────────────────────────────────────────── */
.research-hero {
  background: linear-gradient(135deg, #0f2942 0%, #1a3a5c 70%, #1e4a6e 100%);
  color: #fff;
  padding: 5rem 1.25rem 4rem;
  text-align: center;
}

.research-hero .section-label {
  background: rgba(74, 158, 202, 0.25);
  color: #7ec8e3;
}

.research-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #4a9eca;
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.research-hero .hero-description {
  font-size: 1.1rem;
  color: #a8c4d8;
  max-width: 680px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.research-hero .hero-frameworks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.framework-chip {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  color: #c8dde8;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Six Dimensions ───────────────────────────────────────────── */
.dimensions-intro {
  font-size: 1.05rem;
  color: var(--research-slate-600);
  max-width: 700px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* Hexagonal visual diagram */
.hex-diagram {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto 3rem;
}

.hex-diagram svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Dimension cards grid */
.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.dimension-card {
  background: var(--research-white);
  border: 1px solid var(--research-slate-200);
  border-radius: var(--research-radius);
  padding: 1.5rem;
  box-shadow: var(--research-shadow);
  transition: transform var(--research-transition), box-shadow var(--research-transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dimension-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.dimension-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.dimension-icon--relational  { background: #EDE9FE; }
.dimension-icon--cognitive   { background: #DBEAFE; }
.dimension-icon--somatic     { background: #D1FAE5; }
.dimension-icon--emotional   { background: #FEE2E2; }
.dimension-icon--spiritual   { background: #FEF3C7; }
.dimension-icon--agentic     { background: #FCE7F3; }

.dimension-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--research-slate-900);
}

.dimension-desc {
  font-size: 0.95rem;
  color: var(--research-slate-600);
  line-height: 1.6;
}

/* ── Foundation Sections ──────────────────────────────────────── */
.alt-bg {
  background: var(--research-white);
}

.foundation-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .foundation-content { grid-template-columns: 1fr 1fr; }
}

.foundation-body {
  font-size: 1rem;
  color: var(--research-slate-600);
  line-height: 1.75;
}

.foundation-body p + p { margin-top: 0.875rem; }

.key-concepts {
  background: var(--research-slate-50);
  border-left: 4px solid var(--research-blue);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  align-self: start;
}

.key-concepts h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--research-blue);
  margin-bottom: 0.75rem;
}

.key-concepts ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.key-concepts li {
  font-size: 0.9rem;
  color: var(--research-slate-700, #374151);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.key-concepts li::before {
  content: "→";
  color: var(--research-blue);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* teal accent for alternating sections */
.accent-teal .key-concepts { border-left-color: var(--research-teal); }
.accent-teal .key-concepts h4 { color: var(--research-teal); }
.accent-teal .key-concepts li::before { color: var(--research-teal); }

.accent-orange .key-concepts { border-left-color: var(--research-orange); }
.accent-orange .key-concepts h4 { color: #b45309; }
.accent-orange .key-concepts li::before { color: var(--research-orange); }

/* ── Author Credentials ───────────────────────────────────────── */
.credentials-section {
  background: linear-gradient(135deg, #0f2942 0%, #1a3a5c 100%);
  padding: 4rem 1.25rem;
  text-align: center;
  color: #fff;
}

.credentials-section .section-label {
  background: rgba(74,158,202,0.25);
  color: #7ec8e3;
  margin-bottom: 1.5rem;
}

.author-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  backdrop-filter: blur(6px);
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(74,158,202,0.3);
  border: 3px solid rgba(74,158,202,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
}

.author-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #4a9eca;
  margin-bottom: 0.25rem;
}

.author-title {
  font-size: 0.95rem;
  color: #a8c4d8;
  margin-bottom: 1.25rem;
}

.author-bio {
  font-size: 0.95rem;
  color: #c8dde8;
  line-height: 1.7;
}

.credentials-cta {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-light {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
}
.btn-light:hover { background: rgba(255,255,255,0.25); text-decoration: none; }

.btn-blue-outline {
  background: transparent;
  color: #4a9eca;
  border: 2px solid #4a9eca;
}
.btn-blue-outline:hover { background: rgba(74,158,202,0.15); text-decoration: none; }

/* ── Implications Section ─────────────────────────────────────── */
.implications-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.implication-card {
  background: var(--research-white);
  border: 1px solid var(--research-slate-200);
  border-radius: var(--research-radius);
  padding: 1.5rem;
  box-shadow: var(--research-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.implication-icon {
  font-size: 1.75rem;
}

.implication-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--research-slate-900);
}

.implication-text {
  font-size: 0.9rem;
  color: var(--research-slate-600);
  line-height: 1.6;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--research-slate-800);
  color: var(--research-slate-400);
  text-align: center;
  padding: 2rem 1.25rem;
  font-size: 0.875rem;
}

.site-footer a { color: var(--research-slate-400); }
.site-footer strong { color: #fff; }
.site-footer p + p { margin-top: 0.5rem; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .research-hero { padding: 3rem 1.25rem 2.5rem; }
  .research-section { padding: 2.5rem 0; }
  .dimensions-grid { grid-template-columns: 1fr; }
  .foundation-content { grid-template-columns: 1fr; }
  .implications-cards { grid-template-columns: 1fr; }
  .header-nav { gap: 0.4rem; }
  .btn { padding: 0.5rem 0.9rem; font-size: 0.875rem; }
}

@media (max-width: 400px) {
  .header-nav .btn-secondary { display: none; }
}

/* ── Dark Mode ────────────────────────────────────────────────── */
[data-theme="dark"] body,
[data-theme="dark"] .research-main {
  background: #0f172a;
  color: #e2e8f0;
}

[data-theme="dark"] .site-header {
  background: #1e293b;
  border-bottom-color: #334155;
}

[data-theme="dark"] .logo { color: #f1f5f9; }

[data-theme="dark"] .btn-secondary {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}
[data-theme="dark"] .btn-secondary:hover { background: #334155; }

[data-theme="dark"] .research-section + .research-section {
  border-top-color: #334155;
}

[data-theme="dark"] .section-label {
  background: rgba(129,140,248,.15);
  color: #a5b4fc;
}

[data-theme="dark"] .section-headline { color: #f1f5f9; }

[data-theme="dark"] .section-intro { color: #94a3b8; }

[data-theme="dark"] .alt-bg {
  background: #1e293b;
}

[data-theme="dark"] .dimension-card,
[data-theme="dark"] .implication-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="dark"] .dimension-name { color: #0f172a; }
[data-theme="dark"] .dimension-desc { color: #475569; }
[data-theme="dark"] .implication-title { color: #0f172a; }
[data-theme="dark"] .implication-text { color: #475569; }

[data-theme="dark"] .key-concepts {
  background: #0f172a;
  border-left-color: #818cf8;
}
[data-theme="dark"] .key-concepts h4 { color: #a5b4fc; }
[data-theme="dark"] .key-concepts li { color: #cbd5e1; }
[data-theme="dark"] .key-concepts li::before { color: #818cf8; }

[data-theme="dark"] .foundation-body { color: #94a3b8; }
[data-theme="dark"] .dimensions-intro { color: #94a3b8; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body,
  :root:not([data-theme="light"]) .research-main {
    background: #0f172a;
    color: #e2e8f0;
  }

  :root:not([data-theme="light"]) .site-header {
    background: #1e293b;
    border-bottom-color: #334155;
  }

  :root:not([data-theme="light"]) .logo { color: #f1f5f9; }

  :root:not([data-theme="light"]) .btn-secondary {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
  }

  :root:not([data-theme="light"]) .research-section + .research-section {
    border-top-color: #334155;
  }

  :root:not([data-theme="light"]) .section-label {
    background: rgba(129,140,248,.15);
    color: #a5b4fc;
  }

  :root:not([data-theme="light"]) .section-headline { color: #f1f5f9; }
  :root:not([data-theme="light"]) .section-intro { color: #94a3b8; }

  :root:not([data-theme="light"]) .alt-bg {
    background: #1e293b;
  }

  :root:not([data-theme="light"]) .dimension-card,
  :root:not([data-theme="light"]) .implication-card {
    background: #ffffff;
    border-color: #e2e8f0;
  }

  :root:not([data-theme="light"]) .dimension-name { color: #0f172a; }
  :root:not([data-theme="light"]) .dimension-desc { color: #475569; }
  :root:not([data-theme="light"]) .implication-title { color: #0f172a; }
  :root:not([data-theme="light"]) .implication-text { color: #475569; }

  :root:not([data-theme="light"]) .key-concepts {
    background: #0f172a;
    border-left-color: #818cf8;
  }
  :root:not([data-theme="light"]) .key-concepts h4 { color: #a5b4fc; }
  :root:not([data-theme="light"]) .key-concepts li { color: #cbd5e1; }
  :root:not([data-theme="light"]) .key-concepts li::before { color: #818cf8; }

  :root:not([data-theme="light"]) .foundation-body { color: #94a3b8; }
  :root:not([data-theme="light"]) .dimensions-intro { color: #94a3b8; }
}
