:root {
  --bg-0: #0a0810;
  --bg-1: #120e1a;
  --bg-2: #1b1424;
  --gold: #d8b579;
  --gold-soft: #e9d3a3;
  --sage: #9db8a3;
  --rose: #cf9a86;
  --text: #f3ecdf;
  --text-dim: #b9aeb8;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --display: 'Cinzel', var(--serif);
  --sans: 'Poppins', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background: radial-gradient(ellipse 120% 90% at 50% 0%, var(--bg-2) 0%, var(--bg-1) 45%, var(--bg-0) 100%);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  cursor: default;
}

/* ---------- Starfield canvas ---------- */
#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Ambient watercolor glow blobs ---------- */
.glow-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform;
}

.blob-a {
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  top: -10%;
  left: -10%;
  background: radial-gradient(circle, var(--sage) 0%, transparent 70%);
  animation: driftA 26s ease-in-out infinite;
}

.blob-b {
  width: 50vw;
  height: 50vw;
  max-width: 680px;
  max-height: 680px;
  bottom: -15%;
  right: -12%;
  background: radial-gradient(circle, var(--rose) 0%, transparent 70%);
  animation: driftB 32s ease-in-out infinite;
}

.blob-c {
  width: 30vw;
  height: 30vw;
  max-width: 420px;
  max-height: 420px;
  top: 40%;
  left: 60%;
  background: radial-gradient(circle, var(--gold) 0%, transparent 72%);
  opacity: 0.18;
  animation: driftC 22s ease-in-out infinite;
}

@keyframes driftA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 5vh) scale(1.12); }
}
@keyframes driftB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vw, -6vh) scale(1.08); }
}
@keyframes driftC {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-45%, -55%) scale(1.2); }
}

/* ---------- Film grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- Cursor glow ---------- */
.cursor-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 181, 121, 0.09) 0%, transparent 70%);
  pointer-events: none;
  z-index: 2;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
  .cursor-glow.active { opacity: 1; }
}

/* ---------- Kanji watermark ---------- */
.kanji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif CJK JP', 'MS Mincho', var(--serif);
  font-weight: 300;
  font-size: min(60vw, 640px);
  line-height: 1;
  color: var(--gold);
  opacity: 0.035;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  animation: kanjiSpin 120s linear infinite;
}

@keyframes kanjiSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---------- Layout ---------- */
.stage {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw;
}

.content {
  max-width: 640px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Elements with a max-width need to stretch to the container's actual
   available width first (so text can wrap correctly on narrow screens),
   then get capped and re-centered by their own max-width + margin auto.
   Without this, `align-items: center` sizes them to max-content/max-width
   directly and they can overflow the viewport. */
.title,
.tagline,
.teaser,
.notify,
.notify-success,
.footnote {
  align-self: stretch;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.6rem;
}

/* ---------- Emblem ---------- */
.emblem-wrap {
  position: relative;
  width: 260px;
  height: 200px;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emblem {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(216, 181, 121, 0.25));
}

.emblem-halo {
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 181, 121, 0.22) 0%, rgba(159, 138, 168, 0.08) 45%, transparent 72%);
  z-index: 1;
  animation: pulse 4.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* ---------- Title ---------- */
.title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  letter-spacing: 0.05em;
  line-height: 1.15;
  background: linear-gradient(100deg, var(--gold-soft) 0%, var(--text) 35%, var(--gold) 55%, var(--text) 75%, var(--gold-soft) 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
  margin-bottom: 0.9rem;
}

@keyframes shimmer {
  to { background-position: 300% center; }
}

/* ---------- Tagline ---------- */
.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--text-dim);
  letter-spacing: 0.01em;
  margin-bottom: 1.8rem;
}

/* ---------- Divider ---------- */
.divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
  width: 100%;
  max-width: 220px;
}

.divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

.divider i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  flex-shrink: 0;
}

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 1px solid rgba(216, 181, 121, 0.35);
  background: rgba(216, 181, 121, 0.06);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 2.2rem;
  box-shadow: 0 0 24px rgba(216, 181, 121, 0.08);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(216, 181, 121, 0.6);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0% { box-shadow: 0 0 0 0 rgba(216, 181, 121, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(216, 181, 121, 0); }
  100% { box-shadow: 0 0 0 0 rgba(216, 181, 121, 0); }
}

/* ---------- Teaser ---------- */
.teaser {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  line-height: 1.75;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 2.6rem;
}

.teaser em {
  color: var(--gold-soft);
  font-style: italic;
}

/* ---------- Notify form ---------- */
.notify {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 0.9rem;
  transition: opacity 0.4s ease, transform 0.4s ease, height 0.4s ease;
}

.notify.hidden {
  opacity: 0;
  pointer-events: none;
  height: 0;
  margin: 0;
  transform: translateY(-6px);
  overflow: hidden;
}

.notify input {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 236, 223, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.notify input::placeholder {
  color: var(--text-dim);
  opacity: 0.6;
}

.notify input:focus {
  border-color: var(--gold);
  background: rgba(216, 181, 121, 0.06);
}

.notify button {
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(120deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: #1a140a;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.notify button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(216, 181, 121, 0.3);
}

.notify button:active {
  transform: translateY(0);
}

.notify-success {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--sage);
  opacity: 0;
  max-height: 0;
  transition: opacity 0.5s ease, margin 0.5s ease;
  margin-bottom: 0;
}

.notify-success.show {
  opacity: 1;
  max-height: 60px;
  margin-bottom: 1.4rem;
}

/* ---------- Footnote ---------- */
.footnote {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  opacity: 0.55;
  margin-top: 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .stage { padding: 10vh 6vw; }
  .notify { flex-direction: column; }
  .notify button { width: 100%; }
  .emblem-wrap { width: 210px; height: 165px; }
}

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