/* ====================================================================
   MuAze Landing Page
   Dark theme inspired by in-game HUD (gold + cyan + near-black).
   ==================================================================== */

:root {
    --bg:          #0a0a0a;
    --bg-elev:     #141414;
    --bg-card:     #1a1a1a;
    --gold:        #d4af37;
    --gold-bright: #f0c862;
    --gold-dim:    rgba(212, 175, 55, 0.6);
    --cyan:        #00bfff;
    --cyan-dim:    rgba(0, 191, 255, 0.7);
    --text:        #e8e8e8;
    --text-dim:    #aaa;
    --muted:       #777;
    --border:      rgba(212, 175, 55, 0.25);
    --border-hi:   rgba(212, 175, 55, 0.55);
    --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.6);
    --shadow-lg:   0 8px 32px rgba(0, 0, 0, 0.8);
    --radius:      4px;
    --max-w:       1200px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: 'Cinzel', 'Trajan Pro', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.6em;
    color: var(--gold);
    letter-spacing: 0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ====================================================================
   Header / Nav
   ==================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg,
        rgba(15, 12, 6, 0.92) 0%,
        rgba(10, 10, 10, 0.88) 100%);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow:
        inset 0 1px 0 rgba(255, 230, 150, 0.10),
        0 6px 24px rgba(0, 0, 0, 0.55);
}

/* Gold gradient line at bottom edge (matches footer + section.alt treatment) */
.site-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.25) 15%,
        var(--gold) 50%,
        rgba(212, 175, 55, 0.25) 85%,
        transparent 100%);
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5));
    pointer-events: none;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 60%, #a37a1d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.18));
    animation: brandBreath 4.2s ease-in-out infinite;
    transition: filter 0.25s ease, letter-spacing 0.25s ease;
}

.brand:hover {
    letter-spacing: 0.2em;
    filter: drop-shadow(0 0 22px rgba(212, 175, 55, 0.55));
}

@keyframes brandBreath {
    0%, 100% { filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.18)); }
    50%      { filter: drop-shadow(0 0 22px rgba(212, 175, 55, 0.45)); }
}

.brand-emblem {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 6px rgba(0, 191, 255, 0.55));
    animation: brandEmblemPulse 3.2s ease-in-out infinite;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.brand:hover .brand-emblem {
    transform: rotate(45deg);
    filter: drop-shadow(0 0 12px rgba(0, 191, 255, 0.9));
}

@keyframes brandEmblemPulse {
    0%, 100% { filter: drop-shadow(0 0  6px rgba(0, 191, 255, 0.45)); transform: scale(1); }
    50%      { filter: drop-shadow(0 0 14px rgba(0, 191, 255, 0.95));  transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .brand,
    .brand-emblem { animation: none; }
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav a {
    position: relative;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.4rem 0;
    transition:
        color 0.22s ease,
        text-shadow 0.22s ease,
        letter-spacing 0.22s ease;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -0.45rem;
    left: 50%;
    right: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: left 0.3s ease, right 0.3s ease, opacity 0.3s ease;
}

.nav a:hover {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.45);
    letter-spacing: 0.08em;
}

.nav a:hover::after {
    left: 0;
    right: 0;
    opacity: 0.7;
}

.nav a.active {
    color: var(--gold);
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}

.nav a.active::after {
    left: 0;
    right: 0;
    opacity: 1;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 191, 255, 0.6) 15%,
        var(--gold) 50%,
        rgba(0, 191, 255, 0.6) 85%,
        transparent 100%);
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

/* ====================================================================
   Hero
   ==================================================================== */

.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 5rem 1.5rem 8rem;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center 30%;
    filter: brightness(0.7) saturate(1.35) contrast(1.05);
    transform: scale(1.04);
    z-index: 0;
    animation: heroZoom 30s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from { transform: scale(1.04); }
    to   { transform: scale(1.10); }
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 45%, transparent 0%, rgba(10, 10, 10, 0.35) 55%, rgba(10, 10, 10, 0.85) 95%),
        linear-gradient(180deg,
            rgba(10, 10, 10, 0.55) 0%,
            rgba(10, 10, 10, 0.10) 35%,
            rgba(10, 10, 10, 0.10) 55%,
            rgba(10, 10, 10, 0.75) 88%,
            var(--bg) 100%);
    z-index: 1;
}

