/* ==========================================================================
   YGG Portal - homepage (/ragnarok/)
   ========================================================================== */
body.ygg-home {
    background:
        linear-gradient(180deg, rgba(6, 10, 22, .55), rgba(6, 10, 22, .82) 70%, var(--bg)),
        url('/ragnarok/assets/photos/backgroundhome.png') 65% 40% / cover fixed no-repeat,
        var(--bg);
    padding-bottom: 65px; /* room for the fixed Discord footer bar */
}
@media (max-width: 768px) { body.ygg-home { background-attachment: scroll, scroll, scroll; } }
body.ygg-home .ygg-bar { background: rgba(9, 15, 29, .75); backdrop-filter: blur(6px); }
body.ygg-home .ygg-main { padding-top: 40px; }

/* ---------- Hero ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 440px); gap: 36px; align-items: center; min-height: 420px; }
.home-eyebrow { display: inline-block; padding: 7px 16px; border: 1px solid rgba(242, 200, 115, .35); border-radius: 999px; background: rgba(242, 200, 115, .08); color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.home-title { margin: 18px 0 12px; font: 800 clamp(34px, 5.2vw, 60px)/1.08 var(--font-display); color: #fff; text-shadow: 0 3px 18px rgba(0, 0, 0, .6); }
.home-title span { color: var(--gold); }
.home-lead { margin: 0 0 22px; max-width: 54ch; font-size: 17px; color: #d6deec; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.home-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.home-chips li { padding: 6px 12px; border-radius: 8px; background: rgba(13, 22, 38, .78); border: 1px solid var(--line); font-size: 13px; color: #dbe2ef; }
.home-chips b { color: var(--gold); }
.home-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.home-cta .ygg-btn { min-height: 48px; padding: 12px 22px; font-size: 15px; }
.home-live { display: flex; gap: 26px; margin-top: 28px; }
.home-live div { display: grid; }
.home-live strong { font-size: 28px; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.home-live div > span { font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.home-live .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; margin-right: 6px; vertical-align: middle; }

/* ---------- Classic RO login panel (art from the GRF) ---------- */
.home-login { width: min(100%, 420px); margin: 0 auto; }
.home-login__title { margin: 0 0 10px; text-align: center; font: 700 15px var(--font); letter-spacing: .14em; color: var(--gold); text-transform: uppercase; text-shadow: 0 2px 6px #000; }
#ygg-login-panel { position: relative; display: block; width: 100%; aspect-ratio: 1880 / 816; margin: 0; background: url('/ragnarok/assets/photos/login-background-70-opacity.png') center / 100% 100% no-repeat; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .55)); }
#ygg-login-panel .ro-input { position: absolute; left: 10%; width: 45%; height: 16%; padding: 0 5px; border: 0; outline: none; background: transparent; color: #26395f; text-align: center; font: 12px Arial, sans-serif; z-index: 3; }
#ygg-login-panel .ro-input:focus { box-shadow: inset 0 -2px rgba(102, 136, 204, .8); }
#ygg-login-panel .ro-input::placeholder { color: #52668b; opacity: 1; }
#ygg-account { top: 32%; }
#ygg-password { top: 51%; }
.ro-save { position: absolute; left: 18.5%; top: 66.5%; display: flex; align-items: center; gap: 4px; color: #26395f; font: 10px Arial, sans-serif; z-index: 4; cursor: pointer; }
.ro-save input { accent-color: #6688cc; margin: 0; }
#ygg-login-submit { position: absolute; left: 61%; top: 22%; width: 31%; height: 61%; border: 0; padding: 0; background: transparent; border-radius: 50%; cursor: pointer; z-index: 5; }
#ygg-login-submit::after { content: ""; position: absolute; left: -12px; top: 0; width: 99.5%; height: 99.5%; border-radius: 50%; pointer-events: none; opacity: 0; box-shadow: 0 0 12px 5px rgba(255, 220, 75, .75); transition: opacity .18s ease; }
#ygg-login-submit:hover::after, #ygg-login-submit:focus-visible::after { opacity: 1; }
#ygg-login-submit:disabled { cursor: progress; }
.ro-link { position: absolute; top: calc(81% - 6px); width: 23%; height: 11%; color: transparent !important; font-size: 0; border-radius: 8px; z-index: 6; transition: box-shadow .2s, background-color .2s; }
.ro-link:hover, .ro-link:focus-visible { background-color: rgba(255, 255, 255, .08); box-shadow: 0 0 8px 2px rgba(255, 255, 255, .35), 0 0 18px 4px rgba(180, 220, 255, .2), inset 0 0 8px rgba(255, 255, 255, .25); }
.ro-download { left: 11%; }
.ro-forgot { left: 38%; }
.home-login__status { min-height: 20px; margin: 10px 0 0; text-align: center; color: #ffe3a2; font-size: 13px; text-shadow: 0 2px 4px #000; }
.home-login__status.is-error { color: #ffb4b4; }
.home-login__alt { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; }
.home-login__alt a { color: #dbe2ef !important; text-shadow: 0 1px 4px #000; }
.home-login__alt a:hover { color: var(--gold) !important; }

/* Signed-in card */
.home-account .ygg-card__label { color: var(--gold); }
.home-account h2 { margin: 6px 0 16px; font: 700 24px var(--font-display); color: #fff; overflow-wrap: anywhere; }
.home-account .ygg-stat { font-size: 24px; }
.home-account .home-actions { display: grid; gap: 10px; margin-top: 18px; }

/* ---------- Sections ---------- */
.home-section { margin-top: 64px; }
.home-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.home-section__head h2 { margin: 0; font: 700 28px var(--font-display); color: var(--gold); }
.home-section__head p { margin: 0; color: var(--muted); }

.home-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.home-info div { padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(20, 30, 51, .88); border: 1px solid var(--line); }
.home-info dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.home-info dd { margin: 4px 0 0; font-size: 17px; font-weight: 700; color: #fff; }
.home-tech { margin-top: 12px; color: var(--muted); font-size: 14px; }

.home-explore { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.home-explore a.ygg-card { display: flex; flex-direction: column; gap: 6px; min-height: 160px; }
.home-explore .ico { font-size: 26px; color: var(--gold); }
.home-explore h3 { margin: 0; font-size: 18px; color: #fff; }
.home-explore p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.home-explore .go { font-size: 13px; font-weight: 700; color: var(--gold); }

.home-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.home-steps li { counter-increment: step; }
.home-steps .ygg-card { height: 100%; }
.home-steps .ygg-card::before { content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px; border-radius: 50%; background: linear-gradient(180deg, #f8d584, var(--gold-2)); color: #1a1204; font-weight: 800; }
.home-steps h3 { margin: 0 0 6px; color: #fff; font-size: 17px; }
.home-steps p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }

@media (max-width: 900px) {
    .home-hero { grid-template-columns: 1fr; min-height: 0; }
    .home-hero__text { text-align: center; }
    .home-chips, .home-cta, .home-live { justify-content: center; }
    .home-lead { margin-left: auto; margin-right: auto; }
}
@media (max-width: 700px) {
    .home-steps { grid-template-columns: 1fr; }
    .home-section { margin-top: 44px; }
}

/* ---------- Register banner + fairy in the header cover (unchanged artwork) ---------- */
/* YGG REGISTER - HEADER V3 */
#ygg-v3-cover {
    position: relative;
}

#ygg-v3-register {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 100;
    display: block;
}

#ygg-v3-register img {
    display: block;
    width: 198px;
    height: auto;
    transition: transform 0.2s ease;
}

#ygg-v3-register:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    #ygg-v3-register {
        top: 8px;
        right: 8px;
    }

    #ygg-v3-register img {
        width: 110px;
    }
}


/* YGG REGISTER - FANTASY GLOW */
#ygg-v3-cover #ygg-v3-register {
    top: 40px;
    right: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

#ygg-v3-register .ygg-v3-register-text {
    display: block;
    margin-top: 4px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffe49a;
    -webkit-text-stroke: 0.5px #63340b;
    text-shadow:
        0 1px 0 #6b390b,
        0 2px 2px #422000,
        0 0 8px #ffb300,
        0 0 18px #ff8800,
        0 0 28px #ffcc33;
    animation: yggRegisterGlow 2s ease-in-out infinite alternate;
}

@keyframes yggRegisterGlow {
    from {
        filter: brightness(1);
        text-shadow:
            0 2px 2px #422000,
            0 0 7px #ffb300,
            0 0 14px #ff8800;
    }
    to {
        filter: brightness(1.2);
        text-shadow:
            0 2px 2px #422000,
            0 0 12px #ffcc33,
            0 0 24px #ff9900,
            0 0 38px #ffdd55;
    }
}

@media (max-width: 768px) {
    #ygg-v3-cover #ygg-v3-register {
        top: 20px;
        right: 20px;
    }

    #ygg-v3-register .ygg-v3-register-text {
        font-size: 17px;
        letter-spacing: 1px;
    }
}


/* YGG REGISTER - TEXT ALIGNMENT FIX */
#ygg-v3-register .ygg-v3-register-text {
    position: relative;
    left: 18px;
    margin-top: -8px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    #ygg-v3-register .ygg-v3-register-text {
        left: 11px;
    }
}


/* YGG REGISTER - LOWER BANNER IMAGE */
#ygg-v3-register img {
    position: relative;
    top: 22px;
}


