/* Prince · Bandit · Mage — storybook parchment theme */

:root {
  --parchment: #f7f2e8;
  --parchment-deep: #efe7d6;
  --card: #fdfaf3;
  --ink: #2b2418;
  --ink-soft: #6f6350;
  --gold: #a97e2c;
  --gold-soft: #c9a55e;
  --line: #ddd0b6;

  --prince: #5a4fae;
  --prince-deep: #3f3780;
  --prince-tint: #eceaf6;
  --crimson: #a03434;

  --bandit: #b05c2e;
  --bandit-deep: #7c3d1c;
  --bandit-tint: #f6ece0;
  --night: #2c3a55;

  --mage: #4e6b52;
  --mage-deep: #2f4a3e;
  --mage-tint: #e9f0e8;
  --violet: #4a3d6b;

  --font-display: "Cormorant Garamond", "Songti SC", Georgia, serif;
  --font-body: "EB Garamond", Georgia, "Songti SC", serif;
  --font-ui: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -100px, #fffdf6 0%, transparent 60%),
    var(--parchment);
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin: 0 auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 242, 232, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.35rem; letter-spacing: 0.02em;
  text-decoration: none; white-space: nowrap;
}
.brand .dot { color: var(--gold); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  font-family: var(--font-ui); font-size: 0.85rem; letter-spacing: 0.04em;
  text-decoration: none; color: var(--ink-soft);
}
.site-nav a:hover { color: var(--ink); }
/* the nav CTA is a .btn — keep its text white in every state */
.site-nav a.btn, .site-nav a.btn:hover { color: #ffffff; }
.site-nav a.nav-prince:hover { color: var(--prince); }
.site-nav a.nav-bandit:hover { color: var(--bandit); }
.site-nav a.nav-mage:hover { color: var(--mage); }

.btn {
  display: inline-block;
  font-family: var(--font-ui); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.02em; text-decoration: none; text-align: center;
  padding: 14px 30px; border-radius: 999px;
  border: 1px solid #171310;
  background: #1d1812;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(43, 36, 24, 0.18);
  cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover {
  transform: translateY(-1px); background: #2e261c;
  box-shadow: 0 8px 22px rgba(43, 36, 24, 0.3);
}
.btn.small { padding: 9px 20px; font-size: 0.82rem; }
.btn.ghost {
  background: transparent; color: var(--ink); border-color: #b9ab8e;
  box-shadow: none;
}
.btn.ghost:hover { background: #1d1812; color: #ffffff; border-color: #171310; }

/* ---------- hero ---------- */
.hero { padding: 96px 0 72px; text-align: center; }
.flourish {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--gold); margin-bottom: 28px;
}
.flourish::before, .flourish::after {
  content: ""; width: 72px; height: 1px; background: var(--gold-soft);
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.12;
}
.hero h1 .accent { color: var(--bandit); }
.hero .lede {
  max-width: 620px; margin: 26px auto 0;
  font-size: 1.2rem; color: var(--ink-soft);
}
.hero-links { margin-top: 26px; display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; }
.hero-links a { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; text-decoration-color: var(--gold-soft); text-underline-offset: 5px; }
.hero-links a.c-prince { color: var(--prince); }
.hero-links a.c-bandit { color: var(--bandit); }
.hero-links a.c-mage { color: var(--mage); }
.hero .cta { margin-top: 38px; }
.hero .meta {
  margin-top: 14px; font-family: var(--font-ui);
  font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.03em;
}

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section.tinted { background: var(--parchment-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title {
  font-family: var(--font-display); font-weight: 600; text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 48px;
  display: flex; align-items: center; justify-content: center; gap: 20px;
}
.section-title::before, .section-title::after {
  content: ""; width: 64px; height: 1px; background: var(--gold-soft); flex: none;
}

/* tarot card component */
.tarot {
  position: relative; display: block; width: 100%;
  container-type: inline-size;
  border-radius: 4.5% / 3%;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(43, 36, 24, 0.25);
}
.tarot img { width: 100%; height: auto; display: block; }
.tarot .banner-name {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: var(--by, 12.5%);
  width: 60%; text-align: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: 7.2cqw; line-height: 1; letter-spacing: 0.03em;
  color: #5a4326; text-shadow: 0 1px 0 rgba(255,250,235,0.5);
  pointer-events: none; margin: 0;
}
.tarot.t-card-prince { --by: 13.2%; }
.tarot.t-card-bandit { --by: 11.8%; }
.tarot.t-card-mage { --by: 13.0%; }

/* archetype cards */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.arch-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 36px 28px; text-align: center; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.arch-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(43, 36, 24, 0.12); }
.arch-card .tarot { margin-bottom: 22px; }
.arch-card:hover .tarot { box-shadow: 0 18px 40px rgba(43, 36, 24, 0.35); }
.arch-card h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.arch-card.t-prince h3 { color: var(--prince-deep); }
.arch-card.t-bandit h3 { color: var(--bandit-deep); }
.arch-card.t-mage h3 { color: var(--mage-deep); }
.arch-card .epithet {
  font-family: var(--font-ui); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); margin: 6px 0 14px;
}
.arch-card p { color: var(--ink-soft); font-size: 1.02rem; }
.arch-card .more { display: inline-block; margin-top: 16px; font-family: var(--font-ui); font-size: 0.82rem; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.step { text-align: center; padding: 0 12px; }
.step .num {
  width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 50%;
  border: 1.5px solid var(--gold); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
}
.step h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 1rem; }

/* prose blocks */
.prose h2 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; margin: 42px 0 16px; }
.prose h3 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; margin: 34px 0 12px; }
.prose p { margin-bottom: 18px; }
.prose ul { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 8px; }
.prose .note {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 10px; padding: 18px 22px; color: var(--ink-soft); font-size: 1.02rem;
}

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 24px; margin-bottom: 12px;
}
.faq summary {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
  cursor: pointer; list-style: none; position: relative; padding-right: 28px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 0; color: var(--gold); font-size: 1.3rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--ink-soft); }

