/* ============================
   集成电路芯片企业官网 - 样式表
   纯 CSS3，无任何框架
   ============================ */

/* ---------- 重置与基础 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #0052cc;
    --primary-dark: #003d99;
    --secondary: #0a1628;
    --accent: #00a8ff;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --text-dark: #1a1a2e;
    --text-gray: #5a6a7a;
    --border: #e1e8f0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 6px;
    --font: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font);
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- 导航栏 ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    height: 60px;
    display: flex;
    align-items: center;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, border-bottom 0.5s ease;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--bg-white);
}

.nav-logo-icon {
    width: 44px;
    height: 44px;
}

.nav-logo-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
}

.nav-logo-text span { color: var(--accent); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(0, 162, 255, 0.15);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

/* ---------- 移动端菜单 ---------- */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--secondary);
    padding: 16px 24px;
    z-index: 999;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.mobile-menu.open { display: block; }

.mobile-menu a {
    display: block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 12px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mobile-menu a:hover,
.mobile-menu a.active { color: var(--accent); }

/* ---------- 主内容区域 ---------- */
main { flex: 1; margin-top: 60px; }

/* ---------- Hero 横幅 ---------- */
.hero {
    background: linear-gradient(135deg, #0a1628 0%, #102a4c 50%, #0d3a6e 100%);
    color: #fff;
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-badge {
    display: inline-block;
    background: rgba(0, 162, 255, 0.15);
    border: 1px solid rgba(0, 162, 255, 0.3);
    color: var(--accent);
    font-size: 0.8rem;
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    max-width: 640px;
    margin: 0 auto 32px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    cursor: pointer;
    border: none;
    font-family: var(--font);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.08);
}

/* ---------- 页面通用容器 ---------- */
.page { padding: 60px 24px; }

.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-header h2 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 12px;
}

.page-header p {
    color: var(--text-gray);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-subtitle {
    text-align: center;
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

/* ---------- 卡片网格 ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
    transition: all 0.25s;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.4rem;
}

.card h3 {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.card p {
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.7;
}

/* ---------- 页脚 ---------- */
footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.6);
    padding: 48px 24px 24px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-brand h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.footer-brand h3 span { color: var(--accent); }

.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
}

.footer-col h4 {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}

/* ---------- 联系表单 ---------- */
.contact-section {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.contact-form {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 36px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group label span { color: #e53e3e; }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text-dark);
    background: var(--bg-light);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,82,204,0.1);
    background: #fff;
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-tips {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 4px;
}

.form-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.25s;
}

.form-submit:hover { background: var(--primary-dark); }

.form-submit:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

/* ---------- 表单提示消息 ---------- */
.form-msg {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: none;
}

.form-msg.show { display: block; }

.form-msg.success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
}

.form-msg.error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
}

/* ---------- 服务状态条 ---------- */
.server-status {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-gray);
    max-width: 640px;
    margin: 0 auto 24px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a0aec0;
    flex-shrink: 0;
}

.status-dot.ok { background: #48bb78; box-shadow: 0 0 6px #48bb78; }
.status-dot.offline { background: #e53e3e; box-shadow: 0 0 6px #e53e3e; }

/* ---------- 产品卡片 ---------- */
.product-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    background: #fff;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--accent);
}

.product-img {
    height: 160px;
    background: linear-gradient(135deg, #0a1628, #1a4a8c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-body { padding: 20px; }

.product-body h3 {
    font-size: 1.05rem;
    color: var(--secondary);
    margin-bottom: 8px;
}

.product-body p {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.6;
}

.product-tag {
    display: inline-block;
    background: rgba(0,82,204,0.08);
    color: var(--primary);
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 20px;
    margin-top: 10px;
}

/* ---------- 时间线（新闻） ---------- */
.news-list {
    max-width: 760px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.news-date {
    min-width: 72px;
    text-align: center;
    flex-shrink: 0;
}

.news-date .day {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.news-date .month-year {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.news-item h3 {
    font-size: 1.05rem;
    color: var(--secondary);
    margin-bottom: 6px;
}

.news-item p {
    font-size: 0.88rem;
    color: var(--text-gray);
}

/* ---------- 关于我们 ---------- */
.about-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.about-intro {
    background: var(--bg-light);
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: 28px 32px;
    font-size: 1.05rem;
    color: var(--text-dark);
    line-height: 1.9;
    margin-bottom: 48px;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.advantage-item {
    text-align: center;
    padding: 28px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    transition: all 0.25s;
}

.advantage-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.advantage-item .num {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 8px;
}

.advantage-item .label {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* ---------- 技术研发 ---------- */
.tech-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.tech-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
    align-items: center;
}

.tech-row:nth-child(even) .tech-img { order: 2; }
.tech-row:nth-child(even) .tech-info { order: 1; }

.tech-info h3 {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 12px;
}

.tech-info p {
    font-size: 0.92rem;
    color: var(--text-gray);
    line-height: 1.8;
}

.tech-img {
    height: 200px;
    background: linear-gradient(135deg, #0a1628, #1a4a8c);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* ---------- 应用领域 ---------- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.app-item {
    text-align: center;
    padding: 32px 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    transition: all 0.25s;
}

.app-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.app-item .icon { font-size: 2.4rem; margin-bottom: 14px; }
.app-item h3 { font-size: 1rem; color: var(--secondary); margin-bottom: 8px; }
.app-item p { font-size: 0.85rem; color: var(--text-gray); }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }

    .hero h1 { font-size: 1.8rem; }
    .hero { padding: 60px 24px; }

    .advantage-grid,
    .app-grid { grid-template-columns: 1fr 1fr; }

    .tech-row,
    .tech-row:nth-child(even) .tech-img,
    .tech-row:nth-child(even) .tech-info { order: unset; display: block; }

    .footer-inner { grid-template-columns: 1fr; gap: 24px; }

    .contact-form { padding: 24px 20px; }
}

@media (max-width: 480px) {
    .advantage-grid,
    .app-grid { grid-template-columns: 1fr; }
}
