/* ==========================================================================
   VertigoCO — layout.css
   Shell, hero stage, scenery layers, top bar, grids and footer skeleton.
   ========================================================================== */

.shell {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  isolation: isolate;
}

/* ==========================================================================
   FX ROOT (fixed, page-wide)
   ========================================================================== */
.fx-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.fx-grain {
  position: absolute;
  inset: 0;
  background-image: url('../img/noise.png');
  background-size: 220px 220px;
  opacity: .30;
  mix-blend-mode: overlay;
  animation: grain-shift 5s steps(6) infinite;
}

.fx-embers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .85;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 770px;
  padding-bottom: 62px;
  overflow: hidden;
}

/* ---------- scenery stack ---------- */
.hero__scene {
  position: absolute;
  inset: -2% -2% 0;
  z-index: 0;
  pointer-events: none;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: #06020c;
  /* background: #06020c url('../img/hero-bg.jpg') center top / cover no-repeat; */
  transform: scale(1.04);
  animation: bg-breathe 26s ease-in-out infinite;
  will-change: transform;
}

.hero__crackle {
  position: absolute;
  background: no-repeat center / contain;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero__crackle--a {
  inset: -8% 8% 22% -6%;
  background-image: url('../img/crackle-violet.png');
  opacity: .30;
  animation: crackle-pulse 7.5s ease-in-out infinite;
}

.hero__crackle--b {
  right: -4%;
  bottom: 6%;
  width: 46%;
  height: 62%;
  background-image: url('../img/crackle-ember.png');
  opacity: .34;
  animation: crackle-pulse 5.6s ease-in-out .9s infinite;
}

.hero__castle {
  position: absolute;
  top: 8%;
  left: 0;
  width: 27%;
  aspect-ratio: 356 / 234;
  background: url('../img/castle.png') left top / contain no-repeat;
  opacity: .95;
  animation: float-slow 18s ease-in-out infinite;
}

.hero__dragon {
  position: absolute;
  top: 2%;
  right: 0;
  width: 38%;
  aspect-ratio: 540 / 300;
  background: url('../img/dragon.png') right top / contain no-repeat;
  animation: float-slow 22s ease-in-out reverse infinite;
}

.hero__lava {
  position: absolute;
  top: 44%;
  left: 57%;
  width: 26%;
  aspect-ratio: 350 / 320;
  background: url('../img/lava.png') center / contain no-repeat;
  mix-blend-mode: screen;
  opacity: .55;
  animation: lava-throb 4.4s ease-in-out infinite;
}

.hero__ember-field {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 78%, rgba(255, 90, 20, .12), transparent 42%),
    radial-gradient(circle at 78% 62%, rgba(255, 120, 30, .14), transparent 46%);
  animation: crackle-pulse 9s ease-in-out infinite;
}

.hero__bolts { position: absolute; inset: 0; }

.bolt {
  position: absolute;
  top: -6%;
  width: 62%;
  height: 82%;
  background: no-repeat center top / contain;
  mix-blend-mode: screen;
  opacity: 0;
}

.bolt--1 { left: -4%;  background-image: url('../img/bolt-1.png'); animation: bolt-strike 11s steps(1, end) infinite; }
.bolt--2 { left: 34%;  background-image: url('../img/bolt-2.png'); animation: bolt-strike 14s steps(1, end) 3.4s infinite; }
.bolt--3 { right: -6%; background-image: url('../img/bolt-3.png'); animation: bolt-strike 17s steps(1, end) 7.1s infinite; }

.hero__flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 50% at 50% 18%, rgba(196, 140, 255, .55), transparent 70%);
  opacity: 0;
  mix-blend-mode: screen;
  animation: sky-flash 11s ease-out infinite;
}

.hero__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 42%, rgba(4, 1, 8, .55) 78%, rgba(3, 1, 6, .92) 100%),
    linear-gradient(180deg, rgba(4, 1, 9, .55) 0%, transparent 16%, transparent 62%, rgba(4, 1, 9, .88) 100%);
}

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 6px 30px 0 22px;
  min-height: 92px;
}

.brand {
  position: relative;
  flex: 0 0 auto;
  width: 308px;
  display: block;
}

