/* ============================================================
   Tikeds 官网 · style.css
   明亮模式为默认，导航栏可切换黑暗模式
   明亮/黑暗两套均有动态光线背景（光线深浅缓慢变化）
   ============================================================ */

/* ---------- 视觉 token ---------- */
:root,
:root[data-theme="light"] {
    --bg: #f4f7fb;
    --bg-elev: #ffffff;
    --bg-elev2: #eef2f8;
    --primary: #2f7fe0;          /* 品牌蓝（亮背景加深以保证对比） */
    --primary-soft: rgba(47,127,224,.12);
    --gold: #e09a1f;
    --red: #d94b4b;
    --text: #1b2430;
    --text-sub: #5f6b7a;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --shadow: 4px 4px 0 rgba(15,40,70,.08);
    --shadow-hover: 7px 7px 0 rgba(15,40,70,.10);
    --radius: 10px;
    --nav-bg: rgba(255,255,255,.78);
    --glow1: rgba(63,169,245,.30);
    --glow2: rgba(255,170,0,.16);
    --glow3: rgba(85,180,255,.22);
    --glow-opacity: 1;
    --on-primary: #ffffff;
}

:root[data-theme="dark"] {
    --bg: #0f1214;
    --bg-elev: #171b20;
    --bg-elev2: #1e242c;
    --primary: #3FA9F5;
    --primary-soft: rgba(63,169,245,.12);
    --gold: #FFAA00;
    --red: #FF5555;
    --text: #e8e8e8;
    --text-sub: #98a2ad;
    --border: #2a3038;
    --border-strong: #3a4350;
    --shadow: 4px 4px 0 rgba(0,0,0,.45);
    --shadow-hover: 7px 7px 0 rgba(0,0,0,.55);
    --radius: 8px;
    --nav-bg: rgba(15,18,20,.85);
    --glow1: rgba(63,169,245,.20);
    --glow2: rgba(255,170,0,.10);
    --glow3: rgba(85,120,255,.16);
    --glow-opacity: .85;
    --on-primary: #052a40;
}

/* ---------- 重置与全局 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
a { text-decoration: none; color: inherit; }   /* 清除 a 标签默认下划线，避免莫名横线 */
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg);
    min-height: 100vh;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    overflow-x: hidden;
    transition: background-color .4s ease, color .4s ease;
}

/* ---------- 动态光线背景（明/暗共用，颜色由变量切换） ---------- */
/* 性能优化：用径向渐变模拟柔和光斑，无 filter:blur；动画仅 transform（GPU 合成），避免每帧重绘模糊 */
.bg-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}
.bg-glow span {
    position: absolute;
    border-radius: 50%;
    will-change: transform, opacity;
}
.bg-glow span:nth-child(1) { width: 560px; height: 560px; background: radial-gradient(circle, var(--glow1), transparent 70%); top: -16%; left: -10%; animation: drift1 20s ease-in-out infinite; }
.bg-glow span:nth-child(2) { width: 520px; height: 520px; background: radial-gradient(circle, var(--glow2), transparent 70%); bottom: -18%; right: -10%; animation: drift2 24s ease-in-out infinite; }
.bg-glow span:nth-child(3) { width: 440px; height: 440px; background: radial-gradient(circle, var(--glow3), transparent 70%); top: 42%; left: 56%; animation: drift3 28s ease-in-out infinite; }

/* 光线深浅 = opacity 呼吸（合成属性，GPU），位移 = transform（合成属性，GPU） */
@keyframes drift1 {
    0%, 100% { transform: translate(0, 0) scale(1);    opacity: var(--glow-opacity); }
    50%      { transform: translate(80px, 50px) scale(1.12); opacity: calc(var(--glow-opacity) * .55); }
}
@keyframes drift2 {
    0%, 100% { transform: translate(0, 0) scale(1);    opacity: var(--glow-opacity); }
    50%      { transform: translate(-90px, -40px) scale(1.10); opacity: calc(var(--glow-opacity) * .55); }
}
@keyframes drift3 {
    0%, 100% { transform: translate(0, 0) scale(1);    opacity: var(--glow-opacity); }
    50%      { transform: translate(-60px, 80px) scale(1.15); opacity: calc(var(--glow-opacity) * .55); }
}

