/* ============================================================
   云涟智能科技有限公司 - 官网样式
   响应式设计 / 移动优先 / 现代科技风
   ============================================================ */

:root {
  --c-primary: #2563eb;
  --c-primary-d: #1d4ed8;
  --c-cyan: #06b6d4;
  --c-purple: #7c3aed;
  --c-ink: #0f172a;
  --c-body: #334155;
  --c-muted: #64748b;
  --c-line: #e2e8f0;
  --c-bg: #ffffff;
  --c-bg-alt: #f8fafc;
  --c-bg-soft: #f1f5f9;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, .06);
  --gradient: linear-gradient(120deg, #2563eb 0%, #06b6d4 55%, #7c3aed 100%);
  --maxw: 1160px;
  --header-h: 66px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--c-body);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-d); }
h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.3; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1.5px solid transparent; cursor: pointer; transition: .2s; text-align: center;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: #fff; color: var(--c-primary); border-color: var(--c-line); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary-d); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.link-more { font-weight: 600; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--c-ink); font-size: 17px; }
.brand:hover { color: var(--c-ink); }
.brand img { border-radius: 8px; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--c-body); font-weight: 500; font-size: 15px; }
.site-nav a:hover, .site-nav a.active { color: var(--c-primary); }
.site-nav .nav-cta {
  background: var(--gradient); color: #fff; padding: 8px 18px; border-radius: 999px; font-weight: 600;
}
.site-nav .nav-cta:hover { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--c-ink); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--gradient); color: #fff;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.18), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,.14), transparent 45%);
}
.hero-inner { position: relative; z-index: 1; padding: 92px 20px 76px; text-align: center; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px; font-size: 14px; margin-bottom: 22px;
}
.hero-title { font-size: clamp(30px, 5vw, 50px); font-weight: 800; color: #fff; margin-bottom: 18px; }
.hero-sub { max-width: 720px; margin: 0 auto 30px; font-size: 17px; opacity: .95; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }
.hero-stats { display: flex; gap: 44px; justify-content: center; margin-top: 52px; flex-wrap: wrap; }
.hero-stats .stat { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 34px; font-weight: 800; }
.hero-stats span { font-size: 14px; opacity: .9; }

/* ---------- 通用区块 ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(26px, 3.5vw, 34px); font-weight: 800; }
.section-head p { color: var(--c-muted); font-size: 16px; }

/* ---------- 产品卡片 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.product-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 22px; transition: .22s; color: var(--c-body);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: var(--c-body); }
.pc-icon {
  flex: 0 0 52px; width: 52px; height: 52px; display: grid; place-items: center;
  font-size: 26px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(6,182,212,.12));
}
.pc-thumb {
  flex: 0 0 96px; width: 96px; height: 66px; object-fit: cover; object-position: top center;
  border-radius: 10px; border: 1px solid var(--c-line); background: var(--c-bg-soft);
}

/* ---------- 产品图集 / 演示视频 ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.gallery-item {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--c-line);
  background: var(--c-bg-soft);
}
.demo-video {
  width: 100%; max-height: 520px; border-radius: var(--radius);
  background: #000; margin-bottom: 10px;
}
.video-tip { font-size: 13px; color: var(--c-muted); margin-bottom: 18px; }
.pc-body h3 { font-size: 17px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-cat { font-size: 12.5px; color: var(--c-primary); font-weight: 600; margin-bottom: 6px; }
.pc-summary { font-size: 14px; color: var(--c-muted); margin: 0; }

.badge { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; font-weight: 700; }
.badge-dev { background: #fef3c7; color: #b45309; }
.badge-on  { background: #dcfce7; color: #15803d; }

/* ---------- 优势 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.feature { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 26px; transition: .22s; }
.feature:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.feature-icon { font-size: 32px; margin-bottom: 12px; }
.feature h3 { font-size: 17px; }
.feature p { font-size: 14px; color: var(--c-muted); margin: 0; }

/* ---------- 新闻 ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.news-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; transition: .22s; color: var(--c-body); }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--c-body); }
.news-cover { height: 168px; background: var(--c-bg-soft) center/cover no-repeat; }
.news-body { padding: 18px 20px 22px; }
.news-date { font-size: 13px; color: var(--c-muted); }
.news-body h3 { font-size: 17px; margin: 6px 0 8px; }
.news-body p { font-size: 14px; color: var(--c-muted); margin: 0; }

.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-row { display: flex; gap: 18px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px; transition: .2s; color: var(--c-body); }
.news-row:hover { box-shadow: var(--shadow); color: var(--c-body); }
.news-row-cover { flex: 0 0 150px; height: 100px; border-radius: 10px; background: var(--c-bg-soft) center/cover no-repeat; }
.news-row-body h3 { font-size: 17px; margin: 4px 0 6px; }
.news-row-body p { font-size: 14px; color: var(--c-muted); margin: 0; }

/* ---------- CTA ---------- */
.cta { background: var(--c-ink); color: #fff; }
.cta-inner { padding: 64px 20px; text-align: center; }
.cta-inner h2 { color: #fff; }
.cta-inner p { opacity: .85; margin-bottom: 26px; }

/* ---------- 页头（内页） ---------- */
.page-hero { background: var(--c-bg-alt); border-bottom: 1px solid var(--c-line); padding: 48px 0; }
.page-hero h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.page-hero p { color: var(--c-muted); margin: 0; }
.breadcrumb { font-size: 13px; color: var(--c-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--c-primary); }

/* ---------- 筛选 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.chip { padding: 7px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--c-line); color: var(--c-body); font-size: 14px; font-weight: 500; }
.chip:hover, .chip.active { background: var(--gradient); color: #fff; border-color: transparent; }

/* ---------- 详情页 ---------- */
.detail-layout, .about-layout, .contact-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.detail-head { display: flex; gap: 18px; align-items: center; margin-top: 14px; }
.detail-icon { width: 64px; height: 64px; display: grid; place-items: center; font-size: 32px; border-radius: 14px; background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(6,182,212,.12)); }
.detail-cat { color: var(--c-primary); font-weight: 600; margin: 0; }
.detail-cover { width: 100%; border-radius: var(--radius); margin-bottom: 20px; }
.detail-summary { font-size: 18px; color: var(--c-ink); font-weight: 600; }
.detail-content { font-size: 15.5px; white-space: pre-wrap; }
.notice { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 14px 18px; border-radius: var(--radius-sm); margin-top: 20px; }
.side-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 22px; position: sticky; top: 86px; }
.side-card h3 { font-size: 17px; }
.side-card p { font-size: 14px; color: var(--c-muted); }

.about-list { padding-left: 20px; }
.about-list li { margin-bottom: 8px; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--c-line); font-size: 14.5px; }
.info-list li span { color: var(--c-muted); flex: 0 0 84px; }

