/* ============================================================
   星耀未来 - IoT 企业官网 样式表
   设计规范：科技蓝 + 渐变 + 卡片式布局 + 完全响应式
   ============================================================ */

/* ========== CSS Variables 设计令牌 ========== */
:root {
    /* 主色系 - 科技蓝 */
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #4a90e2;
    --primary-bg: rgba(26, 115, 232, 0.08);

    /* 辅助色 */
    --accent: #00b4d8;
    --accent-green: #00c853;
    --accent-orange: #ff6d00;
    --accent-purple: #7c4dff;

    /* 中性色 */
    --text-primary: #1a1a2e;
    --text-secondary: #555;
    --text-muted: #888;
    --bg-white: #ffffff;
    --bg-light: #f7f9fc;
    --bg-dark: #0a1628;
    --border: #e0e4e8;

    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #1a73e8 0%, #00b4d8 100%);
    --gradient-hero: linear-gradient(135deg, #0a1628 0%, #0d2137 40%, #1a3a5c 100%);
    --gradient-card: linear-gradient(180deg, rgba(26,115,232,0.03) 0%, rgba(0,180,216,0.06) 100%);

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.15);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* 过渡 */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* 布局 */
    --header-height: 72px;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
                 Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

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

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(26, 115, 232, 0.5);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--primary-bg);
    color: var(--primary);
    border: 1px solid rgba(26, 115, 232, 0.2);
}
.btn-secondary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 17px;
}

/* ========== Header 导航栏 ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: var(--transition);
    background: transparent;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.header.scrolled .nav-link { color: var(--text-primary); }
.header.scrolled .logo-text { color: var(--primary); }
.header.scrolled .menu-toggle span { background: var(--text-primary); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}
.logo-img {
    width: 40px;
    height: 40px;
}
.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    transition: var(--transition);
}

/* Navigation */
.nav-list {
    display: flex;
    gap: 4px;
}

.nav-link {
    display: block;
    padding: 8px 18px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

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

/* 背景光效 */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26,115,232,0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroGlow 8s ease-in-out infinite;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,180,216,0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroGlow 8s ease-in-out 4s infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* 点阵背景 */
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 40px 40px;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 120px 0 80px;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}
.hero-title-sub {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 6px;
    color: rgba(255,255,255,0.8);
}
.hero-title-main {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    background: linear-gradient(135deg, #fff 30%, #90caf9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

/* Hero stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 40px;
    font-weight: 800;
    color: var(--accent);
}
.stat-suffix {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}
.stat-label {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ========== Section 通用 ========== */
.section {
    padding: 100px 0;
}
.section:nth-child(even) {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-title {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}
.section-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    margin-top: 16px;
}

/* ========== Intro 公司简介 ========== */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.intro-text p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.9;
    text-indent: 2em;
}

.intro-image {
    text-align: center;
}
.intro-img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    min-height: 300px;
    background: linear-gradient(135deg, #e8f0fe, #d2e3fc);
}
.img-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ========== Products 产品中心 ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.product-image {
    position: relative;
    background: linear-gradient(135deg, #f0f5ff, #e8f4f8);
    padding: 30px;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image img {
    max-height: 160px;
    width: auto;
}
.product-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 12px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.product-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.product-tagline {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 16px;
}

.product-features {
    margin-bottom: 20px;
    flex: 1;
}
.product-features li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 4px 0 4px 20px;
    position: relative;
    line-height: 1.6;
}
.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 700;
}

/* ========== Solutions 解决方案 ========== */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.solution-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
}
.solution-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.solution-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--primary-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}
.solution-icon img {
    width: 50px;
    height: 50px;
}

.solution-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}
.solution-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.solution-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.solution-points li {
    font-size: 13px;
    padding: 4px 12px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 20px;
    font-weight: 500;
}

/* ========== Architecture 技术架构 ========== */
.arch-diagram {
    text-align: center;
    margin-bottom: 40px;
}
.arch-diagram img {
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    background: var(--bg-white);
    min-height: 300px;
    width: 100%;
}

.arch-layers {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.arch-layer {
    padding: 20px 28px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
    background: var(--primary-bg);
    transition: var(--transition);
}
.arch-layer:nth-child(1) { border-color: var(--accent-purple); background: rgba(124,77,255,0.06); }
.arch-layer:nth-child(2) { border-color: var(--primary); background: var(--primary-bg); }
.arch-layer:nth-child(3) { border-color: var(--accent); background: rgba(0,180,216,0.06); }
.arch-layer:nth-child(4) { border-color: var(--accent-green); background: rgba(0,200,83,0.06); }

.arch-layer:hover {
    transform: translateX(8px);
}

.arch-layer h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}
.arch-layer p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== About 关于我们 ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.about-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}
.about-card h3 {
    font-size: 18px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-bg);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}
.info-table tr {
    border-bottom: 1px solid #f0f0f0;
}
.info-table tr:last-child {
    border-bottom: none;
}
.info-table td {
    padding: 10px 0;
    font-size: 14px;
    line-height: 1.6;
}
.info-label {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    padding-right: 16px !important;
    width: 100px;
    vertical-align: top;
}
.info-table a {
    color: var(--primary);
    font-weight: 500;
}
.info-table a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
}
.social-link:hover {
    background: var(--primary-bg);
    color: var(--primary);
}
.social-icon {
    font-size: 18px;
}

/* ========== Contact 联系我们 ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-form {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

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

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}
.required {
    color: #e53935;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-primary);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #bbb;
}

.form-notice {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 16px;
}

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

.contact-info-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.contact-info-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.contact-icon {
    font-size: 28px;
    margin-bottom: 8px;
}
.contact-info-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}
.contact-info-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
}
.footer p { font-size: 14px; line-height: 1.8; }
.footer-slogan { margin-top: 8px; color: rgba(255,255,255,0.4); }

.footer-links ul li { margin-bottom: 8px; }
.footer-links a {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
}
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

/* ========== Back to Top ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ========== Responsive 响应式 ========== */

/* Tablet */
@media (max-width: 1024px) {
    .intro-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

    .hero-stats {
        gap: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .container {
        padding: 0 16px;
    }

    .section {
        padding: 60px 0;
    }

    /* Mobile nav */
    .menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 22, 40, 0.98);
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    .nav.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .nav-link {
        font-size: 20px;
        color: #fff !important;
        padding: 12px 32px;
    }

    /* Hero */
    .hero-content {
        padding: 100px 0 60px;
    }
    .hero-title-main { font-size: 32px; }
    .hero-desc { font-size: 15px; }
    .hero-stats { gap: 24px; }
    .stat-number { font-size: 30px; }

    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    /* Solutions */
    .solutions-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

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

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-title-main { font-size: 26px; }
    .hero-title-sub { font-size: 16px; letter-spacing: 3px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .section-title { font-size: 24px; }
}
