:root {
    --bg: #020813;
    --ink: #f3fbff;
    --muted: #9ab8c9;
    --soft: #ccecff;
    --cyan: #44d7ff;
    --blue: #246dff;
    --deep: #07182d;
    --panel: rgba(5, 22, 42, 0.72);
    --panel-strong: rgba(8, 32, 58, 0.9);
    --line: rgba(118, 223, 255, 0.18);
    --gold: #ffd66b;
    --ember: #ff8b4a;
    --violet: #9b7bff;
    --green: #69f0b5;
    --danger: #ff647c;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(2, 8, 19, 0.9) 0%, rgba(2, 8, 19, 0.55) 36%, rgba(2, 8, 19, 0.18) 72%),
        linear-gradient(180deg, rgba(2, 8, 19, 0.28) 0%, rgba(2, 8, 19, 0.72) 100%),
        radial-gradient(circle at 52% 8%, rgba(255, 214, 107, 0.1), transparent 22rem),
        url("./assets/mythic-dragon-skylands.png"),
        linear-gradient(180deg, #061221 0%, var(--bg) 55%, #02050c 100%);
    background-size: auto, auto, auto, cover, auto;
    background-position: center, center, center, center;
    background-attachment: fixed, fixed, fixed, fixed, scroll;
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

body::before {
    content: "MYTHIC REALM";
    position: fixed;
    right: -1rem;
    top: 6.6rem;
    z-index: -1;
    color: rgba(255, 214, 107, 0.055);
    font-size: clamp(4rem, 10vw, 11rem);
    font-weight: 950;
    line-height: 0.78;
    letter-spacing: 0;
    writing-mode: vertical-rl;
    pointer-events: none;
}

a {
    color: inherit;
}

.ambient-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(88, 211, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 211, 255, 0.018) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 80%, transparent 100%);
}

.realm-fog {
    position: fixed;
    inset: auto -10% 0;
    z-index: -1;
    height: 42vh;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 12% 100%, rgba(64, 197, 255, 0.13), transparent 48%),
        radial-gradient(ellipse at 78% 90%, rgba(105, 240, 181, 0.1), transparent 40%),
        linear-gradient(180deg, transparent, rgba(1, 5, 12, 0.72));
    filter: blur(2px);
}

.dragon-banner {
    position: fixed;
    top: 7.2rem;
    right: 3vw;
    z-index: -1;
    width: min(42vw, 35rem);
    aspect-ratio: 1.9;
    pointer-events: none;
    opacity: 0.44;
    filter: drop-shadow(0 0 28px rgba(68, 215, 255, 0.28)) drop-shadow(0 0 24px rgba(255, 139, 74, 0.12));
    animation: dragon-drift 7s ease-in-out infinite;
}

.dragon-body,
.dragon-wing,
.dragon-tail {
    position: absolute;
    display: block;
    background: linear-gradient(135deg, rgba(68, 215, 255, 0.7), rgba(18, 56, 96, 0.85) 48%, rgba(255, 139, 74, 0.48));
}

.dragon-body {
    left: 38%;
    top: 42%;
    width: 28%;
    height: 18%;
    border-radius: 55% 45% 48% 52%;
    transform: rotate(-8deg);
}

.dragon-body::before {
    content: "";
    position: absolute;
    right: -18%;
    top: -38%;
    width: 30%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(242, 252, 255, 0.72), rgba(68, 215, 255, 0.72));
    clip-path: polygon(0 52%, 62% 0, 100% 42%, 68% 100%);
}

.dragon-body::after {
    content: "";
    position: absolute;
    left: 18%;
    top: -62%;
    width: 12%;
    height: 62%;
    background: var(--gold);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    box-shadow: 2rem 0 0 rgba(255, 214, 107, 0.75), 4rem 0 0 rgba(255, 214, 107, 0.6);
}

.dragon-wing {
    top: 14%;
    width: 39%;
    height: 56%;
    clip-path: polygon(0 100%, 32% 0, 100% 80%, 58% 66%);
    transform-origin: 100% 78%;
    animation: wing-flap 2.8s ease-in-out infinite;
}

.wing-left {
    left: 7%;
}

.wing-right {
    right: 0;
    transform: scaleX(-1);
}

.dragon-tail {
    left: 10%;
    top: 47%;
    width: 34%;
    height: 9%;
    border-radius: 999px 0 0 999px;
    transform: rotate(9deg);
    clip-path: polygon(0 50%, 100% 0, 92% 100%);
}

