/* ─────────────────────────────────────────────────────────────
   SeedTree — the Guides modal
   Opens when a visitor clicks one of the five guide cards on
   /explore.html. Shows the guide's voice + entry question; click
   an answer to reveal a curated set of platform recommendations.
   ───────────────────────────────────────────────────────────── */

/* === Persona cards become clickable on explore.html ========= */
.persona-card[data-guide] {
  cursor: pointer;
  transition: background .25s var(--ease-organic),
              border-color .25s,
              transform .25s;
}
.persona-card[data-guide]:hover {
  background: rgba(25, 54, 42, 0.65);
  border-color: var(--gold);
  transform: translateY(-3px);
  opacity: 1;
}
.persona-card[data-guide]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* === Modal shell ============================================ */
.guide-modal {
  position: fixed; inset: 0; z-index: 100;
  display: none;
}
.guide-modal.is-open { display: block; }

.guide-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(7, 20, 14, 0.78);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 320ms var(--ease-organic);
}
.guide-modal.is-open .guide-modal-backdrop { opacity: 1; }

.guide-modal-panel {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100svh - 64px);
  overflow-y: auto;
  background: rgba(13, 31, 23, 0.94);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 169, 97, 0.35);
  border-radius: 18px;
  padding: 30px 34px 28px;
  color: var(--cream);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 320ms var(--ease-organic),
              transform 320ms var(--ease-organic);
}
.guide-modal.is-open .guide-modal-panel {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.guide-modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px;
  background: rgba(7, 20, 14, 0.5);
  border: 1px solid rgba(201, 169, 97, 0.22);
  border-radius: 50%;
  color: rgba(236, 231, 216, 0.7);
  font-size: 1.3rem; line-height: 1;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.guide-modal-close:hover {
  color: var(--cream);
  border-color: rgba(201, 169, 97, 0.55);
  background: rgba(7, 20, 14, 0.78);
}

/* === Head — glyph, name, sub =============================== */
.guide-modal-head {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 14px;
}
.guide-glyph {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(201, 169, 97, 0.45);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 1.9rem;
  background: rgba(201, 169, 97, 0.08);
  box-shadow: inset 0 0 18px rgba(201, 169, 97, 0.18);
}
.guide-headtext { min-width: 0; flex: 1 1 auto; }
.guide-eyebrow {
  font: 0.66rem var(--font-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(236, 231, 216, 0.55);
}
.guide-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  color: var(--cream);
  margin: 4px 0 2px;
  line-height: 1.1;
}
.guide-sub {
  font: italic 0.95rem var(--font-display);
  color: var(--gold-light);
}

/* === Intro ================================================= */
.guide-intro {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(236, 231, 216, 0.88);
  margin: 14px 0 20px;
}

/* === Question + answer options ============================= */
.guide-question { margin-top: 18px; }
.guide-q-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--cream);
  margin: 0 0 14px;
}
.guide-q-options {
  display: grid; gap: 10px;
}
.guide-q-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  background: rgba(7, 20, 14, 0.55);
  border: 1px solid rgba(201, 169, 97, 0.28);
  border-radius: 12px;
  color: var(--cream);
  font: 0.95rem var(--font-display);
  cursor: pointer;
  transition: background .2s var(--ease-organic),
              border-color .2s,
              transform .2s;
}
.guide-q-option:hover {
  background: rgba(25, 54, 42, 0.72);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.guide-q-option:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* === Ending — closing line + recommendation cards ========== */
.guide-ending { margin-top: 8px; }
.guide-closing {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--gold-light);
  margin: 6px 0 22px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}
.guide-cards {
  display: grid; gap: 10px;
}
.guide-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  align-items: center;
  padding: 16px 20px;
  background: rgba(7, 20, 14, 0.55);
  border: 1px solid rgba(201, 169, 97, 0.28);
  border-radius: 12px;
  text-decoration: none;
  color: var(--cream);
  transition: background .25s var(--ease-organic),
              border-color .25s,
              transform .2s;
}
.guide-card:hover {
  background: rgba(25, 54, 42, 0.78);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.guide-card-title {
  font-family: var(--font-display);
  font-size: 1.04rem;
  color: var(--cream);
  grid-column: 1;
}
.guide-card-sub {
  font: italic 0.86rem var(--font-display);
  color: rgba(236, 231, 216, 0.7);
  grid-column: 1;
}
.guide-card-arrow {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  font: 1.1rem var(--font-display);
  color: var(--gold-light);
  transition: transform .2s var(--ease-organic);
}
.guide-card:hover .guide-card-arrow {
  transform: translateX(4px);
  color: var(--cream);
}

.guide-restart {
  display: inline-block;
  margin-top: 22px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid rgba(201, 169, 97, 0.32);
  border-radius: 999px;
  color: rgba(236, 231, 216, 0.7);
  font: italic 0.88rem var(--font-display);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.guide-restart:hover {
  color: var(--cream);
  border-color: var(--gold);
  background: rgba(7, 20, 14, 0.4);
}

@media (max-width: 540px) {
  .guide-modal-panel { padding: 22px 20px 20px; }
  .guide-modal-head { gap: 12px; }
  .guide-glyph { width: 50px; height: 50px; font-size: 1.5rem; }
  .guide-name { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-modal-panel,
  .guide-modal-backdrop,
  .guide-q-option,
  .guide-card,
  .guide-card-arrow { transition: none; }
}
