:root {
  --line-w: min(78vw, 780px);
  --ink: #f2e8d8;
  --hero-y: 3vh;
  --title-min-h: clamp(94px, 13vw, 164px);
  --title-gap: clamp(2px, 0.5vw, 8px);
  --motto-mt: -2px;
  --motto-h: clamp(92px, 11vw, 136px);
}

@font-face {
  font-family: "ForOneCN";
  src: url("fonts/cn.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ForOneEN";
  src: url("fonts/segoesc-2.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 30%, rgba(34, 66, 130, 0.34), rgba(14, 24, 56, 0.2) 36%, rgba(5, 9, 22, 0) 66%),
    radial-gradient(circle at 50% 42%, #0b1230 0%, #080d24 46%, #040813 100%);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background: radial-gradient(circle at 50% 34%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0.2) 70%, rgba(0, 0, 0, 0.34) 100%);
  z-index: 2;
}

body::after {
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 84%, rgba(0, 0, 0, 0.22)),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 74%, rgba(0, 0, 0, 0.26));
  z-index: 3;
}

#warp {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  pointer-events: none;
}

.title-toggle {
  position: fixed;
  right: clamp(18px, 3vw, 40px);
  top: clamp(18px, 3vw, 40px);
  z-index: 5;
  border: 0;
  border-bottom: 1px solid rgba(220, 192, 131, 0.36);
  padding: 0 0 3px;
  background: transparent;
  color: rgba(220, 192, 131, 0.74);
  font-family: "Ubuntu Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.title-toggle:hover {
  color: rgba(247, 234, 209, 0.95);
  border-color: rgba(247, 234, 209, 0.64);
}

.page {
  position: relative;
  z-index: 4;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: clamp(20px, 4vw, 54px);
}

.hero {
  width: min(920px, 100%);
  place-self: center;
  text-align: center;
  transform: translateY(var(--hero-y));
  position: relative;
}

.title-wrap {
  position: relative;
  min-height: var(--title-min-h);
  display: grid;
  place-items: center;
  z-index: 6;
}

.title-line {
  position: relative;
  width: fit-content;
  max-width: 100%;
  min-height: var(--title-min-h);
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-areas: "left title right";
  align-items: end;
  justify-content: center;
  column-gap: var(--title-gap);
}

h1 {
  margin: 0;
  position: relative;
  z-index: 2;
  transform: none;
  font-family: "ForOneCN", "STKaiti", "Kaiti SC", "KaiTi", "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(78px, 12.4vw, 152px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0;
  color: rgba(232, 204, 155, 0.94);
  text-shadow:
    0 0 2px rgba(255, 246, 225, 0.68),
    0 0 10px rgba(239, 216, 174, 0.38),
    0 0 26px rgba(216, 178, 109, 0.26),
    0 0 54px rgba(176, 141, 82, 0.16);
  grid-area: title;
}

h1.title-en {
  font-family: "ForOneEN", "Snell Roundhand", "Segoe Script", "Lucida Handwriting", "Brush Script MT", "Times New Roman", serif;
  font-size: clamp(78px, 12.4vw, 152px);
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(232, 204, 155, 0.94);
  text-shadow:
    0 0 2px rgba(255, 246, 225, 0.56),
    0 0 10px rgba(239, 216, 174, 0.3),
    0 0 30px rgba(216, 178, 109, 0.18);
}

.line-stack {
  position: relative;
  margin: var(--motto-mt) auto 0;
  min-height: var(--motto-h);
  height: var(--motto-h);
  width: 100%;
  z-index: 4;
  display: block;
}

.line {
  margin: 0;
  position: absolute;
  left: 50%;
  width: fit-content;
  max-width: var(--line-w);
  transform: translateX(-50%);
  transform-origin: center;
  text-align: center;
  white-space: nowrap;
  line-height: 1.24;
  font-style: italic;
  font-family: "ForOneEN", "Snell Roundhand", "Segoe Script", "Lucida Handwriting", "Brush Script MT", "Times New Roman", serif;
  pointer-events: none;
  user-select: none;
}

.line-zh {
  top: 74px;
  z-index: 3;
  font-size: clamp(24px, 2.8vw, 34px);
  color: rgba(232, 204, 155, 0.94);
  background-image: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 0 14px rgba(244, 232, 211, 0.12), 0 0 34px rgba(219, 188, 127, 0.1);
  filter: blur(0);
  opacity: 1;
}

.line-ja {
  top: 52px;
  z-index: 2;
  font-size: clamp(16px, 1.75vw, 22px);
  color: rgba(232, 220, 198, 0.9);
  background-image: none;
  -webkit-text-fill-color: currentColor;
  filter: blur(0.65px);
  opacity: 1;
}