/* CTA band */
.cta-band { text-align: center; padding: 80px 0; }
.cta-band h2 { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 600; margin-bottom: 26px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 56px; background: var(--parchment-deep); }
.site-footer .cols { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-footer .brand { font-size: 1.15rem; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { font-family: var(--font-ui); font-size: 0.85rem; color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .disclaimer { margin-top: 22px; font-family: var(--font-ui); font-size: 0.78rem; color: var(--ink-soft); max-width: 640px; line-height: 1.6; }

/* ---------- quiz ---------- */
.quiz-shell { max-width: 720px; margin: 0 auto; padding: 56px 24px 96px; }
.quiz-progress { margin-bottom: 34px; }
.quiz-progress .label {
  font-family: var(--font-ui); font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px;
  display: flex; justify-content: space-between;
}
.quiz-progress .bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.quiz-progress .fill { height: 100%; width: 0; background: var(--gold); border-radius: 2px; transition: width 0.25s ease; }

.quiz-question {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.3; margin-bottom: 32px;
}
.quiz-options { display: grid; gap: 14px; }
.quiz-option {
  display: flex; gap: 16px; align-items: flex-start; text-align: left;
  width: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px; cursor: pointer;
  font-family: var(--font-body); font-size: 1.1rem; line-height: 1.55; color: var(--ink);
  transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.quiz-option:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(43,36,24,0.08); }
.quiz-option .key {
  flex: none; width: 28px; height: 28px; margin-top: 2px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--ink-soft);
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.quiz-option:hover .key { border-color: var(--gold); color: var(--gold); }
.quiz-foot {
  margin-top: 30px; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-ui); font-size: 0.82rem; color: var(--ink-soft);
}
.quiz-back { background: none; border: none; cursor: pointer; font: inherit; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.quiz-back:disabled { opacity: 0.35; cursor: default; text-decoration: none; }

/* result */
.result { text-align: center; }
.result .reveal-label {
  font-family: var(--font-ui); font-size: 0.8rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.result h2 { font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 600; line-height: 1.1; }
.result .epithet { font-family: var(--font-display); font-size: 1.25rem; font-style: italic; color: var(--ink-soft); margin-top: 10px; }
.result .emblem { width: 190px; height: 190px; margin: 30px auto; }
.result .tarot { max-width: 350px; margin: 28px auto; }
@keyframes card-reveal {
  from { opacity: 0; transform: translateY(18px) rotateY(70deg); }
  to { opacity: 1; transform: translateY(0) rotateY(0); }
}
.result .tarot { animation: card-reveal 0.8s ease-out; }
.result .quote {
  font-family: var(--font-display); font-style: italic; font-size: 1.3rem;
  max-width: 560px; margin: 0 auto 28px; line-height: 1.5;
}
.result .reading { text-align: left; max-width: 620px; margin: 0 auto 30px; color: var(--ink); }
.result .reading p { margin-bottom: 14px; }

.mix { max-width: 480px; margin: 0 auto 34px; text-align: left; }
.mix h3 {
  font-family: var(--font-ui); font-size: 0.8rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 14px; text-align: center;
}
.mix .row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mix .name { font-family: var(--font-display); font-weight: 700; width: 92px; flex: none; font-size: 1.02rem; }
.mix .track { flex: 1; height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.mix .fill { height: 100%; border-radius: 5px; width: 0; transition: width 0.7s ease; }
.mix .pct { font-family: var(--font-ui); font-size: 0.82rem; color: var(--ink-soft); width: 44px; text-align: right; flex: none; }
.mix .r-prince .fill { background: var(--prince); }
.mix .r-bandit .fill { background: var(--bandit); }
.mix .r-mage .fill { background: var(--mage); }

/* your sound — link out to the official MV */
.sound-card {
  display: flex; align-items: center; gap: 16px;
  max-width: 480px; margin: 0 auto 34px;
  background: #1d1812; color: #fffaf0;
  border-radius: 16px; padding: 16px 22px;
  text-decoration: none; text-align: left;
  box-shadow: 0 8px 24px rgba(43, 36, 24, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sound-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(43, 36, 24, 0.35); }
.sound-card .play {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: #a97e2c; display: flex; align-items: center; justify-content: center;
}
.sound-card .play svg { width: 16px; height: 16px; fill: #fffaf0; margin-left: 2px; }
.sound-card .kicker-s {
  font-family: var(--font-ui); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: #c9a55e;
  display: block; margin-bottom: 3px;
}
.sound-card .title-s {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1.3;
}
.sound-card .title-s span { color: #c9a55e; font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600; }

.undercurrent {
  max-width: 620px; margin: 0 auto 34px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 12px; padding: 22px 26px;
}
.undercurrent .uc-label {
  font-family: var(--font-ui); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 10px;
}
.undercurrent .uc-text { color: var(--ink); font-size: 1.05rem; }

.share-card-wrap { margin: 8px auto 26px; max-width: 420px; }
.share-card-wrap canvas {
  width: 100%; height: auto; border-radius: 16px;
  border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(43,36,24,0.18);
}
.result-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.share-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.share-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600;
  color: var(--ink-soft); text-decoration: none; cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.share-pill svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.share-pill:hover { border-color: var(--gold); color: #8a6520; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(43,36,24,0.1); }
.share-pill.sp-x:hover { color: #000; border-color: #000; }
.share-pill.sp-reddit:hover { color: #ff4500; border-color: #ff4500; }
.share-pill.sp-tumblr:hover { color: #36465d; border-color: #36465d; }
.share-pill.sp-wa:hover { color: #1da851; border-color: #1da851; }
.share-pill.sp-fb:hover { color: #1877f2; border-color: #1877f2; }
.share-hint { font-family: var(--font-ui); font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 0; }

/* share modal */
.share-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.share-backdrop {
  position: absolute; inset: 0;
  background: rgba(43, 36, 24, 0.5);
  backdrop-filter: blur(3px);
}
.share-panel {
  position: relative; background: var(--card);
  border: 1px solid var(--line); border-radius: 22px;
  padding: 34px 34px 26px; max-width: 500px; width: calc(100% - 44px);
  max-height: calc(100vh - 48px); overflow-y: auto;
  box-shadow: 0 28px 70px rgba(43, 36, 24, 0.4);
  text-align: center;
  animation: modal-in 0.22s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.share-panel h3 {
  font-family: var(--font-display); font-size: 1.55rem; font-weight: 700;
  margin-bottom: 18px;
}
.share-panel .share-card-wrap { max-width: 250px; margin: 0 auto 20px; }
.share-panel .share-row { margin-bottom: 16px; }
.share-close {
  position: absolute; top: 12px; right: 18px;
  background: none; border: none; cursor: pointer;
  font-size: 1.7rem; line-height: 1; color: var(--ink-soft);
}
.share-close:hover { color: var(--ink); }
.result-links { font-family: var(--font-ui); font-size: 0.88rem; color: var(--ink-soft); }
.result-links a { color: var(--ink); }

.hidden { display: none !important; }

/* ---------- archetype pages ---------- */
.arch-hero { text-align: center; padding: 80px 0 56px; }
.arch-hero .emblem { width: 200px; height: 200px; margin: 0 auto 30px; }
.arch-hero .tarot { max-width: 340px; margin: 0 auto 34px; }
.arch-hero .kicker {
  font-family: var(--font-ui); font-size: 0.8rem; letter-spacing: 0.16em;
  text-transform: uppercase; margin-bottom: 12px;
}
.arch-hero h1 { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 600; line-height: 1.1; }
.arch-hero .epithet { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--ink-soft); margin-top: 12px; }
.arch-hero .quote {
  font-family: var(--font-display); font-style: italic; font-size: 1.35rem;
  max-width: 600px; margin: 30px auto 0; line-height: 1.5;
}
.arch-hero .stats {
  margin-top: 26px; display: flex; justify-content: center; gap: 30px; flex-wrap: wrap;
  font-family: var(--font-ui); font-size: 0.85rem; color: var(--ink-soft);
}
.arch-hero .stats strong { color: var(--ink); }

.page-prince .arch-hero .kicker { color: var(--prince); }
.page-bandit .arch-hero .kicker { color: var(--bandit); }
.page-mage .arch-hero .kicker { color: var(--mage); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 30px 30px 24px; }
.panel h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-bottom: 14px; }
.panel ul { margin-left: 20px; }
.panel li { margin-bottom: 10px; color: var(--ink-soft); }
.panel li strong { color: var(--ink); }

.pairings { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pairing { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.pairing h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.pairing p { color: var(--ink-soft); font-size: 1.02rem; }

.kindred { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.kindred-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; text-align: center; }
.kindred-card img {
  width: 132px; height: 132px; border-radius: 50%;
  margin: 0 auto 16px; object-fit: cover;
  border: 2px solid var(--gold-soft);
  box-shadow: 0 6px 18px rgba(43, 36, 24, 0.16);
}
.kindred-card .years { font-family: var(--font-ui); font-size: 0.78rem; color: var(--gold); letter-spacing: 0.06em; }
.kindred-card h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin: 6px 0 10px; }
.kindred-card p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .site-nav .nav-link { display: none; }
  .trio, .steps, .kindred { grid-template-columns: 1fr; }
  .two-col, .pairings { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 52px; }
  .section { padding: 52px 0; }
}
