/*
    《合法隐瞒》官方网站 V1.3
    Interaction structure based on Dimension by HTML5 UP
    html5up.net | CC BY 3.0
*/

:root {
    --text: rgba(205, 205, 205, 0.78);
    --text-strong: rgba(225, 225, 225, 0.90);
    --text-soft: rgba(176, 176, 176, 0.50);
    --panel: rgba(10, 10, 10, 0.80);
    --line: rgba(210, 210, 210, 0.22);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

html {
    background: #000;
}

body {
    min-height: 100vh;
    overflow: hidden;
    color: var(--text);
    font-family:
        "Source Han Sans SC",
        "Noto Sans CJK SC",
        "Microsoft YaHei",
        "PingFang SC",
        sans-serif;
    font-weight: 300;
    letter-spacing: 0.04em;
}

body.is-preload * {
    transition: none !important;
}

button,
a {
    font: inherit;
}

a {
    color: inherit;
}

#bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        #000 url("../images/home-desktop.jpg") center center / cover no-repeat;
    transform: scale(1.01);
}

#bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.03);
    pointer-events: none;
}

#wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* ---------- Homepage ---------- */

#header {
    position: relative;
    width: 100%;
    height: 100vh;
    transition:
        opacity 0.38s ease,
        transform 0.38s ease,
        filter 0.38s ease;
}

body.article-visible #header {
    opacity: 0;
    transform: scale(0.985);
    filter: blur(3px);
    pointer-events: none;
}

.title-block {
    position: absolute;
    left: 50%;
    top: 42%;
    width: min(42vw, 760px);
    transform: translate(-50%, -50%);
    text-align: center;
}

.title-cn {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.title-en {
    margin-top: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.42em;
    white-space: nowrap;
}

.serial-status {
    margin-top: 18px;
    color: rgba(165, 165, 165, 0.58);
    font-size: 0.58rem;
    font-weight: 300;
    letter-spacing: 0.18em;
}

.main-nav {
    position: absolute;

    left: 4vw;
    top: 4vh;

    display: flex;
    flex-direction: column;

    gap: 10px;

    transform: none;

    z-index: 10;
}

.main-nav a {
    display: flex;
    width: max-content;
    flex-direction: column;
    gap: 0;
    padding: 3px 0;
    color: rgba(184, 184, 184, 0.52);
    text-decoration: none;
    transition:
        color 0.22s ease,
        opacity 0.22s ease,
        transform 0.22s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: rgba(222, 222, 222, 0.90);
    transform: translateX(4px);
    outline: none;
}

.nav-cn {
    font-size: 0.86rem;
    font-weight: 400;
    letter-spacing: 0.11em;
    line-height: 1.2;
}

.nav-en {
    margin-top: 1px;
    font-size: 0.46rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    line-height: 1.2;
    opacity: 0.65;
}

/* ---------- Dimension-style modal content ---------- */

#main {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5vh 4vw;
    pointer-events: none;
}

#main::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

body.article-visible #main::before {
    opacity: 1;
}

#main article {
    position: absolute;
    display: none;
    width: min(680px, 88vw);
    max-height: 82vh;
    overflow-y: auto;
    padding: 3.2rem 3.2rem 2.8rem;
    color: rgba(218, 218, 218, 0.82);
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 2px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    transform: translateY(16px) scale(0.985);
    transition:
        opacity 0.34s ease,
        transform 0.34s ease;
    pointer-events: auto;
}

#main article.active {
    display: block;
}

#main article.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#main h2 {
    margin: 0;
    color: rgba(225, 225, 225, 0.90);
    font-size: 1.55rem;
    font-weight: 400;
    letter-spacing: 0.12em;
}

#main .rule {
    width: 3.8rem;
    height: 1px;
    margin: 0.85rem 0 1.7rem;
    background: rgba(220, 220, 220, 0.42);
}

#main p {
    margin: 0 0 1rem;
    font-size: 0.96rem;
    line-height: 1.95;
}

#main .lead {
    color: rgba(225, 225, 225, 0.90);
}

#main .credit {
    margin-top: 2rem;
    color: rgba(180, 180, 180, 0.58);
    font-size: 0.74rem;
    line-height: 1.7;
}

#main .credit a {
    text-decoration-color: rgba(200, 200, 200, 0.28);
    text-underline-offset: 0.2em;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.close:hover,
.close:focus-visible {
    opacity: 0.95;
    outline: none;
}

.close::before,
.close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.35rem;
    height: 1px;
    background: rgba(220, 220, 220, 0.9);
}

.close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ---------- Music ---------- */

.music-toggle {
    position: fixed;
    right: 16px;
    bottom: 14px;
    z-index: 50;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(188, 188, 188, 0.46);
    font-size: 17px;
    line-height: 30px;
    cursor: pointer;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.music-toggle:hover,
.music-toggle:focus-visible {
    color: rgba(225, 225, 225, 0.88);
    outline: none;
}

.music-toggle.off {
    opacity: 0.24;
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
    #bg {
        background-image: url("../images/home-mobile.jpg");
    }

    .title-block {
        top: 50%;
        width: 78vw;
    }

    .title-en {
        margin-top: 6px;
        font-size: 0.72rem;
        letter-spacing: 0.27em;
    }

    .serial-status {
        margin-top: 13px;
        font-size: 0.50rem;
    }

    .main-nav {
        left: 6vw;
        top: 5vh;
        bottom: auto;

        gap: 8px;

        transform: none;
    }

    .nav-cn {
        font-size: 0.80rem;
    }

    .nav-en {
        font-size: 0.42rem;
    }

    #main {
        padding: 3vh 4vw;
    }

    #main article {
        width: 92vw;
        max-height: 86vh;
        padding: 2.6rem 1.6rem 2rem;
    }

    #main h2 {
        font-size: 1.3rem;
    }

    #main p {
        font-size: 0.91rem;
        line-height: 1.85;
    }

    .music-toggle {
        right: 10px;
        bottom: 9px;
    }
}

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