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

:root {
  --bg: #120e07;
  --bg2: #1c150a;
  --panel: #221a0d;
  --panel2: #2c2211;
  --gold: #e0b24a;
  --gold-bright: #ffe9a8;
  --gold-dim: #9a7a2e;
  --ink: #eadcc0;
  --ink-dim: #b7a482;
  --edge: #4a3a18;
  --stone: #38301f;
}

html, body { height: 100%; }

body {
  font-family: 'Cormorant Garamond', serif;
  background:
    radial-gradient(ellipse at 50% -10%, #2a2010 0%, var(--bg) 55%),
    var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.5;
}

.starfield {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,230,160,.6), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,230,160,.4), transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,230,160,.5), transparent),
    radial-gradient(1px 1px at 85% 20%, rgba(255,230,160,.35), transparent),
    radial-gradient(1px 1px at 10% 70%, rgba(255,230,160,.4), transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .4; } to { opacity: .9; } }

.temple {
  position: relative; z-index: 1;
  max-width: 62rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* ── HEADER ── */
.apex { text-align: center; margin-bottom: 3rem; }
.eye-svg { width: 11rem; height: auto; filter: drop-shadow(0 0 18px rgba(224,178,74,.35)); }
.apex-eye { animation: gaze 5s ease-in-out infinite; transform-origin: 100px 128px; }
@keyframes gaze { 0%,90%,100% { transform: scaleY(1);} 94% { transform: scaleY(.08);} }

.title {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.6rem);
  letter-spacing: .04em;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold), var(--gold-dim));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: .6rem;
}
.subtitle {
  font-style: italic; color: var(--ink-dim);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  margin-top: .3rem;
}
.divider { color: var(--gold-dim); letter-spacing: .5em; margin: 1.2rem 0; font-size: 1.1rem; }

/* ── SECTION HEADS ── */
.section-head {
  font-family: 'Cinzel', serif;
  color: var(--gold-bright);
  font-size: clamp(1.3rem, 3.5vw, 1.9rem);
  text-align: center;
  margin-bottom: .4rem;
}
.section-sub {
  text-align: center; color: var(--ink-dim);
  font-style: italic; max-width: 42rem; margin: 0 auto 1.8rem;
  font-size: 1.1rem;
}

/* ── POOBAH ── */
.poobah-shrine {
  display: flex; flex-wrap: wrap; gap: 2rem;
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--edge);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 3.5rem;
  box-shadow: 0 0 40px rgba(0,0,0,.5), inset 0 0 30px rgba(224,178,74,.06);
}
.poobah-portrait { position: relative; width: 12rem; height: 13rem; flex: 0 0 auto; }
.poobah-halo {
  position: absolute; inset: -.5rem 1rem auto 1rem; top: -.5rem;
  height: 12rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,220,120,.35), transparent 65%);
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{ transform: scale(1); opacity:.7;} 50%{ transform: scale(1.08); opacity:1;} }
.poobah-face {
  position: absolute; left: 50%; top: 1.5rem;
  transform: translateX(-50%);
  width: 8rem; height: 8rem; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #f5d8b0, #d9a878);
  border: 3px solid var(--gold);
  box-shadow: 0 0 24px rgba(224,178,74,.4);
}
.poobah-hat { position: absolute; top: -2.4rem; left: 50%; transform: translateX(-50%); font-size: 3.2rem; }
.poobah-monocle { position: absolute; top: 2.4rem; left: 3.7rem; font-size: 2.6rem; }
.poobah-tache {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 3.4rem; height: .8rem;
  background: #4a3520; border-radius: 0 0 40% 40% / 0 0 100% 100%;
}
.poobah-plaque {
  position: absolute; bottom: -.2rem; left: 50%; transform: translateX(-50%);
  font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: .3em;
  color: var(--gold-bright);
  background: #1a1206; border: 1px solid var(--gold-dim);
  padding: .2rem .9rem; border-radius: .3rem;
}
.poobah-text { flex: 1 1 18rem; min-width: 16rem; }
.poobah-rank {
  font-family: 'Cinzel', serif; color: var(--gold);
  text-transform: uppercase; letter-spacing: .2em; font-size: .8rem;
}
.poobah-text h2 { font-family: 'Cinzel', serif; font-size: 2.6rem; color: var(--gold-bright); line-height: 1; }
.poobah-origin { color: var(--ink-dim); font-style: italic; margin-bottom: .8rem; }
blockquote {
  border-left: 3px solid var(--gold-dim);
  padding: .4rem 0 .4rem 1rem; margin: .8rem 0 1.2rem;
  font-size: 1.25rem; font-style: italic; color: var(--ink);
  min-height: 3.2rem;
}

