
:root {
    --night: #080b13;
    --surface: rgba(15, 20, 31, 0.78);
    --silver: #e2e7f2;
    --muted: #9ca8bc;
    --blue: #9ebce9;
    --gold: #a99a75;
    --border: rgba(207, 221, 246, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px;
}

body {
    margin: 0;
    background: var(--night);
    color: var(--silver);
    font-family: Georgia, "Times New Roman", serif;
    overflow-x: hidden;
}

a {
    color: inherit;
}

.cosmos {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(
            ellipse at 50% 27%,
            rgba(45, 65, 105, 0.25),
            transparent 49%
        ),
        linear-gradient(
            180deg,
            #080b13 0%,
            #0c1120 54%,
            #080b13 100%
        );
}

.stars {
    position: absolute;
    inset: -50%;
    opacity: 0.55;
    background-image:
        radial-gradient(circle, #ffffff 1px, transparent 1.5px),
        radial-gradient(circle, #a9c9ff 1px, transparent 1.5px),
        radial-gradient(circle, #ffffff 0.7px, transparent 1px);
    background-size: 97px 113px, 157px 179px, 61px 83px;
    background-position: 0 0, 42px 72px, 21px 33px;
    animation: star-drift 100s linear infinite;
}

.nebula {
    position: absolute;
    width: 75vw;
    height: 60vw;
    top: 0;
    left: 12%;
    background: radial-gradient(
        ellipse,
        rgba(67, 91, 145, 0.13),
        transparent 68%
    );
    filter: blur(35px);
}

.moon {
    position: absolute;
    width: 240px;
    height: 240px;
    top: 95px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    opacity: 0.11;
    background: radial-gradient(
        circle at 35% 30%,
        #ffffff,
        #9cb4d8 42%,
        #33415b 70%,
        transparent 72%
    );
    filter: blur(2px);
}

.horizon {
    position: absolute;
    width: 130%;
    height: 320px;
    left: -15%;
    top: 430px;
    border-radius: 50%;
    border-top: 1px solid rgba(155, 184, 231, 0.18);
    background: radial-gradient(
        ellipse at center top,
        rgba(39, 54, 85, 0.2),
        transparent 65%
    );
}

.topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 25px 6%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.brand {
    text-decoration: none;
    letter-spacing: 0.2em;
    font-size: 0.82rem;
    font-weight: bold;
}

.brand span {
    color: var(--blue);
}

.topbar-label,
.back-link {
    font-family: Arial, sans-serif;
    font-size: 0.64rem;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.back-link {
    text-decoration: none;
    letter-spacing: 0.04em;
}

.back-link:hover {
    color: white;
}

.hero {
    min-height: 690px;
    min-height: min(790px, 88svh);
    padding: 95px 20px 85px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-emblem {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(196, 214, 247, 0.3);
    transform: rotate(45deg);
    margin-bottom: 38px;
    color: #d9e5fa;
}

.hero-emblem span {
    transform: rotate(-45deg);
    font-size: 1.3rem;
}

.eyebrow {
    font-family: Arial, sans-serif;
    font-size: 0.67rem;
    letter-spacing: 0.25em;
    line-height: 1.8;
    color: var(--blue);
}

.hero h1 {
    margin: 22px 0 0;
    max-width: 1050px;
    font-size: clamp(3.1rem, 9.5vw, 8rem);
    line-height: 0.98;
    font-weight: normal;
    letter-spacing: 0.035em;
    text-shadow: 0 0 45px rgba(138, 170, 230, 0.12);
}

.hero h1 span {
    display: block;
    color: #b9c9e5;
    font-size: 0.72em;
    margin-top: 14px;
    letter-spacing: 0.12em;
}

.title-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: min(300px, 70%);
    margin: 34px 0 22px;
    color: var(--gold);
}

.title-divider span {
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(169, 154, 117, 0.65)
    );
}

.title-divider span:last-child {
    transform: rotate(180deg);
}

.title-divider i {
    font-style: normal;
}

.hero-description {
    max-width: 460px;
    margin: 0;
    color: #b0b9ca;
    font-size: 1.05rem;
    line-height: 1.9;
}

.enter-button {
    margin-top: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-width: 230px;
    padding: 16px 22px;
    border: 1px solid rgba(183, 204, 239, 0.45);
    background: rgba(20, 30, 48, 0.48);
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.17em;
    transition: background 0.3s, border-color 0.3s,
                transform 0.3s;
}

.enter-button:hover {
    background: rgba(88, 112, 158, 0.22);
    border-color: #d3e2ff;
    transform: translateY(-3px);
}

.scroll-note {
    margin-top: 24px;
    color: #737f94;
    font: 0.58rem Arial, sans-serif;
    letter-spacing: 0.18em;
}

.discover {
    max-width: 1180px;
    padding: 70px 30px 100px;
    margin: 0 auto;
}

.section-heading {
    max-width: 560px;
    margin: 0 auto 48px;
    text-align: center;
}

.section-heading h2,
.book-section h2 {
    font-weight: normal;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.2;
    margin: 14px 0;
}

.section-heading h2 span,
.book-section h2 span {
    display: block;
    color: #aebfdd;
    font-style: italic;
}

.section-heading > p:last-child,
.book-description {
    color: var(--muted);
    line-height: 1.8;
    font-size: 0.95rem;
}

.realm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
    perspective: 1200px;
}

.realm-card {
    position: relative;
    min-height: 345px;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 23px;
    text-decoration: none;
    border: 1px solid var(--border);
    background: linear-gradient(
        145deg,
        rgba(23, 31, 47, 0.92),
        rgba(9, 13, 22, 0.94)
    );
    transition: transform 0.45s ease,
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

.realm-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: 0.8;
    background: radial-gradient(
        ellipse at 50% 25%,
        rgba(123, 153, 208, 0.14),
        transparent 68%
    );
    transition: opacity 0.4s;
}

.realm-card:hover {
    transform: translateY(-8px) rotateX(1deg);
    border-color: rgba(178, 205, 249, 0.48);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
}

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

.card-index {
    position: absolute;
    top: 18px;
    right: 20px;
    color: rgba(199, 215, 242, 0.65);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
}

.card-art {
    height: 155px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.card-copy {
    position: relative;
    padding-top: 20px;
}

.card-category {
    font: 0.58rem Arial, sans-serif;
    letter-spacing: 0.17em;
    color: #91a8d0;
}

.card-copy h3 {
    font-size: 1.8rem;
    font-weight: normal;
    margin: 10px 0;
}

.card-copy > p:not(.card-category) {
    max-width: 340px;
    color: #a4afc2;
    font-size: 0.88rem;
    line-height: 1.7;
}

.card-link {
    display: inline-block;
    margin-top: 14px;
    color: #c5d5f0;
    font: 0.63rem Arial, sans-serif;
    letter-spacing: 0.13em;
}

.card-link b {
    margin-left: 7px;
    font-size: 0.9rem;
}

/* Characters: a royal, shadowed atmosphere */

.character-card {
    background: linear-gradient(
        150deg,
        rgba(28, 34, 52, 0.94),
        rgba(10, 12, 20, 0.98)
    );
}

.character-art {
    background: radial-gradient(
        ellipse,
        rgba(150, 174, 218, 0.12),
        transparent 65%
    );
}

.silhouette {
    position: relative;
    z-index: 1;
    font-size: 6.5rem;
    line-height: 1;
    color: rgba(199, 215, 243, 0.67);
    text-shadow: 0 0 40px rgba(134, 165, 223, 0.32);
    animation: float 6s ease-in-out infinite;
}

.art-orbit {
    position: absolute;
    width: 130px;
    height: 130px;
    border: 1px solid rgba(164, 190, 232, 0.22);
    transform: rotateX(65deg) rotateZ(-20deg);
    border-radius: 50%;
}

/* World map: cartographic rings and old parchment tones */

.map-card {
    background: linear-gradient(
        145deg,
        rgba(39, 36, 33, 0.8),
        rgba(14, 15, 20, 0.97)
    );
}

.map-art {
    background: radial-gradient(
        ellipse,
        rgba(167, 145, 104, 0.15),
        transparent 65%
    );
}

.map-ring {
    position: absolute;
    border: 1px solid rgba(192, 172, 131, 0.44);
    border-radius: 50%;
    transform: rotateX(62deg) rotateZ(-20deg);
}

.ring-one {
    width: 170px;
    height: 135px;
}

.ring-two {
    width: 115px;
    height: 90px;
}

.map-star {
    color: #d7c6a1;
    font-size: 3.8rem;
    text-shadow: 0 0 35px rgba(204, 180, 133, 0.42);
}

.map-lines {
    position: absolute;
    inset: 15px 30%;
    opacity: 0.45;
    border-left: 1px solid #a99a75;
    border-right: 1px solid #a99a75;
    transform: skewX(-18deg);
}

/* Locations: towering architecture */

.location-card {
    background: linear-gradient(
        180deg,
        rgba(23, 38, 54, 0.94),
        rgba(8, 13, 21, 0.98)
    );
}

.location-art {
    align-items: end;
    background: linear-gradient(
        180deg,
        rgba(85, 124, 161, 0.08),
        transparent
    );
}

.tower {
    position: absolute;
    bottom: 5px;
    width: 36px;
    height: 85px;
    border: 1px solid rgba(174, 202, 234, 0.36);
    background: linear-gradient(
        90deg,
        rgba(68, 91, 123, 0.2),
        rgba(151, 177, 209, 0.12)
    );
}

.tower::before {
    content: "";
    position: absolute;
    left: -8px;
    top: -22px;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 24px solid rgba(131, 158, 197, 0.36);
}

.tower-back {
    left: 20%;
    height: 65px;
    transform: scale(0.85);
}

.tower-main {
    left: calc(50% - 18px);
    height: 110px;
}

.tower-side {
    right: 20%;
    height: 75px;
    transform: scale(0.9);
}

.tower-light {
    position: absolute;
    width: 150px;
    height: 70px;
    bottom: 0;
    background: radial-gradient(
        ellipse,
        rgba(132, 173, 221, 0.2),
        transparent 70%
    );
}

/* Artifacts: an ancient, mysterious object */

.artifact-card {
    background: linear-gradient(
        140deg,
        rgba(42, 34, 43, 0.86),
        rgba(12, 12, 20, 0.98)
    );
}

.artifact-art {
    background: radial-gradient(
        ellipse,
        rgba(176, 149, 191, 0.12),
        transparent 65%
    );
}

.artifact-book {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 78px;
    height: 100px;
    border: 1px solid rgba(202, 185, 217, 0.56);
    background: linear-gradient(
        135deg,
        #333044,
        #151522 65%,
        #292439
    );
    box-shadow:
        8px 7px 0 rgba(0, 0, 0, 0.25),
        0 0 40px rgba(163, 138, 192, 0.13);
    color: #d5c5ed;
    font-size: 2.5rem;
    transform: rotate(-7deg);
    animation: float 7s ease-in-out infinite;
}

.artifact-halo {
    position: absolute;
    width: 135px;
    height: 135px;
    border: 1px solid rgba(197, 175, 220, 0.3);
    border-radius: 50%;
}

.artifact-rune {
    position: absolute;
    top: 15px;
    right: 27%;
    color: #c7b2e0;
    font-size: 1.5rem;
}

.realm-note {
    text-align: center;
    margin-top: 36px;
    color: #75839a;
    font: 0.59rem/2 Arial, sans-serif;
    letter-spacing: 0.15em;
}

.book-section {
    max-width: 730px;
    margin: 0 auto;
    padding: 35px 25px 110px;
    text-align: center;
}

.book-rule {
    width: 90px;
    height: 1px;
    margin: 0 auto 42px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--gold),
        transparent
    );
}

.book-description {
    max-width: 470px;
    margin: 20px auto 34px;
}

.volume-list {
    display: grid;
    gap: 13px;
    text-align: left;
}

.book-volume {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    transition: border-color 0.3s, transform 0.3s,
                background 0.3s;
}

a.book-volume:hover {
    transform: translateY(-3px);
    border-color: rgba(183, 204, 239, 0.55);
    background: rgba(30, 40, 59, 0.85);
}

.volume-label {
    color: var(--blue);
    font: 0.62rem Arial, sans-serif;
    letter-spacing: 0.15em;
}

.book-volume h3 {
    font-weight: normal;
    font-size: 1.3rem;
    margin: 10px 0 6px;
}

.book-volume p {
    color: var(--muted);
    margin: 0;
    font-size: 0.83rem;
}

.volume-arrow,
.volume-lock {
    font-size: 1.5rem;
    color: #c5d5f0;
}

.upcoming {
    opacity: 0.72;
    cursor: default;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 18px;
    padding: 25px 6%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #8591a5;
    font: 0.59rem Arial, sans-serif;
    letter-spacing: 0.13em;
}

.footer a {
    color: #aabbd8;
    text-decoration: none;
}

.realm-notice {
    position: fixed;
    z-index: 10;
    left: 50%;
    bottom: 24px;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 14px 20px;
    border: 1px solid var(--border);
    background: #111827;
    color: #dce5f5;
    font: 0.82rem/1.6 Arial, sans-serif;
    text-align: center;
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.realm-notice.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@keyframes star-drift {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(120px);
    }
}

@keyframes float {
    0%, 100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -7px;
    }
}

@media (min-width: 900px) {
    .character-card,
    .map-card,
    .location-card,
    .artifact-card,
    .underworld-card,
    .game-card {
        transform: none;
    }

    .character-card:hover,
    .map-card:hover,
    .location-card:hover,
    .artifact-card:hover,
    .underworld-card:hover,
    .game-card:hover {
        transform: translateY(-8px);
    }
}

@media (max-width: 650px) {
    .topbar {
        padding: 20px 5%;
        gap: 10px;
    }

    .topbar-label {
        display: none;
    }

    .hero {
        min-height: 660px;
        min-height: 82svh;
        padding: 70px 20px;
    }

    .hero h1 {
        font-size: clamp(2.8rem, 12vw, 5rem);
    }

    .hero h1 span {
        font-size: 0.67em;
    }

    .moon {
        width: 180px;
        height: 180px;
    }

    .discover {
        padding: 55px 18px 75px;
    }

    .realm-card {
        min-height: 330px;
    }

    .character-card,
    .map-card,
    .location-card,
    .artifact-card {
        transform: none;
    }

    .book-section {
        padding-bottom: 75px;
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
/* =========================
UNDERWORLD CARD
========================= */

.underworld-card {
position: relative;
overflow: hidden;
border-color: rgba(151, 111, 190, 0.22);
background:
linear-gradient(
145deg,
rgba(30, 19, 43, 0.82),
rgba(10, 10, 20, 0.88)
);
}

.underworld-card:hover {
border-color: rgba(180, 133, 226, 0.55);
background:
linear-gradient(
145deg,
rgba(45, 26, 62, 0.88),
rgba(13, 10, 24, 0.94)
);
}

.underworld-card .card-index {
color: #9d83bd;
}

.underworld-card .card-category {
color: #b79ad8;
}

.underworld-card .card-link {
color: #c6a7e8;
}

/* Underworld artwork */

.underworld-art {
position: relative;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
isolation: isolate;
background:
radial-gradient(
ellipse at 50% 75%,
rgba(112, 56, 156, 0.25),
transparent 55%
),
linear-gradient(
180deg,
rgba(17, 13, 29, 0.2),
rgba(5, 5, 12, 0.75)
);
}

.underworld-ring {
position: absolute;
left: 50%;
top: 50%;
border: 1px solid rgba(177, 132, 222, 0.28);
border-radius: 50%;
transform: translate(-50%, -50%);
}

.underworld-art .ring-one {
width: 115px;
height: 115px;
}

.underworld-art .ring-two {
width: 85px;
height: 85px;
border-color: rgba(177, 132, 222, 0.18);
}

.underworld-gate {
position: absolute;
left: 50%;
bottom: 12%;
width: 54px;
height: 78px;
border: 1px solid rgba(190, 147, 232, 0.65);
border-bottom: 0;
border-radius: 50% 50% 0 0;
transform: translateX(-50%);
box-shadow:
0 0 18px rgba(143, 77, 194, 0.18),
inset 0 0 18px rgba(143, 77, 194, 0.12);
}

.underworld-light {
position: absolute;
left: 50%;
bottom: 12%;
width: 30px;
height: 45px;
background: rgba(139, 77, 189, 0.18);
filter: blur(12px);
transform: translateX(-50%);
animation: underworldPulse 4s ease-in-out infinite alternate;
}

@keyframes underworldPulse {
from {
opacity: 0.35;
transform: translateX(-50%) scale(0.8);
}

to {
    opacity: 0.9;
    transform: translateX(-50%) scale(1.15);
}

}

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

/* =========================
   THE UNWRITTEN REALM
========================= */

.game-card {
    border-color: rgba(113, 171, 163, 0.22);
    background:
        linear-gradient(
            145deg,
            rgba(13, 35, 39, 0.88),
            rgba(8, 13, 23, 0.92)
        );
}

.game-card:hover {
    border-color: rgba(190, 166, 112, 0.55);
    background:
        linear-gradient(
            145deg,
            rgba(20, 47, 47, 0.92),
            rgba(9, 14, 24, 0.96)
        );
}

.game-card .card-index {
    color: #91b9ad;
}

.game-card .card-category {
    color: #a9c9bd;
}

.game-card .card-link {
    color: #c8b783;
}

.game-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(
            circle at center,
            rgba(76, 143, 127, 0.20),
            transparent 58%
        ),
        linear-gradient(
            180deg,
            rgba(8, 22, 28, 0.25),
            rgba(4, 9, 17, 0.85)
        );
}

.game-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid rgba(139, 191, 173, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.game-orbit-one {
    width: 105px;
    height: 105px;
}

.game-orbit-two {
    width: 75px;
    height: 75px;
    border-color: rgba(201, 183, 131, 0.35);
}

.game-gateway {
    position: relative;
    z-index: 1;
    color: #d2c49a;
    font-size: 35px;
    font-style: italic;
    text-shadow: 0 0 22px rgba(154, 205, 183, 0.55);
}

.game-glow {
    position: absolute;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(72, 151, 132, 0.22);
    filter: blur(25px);
    animation: gameRealmPulse 5s ease-in-out infinite alternate;
}

@keyframes gameRealmPulse {
    from {
        opacity: 0.3;
        transform: scale(0.8);
    }

    to {
        opacity: 0.9;
        transform: scale(1.2);
    }
}

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