/* =====================================================================
   Farever Wiki — Shared Design System (wizardalchemy.org inspired)
   Applied via <link rel="stylesheet" href="/assets/wiki-theme.css">
   ===================================================================== */

/* ── Design Tokens ── */
:root {
  --bg: #07091a !important;
  --panel: #0d1030;
  --panel-2: #111440;
  --text: #eef0ff !important;
  --muted: #8891c0 !important;
  --muted-2: #5a6380;
  --line: rgba(160,140,255,.13) !important;
  --gold: #e8c56a;
  --gold-dim: #b8963a;
  --gold-glow: rgba(232,197,106,.18);
  --arcane: #9f84ff;
  --teal: #4cd9f0;
  --accent: #9f84ff !important;
  --accent2: #4cd9f0 !important;
  --green: #43d996;
  --yellow: #f5c842;
  --red: #f47499;
  --radius: 20px !important;
  --shadow: 0 24px 60px rgba(0,0,0,.5) !important;
  --max: 1200px !important;
  --card: #0d1030 !important;
  --font-display: 'Cinzel', serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body) !important;
  background-color: #07091a !important;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(120,80,220,.28), transparent),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(76,217,240,.1), transparent),
    radial-gradient(ellipse 60% 60% at 0% 70%, rgba(100,60,200,.08), transparent) !important;
  color: #eef0ff !important;
}

/* ── Stars ── */
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.star {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; opacity: 0;
  animation: wt-twinkle var(--dur, 4s) var(--delay, 0s) ease-in-out infinite;
}
@keyframes wt-twinkle {
  0%, 100% { opacity: 0; transform: scale(.6); }
  50% { opacity: var(--op, .5); transform: scale(1); }
}

/* ── Magic Orb Background ── */
.magic-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.magic-bg::before, .magic-bg::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(120px);
  animation: wt-float 15s ease-in-out infinite;
}
.magic-bg::before {
  width: 600px; height: 600px; top: -200px; left: -120px;
  background: radial-gradient(circle, rgba(100,60,220,.2), transparent 70%);
}
.magic-bg::after {
  width: 500px; height: 500px; bottom: 10%; right: -150px;
  background: radial-gradient(circle, rgba(60,180,220,.12), transparent 70%);
  animation-delay: -7s;
}
@keyframes wt-float {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%       { transform: translate(30px,-40px) scale(1.06); }
  66%       { transform: translate(-20px,20px) scale(.95); }
}

/* ── HEADER / TOPBAR ── */
.topbar, .site-header, header.site-header {
  backdrop-filter: blur(22px) saturate(160%) !important;
  background: rgba(7,9,26,.84) !important;
  border-bottom: 1px solid rgba(160,140,255,.13) !important;
}

/* ── BRAND ── */
.brand, .brand span, .brand > span:last-child {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  color: #e8c56a !important;
  letter-spacing: .02em !important;
}
.brand-mark {
  background: linear-gradient(135deg, rgba(159,132,255,.25), rgba(76,217,240,.15)) !important;
  border: 1px solid rgba(232,197,106,.25) !important;
  box-shadow: 0 8px 24px rgba(232,197,106,.12) !important;
  color: #e8c56a !important;
}
.brand img, .brand-logo, .brand > img {
  box-shadow: 0 0 0 1px rgba(232,197,106,.25) !important;
}

