@font-face {
    font-family: "HLD";
    src: url("https://res.cloudinary.com/usnkp060/raw/upload/v1790155610/HLD-web.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "FZQ";
    src: url("https://res.cloudinary.com/usnkp060/raw/upload/v1790155418/FZQ.ttf") format("truetype");
    font-display: swap;
}

* {
    box-sizing:border-box
}

body {
    margin:0;
    background:#171613;
    color:#e9e1d3;
    font-family:"FZQ","Songti SC","SimSun",serif
}

.home-copy h1,
.chapter-copy h2,
.glance-copy h2,
.section-heading h2 {
    font-family:"HLD","FZQ","Songti SC",serif;
}

.screen {
    width:100%;
    max-width:1280px;
    height:832px;
    margin:auto;
    position:relative;
    overflow:hidden;
    background-size:cover;
    background-position:center
}

.home,
.glance {
    background-image:url("assets/home-bg.jpg")
}

.dark {
    background-image:url("assets/dark-bg.jpg")
}

.header {
    position:absolute;
    left:6.4%;
    right:13%;
    top:4.3%;
    height:54px;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    border-bottom:1px solid rgba(232,222,204,
.22);
    z-index:5
}

.home-head {
    right:7%;
    border:0
}

.logo {
    color:#eee5d5;
    text-decoration:none;
    font-size:26px;
    letter-spacing:5px
}

.logo small {
    font-size:10px;
    letter-spacing:1px;
    margin-left:8px
}

.header>a:last-child {
    font-size:12px;
    color:#e8dfcf;
    text-decoration:none
}

.header nav {
    display:flex;
    gap:54px
}

.header nav a {
    font-size:15px;
    letter-spacing:4px;
    color:#eee5d5;
    text-decoration:none
}

.side-nav {
    position:absolute;
    right:3.7%;
    top:25%;
    height:48%;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    border-right:1px solid rgba(235,225,205,
.18);
    padding-right:18px;
    z-index:6
}

.side-nav a {
    color:#e4d9c7;
    text-decoration:none;
    font-size:12px;
    opacity:.75
}

.side-nav .active {
    opacity:1;
    border-left:3px solid #b84b3e;
    padding-left:12px
}

.home-copy {
    position:absolute;
    left:12%;
    top:13%;
    z-index:3
}

.home-copy h1 {
    font-weight:400;
    font-size:64px;
    letter-spacing:14px;
    margin:0 0 24px
}

.home-copy h2 {
    font-size:31px;
    line-height:1.7;
    letter-spacing:4px;
    margin:0;
    font-weight:400
}

.home-copy p {
    font-size:14px;
    line-height:1.55;
    opacity:.88
}

.home-copy .slogan {
    letter-spacing:4px
}

.scroll {
    margin-top:72px;
    border:1px solid rgba(255,255,255,
.55);
    width:120px;
    height:120px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    font-size:12px
}

.dynasty {
    position:absolute;
    right:10%;
    bottom:12%;
    font-size:13px
}

.dynasty b {
    font-size:14px
}

.chapter-copy {
    position:absolute;
    left:5%;
    top:17%;
    z-index:3
}

.chapter-copy span,
.section-heading span {
    color:#7f3028;
    font-size:11px
}

.chapter-copy h2 {
    font-size:52px;
    line-height:1.65;
    font-weight:400;
    margin:18px 0
}

.chapter-copy h2 em {
    font-style:normal
}

.chapter-copy p {
    font-size:14px;
    line-height:1.8
}

.robe {
    position:absolute;
    left:39%;
    top:18%;
    width:50%;
    height:59%;
    object-fit:contain;
    z-index:2
}

.bottom-three {
    position:absolute;
    left:5%;
    bottom:10%;
    display:grid;
    grid-template-columns:repeat(3,190px);
    gap:30px
}

.bottom-three div {
    font-size:15px
}

.bottom-three small {
    display:block;
    margin-top:16px;
    font-size:10px;
    opacity:.5
}

.glance-copy {
    position:absolute;
    left:12.5%;
    top:17%;
    z-index:2
}

.glance-copy h2 {
    font-size:37px;
    font-weight:400;
    letter-spacing:4px
}

.glance-copy p {
    font-size:18px;
    line-height:1.45
}

.glance-copy b {
    font-size:14px;
    line-height:1.45
}

.four-links {
    position:absolute;
    left:9%;
    right:13%;
    bottom:26%;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:45px
}

.four-links a {
    color:#eee3d2;
    text-decoration:none;
    font-size:25px;
    text-align:center
}

.four-links strong,
.four-links small {
    display:block;
    font-weight:400;
    margin-top:10px
}

.four-links small {
    font-size:13px;
    letter-spacing:2px
}

.section-heading {
    position:absolute;
    left:5%;
    top:14%;
    z-index:3
}

.section-heading h2 {
    font-size:43px;
    font-weight:400;
    letter-spacing:3px;
    margin:15px 0
}

.section-heading p {
    font-size:14px;
    opacity:.7
}

.cards {
    position:absolute;
    left:5%;
    right:10.5%;
    top:40%;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:22px
}

.cards img {
    width:100%;
    height:230px;
    object-fit:cover
}

.cards h3 {
    font-size:18px;
    font-weight:400;
    margin:20px 0 12px
}

.cards p {
    font-size:12px;
    line-height:1.8;
    opacity:.55
}

.analysis-img {
    position:absolute;
    left:5%;
    top:35.5%;
    width:50%;
    height:43%;
    object-fit:cover
}

.analysis-notes {
    position:absolute;
    left:59%;
    top:36%;
    width:31%;
    font-size:13px;
    line-height:1.7
}

.analysis-notes p {
    margin:0 0 25px
}

.analysis-foot {
    position:absolute;
    left:5%;
    bottom:7%;
    font-size:12px
}

.studio-left {
    position:absolute;
    left:5%;
    top:36%;
    width:17%;
    font-size:14px;
    line-height:2.8
}

.studio-left small {
    display:block;
    margin-top:15px;
    font-size:10px;
    line-height:1.8;
    opacity:.45
}

.studio-img {
    position:absolute;
    left:24%;
    top:35%;
    width:43%;
    height:49%;
    object-fit:cover
}

.studio-right {
    position:absolute;
    left:70%;
    top:36%;
    width:20%;
    font-size:13px;
    line-height:2.6
}

.studio-right b {
    font-size:15px;
    font-weight:400
}

.colors {
    color:#b84839
}

.today-cards {
    top:36.5%
}

.today-cards img {
    aspect-ratio:1/1.18
}

.today-cards h3 {
    margin-top:22px
}

.today-cards p {
    opacity:.45
}

@media(max-width:800px) {
    .screen {
    width:100%;
    min-height:650px;
    aspect-ratio:auto
}

.header nav {
    gap:12px;
    flex-wrap:wrap
}

.header nav a {
    font-size:10px
}

.logo {
    font-size:18px
}

.logo small {
    display:none
}

.side-nav {
    display:none
}

.home-copy {
    left:8%
}

.home-copy h1 {
    font-size:44px
}

.chapter-copy h2,
.section-heading h2 {
    font-size:32px
}

.cards {
    right:5%;
    gap:8px
}

.cards h3 {
    font-size:13px
}

.cards p {
    font-size:9px
}

.four-links {
    left:4%;
    right:4%;
    gap:8px
}

.four-links a {
    font-size:16px
}

.robe {
    left:35%;
    width:62%
}

}

.home-copy,
.chapter-copy,
.glance-copy,
.section-heading {
    animation: textMove 1s ease;
}

@keyframes textMove {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.robe,
.analysis-img,
.studio-img {
    animation: imageMove 1.2s ease;
}

@keyframes imageMove {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll {
    animation: scrollMove 2s ease-in-out infinite;
}

@keyframes scrollMove {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }

    100% {
        transform: translateY(0);
    }
}

.cards article {
    transition: transform 0.3s;
}

.cards article:hover {
    transform: translateY(-8px);
}

.four-links span {
    transition: transform 0.3s;
}

.four-links span:hover {
    transform: translateY(-6px);
}

@media(max-width:800px) {
    @keyframes textMove {
        from {
            opacity: 0;
            transform: translateY(15px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes imageMove {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
html { scroll-behavior: smooth; }

#archive .section-heading, #analysis .section-heading,
#studio .section-heading, #today .section-heading {
    animation: textMove .85s ease both;
}
.section-heading::after {
    content: "";
    display: block;
    width: 110px;
    height: 1px;
    margin-top: 22px;
    background: #b84839;
    transform-origin: left;
    animation: lineOpen 1s .25s ease both;
}
@keyframes lineOpen { from { transform: scaleX(0); } to { transform: scaleX(1); } }

#archive .cards article, #today .cards article {
    animation: cardIn .8s ease both;
    overflow: hidden;
}
#archive .cards article:nth-child(1), #today .cards article:nth-child(1) { animation-delay: .15s; }
#archive .cards article:nth-child(2), #today .cards article:nth-child(2) { animation-delay: .32s; }
#archive .cards article:nth-child(3), #today .cards article:nth-child(3) { animation-delay: .49s; }
@keyframes cardIn {
    from { opacity: 0; transform: translateY(35px); }
    to { opacity: 1; transform: translateY(0); }
}
.cards article { position: relative; transition: transform .4s ease; }
.cards article::after {
    content: "";
    position: absolute;
    left: 0; right: 100%; top: 230px;
    height: 1px;
    background: #b84839;
    transition: right .5s ease;
}
.cards article:hover::after { right: 0; }
.cards article img { display: block; transition: transform .6s ease, filter .6s ease; }
.cards article:hover img { transform: scale(1.06); filter: brightness(1.13); }
.cards article:hover { transform: translateY(-8px); }

#analysis .analysis-img { animation: imageReveal 1.3s ease both; transition: filter .5s ease, transform .5s ease; }
#analysis .analysis-img:hover { transform: scale(1.025); filter: brightness(1.16); }
@keyframes imageReveal {
    from { opacity: 0; transform: scale(1.07); filter: brightness(.55); }
    to { opacity: 1; transform: scale(1); filter: brightness(1); }
}
#analysis .analysis-notes p { animation: noteIn .7s ease both; transition: color .3s ease, padding-left .3s ease; }
#analysis .analysis-notes p:nth-child(1) { animation-delay: .3s; }
#analysis .analysis-notes p:nth-child(2) { animation-delay: .5s; }
#analysis .analysis-notes p:nth-child(3) { animation-delay: .7s; }
#analysis .analysis-notes p:hover { color: #efb59b; padding-left: 8px; }
@keyframes noteIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
#analysis .analysis-foot { animation: textMove .8s 1s ease both; }

#studio .studio-img { animation: patternIn 1s ease both, patternFloat 5s 1s ease-in-out infinite; }
@keyframes patternIn {
    from { opacity: 0; transform: scale(.9) rotate(-4deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes patternFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.015); }
}
#studio .studio-left { animation: studioLeft .8s .2s ease both; }
#studio .studio-right { animation: noteIn .8s .4s ease both; }
@keyframes studioLeft {
    from { opacity: 0; transform: translateX(-25px); }
    to { opacity: 1; transform: translateX(0); }
}
#studio .studio-left p, #studio .studio-right p { transition: color .3s ease, padding-left .3s ease; }
#studio .studio-left p:hover, #studio .studio-right p:hover { color: #d37660; padding-left: 7px; }
#studio .colors { animation: colorPulse 3s 1s ease-in-out infinite; }
@keyframes colorPulse { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

#today .cards article:hover img { filter: brightness(1.18) saturate(1.08); }
#today .cards article::after { top: auto; bottom: 0; }

.header nav span, .side-nav span, .four-links span {
    transition: color .3s ease, opacity .3s ease, transform .3s ease;
}
.header nav span:hover, .side-nav span:hover, .four-links span:hover {
    color: #d47764; opacity: 1;
}
.four-links span:hover { transform: translateY(-6px); }

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

.chapter-copy h2, .glance-copy h2, .section-heading h2 {
    animation: titleSlide .9s ease both;
}
@keyframes titleSlide {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@supports (animation-timeline: view()) {
    .screen {
        view-timeline-name: --page-enter;
        view-timeline-axis: block;
    }
    .chapter-copy, .glance-copy, .section-heading {
        animation: none;
    }
    .chapter-copy h2, .glance-copy h2, .section-heading h2 {
        animation: titleSlide linear both;
        animation-timeline: --page-enter;
        animation-range: entry 15% entry 65%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chapter-copy h2, .glance-copy h2, .section-heading h2 {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.screen:target .chapter-copy h2,
.screen:target .glance-copy h2,
.screen:target .section-heading h2 {
    animation: titleSlide 1.1s cubic-bezier(.2,.7,.2,1) both;
    animation-timeline: auto;
}

.header nav a, .side-nav a, .four-links a {
    display: inline-block;
    transition: color .3s ease, opacity .3s ease, transform .3s ease;
}
.header nav a:hover, .side-nav a:hover, .four-links a:hover { color: #d47764; opacity: 1; }
.four-links a:hover { transform: translateY(-6px); }

@media (prefers-reduced-motion: reduce) {
    .screen:target .chapter-copy h2,
    .screen:target .glance-copy h2,
    .screen:target .section-heading h2 { animation: none; opacity: 1; transform: none; }
}

/* 手机布局：每一屏按内容自然增长，背景始终铺满整个 section。 */
html, body { overflow-x: hidden; }
main { width: 100%; }

@media (max-width: 800px) {
    .screen {
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        padding: 22px 7% 48px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background-color: #171613;
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
    }
    .home, .glance {
        background-image: linear-gradient(to bottom, rgba(23,22,19,.55), rgba(23,22,19,.15) 45%, #171613 100%), url("assets/home-bg.jpg");
        /* 原图上下自带黑边：手机上放大原图，让中间纹样铺满屏幕。 */
        background-size: 100% 100%, auto 320%;
        background-position: center, center;
    }
    .dark {
        background-image: linear-gradient(to bottom, #171613, rgba(23,22,19,.12) 22%, rgba(23,22,19,.25) 80%, #171613), url("assets/dark-bg.jpg");
    }
    .header, .home-head {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto;
        min-height: 42px;
        margin: 0;
        padding-bottom: 12px;
        gap: 12px;
        align-items: center;
        flex-wrap: wrap;
    }
    .header nav { width: 100%; gap: 6px 14px; justify-content: flex-start; }
    .header nav a { font-size: 11px; letter-spacing: 1px; padding: 5px 0; }
    .logo { font-size: 18px; letter-spacing: 2px; }
    .header > a:last-child { font-size: 11px; }
    .side-nav { display: none; }

    .home-copy, .chapter-copy, .glance-copy, .section-heading,
    .bottom-three, .cards, .analysis-img, .analysis-notes,
    .analysis-foot, .studio-left, .studio-img, .studio-right,
    .four-links, .robe, .dynasty {
        position: relative;
        inset: auto;
        left: auto; right: auto; top: auto; bottom: auto;
        width: 100%;
    }
    .home-copy { margin-top: clamp(70px, 13svh, 140px); }
    .home-copy h1 { font-size: clamp(42px, 12vw, 64px); letter-spacing: 5px; }
    .home-copy h2 { font-size: clamp(19px, 6vw, 29px); }
    .scroll { width: 78px; height: 78px; margin-top: 34px; }
    .dynasty { width: auto; margin: auto 0 0 auto; padding-top: 32px; font-size: 11px; }
    .dynasty b { font-size: 12px; }

    .chapter-copy, .section-heading { margin-top: 58px; }
    .chapter-copy h2, .section-heading h2 { font-size: clamp(31px, 8vw, 43px); line-height: 1.4; }
    .chapter-copy p, .section-heading p { line-height: 1.8; }
    .robe { height: auto; max-height: 35svh; margin: 25px auto 0; object-fit: contain; }
    .bottom-three {
        margin-top: auto;
        padding-top: 35px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
    .bottom-three div { font-size: 11px; line-height: 1.5; }
    .bottom-three small { margin-top: 8px; font-size: 9px; }

    .glance { justify-content: center; }
    .glance-copy { margin-top: 0; }
    .glance-copy h2 { font-size: clamp(34px, 9vw, 45px); }
    .glance-copy p { font-size: 15px; line-height: 1.75; }
    .glance-copy b { display: block; margin-top: 25px; font-size: 10px; line-height: 1.6; }
    .four-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        margin-top: 50px;
    }
    .four-links a { padding: 14px 4px; border-top: 1px solid rgba(235,225,205,.4); font-size: 22px; }
    .four-links strong { font-size: 16px; }
    .four-links small { font-size: 9px; letter-spacing: .3px; }

    .cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 38px;
    }
    .cards article { min-width: 0; }
    .cards img, .today-cards img { width: 100%; height: 220px; aspect-ratio: auto; object-fit: cover; }
    .cards h3 { font-size: 17px; margin: 13px 0 5px; }
    .cards p { font-size: 12px; margin: 0; }
    .cards article::after { top: 220px; }
    .today-cards { margin-top: 36px; }

    .analysis-img { height: 33svh; min-height: 210px; margin-top: 32px; object-fit: cover; }
    .analysis-notes { margin-top: 28px; font-size: 13px; }
    .analysis-notes p { margin-bottom: 18px; }
    .analysis-foot { margin-top: 10px; line-height: 1.6; }

    .studio-left, .studio-right { font-size: 13px; line-height: 1.8; }
    .studio-left { margin-top: 25px; }
    .studio-left p { display: inline-block; margin: 8px 12px 4px 0; }
    .studio-left small { margin-top: 6px; }
    .studio-img { height: 32svh; min-height: 220px; margin-top: 18px; object-fit: cover; }
    .studio-right { margin-top: 24px; }
    .studio-right p { margin: 4px 0; }

    /* 手机上不让滚动动画把标题停在半透明状态。 */
    @supports (animation-timeline: view()) {
        .chapter-copy h2, .glance-copy h2, .section-heading h2 {
            animation: none;
            opacity: 1;
            transform: none;
        }
    }
}

@media (max-width: 800px) and (prefers-reduced-motion: no-preference) {
    .screen:target .chapter-copy h2,
    .screen:target .glance-copy h2,
    .screen:target .section-heading h2 { animation: titleSlide .8s ease both; }
}
