/* ==========================================================================
   K-Plot 官网共用样式（近黑 · 单强调色）
   --------------------------------------------------------------------------
   参考 Linear / Resend / Vercel / Supabase 的深色规范：
   - 近黑中性底色（#0A0A0B），不偏蓝、不偏紫，避免「发灰发糊」；
   - 两种表面色 + 单一强调色（青绿 #2DD4BF），全站 ≤4 色；
   - 主按钮 = 白底黑字（Linear 式），青绿只做描边 / 高亮 / 选中态；
   - 细描边代替阴影，文字高对比（正文 #F4F4F5 / 次级 #C7C7CF）。
   各页面内联样式顶部会再声明一份同名变量兜底，即便本文件漏传，
   页面底色与文字也不会变回浅色。
   ========================================================================== */

:root {
    /* 表面层级 */
    --bg: #0A0A0B;
    --bg-2: #0E0E10;
    --surface: #131316;
    --surface-2: #17171A;
    --surface-3: #1D1D21;

    --paper: #0A0A0B;        /* 兼容旧变量名 */
    --paper-deep: #070708;
    --ink: #F4F4F5;          /* 兼容旧变量名（旧代码用 --ink 当深色文字，现指向亮色） */
    --ink-soft: #17171A;
    --ink-line: rgba(255, 255, 255, .10);
    --white: #FFFFFF;

    /* 文字 */
    --text: #F4F4F5;
    --text-2: #C7C7CF;
    --text-3: #9E9EA8;

    /* 描边 */
    --line: rgba(255, 255, 255, .08);
    --line-soft: rgba(255, 255, 255, .06);
    --line-strong: rgba(255, 255, 255, .14);

    /* 强调色（唯一） */
    --teal: #2DD4BF;
    --teal-dark: #5EEAD4;
    --teal-soft: rgba(45, 212, 191, .12);
    --sky: #6AA8FF;
    --gold: #E0B36A;
    --gold-soft: rgba(224, 179, 106, .12);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;

    --shadow-xs: inset 0 1px 0 rgba(255, 255, 255, .04);
    --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 24px -22px #000;
    --shadow-md: 0 24px 50px -32px #000;
    --shadow-lg: 0 50px 90px -44px #000;

    --max: 1160px;
    --nav-h: 68px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "HarmonyOS Sans SC",
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(45, 212, 191, .25); color: #fff; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ============================ 顶部导航 ============================ */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 11, .72);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-nav.is-scrolled {
    background: rgba(10, 10, 11, .9);
    box-shadow: 0 12px 32px -20px #000;
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: var(--nav-h);
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: #fff;
    padding: 4px;
    display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
    font-size: 18px; font-weight: 800; letter-spacing: .01em; color: #fff;
}
.brand-sub {
    font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
    color: var(--text-3); font-weight: 600;
}

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
    position: relative;
    font-size: 14.5px;
    color: var(--text-2);
    transition: color .2s ease;
    padding: 6px 0;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    border-radius: 2px;
    background: var(--teal);
}
.btn-nav {
    padding: 9px 18px !important;
    border-radius: 999px;
    color: #0A0A0B !important;
    font-weight: 700;
    font-size: 14px !important;
    background: #fff;
    transition: transform .18s ease, opacity .2s ease;
}
.btn-nav:hover { transform: translateY(-1px); opacity: .9; }
.btn-nav::after { display: none !important; }
.btn-nav.active::after {
    display: block !important;
    position: absolute; left: 0; right: 0; bottom: -6px;
    height: 2px; border-radius: 2px;
    background: var(--teal);
}

/* ============================ 按钮 ============================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    transition: transform .18s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: #fff; color: #0A0A0B; }
.btn-primary:hover { transform: translateY(-2px); opacity: .92; }
.btn-ink { background: #fff; color: #0A0A0B; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .05); }
.btn-on-dark {
    background: rgba(255, 255, 255, .05);
    border-color: var(--line-strong);
    color: var(--text);
}
.btn-on-dark:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .24); }
.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 11px; }
.btn-block { width: 100%; }

/* ============================ 深色区块（顶部大块） ============================ */
.dark-block {
    position: relative;
    color: #fff;
    background:
        radial-gradient(1100px 540px at 80% -12%, rgba(45, 212, 191, .14), transparent 62%),
        radial-gradient(900px 480px at 6% -8%, rgba(120, 140, 255, .10), transparent 60%),
        var(--bg);
    overflow: hidden;
}
.dark-block::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
    mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
    pointer-events: none;
}
.dark-block > * { position: relative; z-index: 1; }

