/* fnbeta — quiet field */
:root {
  --bg: #07080a;
  --fg: rgba(255, 255, 255, .92);
  /* alphas chosen for WCAG AA (>=4.5:1) on #07080a: .52 = 5.7:1, .46 = 4.6:1 */
  --fg-2: rgba(255, 255, 255, .52);
  --fg-3: rgba(255, 255, 255, .46);
  --beian: rgba(255, 255, 255, .40);
  --accent: #5b8cff;
  --pad: 32px; /* 桌面页脚贴角 */
  --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  background: radial-gradient(80% 60% at 50% 40%, #0c0f16 0%, var(--bg) 62%);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* --- dust field ------------------------------------------------------- */
#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(115% 85% at 50% 42%, rgba(7, 8, 10, 0) 36%, rgba(7, 8, 10, .74) 100%);
}

.veil::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}

/* --- content ---------------------------------------------------------- */
.stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 0 24px;
}

.wordmark {
  margin: 0;
  font-size: clamp(28px, 5.2vw, 72px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: .28em;
  padding-left: .28em; /* optical centering: cancels trailing letter-space */
  color: var(--fg);
}

.tagline {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: .08em;
  color: var(--fg-2);
  text-wrap: balance;
}

/* --- footer ----------------------------------------------------------- */
.meta {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) 24px;
}

/* © on the left, contact + filing stacked on the right */
.legal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--fg-3);
}

.contact {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.beian {
  font-size: 10px;
  line-height: 1.4;
  color: var(--beian);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

.mail:hover { color: var(--fg); }
.beian:hover { color: var(--fg-3); }

:where(a):focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* --- 404 -------------------------------------------------------------- */
.code {
  font-size: clamp(40px, 9vw, 96px);
  letter-spacing: .18em;
  padding-left: .18em;
  color: rgba(255, 255, 255, .38); /* 3.4:1 — large text, AA-safe */
}

.back {
  display: inline-block;
  margin-top: 10px;
  color: var(--fg-2);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  transition: color .2s ease, border-color .2s ease;
}

.back:hover { color: var(--fg); border-color: rgba(255, 255, 255, .5); }

/* --- responsive ------------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --pad: 32px; }
}

@media (max-width: 640px) {
  /* iPhone：页脚收到底部，单列垂直居中：© / contact / 备案号 自上而下 */
  .meta {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 0 24px max(20px, env(safe-area-inset-bottom));
    text-align: center;
  }
  .legal {
    display: grid;
    justify-items: center;
    gap: 6px;
  }
  .contact {
    justify-items: center;
    gap: 4px;
  }
  .wordmark { letter-spacing: .22em; padding-left: .22em; }
  .tagline { max-width: 24ch; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