.site-header {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: min(1180px, calc(100% - 2rem));
    min-height: 72px;
    transform: translateX(-50%);
}

.brand,
.top-nav,
.nav-cta {
    border: 1px solid var(--line);
    background: rgba(3, 14, 27, 0.58);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: max-content;
    padding: 0.7rem 0.95rem;
    border-radius: 1.1rem;
    text-decoration: none;
    font-weight: 800;
}

.brand-logo {
    width: 2.65rem;
    height: 2.65rem;
    object-fit: cover;
    border-radius: 0.9rem;
    box-shadow: 0 0 28px rgba(68, 215, 255, 0.3), 0 0 22px rgba(255, 214, 107, 0.18);
}

.top-nav {
    display: flex;
    justify-content: center;
    flex: 1;
    gap: 0.35rem;
    padding: 0.45rem;
    border-radius: 1.2rem;
}

.top-nav a {
    padding: 0.7rem 0.95rem;
    color: var(--soft);
    border-radius: 0.85rem;
    text-decoration: none;
    font-size: 0.94rem;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.top-nav a:hover {
    color: white;
    background: rgba(68, 215, 255, 0.12);
    transform: translateY(-1px);
}

.nav-cta {
    padding: 0.86rem 1.1rem;
    border-radius: 1rem;
    color: white;
    text-decoration: none;
    font-weight: 800;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 23rem;
    align-items: center;
    min-height: 92vh;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 8rem 0 4rem;
}

.hero-copy {
    position: relative;
    z-index: 3;
    max-width: 720px;
}

.eyebrow {
    margin: 0 0 1rem;
    color: var(--cyan);
    font-size: 0.77rem;
    font-weight: 900;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 1rem;
    max-width: 10ch;
    font-size: clamp(4.25rem, 8vw, 8.4rem);
    line-height: 0.86;
    letter-spacing: 0;
    text-shadow: 0 0 38px rgba(68, 215, 255, 0.2);
}

.realm-badge {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0 0 1.15rem;
}

.realm-badge span {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 0.72rem;
    border: 1px solid rgba(255, 214, 107, 0.26);
    border-radius: 999px;
    color: #fff5cc;
    background: linear-gradient(135deg, rgba(255, 139, 74, 0.18), rgba(5, 22, 42, 0.72));
    box-shadow: 0 0 22px rgba(255, 214, 107, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 900;
}

h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4.2vw, 4.1rem);
    line-height: 1;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 0.7rem;
    font-size: 1.35rem;
    letter-spacing: 0;
}

.hero-text,
.section-heading p,
.split-section p,
.server-card p,
.shop-card p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-text {
    max-width: 620px;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.4rem;
}

button,
.ghost-button {
    font: inherit;
}

.tilt-button {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 180ms ease, filter 180ms ease;
    will-change: transform;
}

.tilt-button:hover {
    filter: brightness(1.08);
}

.tilt-button.is-pressed {
    animation: button-pop 420ms cubic-bezier(0.2, 0.9, 0.15, 1);
}

.mega-button {
    position: relative;
    min-width: min(100%, 21rem);
    padding: 0;
    border: 0;
    border-radius: 1.35rem;
    color: white;
    background: transparent;
    cursor: pointer;
    perspective: 900px;
}

.button-depth {
    position: absolute;
    inset: 0;
    transform: translate3d(0, 10px, -22px);
    border-radius: inherit;
    background: linear-gradient(145deg, #0a3160, #05162a);
    box-shadow: 0 26px 48px rgba(0, 0, 0, 0.36);
}

.button-face {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(181, 243, 255, 0.28);
    border-radius: inherit;
    background:
        linear-gradient(135deg, rgba(67, 218, 255, 0.95), rgba(42, 111, 255, 0.95) 42%, rgba(255, 141, 74, 0.88) 105%),
        #0a6cff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 0 42px rgba(68, 215, 255, 0.25);
}

.button-face span {
    font-weight: 900;
    font-size: 1.1rem;
}

.button-face strong {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
}

.ghost-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.75rem;
    padding: 0 1.25rem;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    color: white;
    background: rgba(5, 22, 42, 0.78);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-decoration: none;
    font-weight: 850;
    cursor: pointer;
}

.hero-side {
    position: relative;
    z-index: 4;
    min-height: 420px;
}

.status-orbit {
    position: absolute;
    top: 15%;
    right: 0;
    display: grid;
    width: 18rem;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(118, 223, 255, 0.18);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(68, 215, 255, 0.13), rgba(2, 8, 19, 0.1) 62%);
    box-shadow: inset 0 0 60px rgba(68, 215, 255, 0.08), 0 0 80px rgba(36, 109, 255, 0.18);
}

