/* ============================================
   恒星 HENGXING - Global Stylesheet
   Minimalist design for smart hardware brand
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-black: #0a0a0a;
    --color-dark: #1d1d1f;
    --color-white: #ffffff;
    --color-bg: #f5f5f7;
    --color-text: #1d1d1f;
    --color-text-secondary: #86868b;
    --color-border: #d2d2d7;
    --color-border-light: #e8e8ed;
    --color-accent: #0071e3;
    --color-accent-hover: #0058b0;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --max-width: 1200px;
    --nav-height: 64px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, "SF Pro Display", "SF Pro Text", "Helvetica Neue",
                 "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section--gray {
    background: var(--color-bg);
}

.section--dark {
    background: var(--color-black);
    color: var(--color-white);
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

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

.section--dark .section-header p {
    color: rgba(255,255,255,0.6);
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.text-gradient {
    background: linear-gradient(135deg, #1d1d1f 0%, #86868b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255,255,255,0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--color-border-light);
    z-index: 1000;
    transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-black);
}

.nav-logo .logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-black);
    position: relative;
    display: inline-block;
}

.nav-logo .logo-mark::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-white);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-menu a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-dark);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-black);
    transition: width var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-black);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 980px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-black);
    color: var(--color-white);
}

.btn--primary:hover {
    background: var(--color-dark);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: transparent;
    color: var(--color-black);
    border: 1px solid var(--color-border);
}

.btn--secondary:hover {
    border-color: var(--color-black);
    color: var(--color-black);
}

.btn--light {
    background: var(--color-white);
    color: var(--color-black);
}

.btn--light:hover {
    background: rgba(255,255,255,0.9);
    color: var(--color-black);
    transform: translateY(-1px);
}

.btn--ghost-light {
    background: transparent;
    color: var(--color-white);
    border: 1px solid rgba(255,255,255,0.3);
}

.btn--ghost-light:hover {
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn--lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--nav-height) 24px 80px;
    background: var(--color-white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0,113,227,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: bounce 2s infinite;
}

.hero-scroll .arrow {
    width: 1px;
    height: 32px;
    background: var(--color-text-secondary);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Feature Cards --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius);
    padding: 40px 32px;
    transition: all var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--color-border);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-black);
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Product Cards --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    cursor: pointer;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image svg {
    width: 60%;
    height: 60%;
    color: var(--color-text-secondary);
}

.product-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: var(--color-black);
    color: var(--color-white);
    border-radius: 980px;
    font-size: 0.75rem;
    font-weight: 500;
}

.product-info {
    padding: 24px;
}

.product-info h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.product-info p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.product-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition);
}

.product-link:hover {
    gap: 8px;
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--color-border);
    border-radius: 980px;
    background: var(--color-white);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--color-text);
}

.filter-btn:hover {
    border-color: var(--color-black);
}

.filter-btn.active {
    background: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

/* --- Stats Section --- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    text-align: center;
}

.stat-item .stat-number {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.stat-item .stat-label {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
}

/* --- Timeline --- */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    padding-left: 40px;
    padding-bottom: 48px;
    position: relative;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-black);
    border: 2px solid var(--color-white);
    box-shadow: 0 0 0 2px var(--color-border);
}

.timeline-year {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.timeline-item h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.timeline-item p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-item .icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item .icon svg {
    width: 20px;
    height: 20px;
    color: var(--color-black);
}

.contact-item h4 {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.contact-item p {
    font-size: 1.05rem;
    font-weight: 500;
}

/* --- Form --- */
.contact-form {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--color-white);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-black);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-message {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-top: 16px;
    display: none;
}

.form-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    display: block;
}

.form-message.error {
    background: #fbe9e7;
    color: #c62828;
    display: block;
}

/* --- FAQ --- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--color-border-light);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 24px 0;
    font-size: 1.05rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text);
    transition: color var(--transition);
}

.faq-question:hover {
    color: var(--color-accent);
}

.faq-question .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.faq-item.open .faq-question .icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
}

.faq-answer-inner {
    padding: 0 0 24px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- Resource Cards --- */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.resource-card {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius);
    padding: 32px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-border);
    transform: translateY(-2px);
}

.resource-card .file-type {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    width: fit-content;
}

.resource-card h4 {
    font-size: 1.05rem;
}

.resource-card p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    flex: 1;
}

.resource-card .download-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* --- CTA Section --- */
.cta-section {
    text-align: center;
    padding: 100px 24px;
    background: var(--color-black);
    color: var(--color-white);
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.cta-section p {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 40px;
}

.cta-section .hero-actions {
    justify-content: center;
}

/* --- Footer --- */
.footer {
    background: var(--color-bg);
    padding: 64px 0 32px;
    border-top: 1px solid var(--color-border-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .nav-logo {
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    max-width: 300px;
}

.footer-col h5 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    font-size: 0.9rem;
    color: var(--color-text);
}

.footer-col a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.footer-bottom .icp {
    display: flex;
    gap: 16px;
}

/* --- Page Header --- */
.page-header {
    padding: calc(var(--nav-height) + 80px) 24px 60px;
    text-align: center;
    background: var(--color-bg);
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.page-header p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Breadcrumb --- */
.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
}

.breadcrumb a:hover {
    color: var(--color-black);
}

.breadcrumb span.separator {
    color: var(--color-border);
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .section { padding: 60px 0; }
    .section-header h2 { font-size: 2rem; }

    .hero h1 { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--color-border-light);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition);
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-toggle {
        display: flex;
    }

    .page-header h1 { font-size: 2.25rem; }
    .cta-section h2 { font-size: 2rem; }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    .hero h1 { font-size: 2rem; }
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

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

    .stat-item .stat-number {
        font-size: 2.25rem;
    }

    .contact-form {
        padding: 24px;
    }
}

.nav-logo .logo-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
}