.hero-fog {
    position: absolute;
    inset: -10%;
    background-image: url('../img/fog.png');
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    mix-blend-mode: screen;
    z-index: 1;
    pointer-events: none;
    animation: fogDrift 60s linear infinite;
}

.hero-rays {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(212, 175, 55, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 50% 0%,    rgba(255, 230, 150, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    animation: raysPulse 8s ease-in-out infinite;
}

@keyframes raysPulse {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1; }
}

/* ----- Vignette breathing (edges darken/lighten subtly) ----- */

.hero-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background:
        radial-gradient(ellipse 100% 100% at center,
            transparent 35%,
            rgba(0, 0, 0, 0.25) 70%,
            rgba(0, 0, 0, 0.55) 100%);
    animation: vignetteBreath 6s ease-in-out infinite;
}

@keyframes vignetteBreath {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1.0; }
}

/* ----- Floating glow orbs (replaces directional beam sweep) ----- */

.hero-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.hero-orbs span {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    mix-blend-mode: screen;
    animation: orbDrift ease-in-out infinite;
}

.hero-orbs span.gold {
    background: radial-gradient(circle,
        rgba(255, 215, 130, 0.30) 0%,
        rgba(212, 175, 55, 0.10) 45%,
        transparent 75%);
}

.hero-orbs span.cyan {
    background: radial-gradient(circle,
        rgba(120, 220, 255, 0.22) 0%,
        rgba(0, 191, 255, 0.07) 45%,
        transparent 75%);
}

.hero-orbs span:nth-child(1) { top:  8%; left:  6%; width: 320px; height: 320px; animation-duration: 22s; animation-delay: 0s;   }
.hero-orbs span:nth-child(2) { top: 28%; right: 8%; width: 280px; height: 280px; animation-duration: 26s; animation-delay: -8s; }
.hero-orbs span:nth-child(3) { bottom: 18%; left: 32%; width: 360px; height: 360px; animation-duration: 30s; animation-delay: -14s; }
.hero-orbs span:nth-child(4) { top:   4%; left:  55%; width: 220px; height: 220px; animation-duration: 24s; animation-delay: -4s;  }

@keyframes orbDrift {
    0%, 100% { transform: translate(0, 0)         scale(1);   opacity: 0.75; }
    25%      { transform: translate(40px, -25px)  scale(1.08); opacity: 1;    }
    50%      { transform: translate(20px,  30px)  scale(0.92); opacity: 0.6;  }
    75%      { transform: translate(-30px, 10px)  scale(1.05); opacity: 0.85; }
}

/* ----- Rising golden embers ----- */

.hero-embers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.hero-embers span {
    position: absolute;
    bottom: -12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffe6a0 0%, rgba(212, 175, 55, 0.6) 45%, transparent 75%);
    filter: blur(0.8px);
    box-shadow: 0 0 6px rgba(255, 215, 130, 0.5);
    animation: emberRise linear infinite;
}

.hero-embers span:nth-child(1)  { left:  6%; width: 4px; height: 4px; animation-duration: 14s; animation-delay: 0s;    }
.hero-embers span:nth-child(2)  { left: 14%; width: 6px; height: 6px; animation-duration: 11s; animation-delay: 3s;    }
.hero-embers span:nth-child(3)  { left: 23%; width: 3px; height: 3px; animation-duration: 16s; animation-delay: 6s;    }
.hero-embers span:nth-child(4)  { left: 32%; width: 5px; height: 5px; animation-duration: 13s; animation-delay: 1.5s;  }
.hero-embers span:nth-child(5)  { left: 41%; width: 4px; height: 4px; animation-duration: 17s; animation-delay: 4s;    }
.hero-embers span:nth-child(6)  { left: 50%; width: 6px; height: 6px; animation-duration: 12s; animation-delay: 7s;    }
.hero-embers span:nth-child(7)  { left: 58%; width: 4px; height: 4px; animation-duration: 15s; animation-delay: 2s;    }
.hero-embers span:nth-child(8)  { left: 67%; width: 5px; height: 5px; animation-duration: 14s; animation-delay: 5.5s;  }
.hero-embers span:nth-child(9)  { left: 76%; width: 3px; height: 3px; animation-duration: 13s; animation-delay: 8s;    }
.hero-embers span:nth-child(10) { left: 85%; width: 5px; height: 5px; animation-duration: 16s; animation-delay: 0.5s;  }
.hero-embers span:nth-child(11) { left: 92%; width: 4px; height: 4px; animation-duration: 15s; animation-delay: 6.5s;  }
.hero-embers span:nth-child(12) { left: 97%; width: 3px; height: 3px; animation-duration: 18s; animation-delay: 3.5s;  }