.eyebrow {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
    color: var(--teal);
    white-space: nowrap;
}

/* ============================ 区段 ============================ */
.section { padding: 56px 0; }
.section--tight { padding: 40px 0; }
.section--white {
    background: var(--bg-2);
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}
.section--paper-deep { background: var(--paper-deep); }
.section-head { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.section-head .eyebrow {
    display: flex;
    width: 100%;
    gap: 16px;
    margin-bottom: 14px;
}
.section-head .eyebrow::before,
.section-head .eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    align-self: center;
    background: linear-gradient(90deg, transparent, currentColor);
    opacity: .5;
}
.section-head .eyebrow::after {
    background: linear-gradient(90deg, currentColor, transparent);
}
.section-head h2 {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 750; letter-spacing: -.02em; line-height: 1.25;
    margin-bottom: 12px;
    color: #fff;
}
.section-head p { color: var(--text-2); font-size: 15.5px; }

/* ============================ 卡片 / 通用件 ============================ */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}
.chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
    color: var(--text-2);
    font-size: 12.5px;
    white-space: nowrap;
}
.chip strong { color: #fff; font-weight: 700; }
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }

.muted { color: var(--text-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }

/* ============================ 表单 ============================ */
.field { margin-bottom: 14px; }
.field > label {
    display: block; font-size: 12.5px; font-weight: 600;
    color: var(--text-2); margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"] {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, .04);
    color: #fff;
    font-size: 14.5px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input::placeholder { color: #9E9EA8; }
.field input:focus {
    outline: none;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(45, 212, 191, .55);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, .14);
}

/* ============================ 页脚 ============================ */
.site-footer {
    background: #080809;
    color: var(--text-3);
    padding: 56px 0 0;
    font-size: 13.5px;
    border-top: 1px solid var(--line-soft);
}
.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 34px; height: 34px; border-radius: 9px; background: #fff; padding: 4px; }
.footer-brand b { color: #fff; font-size: 17px; font-weight: 800; }
.footer-desc { max-width: 330px; line-height: 1.8; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.footer-col a { display: block; padding: 5px 0; color: var(--text-3); transition: color .18s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid var(--line-soft);
    padding: 18px 0 22px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px;
    font-size: 12.5px;
    color: var(--text-3);
}
.footer-bottom a { color: var(--text-3); }
.footer-bottom a:hover { color: #fff; }

/* ============================ 子页顶部 ============================ */
.page-hero { padding: 52px 0 28px; }
.page-hero h1 {
    font-size: clamp(32px, 4.6vw, 52px);
    font-weight: 800; letter-spacing: -.02em; line-height: 1.14;
    margin: 16px 0 14px;
    color: #fff;
}
.page-hero h1 .grad {
    background: linear-gradient(96deg, #FFFFFF 4%, #8BE8DA 58%, #7AC8FF 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero p { font-size: 16px; color: var(--text-2); max-width: 700px; }
.page-hero--center { text-align: center; }
.page-hero--center p { margin: 0 auto; }
.page-hero--center .eyebrow { justify-content: center; }
/* 紧跟 hero 的区段顶部收紧，避免 hero 与正文之间大段空白 */
.page-hero + .section { padding-top: 32px; }

/* ============================ 入场动画 ============================ */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1); }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================ 响应式 ============================ */
@media (max-width: 980px) {
    .section { padding: 48px 0; }
    .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    :root { --nav-h: 60px; }
    .container { padding: 0 18px; }
    .section { padding: 44px 0; }
    .section-head { margin-bottom: 24px; }
    .brand-sub { display: none; }
    .brand-mark { width: 30px; height: 30px; }
    .nav-links { gap: 0; }
    .nav-links a:not(.btn-nav) { display: none; }
    .btn-nav { padding: 8px 14px !important; font-size: 13.5px !important; }
    .page-hero { padding: 40px 0 24px; }
    .footer-top { grid-template-columns: 1fr; gap: 28px; padding-bottom: 30px; }
    .footer-bottom { justify-content: flex-start; }
}