/* ---------- 导航栏 ---------- */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: background .4s ease, border-color .4s ease;
}
.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--text);
    user-select: none;
}
.nav-logo .brand {
    background: linear-gradient(135deg, #1A56A0, #3FA9F5 55%, #55FFFF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; gap: 26px; list-style: none; align-items: center; }
.nav-links a {
    color: var(--text-sub);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: color .25s, border-color .25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* 明暗切换按钮 */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: var(--bg-elev);
    color: var(--text);
    border: 1.5px solid var(--border-strong);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all .25s ease;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.theme-toggle .icon { font-size: 15px; line-height: 1; }

/* 汉堡菜单（移动端） */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 42px; height: 42px;
    background: var(--bg-elev);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 9px;
    transition: background .2s, border-color .2s;
}
.hamburger span { display: block; height: 2px; background: var(--primary); border-radius: 1px; transition: all .3s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 120px 20px 90px;
    text-align: center;
}
.hero h1 {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #1A56A0, #3FA9F5 55%, #55FFFF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero .subtitle {
    margin-top: 18px;
    font-size: 20px;
    color: var(--text-sub);
    letter-spacing: .5px;
}
.hero-cta { margin-top: 38px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block;
    padding: 13px 30px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius);
    border: 2px solid var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: var(--shadow);
    transition: all .25s ease;
}
.btn:hover { background: var(--primary); color: var(--on-primary); transform: translate(-2px,-2px); box-shadow: var(--shadow-hover); }
.btn-gold { border-color: var(--gold); background: rgba(224,154,31,.12); color: var(--gold); }
.btn-gold:hover { background: var(--gold); color: #3f2e00; }

/* ---------- 区块 ---------- */
.section {
    padding: 70px 20px 30px;
    max-width: 1080px;
    margin: 0 auto;
}
.section-title {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 38px;
    color: var(--text);
}
.section-title::after {
    content: "";
    display: block;
    width: 64px; height: 4px;
    margin: 12px auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), #55FFFF);
}

/* ---------- 卡片网格 ---------- */
.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
}
.card {
    flex: 1;
    min-width: 280px;
    max-width: 520px;
    background: var(--bg-elev);
    padding: 30px 26px 32px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: left;
    transition: transform .25s, box-shadow .25s, background .25s, border-color .25s;
}
.card:hover { transform: translate(-3px,-3px); box-shadow: var(--shadow-hover); background: var(--bg-elev2); border-color: var(--primary); }
.card .card-icon { width: 44px; height: 44px; margin-bottom: 12px; }
.card h3 { font-size: 21px; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.card p { color: var(--text-sub); font-size: 14px; line-height: 1.75; margin-bottom: 14px; }
.card h3.t-primary { color: var(--primary); }

/* “制作中”等状态小标签 */
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    background: rgba(224,154,31,.12);
    border: 1px solid var(--gold);
    border-radius: 20px;
    padding: 2px 9px;
    margin-left: 8px;
    vertical-align: middle;
    white-space: nowrap;
}

.product-meta {
    display: inline-block;
    font-family: "Courier New", monospace;
    font-size: 13px;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid var(--primary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .25s;
}
.product-meta:hover { background: var(--primary); color: var(--on-primary); }

/* 小尺寸卡片（合作伙伴 / 价值） */
.card.small { min-width: 220px; max-width: 300px; text-align: center; }
.card.small h3 { font-size: 18px; }
.card.small p { font-size: 13px; }

/* 简介文本 */
.intro {
    max-width: 760px;
    margin: 0 auto 34px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.9;
    text-align: left;
}
.intro strong { color: var(--primary); }

.placeholder-note {
    width: 100%;
    color: var(--text-sub);
    font-size: 14px;
    font-style: italic;
    text-align: center;
    margin-top: 6px;
}

/* ---------- 底部 ---------- */
.footer {
    text-align: center;
    border-top: 1px solid var(--border);
    padding: 30px 20px;
    margin-top: 60px;
    color: var(--text-sub);
    font-size: 13px;
    line-height: 1.9;
    background: var(--bg-elev);
    transition: background .4s ease;
}
.footer a { color: var(--primary); text-decoration: none; }
.footer a:hover { text-shadow: 0 0 10px rgba(47,127,224,.45); }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .navbar { padding: 12px 18px; }
    .hamburger { display: flex; }
    .nav-links {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch;
        gap: 0;
        background: var(--nav-bg);
        border-bottom: 1px solid var(--border);
        max-height: 0; overflow: hidden;
        transition: max-height .35s ease;
    }
    .nav-links.open { max-height: 360px; }
    .nav-links a { display: block; padding: 14px 24px; border-bottom: 1px solid var(--border); }
    .hero { padding: 96px 16px 70px; }
    .hero h1 { font-size: 40px; letter-spacing: 1px; }
    .hero .subtitle { font-size: 16px; }
    .card, .card.small { min-width: 100%; max-width: 100%; }
    .section { padding: 56px 16px 20px; }
    .nav-right { gap: 12px; }
}

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
a:focus-visible, .btn:focus-visible, .theme-toggle:focus-visible, .hamburger:focus-visible, .product-meta:focus-visible {
    outline: 2px solid var(--gold); outline-offset: 2px;
}
