/**
 * LoreMarkets — World of Eldenmoor Page
 * Page-specific styles + rich animation layer
 *
 * Carl (UX/UI) · JJ (Lore) · Yosuf (Dev) — Season I
 */


/* ════════════════════════════════════════
   WORLD HERO
   ════════════════════════════════════════ */

.world-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height, 64px) + 32px + var(--space-20)) 0 var(--space-20);
  text-align: center;
  overflow: hidden;
}

.world-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(128, 80, 208, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(245, 192, 48, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 80% 70%, rgba(0, 236, 214, 0.06) 0%, transparent 60%);
  z-index: 0;
  animation: worldHeroBgShift 15s ease-in-out infinite alternate;
}

@keyframes worldHeroBgShift {
  0%   { opacity: 1;   transform: scale(1);    }
  100% { opacity: 0.7; transform: scale(1.05); }
}

.world-hero .container {
  position: relative;
  z-index: 1;
}

/* Massive watermark Oracle icon behind hero text */
.world-hero__watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 420px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  animation: worldWatermarkFloat 12s ease-in-out infinite;
  filter: saturate(0) brightness(3);
}

@keyframes worldWatermarkFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1)   rotate(0deg);   opacity: 0.05; }
  50%       { transform: translate(-50%, -54%) scale(1.04) rotate(3deg); opacity: 0.09; }
}

.world-hero__eyebrow {
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
  margin-bottom: var(--space-4);
}

