:root {
  color-scheme: light;
  --navy-950: #04111f;
  --navy-900: #071a2f;
  --navy-800: #0b2946;
  --navy-700: #123d62;
  --gold-500: #d6aa58;
  --gold-400: #e8c87d;
  --gold-300: #f1daa1;
  --ivory: #faf7ef;
  --paper: #f4efe4;
  --ink: #12263a;
  --muted: #657484;
  --line: rgba(14, 45, 73, 0.13);
  --shadow: 0 24px 70px rgba(4, 17, 31, 0.13);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}
.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;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 15px;
  transform: translateY(-150%);
  background: white;
  color: var(--navy-900);
  border-radius: 5px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(24px, 5vw, 76px);
  color: white;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}
.wordmark span:last-child { display: grid; line-height: 1; }
.wordmark strong { font-family: var(--serif); font-size: 19px; letter-spacing: .12em; }
.wordmark small { margin-top: 6px; font-size: 10px; letter-spacing: .22em; opacity: .74; }
.wordmark-mark {
  position: relative;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 200, 125, .55);
  border-radius: 50%;
}
.wordmark-mark::before,
.wordmark-mark::after,
.wordmark-mark i::before,
.wordmark-mark i::after {
  content: "";
  position: absolute;
  inset: 7px 16px;
  background: var(--gold-400);
}
.wordmark-mark::after { transform: rotate(90deg); }
.wordmark-mark i::before { transform: rotate(45deg); }
.wordmark-mark i::after { transform: rotate(-45deg); }
.header-label {
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 99px;
  color: rgba(255,255,255,.65);
  font-size: 13px;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 720px;
  height: min(88vh, 840px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr);
  align-items: center;
  gap: 4vw;
  overflow: hidden;
  padding: 130px clamp(24px, 8vw, 128px) 90px;
  background:
    radial-gradient(circle at 78% 42%, rgba(232, 200, 125, .13), transparent 33%),
    linear-gradient(125deg, var(--navy-950), var(--navy-900) 60%, #0b2c4b);
  color: white;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg width='92' height='92' viewBox='0 0 92 92' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23fff' stroke-width='.5'%3E%3Ccircle cx='46' cy='46' r='1'/%3E%3Cpath d='M46 0v30M46 62v30M0 46h30M62 46h30M13.5 13.5l21 21M57.5 57.5l21 21M78.5 13.5l-21 21M34.5 57.5l-21 21'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-light {
  position: absolute;
  right: -10vw;
  top: -35vw;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,245,200,.4), rgba(232,200,125,.08) 25%, transparent 62%);
  filter: blur(5px);
}
.hero-copy { position: relative; z-index: 2; max-width: 740px; }
.eyebrow {
  margin: 0 0 20px;
  color: var(--gold-400);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.eyebrow.gold { color: #a97727; }
.hero h1 {
  margin: 0;
  max-width: 800px;
  font-family: var(--serif);
  font-size: clamp(60px, 7.4vw, 108px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .82;
}
.hero h1 em { color: var(--gold-300); font-weight: 500; }
.hero-intro {
  max-width: 640px;
  margin: 34px 0 32px;
  color: rgba(255,255,255,.72);
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.42;
}
.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 16px 21px;
  border-radius: 4px;
  background: var(--gold-400);
  color: var(--navy-950);
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  transition: transform .2s, background .2s;
}
.primary-action:hover { transform: translateY(-2px); background: #f4dda4; }
.primary-action span { font-size: 20px; }
.hero-note { margin-top: 20px; color: rgba(255,255,255,.62); font-size: 14px; letter-spacing: .03em; }

.hero-orbit {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: min(37vw, 500px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.orbit { position: absolute; border: 1px solid rgba(232,200,125,.22); border-radius: 50%; }
.orbit::before { content: ""; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-400); box-shadow: 0 0 18px var(--gold-300); }
.orbit-one { inset: 8%; animation: turn 32s linear infinite; }
.orbit-two { inset: 23%; animation: turn 24s linear infinite reverse; }
.orbit-three { inset: 37%; animation: turn 18s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.core {
  width: 115px;
  height: 115px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(232,200,125,.8);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,200,125,.2), rgba(7,26,47,.9) 68%);
  box-shadow: 0 0 80px rgba(232,200,125,.18);
  text-align: center;
}
.core b { color: var(--gold-300); font-family: var(--serif); font-size: 38px; line-height: .8; }
.core small { margin-top: 8px; color: rgba(255,255,255,.76); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.orbit-word { position: absolute; color: rgba(255,255,255,.45); font-family: var(--serif); font-size: 17px; font-style: italic; }
.word-one { top: 2%; left: 39%; }
.word-two { right: 2%; bottom: 30%; }
.word-three { bottom: 5%; left: 12%; }

.explorer, .connections { padding: 105px clamp(24px, 7vw, 110px); }
.section-heading { display: grid; grid-template-columns: 1.3fr .7fr; gap: 8vw; align-items: end; }
.section-heading h2 {
  max-width: 850px;
  margin: 0;
  color: var(--navy-900);
  font-family: var(--serif);
  font-size: clamp(43px, 5vw, 67px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: .96;
}
.section-heading > p { margin: 0; color: #526576; font-size: 17px; line-height: 1.65; }
.controls { display: flex; gap: 16px; justify-content: space-between; margin-top: 58px; }
.search-box {
  width: min(100%, 480px);
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}
.search-box > span:first-child { color: var(--gold-500); font-family: var(--serif); font-size: 28px; transform: rotate(-20deg); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.search-box kbd { padding: 2px 7px; border: 1px solid var(--line); border-radius: 3px; color: #8794a0; font-size: 11px; box-shadow: none; }
.view-toggle { display: flex; align-items: center; padding: 4px; border: 1px solid var(--line); border-radius: 5px; background: #ebe5d8; }
.view-button { height: 42px; padding: 0 18px; border: 0; border-radius: 3px; background: transparent; color: #576978; cursor: pointer; font-size: 14px; font-weight: 600; }
.view-button.active { background: white; color: var(--navy-900); box-shadow: 0 2px 10px rgba(4,17,31,.08); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.filter-chip {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: #546575;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: .2s;
}
.filter-chip:hover { border-color: rgba(169,119,39,.5); color: #8d6422; }
.filter-chip.active { border-color: var(--navy-900); background: var(--navy-900); color: white; }
.results-meta { min-height: 44px; display: flex; align-items: center; justify-content: space-between; margin-top: 22px; border-top: 1px solid var(--line); color: #637481; font-size: 14px; }
#clear-filters { border: 0; background: transparent; color: #875e1c; cursor: pointer; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.framework-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.idea-card {
  position: relative;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,255,255,.76);
  text-align: left;
  cursor: pointer;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.idea-card::after {
  content: "";
  position: absolute;
  right: -35px;
  top: -35px;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(214,170,88,.17);
  border-radius: 50%;
  box-shadow: 0 0 0 14px rgba(214,170,88,.035), 0 0 0 28px rgba(214,170,88,.025);
}
.idea-card:hover { transform: translateY(-5px); border-color: rgba(169,119,39,.35); box-shadow: var(--shadow); }
.idea-top { display: flex; justify-content: space-between; align-items: center; }
.idea-number { color: #b68738; font-family: var(--serif); font-size: 18px; font-weight: 700; }
.idea-doctrine { color: #687985; font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.idea-card h3 { margin: 44px 0 13px; color: var(--navy-900); font-family: var(--serif); font-size: 31px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.idea-card p { margin: 0 0 25px; color: #526575; font-size: 16px; line-height: 1.6; }
.idea-footer { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-top: auto; }
.idea-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.idea-tag { padding: 5px 8px; border-radius: 3px; background: var(--paper); color: #586b7b; font-size: 12px; }
.idea-open { color: #a97727; font-size: 18px; }
.empty-state { padding: 80px 20px; text-align: center; color: var(--muted); }
.empty-state span { color: var(--gold-500); font-size: 38px; }
.empty-state h3 { margin: 12px 0 5px; color: var(--navy-900); font-family: var(--serif); font-size: 28px; }

.connections { padding-top: 95px; background: #ece7dc; }
.section-heading.compact h2 { font-size: clamp(41px, 4.4vw, 58px); }
.theme-map { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 62px; }
.theme-node {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(7,26,47,.12);
  border-radius: 50%;
  background: rgba(250,247,239,.55);
  color: var(--navy-800);
  cursor: pointer;
  font-family: var(--serif);
  font-size: clamp(16px, 1.8vw, 25px);
  font-weight: 600;
  transition: .22s;
}
.theme-node::after { content: attr(data-count); position: absolute; right: 4%; top: 4%; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--ivory); color: #9b7028; font-family: var(--sans); font-size: 9px; }
.theme-node:hover, .theme-node.active { transform: translateY(-4px); border-color: var(--gold-500); background: var(--navy-900); color: white; box-shadow: 0 12px 28px rgba(4,17,31,.15); }
.connection-line { height: 1px; margin: 28px auto 0; overflow: hidden; background: rgba(7,26,47,.08); }
.connection-line span { display: block; width: 18%; height: 100%; background: var(--gold-500); animation: traverse 6s ease-in-out infinite alternate; }
@keyframes traverse { to { transform: translateX(455%); } }
.theme-description { max-width: 780px; margin: 25px auto 0; color: #596978; font-family: var(--serif); font-size: 21px; line-height: 1.55; text-align: center; }
.theme-description strong { color: var(--navy-900); }

footer { display: flex; justify-content: space-between; align-items: end; gap: 40px; padding: 54px clamp(24px, 7vw, 110px); background: var(--navy-950); color: rgba(255,255,255,.55); }
.footer-mark { color: var(--gold-300); font-family: var(--serif); font-size: 26px; text-decoration: none; }
footer p { max-width: 580px; margin: 8px 0 0; font-size: 14px; line-height: 1.65; }
.scripture-note { max-width: 350px; text-align: right; }

.detail-dialog {
  width: min(660px, calc(100% - 28px));
  max-height: min(860px, calc(100vh - 28px));
  margin: auto 0 auto auto;
  padding: 0;
  border: 0;
  border-radius: 7px 0 0 7px;
  background: var(--ivory);
  color: var(--ink);
  box-shadow: -20px 0 70px rgba(0,0,0,.25);
}
.detail-dialog[open] { animation: slide-in .28s ease-out; }
.detail-dialog::backdrop { background: rgba(3,13,24,.68); backdrop-filter: blur(5px); }
@keyframes slide-in { from { transform: translateX(70px); opacity: .4; } }
.dialog-shell { min-height: 100%; padding: clamp(28px, 6vw, 62px); }
.dialog-close { position: absolute; right: 24px; top: 19px; width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--navy-900); cursor: pointer; font-size: 24px; line-height: 1; }
.dialog-number { color: rgba(169,119,39,.18); font-family: var(--serif); font-size: 82px; font-weight: 700; line-height: .8; }
#detail-doctrine { margin: 30px 0 11px; }
.detail-dialog h2 { margin: 0; color: var(--navy-900); font-family: var(--serif); font-size: clamp(42px, 7vw, 60px); font-weight: 600; letter-spacing: -.035em; line-height: .95; }
.detail-summary { margin: 22px 0 25px; color: #566777; font-family: var(--serif); font-size: 21px; line-height: 1.48; }
.detail-callout { padding: 17px 19px; border-left: 2px solid var(--gold-500); background: #eee8dc; }
.detail-callout span, .detail-section h3 { color: #885e1c; font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.detail-callout p { margin: 7px 0 0; font-size: 16px; line-height: 1.6; }
.detail-section { margin-top: 28px; }
.detail-section h3 { margin: 0 0 12px; }
.scripture-list, .related-list { display: flex; flex-wrap: wrap; gap: 8px; }
.scripture-link, .related-button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--navy-800); font-size: 14px; text-decoration: none; }
.scripture-link:hover, .related-button:hover { border-color: var(--gold-500); }
.scripture-link small { padding: 3px 5px; border-radius: 2px; background: var(--paper); color: #8b6322; font-size: 10px; font-weight: 700; }
.related-button { cursor: pointer; text-align: left; }
.related-button span { color: #ac7a2a; }
.article-list { display: grid; gap: 8px; }
.article-link {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid rgba(169,119,39,.25);
  border-radius: 4px;
  background: linear-gradient(110deg, #f1eadb, #fffdf8);
  color: var(--navy-900);
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.article-link:hover { transform: translateX(3px); border-color: var(--gold-500); }
.article-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--navy-900); color: var(--gold-300); font-family: var(--serif); font-size: 17px; }
.article-copy { display: grid; gap: 2px; }
.article-copy strong { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.05; }
.article-copy small { color: #687783; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.article-arrow { color: #a97727; font-size: 18px; }
.dialog-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.dialog-nav button { border: 0; background: transparent; color: var(--navy-800); cursor: pointer; font-size: 14px; }
.dialog-nav button:last-child { text-align: right; }
.dialog-nav span { color: #6f7d88; font-size: 12px; }

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; min-height: 760px; height: auto; padding-top: 150px; }
  .hero-copy { max-width: 720px; }
  .hero-orbit { position: absolute; right: -100px; bottom: -170px; width: 470px; opacity: .7; }
  .framework-grid { grid-template-columns: repeat(2, 1fr); }
  .theme-map { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .site-header { padding: 20px; }
  .header-label { display: none; }
  .hero { min-height: 690px; padding: 138px 24px 80px; }
  .hero h1 { font-size: clamp(54px, 17vw, 76px); }
  .hero-intro { font-size: 20px; }
  .hero-orbit { right: -160px; bottom: -210px; width: 430px; opacity: .5; }
  .explorer, .connections { padding: 72px 20px; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .controls { flex-direction: column; }
  .search-box { width: 100%; }
  .view-toggle { width: 100%; }
  .view-button { flex: 1; }
  .framework-grid { grid-template-columns: 1fr; }
  .idea-card { min-height: 250px; }
  .idea-card h3 { margin-top: 34px; }
  .theme-map { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .theme-node { font-size: 18px; }
  footer { align-items: start; flex-direction: column; }
  .scripture-note { text-align: left; }
  .detail-dialog { max-height: calc(100vh - 14px); width: calc(100% - 8px); border-radius: 7px 0 0 7px; }
  .dialog-shell { padding: 48px 24px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