@keyframes emberRise {
    0%   { transform: translateY(0) translateX(0)    scale(0.5); opacity: 0; }
    8%   { opacity: 1; }
    50%  { transform: translateY(-55vh) translateX(8px)  scale(1); }
    92%  { opacity: 0.4; }
    100% { transform: translateY(-105vh) translateX(-6px) scale(0.3); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-vignette,
    .hero-orbs span,
    .hero-embers span { animation: none; }
    .hero-embers { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-rays { animation: none; }
}

.hero-scroll-cue {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: var(--gold-dim);
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    text-align: center;
    pointer-events: none;
    animation: scrollCueBob 2.4s ease-in-out infinite;
}

.hero-scroll-cue::after {
    content: '';
    display: block;
    width: 1px;
    height: 28px;
    margin: 0.5rem auto 0;
    background: linear-gradient(180deg, var(--gold), transparent);
}

@keyframes scrollCueBob {
    0%, 100% { transform: translateX(-50%) translateY(0);    opacity: 0.75; }
    50%      { transform: translateX(-50%) translateY(6px);  opacity: 1; }
}

@keyframes fogDrift {
    0%   { transform: translateX(-3%) translateY(0); }
    50%  { transform: translateX(3%)  translateY(-2%); }
    100% { transform: translateX(-3%) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-fog { animation: none; }
}

/* ----- Character lineup behind hero text ----- */

.hero-lineup {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(-2.5rem, -2vw, 0rem);
    pointer-events: none;
    z-index: 1;
    padding: 0 1rem;
}

.hero-lineup .portrait {
    position: relative;
    width: clamp(110px, 18vh, 180px);
    height: clamp(110px, 18vh, 180px);
    padding: 4px;
    background:
        linear-gradient(135deg,
            #fbe48f 0%,
            #d4af37 28%,
            #6e4f12 50%,
            #d4af37 72%,
            #8a651a 100%);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 230, 150, 0.4),
        0 12px 28px rgba(0, 0, 0, 0.95),
        0 22px 40px rgba(0, 0, 0, 0.6);
    opacity: 0.96;
    transform-origin: bottom center;
    animation: heroFloat 5s ease-in-out infinite;
    margin: 0 -0.4vw;
}

.hero-lineup .portrait::before {
    content: '';
    position: absolute;
    inset: 4px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0, 191, 255, 0.08) 0%, transparent 55%),
        linear-gradient(180deg, #1a1a1a 0%, #050505 100%);
    box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.8);
    z-index: 0;
}

.hero-lineup .portrait::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        radial-gradient(circle at 7px 7px,                                  #00bfff 1.5px, transparent 2.4px),
        radial-gradient(circle at calc(100% - 7px) 7px,                     #00bfff 1.5px, transparent 2.4px),
        radial-gradient(circle at 7px calc(100% - 7px),                     #00bfff 1.5px, transparent 2.4px),
        radial-gradient(circle at calc(100% - 7px) calc(100% - 7px),        #00bfff 1.5px, transparent 2.4px);
    filter: drop-shadow(0 0 4px rgba(0, 191, 255, 0.8));
}

.hero-lineup .portrait img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

/* Default state: portrait sits in final spot. CSS vars per-position. */
.hero-lineup .portrait {
    --y:        0px;
    --s:        1;
    --slide-x:  0;
    --float-delay: 0s;
    transform: translate(0, var(--y)) scale(var(--s));
    /* Two animations stacked: one-shot entrance + infinite float. They use
       different properties (transform vs translate) so they compose. */
    animation:
        heroEntrance 0.9s cubic-bezier(0.16, 0.84, 0.44, 1) backwards,
        heroFloat    5s ease-in-out var(--float-delay) infinite;
}

@keyframes heroEntrance {
    0%   { opacity: 0; transform: translate(var(--slide-x), calc(var(--y) - 30px)) scale(calc(var(--s) * 0.6));  filter: blur(8px); }
    60%  { opacity: 1; filter: blur(0); }
    100% { opacity: var(--final-opacity, 0.95); transform: translate(0, var(--y)) scale(var(--s)); filter: blur(0); }
}

/* Center-out cascade: middle pops first, then pairs cascade outward. */
.hero-lineup .portrait:nth-child(1) { --y: 10px;  --s: 0.92; --slide-x: -60vw;  animation-delay: 0.45s, 0s;   --float-delay: 0s;   }
.hero-lineup .portrait:nth-child(2) { --y: 0;     --s: 0.96; --slide-x: -35vw;  animation-delay: 0.30s, 0s;   --float-delay: 0.4s; }
.hero-lineup .portrait:nth-child(3) { --y: -6px;  --s: 1.00; --slide-x: -15vw;  animation-delay: 0.15s, 0s;   --float-delay: 0.8s; }
.hero-lineup .portrait:nth-child(4) { --y: -12px; --s: 1.06; --slide-x: 0;      --final-opacity: 1; animation-delay: 0s, 0s;  --float-delay: 1.2s; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,230,150,0.5), 0 12px 28px rgba(0,0,0,0.95), 0 0 30px rgba(212,175,55,0.3); }
.hero-lineup .portrait:nth-child(5) { --y: -6px;  --s: 1.00; --slide-x:  15vw;  animation-delay: 0.15s, 0s;   --float-delay: 1.6s; }
.hero-lineup .portrait:nth-child(6) { --y: 0;     --s: 0.96; --slide-x:  35vw;  animation-delay: 0.30s, 0s;   --float-delay: 2.0s; }
.hero-lineup .portrait:nth-child(7) { --y: 10px;  --s: 0.92; --slide-x:  60vw;  animation-delay: 0.45s, 0s;   --float-delay: 2.4s; }

@keyframes heroFloat {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -8px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-lineup img { animation: none; }
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-bottom: clamp(2rem, 8vh, 6rem);
}

/* Title stack: socket (dark backdrop) + emblem (animated) + title (text) */
.hero-title-stack {
    position: relative;
    display: inline-block;
    margin: clamp(20px, 4vh, 50px) auto 0.5rem;
}

/* Logo emblem: dim watermark behind the title MuAze. Rotates around its
   own center axis very slowly — like an idling wheel, motion barely felt. */
.hero-emblem {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(220px, 19vw, 340px);
    height: auto;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    transform-origin: 50% 50%;
    filter:
        brightness(0.65) saturate(0.8)
        drop-shadow(0 0 16px rgba(0, 191, 255, 0.3));
    animation:
        emblemFadeIn 1.2s ease-out backwards,
        emblemSpin   90s linear infinite,
        emblemDrift  22s ease-in-out infinite;
}

@keyframes emblemFadeIn {
    from { opacity: 0;    }
    to   { opacity: 0.35; }
}

/* Slow continuous rotation around the emblem's own axis. */
@keyframes emblemSpin {
    from { rotate: 0deg;   }
    to   { rotate: 360deg; }
}

/* Drift path: a figure-8-ish loop visiting all four quadrants around the
   anchor. Modern translate property composes with the transform:translate(-50%,-50%)
   used for centering, so the emblem's center remains the rotation pivot
   while the whole element drifts. */
@keyframes emblemDrift {
    0%   { translate:    0px    0px; }
    14%  { translate:   95px  -55px; }
    28%  { translate:   60px   45px; }
    42%  { translate:  -45px   70px; }
    56%  { translate: -100px   -5px; }
    70%  { translate:  -70px  -60px; }
    84%  { translate:   50px  -80px; }
    100% { translate:    0px    0px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-emblem { animation: emblemFadeIn 1s ease-out forwards; }
}

@keyframes emblemFloat {
    0%, 100% { translate: 0 0;    }
    50%      { translate: 0 -6px; }
}

@keyframes emblemGlow {
    0%, 100% {
        filter:
            drop-shadow(0 0 14px rgba(0, 191, 255, 0.45))
            drop-shadow(0 0 28px rgba(0, 191, 255, 0.20));
    }
    50% {
        filter:
            drop-shadow(0 0 24px rgba(0, 191, 255, 0.85))
            drop-shadow(0 0 50px rgba(0, 191, 255, 0.40));
    }
}

.hero h1.hero-logo {
    position: relative;
    z-index: 2;
    font-size: clamp(3rem, 9vw, 6.5rem);
    letter-spacing: 0.2em;
    margin: 0;
    line-height: 1;
    filter:
        drop-shadow(0 4px 18px rgba(0, 0, 0, 0.9))
        drop-shadow(0 0 18px rgba(212, 175, 55, 0.25));
    /* Forge fires after emblem fade-in settles (entry ends ~1.8s). */
    animation: heroLogoForge 1.4s cubic-bezier(0.22, 0.7, 0.32, 1) 1.6s backwards;
}

.hero h1.hero-logo span {
    display: inline-block;
    background: linear-gradient(165deg,
        #8a651a 0%,
        #d4af37 22%,
        #fff0b8 48%,
        #ffd76b 52%,
        #d4af37 78%,
        #5a3f10 100%);
    background-size: 240% 240%;
    background-position: 0% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    /* Per-letter gleam: a bright band sweeps through each letter in a wave.
       Stagger keeps a subtle traveling shimmer without making letters move. */
    animation: heroLetterGleam 8s ease-in-out infinite;
}

/* Gleam per-letter: delayed until after the title has settled from forge. */
.hero h1.hero-logo span:nth-child(1) { animation-delay: 3.2s; }
.hero h1.hero-logo span:nth-child(2) { animation-delay: 3.4s; }
.hero h1.hero-logo span:nth-child(3) { animation-delay: 3.6s; }
.hero h1.hero-logo span:nth-child(4) { animation-delay: 3.8s; }
.hero h1.hero-logo span:nth-child(5) { animation-delay: 4.0s; }

@keyframes heroLetterGleam {
    0%, 100% { background-position: 0% 100%; }
    50%      { background-position: 100% 0%; }
}

/* Forge: gentle reveal + light tremor that settles. No white flash. */
@keyframes heroLogoForge {
    0%   { opacity: 0; transform: scale(0.96);
           filter: drop-shadow(0 0 0 transparent); }

    /* Reveal: subtle gold halo grows in */
    10%  { opacity: 1; transform: scale(1.02);
           filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.9))
                   drop-shadow(0 0 26px rgba(212, 175, 55, 0.55)); }

    /* Light damped tremor — half the amplitude, half the keyframes */
    18%  { transform: translate(-1.5px, 1px) scale(1.01); }
    28%  { transform: translate( 1.5px,-1px) scale(1.005); }
    38%  { transform: translate(-1px,  0.5px); }
    48%  { transform: translate( 0.6px, 0); }
    58%  { transform: translate(-0.3px, 0); }
    70%  { transform: translate(0, 0); }

    /* Settle into final state */
    100% { opacity: 1; transform: translate(0,0) scale(1);
           filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.9))
                   drop-shadow(0 0 18px rgba(212, 175, 55, 0.25)); }
}

@media (prefers-reduced-motion: reduce) {
    .hero h1.hero-logo { animation: none; }
    .hero h1.hero-logo span { animation: none; }
}

.hero .hero-sub {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    font-family: 'Cinzel', serif;
    color: var(--cyan);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin: 0 auto 1.25rem;
    text-shadow:
        0 0 8px  rgba(0, 191, 255, 0.45),
        0 0 18px rgba(0, 191, 255, 0.20);
    animation: subGlow 7.5s ease-in-out infinite;
}

.hero .hero-sub::before,
.hero .hero-sub::after {
    content: '';
    width: clamp(36px, 7vw, 80px);
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 191, 255, 0.15) 25%,
        var(--cyan) 80%,
        rgba(0, 191, 255, 0.85) 100%);
    filter: drop-shadow(0 0 4px rgba(0, 191, 255, 0.5));
}

