/* aiweb2 全站布局 — 清爽白色系 */
:root {
    --bg-deep: #f8fafc;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-subtle: #f1f5f9;
    --accent: #2563eb;
    --accent-2: #0ea5e9;
    --accent-hover: #1d4ed8;
    --accent-soft: #eff6ff;
    --accent-glow: rgba(37, 99, 235, 0.15);
    --text: #0f172a;
    --text-muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 32px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 8px 28px rgba(37, 99, 235, 0.12);
    --header-h: 64px;
    --layout-max: 1120px;
    --layout-gutter: clamp(1rem, 4vw, 1.5rem);
    --font-sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-mono: ui-monospace, "Cascadia Code", "Consolas", monospace;
    font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.page {
    margin: 0;
    min-height: 100vh;
    overflow-x: clip;
    font-family: var(--font-sans);
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.06), transparent 60%);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.page__wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main { flex: 1; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 9999;
    padding: 0.75rem 1rem;
    background: var(--accent);
    color: #fff; text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* 内容栏：左右留白由 width 计算，文字与容器左缘对齐（与页脚一致） */
.section-inner {
    box-sizing: border-box;
    width: min(var(--layout-max), 100% - 2 * var(--layout-gutter));
    margin-inline: auto;
    padding-inline: 0;
}

.page-section { padding: 2.5rem 0 4rem; }

.section-kicker {
    margin: 0 0 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.section-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text);
}

.section-lead { margin: 0; max-width: 40rem; color: var(--text-muted); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head--center { flex-direction: column; align-items: center; text-align: center; }
.section-head--center .section-lead { margin-inline: auto; }
.section-link {
    color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.9375rem;
    font-family: var(--font-mono); letter-spacing: 0.02em;
}
.section-link:hover { color: var(--accent-hover); }
.section-cta { text-align: left; margin-top: 2rem; }
.empty-note {
    color: var(--text-muted); text-align: center; padding: 2rem;
    border: 1px dashed var(--line); border-radius: var(--radius);
    background: var(--bg-subtle);
}

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px) saturate(1.2);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 20px rgba(15, 23, 42, 0.04);
}

.site-header__inner {
    box-sizing: border-box;
    width: min(var(--layout-max), 100% - 2 * var(--layout-gutter));
    margin-inline: auto;
    padding-block: 0.75rem;
    padding-inline: 0;
    display: flex; align-items: center; gap: 1rem;
}

.site-brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); }
.site-brand__logo { height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.site-brand__text { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }

.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav--desktop { display: none; margin-left: auto; }

.site-nav__link {
    color: var(--text-muted); text-decoration: none; font-size: 0.875rem; font-weight: 500;
    padding: 0.45rem 0.75rem; border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.site-nav__link:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.site-header__actions { display: none; align-items: center; gap: 0.75rem; margin-left: auto; }

.lang-switch {
    color: var(--text-muted); text-decoration: none;
    font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
    padding: 0.35rem 0.65rem; border: 1px solid var(--line); border-radius: 6px;
    background: #fff;
    transition: all 0.2s;
}
.lang-switch:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.lang-switch--mobile { display: block; text-align: center; margin-bottom: 0.75rem; }

.site-nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; margin-left: auto;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; cursor: pointer; padding: 10px;
}
.site-nav-toggle:hover { border-color: var(--line-strong); background: var(--bg-subtle); }
.site-nav-toggle__bar { display: block; height: 2px; background: var(--text); border-radius: 1px; }

.site-nav-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.35); z-index: 60; backdrop-filter: blur(2px); }

