/* Shared styles for the hub and research views (Sacred Space Co. proposal). */

:root {
  --linen: #f6f2ea;
  --linen-deep: #efe9dd;
  --cream: #fcfaf5;
  --ink: #2b2925;
  --stone: #7b7466;
  --sage: #7e8e77;
  --sage-deep: #5a6a54;
  --sage-wash: #e9ede4;
  --brass: #a98d5f;
  --line: #e3ddd0;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(43, 41, 37, 0.06);
  --shadow-lift: 0 10px 30px -12px rgba(43, 41, 37, 0.22);
  --font-display: "Sedan SC", Georgia, serif;
  --font-accent: "Sedan", Georgia, serif;
  --font-body: "Open Sans", Arial, sans-serif;
}

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

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--linen);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sage-deep); }
img { max-width: 100%; display: block; }

/* ---------- hub ---------- */
.hub {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 72px 24px 64px;
}
.hub-wordmark {
  font-family: var(--font-display); font-size: 19px; color: var(--stone);
  letter-spacing: 0.04em; margin-bottom: 42px;
}
.hub h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.12;
  text-align: center; max-width: 640px; margin-bottom: 18px;
}
.hub-meta {
  color: var(--stone); font-size: 15.5px; text-align: center; margin-bottom: 56px;
}
.hub-meta .dot { color: var(--brass); padding: 0 6px; }

.hub-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px;
  width: 100%; max-width: 1120px; margin-bottom: 44px;
}
.hub-card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  display: flex; flex-direction: column;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.hub-card .thumb { aspect-ratio: 21 / 9; object-fit: cover; width: 100%; }
.hub-card .thumb-doc {
  aspect-ratio: 21 / 9; background: var(--sage-wash);
  display: flex; align-items: center; justify-content: center;
}
.hub-card .thumb-doc svg { width: 56px; height: 56px; stroke: var(--sage-deep); }
.hub-card-body { padding: 24px 26px 28px; }
.hub-card h2 {
  font-family: var(--font-display); font-weight: 400; font-size: 22px; margin-bottom: 8px;
}
.hub-card p { color: var(--stone); font-size: 15px; margin-bottom: 14px; }
.hub-card .go { font-weight: 700; font-size: 14.5px; color: var(--sage-deep); }

.hub-links { font-size: 14.5px; color: var(--stone); text-align: center; }
.hub-links a { color: var(--sage-deep); }
.hub-foot {
  margin-top: auto; padding-top: 56px;
  font-size: 13px; color: var(--stone); text-align: center;
}

@media (max-width: 720px) { .hub-cards { grid-template-columns: 1fr; } }

/* CSS-only entrance */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(18px); animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
  .rise-1 { animation-delay: 0.05s; }
  .rise-2 { animation-delay: 0.15s; }
  .rise-3 { animation-delay: 0.25s; }
  .rise-4 { animation-delay: 0.38s; }
  .rise-5 { animation-delay: 0.5s; }
  .rise-6 { animation-delay: 0.62s; }
  @keyframes rise { to { opacity: 1; transform: translateY(0); } }
}

/* ---------- research doc ---------- */
.doc-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 242, 234, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
}
.doc-nav-inner {
  max-width: 880px; margin: 0 auto;
  display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap;
}
.doc-nav .wordmark {
  font-family: var(--font-display); font-size: 17px; color: var(--ink); text-decoration: none;
}
.doc-nav .crumbs { font-size: 13.5px; color: var(--stone); margin-left: auto; }
.doc-nav .crumbs a { color: var(--sage-deep); text-decoration: none; }
.doc-nav .crumbs a:hover { text-decoration: underline; }

.doc {
  max-width: 880px; margin: 0 auto; padding: 64px 24px 96px;
}
.doc-header { margin-bottom: 56px; }
.doc .eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 14px;
}
.doc h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.14; margin-bottom: 16px;
}
.doc-meta { color: var(--stone); font-size: 15px; }
.toc {
  margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px;
}
.toc a {
  font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--sage-deep);
  background: var(--sage-wash); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px;
  transition: background-color 0.18s ease;
}
.toc a:hover { background: #dde4d6; }

.doc h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2;
  margin: 64px 0 18px; padding-top: 18px; border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}
.doc h3 { font-size: 18px; margin: 30px 0 10px; }
.doc p { margin-bottom: 16px; }
.doc p, .doc li { color: #3d3a34; }
.doc ul, .doc ol { margin: 0 0 18px 22px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--ink); }

.callout {
  background: var(--sage-wash); border: 1px solid var(--line); border-left: 3px solid var(--sage-deep);
  border-radius: var(--radius); padding: 18px 22px; margin: 22px 0;
  font-size: 15.5px;
}
.callout.brass { border-left-color: var(--brass); background: #f3ede0; }

.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0;
}
.stat {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px;
}
.stat .n { font-family: var(--font-display); font-size: 26px; line-height: 1.2; color: var(--sage-deep); }
.stat .l { font-size: 13.5px; color: var(--stone); margin-top: 4px; }
@media (max-width: 680px) { .stat-grid { grid-template-columns: 1fr 1fr; } }

.tbl-wrap { overflow-x: auto; margin: 22px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; background: var(--cream); }
th, td { text-align: left; padding: 11px 14px; border: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--stone); background: var(--linen-deep); }

.src-list { font-size: 14px; }
.src-list li { margin-bottom: 6px; overflow-wrap: anywhere; }

.doc-foot {
  margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--stone);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---------- growth map (/next) ---------- */
.doc-wide { max-width: 1020px; }

.flow {
  margin: 0 0 56px; overflow-x: auto;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 22px 16px; box-shadow: var(--shadow);
}
.flow svg { width: 100%; min-width: 720px; height: auto; display: block; }
.flow figcaption {
  font-family: var(--font-accent); font-style: italic;
  font-size: 14.5px; color: var(--stone); padding: 14px 4px 4px; min-width: 720px;
}

.sys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.sys-card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 28px 22px; box-shadow: var(--shadow);
}
.sys-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sys-head svg { width: 28px; height: 28px; stroke: var(--brass); flex-shrink: 0; }
.doc .sys-card h2 {
  border: none; margin: 0; padding: 0;
  font-size: 21px;
}
.sys-card ul { margin: 14px 0 16px 20px; }
.sys-card li { font-size: 15px; }
.sys-card p { font-size: 15.5px; }
.sys-wire {
  border-top: 1px dashed var(--line); padding-top: 12px; margin-bottom: 0 !important;
  font-size: 14px !important; color: var(--stone) !important;
}
.sys-wire code { background: var(--linen); border-radius: 4px; padding: 1px 6px; font-size: 13px; }
.doc .phase-title { margin-top: 72px; }
@media (max-width: 780px) { .sys-grid { grid-template-columns: 1fr; } }

/* reveal gating for doc pages with JS animation */
.js .reveal, .js .reveal-item { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal-item { opacity: 1; }
}
