/* ============================================================
   Odin of Asgard - Under Construction page
   Standalone, self-contained styling
   ============================================================ */

:root {
  --bg: #070a12;
  --gold: #f0b840;
  --gold-bright: #ffd877;
  --blue: #4aa8ff;
  --text: #e9edf8;
  --muted: #9aa6c2;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --gold-grad: linear-gradient(135deg, #ffe6a0 0%, #f0b840 45%, #c98a22 100%);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
}

/* Ambient background */
.bg-fx { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.bg-fx::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 600px at 50% 18%, rgba(240,184,70,.16), transparent 60%),
    radial-gradient(800px 600px at 78% 90%, rgba(74,168,255,.14), transparent 60%),
    radial-gradient(800px 600px at 14% 80%, rgba(157,123,255,.10), transparent 60%),
    linear-gradient(180deg, #070a12, #0c1322 60%, #070a12);
}
/* Drifting starfield */
.stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5; }
.stars::before, .stars::after {
  content: ""; position: absolute; inset: -50%;
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 70% 60%, #cfe4ff, transparent),
    radial-gradient(1.6px 1.6px at 40% 80%, #ffe6a0, transparent),
    radial-gradient(1px 1px at 85% 25%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 55% 15%, #fff, transparent);
  background-size: 480px 480px;
  animation: drift 60s linear infinite;
}
.stars::after { background-size: 360px 360px; opacity: .6; animation-duration: 90s; animation-direction: reverse; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(140px); } }

/* Layout */
.shell { flex: 1; display: grid; place-items: center; padding: 100px 24px 48px; }
.wrap { width: 100%; max-width: 680px; }

/* Hero graphic (the ONLY inspiration graphic used) */
.relic { position: relative; width: 360px; margin: 0 auto 140px; }
.relic img {
  width: 100%; display: block;
  filter: drop-shadow(0 26px 50px rgba(0,0,0,.6));
  animation: hover 6s ease-in-out infinite;
}
.relic::before {
  content: ""; position: absolute; inset: -16% -12% -22% -12%; z-index: -1;
  background: radial-gradient(circle at 50% 46%, rgba(240,184,70,.34), rgba(74,168,255,.12) 50%, transparent 72%);
  filter: blur(8px);
  animation: glow 4.5s ease-in-out infinite;
}
/* Rotating runic circles around the relic (Elder Futhark) */
.rune-orbit {
  position: absolute; top: 50%; left: 50%; width: 0; height: 0;
  z-index: 2; pointer-events: none;
  transform-origin: center;
}
.rune-orbit span {
  position: absolute; top: 0; left: 0;
  font-family: var(--font-display); line-height: 1;
  transform: translate(-50%, -50%) rotate(var(--a, 0deg)) translateY(calc(-1 * var(--r, 130px)));
  animation: rune-flare 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.rune-orbit--outer { animation: orbit-spin 46s linear infinite; }
.rune-orbit--outer span { --r: 256px; font-size: 1.75rem; color: var(--gold-bright); text-shadow: 0 0 14px rgba(240,184,70,.8); }
.rune-orbit--inner { animation: orbit-spin 32s linear infinite reverse; }
.rune-orbit--inner span { --r: 212px; font-size: 1.3rem; color: var(--frost); text-shadow: 0 0 12px rgba(132,224,255,.8); }

/* Outer ring: 12 runes every 30deg, staggered flare */
.rune-orbit--outer span:nth-child(1)  { --a: 0deg;   --d: 0s; }
.rune-orbit--outer span:nth-child(2)  { --a: 30deg;  --d: .25s; }
.rune-orbit--outer span:nth-child(3)  { --a: 60deg;  --d: .5s; }
.rune-orbit--outer span:nth-child(4)  { --a: 90deg;  --d: .75s; }
.rune-orbit--outer span:nth-child(5)  { --a: 120deg; --d: 1s; }
.rune-orbit--outer span:nth-child(6)  { --a: 150deg; --d: 1.25s; }
.rune-orbit--outer span:nth-child(7)  { --a: 180deg; --d: 1.5s; }
.rune-orbit--outer span:nth-child(8)  { --a: 210deg; --d: 1.75s; }
.rune-orbit--outer span:nth-child(9)  { --a: 240deg; --d: 2s; }
.rune-orbit--outer span:nth-child(10) { --a: 270deg; --d: 2.25s; }
.rune-orbit--outer span:nth-child(11) { --a: 300deg; --d: 2.5s; }
.rune-orbit--outer span:nth-child(12) { --a: 330deg; --d: 2.75s; }

/* Inner ring: 8 runes every 45deg */
.rune-orbit--inner span:nth-child(1) { --a: 0deg;   --d: .4s; }
.rune-orbit--inner span:nth-child(2) { --a: 45deg;  --d: .8s; }
.rune-orbit--inner span:nth-child(3) { --a: 90deg;  --d: 1.2s; }
.rune-orbit--inner span:nth-child(4) { --a: 135deg; --d: 1.6s; }
.rune-orbit--inner span:nth-child(5) { --a: 180deg; --d: 2s; }
.rune-orbit--inner span:nth-child(6) { --a: 225deg; --d: 2.4s; }
.rune-orbit--inner span:nth-child(7) { --a: 270deg; --d: 2.8s; }
.rune-orbit--inner span:nth-child(8) { --a: 315deg; --d: 3.2s; }

@keyframes hover { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes glow { 0%,100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes rune-flare { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* Text */
.kicker {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: .32em; text-transform: uppercase; font-size: .76rem;
  color: var(--gold); margin-bottom: 16px;
}
h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.3rem); line-height: 1.12; margin: 0 0 14px;
}
.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.sub { color: var(--muted); font-size: 1.08rem; line-height: 1.6; max-width: 540px; margin: 0 auto 36px; }

/* ---- Bifrost progress: a bridge of light igniting the Nine Realms ---- */
.forge { max-width: 500px; margin: 0 auto; }

.bifrost { position: relative; padding: 6px 0; margin-bottom: 22px; }

/* The bridge of light running between the realm stones */
.bifrost-track {
  position: absolute; top: 50%; left: 22px; right: 22px; height: 6px;
  transform: translateY(-50%); border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(240, 184, 70, 0.18);
  overflow: hidden;
}
.bifrost-fill {
  display: block; height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--frost) 30%, var(--gold-bright) 65%, var(--gold) 100%);
  box-shadow: 0 0 18px rgba(240, 184, 70, 0.6);
  transition: width 1.1s cubic-bezier(.4, 0, .2, 1);
  position: relative;
}
.bifrost-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: sweep 1.8s linear infinite;
}