.hero .hero-sub::after {
    background: linear-gradient(90deg,
        rgba(0, 191, 255, 0.85) 0%,
        var(--cyan) 20%,
        rgba(0, 191, 255, 0.15) 75%,
        transparent 100%);
}

@keyframes subGlow {
    0%, 100% {
        text-shadow:
            0 0 8px  rgba(0, 191, 255, 0.40),
            0 0 18px rgba(0, 191, 255, 0.18);
        letter-spacing: 0.40em;
    }
    50% {
        text-shadow:
            0 0 16px rgba(0, 191, 255, 0.85),
            0 0 36px rgba(0, 191, 255, 0.45),
            0 0 60px rgba(0, 191, 255, 0.20);
        letter-spacing: 0.43em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero .hero-sub { animation: none; }
}

.hero h1 {
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8);
}

.hero .tagline {
    color: var(--text);
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.hero .tagline strong { color: var(--cyan); font-weight: 600; }

/* ====================================================================
   Buttons
   ==================================================================== */

.btn {
    position: relative;
    display: inline-block;
    overflow: hidden;
    padding: 0.85rem 2rem;
    background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 100%);
    color: #000;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25);
}

.btn:not(.btn-secondary)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(105deg,
        transparent 25%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 75%);
    transform: skewX(-12deg);
    animation: btnShimmer 4.5s ease-in-out 1.5s infinite;
    pointer-events: none;
}