.line-zh,
.line-ja {
  font-family: "ForOneCN", "STKaiti", "Kaiti SC", "KaiTi", "Songti SC", "Noto Serif SC", serif;
}

.line-en {
  top: 28px;
  z-index: 1;
  font-size: clamp(16px, 1.75vw, 22px);
  color: rgba(210, 218, 236, 0.8);
  background-image: none;
  -webkit-text-fill-color: currentColor;
  filter: blur(1.35px);
  opacity: 1;
}

.line-stack.settled .line-en {
  opacity: 1;
}

.line-stack.settled .line-ja {
  opacity: 1;
}

.line-stack.settled .line-zh {
  opacity: 1;
}

.line.typing::after {
  content: "|";
  margin-left: 0.14em;
  color: rgba(242, 223, 184, 0.9);
  animation: caretBlink 0.9s steps(1) infinite;
}

.line.typing { transform: translateX(-50%) scale(0.88); }

@keyframes caretBlink {
  50% { opacity: 0; }
}

.concept {
  margin: 0;
  font-family: "ForOneCN", "STKaiti", "Kaiti SC", "KaiTi", "Noto Serif SC", serif;
  font-size: clamp(18px, 2.6vw, 32px);
  line-height: 1;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  color: rgba(232, 204, 155, 0.72);
  text-shadow:
    0 0 2px rgba(255, 246, 225, 0.34),
    0 0 12px rgba(216, 178, 109, 0.2);
}

h1.title-en ~ .seal-row .concept,
h1.title-en ~ .seal-row-ghost .concept {
  font-family: "ForOneEN", "Snell Roundhand", "Segoe Script", "Lucida Handwriting", "Brush Script MT", "Times New Roman", serif;
  letter-spacing: 0;
  text-indent: 0;
}

.seal-row {
  position: static;
  grid-area: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  white-space: nowrap;
  justify-self: start;
  margin-bottom: clamp(8px, 1vw, 12px);
  min-width: max-content;
  transform: none;
}

.seal-row-ghost {
  visibility: hidden;
  display: flex;
  grid-area: left;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  white-space: nowrap;
  justify-self: end;
}

.seal-time {
  margin: 0;
  color: rgba(232, 204, 155, 0.72);
  font-family: "ForOneEN", "Snell Roundhand", "Segoe Script", "Lucida Handwriting", "Brush Script MT", "Times New Roman", serif;
  font-size: clamp(6px, 0.72vw, 8px);
  text-align: right;
  transform: none;
  display: block;
  width: 100%;
}

h1:not(.title-en) ~ .seal-row .seal-time {
  transform: translateX(-4px);
}

h1.title-en ~ .seal-row .seal-time {
  transform: none;
}

h1.title-en ~ .seal-row .concept {
  font-size: clamp(15px, 2.2vw, 26px);
}

@media (max-width: 680px) {
  :root {
    --hero-y: 2vh;
    --title-min-h: clamp(84px, 12vw, 140px);
    --title-gap: 4px;
    --motto-mt: -2px;
    --motto-h: 98px;
  }
  h1 {
    font-size: clamp(62px, 20vw, 98px);
  }
  h1.title-en { font-size: clamp(52px, 16vw, 82px); }
  h1.title-en {
    font-family: "ForOneEN", "Georgia", "Times New Roman", "Noto Serif", serif;
  }
  .line-stack {
    min-height: var(--motto-h);
    height: var(--motto-h);
  }
  .line-zh { top: 58px; font-size: clamp(17px, 4.1vw, 23px); }
  .line-ja { top: 40px; font-size: clamp(13px, 2.9vw, 17px); }
  .line-en { top: 20px; font-size: clamp(13px, 2.9vw, 17px); }
  .seal-row {
    gap: 0;
    margin-bottom: 6px;
    transform: none;
  }
  .seal-row-ghost { gap: 1px; }
  .concept { font-size: clamp(12px, 3.8vw, 18px); }
  h1.title-en ~ .seal-row .concept,
  h1.title-en ~ .seal-row-ghost .concept {
    font-family: "ForOneEN", "Georgia", "Times New Roman", "Noto Serif", serif;
  }
  .seal-time {
    margin-bottom: 1px;
    font-size: clamp(6px, 1.5vw, 8px);
    transform: translateX(-3px);
    font-family: "ForOneEN", "Georgia", "Times New Roman", "Noto Serif", serif;
  }
  h1.title-en ~ .seal-row .seal-time { transform: none; }
  h1.title-en ~ .seal-row .concept { font-size: clamp(11px, 3.1vw, 16px); }
}
