/* ============================================================================
   home.css —— 千洲出海管理后台 · 首页
   深蓝页头（品牌蓝）+ 三层波浪过渡到浅色内容区，白卡片托真实界面截图。
   颜色与字号全部走 contract/tokens.css 的令牌，本文件不写裸色值与字号。
   ========================================================================== */

/* 首页没引 base.css，浏览器默认的 8px body 边距会露出白框 */
body {
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-ink);
  font-family: var(--font-ui);
}

.home {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ── 页头：三团光做出体积，不是一块纯色 ─────────────────────────────── */
.hero {
  position: relative;
  flex: none;
  padding: 54px 24px 156px;
  background:
    radial-gradient(820px 420px at 16% -8%, rgba(120, 176, 255, 0.40) 0%, rgba(120, 176, 255, 0) 62%),
    radial-gradient(680px 400px at 86% 2%, rgba(37, 99, 235, 0.46) 0%, rgba(37, 99, 235, 0) 66%),
    radial-gradient(900px 300px at 50% 108%, rgba(10, 38, 96, 0.55) 0%, rgba(10, 38, 96, 0) 70%),
    linear-gradient(158deg, var(--brand-navy-900) 0%, var(--brand-navy-700) 52%, var(--brand-blue-500) 100%);
  overflow: hidden;
}

/* 顶部一道细光带：模拟打光，避免上沿发死 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(191, 219, 254, 0.55), transparent);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

/* ── 品牌 ───────────────────────────────────────────────────────────── */
.brand {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand::before {
  content: "";
  position: absolute;
  inset: -60px -120px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(147, 197, 253, 0.26) 0%, rgba(147, 197, 253, 0) 72%);
  pointer-events: none;
}

.brand img { position: relative; display: block; width: 320px; height: auto;
  filter: drop-shadow(0 12px 28px rgba(3, 16, 44, 0.45)); }

.home__title {
  margin: 22px 0 0;
  color: var(--surface);
  font-size: var(--fs-d1);
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  line-height: var(--lh-d1);
  text-shadow: 0 2px 18px rgba(3, 16, 44, 0.4);
}

.home__sub { margin: 10px 0 0; color: rgba(214, 230, 255, 0.82);
  font-size: var(--fs-d7); letter-spacing: 0.16em; }

/* 小橙条：宣传物料里的那一道 */
.home__rule {
  width: 56px;
  height: 3px;
  margin: 20px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-orange-500), var(--brand-orange-300));
}

/* ── 波浪：深蓝切到浅底，三条叠加做出水的厚度 ───────────────────────── */
.wave {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 132px;
  pointer-events: none;
}

.wave__back { fill: rgba(255, 255, 255, 0.09); }
.wave__mid { fill: rgba(255, 255, 255, 0.16); }
.wave__front { fill: var(--brand-bg); }

/* ── 浅色内容区 ─────────────────────────────────────────────────────── */
.body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 24px 44px;
}

/* 卡片背后一团极淡的蓝光，让浅色区也有层次，不是一张纯白纸 */
.body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 760px;
  height: 260px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(29, 78, 216, 0.07) 0%, rgba(29, 78, 216, 0) 72%);
  pointer-events: none;
}

.entries {
  display: flex;
  gap: 22px;
  width: 100%;
}

.entry {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 18px 18px 16px;
  border: 1px solid var(--brand-line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--brand-bg) 100%);
  box-shadow:
    0 1px 2px rgba(15, 43, 87, 0.04),
    0 20px 40px -26px rgba(15, 43, 87, 0.38);
  color: inherit;
  text-align: left;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.entry:hover,
.entry:focus-visible {
  transform: translateY(-3px);
  border-color: var(--brand-blue-300);
  box-shadow:
    0 2px 4px rgba(15, 43, 87, 0.05),
    0 26px 50px -26px rgba(15, 43, 87, 0.45);
  outline: none;
}

.entry__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 2px 4px 0;
}

.entry__name { color: var(--brand-ink); font-size: var(--fs-d4); font-weight: var(--fw-medium); }

.entry__go {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--brand-blue-500);
  font-size: var(--fs-d7);
  white-space: nowrap;
}

.entry__go i { font-style: normal; transition: transform 180ms ease; }

.entry:hover .entry__go i { transform: translateX(3px); }

.entry__desc { margin: 0; padding: 0 4px; color: var(--brand-muted);
  font-size: var(--fs-d8); line-height: var(--lh-d5); }

/* ── 缩略图：真实截图，右缘与底部渐隐，像"还有更多" ────────────────── */
.thumb {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--brand-line-soft);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 43, 87, 0.05);
}

.thumb img { display: block; width: 100%; height: auto; }

.thumb::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 46px;
  background: linear-gradient(270deg, var(--surface) 6%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.thumb::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--surface) 86%);
  pointer-events: none;
}

/* ── 实时统计 ───────────────────────────────────────────────────────── */
.home__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: fit-content;
  margin: 24px auto 0;
  padding: 12px 24px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 12px 28px -22px rgba(15, 43, 87, 0.5);
  color: var(--brand-muted);
  font-size: var(--fs-d8);
}

.home__stats[hidden] { display: none; }

.home__stats i { width: 1px; height: 14px; background: var(--brand-line); }

.stat b {
  margin-right: 4px;
  color: var(--brand-ink);
  font-size: var(--fs-d4);
  font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
}

.stat--alert b { color: var(--brand-orange-500); }

.home__foot { margin: 22px 0 0; color: var(--brand-muted);
  font-size: var(--fs-d8); letter-spacing: 0.06em; text-align: center; }

/* ── 矮屏（768/615 这类笔记本）：整体收一档，尽量一屏放完 ───────────── */
@media (max-height: 720px) {
  .hero { padding: 18px 24px 78px; }
  .wave { height: 96px; }
  .brand img { width: 200px; }
  .home__title { margin-top: 10px; font-size: var(--fs-d3); }
  .home__sub { margin-top: 4px; font-size: var(--fs-d8); }
  .home__rule { margin-top: 8px; }
  .body { padding: 10px 24px 18px; }
  .thumb img { height: 96px; object-fit: cover; object-position: top; }
  .entry { gap: var(--space-sm); padding: 12px 12px 10px; }
  .entry__name { font-size: var(--fs-d6); }
  .home__stats { margin-top: 12px; padding: 8px 18px; }
  .home__foot { margin-top: 10px; }
}

@media (max-width: 900px) {
  .hero { padding: 36px 20px 120px; }
  .brand img { width: 220px; }
  .home__title { font-size: var(--fs-d2); }
  .home__sub { font-size: var(--fs-d8); }
  .body { padding: 24px 16px 36px; }
  .entries { flex-direction: column; }
  .home__stats { flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); }
}

@media (prefers-reduced-motion: reduce) {
  .entry, .entry__go i { transition: none; }
  .entry:hover { transform: none; }
}