/* Nine realm stones sitting on the bridge */
.realm-stones { position: relative; display: flex; justify-content: space-between; align-items: center; }
.realm-stone {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #1a2336, #0c1220);
  border: 1px solid rgba(240, 184, 70, 0.22);
  color: rgba(233, 237, 248, 0.3);
  transition: color .5s ease, border-color .5s ease, box-shadow .5s ease, transform .5s ease, background .5s ease;
}
.realm-stone .rune { font-family: var(--font-display); font-size: 1.2rem; line-height: 1; }
.realm-stone.lit {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: radial-gradient(circle at 50% 38%, rgba(240, 184, 70, 0.28), #0c1220 72%);
  box-shadow: 0 0 18px rgba(240, 184, 70, 0.55), 0 0 0 1px rgba(240, 184, 70, 0.3);
  transform: translateY(-2px) scale(1.08);
  text-shadow: 0 0 12px rgba(240, 184, 70, 0.8);
}
@keyframes sweep { from { background-position: 160% 0; } to { background-position: -60% 0; } }

@media (max-width: 480px) {
  .realm-stone { width: 34px; height: 34px; }
  .realm-stone .rune { font-size: 1rem; }
  .bifrost-track { left: 17px; right: 17px; }
}

.forge-meta { display: flex; justify-content: space-between; margin-top: 12px; font-size: .82rem; letter-spacing: .08em; }
.forge-meta .label { color: var(--muted); text-transform: uppercase; }
.forge-meta .pct { font-family: var(--font-display); font-weight: 700; color: var(--gold-bright); }

.tagline { margin-top: 34px; color: var(--muted); font-size: .92rem; }
.tagline strong { color: var(--text); font-weight: 600; }

/* Footer */
.foot { padding: 22px 24px 30px; font-size: .85rem; color: rgba(154,166,194,.8); }
.foot a { color: var(--gold-bright); text-decoration: none; }
.foot a:hover { text-decoration: underline; color: #fff; }

/* Scale the whole relic + rune rings as one unit so the wide rings
   never clip on smaller screens (they span ~512px at full size). */
@media (max-width: 760px) { .relic { transform: scale(.8); margin-bottom: 100px; } }
@media (max-width: 560px) { .relic { transform: scale(.62); margin-bottom: 70px; } }
@media (max-width: 400px) { .relic { transform: scale(.5); margin-bottom: 56px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
