/* ==========================================================================
   global.css —— 全站基础样式、设计变量、导航、按钮、页脚、通用动效
   ========================================================================== */

:root {
    /* 品牌与文字 */
    --brand: #e4002b;
    --brand-dark: #bd0024;
    --ink: #0d0d10;
    --ink-soft: #22252b;
    --muted: #6b7280;
    --muted-light: #9aa1ab;
    --paper: #ffffff;
    --paper-2: #f5f6f8;
    --paper-3: #eceef2;
    --line: rgba(13, 16, 26, 0.09);
    --line-strong: rgba(13, 16, 26, 0.16);

    /* 神里绫华联名色 */
    --ice-50: #f6faff;
    --ice-100: #eaf2fd;
    --ice-200: #d8e6f8;
    --ice-300: #bfd5f0;
    --sky: #7fa6d8;
    --navy: #16324f;
    --navy-deep: #0e2439;
    --pink: #f3b3c4;
    --pink-soft: #fde8ee;
    --gold: #c6a56a;

    /* 字体 */
    --font-sans: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;

    /* 尺寸与节奏 */
    --header-h: 68px;
    --radius-s: 10px;
    --radius-m: 18px;
    --radius-l: 28px;
    --shadow-s: 0 2px 10px rgba(16, 32, 56, 0.05);
    --shadow-m: 0 16px 40px rgba(16, 32, 56, 0.10);
    --shadow-l: 0 30px 80px rgba(16, 32, 56, 0.16);
    --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
}

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

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

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

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

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

img {
    height: auto;
}

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

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

input {
    font: inherit;
}

::selection {
    background: var(--navy);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- 通用布局 ---------- */
.container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: clamp(20px, 4vw, 40px);
}

.section {
    padding-block: clamp(64px, 8vw, 112px);
}

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

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--brand);
    text-transform: uppercase;
}

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

.section-title {
    margin: 14px 0 14px;
    font-family: var(--font-serif);
    font-size: clamp(30px, 3.6vw, 44px);
    font-weight: 600;
    line-height: 1.24;
    letter-spacing: 0.02em;
}

.section-lead {
    max-width: 620px;
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.85;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
                border-color 0.3s var(--ease), transform 0.3s var(--ease),
                box-shadow 0.3s var(--ease);
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-sm {
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
}

.btn-lg {
    height: 52px;
    padding: 0 32px;
    font-size: 15px;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 10px 24px rgba(228, 0, 43, 0.24);
}

.btn-primary:hover {
    background: var(--brand-dark);
    box-shadow: 0 14px 30px rgba(228, 0, 43, 0.3);
}

.btn-dark {
    background: var(--ink);
    color: #fff;
}

.btn-dark:hover {
    background: #2b2d34;
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-ghost:hover {
    background: #fff;
    border-color: var(--ink);
}

.btn-light {
    background: #fff;
    color: var(--ink);
}

.btn-light:hover {
    background: var(--ice-100);
}

/* ---------- 顶部导航 ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
                box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: var(--line);
    box-shadow: 0 10px 30px rgba(16, 32, 56, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: var(--ink);
}

.brand-logo {
    width: 88px;
    height: 21px;
    fill: currentColor;
    transition: color 0.3s var(--ease);
}

.brand:hover .brand-logo {
    color: var(--brand);
}

.brand-divider {
    width: 1px;
    height: 16px;
    background: var(--line-strong);
}

.brand-collab {
    font-size: 12px;
    letter-spacing: 0.14em;
    color: var(--muted);
    white-space: nowrap;
}

.main-nav {
    flex: 1;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 2px;
}

.main-nav a {
    position: relative;
    display: inline-block;
    padding: 10px 14px;
    font-size: 14px;
    color: #3a3f47;
    transition: color 0.25s var(--ease);
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 1.5px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}

.main-nav a:hover {
    color: var(--ink);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.header-login {
    font-size: 14px;
    color: #3a3f47;
    padding: 6px 4px;
    transition: color 0.25s var(--ease);
}

.header-login:hover {
    color: var(--brand);
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    margin-left: -4px;
    padding: 10px;
    border-radius: 50%;
}

.nav-toggle span {
    display: block;
    height: 1.5px;
    margin: 4px 0;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

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

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

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

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: #fff;
    padding: 8px clamp(20px, 5vw, 40px) 24px;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
}

.mobile-nav.is-open {
    display: block;
    animation: nav-drop 0.32s var(--ease);
}

.mobile-nav a {
    display: block;
    padding: 14px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
}

.mobile-nav-register {
    margin-top: 18px;
    border-bottom: 0 !important;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    text-align: center;
    padding: 14px !important;
}

@keyframes nav-drop {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 页脚 ---------- */
.site-footer {
    background: #0a0a0c;
    color: #a3a9b2;
    padding-top: clamp(56px, 7vw, 84px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: clamp(32px, 4vw, 64px);
    padding-bottom: 56px;
}

.footer-brand .brand--footer {
    color: #fff;
}

.footer-brand .brand-logo {
    width: 104px;
    height: 25px;
}

.footer-tagline {
    margin-top: 18px;
    max-width: 300px;
    font-size: 13.5px;
    line-height: 1.8;
    color: #7d838c;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.footer-social a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
                transform 0.3s var(--ease);
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-col h2 {
    margin-bottom: 18px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: #f0f2f5;
    text-transform: uppercase;
}

.footer-col li + li {
    margin-top: 12px;
}

.footer-col a {
    font-size: 13.5px;
    color: #9aa0a9;
    transition: color 0.25s var(--ease);
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-block: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: #6e747d;
}

.footer-bottom-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.locale-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
    color: #9aa0a9;
    transition: color 0.25s var(--ease);
}

.locale-btn:hover {
    color: #fff;
}

.locale-btn .globe {
    font-size: 14px;
}

.footer-top {
    color: #9aa0a9;
    transition: color 0.25s var(--ease);
}

.footer-top:hover {
    color: #fff;
}

/* ---------- 通用动效 ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease) var(--reveal-delay, 0ms),
                transform 0.8s var(--ease) var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

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

/* ---------- Toast 提示 ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 40px);
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(14, 22, 36, 0.94);
    color: #fff;
    font-size: 14px;
    box-shadow: var(--shadow-m);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 14px);
    transition: opacity 0.32s var(--ease), transform 0.32s var(--ease), visibility 0.32s;
}

.toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.toast::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pink);
    flex-shrink: 0;
}

/* ---------- 无障碍辅助 ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 300;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    transform: translateY(-150%);
    transition: transform 0.25s var(--ease);
}

.skip-link:focus {
    transform: none;
}

/* ---------- 响应式：导航 ---------- */
@media (max-width: 1080px) {
    .main-nav a {
        padding: 10px 10px;
    }

    .brand-collab {
        display: none;
    }

    .brand-divider {
        display: none;
    }
}

@media (max-width: 900px) {
    .main-nav {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .header-inner {
        justify-content: space-between;
    }

    .mobile-nav {
        display: none;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px 24px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    :root {
        --header-h: 60px;
    }

    .header-login {
        display: none;
    }

    .brand-logo {
        width: 78px;
        height: 19px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-social {
        margin-top: 20px;
    }

    .toast {
        bottom: 20px;
        font-size: 13px;
        padding: 11px 16px;
    }
}

/* ---------- 减弱动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