/* YGG REGISTER - LARGER BANNER */
#ygg-v3-cover #ygg-v3-register img {
    width: 297px;
    max-width: none;
    height: auto;
}


/* YGG REGISTER - FORCE GLOWING TEXT UPWARD */
body #ygg-v3-cover #ygg-v3-register span.ygg-v3-register-text {
    transform: translate(13%, -22px) !important;
}


/* YGG REGISTER - HOVER COLOR */
#ygg-v3-register .ygg-v3-register-text {
    transition: color 0.3s ease, -webkit-text-stroke-color 0.3s ease;
}

#ygg-v3-register:hover .ygg-v3-register-text {
    color: #8feaff !important;
    -webkit-text-stroke: 0.5px #145a9c !important;
    animation: none !important;
    text-shadow:
        0 0 8px #00d9ff,
        0 0 16px #00bfff,
        0 0 28px #008cff,
        0 0 40px #0077ff !important;
}


/* YGG REGISTER - MAGICAL FAIRY EFFECT */

#ygg-v3-register {
    isolation: isolate;
}

#ygg-v3-register .ygg-fairy-orbit {
    position: absolute;
    width: 260px;
    height: 110px;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 5;
}

#ygg-v3-register .ygg-fairy {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    animation: yggFairyCircle 5s linear infinite;
}

