/* 首页（一屏）：大号品牌名 + 两张实拍轮播入口卡片 + 双向流转箭头；背景为缓慢漂移的光斑与细网格。
   卡片只用细边框、顶部高光与柔和投影表现立体感；动效只用 transform/opacity，尊重“减少动态”。 */
:root { --hx-bg: #0e1012; --hx-ink: #e6ecf4; --hx-ink-2: #aeb2b9; --hx-card: #17191d; --hx-line: #ffffff1a; --hx-title: #f3d9a6; }
:root[data-theme="light"] { --hx-bg: #ecf0f6; --hx-ink: #1c222a; --hx-ink-2: #5f646b; --hx-card: #ffffff; --hx-line: #d4dbe6; --hx-title: #1744a0; }

body.is-home main#app { max-width: none; padding: 0; }
.hx { height: calc(100dvh - var(--hdr-h, 64px)); min-height: 520px; display: grid; grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr) auto;
  padding: clamp(16px, 3.4vh, 40px) clamp(16px, 4vw, 64px) 10px; background: var(--hx-bg); color: var(--hx-ink); overflow: hidden; position: relative; isolation: isolate; }

/* 背景动效：三团柔光缓慢漂移 + 向中心淡出的细网格缓慢平移 */
.hx-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hx-bg i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform; }
.hx-bg .b1 { left: -12vmax; top: -18vmax; background: radial-gradient(circle, #3167d3, transparent 65%); animation: hx-drift1 26s ease-in-out infinite alternate; }
.hx-bg .b2 { right: -14vmax; top: -10vmax; background: radial-gradient(circle, #d6a34a, transparent 65%); animation: hx-drift2 32s ease-in-out infinite alternate; opacity: .42; }
.hx-bg .b3 { left: 30%; bottom: -30vmax; background: radial-gradient(circle, #1744a0, transparent 65%); animation: hx-drift3 38s ease-in-out infinite alternate; opacity: .35; }
:root[data-theme="light"] .hx-bg i { opacity: .22; }
:root[data-theme="light"] .hx-bg .b2 { opacity: .26; }
.hx-grid { position: absolute; inset: -40px; background-image: linear-gradient(var(--hx-line) 1px, transparent 1px), linear-gradient(90deg, var(--hx-line) 1px, transparent 1px); background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%); opacity: .6; animation: hx-grid 18s linear infinite; }
@keyframes hx-drift1 { to { transform: translate(14vw, 10vh) scale(1.15); } }
@keyframes hx-drift2 { to { transform: translate(-12vw, 16vh) scale(.9); } }
@keyframes hx-drift3 { to { transform: translate(-16vw, -12vh) scale(1.1); } }
@keyframes hx-grid { to { transform: translate(40px, 40px); } }

.hx-intro { grid-row: 2; text-align: center; }
.hx-credit { grid-row: 5; }
.hx-intro h1 { margin: 0; font-size: clamp(40px, 7.4vh, 80px); line-height: 1.12; letter-spacing: .16em; padding-left: .16em; color: var(--hx-title); font-weight: 900; text-shadow: 0 2px 0 #ffffff55, 0 10px 30px #1744a026; }
:root:not([data-theme="light"]) .hx-intro h1 { text-shadow: 0 10px 34px #00000080; }
.hx-intro p { margin: 6px 0 0; font-size: clamp(15px, 2.1vh, 19px); color: var(--hx-ink-2); letter-spacing: .04em; }

.hx-stage { grid-row: 3; width: min(1160px, 100%); margin: clamp(18px, 4vh, 48px) auto 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(14px, 2.4vw, 40px); }
.hx-card { min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: var(--hx-card); border: 1px solid var(--hx-line); color: inherit; text-decoration: none;
  box-shadow: var(--mod-shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.hx-card:hover, .hx-card:focus-visible { transform: translateY(-4px); box-shadow: var(--mod-shadow-hover); border-color: #c99a55aa; outline: none; }
/* 轮播：图片叠放淡入淡出，当前图缓慢推近 */
.hx-media { position: relative; height: clamp(190px, 34vh, 360px); overflow: hidden; background: #0003; }
.hx-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.02); transition: opacity 1.2s ease, transform 7s ease-out; }
.hx-photo.on { opacity: 1; transform: scale(1.08); }
.hx-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.hx-dots i { width: 7px; height: 7px; border-radius: 4px; background: #ffffff8c; box-shadow: 0 1px 3px #0006; transition: width .3s, background .3s; }
.hx-dots i.on { width: 20px; background: #fff; }
.hx-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: clamp(12px, 1.8vh, 18px) 22px; border-top: 1px solid var(--hx-line); }
.hx-body h2 { margin: 0; font-size: clamp(22px, 3vh, 28px); letter-spacing: .1em; color: var(--hx-ink); }
.hx-body p { margin: 4px 0 0; font-size: calc(14px * var(--fs)); color: var(--hx-ink-2); }
.hx-body .hx-cur { margin-top: 6px; font-size: calc(13px * var(--fs)); color: #b0802f; }
:root:not([data-theme="light"]) .hx-body .hx-cur { color: #e2bd73; }
.hx-go { flex: none; padding: 7px 18px; border-radius: 999px; border: 1px solid #1c50b8; color: #1c50b8; font-weight: 700; font-size: calc(14px * var(--fs)); background: transparent; transition: background .2s, color .2s; }
:root:not([data-theme="light"]) .hx-go { border-color: #e2bd73; color: #e2bd73; }
.hx-card:hover .hx-go, .hx-card:focus-visible .hx-go { background: #1c50b8; border-color: #1c50b8; color: #fff; }

.hx-bridge { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
:root .hx .hx-arrow.arrow-btn { width: 64px; height: 64px; color: #1c50b8; border: 1px solid var(--hx-line); background: var(--hx-card); box-shadow: var(--mod-shadow); }
:root .hx .hx-arrow.arrow-btn svg { width: 28px; height: 28px; transform: none; }
:root .hx .hx-arrow.arrow-btn:hover:not(:disabled) { color: #fff; background: #1c50b8; border-color: #1c50b8; box-shadow: var(--mod-shadow-hover); transform: translateY(-2px); }
:root:not([data-theme="light"]) .hx .hx-arrow.arrow-btn { color: #e2bd73; }
.hx .hx-arrow.arrow-btn::after { display: none; }

.hx-credit { margin: 0; text-align: center; font-size: 12px; color: var(--hx-ink-2); opacity: .8; }
.hx-credit a { color: inherit; }

/* 窄屏：上下排列，允许滚动 */
@media (max-width: 860px) {
  .hx { height: auto; min-height: 0; overflow: visible; grid-template-rows: auto; row-gap: 16px; }
  .hx-intro, .hx-stage, .hx-credit { grid-row: auto; }
  .hx-stage { margin-top: 0; }
  .hx-stage { grid-template-columns: 1fr; }
  .hx-media { height: auto; aspect-ratio: 16 / 9; }
  .hx-bridge { flex-direction: row; justify-content: center; }
  :root .hx .hx-arrow.arrow-btn svg { transform: rotate(90deg); }
}
@media (prefers-reduced-motion: reduce) { .hx-card, .hx-go, .hx-photo { transition: none; } .hx-card:hover { transform: none; } .hx-photo.on { transform: none; } .hx-bg i, .hx-grid { animation: none; } }

/* 思政元素参考库（研课场弹窗沿用） */
.hx-lib { text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.hx-lib b { color: var(--gold); } .hx-lib ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: calc(13px * var(--fs)); }
:root[data-theme="light"] .hx-lib b { color: #19408e; }
