/* ==========================================================
   首页（角色入口）— 扁平风三端入口
   依赖 style.css 的 :root 变量
   ========================================================== */

body.home { background: #f2faf8; }

/* 毛玻璃材质：卡片/资讯/公告统一用这一套（背景半透 + 背景模糊 + 亮边）
   不支持 backdrop-filter 的浏览器会退化为"半透明白"，视觉仍然成立 */
.hm {
  --glass: rgba(255, 255, 255, .56);
  --glass-hover: rgba(255, 255, 255, .76);
  --glass-bd: rgba(255, 255, 255, .74);
  --glass-bd-hover: rgba(255, 255, 255, .95);
  --glass-blur: saturate(180%) blur(18px);
}

/* 页面容器：撑满首屏，内容垂直居中 */
.hm {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 26px 22px;
  overflow: hidden;
  transition: opacity .34s ease;
}
body.yk-fade .hm { opacity: 0; }
body.yk-leaving .hm { opacity: 0; transition-duration: .16s; }

/* ---------------- 背景装饰 ---------------- */
.hm__bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }

/* 细网格（带径向遮罩，中间清晰四周淡出） */
.hm__bg::before {
  content: '';
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(80, 196, 188, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 196, 188, .16) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 72% 58% at 50% 42%, #000 30%, transparent 76%);
  mask-image: radial-gradient(ellipse 72% 58% at 50% 42%, #000 30%, transparent 76%);
  opacity: .8;
}

/* 模糊光斑 */
.hm__orb { position: absolute; border-radius: 50%; filter: blur(52px); will-change: transform; }
.hm__orb--1 {
  width: 460px; height: 460px; left: -140px; top: -160px;
  background: radial-gradient(circle at 40% 40%, rgba(125, 220, 213, .85), rgba(182, 236, 231, .5) 55%, transparent 72%);
  animation: hmFloat 16s ease-in-out infinite;
}
.hm__orb--2 {
  width: 420px; height: 420px; right: -130px; top: 6%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 211, 122, .5), rgba(255, 232, 184, .26) 55%, transparent 72%);
  animation: hmFloat 19s ease-in-out infinite reverse;
}
.hm__orb--3 {
  width: 520px; height: 380px; left: 34%; bottom: -200px;
  background: radial-gradient(circle at 50% 50%, rgba(140, 165, 255, .32), rgba(200, 214, 255, .18) 55%, transparent 72%);
  animation: hmFloat 22s ease-in-out infinite;
}
/* 卡片区背后的一团暖色：让毛玻璃有东西可"糊"，边缘与色彩过渡才看得出来 */
.hm__orb--4 {
  width: 760px; height: 420px; left: 50%; top: 34%;
  margin-left: -380px;
  background:
    radial-gradient(circle at 30% 50%, rgba(87, 200, 191, .55), rgba(87, 200, 191, 0) 62%),
    radial-gradient(circle at 70% 45%, rgba(255, 196, 92, .42), rgba(255, 196, 92, 0) 60%);
  filter: blur(58px);
  opacity: .72;
}
@keyframes hmFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(18px, -26px, 0) scale(1.06); }
}

/* 装饰细环 */
.hm__ring { position: absolute; border-radius: 50%; border: 1px solid rgba(80, 196, 188, .2); }
.hm__ring--1 { width: 300px; height: 300px; right: 6%; top: 12%; }
.hm__ring--2 {
  width: 190px; height: 190px; left: 7%; bottom: 10%;
  border-style: dashed; border-color: rgba(80, 196, 188, .26);
}

/* ---------------- 顶部 ---------------- */
.hm-top {
  position: relative; z-index: 2;
  width: 100%; max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.hm-top__logo { height: 32px; width: auto; display: block; }
.hm-top__link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-bd);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  font-size: 12.5px; color: #3f6b66; text-decoration: none;
  transition: border-color .18s, color .18s, background .18s;
}
.hm-top__link i:first-child { font-size: 11.5px; color: var(--c-dark); }
.hm-top__link-out { font-size: 9px; opacity: .5; }
.hm-top__link:hover {
  border-color: var(--c); color: var(--c-deep);
  background: var(--glass-hover);
}

/* ---------------- 主体 ---------------- */
.hm-main {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: 20px 0 14px;
}

.hm-hero { text-align: center; margin: 0 auto 30px; max-width: 780px; }

.hm-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 2px;
  color: #2f9b94;
  background: rgba(80, 196, 188, .1);
  border: 1px solid rgba(80, 196, 188, .24);
}
.hm-hero__eyebrow i { font-size: 11px; opacity: .9; }