#ygg-v3-register .ygg-fairy-core {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff8c4;
    box-shadow:
        0 0 6px 3px #fff8c4,
        0 0 14px 6px #ffd700,
        0 0 25px 9px #ffb300;
    animation: yggFairyPulse 0.7s ease-in-out infinite alternate;
}

#ygg-v3-register .ygg-fairy-sparkles {
    position: absolute;
    left: -20px;
    top: -15px;
    color: #fff1a0;
    font-size: 14px;
    white-space: nowrap;
    text-shadow:
        0 0 6px #fff,
        0 0 12px #ffd700;
    animation: yggFairySparkle 0.5s ease-in-out infinite alternate;
}

@keyframes yggFairyCircle {
    0%   { transform: translate(-130px, -25px); }
    25%  { transform: translate(0px, -65px); }
    50%  { transform: translate(130px, -25px); }
    75%  { transform: translate(0px, 45px); }
    100% { transform: translate(-130px, -25px); }
}

@keyframes yggFairyPulse {
    from { opacity: 0.65; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1.3); }
}

@keyframes yggFairySparkle {
    from { opacity: 0.3; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    #ygg-v3-register .ygg-fairy,
    #ygg-v3-register .ygg-fairy-core,
    #ygg-v3-register .ygg-fairy-sparkles {
        animation: none;
    }
}



@media (max-width: 560px) {
    .home-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-info dd { font-size: 15px; }
}
