@charset "UTF-8";
/* ==========================================================================
   崩坏三官网复刻 · common.css
   职责：主题变量（色彩 / 间距 / 圆角 / 字体）、基础重置、通用容器与按钮、
        响应式工具类、动效降级（prefers-reduced-motion）
   说明：整站唯一的外部依赖只有本目录与 ../assets/shell.css，无任何网络资源
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 主题变量：深空蓝黑底 + 高饱和青紫点缀
   -------------------------------------------------------------------------- */
:root {
    /* 背景层 */
    --c-bg: #0a0d14;
    --c-bg-deep: #070a11;
    --c-bg-soft: #0c1220;
    --c-surface: #121826;
    --c-surface-2: #171f30;

    /* 描边与分隔 */
    --c-line: rgba(255, 255, 255, 0.08);
    --c-line-2: rgba(255, 255, 255, 0.16);

    /* 文字层 */
    --c-text: #e9eff8;
    --c-text-2: #9dabc0;
    --c-text-3: #6d7c93;

    /* 高饱和点缀色 */
    --c-accent: #3fe0ff;
    --c-accent-rgb: 63, 224, 255;
    --c-accent-2: #8b5cf6;
    --c-accent-2-rgb: 139, 92, 246;
    --c-accent-3: #ff5f9e;
    --c-accent-3-rgb: 255, 95, 158;

    --grad-accent: linear-gradient(135deg, #3fe0ff 0%, #8b5cf6 100%);
    --grad-text: linear-gradient(100deg, #ffffff 0%, #c7ecff 44%, #ab8cff 100%);

    /* 间距刻度 */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;
    --sp-8: 64px;
    --gutter: clamp(16px, 4vw, 40px);
    --container: 1200px;
    --section-y: clamp(56px, 9vw, 108px);

    /* 圆角 */
    --r-xs: 6px;
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-pill: 999px;

    /* 字体栈（全部使用系统字体，不加载任何外部字体文件） */
    --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
        "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
    --font-mono: "Cascadia Mono", "JetBrains Mono", "Consolas", "SFMono-Regular",
        ui-monospace, "Courier New", monospace;

    /* 层级与阴影 */
    --nav-h: 68px;
    --z-header: 900;
    --shadow-1: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
    --shadow-2: 0 26px 60px -30px rgba(0, 0, 0, 0.95);

    /* 缓动 */
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. 基础重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* 固定导航遮挡锚点的补偿 */
    scroll-padding-top: calc(var(--nav-h) + 16px);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

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

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

img {
    height: auto;
    border: 0;
}

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

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

time {
    font-variant-numeric: tabular-nums;
}

::selection {
    background: rgba(var(--c-accent-rgb), 0.32);
    color: #ffffff;
}

:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 3px;
    border-radius: var(--r-xs);
}

/* 自定义滚动条（不影响功能，浏览器不支持时自动忽略） */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #070a11;
}

::-webkit-scrollbar-thumb {
    background: rgba(var(--c-accent-rgb), 0.28);
    border-radius: var(--r-pill);
    border: 2px solid #070a11;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--c-accent-rgb), 0.5);
}

/* --------------------------------------------------------------------------
   3. 通用容器与版块
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    position: relative;
    padding-block: var(--section-y);
}

.section-head {
    max-width: 720px;
    margin-bottom: clamp(28px, 5vw, 52px);
}

.section-kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--c-accent);
}

.section-title {
    margin-top: var(--sp-3);
    font-size: clamp(1.5rem, 4.2vw, 2.3rem);
    line-height: 1.25;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.section-desc {
    margin-top: var(--sp-3);
    max-width: 56ch;
    font-size: clamp(0.9rem, 2.4vw, 1rem);
    color: var(--c-text-2);
}

.section-rule {
    display: block;
    width: 56px;
    height: 3px;
    margin-top: var(--sp-4);
    border-radius: 3px;
    background: var(--grad-accent);
}

/* --------------------------------------------------------------------------
   4. 通用按钮
   -------------------------------------------------------------------------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 12px 26px;
    border: 1px solid var(--c-line-2);
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.04);
    color: var(--c-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.28s var(--ease), background 0.28s var(--ease),
        border-color 0.28s var(--ease), box-shadow 0.28s var(--ease),
        color 0.28s var(--ease);
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--c-accent-rgb), 0.6);
    background: rgba(var(--c-accent-rgb), 0.08);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    border-color: transparent;
    background: var(--grad-accent);
    color: #04121a;
    box-shadow: 0 14px 32px -16px rgba(var(--c-accent-rgb), 0.8);
}

.btn-primary:hover {
    background: var(--grad-accent);
    border-color: transparent;
    box-shadow: 0 20px 42px -16px rgba(var(--c-accent-2-rgb), 0.9);
}
.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.btn-sm {
    padding: 9px 18px;
    font-size: 13px;
}

.btn-lg {
    padding: 15px 34px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* --------------------------------------------------------------------------
   5. 响应式工具类
   -------------------------------------------------------------------------- */
.u-center {
    text-align: center;
}

.u-mono {
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
}

.u-nowrap {
    white-space: nowrap;
}

.u-mt-0 {
    margin-top: 0;
}

.u-hidden {
    display: none !important;
}

/* 屏幕阅读器可见、视觉隐藏 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* 仅窄屏 / 仅宽屏 */
.u-only-sm {
    display: none !important;
}

@media (max-width: 767px) {
    .u-hide-sm {
        display: none !important;
    }

    .u-only-sm {
        display: block !important;
    }

    .u-center-sm {
        text-align: center;
    }
}

@media (min-width: 768px) {
    .u-hide-md {
        display: none !important;
    }
}

/* 两行截断 */
.u-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   6. 滚动进入视口的渐显（由页面 JS 添加 .reveal，不使用 JS 时完全不触发）
   -------------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------------------------
   7. 动效降级：尊重系统「减少动态效果」设置
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
