/* Pluckmoon — midnight moon, mist rose, soft gold */
:root {
  --bg-deep: #070b1a;
  --bg-mid: #12102e;
  --bg-indigo: #1a1440;
  --moon: #f7f0e0;
  --moon-dim: #e8dcc8;
  --rose: #e8a0b0;
  --peach: #f3c9c2;
  --ice: #9db4ff;
  --ink: #f7f0e0;
  --muted: rgba(247, 240, 224, 0.62);
  --line: rgba(247, 240, 224, 0.12);
  --glow: rgba(247, 240, 224, 0.35);
  --font-display: "Cormorant Garamond", "Noto Serif SC", "Songti SC", serif;
  --font-cn: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-body: "DM Sans", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --space: clamp(1.25rem, 4vw, 2.5rem);
  --max: 40rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 90% 60% at 70% 15%, rgba(157, 180, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 20% 80%, rgba(232, 160, 176, 0.12), transparent 50%),
    linear-gradient(165deg, var(--bg-deep) 0%, var(--bg-indigo) 45%, var(--bg-mid) 100%);
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.app {
  position: relative;
  min-height: 100vh;
}

/* —— Gate —— */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--space);
  background: rgba(7, 11, 26, 0.72);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.gate[hidden] { display: none; }

.gate__panel {
  text-align: center;
  max-width: 22rem;
  width: 100%;
}

.gate__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 0 18px rgba(247, 240, 224, 0.35));
}

.gate__brand {
  margin: 0 0 0.75rem;
  font-family: var(--font-cn);
  font-size: clamp(2.4rem, 8vw, 3.2rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--moon);
}

.gate__hint {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.gate__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gate__input {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--moon);
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font: inherit;
  text-align: center;
  letter-spacing: 0.08em;
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.gate__input:focus {
  border-color: rgba(232, 160, 176, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 160, 176, 0.15);
}

.gate__err {
  margin: 1rem 0 0;
  color: var(--rose);
  font-size: 0.88rem;
}

/* —— Buttons —— */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  transition: transform 0.2s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn:active { transform: scale(0.97); }

.btn--moon {
  background: var(--moon);
  color: var(--bg-deep);
}

.btn--moon:hover {
  background: #fff;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--space);
  padding-bottom: clamp(3.5rem, 10vh, 5.5rem);
  overflow: hidden;
}

.hero__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(1.5rem, 6vh, 3.5rem);
}

.hero.is-settled .hero__stage {
  justify-content: center;
  padding-top: 0.25rem;
  gap: clamp(0.65rem, 2.5vh, 1.35rem);
}

.hero.is-settled .hero__copy {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    max-height 0.55s var(--ease),
    opacity 0.45s var(--ease),
    transform 0.45s var(--ease);
}

.hero.is-given .hero__copy .hero__tag,
.hero.is-given .hero__copy .btn--moon {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.moon {
  pointer-events: auto;
  position: relative;
  width: min(34vw, 168px);
  height: min(34vw, 168px);
  margin: 0 auto;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 5;
  flex-shrink: 0;
  will-change: transform, opacity;
}

.moon__disc {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fffaf0 0%, var(--moon) 35%, var(--moon-dim) 70%, #cfc0a8 100%);
  box-shadow:
    0 0 40px rgba(247, 240, 224, 0.45),
    0 0 100px rgba(157, 180, 255, 0.25),
    inset -18px -12px 36px rgba(26, 20, 64, 0.25);
  animation: moonBreath 6s ease-in-out infinite;
}

.moon__glow {
  position: absolute;
  inset: -28%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 240, 224, 0.28), transparent 68%);
  pointer-events: none;
  animation: glowPulse 5s ease-in-out infinite;
}

.moon.is-flying {
  position: fixed;
  margin: 0;
  z-index: 40;
}

.moon.is-flying .moon__disc,
.moon.is-flying .moon__glow {
  animation: none;
}

.moon.is-settled {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  height: 0;
  width: 0;
  margin: 0;
  overflow: hidden;
}

.pair {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 1.5rem);
  width: min(92vw, 420px);
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
}

