/* =============================================================
   四川钰晟弘建设工程有限公司 · 官网样式
   组件层（按钮 / 卡片 / 表单 / 占位图 / 动效）
   布局交由 Tailwind CSS 处理
   ============================================================= */

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei",
               "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: #33403A;
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4 { margin: 0; color: #131A16; font-weight: 800; letter-spacing: -0.012em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: #1C4A38; color: #fff; }

:focus-visible {
  outline: 2px solid #B08D57;
  outline-offset: 2px;
}

/* 跳到主要内容 */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: #1C4A38; color: #fff; padding: 10px 18px; font-size: 14px;
}
.skip:focus { left: 0; }

/* ---------- 栅格容器 ---------- */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
@media (min-width: 640px) { .wrap { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1024px) { .wrap { padding-left: 32px; padding-right: 32px; } }

/* ---------- 区块节奏（大量留白） ---------- */
.sec { padding-top: 64px; padding-bottom: 64px; }
@media (min-width: 768px) { .sec { padding-top: 88px; padding-bottom: 88px; } }
@media (min-width: 1024px) { .sec { padding-top: 108px; padding-bottom: 108px; } }

.sec-head { max-width: 760px; }
.sec-title {
  font-size: 26px; line-height: 1.28; font-weight: 800; color: #131A16;
}
@media (min-width: 768px) { .sec-title { font-size: 34px; } }
@media (min-width: 1024px) { .sec-title { font-size: 38px; } }
.sec-desc { margin-top: 16px; font-size: 15px; line-height: 1.9; color: #4C5A53; }
@media (min-width: 768px) { .sec-desc { font-size: 16px; } }

/* 眉标：硬朗短线 + 大写间距 */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: #8F6F41;
}
.kicker::before { content: ""; width: 26px; height: 3px; background: #B08D57; }
.kicker--light { color: #D9BC8C; }
.kicker--light::before { background: #B08D57; }

/* 几何分割线 */
.rule { height: 1px; background: #E2E8E4; }
.rule--light { background: rgba(255, 255, 255, 0.12); }

/* ---------- 按钮体系 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 6px;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1;
  white-space: nowrap; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s;
}
/* 主按钮：工程橙 */
.btn--accent { background: #8F6F41; color: #fff; box-shadow: 0 10px 22px -14px rgba(143, 111, 65, .9); }
.btn--accent:hover { background: #755C33; transform: translateY(-1px); }
/* 次主按钮：藏青 */
.btn--navy { background: #1C4A38; color: #fff; box-shadow: 0 10px 22px -14px rgba(28, 74, 56, .9); }
.btn--navy:hover { background: #123626; transform: translateY(-1px); }
/* 描边按钮（浅底） */
.btn--outline { background: #fff; color: #1C4A38; border-color: #C6DBD0; }
.btn--outline:hover { border-color: #1C4A38; background: #F1F4F2; }
/* 描边按钮（深底） */
.btn--light { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.32); }
.btn--light:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.6); }
/* 深底实心白 */
.btn--white { background: #fff; color: #1C4A38; }
.btn--white:hover { background: #E3EFE8; }
/* 文字按钮 */
.btn--text { height: auto; padding: 0; background: none; color: #1C4A38; box-shadow: none; }
.btn--text svg { transition: transform .22s; }
.btn--text:hover svg { transform: translateX(4px); }
/* 尺寸 */
.btn--lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn--sm { height: 38px; padding: 0 15px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid #E2E8E4;
  border-radius: 6px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card:hover {
  border-color: #93BAA6;
  box-shadow: 0 20px 44px -28px rgba(12, 36, 25, .55);
  transform: translateY(-3px);
}
.card--static:hover { border-color: #E2E8E4; box-shadow: none; transform: none; }
/* 顶部硬朗强调条 */
.card--accent { position: relative; overflow: hidden; }
.card--accent::before {
  content: ""; position: absolute; left: 0; top: 0; width: 48px; height: 3px; background: #B08D57;
  transition: width .3s;
}
.card--accent:hover::before { width: 96px; }

/* ---------- 图标容器 ---------- */
.icon-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 6px;
  background: #F1F4F2; border: 1px solid #E3EFE8; color: #1C4A38;
}
.icon-box--gold { background: #F8F3EA; border-color: #E2CFA9; color: #8F6F41; }
.icon-box--dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #D9BC8C; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border-radius: 3px; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  background: #E3EFE8; color: #1C4A38;
}
.tag--gold { background: #F0E6D2; color: #755C33; }
.tag--todo {
  background: #F8F3EA; color: #755C33;
  border: 1px dashed #B08D57; height: 22px; font-weight: 700;
}
.tag--light { background: rgba(255,255,255,.1); color: rgba(255,255,255,.86); }

/* ---------- 占位图（无版权风险） ---------- */
.ph {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #ECEFEA 0%, #DDE3DE 100%);
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(15,23,32,.055) 0 1px, transparent 1px 12px);
}
.ph__inner {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.ph__label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px dashed rgba(15,23,32,.28); border-radius: 4px;
  background: rgba(255,255,255,.75); color: #4C5A53; font-size: 12px; letter-spacing: .02em;
}

/* ---------- 图片懒加载 ---------- */
img[data-src] { opacity: 0; }
img.is-loaded { opacity: 1; transition: opacity .45s ease; }

/* ---------- 顶部导航 ---------- */
.site-header { transition: box-shadow .3s; }
.topbar { max-height: 40px; overflow: hidden; transition: max-height .35s ease, opacity .25s ease; }
.site-header.is-scrolled .topbar { max-height: 0; opacity: 0; }
.site-header.is-scrolled .navbar { box-shadow: 0 1px 0 #E2E8E4, 0 10px 28px -24px rgba(12, 36, 25, .6); }

.nav-link {
  position: relative; display: inline-flex; align-items: center; height: 46px;
  padding: 0 10px; font-size: 13.5px; color: #33403A;
  white-space: nowrap; transition: color .2s;
}
.nav-link:hover { color: #1C4A38; }
.nav-link.is-active { color: #1C4A38; font-weight: 700; }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: #B08D57;
}
@media (min-width: 1280px) {
  .nav-link { padding: 0 12px; font-size: 14.5px; }
  .nav-link.is-active::after { left: 12px; right: 12px; }
}

/* ---------- 英雄区 ---------- */
.hero { position: relative; overflow: hidden; background: #123626; }
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(880px 520px at 84% 10%, rgba(46, 107, 80, .60), transparent 62%),
    radial-gradient(680px 460px at 4% 96%, rgba(176, 141, 87, .16), transparent 60%),
    linear-gradient(160deg, #123626 0%, #16402F 56%, #123626 100%);
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 84%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 84%);
}
.hero__slant {
  position: absolute; right: -6%; top: 0; bottom: 0; width: 44%;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0));
  border-left: 1px solid rgba(255,255,255,.07); transform: skewX(-12deg);
}

/* ---------- 深色带 ---------- */
.band-dark { position: relative; overflow: hidden; background: #123626; }
.band-dark__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(760px 460px at 88% 0%, rgba(46, 107, 80, .45), transparent 60%),
    linear-gradient(180deg, #123626 0%, #153D2C 100%);
}
.band-dark__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%);
  mask-image: linear-gradient(180deg, #000, transparent 90%);
}

/* ---------- 数据 ---------- */
.stat-v { font-size: 30px; font-weight: 800; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .stat-v { font-size: 38px; } }
.stat-v--todo { font-size: 21px; font-weight: 700; color: #D9BC8C; letter-spacing: .02em; }
@media (min-width: 768px) { .stat-v--todo { font-size: 24px; } }

/* 步骤序号 */
.step-num { font-size: 38px; font-weight: 800; line-height: 1; color: #C6DBD0; font-variant-numeric: tabular-nums; }

/* ---------- 表单 ---------- */
.field {
  width: 100%; height: 50px; padding: 0 14px;
  border: 1px solid #D6DED9; border-radius: 6px; background: #fff;
  font-family: inherit; font-size: 15px; color: #131A16;
  transition: border-color .2s, box-shadow .2s;
}
.field::placeholder { color: #94A29A; }
.field:focus { outline: none; border-color: #1C4A38; box-shadow: 0 0 0 3px rgba(28, 74, 56, .10); }
.field.is-invalid { border-color: #C0392B; box-shadow: 0 0 0 3px rgba(192, 57, 43, .10); }
textarea.field { height: auto; padding: 12px 14px; resize: vertical; min-height: 120px; }
select.field { appearance: none; background-image: none; }

.form-note {
  display: none; margin-top: 14px; padding: 12px 14px;
  border: 1px solid #B7E0C6; border-radius: 6px; background: #EAF7EF;
  color: #1E6B42; font-size: 14px; line-height: 1.85;
}
.form-note.is-on { display: block; }
.form-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.form-note.is-pending {
  border-color: #CFD9D2; background: #F3F6F4; color: #4C5A53; font-weight: 600;
}
.form-note.is-error { border-color: #E7BDB6; background: #FCEFEC; color: #9B3524; }
.btn[disabled] { opacity: .62; cursor: not-allowed; }

/* ---------- 案例筛选 ---------- */
.filter-btn {
  height: 38px; padding: 0 18px; border: 1px solid #D6DED9; border-radius: 6px;
  background: #fff; color: #4C5A53; font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: .2s;
}
.filter-btn:hover { border-color: #93BAA6; color: #1C4A38; }
.filter-btn.is-on { background: #1C4A38; border-color: #1C4A38; color: #fff; }

/* ---------- 页脚 ---------- */
.footer-link { color: rgba(255,255,255,.62); font-size: 14px; transition: color .2s, padding-left .2s; }
.footer-link:hover { color: #D9BC8C; padding-left: 4px; }

/* ---------- 动效（轻微） ----------
   仅在 JS 可用时才隐藏待进场元素，避免脚本失效导致内容不可见 */
.js-enabled [data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity .65s cubic-bezier(.22,.61,.36,1), transform .65s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.js-enabled [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-enabled [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .to-top { transition: none !important; }
}

/* 返回顶部 */
.to-top {
  position: fixed; right: 16px; bottom: 78px; z-index: 40;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 0; border-radius: 6px;
  background: #1C4A38; color: #fff; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s, visibility .3s, transform .3s, background-color .2s;
  box-shadow: 0 14px 30px -16px rgba(12, 36, 25, .9);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #8F6F41; }

@media (min-width: 1024px) { .to-top { right: 28px; bottom: 28px; } }

/* 打印 */
@media print {
  .site-header, .to-top, .hero__bg, .hero__grid, .hero__slant { display: none !important; }
}
