/* ===========================================================
   栀禾网络科技工作室 — 站点样式（v2 重写版 · 预览）
   设计原则：深色底、科技蓝、克制、层级清晰、手机优先
   =========================================================== */

/* ---------- 设计变量（换配色只需改这一段） ---------- */
:root {
  /* 底色 */
  --bg: #08141a;
  --bg-alt: #0c1c23;
  --bg-deep: #061015;
  --bg-rgb: 8, 20, 26;

  /* 文字 */
  --text: #e8f2f0;
  --muted: #9aa8b6;
  --dim: #6f8090;

  /* 描边与面 */
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);

  /* 主色：科技蓝 */
  --brand: #3b82f6;
  --brand-lt: #60a5fa;
  --brand-2: #22d3ee;
  --brand-rgb: 59, 130, 246;
  --brand-2-rgb: 34, 211, 238;
  --on-brand: #041d3d;
  --brand-soft: rgba(var(--brand-rgb), 0.12);
  --brand-grad: linear-gradient(135deg, var(--brand), var(--brand-lt));

  /* 尺寸与节奏 */
  --container: min(1160px, 92vw);
  --header-h: 70px;
  --r: 14px;
  --r-lg: 20px;
  --section-y: clamp(64px, 9vw, 112px);
  --shadow-sm: 0 8px 24px -14px rgba(0, 0, 0, 0.7);
  --shadow: 0 22px 52px -26px rgba(0, 0, 0, 0.85);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px); /* 锚点跳转不被固定顶栏遮挡 */
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; } /* 抽屉展开时锁背景滚动 */

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }

