/**
 * 星谱智防 - Index Page Styles
 * Hero, Products, Solutions, Tech, About, News, CTA
 */

/* ========== Hero Section ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 102, 204, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 204, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-particles { position: absolute; inset: 0; }

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-secondary);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 6s ease-in-out infinite;
}

.particle-1 { top: 20%; left: 15%; animation-delay: 0s; }
.particle-2 { top: 60%; left: 75%; animation-delay: 2s; }
.particle-3 { top: 40%; left: 50%; animation-delay: 4s; }

@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(0) scale(0); }
    20% { opacity: 0.8; transform: translateY(-20px) scale(1); }
    80% { opacity: 0.6; transform: translateY(-80px) scale(0.8); }
    100% { opacity: 0; transform: translateY(-120px) scale(0); }
}

.hero-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
    opacity: 0.4;
    animation: scanLine 4s linear infinite;
}

@keyframes scanLine {
    0% { top: 0; }
    100% { top: 100%; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 8px 20px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--color-secondary);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-xl);
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    margin-bottom: var(--spacing-lg);
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    margin-bottom: var(--spacing-2xl);
    max-width: 600px;
    text-align: justify;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-3xl);
}

.hero-stats {
    display: flex;
    gap: var(--spacing-3xl);
    padding-top: var(--spacing-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.hero-stat .stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-lg);
    color: var(--color-secondary);
    font-size: 1.25rem;
}

.hero-stat .stat-number {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.hero-stat .stat-label {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.45);
}

/* ========== Section Common ========== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

.section-header p {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.section-line {
    width: 48px;
    height: 3px;
    background: var(--gradient-primary);
    margin: var(--spacing-lg) auto 0;
    border-radius: var(--radius-full);
}

/* ========== Products Section ========== */
.products-section { background: var(--color-bg); }

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    transition: all var(--duration-normal) var(--easing);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration-normal) var(--easing);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.3);
}

.product-card:hover::before { transform: scaleX(1); }

.product-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 204, 0.08);
    border: 1px solid rgba(0, 102, 204, 0.15);
    border-radius: var(--radius-xl);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
    transition: all var(--duration-normal) var(--easing);
}

.product-card:hover .product-icon {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    transform: scale(1.05);
}

.product-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.product-card p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
}

.feature-tag {
    padding: 4px 12px;
    font-size: var(--font-size-xs);
    color: var(--color-primary);
    background: rgba(0, 102, 204, 0.06);
    border: 1px solid rgba(0, 102, 204, 0.12);
    border-radius: var(--radius-full);
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    transition: all var(--duration-fast) var(--easing);
}

.product-link:hover {
    color: var(--color-secondary);
    gap: var(--spacing-sm);
}

/* ========== Solutions Section ========== */
.solutions-section { background: var(--color-surface); }

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.solution-card {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-xl);
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    transition: all var(--duration-normal) var(--easing);
    cursor: pointer;
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 102, 204, 0.1);
    border-color: rgba(0, 102, 204, 0.2);
}

.solution-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 204, 0.06);
    border-radius: var(--radius-2xl);
    font-size: 1.75rem;
    color: var(--color-primary);
    margin: 0 auto var(--spacing-lg);
    transition: all var(--duration-normal) var(--easing);
}

.solution-card:hover .solution-icon {
    background: var(--gradient-primary);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
}

.solution-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.solution-card p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ========== Tech Section ========== */
.tech-section { background: var(--color-bg); }

.tech-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4xl);
    align-items: center;
}

.tech-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.tech-item {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    transition: all var(--duration-normal) var(--easing);
}

.tech-item:hover {
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
}

.tech-num {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: rgba(0, 102, 204, 0.15);
    line-height: 1;
    flex-shrink: 0;
    width: 48px;
    transition: color var(--duration-normal) var(--easing);
}

.tech-item:hover .tech-num { color: var(--color-primary); }

.tech-info h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

.tech-info p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
}

.tech-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-visual {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    position: relative;
}

.tech-radar {
    width: 100%;
    height: 100%;
    position: relative;
}

.radar-ring {
    position: absolute;
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.12) inset;
}

.ring-1 { width: 100%; height: 100%; }
.ring-2 { width: 70%; height: 70%; border-color: rgba(0, 212, 255, 0.24); }
.ring-3 { width: 40%; height: 40%; border-color: rgba(0, 212, 255, 0.3); }