/* ── BUTTONS ── */
.btn {
  font-family: 'Cinzel', serif;
  cursor: pointer; border: 1px solid var(--gold);
  background: linear-gradient(180deg, #3a2c11, #241a09);
  color: var(--gold-bright);
  padding: .7rem 1.4rem; border-radius: .5rem;
  font-size: 1rem; letter-spacing: .05em;
  transition: transform .12s, box-shadow .2s, background .2s;
}
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(224,178,74,.3);
  background: linear-gradient(180deg, #4a3814, #2c2010);
}
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── PANTHEON GRID ── */
.pantheon { margin-bottom: 3.5rem; }
.pyramid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem;
}
.pyr-card {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--edge);
  border-radius: .8rem;
  padding: 1.2rem 1rem;
  text-align: center; cursor: pointer;
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.pyr-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 22px rgba(0,0,0,.5), 0 0 18px rgba(224,178,74,.2);
}
.pyr-icon { font-size: 2.6rem; display: block; margin-bottom: .4rem; }
.pyr-name { font-family: 'Cinzel', serif; color: var(--gold-bright); font-size: 1.05rem; }
.pyr-tag { color: var(--ink-dim); font-style: italic; font-size: .95rem; margin-top: .2rem; }
.pyr-card.revealed .pyr-blessing {
  display: block; margin-top: .6rem; color: var(--ink);
  font-size: .95rem; border-top: 1px solid var(--edge); padding-top: .5rem;
}
.pyr-blessing { display: none; }

/* ── SCHEME ── */
.scheme { margin-bottom: 3.5rem; }
.scheme-body {
  display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-start;
  justify-content: center;
}
.scheme-pyramid {
  flex: 1 1 18rem; min-width: 15rem;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: 1rem 0;
}
.scheme-row {
  display: flex; gap: .3rem; justify-content: center;
}
.scheme-brick {
  width: 1.4rem; height: 1.4rem; border-radius: .2rem;
  background: linear-gradient(160deg, #d9a878, #8a5f16);
  border: 1px solid #4a340c;
  animation: brickIn .4s ease;
}
.scheme-brick.apex-brick {
  background: linear-gradient(160deg, var(--gold-bright), var(--gold));
  box-shadow: 0 0 12px rgba(255,220,120,.6);
}
@keyframes brickIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.scheme-panel {
  flex: 1 1 16rem; min-width: 15rem;
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--edge); border-radius: .8rem;
  padding: 1.4rem;
}
.scheme-stat {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .5rem 0; border-bottom: 1px dashed var(--edge);
}
.stat-label { color: var(--ink-dim); }
.stat-value { font-family: 'Cinzel', serif; color: var(--gold-bright); font-size: 1.2rem; }
.scheme-panel .btn { display: block; width: 100%; margin-top: 1rem; }
.scheme-fineprint { color: var(--gold-dim); font-size: .85rem; font-style: italic; margin-top: 1rem; text-align: center; }

/* ── CREED ── */
.creed { margin-bottom: 3rem; }
.creed-list {
  max-width: 44rem; margin: 0 auto; list-style: none; counter-reset: creed;
}
.creed-list li {
  counter-increment: creed;
  position: relative; padding: .8rem 1rem .8rem 3.2rem;
  border-bottom: 1px solid var(--edge);
  font-size: 1.15rem;
}
.creed-list li::before {
  content: counter(creed);
  position: absolute; left: 0; top: .7rem;
  font-family: 'Cinzel', serif; color: var(--gold);
  width: 2.4rem; text-align: center;
  border: 1px solid var(--gold-dim); border-radius: 50%;
  padding: .15rem 0;
}

.temple-foot { text-align: center; color: var(--ink-dim); font-style: italic; }
.temple-foot strong { color: var(--gold); }

@media (max-width: 40rem) {
  .poobah-shrine { flex-direction: column; text-align: center; }
  blockquote { border-left: none; border-top: 3px solid var(--gold-dim); padding: .8rem 0 0; }
}
