/* =============================================================
   Krewerk 首页 v3 · 紫+青科技深空（对齐品牌设计稿）
   ============================================================= */

/* ---------- Hero（整幅场景背景，对齐设计稿） ---------- */
.hm-hero {
    position: relative; overflow: hidden;
    padding: 5.25rem 0 3rem;
    min-height: 36rem; display: flex; align-items: center;
}
/* 首页区块节奏收紧，对齐设计稿的紧凑排版（home.css 仅首页加载，不影响其他页） */
.kw-section { padding: 22px 0; }
/* 宽度自适应：≥1400px 视口内容区随显示器渐变加宽（1080p→1536、2K→1920 封顶），
   小屏/移动端保持 Bootstrap 默认值不受影响 */
@media (min-width: 1400px) {
    .container { max-width: clamp(1320px, 80vw, 1920px); }
}
.hm-hero-bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: 70% 50%;
    pointer-events: none;
}
/* 左侧压暗保证文字可读 + 顶/底溶解进页面底色 */
.hm-hero-shade {
    position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(12, 16, 39, .95) 0%, rgba(12, 16, 39, .82) 30%, rgba(12, 16, 39, .38) 52%, rgba(12, 16, 39, 0) 74%),
        linear-gradient(0deg, #0C1027 0%, rgba(12, 16, 39, 0) 24%),
        linear-gradient(180deg, rgba(12, 16, 39, .6) 0%, rgba(12, 16, 39, 0) 20%);
}
.hm-hero-copy { position: relative; z-index: 2; max-width: 40rem; }
.hm-eyebrow { letter-spacing: .45em; color: var(--kw-cyan); font-size: .85rem; font-weight: 700; text-shadow: 0 0 14px rgba(95, 217, 234, .45); }
.hm-title { font-size: clamp(2.2rem, 3.9vw, 3.5rem); font-weight: 800; letter-spacing: .06em; margin: 16px 0 12px; line-height: 1.2; }
.hm-title .t-cyan, .hm-title .t-purple {
    background-clip: text; -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.hm-title .t-cyan { background-image: var(--kw-gradient-cyan); filter: drop-shadow(0 0 26px rgba(95, 217, 234, .55)); }
.hm-title .t-purple { background-image: var(--kw-gradient-purple-text); filter: drop-shadow(0 0 26px rgba(138, 106, 255, .6)); }
.hm-title .t-dot { color: var(--kw-text-soft); -webkit-text-fill-color: var(--kw-text-soft); margin: 0 .35em; font-size: .6em; vertical-align: middle; }
.hm-sub { color: var(--kw-text); letter-spacing: .3em; font-size: 1.05rem; font-weight: 700; }
.hm-desc { color: var(--kw-text-muted); font-size: .85rem; line-height: 1.95; max-width: 520px; margin: 14px 0 26px; }
.hm-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hm-cta {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 14px 30px; border-radius: 12px; font-size: .95rem; font-weight: 700;
    text-decoration: none; transition: all .25s ease; letter-spacing: .06em;
}
.hm-cta i { font-size: .95rem; }
.hm-cta-primary {
    background: var(--kw-gradient-primary); color: #fff;
    box-shadow: 0 6px 24px rgba(107, 92, 231, .45), inset 0 1px 0 rgba(255,255,255,.25);
}
.hm-cta-primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 10px 32px rgba(107, 92, 231, .6); }
.hm-cta-ghost {
    background: rgba(138, 106, 255, .10); color: var(--kw-text);
    border: 1px solid rgba(138, 106, 255, .4);
}
.hm-cta-ghost:hover { background: rgba(138, 106, 255, .2); color: #fff; border-color: rgba(138, 106, 255, .7); }
.hm-quote-chip {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
    padding: 7px 16px; border-radius: 999px; font-size: .74rem;
    background: rgba(95, 217, 234, .08); border: 1px solid rgba(95, 217, 234, .3);
    color: var(--kw-cyan);
}
.hm-quote-chip i { font-size: .8rem; }

/* ---------- 通用面板 ---------- */
.hm-panel {
    background:
        radial-gradient(ellipse 70% 55% at 50% -12%, rgba(124, 92, 255, .14), transparent 60%),
        var(--kw-gradient-card);
    border: 1px solid rgba(138, 106, 255, .24);
    border-radius: var(--kw-radius-lg);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    padding: 22px;
    position: relative; overflow: hidden;
}
.hm-panel::before {
    content: ''; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(138, 106, 255, .5), transparent);
}
.hm-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hm-panel-title { font-size: 1.15rem; font-weight: 800; color: var(--kw-text-strong); letter-spacing: .05em; }
.hm-panel-desc { font-size: .74rem; color: var(--kw-text-muted); margin-top: 4px; }
.hm-more { font-size: .74rem; color: var(--kw-text-muted); text-decoration: none; white-space: nowrap; transition: color .2s; }
.hm-more:hover { color: var(--kw-purple-light); }