.site-nav-panel {
    position: fixed; top: 0; right: 0; width: min(320px, 88vw); height: 100vh;
    background: #fff; border-left: 1px solid var(--line);
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.1);
    z-index: 70; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem;
    transform: translateX(100%); transition: transform 0.25s ease;
}
.site-nav-panel.is-open { transform: translateX(0); }
.site-nav-panel__head { display: flex; align-items: center; justify-content: space-between; }
.site-nav-panel__title { font-weight: 700; color: var(--text); }
.site-nav-panel__close { border: 0; background: transparent; color: var(--text-muted); font-size: 1.75rem; cursor: pointer; line-height: 1; }
.site-nav--mobile { flex-direction: column; align-items: stretch; }
.site-nav--mobile .site-nav__link { padding: 0.85rem 0.75rem; font-size: 1rem; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.35rem; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.9375rem; font-family: var(--font-sans);
    text-decoration: none; border: 1px solid transparent; cursor: pointer;
    transition: all 0.2s ease;
}
.btn--sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn--lg { padding: 0.95rem 1.75rem; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.btn--primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn--ghost {
    background: #fff;
    border-color: var(--line);
    color: var(--text);
}
.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

/* Footer */
.site-footer {
    margin-top: auto;
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--line);
    background: #fff;
}

.site-footer__inner {
    width: min(var(--layout-max), 100% - 2 * var(--layout-gutter));
    margin-inline: auto;
}

