/* =================================================================
   肥鱼的技术小站 · 门面页
   单屏、零依赖。视觉语言与 portal.dsh-box.online 保持一致，
   但内容只留站名、一句话、一个入口。
   ================================================================= */

:root {
  --bg: #f6f7f9;
  --text: #16181d;
  --text-2: #5b6270;
  --text-3: #8a919d;
  --accent: #4a63e7;
  --accent-ink: #ffffff;
  --line: rgba(0, 0, 0, 0.085);
  --glow-a: rgba(74, 99, 231, 0.22);
  --glow-b: rgba(20, 184, 166, 0.16);
  --grid-line: rgba(16, 20, 30, 0.045);
  --cursor-hi: rgba(107, 138, 253, 0.13);
  --cursor-core: rgba(74, 99, 231, 0.11);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10;
    --text: #e7e9ee;
    --text-2: #9aa1ad;
    --text-3: #6c737f;
    --accent: #8ba0ff;
    --accent-ink: #0b0d10;
    --line: rgba(255, 255, 255, 0.1);
    --glow-a: rgba(84, 116, 255, 0.26);
    --glow-b: rgba(45, 212, 191, 0.15);
    --grid-line: rgba(255, 255, 255, 0.05);
    --cursor-hi: rgba(139, 160, 255, 0.17);
    --cursor-core: rgba(84, 116, 255, 0.14);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

/* hidden 属性优先级最低，统一兜底，避免 display 类样式把它盖掉 */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}

/* ------------------------------------------------------------- 背景层 */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  will-change: transform;
}

.orb-a {
  width: 46vmax;
  height: 46vmax;
  top: -20vmax;
  left: -14vmax;
  background: var(--glow-a);
  animation: drift-a 28s ease-in-out infinite alternate;
}

.orb-b {
  width: 40vmax;
  height: 40vmax;
  bottom: -22vmax;
  right: -12vmax;
  background: var(--glow-b);
  animation: drift-b 34s ease-in-out infinite alternate;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 8%, transparent 76%);
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 8%, transparent 76%);
}

/* 跟随光标的光晕；没有指针移动时整层不可见 */
.bg-cursor {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  background:
    radial-gradient(
      220px circle at var(--mx, 50%) var(--my, 42%),
      var(--cursor-hi) 0%,
      rgba(0, 0, 0, 0) 72%
    ),
    radial-gradient(
      660px circle at var(--mx, 50%) var(--my, 42%),
      var(--cursor-core) 0%,
      rgba(0, 0, 0, 0) 66%
    );
}

.bg.is-live .bg-cursor {
  opacity: 1;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 30%, transparent 46%, var(--bg) 98%);
  opacity: 0.55;
}

@keyframes drift-a {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(6vmax, 4vmax, 0) scale(1.08);
  }
}

@keyframes drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1.05);
  }
  to {
    transform: translate3d(-5vmax, -4vmax, 0) scale(0.96);
  }
}

/* ------------------------------------------------------------- 内容 */

.hero {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px 40px;
  animation: rise 0.7s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.mark {
  display: block;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  color: var(--accent);
}

.mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 4.6vw, 31px);
  font-weight: 600;
  letter-spacing: -0.4px;
}

.tag {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--text-2);
}

.enter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 30px;
  padding: 11px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(16, 20, 30, 0.08), 0 10px 26px -12px var(--accent);
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.16s ease;
}

.enter svg {
  width: 17px;
  height: 17px;
  transition: transform 0.18s ease;
}

.enter:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 20, 30, 0.1), 0 14px 30px -12px var(--accent);
}

.enter:hover svg {
  transform: translateX(2px);
}

.enter:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.note {
  margin: 20px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: 0.2px;
}

.foot {
  position: relative;
  z-index: 1;
  padding: 0 20px 22px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

.foot a {
  color: var(--text-3);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.foot a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .hero {
    padding: 40px 20px 32px;
  }
  .mark {
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
  }
  .enter {
    padding: 10px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .hero {
    animation: none;
  }
  .bg-cursor {
    display: none;
  }
  .enter,
  .enter svg {
    transition: none;
  }
}