.world-hero__title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: var(--space-5);
  animation: fadeUp 1.0s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.world-hero__subtitle {
  font-size: var(--font-size-body-lg, 1.125rem);
  color: var(--color-text-secondary, #9a88c0);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
}


/* ════════════════════════════════════════
   WORLD SECTIONS
   ════════════════════════════════════════ */

.world-section {
  padding: var(--space-24, 6rem) 0;
  position: relative;
}

.world-section--dark {
  background: rgba(13, 1, 32, 0.6);
}

.world-section--commodities {
  background: rgba(6, 0, 15, 0.8);
}

.world-heading {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: var(--space-6);
  color: var(--color-text-primary, #f0eaf8);
}

.world-lead {
  font-size: var(--font-size-body-lg, 1.125rem);
  color: var(--color-text-primary, #f0eaf8);
  line-height: 1.75;
  margin-bottom: var(--space-6);
  font-weight: 300;
}


/* ════════════════════════════════════════
   SECTION DIVIDERS
   ════════════════════════════════════════ */

.world-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.world-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(245, 192, 48, 0.25), transparent);
  animation: dividerGrow 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes dividerGrow {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

.world-divider__icon {
  width: 32px;
  height: 32px;
  opacity: 0.55;
  filter: saturate(0) brightness(2);
  animation: runeBreath 4s ease-in-out infinite;
  flex-shrink: 0;
}

.world-divider__text {
  flex-shrink: 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-brand-gold, #f5c030);
}


/* ════════════════════════════════════════
   ORACLE BLOCKQUOTE
   ════════════════════════════════════════ */

.world-blockquote {
  position: relative;
  margin: var(--space-12) 0;
  padding: var(--space-8) var(--space-10);
  font-family: 'Cinzel', serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-style: italic;
  line-height: 1.6;
  color: var(--color-text-primary, #f0eaf8);
  border-left: 3px solid rgba(245, 192, 48, 0.40);
  background: linear-gradient(135deg,
    rgba(245, 192, 48, 0.05) 0%,
    rgba(128, 80, 208, 0.05) 100%
  );
  border-radius: 0 8px 8px 0;
  transition: border-left-color 0.3s ease, box-shadow 0.3s ease;
}

.world-blockquote:hover {
  border-left-color: rgba(245, 192, 48, 0.80);
  box-shadow: 0 0 40px rgba(245, 192, 48, 0.08);
}

.world-blockquote__mark {
  position: absolute;
  top: -10px;
  left: var(--space-6);
  font-size: 4rem;
  font-family: 'Cinzel Decorative', serif;
  color: rgba(245, 192, 48, 0.18);
  line-height: 1;
  pointer-events: none;
  transition: color 0.3s ease;
}

.world-blockquote:hover .world-blockquote__mark {
  color: rgba(245, 192, 48, 0.35);
}

.world-blockquote footer {
  display: block;
  margin-top: var(--space-4);
  font-size: 0.78rem;
  font-style: normal;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.04em;
  color: var(--color-text-muted, #6b5a80);
}


/* ════════════════════════════════════════
   ORACLE ACTS — Three-phase display
   ════════════════════════════════════════ */

.oracle-acts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin: var(--space-12) 0;
}

@media (max-width: 680px) {
  .oracle-acts { grid-template-columns: 1fr; }
}

.oracle-act {
  padding: var(--space-6);
  border-radius: 8px;
  border: 1px solid;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s) both;
}

.oracle-act:nth-child(1) { --delay: 0.1s; }
.oracle-act:nth-child(2) { --delay: 0.25s; }
.oracle-act:nth-child(3) { --delay: 0.40s; }

.oracle-act:hover {
  transform: translateY(-4px);
}

.oracle-act--whisper {
  border-color: rgba(245, 192, 48, 0.25);
  background: rgba(245, 192, 48, 0.04);
}
.oracle-act--whisper:hover {
  box-shadow: 0 0 32px rgba(245, 192, 48, 0.12);
}

.oracle-act--word {
  border-color: rgba(245, 192, 48, 0.70);
  background: rgba(245, 192, 48, 0.08);
}
.oracle-act--word:hover {
  box-shadow: 0 0 40px rgba(245, 192, 48, 0.22);
}

.oracle-act--settling {
  border-color: rgba(0, 236, 214, 0.25);
  background: rgba(0, 236, 214, 0.04);
}
.oracle-act--settling:hover {
  box-shadow: 0 0 32px rgba(0, 236, 214, 0.12);
}

.oracle-act__phase {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.oracle-act--whisper .oracle-act__phase { color: rgba(245, 192, 48, 0.65); }
.oracle-act--word    .oracle-act__phase { color: var(--color-brand-gold, #f5c030); }
.oracle-act--settling .oracle-act__phase { color: var(--color-brand-teal, #00ecd6); }

.oracle-act__body {
  font-size: 0.875rem;
  color: var(--color-text-secondary, #9a88c0);
  line-height: 1.6;
}


/* ════════════════════════════════════════
   MARKET PREVIEW CARDS (Exchanges)
   ════════════════════════════════════════ */

.market-preview-card {
  position: relative;
  transition: transform 0.30s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.30s ease;
}

.market-preview-card__sigil {
  font-size: 32px;
  margin-bottom: var(--space-3);
  display: block;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.market-preview-card:hover .market-preview-card__sigil {
  transform: scale(1.2) rotate(8deg);
}

.market-preview-card--active {
  animation: glowPulse 5s ease-in-out infinite;
}

.market-preview-card--active:hover {
  transform: translateY(-8px);
  box-shadow:
    0 0 0 1px rgba(245, 192, 48, 0.45),
    0 0 60px rgba(245, 192, 48, 0.18),
    0 24px 60px rgba(0, 0, 0, 0.5);
  animation: none;
}

.market-preview-card:not(.market-preview-card--active):hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 1px rgba(128, 80, 208, 0.35),
    0 0 30px rgba(128, 80, 208, 0.10),
    0 16px 40px rgba(0, 0, 0, 0.4);
}


/* ════════════════════════════════════════
   LORE CARDS (Commodity deep-dives)
   ════════════════════════════════════════ */

.lore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-8);
}

.lore-card {
  position: relative;
  padding: var(--space-7);
  border-radius: 12px;
  border: 1px solid rgba(128, 80, 208, 0.20);
  background: rgba(28, 8, 64, 0.50);
  transition: transform 0.30s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.30s ease,
              border-color 0.30s ease;
  overflow: hidden;
}

/* Animated background shimmer on hover */
.lore-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at var(--mx, 50%) var(--my, 50%), rgba(245, 192, 48, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.lore-card:hover::before { opacity: 1; }

.lore-card__ticker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: var(--space-2);
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-block;
}

.lore-card__name {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-3);
  color: var(--color-text-primary, #f0eaf8);
}

.lore-card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary, #9a88c0);
  line-height: 1.65;
  margin-bottom: var(--space-4);
}

.lore-card__meta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.lore-card__tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 600;
}

.lore-card__tag--void   { background: rgba(139, 92, 246, 0.18); color: rgba(180, 140, 255, 0.9); border: 1px solid rgba(139, 92, 246, 0.35); }
.lore-card__tag--gold   { background: rgba(245, 192, 48, 0.12); color: rgba(245, 192, 48, 0.90); border: 1px solid rgba(245, 192, 48, 0.30); }
.lore-card__tag--amber  { background: rgba(251, 146, 60, 0.12); color: rgba(251, 146, 60, 0.90); border: 1px solid rgba(251, 146, 60, 0.30); }
.lore-card__tag--teal   { background: rgba(0, 236, 214, 0.10); color: rgba(0, 236, 214, 0.85);  border: 1px solid rgba(0, 236, 214, 0.25); }
.lore-card__tag--violet { background: rgba(128, 80, 208, 0.15); color: rgba(168, 130, 240, 0.90); border: 1px solid rgba(128, 80, 208, 0.30); }
.lore-card__tag--silver { background: rgba(148, 163, 184, 0.12); color: rgba(200, 210, 220, 0.85); border: 1px solid rgba(148, 163, 184, 0.25); }
.lore-card__tag--green  { background: rgba(34, 197, 94, 0.10); color: rgba(74, 222, 128, 0.90);  border: 1px solid rgba(34, 197, 94, 0.25); }
.lore-card__tag--price  { background: rgba(28, 8, 64, 0.6); color: var(--color-text-muted, #6b5a80); border: 1px solid rgba(128, 80, 208, 0.20); }

.lore-card__flavor {
  font-style: italic;
  font-size: 0.8rem !important;
  color: var(--color-text-muted, #6b5a80) !important;
  margin-bottom: 0 !important;
  padding-top: var(--space-2);
  border-top: 1px solid rgba(128, 80, 208, 0.12);
}

/* Ticker tag colours per card type */
.lore-card--extreme   .lore-card__ticker { background: rgba(139, 92, 246, 0.18); color: rgba(180, 140, 255, 0.9); }
.lore-card--very-high .lore-card__ticker { background: rgba(245, 192, 48, 0.12); color: rgba(245, 192, 48, 0.9); }
.lore-card--high      .lore-card__ticker { background: rgba(251, 146, 60, 0.12); color: rgba(251, 146, 60, 0.9); }
.lore-card--medium-high .lore-card__ticker { background: rgba(0, 236, 214, 0.10); color: rgba(0, 236, 214, 0.85); }
.lore-card--medium    .lore-card__ticker { background: rgba(128, 80, 208, 0.15); color: rgba(168, 130, 240, 0.9); }
.lore-card--prestige  .lore-card__ticker { background: rgba(245, 192, 48, 0.10); color: rgba(245, 192, 48, 0.75); }
.lore-card--low       .lore-card__ticker { background: rgba(148, 163, 184, 0.10); color: rgba(200, 210, 220, 0.80); }
.lore-card--very-low  .lore-card__ticker { background: rgba(34, 197, 94, 0.10); color: rgba(74, 222, 128, 0.85); }

/* Lore card hover — per volatility glow */
.lore-card--extreme:hover   { border-color: rgba(139, 92, 246, 0.50); box-shadow: 0 0 40px rgba(139, 92, 246, 0.15), 0 12px 40px rgba(0,0,0,0.4); transform: translateY(-5px); }
.lore-card--very-high:hover { border-color: rgba(245, 192, 48, 0.45); box-shadow: 0 0 40px rgba(245, 192, 48, 0.14), 0 12px 40px rgba(0,0,0,0.4); transform: translateY(-5px); }
.lore-card--high:hover      { border-color: rgba(251, 146, 60, 0.40); box-shadow: 0 0 35px rgba(251, 146, 60, 0.12), 0 12px 36px rgba(0,0,0,0.4); transform: translateY(-5px); }
.lore-card--medium-high:hover { border-color: rgba(0, 236, 214, 0.38); box-shadow: 0 0 35px rgba(0, 236, 214, 0.12), 0 12px 36px rgba(0,0,0,0.4); transform: translateY(-5px); }
.lore-card--medium:hover,
.lore-card--prestige:hover,
.lore-card--low:hover,
.lore-card--very-low:hover { border-color: rgba(128, 80, 208, 0.35); box-shadow: 0 0 28px rgba(128, 80, 208, 0.10), 0 10px 32px rgba(0,0,0,0.35); transform: translateY(-4px); }


/* ════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .world-hero__watermark,
  .world-hero__bg,
  .world-divider__line,
  .oracle-act,
  .market-preview-card--active {
    animation: none !important;
    transition: none !important;
  }
}