/* ---------- 文章 ---------- */
.article-layout { max-width: 820px; margin: 0 auto; }
.article-meta { color: var(--c-muted); }
.article-cover { width: 100%; border-radius: var(--radius); margin-bottom: 22px; }
.article-content { font-size: 16px; white-space: pre-wrap; }

/* ---------- 联系表单 ---------- */
.contact-info h3 { font-size: 18px; }
.contact-form-wrap { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 26px; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: block; font-size: 14px; font-weight: 600; color: var(--c-ink); margin-bottom: 16px; }
.contact-form input, .contact-form textarea { width: 100%; margin-top: 6px; }
.contact-form textarea { resize: vertical; }

/* ---------- 表单控件 ---------- */
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  font: inherit; color: var(--c-ink); background: #fff;
  border: 1.5px solid var(--c-line); border-radius: var(--radius-sm); padding: 10px 12px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }

/* ---------- 提示 ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14.5px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.empty-tip { color: var(--c-muted); padding: 30px 0; text-align: center; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--c-ink); color: #cbd5e1; padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 32px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; margin-bottom: 14px; }
.footer-desc { font-size: 14px; max-width: 420px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 5px 0; font-size: 14px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-contact span { color: #94a3b8; margin-right: 4px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 20px; font-size: 13px; color: #94a3b8; }

/* ============================================================
   登录页
   ============================================================ */