@keyframes btnShimmer {
    0%, 100% { left: -120%; }
    35%, 65% { left: 200%; }
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    filter: brightness(1.08);
    color: #000;
}

.btn-secondary {
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan-dim);
    box-shadow: none;
}

.btn-secondary:hover {
    color: var(--cyan);
    background: rgba(0, 191, 255, 0.08);
    border-color: var(--cyan);
}

.btn-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ====================================================================
   Sections / Cards
   ==================================================================== */

section {
    padding: 4rem 0;
}

section.alt {
    position: relative;
    background:
        radial-gradient(ellipse at top, rgba(0, 191, 255, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse at bottom, rgba(212, 175, 55, 0.05) 0%, transparent 55%),
        var(--bg-elev);
    border-top: 1px solid rgba(212, 175, 55, 0.35);
    border-bottom: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow:
        inset 0 1px 0 rgba(255, 230, 150, 0.08),
        inset 0 -1px 0 rgba(255, 230, 150, 0.08);
}

/* gold gradient edges (top & bottom of section.alt) */
section.alt::before,
section.alt::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.25) 15%,
        var(--gold) 50%,
        rgba(212, 175, 55, 0.25) 85%,
        transparent 100%);
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5));
}

section.alt::before { top: -1px; }
section.alt::after  { bottom: -1px; }

