/* ============================================
   Impeccable · 公共基础样式
   所有页面共享的 Token / Reset / Nav / Reveal / Modal / Footer
   ============================================ */

/* ---- Design Tokens ---- */
:root {
    /* 首页全局色 */
    --deep:       oklch(0.14 0.018 70);
    --mid:        oklch(0.22 0.02 75);
    --parchment:  oklch(0.90 0.015 85);
    --parchment-dim: oklch(0.78 0.02 82);
    --ochre:      oklch(0.76 0.17 85);
    --dust:       oklch(0.60 0.03 80);

    --display: 'Unbounded Sans', sans-serif;
    --heading: '寒蝉全圆体', sans-serif;
    --body: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Noto Sans CJK SC', sans-serif;

    --space-xs: 0.25rem;  --space-sm: 0.5rem;  --space-md: 1rem;
    --space-lg: 1.5rem;   --space-xl: 2rem;    --space-2xl: 3rem;
    --space-3xl: 5rem;    --space-4xl: 8rem;

    --ease-expo:  cubic-bezier(0.16, 1, 0.3, 1);
    --ease-quint: cubic-bezier(0.33, 1, 0.68, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:16px; -webkit-text-size-adjust:100%; }
body {
    font-family: var(--body);
    background: var(--deep);
    color: var(--parchment);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color:inherit; text-decoration:none; }
img { display:block; max-width:100%; height:auto; }

/* ---- Nav 栏 ---- */
.nav-line {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: 52px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    background: oklch(0.14 0.018 70 / 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid oklch(0.90 0.015 85 / 0.06);
}
.nav-line__back {
    font-size: 0.85rem;
    color: var(--dust);
    transition: color 0.25s;
}
.nav-line__back:hover { color: var(--ochre); }
.nav-line__dots {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}
.nav-line__dot {
    position: relative;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: oklch(0.90 0.015 85 / 0.15);
    transition: background 0.25s;
}
/* 44x44px 触控区域 */
.nav-line__dot::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px;
}
.nav-line__dot:hover,
.nav-line__dot.active { background: var(--ochre); }

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s var(--ease-expo),
                transform 0.9s var(--ease-expo);
}
.reveal.visible { opacity:1; transform:translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.35s; }

/* ---- Frame 画框效果 (图片衬纸) ---- */
.frame {
    position: relative;
}
.frame img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}
.frame::after {
    content: '';
    position: absolute;
    inset: -2px;
    box-shadow: inset 0 0 0 1px oklch(0.90 0.015 85 / 0.08),
                0 8px 36px oklch(0 0 0 / 0.35);
    z-index: 2;
    pointer-events: none;
}
.frame--mat::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: oklch(0.90 0.015 85 / 0.04);
    z-index: 0;
}

/* ---- 计数器 ---- */
.counter {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    opacity: 0.55;
}

/* ---- Footer ---- */
.footer {
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
    border-top: 1px solid oklch(0.90 0.015 85 / 0.05);
    background: var(--deep);
}
.footer nav {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}
.footer nav a {
    font-size: 0.85rem;
    color: var(--dust);
    transition: color 0.25s;
}
.footer nav a:hover { color: var(--ochre); }
.footer .copy {
    font-size: 0.75rem;
    color: oklch(0.60 0.03 80 / 0.45);
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: oklch(0 0 0 / 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s var(--ease-expo);
}
.modal-overlay.open { display:flex; opacity:1; }
.modal-panel {
    background: var(--mid);
    padding: var(--space-3xl) var(--space-2xl);
    max-width: 440px;
    width: 90vw;
    text-align: center;
    border: 1px solid oklch(0.90 0.015 85 / 0.06);
}
.modal-panel h3 {
    font-family: var(--heading);
    font-size: 1.4rem;
    color: var(--parchment);
    margin-bottom: var(--space-sm);
}
.modal-panel > p {
    font-size: 0.9rem;
    color: var(--dust);
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}
.modal-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
}
.modal-platforms button {
    padding: 10px 24px;
    font-size: 0.9rem;
    color: var(--parchment-dim);
    background: transparent;
    border: 1px solid oklch(0.90 0.015 85 / 0.08);
    cursor: pointer;
    transition: border-color 0.25s var(--ease-expo),
                color 0.25s var(--ease-expo);
}
.modal-platforms button:hover {
    border-color: var(--ochre);
    color: var(--ochre);
}
.modal-close {
    margin-top: var(--space-lg);
    font-size: 0.85rem;
    color: var(--dust);
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.25s;
}
.modal-close:hover { color: var(--parchment); }

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .reveal { opacity:1; transform:none; transition:none; }
}

/* ---- 响应式基础 ---- */
@media (max-width: 767px) {
    :root { --space-3xl: 3rem; --space-4xl: 5rem; }
    .nav-line { padding: 0 var(--space-md); }
    .frame--mat::before { inset: -12px; }
}