.status-orbit::before,
.status-orbit::after {
    content: "";
    position: absolute;
    width: 1rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 24px var(--cyan);
}

.status-orbit::before {
    top: 2rem;
    left: 2.3rem;
    animation: pulse-dot 2.6s ease-in-out infinite;
}

.status-orbit::after {
    right: 1.3rem;
    bottom: 3.2rem;
    background: var(--gold);
    box-shadow: 0 0 24px rgba(255, 214, 107, 0.8);
    animation: pulse-dot 3.1s ease-in-out infinite;
}

.status-core {
    display: grid;
    place-items: center;
    width: 9.6rem;
    aspect-ratio: 1;
    border: 1px solid rgba(181, 243, 255, 0.22);
    border-radius: 2rem;
    background: rgba(4, 18, 34, 0.86);
    transform: rotate(-12deg);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: float-card 5s ease-in-out infinite;
}

.status-core span {
    color: var(--gold);
    font-size: 2rem;
    font-weight: 950;
}

.status-core strong {
    max-width: 7rem;
    text-align: center;
}

.live-card {
    position: absolute;
    right: 1.5rem;
    bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 20rem;
}

.signal {
    width: 0.9rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 24px var(--green);
}

.depth-card {
    border: 1px solid var(--line);
    border-radius: 1.4rem;
    background:
        radial-gradient(circle at 85% 0%, rgba(255, 214, 107, 0.08), transparent 30%),
        linear-gradient(145deg, rgba(12, 43, 73, 0.82), rgba(3, 14, 27, 0.78)),
        var(--panel);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    transform-style: preserve-3d;
}

.live-card,
.server-card,
.shop-card,
.console-preview {
    padding: 1.35rem;
}

.section {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 5rem 0;
}

.band {
    padding-top: 2rem;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 2rem;
}

.server-grid,
.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.server-card,
.shop-card {
    min-height: 18rem;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.server-card:hover,
.shop-card:hover {
    border-color: rgba(118, 223, 255, 0.38);
    transform: translateY(-8px) rotateX(3deg);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38), 0 0 42px rgba(68, 215, 255, 0.12);
}

.server-card.featured {
    background:
        radial-gradient(circle at 80% 0%, rgba(255, 214, 107, 0.16), transparent 30%),
        linear-gradient(145deg, rgba(24, 77, 121, 0.88), rgba(4, 18, 34, 0.82)),
        var(--panel-strong);
}

.card-icon {
    display: grid;
    width: 3rem;
    aspect-ratio: 1;
    place-items: center;
    margin-bottom: 1.2rem;
    border-radius: 1rem;
    color: #04111f;
    background: linear-gradient(145deg, white, var(--cyan));
    font-weight: 950;
    box-shadow: 0 0 28px rgba(68, 215, 255, 0.26);
}

.small-button {
    min-height: 2.7rem;
    margin-top: 0.8rem;
    padding: 0 1rem;
    font-size: 0.9rem;
}

.shop-section {
    padding-top: 3rem;
}

.beast-section {
    padding-top: 2rem;
}

.beast-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.beast-card {
    position: relative;
    min-height: 16rem;
    overflow: hidden;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.beast-card::after {
    content: "";
    position: absolute;
    right: -3rem;
    top: -3rem;
    width: 10rem;
    aspect-ratio: 1;
    border-radius: 36% 64% 48% 52%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.36), transparent 12%),
        linear-gradient(145deg, rgba(68, 215, 255, 0.22), rgba(17, 58, 96, 0.08));
    transform: rotate(20deg);
    opacity: 0.82;
}

.beast-card:hover {
    border-color: rgba(255, 214, 107, 0.34);
    transform: translateY(-8px) rotateX(3deg);
    box-shadow: 0 34px 84px rgba(0, 0, 0, 0.4), 0 0 48px rgba(255, 214, 107, 0.1);
}

.beast-card.ember::after {
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.32), transparent 12%),
        linear-gradient(145deg, rgba(255, 139, 74, 0.28), rgba(95, 24, 18, 0.08));
}

.beast-card.grove::after {
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.3), transparent 12%),
        linear-gradient(145deg, rgba(105, 240, 181, 0.24), rgba(13, 74, 56, 0.08));
}