.brand__img {
  width: 100%;
  filter: drop-shadow(0 0 14px rgba(150, 70, 255, .45));
  animation: logo-breathe 6.5s ease-in-out infinite;
}

.brand__glow {
  position: absolute;
  left: 62%;
  top: 44%;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 110, 25, .55), transparent 68%);
  filter: blur(6px);
  pointer-events: none;
  animation: ring-throb 3.6s ease-in-out infinite;
}

.nav { flex: 1 1 auto; }

.nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ==========================================================================
   HERO CENTREPIECE
   ========================================================================== */
.hero__center {
  position: relative;
  z-index: 10;
  margin: -78px auto 0;
  width: min(760px, 62%);
  text-align: center;
}

.emblem {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
}

.emblem__art {
  width: 100%;
  mix-blend-mode: screen;
  filter: contrast(1.06) saturate(1.08);
  -webkit-mask-image: radial-gradient(78% 74% at 50% 48%, #000 62%, transparent 100%);
  mask-image: radial-gradient(78% 74% at 50% 48%, #000 62%, transparent 100%);
}

.emblem__glow {
  position: absolute;
  inset: 0;
  width: 100%;
  mix-blend-mode: screen;
  opacity: .0;
  animation: emblem-glow 5.4s ease-in-out infinite;
  pointer-events: none;
}

.emblem__rune {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 78%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: url('../img/rune-ring.png') center / contain no-repeat;
  opacity: .16;
  mix-blend-mode: screen;
  animation: spin-slow 46s linear infinite;
  pointer-events: none;
}

.emblem__sheen {
  position: absolute;
  inset: 6% 2%;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .34) 48%, transparent 58%);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(70% 66% at 50% 48%, #000 55%, transparent 100%);
  mask-image: radial-gradient(70% 66% at 50% 48%, #000 55%, transparent 100%);
  background-size: 260% 100%;
  animation: sheen-sweep 7.5s ease-in-out infinite;
  pointer-events: none;
}

/* ==========================================================================
   HERO SIDE PANELS (absolute on desktop)
   ========================================================================== */
.panel--login {
  position: absolute;
  z-index: 15;
  left: 64px;
  top: 304px;
  width: 258px;
}

.hero__right {
  position: absolute;
  z-index: 15;
  right: 76px;
  top: 306px;
  width: 286px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   FEATURE CARD ROW
   ========================================================================== */
.features {
  position: relative;
  z-index: 12;
  margin: 30px auto 0;
  padding: 0 24px;
  width: min(852px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

/* ==========================================================================
   INFO GRID
   ========================================================================== */
.infogrid {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.02fr 1.13fr .95fr 1.09fr;
  gap: 16px;
  padding: 8px 88px 34px;
}

.infogrid::before {
  content: '';
  position: absolute;
  inset: -60px 0 0;
  z-index: -1;
  background:
    radial-gradient(60% 100% at 12% 0%, rgba(120, 40, 210, .12), transparent 70%),
    radial-gradient(60% 100% at 88% 20%, rgba(190, 60, 20, .10), transparent 70%);
  pointer-events: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  position: relative;
  z-index: 5;
  padding: 22px 40px 26px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(10, 4, 18, .90), rgba(5, 2, 10, .98)),
    url('../img/page-bg.jpg') center bottom / cover no-repeat;
}

.footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 120, 255, .55), rgba(255, 120, 40, .45), transparent);
  animation: rule-shimmer 8s ease-in-out infinite;
}

.footer__dragon {
  position: absolute;
  right: 8px;
  bottom: 0;
  width: 150px;
  height: 118px;
  background: url('../img/footer-dragon.png') right bottom / contain no-repeat;
  opacity: .55;
  animation: float-slow 14s ease-in-out infinite;
  pointer-events: none;
}

.footer__inner {
  display: grid;
  grid-template-columns: 260px 1.05fr 1.25fr 1.15fr 1fr;
  align-items: start;
  gap: 28px;
}

.footer__col--brand { padding-top: 4px; }

.footer__col + .footer__col { position: relative; }

.footer__col + .footer__col::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line), transparent);
}

.footer__col--brand::before { display: none; }