.site-footer__grid {
    margin-bottom: 2rem;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

.site-footer__brand {
    margin: 0;
    padding: 0;
    text-align: left;
}

.site-footer__logo-link { display: inline-block; }

.site-footer__tagline { color: var(--text-muted); font-size: 0.9rem; margin: 0.75rem 0; }
.site-footer__contact { display: flex; flex-direction: column; gap: 0.35rem; }
.site-footer__contact a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
.site-footer__contact a:hover { color: var(--accent); }

.site-footer__heading {
    margin: 0 0 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer__links a { color: var(--text); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.site-footer__links a:hover { color: var(--accent); }

.site-footer__bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}
.site-footer__copy { margin: 0; font-size: 0.8125rem; color: var(--text-muted); line-height: 1.6; }
.site-footer__icp-link,
.site-footer__support-link {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 0.35rem;
    transition: color 0.2s;
}
.site-footer__icp-link:hover,
.site-footer__support-link:hover { color: var(--accent); }
.site-footer__meta-sep { margin: 0 0.35rem; color: var(--text-muted); opacity: 0.65; }

/* Contact widget */
.contact-widget { position: fixed; right: 1rem; bottom: 1rem; z-index: 80; }

.contact-widget__fab {
    width: 56px; height: 56px; border-radius: 50%; border: 0;
    cursor: pointer;
    background: var(--accent);
    color: #fff; font-size: 1.35rem;
    box-shadow: var(--shadow-glow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.contact-widget__fab:hover { transform: scale(1.05); box-shadow: 0 10px 32px rgba(37, 99, 235, 0.35); }

.contact-widget__panel {
    position: absolute; right: 0; bottom: calc(100% + 0.75rem); width: min(300px, 88vw);
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 1rem;
}

.contact-widget__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.contact-widget__title { margin: 0; font-size: 1rem; color: var(--text); font-weight: 600; }
.contact-widget__close { border: 0; background: transparent; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.contact-widget__list { list-style: none; margin: 0 0 0.75rem; padding: 0; display: grid; gap: 0.5rem; }

.contact-widget__item {
    display: flex; gap: 0.75rem; align-items: center; padding: 0.65rem;
    border-radius: var(--radius-sm); text-decoration: none; color: var(--text);
    border: 1px solid var(--line); background: var(--bg-subtle);
    transition: border-color 0.2s, background 0.2s;
}
.contact-widget__item:hover { border-color: var(--accent); background: var(--accent-soft); }
.contact-widget__label { display: block; font-size: 0.6875rem; font-family: var(--font-mono); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-widget__value { display: block; font-size: 0.875rem; font-weight: 600; }
.contact-widget__qr { text-align: center; padding: 0.5rem 0; }
.contact-widget__qr .contact-widget__label { margin: 0 0 0.5rem; text-transform: none; letter-spacing: 0.04em; color: var(--text-muted); }
.contact-widget__qr-img {
    display: block; margin: 0 auto; width: 160px; height: 160px;
    object-fit: contain; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: #fff; padding: 4px;
}

/* Shared components */
.breadcrumb {
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
    font-family: var(--font-mono); font-size: 0.75rem;
    color: var(--text-muted); margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.pagination__link {
    color: var(--accent); text-decoration: none; font-weight: 600;
    font-family: var(--font-mono); font-size: 0.8125rem;
    padding: 0.4rem 0.8rem; border: 1px solid var(--line); border-radius: 6px;
    background: #fff;
    transition: all 0.2s;
}
.pagination__link:hover { border-color: var(--accent); background: var(--accent-soft); }
.pagination__current { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.8125rem; }

.page-hero { padding: 3rem 0 2rem; position: relative; }
.page-hero--compact { padding-top: 2rem; }

.page-hero__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}

.page-hero__lead { margin: 0; max-width: 42rem; color: var(--text-muted); font-size: 1.05rem; }

/* Product cards */
.product-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.product-card__inner {
    height: 100%; display: flex; flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.product-card__inner:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
}

.product-card__media { display: block; aspect-ratio: 16/10; background: var(--bg-subtle); overflow: hidden; }

.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.product-card__inner:hover .product-card__media img { transform: scale(1.03); }

.product-card__placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.product-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1;
    text-align: left;
}
.product-card__title { margin: 0; font-size: 1.05rem; }
.product-card__title a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.product-card__title a:hover { color: var(--accent); }
.product-card__summary { margin: 0; color: var(--text-muted); font-size: 0.9rem; flex: 1; }

.product-card__link {
    color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.8125rem;
    font-family: var(--font-mono);
}

/* News cards */
.news-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.news-card__inner {
    height: 100%; display: flex; flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.news-card__inner:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
}

.news-card__media { display: block; aspect-ratio: 16/9; background: var(--bg-subtle); overflow: hidden; }
.news-card__img { width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; transition: transform 0.35s; background: var(--bg-subtle); }
.news-card__inner:hover .news-card__img { transform: scale(1.03); }

.news-card__placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.news-card__body {
    padding: 1.2rem 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    flex: 1;
    text-align: left;
}

.news-card__time {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.news-card__title { margin: 0; font-size: 1.02rem; }
.news-card__title a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.news-card__title a:hover { color: var(--accent); }
.news-card__summary { margin: 0; color: var(--text-muted); font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }

.news-card__more {
    color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.8125rem;
    font-family: var(--font-mono);
}

/* Feature cards */
.features-section { padding: 3.5rem 0; background: #fff; border-block: 1px solid var(--line); }

.features-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.feature-card__icon {
    font-size: 1.25rem;
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    margin-bottom: 0.75rem;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
}

.feature-card__title { margin: 0 0 0.45rem; font-size: 1rem; font-weight: 600; color: var(--text); }
.feature-card__text { margin: 0; color: var(--text-muted); font-size: 0.875rem; line-height: 1.55; }

/* Rich content */
.rich-content { color: var(--text-muted); line-height: 1.75; }
.rich-content h2, .rich-content h3 { color: var(--text); margin-top: 1.5rem; }
.rich-content p { margin: 0 0 1rem; }
.rich-content ul, .rich-content ol { padding-left: 1.25rem; }
.rich-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.rich-content a { color: var(--accent); }

@media (min-width: 900px) {
    .site-nav-toggle { display: none; }
    .site-nav--desktop { display: flex; }
    .site-header__actions { display: flex; margin-left: 0; }
    .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; }
    .site-footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

img, video, svg { max-width: 100%; height: auto; }

input, select, textarea, .btn, .site-nav-toggle {
    font-size: 1rem;
    min-height: 44px;
}

@media (max-width: 767px) {
    .section-head { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .news-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .hero__title { max-width: none; }
    .page-news .article-detail,
    .page-single .article-detail { padding: 1.25rem; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .site-footer__inner {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    }
    .site-header__inner {
        padding-inline: max(var(--layout-gutter), env(safe-area-inset-left, 0px)) max(var(--layout-gutter), env(safe-area-inset-right, 0px));
    }
}

@media (max-width: 640px) {
    .contact-widget {
        right: max(0.75rem, env(safe-area-inset-right, 0px));
        bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