/* Rotating scan beam (glowing wedge) */
.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(0, 212, 255, 0.28) 0deg, rgba(0, 212, 255, 0.06) 45deg, transparent 62deg);
    -webkit-mask: radial-gradient(circle, transparent 46%, #000 46.5%);
    mask: radial-gradient(circle, transparent 46%, #000 46.5%);
    animation: radarSweep 4.5s linear infinite;
}

@keyframes radarSweep {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Sonar ping pulse */
.radar-ping {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(0, 229, 160, 0.6);
    border-radius: 50%;
    animation: radarPing 2.6s ease-out infinite;
}
@keyframes radarPing {
    0% { width: 16px; height: 16px; opacity: 0.9; }
    100% { width: 100%; height: 100%; opacity: 0; }
}

/* Detected target blips */
.radar-blip {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e5a0;
    box-shadow: 0 0 10px rgba(0, 229, 160, 0.9);
    animation: blipFlash 2.8s ease-in-out infinite;
}
.blip-1 { top: 30%; left: 62%; animation-delay: 0s; }
.blip-2 { top: 66%; left: 40%; animation-delay: 0.7s; }
.blip-3 { top: 55%; left: 74%; animation-delay: 1.3s; }
.blip-4 { top: 38%; left: 32%; animation-delay: 1.9s; }
@keyframes blipFlash {
    0%, 100% { opacity: 0; transform: scale(0.6); }
    50% { opacity: 1; transform: scale(1.1); }
}

.radar-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.45);
    animation: centerPulse 3s ease-in-out infinite;
}
@keyframes centerPulse {
    0%, 100% { box-shadow: 0 0 22px rgba(0, 212, 255, 0.35); }
    50% { box-shadow: 0 0 42px rgba(0, 212, 255, 0.65); }
}

/* ========== About Section ========== */
.about-section { background: var(--color-surface); }

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4xl);
    align-items: center;
}

.about-left {
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.about-left img {
    width: 100%;
    height: auto;
    display: block;
}

.about-right .section-header { text-align: left; }

.about-desc {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0 var(--spacing-2xl);
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
}

.highlight-item i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 204, 0.08);
    color: var(--color-primary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

/* ========== News Section ========== */
.news-section { background: var(--color-bg); }

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.news-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--duration-normal) var(--easing);
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 102, 204, 0.12);
    border-color: rgba(0, 102, 204, 0.2);
}

.news-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--easing);
}

.news-card:hover .news-image img { transform: scale(1.06); }

.news-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(0, 102, 204, 0.15);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.04) 0%, rgba(0, 212, 255, 0.04) 100%);
}

.news-body { padding: var(--spacing-xl); }

.news-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.news-date {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.news-category {
    padding: 2px 10px;
    font-size: var(--font-size-xs);
    color: var(--color-primary);
    background: rgba(0, 102, 204, 0.06);
    border-radius: var(--radius-full);
}

.news-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
}

.news-title a {
    color: var(--color-text);
    transition: color var(--duration-fast) var(--easing);
}

.news-title a:hover { color: var(--color-primary); }

.news-excerpt {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.7;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== CTA Section ========== */
.cta-section {
    position: relative;
    padding: 120px 0;
    background: var(--gradient-hero);
    overflow: hidden;
    text-align: center;
}

.cta-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cta-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 102, 204, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 204, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--spacing-lg);
    line-height: 1.3;
}

.cta-content p {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--spacing-2xl);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.cta-actions .btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.cta-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ========== Scroll Reveal ========== */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--easing), transform 0.8s var(--easing);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Utility ========== */
.text-center { text-align: center; }
.mt-xl { margin-top: var(--spacing-xl); }

/* ========== Responsive ========== */
@media (max-width: 1200px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .tech-layout { grid-template-columns: 1fr; }
    .about-layout { grid-template-columns: 1fr; }
    .about-left { max-width: 500px; margin: 0 auto; }
    .tech-right { order: -1; max-width: 350px; margin: 0 auto; }
}

@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        text-align: left;
    }

    .hero-content { max-width: 100%; }
    .hero-subtitle { max-width: 100%; }
    .hero-subtitle br { display: none; }

    .hero-actions { flex-wrap: wrap; }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--spacing-xl);
    }

    .hero-stat { flex: 0 0 calc(50% - var(--spacing-xl)); }

    .section { padding: 60px 0; }

    .products-grid { grid-template-columns: 1fr; }

    .solutions-grid { grid-template-columns: 1fr; }

    .news-grid { grid-template-columns: 1fr; }

    .cta-section { padding: 80px 0; }

    .cta-actions { flex-direction: column; }
    .cta-actions .btn { width: 100%; max-width: 280px; }

    .tech-list { gap: var(--spacing-md); }
    .tech-item { padding: var(--spacing-md); }
}

@media (max-width: 480px) {
    .hero-stat { flex: 0 0 100%; }
}

/* 暂无资讯占位 */
.news-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    color: var(--color-text-secondary, #4a5568);
}
.news-empty-icon {
    font-size: 3rem;
    opacity: 0.35;
    margin-bottom: var(--spacing-md);
}
.news-empty h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary, #0a1628);
    margin-bottom: var(--spacing-sm);
}
.news-empty p {
    font-size: 0.95rem;
    margin: 0;
}