/* ---------- 微缩星球系列 ---------- */
.hm-planet-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.hm-planet-card {
    display: block; background: rgba(14, 18, 44, .65);
    border: 1px solid var(--kw-border-soft); border-radius: 12px;
    padding: 9px 8px 10px; text-align: center; text-decoration: none;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
    position: relative;
}
.hm-planet-card:hover {
    transform: translateY(-4px); border-color: rgba(138, 106, 255, .55);
    box-shadow: 0 10px 28px rgba(107, 92, 231, .28); color: inherit;
}
.hm-planet-card img {
    width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px;
    background: #12163A; display: block;
}
.hm-badge {
    position: absolute; top: 4px; left: 4px; z-index: 2;
    font-size: .58rem; font-weight: 700; padding: 2px 7px; border-radius: 5px; color: #fff;
}
.hm-badge.hot { background: linear-gradient(135deg, #FF6B4A, #E8467C); }
.hm-badge.new { background: linear-gradient(135deg, #34D399, #0EA5E9); }
.hm-planet-name { font-size: .78rem; font-weight: 600; color: var(--kw-text); margin-top: 8px; }
.hm-planet-en { font-size: .62rem; color: var(--kw-text-muted); margin-top: 1px; }
.hm-planet-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; padding: 0 2px; }
.hm-price { font-size: .8rem; font-weight: 700; color: var(--kw-text-strong); }
.hm-cart-btn {
    width: 26px; height: 26px; border-radius: 8px; display: inline-flex;
    align-items: center; justify-content: center; font-size: .72rem;
    color: var(--kw-purple-light); border: 1px solid rgba(138, 106, 255, .45);
    background: rgba(138, 106, 255, .1); transition: all .2s;
}
.hm-planet-card:hover .hm-cart-btn { background: var(--kw-gradient-primary); color: #fff; border-color: transparent; }

/* ---------- AI 手办工坊步骤 ---------- */
.hm-steps { display: grid; grid-template-columns: repeat(4, 1fr) ; gap: 10px; align-items: stretch; }
.hm-step {
    background: rgba(124, 92, 255, .09);
    border: 1px solid rgba(138, 106, 255, .28);
    border-radius: 14px; padding: 1.15rem .5rem .9rem; text-align: center;
    position: relative; transition: all .25s ease;
}
.hm-step:hover { background: rgba(124, 92, 255, .16); border-color: rgba(138, 106, 255, .55); transform: translateY(-3px); }
.hm-step + .hm-step::before {
    content: '\F138'; /* bi-arrow-right via bootstrap-icons font */
    font-family: 'bootstrap-icons'; position: absolute; left: -11px; top: 50%;
    transform: translateY(-50%); color: var(--kw-purple); font-size: .8rem; z-index: 2;
}
.hm-step-icon {
    width: 3.9rem; height: 3.9rem; margin: 0 auto .75rem; border-radius: 1rem;
    display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
    color: #C3B0FF; background: rgba(138, 106, 255, .14);
    border: 1px solid rgba(138, 106, 255, .4);
    box-shadow: 0 0 22px rgba(138, 106, 255, .35) inset, 0 0 14px rgba(138, 106, 255, .25);
}
.hm-step-title { font-size: .8rem; font-weight: 700; color: var(--kw-text); }
.hm-step-desc { font-size: .64rem; color: var(--kw-text-muted); margin-top: 4px; line-height: 1.6; }

/* ---------- 灵魂星球测试 ---------- */
.hm-soul { display: grid; grid-template-columns: 240px 1.1fr 1.6fr; gap: 26px; align-items: center; }
.hm-soul-galaxy { width: 100%; border-radius: 16px; display: block; filter: drop-shadow(0 0 34px rgba(138, 106, 255, .4)); }
.hm-soul-title {
    font-size: 1.6rem; font-weight: 900; letter-spacing: .1em;
    background-image: var(--kw-gradient-cyan); background-clip: text; -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    filter: drop-shadow(0 0 14px rgba(95, 217, 234, .35));
}
.hm-soul-en { font-size: .72rem; color: var(--kw-text-muted); letter-spacing: .12em; margin: 4px 0 10px; }
.hm-soul-desc { font-size: .8rem; color: var(--kw-text-muted); line-height: 1.9; margin-bottom: 16px; }
.hm-orb-row { display: flex; justify-content: space-between; gap: 12px; }
.hm-orb-item { text-align: center; flex: 1; min-width: 0; }
.hm-orb-label { font-size: .72rem; font-weight: 700; color: var(--kw-text); }
.hm-orb-sub { font-size: .62rem; color: var(--kw-text-muted); margin: 2px 0 12px; }
.hm-orb {
    --oc: #B06BFF;
    width: 5.125rem; height: 5.125rem; border-radius: 50%; margin: 0 auto; position: relative;
    background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.95) 0%, var(--oc) 34%, #05060f 130%);
    box-shadow: 0 0 38px color-mix(in srgb, var(--oc) 65%, transparent), 0 8px 22px rgba(0,0,0,.5);
    animation: hmOrbFloat 5s ease-in-out infinite;
}
.hm-orb::after {
    content: ''; position: absolute; left: -26%; right: -26%; top: 44%; bottom: 44%;
    border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--oc) 70%, #fff 30%);
    opacity: .55; transform: rotate(-14deg);
    box-shadow: 0 0 10px color-mix(in srgb, var(--oc) 60%, transparent);
}
.hm-orb.red { --oc: #FF6B4A; } .hm-orb.blue { --oc: #4AC6FF; animation-delay: .6s; }
.hm-orb.purple { --oc: #B06BFF; animation-delay: 1.2s; } .hm-orb.violet { --oc: #7C5CFF; animation-delay: 1.8s; }
.hm-orb.gold { --oc: #FFC66B; animation-delay: 2.4s; }
@keyframes hmOrbFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---------- 品牌故事 / 工艺 ---------- */
.hm-craft { display: grid; grid-template-columns: 1fr 1.15fr; gap: 34px; align-items: center; }
.hm-eyebrow-line { font-size: .76rem; letter-spacing: .2em; color: var(--kw-cyan); font-weight: 700; }
.hm-craft-title { font-size: clamp(1.35rem, 2.2vw, 1.85rem); font-weight: 900; color: var(--kw-text-strong); margin: 10px 0 10px; letter-spacing: .04em; }
.hm-craft-desc { font-size: .78rem; color: var(--kw-text-muted); line-height: 2; margin-bottom: 14px; }
/* 统计数字收小 + 细竖线分隔，对齐设计稿的克制尺度 */
.hm-stats { display: flex; gap: 0; flex-wrap: wrap; margin-top: 18px; }
.hm-stats > div { padding: 0 1.5rem; border-left: 1px solid rgba(138, 106, 255, .22); }
.hm-stats > div:first-child { padding-left: 0; border-left: 0; }
.hm-stat-num { font-size: 1.5rem; font-weight: 900; letter-spacing: .02em; text-shadow: 0 0 12px currentColor; opacity: .92; }
.hm-stat-num.c1 { color: var(--kw-cyan); } .hm-stat-num.c2 { color: #B4A5FF; }
.hm-stat-num.c3 { color: var(--kw-text-strong); } .hm-stat-num.c4 { color: var(--kw-purple-light); }
.hm-stat-label { font-size: .62rem; color: var(--kw-text-muted); margin-top: 3px; }
.hm-collage { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; }
.hm-craft-img { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--kw-border); min-height: 120px; }
.hm-craft-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.hm-craft-img:hover img { transform: scale(1.05); }
.hm-craft-img.main { grid-row: 1 / 3; }
.hm-craft-cap {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px;
    background: linear-gradient(transparent, rgba(5, 6, 18, .92));
}
.hm-craft-cap b { display: block; font-size: .78rem; color: var(--kw-text-strong); }
.hm-craft-cap span { font-size: .64rem; color: var(--kw-text-muted); }

/* ---------- 用户信任 ---------- */
.hm-testi-head { text-align: center; margin-bottom: 20px; }
.hm-testi-title { font-size: 1.5rem; font-weight: 900; color: var(--kw-text-strong); letter-spacing: .1em; text-shadow: 0 0 14px rgba(138, 106, 255, .25); }
.hm-testi-sub { font-size: .76rem; color: var(--kw-text-muted); letter-spacing: .3em; margin-top: 8px; }
.hm-testi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hm-testi-card { padding: 1rem; }
.hm-testi-tag { font-size: .68rem; color: var(--kw-text-muted); letter-spacing: .1em; margin-bottom: 10px; }
.hm-testi-user {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    background: rgba(14, 18, 44, .65); border: 1px solid var(--kw-border-soft); border-radius: 10px;
}
.hm-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--kw-gradient-primary); color: #fff; font-size: .8rem; font-weight: 700;
}
.hm-avatar.warm { background: linear-gradient(135deg, #FF9A6B, #E8467C); }
.hm-avatar.cyan { background: linear-gradient(135deg, #5FD9EA, #4FA8E8); }
.hm-avatar.gold { background: linear-gradient(135deg, #E3D5B0, #A08A55); color: #1A1508; }
.hm-testi-name { font-size: .78rem; font-weight: 700; color: var(--kw-text); }
.hm-testi-role { font-size: .62rem; color: var(--kw-text-muted); }
.hm-stars { color: var(--kw-gold); font-size: .72rem; letter-spacing: 2px; margin: 10px 0 8px; text-shadow: 0 0 8px rgba(201,181,138,.5); }
.hm-testi-text { font-size: .72rem; color: var(--kw-text-muted); line-height: 1.9; }

/* ---------- 合作伙伴 ---------- */
.hm-partners {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: .75rem 1.4rem; flex-wrap: wrap;
}
.hm-partners .p-label { font-size: .68rem; color: var(--kw-text-muted); letter-spacing: .15em; }
.hm-partners .p-logo { font-size: .88rem; font-weight: 800; color: #8E93B4; opacity: .85; letter-spacing: .04em; transition: all .25s; white-space: nowrap; }
.hm-partners .p-logo:hover { color: var(--kw-text-strong); opacity: 1; }
.hm-partners .p-logo.thin { font-weight: 400; }

/* ---------- 订阅 ---------- */
.hm-news { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: center; overflow: hidden; }
.hm-news-title { font-size: 1.3rem; font-weight: 900; color: var(--kw-text-strong); letter-spacing: .06em; }
.hm-news-desc { font-size: .76rem; color: var(--kw-text-muted); margin: 8px 0 18px; }
.hm-news-form { display: flex; gap: 10px; max-width: 460px; }
.hm-news-form input {
    flex: 1; padding: 10px 16px; border-radius: 10px; font-size: .82rem;
    background: rgba(14, 18, 44, .8); border: 1px solid rgba(138, 106, 255, .35);
    color: var(--kw-text); outline: none; transition: border-color .2s;
}
.hm-news-form input:focus { border-color: var(--kw-purple); }
.hm-news-form input::placeholder { color: #7C81A0; }
.hm-news-planet {
    position: absolute; right: -30px; top: 50%; transform: translateY(-50%);
    width: 18rem; pointer-events: none; opacity: .95;
    filter: drop-shadow(0 0 52px rgba(138, 106, 255, .6));
    /* 四边溶解进横幅背景，去掉硬边矩形感 */
    -webkit-mask-image: radial-gradient(ellipse 72% 72% at 58% 50%, #000 52%, transparent 97%);
    mask-image: radial-gradient(ellipse 72% 72% at 58% 50%, #000 52%, transparent 97%);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1199.98px) {
    .hm-planet-grid { grid-template-columns: repeat(3, 1fr); }
    .hm-soul { grid-template-columns: 200px 1fr; }
    .hm-orb-row { grid-column: 1 / -1; }
    .hm-testi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991.98px) {
    .hm-hero { min-height: 520px; padding: 48px 0 60px; }
    .hm-hero-bg { object-position: 66% 38%; opacity: .85; }
    .hm-hero-shade {
        background: linear-gradient(180deg, rgba(12, 16, 39, .62) 0%, rgba(12, 16, 39, .35) 40%, rgba(12, 16, 39, .86) 82%, #0C1027 100%);
    }
    .hm-soul { grid-template-columns: 1fr; }
    .hm-soul-galaxy { max-width: 260px; margin: 0 auto; }
    .hm-craft { grid-template-columns: 1fr; }
    .hm-news { grid-template-columns: 1fr; }
    .hm-news-planet { display: none; }
    .hm-step + .hm-step::before { display: none; }
    .hm-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
    .hm-planet-grid { grid-template-columns: repeat(3, 1fr); }
    .hm-testi-grid { grid-template-columns: 1fr; }
    .hm-orb-row { flex-wrap: wrap; justify-content: center; gap: 20px; }
    .hm-stats { gap: 20px; }
}
/* 极小屏：星球卡收窄为 2 列，hero 文字压缩字距防止溢出 */
@media (max-width: 399.98px) {
    .hm-planet-grid { grid-template-columns: repeat(2, 1fr); }
    .hm-eyebrow { letter-spacing: .28em; }
    .hm-sub { letter-spacing: .18em; font-size: .92rem; }
    .hm-desc { font-size: .8rem; }
    .hm-cta { padding: 12px 20px; font-size: .88rem; }
    .hm-panel { padding: 16px; }
    .hm-stats > div { padding: 0 1rem; }
    .hm-stat-num { font-size: 1.25rem; }
    .hm-news-form { flex-direction: column; }
    .hm-news-form button { width: 100%; }
}