.beast-mark {
    display: grid;
    width: 3.3rem;
    aspect-ratio: 1;
    place-items: center;
    margin-bottom: 3.5rem;
    border-radius: 45% 55% 48% 52%;
    color: #07131f;
    background: linear-gradient(145deg, #f4feff, var(--cyan));
    font-weight: 950;
    box-shadow: 0 0 34px rgba(68, 215, 255, 0.24);
}

.ember .beast-mark {
    background: linear-gradient(145deg, #fff0d2, var(--ember));
    box-shadow: 0 0 34px rgba(255, 139, 74, 0.24);
}

.grove .beast-mark {
    background: linear-gradient(145deg, #effff6, var(--green));
    box-shadow: 0 0 34px rgba(105, 240, 181, 0.22);
}

.shop-card {
    position: relative;
    overflow: hidden;
}

.shop-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.18), transparent 62%);
    transform: translateX(-45%) rotate(18deg);
    transition: transform 520ms ease;
}

.shop-card:hover::before {
    transform: translateX(45%) rotate(18deg);
}

.shop-card span {
    display: inline-flex;
    margin-bottom: 4rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    color: #06101e;
    background: var(--gold);
    font-size: 0.75rem;
    font-weight: 950;
}

.shop-card.rare span {
    background: var(--cyan);
}

.shop-card.epic span {
    background: #8ee8ff;
}

.shop-card.legendary span {
    background: var(--gold);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.8fr);
    gap: 2rem;
    align-items: center;
}

.console-preview {
    overflow: hidden;
    background: rgba(2, 8, 19, 0.86);
}

.console-top {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 1.2rem;
}

.console-top span {
    width: 0.72rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--danger);
}

.console-top span:nth-child(2) {
    background: var(--gold);
}

.console-top span:nth-child(3) {
    background: var(--green);
}

pre {
    margin: 0;
    color: #bff5ff;
    font-size: 1rem;
    line-height: 1.9;
    white-space: pre-wrap;
}

.rules {
    padding-top: 2rem;
    padding-bottom: 5rem;
}

.rule-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rule-strip span {
    display: inline-flex;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(5, 22, 42, 0.64);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.copied-toast {
    position: fixed;
    left: 50%;
    bottom: 1.3rem;
    z-index: 50;
    padding: 0.9rem 1.1rem;
    border: 1px solid rgba(118, 223, 255, 0.3);
    border-radius: 1rem;
    color: white;
    background: rgba(3, 14, 27, 0.88);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, 150%);
    transition: transform 240ms ease;
}

.copied-toast.show {
    transform: translate(-50%, 0);
}

@keyframes float-card {
    0%,
    100% {
        transform: translateY(0) rotate(-12deg);
    }

    50% {
        transform: translateY(-12px) rotate(-7deg);
    }
}

@keyframes pulse-dot {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.85;
    }

    50% {
        transform: scale(1.35);
        opacity: 1;
    }
}

@keyframes button-pop {
    0% {
        transform: scale(1) rotateX(0);
    }

    45% {
        transform: scale(0.96) rotateX(12deg);
    }

    100% {
        transform: scale(1) rotateX(0);
    }
}

@keyframes dragon-drift {
    0%,
    100% {
        transform: translate3d(0, 0, 0) rotate(-2deg);
    }

    50% {
        transform: translate3d(-18px, -12px, 0) rotate(2deg);
    }
}

@keyframes wing-flap {
    0%,
    100% {
        transform: rotateX(0deg) rotateZ(0deg);
    }

    50% {
        transform: rotateX(18deg) rotateZ(-5deg);
    }
}

@media (max-width: 900px) {
    .site-header {
        flex-wrap: wrap;
        min-height: auto;
        padding-top: 0.75rem;
    }

    .brand,
    .nav-cta {
        flex: 1;
    }

    .top-nav {
        order: 3;
        flex-basis: 100%;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: 94vh;
        padding-top: 12rem;
    }

    .dragon-banner {
        top: 10rem;
        right: -3rem;
        width: 30rem;
        opacity: 0.25;
    }

    .hero-side {
        min-height: 250px;
    }

    .status-orbit {
        top: 1rem;
        right: auto;
        left: 0;
        width: 13rem;
    }

    .live-card {
        right: 0;
        bottom: 1rem;
        width: min(100%, 19rem);
    }

    .server-grid,
    .shop-grid,
    .beast-grid,
    .split-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    h1 {
        font-size: 4rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero {
        padding-top: 13rem;
    }

    .brand-logo {
        width: 2.35rem;
        height: 2.35rem;
    }

    .mega-button,
    .ghost-button {
        width: 100%;
    }

    .top-nav a {
        padding-inline: 0.75rem;
    }
}

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