/* ============================================
   宓丰科技官网 - 全站共享样式
   语忆科技明亮科技风格
   ============================================ */

/* === 全局变量 === */
:root {
    --bg: #FFFFFF;
    --bg-gray: #F7F8FA;
    --bg-light: #FAFBFC;
    --title: #1A1A1A;
    --body: #666666;
    --muted: #9CA3AF;
    --blue: #165DFF;
    --blue-hover: #4080FF;
    --blue-bg: rgba(22,93,255,0.06);
    --blue-bg-hover: rgba(22,93,255,0.12);
    --border: #E8ECF0;
    --border-dark: #D1D5DB;
    --orange: #FF7D00;
    --green: #10B981;
    --red: #EF4444;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-blue: 0 8px 32px rgba(22,93,255,0.2);
    --max-w: 1200px;
    --nav-h: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--body);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; border: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* === 通用布局 === */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 48px;
}
.section { padding: 100px 0; }
.section-gray { background: var(--bg-gray); }
.section-light { background: var(--bg-light); }
.section-blue { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-hover) 100%); }

/* === 页面标题区 === */
.page-hero {
    padding-top: calc(var(--nav-h) + 80px);
    padding-bottom: 80px;
    background: var(--bg-gray);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--blue-hover), var(--orange));
}
.page-hero-label {
    display: inline-block;
    font-size: 13px;
    color: var(--blue);
    font-weight: 500;
    background: var(--blue-bg);
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}
.page-hero-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--title);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.page-hero-sub {
    font-size: 17px;
    color: var(--body);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.8;
}

/* === 区块标题 === */
.block-header {
    text-align: center;
    margin-bottom: 64px;
}
.block-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--title);
    margin-bottom: 12px;
}
.block-sub {
    font-size: 16px;
    color: var(--body);
    max-width: 600px;
    margin: 0 auto;
}

/* === 按钮 === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    padding: 13px 32px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--blue);
    color: #FFFFFF;
}
.btn-primary:hover {
    background: var(--blue-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-blue);
}
.btn-outline {
    background: transparent;
    color: var(--body);
    border: 1.5px solid var(--border-dark);
}
.btn-outline:hover {
    border-color: var(--blue);
    color: var(--blue);
}
.btn-white {
    background: #FFFFFF;
    color: var(--blue);
}
.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-ghost {
    background: transparent;
    color: var(--blue);
    padding: 13px 0;
}
.btn-ghost:hover { color: var(--blue-hover); }

/* === 导航栏 === */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 48px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.nav-logo img { height: 32px; width: auto; }
.nav-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--title);
    letter-spacing: 0.5px;
}
.nav-center {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}
.nav-link {
    position: relative;
    padding: 22px 20px;
    font-size: 15px;
    color: var(--body);
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link:hover, .nav-link.active { color: var(--blue); }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 20px; right: 20px;
    height: 2px;
    background: var(--blue);
    transform: scaleX(0);
    transition: transform 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-arrow {
    font-size: 10px;
    transition: transform var(--transition);
}
.nav-link:hover .nav-arrow { transform: rotate(180deg); }
.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}
.nav-btn {
    background: var(--blue);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 22px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}
.nav-btn:hover {
    background: var(--blue-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-blue);
}
.nav-reg {
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
    transition: color var(--transition);
}
.nav-reg:hover { color: var(--blue); }

/* 下拉菜单 */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s;
    z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-item {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--body);
    transition: all 0.15s;
}
.nav-dropdown-item:hover {
    background: var(--blue-bg);
    color: var(--blue);
}

/* 移动端菜单 */
.nav-mobile-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}
.nav-mobile-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--title);
    border-radius: 2px;
    transition: all var(--transition);
}
.mobile-overlay {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}
.mobile-overlay.show { display: block; }
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #FFFFFF;
    z-index: 1000;
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    transform: translateY(-100%);
    transition: transform 0.3s;
}
.mobile-menu.show { display: block; transform: translateY(0); }
.mobile-menu a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    color: var(--body);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* === Footer === */
.footer {
    background: #0F1729;
    color: rgba(255,255,255,0.6);
    padding: 64px 0 0;
}
.footer-top {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 64px;
    padding-bottom: 64px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand { }
.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.footer-brand-logo img { height: 32px; }
.footer-brand-logo span {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
}
.footer-brand-desc {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,0.5);
    max-width: 300px;
    margin-bottom: 24px;
}
.footer-social { display: flex; gap: 12px; }
.footer-social-link {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    transition: all var(--transition);
}
.footer-social-link:hover {
    background: var(--blue);
    color: #FFFFFF;
}
.footer-col-title {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 20px;
}
.footer-col-links { display: flex; flex-direction: column; gap: 12px; }
.footer-col-links a {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    transition: color var(--transition);
}
.footer-col-links a:hover { color: var(--blue-hover); }
.footer-contact-item {
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 12px;
    line-height: 1.6;
}
.footer-contact-icon { color: var(--blue-hover); flex-shrink: 0; }
.footer-bottom {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.35); }
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a {
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    transition: color var(--transition);
}
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* === 动画 === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes growBar {
    from { transform: scaleY(0); transform-origin: bottom; }
    to { transform: scaleY(1); transform-origin: bottom; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === 卡片通用 === */
.card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 40px;
    transition: all var(--transition);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue);
}
.card-icon {
    width: 56px;
    height: 56px;
    background: var(--blue-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
    transition: all var(--transition);
}
.card:hover .card-icon {
    background: var(--blue);
    transform: scale(1.1);
}
.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--title);
    margin-bottom: 12px;
}
.card-desc {
    font-size: 15px;
    color: var(--body);
    line-height: 1.8;
}
.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--blue);
    font-weight: 500;
    margin-top: 16px;
    transition: gap var(--transition);
}
.card:hover .card-link { gap: 10px; }

/* === 表单元素 === */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--title);
    margin-bottom: 8px;
}
.form-label .required { color: var(--red); margin-left: 2px; }
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--title);
    background: var(--bg);
    transition: all var(--transition);
    outline: none;
}
.form-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(22,93,255,0.1);
}
.form-input.error {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.form-error {
    font-size: 12px;
    color: var(--red);
    margin-top: 6px;
    display: none;
}
.form-input.error + .form-error { display: block; }
.form-textarea {
    resize: vertical;
    min-height: 120px;
}
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* === 响应式 === */
@media (max-width: 1024px) {
    .container { padding: 0 32px; }
    .nav-inner { padding: 0 32px; }
    .nav-center { display: none; }
    .nav-mobile-btn { display: flex; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
    .footer-bottom { padding: 24px 32px; flex-direction: column; gap: 12px; }
}
@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .section { padding: 64px 0; }
    .page-hero { padding-top: calc(var(--nav-h) + 48px); padding-bottom: 48px; }
    .page-hero-title { font-size: 28px; }
    .block-title { font-size: 24px; }
    .footer-top { grid-template-columns: 1fr; gap: 32px; padding: 0 20px 40px; }
    .footer-bottom { padding: 20px; flex-direction: column; gap: 8px; }
    .footer-bottom-links { flex-wrap: wrap; justify-content: center; gap: 12px; }
    .page-hero-sub { font-size: 15px; }
}