﻿/* ============================================================
   产品页科幻设计系统（keyboard / recorder）
   - 非对称 Hero + 浮动产品图
   - 动态数据条 / 扫描线卡片 / 霓虹边角
   - 斜切分隔 / 渐变描边标题
   ============================================================ */

/* ---------- 基础：hero 背景 ---------- */
.hero-neon {
    position: relative;
    overflow: hidden;
}
.page-keyboard .hero-neon {
    background:
        radial-gradient(ellipse at 80% 20%, rgba(255,107,0,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 0% 100%, rgba(255,107,0,0.08) 0%, transparent 50%),
        #1A1A20;
}
.page-recorder .hero-neon {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255,107,0,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(255,107,0,0.10) 0%, transparent 50%),
        #1A1A20;
}
/* 网格 */
.hero-neon::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,107,0,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,107,0,0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
    pointer-events: none;
}
/* 顶部光带 */
.hero-neon::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #FF6B00, transparent);
    opacity: 0.6;
}

/* ---------- Hero 非对称布局 ---------- */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
@media (min-width: 900px) {
    .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
}

/* ---------- 产品图浮动 ---------- */
.product-float {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
.product-float::before {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    background: radial-gradient(circle, rgba(255,107,0,0.3) 0%, transparent 65%);
    filter: blur(40px);
    z-index: 0;
    animation: pulseGlow 4s ease-in-out infinite;
}
.product-float img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 480px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
    animation: floatY 6s ease-in-out infinite;
}
@keyframes floatY {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
}
@keyframes pulseGlow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}
/* 底座光环 */
.product-float::after {
    content: '';
    position: absolute;
    bottom: 10%;
    width: 60%;
    height: 30px;
    background: radial-gradient(ellipse, rgba(255,107,0,0.4) 0%, transparent 70%);
    filter: blur(10px);
    z-index: 0;
}

/* ---------- Hero 标题 ---------- */
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}
.hero-title .accent {
    background: linear-gradient(120deg, #FF6B00 0%, #FF8533 50%, #FFB080 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
}

/* ---------- 徽章 ---------- */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(255,107,0,0.1);
    border: 1px solid rgba(255,107,0,0.3);
    color: #FF6B00;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.hero-badge .dot {
    width: 8px; height: 8px;
    background: #FF6B00;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,107,0,0.7); }
    50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(255,107,0,0); }
}

/* ---------- 数据条 stats strip ---------- */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.stat-item {
    text-align: left;
}
.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FF6B00;
    line-height: 1;
    font-family: 'SF Mono', 'Cascadia Code', monospace;
}
.stat-label {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 0.3rem;
    letter-spacing: 0.05em;
}

/* ---------- 科幻卡片：扫描线 + 边角 ---------- */
.sci-card {
    position: relative;
    background: #2A2A32;
    border: 1px solid #3A3A44;
    border-radius: 1.5rem;
    padding: 1.8rem;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.sci-card:hover {
    border-color: rgba(255,107,0,0.5);
    transform: translateY(-2px);
}

/* ---------- 键帽（键盘页） ---------- */
.page-keyboard .keycap {
    border-radius: 0.75rem;
    border-bottom: 3px solid rgba(255,107,0,0.35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 10px rgba(0,0,0,0.3);
}
.page-keyboard .feature-large { grid-column: span 1; }
@media (min-width: 1024px) {
    .page-keyboard .feature-large { grid-column: span 2; }
}
.page-keyboard .feature-large h3 { font-size: 1.5rem; }

/* ---------- 录音卡页：声波 ---------- */
.wave-bars {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    height: 28px;
    margin-bottom: 1.5rem;
}
.wave-bars span {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(to top, #FF6B00, #FF8533);
    opacity: 0.85;
    animation: waveBar 1.4s ease-in-out infinite;
}
.wave-bars span:nth-child(1) { height: 10px; animation-delay: 0s; }
.wave-bars span:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.wave-bars span:nth-child(3) { height: 28px; animation-delay: 0.2s; }
.wave-bars span:nth-child(4) { height: 16px; animation-delay: 0.3s; }
.wave-bars span:nth-child(5) { height: 24px; animation-delay: 0.4s; }
.wave-bars span:nth-child(6) { height: 12px; animation-delay: 0.5s; }
.wave-bars span:nth-child(7) { height: 26px; animation-delay: 0.6s; }
.wave-bars span:nth-child(8) { height: 14px; animation-delay: 0.7s; }
.wave-bars span:nth-child(9) { height: 22px; animation-delay: 0.8s; }
.wave-bars span:nth-child(10) { height: 8px; animation-delay: 0.9s; }
@keyframes waveBar {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1.15); }
}
.page-recorder .sci-card { border-radius: 2rem; }

/* ---------- 斜切分隔 ---------- */
.wave-divider {
    height: 24px;
    margin: 0 auto;
    background-image: repeating-linear-gradient(90deg,
        rgba(255,107,0,0.4) 0 2px, transparent 2px 10px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}
.section-slant {
    position: relative;
}
.section-slant::before {
    content: '';
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 60px;
    background: inherit;
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    z-index: -1;
}

/* ---------- 下载卡 ---------- */
.dl-card {
    position: relative;
    background: linear-gradient(145deg, #2A2A32 0%, #22222A 100%);
    border: 1px solid #3A3A44;
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.4s ease;
    overflow: hidden;
}
.dl-card:hover {
    border-color: #FF6B00;
    transform: translateY(-4px);
    box-shadow: 0 16px 50px rgba(255,107,0,0.2);
}
.dl-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF6B00, #FF8533);
    opacity: 0.5;
}

/* ---------- 标题装饰 ---------- */
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}
.section-title .slash {
    color: #FF6B00;
    margin-right: 0.5rem;
}

/* ---------- 浅色模式 ---------- */
html.light-mode .page-keyboard .hero-neon,
html.light-mode .page-recorder .hero-neon {
    background:
        radial-gradient(ellipse at 80% 20%, rgba(255,107,0,0.15) 0%, transparent 50%),
        #f6efe9 !important;
}
html.light-mode .sci-card,
html.light-mode .dl-card {
    background: #fff;
    border-color: #e5dcd4;
}
html.light-mode .wave-bars span { background: linear-gradient(to top, #d25600, #FF8533); }

/* ============================================================
   升级版特效（v2）
   ============================================================ */

/* 巨型水印字 */
.hero-watermark {
    position: absolute;
    right: -2%;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(12rem, 28vw, 22rem);
    font-weight: 900;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,107,0,0.15);
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    letter-spacing: -0.05em;
}

/* 鼠标跟随光斑（仅限文字区，不影响顶部线稿图） */
.spot-card { position: relative; }
.spot-card > .spot {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%),
                rgba(255,107,0,0.15), transparent 65%);
    pointer-events: none;
}
.spot-card:hover > .spot { opacity: 1; }
/* 带顶部图的卡片：光斑只覆盖图下方区域 */
.spot-card.has-image > .spot {
    top: 10rem;
    height: calc(100% - 10rem);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* 3D 倾斜 */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.2s ease;
    will-change: transform;
}
.tilt-card > * { transform: translateZ(20px); }

