﻿/* ============================================================
   影界故事 FREEINU · 全局基础样式
   Swiss International Style（瑞士国际主义）
   黑白红蓝 · Helvetica 无衬线 · 直角 · 无阴影无渐变 · 严格网格
   ============================================================ */

:root {
    /* 配色（仅黑白红蓝） */
    --black: #000000;
    --white: #ffffff;
    --red: #ff0000;
    --blue: #0057b8;

    /* 中性灰（仅用于发丝线与弱化文字） */
    --gray-line: #cccccc;
    --gray-hover: #f0f0f0;
    --gray-text: #666666;
    --gray-faint: #999999;

    /* 语义映射 */
    --bg: #ffffff;
    --text: #000000;
    --muted: #666666;
    --faint: #999999;
    --line: #cccccc;
    --line-strong: #000000;
    --accent: #ff0000;
    --accent-2: #0057b8;

    /* 色移内容色（仅用于小色块表示数据，非装饰） */
    --c-salmon: #e8a090;
    --c-green:  #6b8e6e;
    --c-blue:   #6b96b8;
    --c-rose:   #c94f4f;
    --c-yellow: #d9b24a;

    /* 字体：Helvetica 系无衬线（禁 serif / mono） */
    --font-sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;

    --nav-h: 64px;
    --radius: 0;            /* 全部直角 */
    --dur: 150ms;           /* 过渡上限 */
    --ease: ease-out;
}

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

html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    background: var(--white);
    color: var(--black);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

::selection { background: var(--red); color: var(--white); }

/* 无障碍：减少动效 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   全局导航栏
   ============================================================ */
.topnav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 32px;
    height: var(--nav-h);
    padding: 0 40px;
    background: var(--white);
    border-bottom: 1px solid var(--black);
}

.topnav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 17px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.topnav .brand .sigil {
    width: 24px; height: 24px;
    background: var(--red);
    color: var(--white);
    display: grid; place-items: center;
    font-size: 12px;
    font-weight: 500;
}

.topnav .brand .brand-cn { color: var(--black); }
.topnav .brand .brand-en {
    color: var(--black);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.nav-links { display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1; }

.nav-link {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--black);
    cursor: pointer;
    transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
    border: none;
    background: none;
    font-family: var(--font-sans);
}

.nav-link:hover { color: var(--red); background: var(--gray-hover); }
.nav-link.active { color: var(--white); background: var(--black); }

/* 全局搜索 */
.nav-search { position: relative; margin-left: auto; width: 280px; max-width: 36vw; }

.nav-search input {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--black);
    padding: 9px 16px 9px 34px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--black);
    outline: none;
    transition: border-color var(--dur) var(--ease);
}

.nav-search input:focus { border-color: var(--red); }
.nav-search input::placeholder { color: var(--gray-text); }

.nav-search .search-icon {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--black);
    font-size: 13px;
    pointer-events: none;
}

.search-drop {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--white);
    border: 1px solid var(--black);
    max-height: 440px;
    overflow-y: auto;
    display: none;
    z-index: 1100;
}

.search-drop.show { display: block; }

.search-drop .sd-group {
    padding: 12px 16px 4px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red);
}

.search-drop a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    font-size: 14px;
    color: var(--black);
    cursor: pointer;
    border-bottom: 1px solid var(--gray-line);
    transition: background var(--dur) var(--ease);
}

.search-drop a:last-child { border-bottom: none; }
.search-drop a:hover { background: var(--gray-hover); }
.search-drop a .sd-name em { color: var(--red); font-style: normal; font-weight: 500; }
.search-drop a .sd-cat {
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--gray-text);
    flex-shrink: 0;
}

.search-drop .no-result { padding: 24px; text-align: center; font-size: 13px; color: var(--gray-text); }

.nav-burger {
    display: none;
    margin-left: auto;
    background: var(--white);
    border: 1px solid var(--black);
    color: var(--black);
    width: 38px; height: 38px;
    font-size: 16px; cursor: pointer;
}

/* ============================================================
   通用容器与排版
   ============================================================ */
.container { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.page-pad { padding: 96px 0 120px; }

.kicker {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--red);
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 44px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--black);
}

.section-head .sh-index {
    font-size: 13px;
    font-weight: 500;
    color: var(--red);
}

.section-title {
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--black);
    line-height: 1.1;
}

.section-en {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--gray-text);
    text-transform: uppercase;
    margin-left: auto;
}

/* ============================================================
   按钮（Swiss：直角、粗体、150ms、必带箭头）
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    border: 1px solid var(--black);
    transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn .arrow { transition: transform var(--dur) var(--ease); }

.btn:hover .arrow { transform: translateX(3px); }

.btn.primary { background: var(--black); color: var(--white); border-color: var(--black); }
.btn.primary:hover { background: var(--red); border-color: var(--red); }

.btn.ghost { background: var(--white); color: var(--black); border-color: var(--black); }
.btn.ghost:hover { background: var(--gray-hover); border-color: var(--red); color: var(--red); }

/* ============================================================
   滚动显现（仅透明度，快速，无位移）
   ============================================================ */
.reveal { opacity: 0; transition: opacity var(--dur) var(--ease); }
.reveal.in { opacity: 1; }

@keyframes fadeInUp {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================================
   视差辅助
   ============================================================ */
.parallax { will-change: transform; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 860px) {
    .topnav { padding: 0 16px; gap: 12px; }
    .nav-links { display: none; }
    .nav-burger { display: block; }
    .nav-search { width: 46vw; max-width: none; }

    .nav-links.mobile-open {
        display: flex;
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--white);
        border-bottom: 1px solid var(--black);
        padding: 12px 16px 18px;
    }
    .nav-link { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--gray-line); }

    .container { padding: 0 18px; }
    .page-pad { padding: 64px 0 80px; }
    .section-title { font-size: 26px; }
}
