/* Arkenum home */

/* deep background */
body {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, #241546 0%, transparent 60%),
    radial-gradient(ellipse 120% 90% at 50% 110%, #1a0f33 0%, transparent 55%),
    radial-gradient(ellipse 120% 90% at 50% -10%, #150c28 0%, #0a0713 60%, #06040d 100%);
}

.cosmos { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

/* two star layers with parallax depth */
.stars--far, .stars--near {
  position: absolute; inset: -60%;
  background-repeat: repeat;
  will-change: transform, opacity;
}
.stars--far {
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 65% 15%, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 55% 92%, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at 30% 50%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 92% 22%, rgba(255,255,255,.55), transparent);
  background-size: 100% 100%;
  animation: twinkleFar 7s ease-in-out infinite alternate, driftFar 160s linear infinite;
}
.stars--near {
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, rgba(255,255,255,.95), transparent),
    radial-gradient(2px 2px at 75% 78%, rgba(231,196,99,.85), transparent),
    radial-gradient(1.8px 1.8px at 48% 12%, rgba(246,228,166,.8), transparent),
    radial-gradient(1.6px 1.6px at 88% 40%, rgba(255,255,255,.85), transparent),
    radial-gradient(1.8px 1.8px at 26% 82%, rgba(200,95,176,.7), transparent),
    radial-gradient(1.6px 1.6px at 62% 60%, rgba(255,255,255,.8), transparent);
  background-size: 100% 100%;
  animation: twinkleNear 4.5s ease-in-out infinite alternate, driftNear 110s linear infinite;
}
@keyframes twinkleFar { from { opacity: .4; } to { opacity: .85; } }
@keyframes twinkleNear { from { opacity: .6; } to { opacity: 1; } }
@keyframes driftFar { to { transform: translate(-3%, -2%); } }
@keyframes driftNear { to { transform: translate(-6%, -4%); } }

/* nebulae */
.nebula { position: absolute; border-radius: 50%; filter: blur(90px); mix-blend-mode: screen; }
.nebula--1 {
  width: 560px; height: 560px; top: -180px; left: -140px;
  background: radial-gradient(circle, rgba(109,75,216,.6), transparent 70%);
  animation: neb1 26s ease-in-out infinite;
}
.nebula--2 {
  width: 480px; height: 480px; bottom: -200px; right: -140px;
  background: radial-gradient(circle, rgba(200,95,176,.45), transparent 70%);
  animation: neb2 32s ease-in-out infinite;
}
.nebula--3 {
  width: 420px; height: 420px; top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(231,196,99,.22), transparent 70%);
  animation: neb3 38s ease-in-out infinite;
}
@keyframes neb1 { 50% { transform: translate(50px, 40px) scale(1.1); } }
@keyframes neb2 { 50% { transform: translate(-40px, -50px) scale(1.08); } }
@keyframes neb3 { 50% { transform: translate(-60px, 30px) scale(1.15); opacity: .8; } }

/* grain + vignette for depth */
.grain {
  position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 40%, transparent 55%, rgba(6,4,13,.7) 100%);
}

/* constellation canvas */
.constellation { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }

/* floating orbs of light */
.orbs { position: absolute; inset: 0; }
.orb {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(246,228,166,.9), rgba(231,196,99,.15) 60%, transparent 70%);
  box-shadow: 0 0 20px rgba(231,196,99,.5);
  animation: orbRise linear infinite;
  opacity: 0;
}
@keyframes orbRise {
  0% { transform: translateY(20px) scale(.6); opacity: 0; }
  15% { opacity: .9; }
  85% { opacity: .7; }
  100% { transform: translateY(-120px) scale(1); opacity: 0; }
}

/* slowly drifting arcana glyphs */
.floaters { position: absolute; inset: 0; }
.floater {
  position: absolute; width: 90px; height: 90px;
  fill: none; stroke: rgba(231,196,99,.16); stroke-width: 2.4;
  filter: drop-shadow(0 0 8px rgba(231,196,99,.15));
  animation: floatGlyph linear infinite;
  opacity: 0;
}
@keyframes floatGlyph {
  0% { transform: translateY(30px) rotate(0deg); opacity: 0; }
  15% { opacity: .5; }
  85% { opacity: .35; }
  100% { transform: translateY(-140px) rotate(24deg); opacity: 0; }
}

/* ===== HERO (step: topic) ===== */
.topbar__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.topbar__sigil { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 4; filter: drop-shadow(0 0 6px rgba(231,196,99,.6)); }

