/* Eternal Sound — 聲波深空 */

@font-face {
  font-family: "Inter Subset";
  src: url("/assets/fonts/inter-200.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #eaf4fa;
  --ink-zh: #7fb4cf;
  --ink-dim: #8b98a4;
  --ink-faint: rgba(150, 190, 215, .34);
  --rule: rgba(140, 200, 235, .34);
  --zh-stack: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

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

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color: var(--ink);
  font-family: "Inter Subset", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(120% 80% at 50% 58%, #0a1620 0%, #05080c 55%, #000 100%);
}

#wave {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 76px 24px;
  text-align: center;
}

/* 以 flex 排字：letter-spacing 會在每個字元後留下空隙，包含最後一個，
   使置中的每一行都左偏半個字距。text-indent 只能補償第一行，一旦
   換行第二行就會歪掉。改成每個字一個 flex item、用負 margin 吃掉
   尾端字距、再以 gap 給詞距，這樣單行或多行都精準置中。 */
.brand {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .6em;
  font-weight: 200;
  font-size: clamp(30px, 7.4vw, 78px);
  line-height: 1.25;
  letter-spacing: .34em;
  text-shadow: 0 0 40px rgba(120, 200, 255, .28);
}

.brand span { margin-right: -.34em; }

.zh {
  margin: 18px 0 0;
  font-family: var(--zh-stack);
  font-weight: 200;
  font-size: clamp(12px, 2.6vw, 17px);
  letter-spacing: .62em;
  text-indent: .62em;
  color: var(--ink-zh);
}

.rule {
  display: block;
  width: 46px;
  height: 1px;
  margin: 30px 0 26px;
  background: var(--rule);
}

.tag {
  margin: 0;
  font-family: var(--zh-stack);
  font-weight: 300;
  font-size: clamp(12px, 2.2vw, 15px);
  line-height: 1.9;
  letter-spacing: .2em;
  text-indent: .2em;
  color: var(--ink-dim);
}

.marks {
  position: fixed;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  padding: 0 22px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-faint);
}

/* 404 專用 */
.code {
  margin: 0;
  font-weight: 200;
  font-size: clamp(52px, 14vw, 108px);
  line-height: 1;
  letter-spacing: .16em;
  text-indent: .16em;
  text-shadow: 0 0 40px rgba(120, 200, 255, .24);
}

.msg {
  margin: 18px 0 0;
  font-family: var(--zh-stack);
  font-weight: 300;
  font-size: clamp(13px, 2.4vw, 16px);
  letter-spacing: .28em;
  text-indent: .28em;
  color: var(--ink-zh);
}

.home {
  display: inline-block;
  margin-top: 32px;
  padding: 10px 22px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--zh-stack);
  font-size: 13px;
  letter-spacing: .2em;
  text-indent: .2em;
  color: var(--ink-zh);
  text-decoration: none;
  transition: border-color .3s, color .3s;
}

.home:hover,
.home:focus-visible {
  border-color: rgba(140, 200, 235, .7);
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