.hm-hero__title {
  margin: 18px 0 0;
  font-size: clamp(25px, 3.3vw, 40px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 1px;
  color: #16332f;
}
.hm-hero__title em {
  font-style: normal;
  background: linear-gradient(96deg, #2f9b94 0%, #57c8bf 45%, #2f9b94 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hm-hero__sub {
  margin: 14px auto 0;
  max-width: 620px;
  font-size: 13.5px; line-height: 1.85; color: #7d9c98;
}

/* ---------------- 质检公告条 ---------------- */
.hm-notice {
  display: inline-flex; align-items: center; gap: 11px;
  margin-top: 20px;
  padding: 8px 13px 8px 8px;
  background: var(--glass);
  border: 1px solid var(--glass-bd);
  border-radius: 10px;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  text-decoration: none; color: #4f7570;
  max-width: 100%;
  transition: border-color .18s, background .18s;
}
.hm-notice:hover { border-color: var(--c); background: var(--glass-hover); }
.hm-notice__tag {
  display: inline-flex; align-items: center; gap: 6px;
  flex: none;
  padding: 4px 10px; border-radius: 7px;
  background: #eaf7f5; color: #2f9b94;
  font-size: 11.5px; font-weight: 600;
}
.hm-notice__tag i { font-size: 10.5px; }
.hm-notice__txt {
  font-size: 12.5px; color: #66857f;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hm-notice__go { font-size: 9.5px; color: #a5bcb8; flex: none; }

/* ---------------- 三张入口卡片（扁平） ---------------- */
.hm-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
}
/* 只显示 1~2 个入口时：卡片别被拉得过宽，整体居中 */
.hm-cards--1 { grid-template-columns: minmax(0, 1fr); max-width: 396px; margin-inline: auto; }
.hm-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 752px; margin-inline: auto; }

/* 三个入口全部关闭时的占位 */
.hm-none {
  grid-column: 1 / -1;
  padding: 44px 24px;
  text-align: center;
  background: var(--glass);
  border: 1px dashed rgba(255, 255, 255, .9);
  border-radius: 14px;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.hm-none i { font-size: 22px; color: #9dbdb8; }
.hm-none b { display: block; margin-top: 10px; font-size: 16px; color: #24403c; }
.hm-none span { display: block; margin-top: 6px; font-size: 12.6px; color: #6b8884; }

.hm-card {
  --k: #2f9b94;
  --k-d: #227a74;
  --k-soft: #e8f6f4;
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 24px 24px 18px;
  min-height: 248px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-bd);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  text-decoration: none; color: inherit;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.hm-card:hover,
.hm-card:focus-visible {
  border-color: var(--k);
  background: var(--glass-hover);
  transform: translateY(-3px);
  outline: none;
}
.hm-card:active { transform: translateY(-1px); }

/* 右上角序号水印 */
.hm-card__no {
  position: absolute; right: 20px; top: 14px;
  font-size: 32px; font-weight: 800; line-height: 1;
  letter-spacing: -1px;
  color: var(--k-soft);
  transition: color .18s;
  pointer-events: none;
}

/* 图标块：纯色，无渐变无阴影 */
.hm-card__ico {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px; color: #fff;
  background: var(--k);
}

.hm-card__t {
  margin-top: 15px;
  font-size: 18px; font-weight: 700; letter-spacing: .5px; color: #1d3a37;
}
.hm-card__d {
  margin-top: 7px;
  font-size: 12.6px; line-height: 1.75; color: #7b9995;
}

.hm-card__tags { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 6px; }
.hm-card__tags span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.2px; color: var(--k-d);
  background: var(--k-soft);
  border-radius: 6px;
  padding: 3px 8px;
}
.hm-card__tags i { font-size: 9.5px; opacity: .8; }

.hm-card__go {
  margin-top: auto; padding-top: 13px; width: 100%;
  border-top: 1px solid rgba(29, 58, 55, .09);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--k-d);
}
.hm-card__go b { font-weight: 600; }
.hm-card__go i { font-size: 11px; transition: transform .2s ease; }
.hm-card:hover .hm-card__go i { transform: translateX(4px); }

/* 三个角色配色（扁平三色） */
.hm-card--cand  { --k: #2f9b94; --k-d: #227a74; --k-soft: #e6f5f3; }
.hm-card--judge { --k: #d9871c; --k-d: #b06d10; --k-soft: #fdf2df; }
.hm-card--admin { --k: #4f6ae0; --k-d: #3d55c4; --k-soft: #eceffe; }

/* ---------------- 底部 ---------------- */
.hm-foot {
  position: relative; z-index: 2;
  width: 100%; max-width: 1080px; margin: 4px auto 0;
  padding-top: 15px;
  border-top: 1px solid rgba(80, 196, 188, .16);
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  font-size: 11.5px; color: #8ba7a3;
}
.hm-foot__gzh { display: flex; align-items: center; gap: 10px; }
.hm-foot__gzh img {
  width: 38px; height: 38px; border-radius: 9px; object-fit: cover;
  border: 1px solid rgba(80, 196, 188, .2);
}
.hm-foot__gzh-t { display: flex; flex-direction: column; line-height: 1.55; }
.hm-foot__gzh-t b { font-size: 12px; color: #4f7570; font-weight: 600; }
.hm-foot__gzh-t span { font-size: 10.8px; color: #93aeaa; }
.hm-foot__cp { text-align: right; line-height: 1.6; }

/* ---------------- 入场动画 ---------------- */
@keyframes hmIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
body.home-in .hm-hero { animation: hmIn .55s cubic-bezier(.2, .8, .3, 1) backwards; }
body.home-in .hm-card { animation: hmIn .62s cubic-bezier(.2, .8, .3, 1) backwards; }
body.home-in .hm-card:nth-child(2) { animation-delay: .09s; }
body.home-in .hm-card:nth-child(3) { animation-delay: .18s; }
body.home-in .hm-foot { animation: hmIn .6s cubic-bezier(.2, .8, .3, 1) .22s backwards; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .hm { padding: 16px 16px 18px; }
  .hm-main { padding: 16px 0 6px; }
  .hm-hero { margin-bottom: 20px; }
  .hm-hero__title { letter-spacing: .5px; }
  .hm-hero__sub { font-size: 12.8px; }
  .hm-notice { width: 100%; justify-content: flex-start; box-sizing: border-box; }
  .hm-notice__txt { flex: 1; min-width: 0; }
  .hm-cards { grid-template-columns: 1fr; gap: 11px; }
  .hm-card {
    min-height: 0;
    padding: 16px 18px 14px;
    flex-direction: row; flex-wrap: wrap; align-items: center;
    column-gap: 13px;
  }
  .hm-card__ico { width: 42px; height: 42px; border-radius: 11px; font-size: 17px; }
  .hm-card__t { margin-top: 0; font-size: 16.5px; flex: 1; }
  .hm-card__no { display: none; }
  .hm-card__d { margin-top: 11px; width: 100%; font-size: 12.3px; }
  .hm-card__tags { margin-top: 9px; }
  .hm-card__go { margin-top: 0; padding-top: 11px; }
  .hm-foot { justify-content: center; text-align: center; }
  .hm-foot__cp { text-align: center; }
}
@media (max-width: 420px) {
  .hm-hero__eyebrow { font-size: 10.5px; letter-spacing: 1.2px; padding: 6px 12px; }
  .hm-card__tags { display: none; }
  .hm-notice__txt { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .hm__orb, .hm__ring { animation: none !important; }
  body.home-in .hm-hero,
  body.home-in .hm-card,
  body.home-in .hm-foot { animation: none !important; }
}

/* 公告条：不可点击（未填链接）时的样式 */
.hm-notice--plain { cursor: default; }
.hm-notice--plain:hover { border-color: var(--glass-bd); background: var(--glass); }

/* ---------------- 省统考资讯 ---------------- */
.hm-news { margin-top: 34px; }

.hm-news__hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 12px;
}
.hm-news__t {
  margin: 0;
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 700; letter-spacing: .5px; color: #1d3a37;
}
.hm-news__t i { font-size: 14px; color: var(--c-dark); }
.hm-news__more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: #5d8f8a; text-decoration: none;
  transition: color .18s;
}
.hm-news__more i { font-size: 10px; transition: transform .2s; }
.hm-news__more:hover { color: var(--c-dark); }
.hm-news__more:hover i { transform: translateX(3px); }

.hm-news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hn-item {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 14px 16px 13px;
  background: var(--glass);
  border: 1px solid var(--glass-bd);
  border-radius: 12px;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  text-decoration: none;
  transition: border-color .18s, transform .18s, background-color .18s;
}
.hn-item:hover { border-color: var(--c); transform: translateY(-2px); background: var(--glass-hover); }

.hn-item__cat {
  font-size: 11px; color: #2f9b94;
  background: rgba(234, 247, 245, .82);
  border-radius: 5px;
  padding: 2px 7px;
  line-height: 1.5;
}
.hn-item__t {
  margin-top: 8px;
  font-size: 13.5px; line-height: 1.62; font-weight: 600; color: #1f3b39;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.hn-item:hover .hn-item__t { color: var(--c-deep); }
.hn-item__d {
  margin-top: auto; padding-top: 10px;
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: #9fb8b4;
}
.hn-item__d i { font-size: 10px; }

@media (max-width: 900px) {
  .hm-news { margin-top: 26px; }
  .hm-news__t { font-size: 15px; }
  .hm-news__grid { grid-template-columns: 1fr; gap: 9px; }
  .hn-item { padding: 12px 14px; }
  .hn-item__t { font-size: 13px; -webkit-line-clamp: 2; }
}

/* ---------------- 毛玻璃适配 ---------------- */
/* 手机端：层数多、GPU 弱，模糊收小一点、底色加厚一点，滚动更稳且字更清楚 */
@media (max-width: 900px) {
  .hm {
    --glass: rgba(255, 255, 255, .68);
    --glass-hover: rgba(255, 255, 255, .84);
    --glass-bd: rgba(255, 255, 255, .85);
    --glass-blur: saturate(160%) blur(10px);
  }
}

/* 不支持 backdrop-filter 的浏览器（老 Firefox / 旧国产内核）：靠加厚底色保证可读性 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hm {
    --glass: rgba(255, 255, 255, .88);
    --glass-hover: rgba(255, 255, 255, .96);
    --glass-bd: #e3efed;
  }
}

/* 用户要求减少透明/动画时，退回纯白卡片 */
@media (prefers-reduced-transparency: reduce) {
  .hm {
    --glass: #fff;
    --glass-hover: #fff;
    --glass-bd: #e3efed;
    --glass-blur: none;
  }
}
