/* Helsincy Mod Manager 官网 — 基础层：重置、排版、外壳、导航、按钮、页脚 */

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  background: var(--ink-950);
  color: var(--frost-300);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  text-rendering: optimizelegibility;
  -webkit-font-smoothing: antialiased;
}

/* 全局颗粒感覆盖层：让纯色深底不至于发死 */
body::after {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background-image: var(--grain);
  background-size: 160px 160px;
  opacity: 0.32;
  mix-blend-mode: overlay;
  content: "";
  pointer-events: none;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--ice-a40);
  color: var(--frost-050);
}

:focus-visible {
  border-radius: var(--r-xs);
  outline: 2px solid var(--ice-400);
  outline-offset: 3px;
}

/* ---------- 语言切换：未激活语言直接隐藏，无 JS 也能读中文 ---------- */

.lang-zh [data-lang="en"],
.lang-en [data-lang="zh"] {
  display: none !important;
}

.lang-en {
  --font-display-cn: var(--font-display);
}

/* ---------- 排版 ---------- */

h1,
h2,
h3,
h4 {
  color: var(--frost-050);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-hero);
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.display-cn {
  font-family: var(--font-display-cn);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.section-title {
  font-family: var(--font-display-cn);
  font-size: var(--fs-h2);
  line-height: 1.16;
}

.lang-en .section-title {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.lead {
  max-width: 60ch;
  color: var(--frost-500);
  font-size: var(--fs-lead);
  line-height: 1.8;
  text-wrap: pretty;
}

strong,
b {
  color: var(--frost-100);
  font-weight: 600;
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: 0.02em;
}

.accent {
  color: var(--ice-400);
}

/* 眉标：全大写 + 前置刻度线 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  color: var(--ice-400);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ice-400));
  content: "";
}

/* ---------- 布局外壳 ---------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell-wide {
  max-width: var(--shell-wide);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 74ch;
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
}

/* 区块之间的冰蓝细线，带中心亮点 */
.rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), var(--ice-a24), var(--line), transparent);
}

/* ---------- 按钮 ---------- */

.btn {
  --btn-bg: transparent;
  position: relative;
  /* 主按钮的扫光伪元素起始位置在按钮外，必须裁掉，否则会在按钮左侧留下一块灰色色块 */
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.85em 1.6em;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--frost-100);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast),
    background var(--dur-fast), box-shadow var(--dur) var(--ease-out), color var(--dur-fast);
}

.btn:hover {
  border-color: var(--ice-a40);
  box-shadow: var(--glow-soft);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--ice-300) 0%, var(--ice-500) 52%, var(--glacier) 100%);
  color: #041019;
  box-shadow: 0 14px 40px rgb(36 193 240 / 26%);
}

.btn--primary:hover {
  box-shadow: 0 20px 56px rgb(36 193 240 / 40%);
}

/* 主按钮上的一道扫光 */
.btn--primary::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 38%, rgb(255 255 255 / 55%) 50%, transparent 62%);
  content: "";
  translate: -140% 0;
  pointer-events: none;
}

.btn--primary:hover::after {
  transition: translate 780ms var(--ease-out);
  translate: 140% 0;
}

.btn--ghost {
  background: rgb(255 255 255 / 3%);
}

.btn--sm {
  padding: 0.6em 1.15em;
  font-size: 0.78rem;
}

.btn svg {
  width: 1.05em;
  height: 1.05em;
  stroke-width: 1.9;
}

/* 文本链接：下划线从左侧展开 */
.link {
  color: var(--ice-400);
  background-image: linear-gradient(var(--ice-400), var(--ice-400));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size var(--dur) var(--ease-out);
}

.link:hover {
  background-size: 100% 1px;
}

/* ---------- 徽标与胶囊 ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.34em 0.85em;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--ice-a04);
  color: var(--frost-300);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pill--live {
  border-color: rgb(79 224 176 / 32%);
  color: var(--jade);
}

.pill--plan {
  color: var(--frost-600);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentcolor;
  box-shadow: 0 0 10px currentcolor;
}

.dot--pulse {
  animation: pulse 2.4s var(--ease-in-out) infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    scale: 1;
  }

  50% {
    opacity: 0.35;
    scale: 0.7;
  }
}

/* ---------- 顶栏 ---------- */

.nav {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  transition: background var(--dur), border-color var(--dur), backdrop-filter var(--dur);
  border-bottom: 1px solid transparent;
}

.nav.is-stuck {
  border-bottom-color: var(--line-soft);
  background: var(--glass-strong);
  backdrop-filter: blur(18px) saturate(1.4);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 72px;
}

.brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
}

.brand__mark {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 14px rgb(95 216 255 / 45%));
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  color: var(--frost-050);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand__sub {
  color: var(--frost-600);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  gap: 0.35rem;
}

.nav__links a {
  position: relative;
  display: block;
  padding: 0.45em 0.9em;
  border-radius: var(--r-pill);
  color: var(--frost-500);
  font-size: 0.86rem;
  transition: color var(--dur-fast), background var(--dur-fast);
}

.nav__links a:hover {
  background: var(--ice-a08);
  color: var(--frost-050);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* 语言切换：双段开关 */
.lang-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 3%);
}

.lang-switch button {
  padding: 0.3em 0.75em;
  border-radius: var(--r-pill);
  color: var(--frost-600);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: color var(--dur-fast), background var(--dur-fast);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--ice-a14);
  color: var(--ice-300);
}

.nav__burger {
  display: none;
  padding: 0.5em;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--frost-100);
}

/* ---------- 页脚 ---------- */

.footer {
  position: relative;
  border-top: 1px solid var(--line-soft);
  background: var(--ink-980);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
}

.footer__col h4 {
  margin-bottom: 1.1rem;
  color: var(--frost-500);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.footer__col li + li {
  margin-top: 0.6rem;
}

.footer__col a {
  color: var(--frost-500);
  font-size: 0.88rem;
  transition: color var(--dur-fast);
}

.footer__col a:hover {
  color: var(--ice-300);
}

.footer__note {
  max-width: 42ch;
  margin-top: 1rem;
  color: var(--frost-700);
  font-size: 0.82rem;
  line-height: 1.7;
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 3.5rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.6rem;
  color: var(--frost-700);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* ---------- 滚动进场 ---------- */

.reveal {
  opacity: 0;
  transition: opacity 760ms var(--ease-out), translate 760ms var(--ease-out);
  translate: 0 26px;
}

.reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

/* ---------- 响应式 ---------- */

@media (width <= 960px) {
  .nav__links {
    display: none;
  }

  .nav__burger {
    display: block;
  }

  .nav.is-open .nav__links {
    position: absolute;
    top: 72px;
    right: var(--gutter);
    left: var(--gutter);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--glass-strong);
    padding: 0.7rem;
    backdrop-filter: blur(18px);
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width <= 620px) {
  .brand__sub {
    display: none;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    translate: none;
  }
}
