:root {
    --ink-900: #081428;
    --ink-800: #0c1d38;
    --ink-700: #12294b;

    --gold-700: #b97f1f;
    --gold-600: #d99a2b;
    --gold-500: #eab14a;
    --gold-400: #f7c96a;
    --gold-300: #ffdfa0;

    --paper: #fbf7f1;
    --paper-2: #f5eee3;

    --text: #1d3043;
    --text-soft: #556b7e;

    --radius-xl: 32px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(8, 20, 40, 0.04), 0 10px 24px -16px rgba(8, 20, 40, 0.22);
    --shadow: 0 2px 4px rgba(8, 20, 40, 0.04), 0 28px 52px -28px rgba(8, 20, 40, 0.32);

    --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
        "Hiragino Sans GB", "Source Han Sans SC", system-ui, sans-serif;
    --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", SimSun, "宋体", KaiTi, "楷体", serif;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --maxw: 1180px;
    --header-h: 76px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

::selection {
    background: var(--gold-300);
    color: var(--ink-900);
}

:focus-visible {
    outline: 3px solid var(--gold-500);
    outline-offset: 3px;
}

.wrap {
    width: min(calc(100% - 48px), var(--maxw));
    margin-inline: auto;
}

.spark {
    display: inline-block;
    width: 13px;
    height: 13px;
    background: currentColor;
    clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
    flex: 0 0 auto;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 200;
    padding: 10px 18px;
    border-radius: 0 0 12px 12px;
    background: var(--gold-400);
    color: var(--ink-900);
    font-size: 14px;
    font-weight: 600;
    transition: top 0.25s var(--ease);
}

.skip-link:focus {
    top: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.26em;
    color: var(--gold-700);
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: currentColor;
    opacity: 0.75;
}

.eyebrow--light {
    color: var(--gold-300);
}

.h2 {
    font-family: var(--font-serif);
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 700;
    line-height: 1.34;
    letter-spacing: 0.015em;
    color: var(--ink-800);
}

.hl {
    font-weight: 700;
    color: inherit;
    padding: 0 0.06em;
    background-image: linear-gradient(transparent 80%, rgba(247, 201, 106, 0.6) 80%);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    overflow: hidden;
    border-radius: 999px;
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    -webkit-backdrop-filter: blur(18px) saturate(165%);
    backdrop-filter: blur(18px) saturate(165%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 20px 40px -26px rgba(8, 20, 40, 0.55);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
        background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0) 56%);
    pointer-events: none;
}

.btn--gold {
    color: #35240a;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: linear-gradient(135deg, rgba(255, 232, 180, 0.94) 0%, rgba(248, 205, 116, 0.86) 46%, rgba(233, 172, 63, 0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 38px -18px rgba(233, 172, 63, 0.85);
}

.btn--gold:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 240, 202, 0.96) 0%, rgba(252, 214, 134, 0.9) 46%, rgba(238, 183, 82, 0.94) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 26px 46px -18px rgba(233, 172, 63, 1);
}

.btn--ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.07));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 18px 40px -26px rgba(0, 0, 0, 0.7);
}

.btn--ghost:hover {
    transform: translateY(-2px);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.15));
    border-color: rgba(255, 255, 255, 0.62);
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease),
        backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    background: rgba(6, 13, 29, 0.86);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(26px) saturate(165%);
    backdrop-filter: blur(26px) saturate(165%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 20px 46px -30px rgba(0, 0, 0, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(calc(100% - 48px), var(--maxw));
    margin-inline: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    flex: 0 0 auto;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(247, 201, 106, 0.32);
    background: radial-gradient(circle at 50% 42%, rgba(255, 214, 122, 0.3), rgba(255, 214, 122, 0) 72%);
    box-shadow: inset 0 0 18px rgba(247, 201, 106, 0.18);
}

.brand-star {
    width: 17px;
    height: 17px;
    background: linear-gradient(140deg, #ffe9b8, #f3bb55 60%, #e0a038);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    filter: drop-shadow(0 0 6px rgba(247, 201, 106, 0.75));
    animation: brand-twinkle 6s ease-in-out infinite;
}

@keyframes brand-twinkle {
    0%, 100% { opacity: 0.9; transform: scale(1) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.08) rotate(4deg); }
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-name {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.brand-sub {
    font-size: 10.5px;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.52);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 17px;
    border-radius: 999px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.76);
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
}

.nav-link.is-current {
    color: var(--gold-300);
}

.nav-link.is-current::after {
    content: "";
    position: absolute;
    left: 17px;
    right: 17px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
}

.nav-caret {
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.3s var(--ease);
}

.has-panel {
    position: relative;
}

.has-panel:hover .nav-caret,
.has-panel:focus-within .nav-caret {
    transform: rotate(225deg) translate(-1px, -1px);
}

.nav-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 10;
    min-width: 196px;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(160deg, rgba(26, 50, 86, 0.72), rgba(7, 17, 35, 0.66));
    -webkit-backdrop-filter: blur(26px) saturate(160%);
    backdrop-filter: blur(26px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 34px 64px -34px rgba(0, 0, 0, 0.95);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
}

.has-panel:hover .nav-panel,
.has-panel:focus-within .nav-panel {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nav-panel a {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.78);
    transition: background 0.2s, color 0.2s;
}

.nav-panel a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-panel a.is-current {
    color: var(--gold-300);
    background: rgba(247, 201, 106, 0.12);
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-footer {
    position: relative;
    overflow: hidden;
    padding: clamp(48px, 7vw, 76px) 0 30px;
    background: linear-gradient(180deg, #081428, #050b18);
    color: rgba(255, 255, 255, 0.62);
}

.site-footer::before {
    content: "";
    position: absolute;
    top: -180px;
    left: -80px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247, 201, 106, 0.16), transparent 68%);
    pointer-events: none;
}

.footer-top {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 36px;
    flex-wrap: wrap;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-name {
    font-family: var(--font-serif);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
}

.footer-tag {
    margin-top: 4px;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.48);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    font-size: 14.5px;
}

.footer-nav a {
    padding: 4px 0;
    color: rgba(255, 255, 255, 0.62);
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--gold-300);
}