.login-body { min-height: 100dvh; display: grid; place-items: center; background: var(--gradient); padding: 20px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 18px; padding: 34px 30px; box-shadow: var(--shadow); }
.login-logo { display: flex; align-items: center; gap: 10px; justify-content: center; font-weight: 800; color: var(--c-ink); margin-bottom: 10px; }
.login-card h2 { text-align: center; font-size: 22px; }
.login-card label { display: block; font-size: 14px; font-weight: 600; color: var(--c-ink); margin-bottom: 16px; }
.login-card input { width: 100%; margin-top: 6px; }
.login-tip { font-size: 12.5px; color: var(--c-muted); text-align: center; margin-top: 14px; }
.login-back { text-align: center; margin: 10px 0 0; font-size: 13px; }

/* ============================================================
   后台
   ============================================================ */
.admin-body { background: var(--c-bg-soft); }
.admin-layout { display: grid; grid-template-columns: 230px 1fr; min-height: 100dvh; }
.admin-sidebar { background: var(--c-ink); color: #cbd5e1; padding: 22px 16px; display: flex; flex-direction: column; }
.admin-logo { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 800; margin-bottom: 24px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav a { color: #cbd5e1; padding: 10px 14px; border-radius: 9px; font-size: 14.5px; font-weight: 500; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-logout { margin-top: 18px; color: #fca5a5; font-size: 14px; padding: 10px 14px; }
.admin-logout:hover { color: #fff; }
.admin-content { display: flex; flex-direction: column; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--c-line); padding: 16px 26px; display: flex; justify-content: space-between; align-items: center; }
.admin-page-title { font-weight: 700; color: var(--c-ink); font-size: 16px; }
.admin-user { font-size: 14px; color: var(--c-muted); }
.admin-main { padding: 26px; flex: 1; }
.admin-foot { text-align: center; font-size: 12.5px; color: var(--c-muted); padding: 16px; border-top: 1px solid var(--c-line); background: #fff; }

.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.dash-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 22px; text-align: center; }
.dash-card strong { display: block; font-size: 30px; color: var(--c-primary); }
.dash-card span { font-size: 13.5px; color: var(--c-muted); }
.dash-warn strong { color: #d97706; }
.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

.panel { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-head h3 { margin: 0; }
.panel-narrow { max-width: 520px; }
.panel h3 { font-size: 17px; margin-bottom: 16px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--c-line); }
.table th { color: var(--c-muted); font-weight: 600; background: var(--c-bg-alt); }
.table tr.unread { background: #fefce8; }
.table .unread-tag { color: #d97706; }
.row-actions { display: flex; gap: 12px; align-items: center; }
.row-actions a { font-weight: 600; }
.link-danger { background: none; border: 0; color: #dc2626; cursor: pointer; font: inherit; font-weight: 600; padding: 0; }
.inline-form { display: inline; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { display: block; font-size: 14px; font-weight: 600; color: var(--c-ink); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { margin-top: 6px; width: 100%; }
.form-grid textarea { resize: vertical; }
.form-actions { display: flex; gap: 12px; margin-top: 18px; }
.msg-content { background: var(--c-bg-alt); border-radius: var(--radius-sm); padding: 16px; white-space: pre-wrap; font-size: 14.5px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .detail-layout, .about-layout, .contact-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--c-line);
    padding: 8px 0; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .2s;
    box-shadow: var(--shadow-sm);
  }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 12px 20px; width: 100%; }
  .site-nav .nav-cta { margin: 8px 20px; text-align: center; }
  .hero-stats { gap: 28px; }
  .contact-form .form-row, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .news-row { flex-direction: column; }
  .news-row-cover { flex: none; width: 100%; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
  .admin-logo { margin: 0 12px 0 0; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-logout { margin: 0 0 0 auto; }
}