/* cyan diamonds at left/right midpoints of section.alt — HUD-style */
section.alt > .container {
    position: relative;
}

section.alt > .container::before,
section.alt > .container::after {
    content: '◆';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cyan);
    font-size: 0.65rem;
    text-shadow: 0 0 6px var(--cyan-dim);
    pointer-events: none;
    opacity: 0.7;
}

section.alt > .container::before { left: -0.5rem; }
section.alt > .container::after  { right: -0.5rem; }

@media (max-width: 720px) {
    section.alt > .container::before,
    section.alt > .container::after { display: none; }
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.section-header h2::before {
    content: '◆ ';
    color: var(--cyan);
    font-size: 0.7em;
    vertical-align: middle;
}

.section-header h2::after {
    content: ' ◆';
    color: var(--cyan);
    font-size: 0.7em;
    vertical-align: middle;
}

.section-header p {
    color: var(--text-dim);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 8px 8px,                           #00bfff 1.5px, transparent 2.4px),
        radial-gradient(circle at calc(100% - 8px) 8px,              #00bfff 1.5px, transparent 2.4px),
        radial-gradient(circle at 8px calc(100% - 8px),              #00bfff 1.5px, transparent 2.4px),
        radial-gradient(circle at calc(100% - 8px) calc(100% - 8px), #00bfff 1.5px, transparent 2.4px);
    filter: drop-shadow(0 0 3px rgba(0, 191, 255, 0.7));
    opacity: 0.5;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.card:hover {
    border-color: var(--border-hi);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

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

.card:hover::after {
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(0, 191, 255, 1));
}

.card h3 {
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.card .card-link {
    color: var(--cyan);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card .card-link::after {
    content: ' →';
    transition: margin-left 0.15s ease;
    display: inline-block;
}

.card:hover .card-link::after { margin-left: 4px; }

/* ====================================================================
   Class portraits
   ==================================================================== */

.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.class-card {
    background:
        radial-gradient(ellipse at top, rgba(0, 191, 255, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-card) 0%, #0d0d0d 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem 1rem;
    text-align: center;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.class-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 30px;
    background: radial-gradient(ellipse, rgba(212, 175, 55, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.class-card:hover {
    border-color: var(--border-hi);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 191, 255, 0.08);
}

.class-card .portrait {
    position: relative;
    width: 148px;
    height: 148px;
    margin: 0 auto 0.95rem;
    padding: 5px;
    background:
        linear-gradient(135deg,
            #fbe48f 0%,
            #d4af37 25%,
            #6e4f12 50%,
            #d4af37 75%,
            #8a651a 100%);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 230, 150, 0.45),
        0 10px 24px rgba(0, 0, 0, 0.75),
        0 20px 36px rgba(0, 0, 0, 0.45);
    transition: box-shadow 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}

.class-card .portrait::before {
    content: '';
    position: absolute;
    inset: 5px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0, 191, 255, 0.1) 0%, transparent 60%),
        linear-gradient(180deg, #1a1a1a 0%, #050505 100%);
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.85);
    z-index: 0;
}

.class-card .portrait::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        radial-gradient(circle at 9px 9px,                            #00bfff 2px, transparent 3px),
        radial-gradient(circle at calc(100% - 9px) 9px,               #00bfff 2px, transparent 3px),
        radial-gradient(circle at 9px calc(100% - 9px),               #00bfff 2px, transparent 3px),
        radial-gradient(circle at calc(100% - 9px) calc(100% - 9px),  #00bfff 2px, transparent 3px);
    filter: drop-shadow(0 0 5px rgba(0, 191, 255, 0.8));
    transition: filter 0.25s ease;
}

.class-card .portrait img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.85));
    transition: transform 0.25s ease;
}

.class-card:hover .portrait {
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 230, 150, 0.5),
        0 14px 32px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(212, 175, 55, 0.55);
    transform: translateY(-3px) scale(1.02);
}

.class-card:hover .portrait::after {
    filter: drop-shadow(0 0 8px rgba(0, 191, 255, 1));
}

.class-card:hover .portrait img {
    transform: scale(1.06);
}

.class-card .class-name {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.class-card .class-short {
    color: var(--text-dim);
    font-size: 0.75rem;
    margin: 0.15rem 0 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ====================================================================
   Lists / Steps
   ==================================================================== */

.steps {
    display: grid;
    gap: 1.5rem;
    counter-reset: step;
}

.step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    counter-increment: step;
}

.step::before {
    content: counter(step);
    flex-shrink: 0;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--gold);
    width: 56px;
    height: 56px;
    line-height: 56px;
    text-align: center;
    border: 2px solid var(--gold-dim);
    border-radius: 50%;
    background: var(--bg);
}

.step h3 { margin-bottom: 0.3rem; }
.step p { margin: 0; color: var(--text-dim); }

/* ====================================================================
   Tables (server-info rates)
   ==================================================================== */

.rate-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.rate-table th,
.rate-table td {
    padding: 0.85rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rate-table th {
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.rate-table td:last-child {
    text-align: right;
    color: var(--cyan);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rate-table tr:last-child td { border-bottom: none; }

/* ====================================================================
   Status pill
   ==================================================================== */

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(0, 191, 255, 0.12);
    border: 1px solid var(--cyan-dim);
    border-radius: 999px;
    color: var(--cyan);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ====================================================================
   Footer
   ==================================================================== */

.site-footer {
    position: relative;
    background: #050505;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    padding: 2.5rem 0 1.5rem;
    margin-top: 4rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    box-shadow: inset 0 1px 0 rgba(255, 230, 150, 0.08);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.25) 15%,
        var(--gold) 50%,
        rgba(212, 175, 55, 0.25) 85%,
        transparent 100%);
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5));
}

.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--gold); }

.site-footer .footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.site-footer .disclaimer {
    font-size: 0.75rem;
    max-width: 600px;
    margin: 0.75rem auto 0;
    color: var(--muted);
    opacity: 0.7;
}

/* ====================================================================
   Scroll-reveal (paired with assets/js/main.js + IntersectionObserver)
   ==================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.7s cubic-bezier(0.16, 0.84, 0.44, 1) var(--reveal-delay, 0ms),
        transform 0.7s cubic-bezier(0.16, 0.84, 0.44, 1) var(--reveal-delay, 0ms);
}

.reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ====================================================================
   Utility
   ==================================================================== */

.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-2 { margin-top: 2rem; }

.lede {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 700px;
    margin: 0 auto 2rem;
    text-align: center;
}

/* ====================================================================
   Responsive
   ==================================================================== */

@media (max-width: 640px) {
    .site-header .container { flex-direction: column; gap: 0.75rem; }
    .nav { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .nav a { font-size: 0.8rem; }
    .hero { min-height: 60vh; padding: 3rem 1rem; }
    section { padding: 3rem 0; }
    .step { flex-direction: column; align-items: center; text-align: center; }
}