.quiz-step[data-step="topic"] { max-width: 680px; }

.hero__crest { display: flex; justify-content: center; margin-bottom: 18px; }
.hero__sigil {
  width: 78px; height: 78px; fill: none;
  stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 16px rgba(231,196,99,.55));
  animation: sigilSpin 60s linear infinite, sigilPulse 5s ease-in-out infinite;
}
@keyframes sigilSpin { to { transform: rotate(360deg); } }
@keyframes sigilPulse { 50% { filter: drop-shadow(0 0 26px rgba(231,196,99,.85)); } }

.hero__eyebrow {
  font-family: var(--font-display);
  letter-spacing: .28em; text-transform: uppercase;
  font-size: .72rem; color: var(--gold);
  opacity: .85; margin: 0 0 14px;
}

.hero__title { line-height: 1.05; margin-bottom: 16px; }

.hero__reassure {
  color: var(--ink-mute); font-size: .96rem; font-style: italic;
  margin: 14px 0 0; letter-spacing: .01em;
}

/* animated hero button */
.btn--hero {
  margin-top: 26px; padding: 18px 42px; font-size: 1.08rem;
  position: relative; overflow: hidden;
  box-shadow: 0 10px 30px rgba(231,196,99,.3), 0 0 0 rgba(231,196,99,.5), inset 0 1px 0 rgba(255,255,255,.5);
  animation: heroPulse 2.8s ease-in-out infinite;
}
.btn--hero::after {
  content: ""; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  animation: heroSheen 3.6s ease-in-out infinite;
}
@keyframes heroPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(231,196,99,.3), 0 0 0 0 rgba(231,196,99,.45), inset 0 1px 0 rgba(255,255,255,.5); }
  50% { box-shadow: 0 14px 40px rgba(231,196,99,.45), 0 0 0 12px rgba(231,196,99,0), inset 0 1px 0 rgba(255,255,255,.6); }
}
@keyframes heroSheen { 0% { left: -120%; } 55%, 100% { left: 140%; } }

/* topic cards enriched */
.topic-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
.topic-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 22px 14px 18px; text-align: center;
}
.topic-card__icon {
  width: 40px; height: 40px; fill: none;
  stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  opacity: .8; transition: transform .25s ease, opacity .25s ease, filter .25s ease;
}
.topic-card:hover .topic-card__icon { transform: translateY(-2px) scale(1.06); opacity: 1; }
.topic-card.is-selected .topic-card__icon {
  opacity: 1; stroke: var(--gold-2);
  filter: drop-shadow(0 0 10px rgba(231,196,99,.6));
}
.topic-card__label { font-size: 1.05rem; }
.topic-card__desc {
  font-family: var(--font-body); font-style: italic;
  font-size: .86rem; color: var(--ink-mute); letter-spacing: 0; line-height: 1.3;
}
@media (max-width: 560px) {
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card { flex-direction: row; justify-content: flex-start; text-align: left; gap: 14px; padding: 16px 18px; }
  .topic-card__desc { display: block; }
}

/* trust stats */
.hero__stats {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  margin: 34px auto 0; flex-wrap: wrap;
}
.hero__stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero__stat-num {
  font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-2);
  letter-spacing: .04em; line-height: 1;
}
.hero__stat-star { color: var(--gold); font-size: 1.05rem; margin-left: 2px; }
.hero__stat-cap { font-size: .82rem; color: var(--ink-mute); font-style: italic; }
.hero__stat-sep { width: 1px; height: 34px; background: linear-gradient(180deg, transparent, rgba(231,196,99,.35), transparent); }

/* benefit marks */
.hero__marks {
  list-style: none; padding: 0; margin: 30px auto 0; max-width: 420px;
  display: grid; gap: 12px; text-align: left;
}
.hero__mark {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-soft); font-size: 1.02rem;
}
.hero__mark-dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold-2), var(--gold-deep));
  box-shadow: 0 0 10px rgba(231,196,99,.6);
}

/* scroll hint */
.hero__scroll {
  width: 26px; height: 42px; margin: 40px auto 0;
  border: 1px solid rgba(231,196,99,.35); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px;
}
.hero__scroll span {
  width: 4px; height: 8px; border-radius: 3px; background: var(--gold);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .stars--far, .stars--near, .nebula, .hero__sigil, .btn--hero, .btn--hero::after, .orb, .floater, .hero__scroll span { animation: none; }
}