.footer-bottom {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 24px;
    font-size: 12.5px;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.4);
}

.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(150deg, rgba(32, 60, 100, 0.7), rgba(8, 20, 40, 0.62));
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 22px 44px -22px rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s,
        background 0.25s;
}

.to-top:hover {
    background: linear-gradient(150deg, rgba(44, 79, 124, 0.8), rgba(13, 30, 56, 0.72));
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.to-top::before {
    content: "";
    width: 9px;
    height: 9px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: translateY(2px) rotate(45deg);
}

.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 120;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ffdfa0, #eab14a);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 0.12s linear;
}

.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
    transition-delay: var(--d, 0ms);
}

.js-reveal [data-reveal].exit-top {
    transform: translateY(-26px);
}

.js-reveal [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 960px) {
    :root {
        --header-h: 68px;
    }

    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: fixed;
        top: var(--header-h);
        right: 0;
        bottom: 0;
        left: 0;
        max-height: none;
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 22px 34px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background:
            radial-gradient(680px 340px at 50% -8%, rgba(66, 116, 188, 0.24), transparent 70%),
            linear-gradient(180deg, #071024 0%, #060e1e 100%);
        box-shadow: 0 40px 60px -40px rgba(0, 0, 0, 1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
    }

    .site-nav::after {
        content: "每一颗星星, 都值得被看见";
        margin-top: auto;
        padding-top: 34px;
        font-family: var(--font-serif);
        font-size: 12.5px;
        letter-spacing: 0.28em;
        text-align: center;
        color: rgba(255, 255, 255, 0.26);
    }

    .nav-open .site-nav {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-open {
        overflow: hidden;
    }

    .nav-link {
        padding: 16px 4px;
        font-size: 17.5px;
        letter-spacing: 0.04em;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .nav-link.is-current::after {
        display: none;
    }

    .nav-link.is-current {
        background: none;
        color: var(--gold-300);
    }

    .nav-caret {
        display: none;
    }

    .has-panel {
        display: flex;
        flex-direction: column;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .has-panel > .nav-link {
        border-bottom: 0;
        color: rgba(255, 255, 255, 0.55);
        font-size: 12.5px;
        letter-spacing: 0.24em;
        padding: 18px 4px 8px;
    }

    .has-panel > .nav-link.is-current {
        color: var(--gold-300);
    }

    .nav-open .site-header {
        background: #060e1e;
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }

    .has-panel .nav-panel {
        position: static;
        min-width: 0;
        margin: 2px 0 8px 4px;
        padding: 0 0 0 12px;
        border: 0;
        border-left: 1px solid rgba(255, 255, 255, 0.09);
        background: none;
        box-shadow: none;
        backdrop-filter: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-panel a {
        padding: 12px 4px;
        font-size: 16px;
        color: rgba(255, 255, 255, 0.74);
        border-radius: 10px;
    }

    .nav-panel a.is-current {
        background: none;
        color: var(--gold-300);
    }

    .brand-name {
        font-size: 16.5px;
    }

    .footer-top {
        flex-direction: column;
        gap: 26px;
    }
}

@media (max-width: 640px) {
    .wrap {
        width: calc(100% - 32px);
    }

    .header-inner {
        width: calc(100% - 32px);
    }

    .brand-sub {
        display: none;
    }

    .to-top {
        right: 16px;
        bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .brand-star {
        animation: none;
    }

    .js-reveal [data-reveal] {
        transform: none;
        transition: opacity 0.45s ease;
    }

    .js-reveal [data-reveal].exit-top {
        transform: none;
    }

    .js-reveal [data-reveal].is-visible {
        opacity: 1;
    }

    .btn,
    .nav-link,
    .nav-panel,
    .site-nav {
        transition: none;
    }
}