/* 滚动淡入 */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* 跑马灯 */
.marquee {
    overflow: hidden;
    padding: 1.2rem 0;
    border-top: 1px solid rgba(255,107,0,0.15);
    border-bottom: 1px solid rgba(255,107,0,0.15);
    background: rgba(255,107,0,0.03);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 50s linear infinite;
    font-size: 0.9rem;
    color: #9CA3AF;
    letter-spacing: 0.05em;
    text-transform: none;
}
.marquee-track span {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding-right: 3rem;
    white-space: nowrap;
}
.marquee-track span::after {
    content: '◆';
    color: #FF6B00;
    font-size: 0.6rem;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* CTA 流光边框 */
.btn-glow-animated { position: relative; z-index: 0; }
.btn-glow-animated::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from var(--angle, 0deg), #FF6B00, #FF8533, #FFB080, #FF6B00);
    z-index: -1;
    animation: rotateBorder 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-glow-animated:hover::before { opacity: 1; }
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes rotateBorder { to { --angle: 360deg; } }

/* 噪点 */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   浅色模式补丁（v2 特效适配）
   ============================================================ */
html.light-mode .stats-strip { border-top-color: rgba(0,0,0,0.08); }
html.light-mode .stat-label { color: #64748b; }
html.light-mode .marquee {
    border-top-color: rgba(255,107,0,0.25);
    border-bottom-color: rgba(255,107,0,0.25);
    background: rgba(255,107,0,0.05);
}
html.light-mode .marquee-track { color: #64748b; }
html.light-mode .hero-watermark {
    -webkit-text-stroke: 1px rgba(255,107,0,0.25);
}
html.light-mode .hero-neon::before {
    background-image:
        linear-gradient(rgba(255,107,0,0.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,107,0,0.10) 1px, transparent 1px);
}
html.light-mode .hero-badge {
    background: rgba(255,107,0,0.08);
    border-color: rgba(255,107,0,0.35);
    color: #d25600;
}
html.light-mode .wave-divider {
    background-image: repeating-linear-gradient(90deg,
        rgba(210,86,0,0.5) 0 2px, transparent 2px 10px);
}
html.light-mode body::after { opacity: 0.04; }

/* 浅色模式：硬编码白色文本修正 */
html.light-mode .hero-title { color: #0f172a; }
html.light-mode .section-title { color: #0f172a; }
html.light-mode .hero-title .accent {
    background: linear-gradient(120deg, #d25600 0%, #FF6B00 50%, #FF8533 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* 有图的特性卡：去掉 tech-border-deep 的橙色光晕，避免盖在图上 */
.spot-card.has-image:hover {
    box-shadow: none !important;
}

/* 浅色模式：产品图阴影减淡 */
html.light-mode .product-float img {
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.15));
}
html.light-mode .product-float::before {
    background: radial-gradient(circle, rgba(255,107,0,0.18) 0%, transparent 65%);
}
html.light-mode .product-float::after {
    background: radial-gradient(ellipse, rgba(255,107,0,0.25) 0%, transparent 70%);
}

/* 浅色模式：键帽阴影调淡 */
html.light-mode .page-keyboard .keycap {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 4px 10px rgba(0,0,0,0.08);
}