.hero.is-given .pair {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pair figure {
  margin: 0;
  position: relative;
  text-align: center;
  flex: 1 1 0;
  min-width: 0;
}

.pair img {
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(112px, 32vw, 200px);
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

.pair__him img { height: clamp(100px, 28vw, 176px); }
.pair__her img { height: clamp(118px, 34vw, 210px); }

.pair figcaption {
  margin-top: 0.4rem;
  font-family: var(--font-cn);
  font-size: clamp(0.7rem, 2.5vw, 0.8rem);
  letter-spacing: 0.2em;
  color: var(--muted);
}

.pair__moon-nest {
  position: absolute;
  left: 52%;
  top: 2%;
  width: clamp(36px, 11vw, 56px);
  aspect-ratio: 1;
  transform: translate(-50%, -70%) scale(0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero.is-settled .pair__moon-nest {
  opacity: 1;
  transform: translate(-50%, -55%) scale(1);
}

.pair__moon-disc {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fffaf0 0%, var(--moon) 40%, var(--moon-dim) 75%, #cfc0a8 100%);
  box-shadow:
    0 0 14px rgba(247, 240, 224, 0.75),
    0 0 28px rgba(157, 180, 255, 0.4);
}

.moon-plucked {
  position: relative;
  text-align: center;
  width: min(88vw, 22rem);
  padding: 0.35rem 0.75rem 0;
  z-index: 4;
  opacity: 0;
  flex-shrink: 0;
}

.moon-plucked.is-show {
  animation: quoteRise 1.05s var(--ease) both;
}

.moon-plucked__text {
  margin: 0;
  font-family: var(--font-cn);
  font-size: clamp(1.05rem, 4.2vw, 1.35rem);
  font-weight: 600;
  color: var(--moon);
  letter-spacing: 0.08em;
  line-height: 1.75;
  text-shadow: 0 0 24px rgba(7, 11, 26, 0.85);
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 28rem;
  margin-top: auto;
  padding-top: 1rem;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.hero__mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  display: block;
  border-radius: 8px;
  filter: drop-shadow(0 0 12px rgba(247, 240, 224, 0.25));
}

.hero__to {
  margin: 0 0 0.35rem;
  color: var(--rose);
  font-size: 0.92rem;
  letter-spacing: 0.18em;
}

.hero__brand {
  margin: 0;
  font-family: var(--font-cn);
  font-size: clamp(3.2rem, 14vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.14em;
  color: var(--moon);
  text-shadow: 0 0 48px rgba(247, 240, 224, 0.25);
}

.hero__tag {
  margin: 0.85rem 0 1.75rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 18em;
}

.hero__scroll {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  text-decoration: none;
  font-size: 1.25rem;
  animation: bob 2.4s ease-in-out infinite;
  z-index: 6;
}

.hero.is-settled .hero__scroll { opacity: 0.9; }

/* —— Sections —— */
.section {
  padding: clamp(4rem, 12vh, 7rem) var(--space);
  max-width: calc(var(--max) + 2 * var(--space));
  margin: 0 auto;
}

.section__head {
  margin-bottom: 2.5rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ice);
}

.section__title {
  margin: 0;
  font-family: var(--font-cn);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--moon);
}

/* Short verses — hairline rhythm + line stagger */
.chapter {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.chapter:last-child {
  border-bottom: 1px solid var(--line);
}

.chapter__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-cn);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--rose);
}

.chapter p {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-family: var(--font-cn);
  font-size: 1.08rem;
  letter-spacing: 0.04em;
  line-height: 1.75;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease),
    filter 0.75s var(--ease);
  filter: blur(4px);
}

.chapter p:last-child { margin-bottom: 0; }

.chapter.is-visible p {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.chapter.is-visible p:nth-child(2) { transition-delay: 0.08s; }
.chapter.is-visible p:nth-child(3) { transition-delay: 0.16s; }
.chapter.is-visible p:nth-child(4) { transition-delay: 0.24s; }
.chapter.is-visible p:nth-child(5) { transition-delay: 0.32s; }

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}

.timeline__item {
  position: relative;
  padding: 0 0 2rem 1.5rem;
  opacity: 0;
  transform: translateX(-16px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

.timeline__item.is-visible {
  opacity: 1;
  transform: none;
}

.timeline__item:nth-child(1).is-visible { transition-delay: 0.02s; }
.timeline__item:nth-child(2).is-visible { transition-delay: 0.08s; }
.timeline__item:nth-child(3).is-visible { transition-delay: 0.14s; }
.timeline__item:nth-child(4).is-visible { transition-delay: 0.2s; }
.timeline__item:nth-child(5).is-visible { transition-delay: 0.26s; }
.timeline__item:nth-child(6).is-visible { transition-delay: 0.32s; }

.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.45rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 12px rgba(232, 160, 176, 0.6);
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
}

.timeline__item.is-visible::before {
  transform: scale(1.25);
  box-shadow: 0 0 16px rgba(247, 240, 224, 0.55), 0 0 12px rgba(232, 160, 176, 0.7);
}

.timeline__date {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ice);
  margin-bottom: 0.25rem;
}

.timeline__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-cn);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--moon);
}

.timeline__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Tokens — symbolic row, not card grid chrome */
.tokens {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
}

.token {
  flex: 1 1 9rem;
  min-width: 8rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease);
}

.token.is-visible {
  opacity: 1;
  transform: none;
}

.token.is-visible .token__name {
  animation: softShimmer 2.8s ease-in-out 0.4s both;
}

