html {
    min-height: 100%;
    background: #0b0a08;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    min-height: 100%;
    margin: 0;
}

img {
    max-width: 100%;
}

/* Homepage refresh for Legend of Magic. */
.home-page {
    min-height: 100%;
    background: #0b0a08;
    color: #f8f1dc;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.home-page p {
    color: inherit;
    letter-spacing: 0;
}

.home-page a {
    color: inherit;
    text-decoration: none;
}

.home-page ul {
    list-style: none;
}

.home-header {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 30;
    width: 100%;
}

.home-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1160px, calc(100% - 48px));
    height: 88px;
    margin: 0 auto;
}

.home-header__brand {
    display: inline-flex;
    align-items: center;
    width: 230px;
}

.home-header__brand img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.42));
}

.home-header__nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.home-header__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 4px;
    color: #f9ead0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.home-header__nav a:hover,
.home-header__nav a:focus,
.home-header__nav a[aria-current="page"] {
    color: #f4c76e;
}

.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 76px);
    padding: 128px 0 72px;
    overflow: hidden;
    background: #0b0a08;
}

.home-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(11, 10, 8, 0.98) 0%, rgba(20, 18, 13, 0.84) 42%, rgba(11, 10, 8, 0.52) 100%),
        linear-gradient(180deg, rgba(11, 10, 8, 0.34) 0%, rgba(11, 10, 8, 0.74) 100%),
        url("/img/slider/h2.jpeg") center / cover no-repeat;
    opacity: 0.95;
}

.home-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 76%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 76%);
    pointer-events: none;
}

.home-hero__backdrop {
    position: absolute;
    inset: auto 0 0;
    height: 34%;
    background: linear-gradient(180deg, rgba(11, 10, 8, 0), #0b0a08 86%);
    pointer-events: none;
}

.home-hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(320px, 0.84fr) minmax(480px, 1.16fr);
    gap: 54px;
    align-items: center;
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
}

.home-hero__content {
    max-width: 540px;
}

.home-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: 0 0 20px;
    padding: 0 13px;
    border: 1px solid rgba(244, 199, 110, 0.42);
    border-radius: 999px;
    background: rgba(38, 33, 21, 0.64);
    color: #f4c76e;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.home-hero h1 {
    margin: 0;
    color: #fff8e6;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 76px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0;
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.24), 0 18px 36px rgba(0, 0, 0, 0.36);
}

.home-hero__subtitle {
    margin: 18px 0 0;
    color: #f4c76e;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
}

.home-hero__summary {
    max-width: 500px;
    margin: 18px 0 0;
    color: #e8dcc4;
    font-size: 17px;
    line-height: 1.85;
}

.home-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 0;
    padding: 0;
}

.home-hero__tags li {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(124, 192, 135, 0.38);
    border-radius: 6px;
    background: rgba(27, 53, 38, 0.48);
    color: #d9ffd9;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.home-hero__downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin: 34px 0 0;
}

.home-hero__downloads a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 178px;
    min-height: 54px;
    border: 1px solid rgba(255, 226, 157, 0.24);
    border-radius: 8px;
    background: rgba(8, 8, 7, 0.52);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.home-hero__downloads a:hover,
.home-hero__downloads a:focus {
    border-color: rgba(244, 199, 110, 0.78);
    background: rgba(28, 24, 16, 0.74);
    transform: translateY(-2px);
}

.home-hero__downloads img {
    display: block;
    width: 154px;
    height: auto;
}

.home-hero__showcase {
    min-width: 0;
}

.home-hero__screen {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 222, 150, 0.24);
    border-radius: 8px;
    background: #15120e;
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.46), 0 0 0 8px rgba(255, 255, 255, 0.035);
}

.home-hero__screen::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.home-hero__screen img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.home-footer {
    position: relative;
    z-index: 3;
    background: #0b0a08;
    border-top: 1px solid rgba(244, 199, 110, 0.14);
}

.home-footer__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    width: min(1160px, calc(100% - 48px));
    min-height: 76px;
    margin: 0 auto;
    color: #b8ad97;
    font-size: 13px;
    text-align: center;
}

.home-footer__inner p {
    margin: 0;
}

.home-footer__inner a {
    color: #ddc083;
}

.home-footer__inner a:hover,
.home-footer__inner a:focus {
    color: #f4c76e;
    text-decoration: underline;
}

@media (max-width: 991px) {
    .home-header__inner {
        height: 78px;
        width: min(100% - 36px, 720px);
    }

    .home-header__brand {
        width: 198px;
    }

    .home-hero {
        min-height: auto;
        padding: 108px 0 56px;
    }

    .home-hero::before {
        background:
            linear-gradient(180deg, rgba(11, 10, 8, 0.9) 0%, rgba(11, 10, 8, 0.76) 54%, rgba(11, 10, 8, 0.96) 100%),
            url("/img/slider/h2.jpeg") center / cover no-repeat;
    }

    .home-hero__inner {
        grid-template-columns: 1fr;
        gap: 36px;
        width: min(100% - 36px, 720px);
    }

    .home-hero__content {
        max-width: 620px;
    }

    .home-hero h1 {
        font-size: 56px;
    }
}

@media (max-width: 767px) {
    .home-header__inner {
        width: min(100% - 28px, 480px);
        height: 72px;
    }

    .home-header__brand {
        width: 172px;
    }

    .home-header__nav a {
        font-size: 14px;
    }

    .home-hero {
        padding: 94px 0 44px;
    }

    .home-hero__inner {
        width: min(100% - 28px, 480px);
        gap: 28px;
    }

    .home-hero h1 {
        font-size: 44px;
        line-height: 1.12;
    }

    .home-hero__subtitle {
        font-size: 20px;
    }

    .home-hero__summary {
        font-size: 16px;
        line-height: 1.72;
    }

    .home-hero__tags {
        gap: 8px;
    }

    .home-hero__tags li {
        min-height: 32px;
        padding: 0 11px;
        font-size: 13px;
    }

    .home-hero__downloads {
        gap: 10px;
    }

    .home-hero__downloads a {
        width: calc(50% - 5px);
        min-width: 140px;
        min-height: 50px;
    }

    .home-hero__downloads img {
        width: min(138px, calc(100% - 18px));
    }

    .home-footer__inner {
        width: min(100% - 28px, 480px);
        padding: 18px 0;
        line-height: 1.6;
    }
}

@media (max-width: 374px) {
    .home-header__brand {
        width: 154px;
    }

    .home-hero h1 {
        font-size: 39px;
    }

    .home-hero__downloads a {
        width: 100%;
    }
}
