/* ===========================================================
   佛山市科学森林科技有限公司 · 官网样式
   设计基调：简约 / 大气 / 森林科技感
   =========================================================== */

:root {
  --ink: #0c1a14;
  --ink-2: #3b4a44;
  --ink-3: #6b7a73;
  --line: #e3eae6;
  --line-2: #eef3f0;
  --bg: #ffffff;
  --bg-soft: #f6f9f7;
  --bg-deep: #0a1f17;
  --brand: #0e3b2e;
  --brand-2: #16624c;
  --accent: #17a67b;
  --accent-soft: #e6f5ef;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(12, 26, 20, .05);
  --shadow: 0 12px 34px rgba(12, 26, 20, .09);
  --shadow-lg: 0 22px 60px rgba(12, 26, 20, .14);
  --max: 1200px;
  --nav-h: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* 键盘导航焦点可见性（鼠标点击不显示） */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:focus-visible, .nav-links a:focus-visible { outline-offset: 3px; border-radius: 6px; }

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

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.nav.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 16.5px; font-weight: 700; letter-spacing: .5px; color: var(--brand); }
.brand-en { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-3); }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 15px; color: var(--ink-2); position: relative; padding: 6px 0; transition: color .2s;
}
.nav-links a:hover { color: var(--brand); }
.nav-links a.active { color: var(--brand); font-weight: 600; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--accent); border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 22px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; border: 1px solid transparent;
  transition: transform .18s, box-shadow .18s, background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(14, 59, 46, .22); }
.btn-primary:hover { background: var(--brand-2); box-shadow: 0 12px 26px rgba(14, 59, 46, .28); }
.btn-ghost { border-color: var(--line); color: var(--brand); background: #fff; }
.btn-ghost:hover { border-color: var(--brand); background: var(--bg-soft); }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--accent-soft); }
.btn-outline-light { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .14); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* 用户菜单 */
.user-menu { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 8px 0 8px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--brand);
}
.user-chip:hover { background: var(--bg-soft); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700;
}
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 208px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px; display: none;
}
.user-dropdown.open { display: block; }
.user-dropdown .dd-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.user-dropdown .dd-name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.user-dropdown .dd-sub { font-size: 12px; color: var(--ink-3); word-break: break-all; }
.user-dropdown button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none;
  border-radius: 9px; font-size: 14px; color: var(--ink-2);
}
.user-dropdown button:hover { background: var(--bg-soft); color: var(--brand); }

.nav-toggle { display: none; width: 40px; height: 40px; border: 0; background: none; }
.nav-toggle span { display: block; height: 2px; background: var(--brand); margin: 5px 0; border-radius: 2px; }

