/* ============================================
   首页样式
   ============================================ */

/* Hero Section */
.hero {
    position: relative;
    min-height: 580px;
    display: flex;
    align-items: center;
    background: linear-gradient(
        135deg,
        var(--primary-dark) 0%,
        var(--primary) 50%,
        var(--accent) 100%
    );
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(
            circle at 20% 80%,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 20%,
            rgba(255, 255, 255, 0.08) 0%,
            transparent 40%
        );
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    padding: 3.5rem 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.badge-logo {
    height: 20px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.875rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.35rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.875rem;
}

.hero-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.75;
    margin-bottom: 1.75rem;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions .btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    min-height: 48px;
}

/* Hero Decoration - Mobile Security Theme */
.hero-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.deco-phone {
    position: absolute;
    right: 8%;
    top: 52%;
    transform: translateY(-50%);
    width: 180px;
    height: 360px;
    opacity: 0.9;
    animation: float 6s ease-in-out infinite;
}

.deco-phone-small {
    position: absolute;
    right: 32%;
    top: 12%;
    width: 90px;
    height: 180px;
    opacity: 0.6;
    animation: float 8s ease-in-out infinite reverse;
}

.deco-code {
    position: absolute;
    opacity: 0.7;
    animation: float 5s ease-in-out infinite;
}

.code-1 {
    right: 22%;
    top: 62%;
    animation-delay: -1s;
}

.code-2 {
    right: 5%;
    top: 18%;
    animation-delay: -2s;
}

.deco-nodes {
    position: absolute;
    right: 38%;
    bottom: 8%;
    opacity: 0.6;
    animation: pulse 4s ease-in-out infinite;
}

.deco-fingerprint {
    position: absolute;
    right: 3%;
    bottom: 22%;
    opacity: 0.4;
    animation: rotate 20s linear infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Book Section */
.book-content {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 3.5rem;
    align-items: start;
}

.book-cover {
    position: sticky;
    top: 100px;
}

.book-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    transition: var(--transition);
}

.book-image-wrapper:hover {
    transform: translateY(-8px);
    filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.2));
}

.book-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.book-info .section-title {
    margin-bottom: 1.25rem;
    font-size: 1.875rem;
}

.book-desc {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.book-features {
    margin-bottom: 1.75rem;
}

.book-features h4 {
    font-size: 1.1rem;
    margin-bottom: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.feature-icon {
    width: 38px;
    height: 38px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
}

.feature-text strong {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.feature-text span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.book-audience {
    margin-bottom: 1.75rem;
}

.book-audience h4 {
    font-size: 1.1rem;
    margin-bottom: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

.audience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.audience-tags .badge {
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
}

.book-meta-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.meta-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Authors Section */
.authors-grid {
    margin-top: 1.5rem;
}

.author-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.author-avatar {
    margin-bottom: 1.25rem;
}

.avatar-placeholder {
    width: 100px;
    height: 100px;
    background: linear-gradient(
        135deg,
        var(--bg-secondary) 0%,
        var(--bg-tertiary) 100%
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--text-muted);
}

.author-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    margin: 0 auto;
    display: block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.author-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.author-title {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0.875rem;
}

.author-bio {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    text-align: left;
}

/* Responsive */
@media (max-width: 1200px) {
    .deco-phone {
        width: 160px;
        height: 320px;
        right: 5%;
    }

    .deco-phone-small {
        width: 80px;
        height: 160px;
        right: 30%;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-decoration {
        width: 40%;
        opacity: 0.5;
    }

    .deco-phone {
        width: 140px;
        height: 280px;
    }

    .deco-code,
    .deco-fingerprint {
        display: none;
    }

    .book-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .book-cover {
        position: relative;
        top: 0;
        display: flex;
        justify-content: center;
    }

    .labs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 600px;
    }

    .hero-decoration {
        display: none;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .book-image-wrapper {
        max-width: 260px;
    }

    .book-meta-info {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Smooth scroll offset for fixed header */
html {
    scroll-padding-top: 80px;
}
