:root {
  --bg: #ffffff;
  --logo: #2b3442;
  --rule: #9ca3af;
  --rule-opacity: 0.6;
  --tagline: #4b5563;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.frontier {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}

.inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 35vh;
}

.logo {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--logo);
  text-align: center;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.logo.visible {
  opacity: 1;
  transform: translateY(0);
}

.rule {
  width: clamp(120px, 16vw, 220px);
  height: 1px;
  background: var(--rule);
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 1s ease 0.2s;
}

.rule.visible {
  opacity: var(--rule-opacity);
}

.tagline {
  position: relative;
  height: 1.8rem;
  width: clamp(280px, 44vw, 640px);
  margin-top: 0.9rem;
  opacity: 0;
  transition: opacity 1.2s ease 0.3s;
}

.tagline.visible {
  opacity: 1;
}

.phrase {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  letter-spacing: 0.12em;
  color: var(--tagline);
  margin: 0;
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  transition: opacity 0.8s ease;
}

.phrase.next {
  opacity: 0;
}

.phrase.chinese {
  font-family: 'Lora', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-style: normal;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  letter-spacing: 0.25em;
}

.image-wrap {
  position: relative;
  width: 100%;
  margin-top: 1.5rem;
}

.bg {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transition: opacity 2s ease;
}

.bg.visible {
  opacity: 1;
}

.fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0)    0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 1)    100%
  );
  pointer-events: none;
}

.site-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(1rem, 3.5vh, 2.25rem);
  z-index: 3;
  padding: 0 1.5rem;
  text-align: center;
  font-family: 'Lora', Georgia, serif;
  font-style: normal;
  color: var(--tagline);
  opacity: 0;
  transition: opacity 1.2s ease 0.4s;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(820px, 94vw);
  height: 260%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 60% at 50% 50%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.82) 42%,
    rgba(255, 255, 255, 0)    76%
  );
}

.site-footer.visible {
  opacity: 1;
}

.site-footer .desc {
  margin: 0 auto;
  max-width: 56ch;
  font-size: clamp(0.72rem, 1.15vw, 0.84rem);
  line-height: 1.55;
  letter-spacing: 0.03em;
}

.site-footer .legal {
  margin: 0.4rem 0 0;
  font-size: clamp(0.68rem, 1vw, 0.76rem);
  letter-spacing: 0.05em;
  color: #6b7280;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .logo, .rule, .tagline, .bg, .site-footer {
    opacity: 1 !important;
    transform: none !important;
  }
}