/* ---------- 通用区块 ---------- */
.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 54px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.28; letter-spacing: -.4px; font-weight: 700; }
h2 { font-size: 34px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { margin: 0; color: var(--ink-2); font-size: 16.5px; }
.lead { font-size: 17px; color: var(--ink-2); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #d3ded8; }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px; color: var(--brand);
}
.card p { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft);
  color: var(--brand-2); font-size: 12.5px; font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 620px; padding: calc(var(--nav-h) + 92px) 0 96px;
  background: var(--bg-deep) url("../img/hero.jpg") center/cover no-repeat;
  color: #fff; display: flex; align-items: center; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(6, 24, 17, .93) 0%, rgba(6, 24, 17, .74) 45%, rgba(6, 24, 17, .38) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { font-size: 52px; max-width: 760px; margin-bottom: 22px; letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 18px; max-width: 620px; color: rgba(255, 255, 255, .82); margin: 0 0 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 62px; max-width: 860px; }
.stats div { border-left: 2px solid rgba(255, 255, 255, .22); padding-left: 18px; }
.stats b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.stats span { font-size: 13.5px; color: rgba(255, 255, 255, .68); }

/* ---------- 关于预览 ---------- */
.about-preview { display: grid; grid-template-columns: 1.05fr .95fr; gap: 62px; align-items: center; }
.about-preview img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.check-list { list-style: none; padding: 0; margin: 22px 0 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--ink-2); font-size: 15.5px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317a67b' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* ---------- 服务卡片 ---------- */
.svc-card { display: flex; flex-direction: column; }
.svc-card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.svc-card ul li { font-size: 14.5px; color: var(--ink-2); padding: 7px 0 7px 20px; position: relative; border-top: 1px dashed var(--line); }
.svc-card ul li:first-child { border-top: 0; }
.svc-card ul li::before { content: ""; position: absolute; left: 0; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.svc-foot { margin-top: auto; padding-top: 22px; }
.link-more { color: var(--brand-2); font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.link-more:hover { color: var(--accent); }
.link-more::after { content: "→"; transition: transform .2s; }
.link-more:hover::after { transform: translateX(4px); }

/* ---------- 服务详情行 ---------- */
.svc-row { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; padding: 52px 0; border-top: 1px solid var(--line); scroll-margin-top: 92px; }
.svc-row:first-child { border-top: 0; padding-top: 0; }
.svc-num { font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: 2.2px; }
.svc-deliver { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; }
.svc-deliver h4 { font-size: 14px; color: var(--ink-3); margin-bottom: 4px; }

/* ---------- 流程 ---------- */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { position: relative; padding-top: 26px; border-top: 2px solid var(--line); }
.step::before {
  counter-increment: s; content: "0" counter(s);
  position: absolute; top: -14px; left: 0; font-size: 13px; font-weight: 700; color: #fff;
  background: var(--brand); padding: 3px 9px; border-radius: 6px; letter-spacing: 1px;
}
.step h4 { margin-bottom: 8px; }
.step p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* ---------- 时间线 ---------- */
.timeline { border-left: 2px solid var(--line); padding-left: 34px; }
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -42px; top: 8px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent);
}
.tl-year { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.tl-item h4 { margin: 4px 0 6px; }
.tl-item p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- 页面头图 ---------- */
.page-hero {
  position: relative; padding: calc(var(--nav-h) + 88px) 0 88px; color: #fff; overflow: hidden;
  background: var(--bg-deep) center/cover no-repeat;
}
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(6, 24, 17, .92), rgba(6, 24, 17, .62)); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { font-size: 42px; margin-bottom: 14px; }
.page-hero p { margin: 0; max-width: 640px; color: rgba(255, 255, 255, .8); font-size: 17px; }
.crumb { font-size: 13.5px; color: rgba(255, 255, 255, .62); margin-bottom: 14px; }
.crumb a:hover { color: #fff; }

/* ---------- 联系区块 ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 54px; align-items: start; }
.info-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.info-item:last-child { border-bottom: 0; }
.info-item .icon {
  width: 42px; height: 42px; flex: none; border-radius: 11px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; color: var(--brand);
}
.info-item b { display: block; font-size: 13px; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.info-item span { font-size: 16px; font-weight: 600; color: var(--ink); }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 38px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 11px; background: #fff; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23, 166, 123, .14); }
.field textarea { min-height: 118px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-error { color: #c0392b; font-size: 12.5px; margin-top: 6px; display: none; }
.field-error.show { display: block; }

.notice { padding: 13px 16px; border-radius: 11px; font-size: 14px; margin-bottom: 18px; display: none; }
.notice.show { display: block; }
.notice.err { background: #fdecea; color: #a52d1c; border: 1px solid #f7c9c2; }
.notice.ok { background: var(--accent-soft); color: var(--brand-2); border: 1px solid #bfe5d5; }
.notice.info { background: #eef4fb; color: #24527f; border: 1px solid #cfe0f3; }

/* ---------- 登录弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.modal.open { display: flex; }
.modal-mask { position: absolute; inset: 0; background: rgba(8, 20, 15, .5); backdrop-filter: blur(3px); }
.modal-body {
  position: relative; z-index: 2; width: 100%; max-width: 420px; background: #fff;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 34px;
  animation: pop .22s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.modal-head h3 { font-size: 21px; }
.modal-head p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-3); }
.modal-close { width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--bg-soft); color: var(--ink-2); font-size: 18px; line-height: 1; }
.modal-close:hover { background: var(--line-2); }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-3); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth-btn {
  width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--ink);
}
.oauth-btn:hover { background: var(--bg-soft); }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.code-row button { flex: none; padding: 0 16px; height: 46px; border-radius: 11px; border: 1px solid var(--brand); background: #fff; color: var(--brand); font-size: 13.5px; font-weight: 600; }
.code-row button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 个人中心 ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px; }
.panel + .panel { margin-top: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.avatar-lg { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--accent), var(--brand)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; font-weight: 700; }
.record { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; background: #fff; }
.record:last-child { margin-bottom: 0; }
.record-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.record-title { font-weight: 700; font-size: 15.5px; }
.record-meta { font-size: 12.5px; color: var(--ink-3); }
.record-body { margin: 10px 0 0; font-size: 14.5px; color: var(--ink-2); white-space: pre-wrap; }
.empty { text-align: center; padding: 42px 20px; color: var(--ink-3); font-size: 15px; }
.empty .icon-box { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; color: var(--ink-3); }

.locked { text-align: center; padding: 76px 24px; border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--bg-soft); }
.locked h3 { margin-bottom: 10px; }
.locked p { margin: 0 0 22px; color: var(--ink-2); }

.file-list { list-style: none; padding: 0; margin: 16px 0 0; }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; }
.file-list li:first-child { border-top: 0; }
.file-list a { color: var(--brand-2); font-weight: 600; }
.file-list .fsize { color: var(--ink-3); font-size: 12.5px; }

/* ---------- CTA ---------- */
.cta {
  position: relative; padding: 82px 0; text-align: center; color: #fff; overflow: hidden;
  background: var(--brand) url("../img/services.jpg") center/cover no-repeat;
}
.cta::before { content: ""; position: absolute; inset: 0; background: rgba(8, 32, 23, .84); }
.cta .container { position: relative; z-index: 2; }
.cta h2 { font-size: 34px; margin-bottom: 14px; }
.cta p { margin: 0 auto 30px; max-width: 560px; color: rgba(255, 255, 255, .8); }

/* ---------- 页脚 ---------- */
.footer { background: var(--bg-deep); color: rgba(255, 255, 255, .74); padding: 72px 0 0; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 46px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a:hover { color: #fff; }
.footer .brand-name { color: #fff; font-size: 17px; }
.footer .brand-en { color: rgba(255, 255, 255, .5); }
.footer-about { margin: 16px 0 0; max-width: 340px; line-height: 1.8; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 22px 0 30px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(255, 255, 255, .55); }

/* ---------- 动画 ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about-preview, .contact-grid, .svc-row { grid-template-columns: 1fr; gap: 38px; }
  .svc-row { padding: 40px 0; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 18px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line-2); font-size: 16px; }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: block; }
  .nav-actions .btn-ghost { display: none; }
  .hero { min-height: 540px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 16px; }
  .page-hero h1 { font-size: 30px; }
  h2 { font-size: 27px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 66px 0; }
  .card, .panel, .form-card { padding: 26px; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .container { padding: 0 20px; }
}