.token__name {
  margin: 0;
  font-family: var(--font-cn);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--peach);
  letter-spacing: 0.06em;
}

.token__note {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Vows */
.vows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vow {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.vow.is-visible {
  opacity: 1;
  transform: none;
}

.vow:nth-child(1).is-visible { transition-delay: 0.05s; }
.vow:nth-child(2).is-visible { transition-delay: 0.12s; }
.vow:nth-child(3).is-visible { transition-delay: 0.19s; }
.vow:nth-child(4).is-visible { transition-delay: 0.26s; }

.vow:last-child { border-bottom: 1px solid var(--line); }

.vow__mark {
  flex-shrink: 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ice);
  min-width: 3.5rem;
}

.vow__text {
  margin: 0;
  font-family: var(--font-cn);
  font-size: 1.08rem;
  color: var(--moon);
  letter-spacing: 0.04em;
}

.vow--future .vow__text {
  color: var(--rose);
}

/* Coda */
.coda {
  text-align: center;
  padding-bottom: clamp(5rem, 14vh, 8rem);
}

.coda .section__head {
  margin-left: auto;
  margin-right: auto;
}

.coda__quote {
  margin: 0 auto 1.5rem;
  max-width: 22em;
  font-family: var(--font-cn);
  font-size: clamp(1.2rem, 3.5vw, 1.45rem);
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0.06em;
  color: var(--moon);
  border: none;
  quotes: none;
}

.coda__soft {
  margin: 0 auto;
  max-width: 24em;
  color: var(--muted);
  font-size: 0.98rem;
}

.site-foot {
  padding: 2.5rem var(--space) 3.5rem;
  text-align: center;
  border-top: 1px solid var(--line);
}

.site-foot__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
  opacity: 0.85;
}

.site-foot p {
  margin: 0;
  font-family: var(--font-cn);
  letter-spacing: 0.12em;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-foot__en {
  margin-top: 0.5rem !important;
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.2em;
  font-size: 0.85rem !important;
  color: rgba(247, 240, 224, 0.35);
}

/* Reveal + night-sky motion */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.95s var(--ease),
    transform 0.95s var(--ease),
    filter 0.95s var(--ease);
  filter: blur(6px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.section__head.reveal.is-visible .section__title {
  animation: titleGlow 1.4s var(--ease) both;
}

.reveal-in {
  animation: fadeUpCenter 0.8s var(--ease) both;
}

.gate .reveal-in {
  animation: fadeUpCenter 0.8s var(--ease) both;
}

@keyframes fadeUpCenter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes quoteRise {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes titleGlow {
  from { letter-spacing: 0.22em; opacity: 0.55; }
  to { letter-spacing: 0.08em; opacity: 1; }
}

@keyframes softShimmer {
  0%, 100% { text-shadow: none; }
  50% { text-shadow: 0 0 18px rgba(247, 240, 224, 0.35); }
}

@keyframes moonBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero {
    padding-bottom: max(4.75rem, env(safe-area-inset-bottom, 0px) + 3.5rem);
  }
  .hero__stage { padding-top: 1.25rem; }
  .hero.is-settled .hero__stage {
    gap: 0.85rem;
    padding-top: 0;
  }
  .hero__copy { max-width: 100%; }
  .hero__brand { font-size: clamp(2.6rem, 13vw, 3.4rem); }
  .hero__tag { margin-bottom: 1.25rem; font-size: 0.95rem; }
  .moon {
    width: min(38vw, 128px);
    height: min(38vw, 128px);
  }
  .pair {
    width: min(94vw, 360px);
    gap: 0.35rem;
  }
  .pair__him img { height: clamp(96px, 30vw, 140px); }
  .pair__her img { height: clamp(110px, 36vw, 160px); }
  .pair__moon-nest {
    width: clamp(32px, 12vw, 48px);
    top: 0%;
  }
  .moon-plucked {
    width: min(92vw, 20rem);
    padding-top: 0.15rem;
  }
  .moon-plucked__text {
    font-size: clamp(0.98rem, 4.3vw, 1.15rem);
    letter-spacing: 0.05em;
    line-height: 1.7;
  }
  .section { padding: 3.25rem var(--space); }
  .tokens { gap: 1rem 1.25rem; }
  .hero__scroll { bottom: 0.75rem; }
}

@media (max-width: 380px) {
  .pair__him img { height: 92px; }
  .pair__her img { height: 108px; }
  .moon-plucked__text { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .moon__disc, .moon__glow, .hero__scroll { animation: none; }
  .reveal,
  .chapter p,
  .timeline__item,
  .token,
  .vow {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .moon-plucked.is-show,
  .section__head.reveal.is-visible .section__title,
  .token.is-visible .token__name {
    animation: none;
  }
}