/* ── NAV LINKS (sub-pages) ── */
.nav-links a { color: #8891c0 !important; }
.nav-links a:hover { color: #eef0ff !important; }
.nav-cta {
  background: linear-gradient(135deg, #b8963a, #e8c56a) !important;
  border: 0 !important;
  color: #1a0f00 !important;
  font-weight: 900 !important;
  box-shadow: 0 6px 20px rgba(232,197,106,.18) !important;
}
.nav-cta:hover { box-shadow: 0 10px 28px rgba(232,197,106,.35) !important; }

/* ── NAV LINKS (homepage) ── */
.site-nav a, .nav-play {
  font-family: var(--font-body) !important;
}
.nav-play {
  background: linear-gradient(135deg, #b8963a, #e8c56a) !important;
  color: #1a0f00 !important;
  font-weight: 900 !important;
  box-shadow: 0 6px 20px rgba(232,197,106,.18) !important;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3 { line-height: 1.1; }
h1 {
  font-family: var(--font-display) !important;
  font-weight: 900 !important;
  letter-spacing: .01em !important;
}
/* h1 gradient text — applies to pages where h1 has no inner <span> */
h1:not(:has(span)) {
  background: linear-gradient(140deg, #fff 30%, #e8c56a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* h1 <span> gradient override (sub-pages use <h1><span>) */
h1 span {
  background: linear-gradient(140deg, #fff 30%, #e8c56a 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}
h2 {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  color: #fff !important;
}
h3 {
  font-weight: 800 !important;
  color: #fff !important;
}

/* ── EYEBROW ── */
.eyebrow {
  border: 1px solid rgba(232,197,106,.25) !important;
  color: #e8c56a !important;
  background: rgba(232,197,106,.08) !important;
  font-family: var(--font-display) !important;
  letter-spacing: .06em !important;
}
.dot {
  background: #43d996 !important;
  box-shadow: 0 0 0 5px rgba(67,217,150,.15) !important;
  animation: wt-pulse 2s ease-in-out infinite !important;
}
@keyframes wt-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(67,217,150,.15); }
  50%       { box-shadow: 0 0 0 9px rgba(67,217,150,.06); }
}

/* ── BUTTONS ── */
.button:not(.secondary), .btn-primary, .button.primary {
  background: linear-gradient(135deg, #8b5cf6, #4cd9f0) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 8px 28px rgba(139,92,246,.28) !important;
  font-family: var(--font-body) !important;
}
.button.secondary, .btn-secondary {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(160,140,255,.18) !important;
  color: #eef0ff !important;
}

/* ── PANELS / CARDS ── */
.panel, .article-card, .side-card, .card {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.09) !important;
}
.article-card:hover, .side-card:hover, .panel:hover, .card:hover,
a.article-card:hover, a.next-card:hover, a.mini-card:hover {
  border-color: rgba(232,197,106,.28) !important;
}

/* Quick list numbers */
.num {
  background: rgba(159,132,255,.18) !important;
  border-color: rgba(159,132,255,.3) !important;
  color: #d4caff !important;
}

/* next-card, mini-card */
.next-card, .mini-card {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  transition: border-color .2s, transform .2s;
  display: block;
  padding: 14px;
}
.next-card strong, .mini-card h3 { color: #e8c56a !important; }
.next-card:hover, .mini-card:hover {
  border-color: rgba(232,197,106,.28) !important;
  transform: translateY(-2px);
}

/* ── PANEL HEADER ── */
.panel-header { background: rgba(255,255,255,.04) !important; }

/* Quick item */
.quick-item {
  background: rgba(7,9,26,.55) !important;
  border-color: rgba(160,140,255,.13) !important;
}

/* ── BREADCRUMB ── */
.breadcrumb a, .article a { color: #e8c56a !important; }

/* ── FAQ / details ── */
summary { font-family: var(--font-body) !important; }
summary::before { content: '✦'; color: #e8c56a; font-size: 11px; margin-right: 10px; flex-shrink: 0; transition: transform .2s; }
summary::-webkit-details-marker { display: none; }
details[open] summary::before { transform: rotate(45deg); }
details, .faq-item {
  border-color: rgba(255,255,255,.09) !important;
  background: rgba(255,255,255,.04) !important;
}
details[open] { border-color: rgba(159,132,255,.22) !important; }

/* ── TABLES ── */
table { border-color: rgba(160,140,255,.13) !important; }
th {
  background: rgba(255,255,255,.05) !important;
  font-family: var(--font-display) !important;
  font-size: 11px !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: #eef0ff !important;
}
td { color: #8891c0 !important; }
td strong, td a { color: #e8c56a !important; }
tr { border-bottom-color: rgba(160,140,255,.1) !important; }

/* ── NOTE / DISCLAIMER ── */
.note, .disclaimer {
  border-left: 3px solid #e8c56a !important;
  background: rgba(232,197,106,.07) !important;
  border-radius: 12px;
  padding: 12px 16px;
  color: #8891c0;
}
.note strong, .disclaimer strong { color: #e8c56a !important; }

/* ── STEPS / OL ── */
.steps li::marker, ol.steps li::marker { color: #9f84ff; }

/* ── SIDE LINKS ── */
.side-links a { color: #8891c0 !important; }
.side-links a:hover { color: #e8c56a !important; }

/* ── FOOTER ── */
footer, .site-footer {
  background: rgba(0,0,0,.16) !important;
  border-top-color: rgba(160,140,255,.13) !important;
}
footer strong, .footer-grid strong, footer h3, .footer-grid h3 {
  font-family: var(--font-display) !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  color: #eef0ff !important;
}
.footer-links a, .footer-grid a { color: #8891c0 !important; }
.footer-links a:hover, .footer-grid a:hover { color: #e8c56a !important; }
footer .brand, .site-footer .brand { color: #e8c56a !important; }
.small { color: #5a6380 !important; }

/* ── MOBILE QUICK NAV ── */
.mobile-quick {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 99;
  background: rgba(7,9,26,.94);
  border-top: 1px solid rgba(160,140,255,.13);
  backdrop-filter: blur(14px);
}
.mobile-quick .row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
}
.mobile-quick a {
  text-align: center;
  font-size: 12px; font-weight: 800;
  padding: 9px 5px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  color: #8891c0;
  display: block;
  text-decoration: none;
}
.mobile-quick a:hover { color: #e8c56a; background: rgba(232,197,106,.08); }

/* ── TAG CHIPS ── */
.tag {
  font-family: var(--font-display) !important;
  letter-spacing: .04em !important;
}

/* ── Scroll reveal ── */
.wt-reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s cubic-bezier(.4,0,.2,1), transform .5s cubic-bezier(.4,0,.2,1); }
.wt-reveal.wt-visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .mobile-quick { display: block; }
  footer, .site-footer { padding-bottom: 90px !important; }
  body { padding-bottom: 56px; }
}