::selection { background: rgba(var(--brand-rgb), 0.3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.container { width: var(--container); margin-inline: auto; }

/* 键盘用户跳过导航 */
.skip-link {
  position: absolute;
  left: 50%; top: 8px;
  z-index: 200;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  color: var(--on-brand);
  background: var(--brand-grad);
  transform: translate(-50%, -200%);
  transition: transform 0.22s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(var(--bg-rgb), 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.site-header.is-scrolled {
  background: rgba(var(--bg-rgb), 0.95);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.logo { display: flex; align-items: center; gap: 11px; }
.logo-mark {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: var(--on-brand);
  font-size: 21px; font-weight: 800;
  box-shadow: 0 6px 18px -8px rgba(var(--brand-rgb), 0.75);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text strong { font-size: 16px; letter-spacing: 0.02em; }
.logo-text small { font-size: 10px; color: var(--dim); letter-spacing: 0.16em; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative;
  padding: 9px 14px;
  font-size: 14.5px;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.2s;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s ease;
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

.nav a.nav-cta {
  margin-left: 10px;
  padding: 10px 20px;
  color: var(--on-brand);
  background: var(--brand-grad);
  border-radius: 999px;
  font-weight: 600;
}
.nav a.nav-cta::after { display: none; }
.nav a.nav-cta:hover { color: var(--on-brand); filter: brightness(1.08); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; flex: none;
  padding: 13px 12px;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.26s, opacity 0.2s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(52px, 8vw, 104px)) 0 clamp(52px, 7vw, 92px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 480px at 82% -10%, rgba(var(--brand-rgb), 0.18), transparent 62%),
    radial-gradient(760px 420px at 6% 6%, rgba(var(--brand-2-rgb), 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--brand-lt);
  background: var(--brand-soft);
  border: 1px solid rgba(var(--brand-rgb), 0.26);
  border-radius: 999px;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-2);
}
.hero h1 { font-size: clamp(27px, 5.2vw, 54px); margin-bottom: 20px; }
.hero h1 span {
  display: block;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-desc { max-width: 660px; color: var(--muted); font-size: 16.5px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(26px, 4vw, 38px); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn-primary {
  color: var(--on-brand);
  background: var(--brand-grad);
  box-shadow: 0 14px 32px -16px rgba(var(--brand-rgb), 0.9);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -16px rgba(var(--brand-rgb), 1); }
.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: rgba(var(--brand-rgb), 0.5); background: var(--surface-2); transform: translateY(-2px); }

/* ---------- 通用区块 ---------- */
.section { padding: var(--section-y) 0; }
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--brand);
}
.eyebrow::before {
  content: '';
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--brand);
}
.sec-head { max-width: 640px; margin-bottom: clamp(30px, 4.5vw, 52px); }
.sec-head h2 { font-size: clamp(22px, 3.1vw, 34px); }
.sec-sub { margin-top: 12px; color: var(--muted); }

/* ---------- 关于我们 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: clamp(30px, 4vw, 56px);
  align-items: start;
}
.about-text p { color: var(--muted); }
.about-text p + p { margin-top: 16px; }

.points { display: grid; gap: 10px; margin-top: 26px; }
.points li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.points b { flex: none; font-size: 14.5px; color: var(--brand-lt); }
.points span { font-size: 14px; color: var(--muted); }

.profile {
  padding: 26px 24px;
  background: linear-gradient(165deg, rgba(var(--brand-rgb), 0.1), rgba(var(--brand-2-rgb), 0.04));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.profile h3 { font-size: 17px; margin-bottom: 16px; }
.profile dl > div {
  display: grid;
  gap: 3px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.profile dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.profile dt { font-size: 12.5px; color: var(--dim); letter-spacing: 0.06em; }
.profile dd { font-size: 14.5px; font-weight: 600; }
.profile dd a { color: var(--brand-lt); border-bottom: 1px dashed rgba(var(--brand-rgb), 0.5); }

/* ---------- 业务范围 ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform 0.26s, border-color 0.26s, background 0.26s, box-shadow 0.26s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--brand-rgb), 0.4);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.card-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  margin-bottom: 18px;
  border-radius: 13px;
  color: var(--brand-lt);
  background: var(--brand-soft);
  border: 1px solid rgba(var(--brand-rgb), 0.22);
}
.card-icon svg { width: 23px; height: 23px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--muted); }

/* ---------- 联系我们 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(28px, 3.5vw, 48px);
  align-items: start;
}
.contact-main h2 { font-size: clamp(22px, 3vw, 32px); margin-bottom: 14px; }
.contact-main > p { color: var(--muted); }

.emails { margin-top: 26px; }
.emails dt { font-size: 12.5px; color: var(--dim); letter-spacing: 0.06em; }
.emails dd { display: grid; gap: 8px; margin-top: 12px; }
.emails dd a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  font-size: 14.5px;
  font-weight: 600;
  word-break: break-all;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.emails dd a:hover {
  color: var(--brand-lt);
  border-color: rgba(var(--brand-rgb), 0.5);
  background: var(--surface-2);
}

.contact-side { display: grid; gap: 20px; }
.info {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.info > div { display: grid; gap: 4px; padding: 16px 18px; background: var(--bg-alt); }
.info dt { font-size: 12.5px; color: var(--dim); letter-spacing: 0.06em; }
.info dd { font-size: 15px; font-weight: 600; }

/* 发送邮件按钮放在 DOM 最后，避免手机上出现在邮箱列表之前 */
.contact-cta .btn { width: 100%; }

/* ---------- 页脚 ---------- */
.site-footer {
  padding: clamp(38px, 5vw, 52px) 0 30px;
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
}
.footer-inner { display: grid; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-brand strong { display: block; font-size: 16.5px; }
.footer-brand p { font-size: 13.5px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { font-size: 14px; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--brand-lt); }

.copyright {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.9;
  color: var(--dim);
}
.copyright a { color: #8b98a6; border-bottom: 1px dashed transparent; transition: color 0.2s, border-color 0.2s; }
.copyright a:hover { color: var(--brand-lt); border-bottom-color: rgba(var(--brand-rgb), 0.5); }
.copyright-sep { margin: 0 6px; color: #3f4c57; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  color: var(--on-brand);
  background: var(--brand-grad);
  box-shadow: 0 12px 28px -12px rgba(var(--brand-rgb), 0.9);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.26s, transform 0.26s, visibility 0.26s;
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top svg { width: 22px; height: 22px; }

/* ---------- 滚动入场（仅在 JS 可用时隐藏，避免脚本失败导致空白） ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ===========================================================
   断点：≤1000px 平板/窄屏，≤680px 手机
   =========================================================== */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-side { grid-template-columns: 1fr 1fr; align-items: start; }
  .contact-cta { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  :root { --header-h: 62px; --section-y: 52px; }

  .logo-text small { display: none; }

  /* 抽屉：不透明面板，避免与页面底色出现色差 */
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 5vw 22px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 44px -26px rgba(0, 0, 0, 0.9);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-h));
  }
  .nav.is-open { transform: none; }
  .nav a { padding: 14px 14px; font-size: 16px; border-radius: 10px; }
  .nav a::after { display: none; }
  .nav a:hover, .nav a.active { background: var(--surface); }
  .nav a.nav-cta { margin: 8px 0 0; text-align: center; justify-content: center; }

  /* 首屏 */
  .hero { padding-bottom: clamp(44px, 9vw, 60px); }
  .hero-desc { font-size: 15.5px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-actions .btn { width: 100%; padding: 0 10px; font-size: 15px; }

  /* 区块标题 */
  .sec-head { margin-bottom: 26px; }

  /* 卡片改为横向排布，显著缩短手机端滚动长度 */
  .cards { grid-template-columns: 1fr; gap: 10px; }
  .card {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 14px;
    padding: 16px 16px;
    border-radius: var(--r);
  }
  .card:hover { transform: none; }
  .card-icon {
    grid-row: span 2;
    width: 44px; height: 44px;
    margin-bottom: 0;
    border-radius: 12px;
  }
  .card-icon svg { width: 21px; height: 21px; }
  .card h3 { font-size: 16px; margin-bottom: 4px; align-self: end; }
  .card p { font-size: 13.8px; }

  /* 关于我们 */
  .points li { padding: 10px 14px; }
  .profile { padding: 22px 18px; }
  .profile dl > div { padding: 10px 0; }

  /* 联系我们：官网/服务时间单列，按钮整行放最后 */
  .contact-side { grid-template-columns: 1fr; }
  .emails { margin-top: 20px; }
  .emails dd a { font-size: 14px; padding: 0 14px; }

  /* 页脚 */
  .footer-inner { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .back-top { transition: none; }
}
