:root {
  --ink: #16100a;
  --ink-soft: #2a1d10;
  --parchment: #f3e6ce;
  --parchment-dim: #d8c6a4;
  --gold: #d8a94e;
  --gold-bright: #f5d78e;
  --gold-deep: #a9762f;
  --line: rgba(216, 169, 78, 0.28);
  --font-jp: "Noto Serif JP", serif;
  --font-en: "Cinzel", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-jp);
  line-height: 1.9;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

.nowrap { white-space: nowrap; }

/* ---------- grain overlay ---------- */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- sparkle layer ---------- */
.sparkle-layer {
  position: absolute;
  inset: 0;
  top: 0;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  color: var(--gold-bright);
  opacity: 0;
  animation: twinkle var(--d) ease-in-out infinite;
  animation-delay: var(--delay);
  pointer-events: none;
}

.sparkle svg { width: 100%; height: 100%; display: block; }

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50% { opacity: var(--peak, 0.85); transform: scale(1) rotate(45deg); }
}

/* ---------- SATURN logo lockup ---------- */
.saturn-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--gold-bright);
}

.saturn-mark__ring {
  width: 40px;
  height: 16px;
  color: var(--gold-bright);
  filter: drop-shadow(0 0 8px rgba(245, 199, 102, 0.5));
}

.saturn-mark__ring--spin {
  animation: ringspin 14s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes ringspin {
  0% { transform: rotate(0deg) scaleY(1); }
  50% { transform: rotate(180deg) scaleY(0.82); }
  100% { transform: rotate(360deg) scaleY(1); }
}

.saturn-mark__word {
  font-family: var(--font-en);
  letter-spacing: 0.28em;
  font-size: 0.8rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.saturn-mark--nav { gap: 4px; }
.saturn-mark--nav .saturn-mark__ring { width: 26px; height: 11px; }

.saturn-mark--hero,
.saturn-mark--closing { gap: 14px; margin-bottom: 8px; }
.saturn-mark--hero .saturn-mark__ring,
.saturn-mark--closing .saturn-mark__ring { width: 64px; height: 26px; }

/* ---------- shimmer text ---------- */
.shimmer {
  background: linear-gradient(100deg, #a9762f 20%, #fff3d6 42%, #f0c766 52%, #a9762f 80%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmermove 6s ease-in-out infinite;
}

@keyframes shimmermove {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}

/* ---------- nav ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 20px 0;
  pointer-events: none;
}

/* ---------- BGM toggle ---------- */
.bgm-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(22, 16, 10, 0.78);
  backdrop-filter: blur(4px);
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.bgm-toggle:hover {
  transform: scale(1.08);
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(245, 199, 102, 0.25);
}

.bgm-toggle__icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  position: absolute;
}

.bgm-toggle__icon--pause { opacity: 0; }
.bgm-toggle.is-playing .bgm-toggle__icon--play { opacity: 0; }
.bgm-toggle.is-playing .bgm-toggle__icon--pause { opacity: 1; }

.bgm-toggle__bars {
  position: absolute;
  bottom: 9px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 10px;
  opacity: 0;
}

.bgm-toggle.is-playing .bgm-toggle__bars { opacity: 1; }
.bgm-toggle.is-playing .bgm-toggle__icon--pause { opacity: 0; bottom: -30px; }

.bgm-toggle__bars i {
  width: 2.5px;
  background: var(--gold-bright);
  border-radius: 2px;
  animation: bgmbar 0.9s ease-in-out infinite;
}
.bgm-toggle__bars i:nth-child(1) { height: 5px; animation-delay: -0.6s; }
.bgm-toggle__bars i:nth-child(2) { height: 10px; animation-delay: -0.3s; }
.bgm-toggle__bars i:nth-child(3) { height: 7px; animation-delay: 0s; }

@keyframes bgmbar {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.yt-player-host {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  bottom: 0;
  right: 0;
}

/* ---------- shared section layout ---------- */
.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
}

.section-kicker {
  font-family: var(--font-en);
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  color: var(--gold);
  text-align: center;
  margin: 0 0 18px;
}

.section-kicker--light { color: var(--gold-bright); }
.section-kicker--sm { font-size: 0.68rem; margin-top: 64px; }

.section-title {
  font-size: clamp(1.5rem, 3.6vw, 2.3rem);
  text-align: center;
  color: var(--parchment);
  margin: 0 0 56px;
  font-weight: 600;
  text-wrap: balance;
}

.section-title--light { color: var(--gold-bright); }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--stagger, 0) * 90ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .saturn-mark__ring--spin, .shimmer, .sparkle { animation: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero__bg {
  position: absolute;
  inset: -4%;
  background-size: cover;
  background-position: center 70%;
  will-change: transform;
}

.hero__glow {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(245, 199, 102, 0.32) 0%, rgba(245, 199, 102, 0.08) 45%, transparent 72%);
  animation: glowbreathe 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowbreathe {
  0%, 100% { opacity: 0.65; transform: translateX(-50%) scale(0.96); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,7,3,0.55) 0%, rgba(10,7,3,0.22) 32%, rgba(10,7,3,0.55) 78%, rgba(10,7,3,0.96) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__eyebrow {
  font-family: var(--font-en);
  letter-spacing: 0.4em;
  font-size: 0.8rem;
  color: var(--gold-bright);
  margin: 0 0 20px;
}

.hero__title-en {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: clamp(3rem, 11vw, 6.4rem);
  letter-spacing: 0.14em;
  filter: drop-shadow(0 0 26px rgba(245, 199, 102, 0.35));
  line-height: 1;
}

.hero__title-ja {
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: clamp(1.3rem, 3.4vw, 2rem);
  color: var(--parchment);
  letter-spacing: 0.06em;
  text-wrap: balance;
  margin: 0 0 30px;
}

.hero__catch {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  margin: 0 0 22px;
  text-shadow: 0 0 30px rgba(245, 199, 102, 0.3);
}

.hero__subtitle {
  font-family: var(--font-en);
  font-style: italic;
  font-size: clamp(0.72rem, 1.5vw, 0.86rem);
  color: var(--parchment-dim);
  letter-spacing: 0.03em;
  line-height: 1.8;
  margin: 0 0 36px;
  opacity: 0.8;
}

.hero__specs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.hero__specs li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  background: rgba(20, 14, 7, 0.35);
  backdrop-filter: blur(2px);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.hero__specs li:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}

.hero__scrollcue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero__scrollcue span {
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, transparent, var(--gold-bright));
  animation: scrollpulse 2s ease-in-out infinite;
}

.hero__scrollcue p {
  font-family: var(--font-en);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin: 0;
}

@keyframes scrollpulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ---------- prologue ---------- */
.prologue {
  padding: 130px 0 120px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(169, 118, 47, 0.14), transparent 60%),
    var(--ink);
}

.prologue__text {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.02rem;
  color: var(--parchment-dim);
  letter-spacing: 0.02em;
}

.prologue__text p { margin: 0 0 1.5em; }

.prologue__quote {
  border-left: 2px solid var(--gold-deep);
  padding-left: 1.3em;
  margin: 2em 0 !important;
  color: var(--gold-bright) !important;
  font-style: italic;
}

/* ---------- world / glossary ---------- */
.world {
  position: relative;
  padding: 120px 0 130px;
  background: var(--ink-soft);
  overflow: hidden;
}

.world__divider {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  will-change: transform;
}

.world::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(22,16,10,0.72) 16%, rgba(22,16,10,0.86) 84%, var(--ink) 100%);
}

.world .section-inner { position: relative; z-index: 2; }

.world__greeting {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 84px;
}

.world__greeting-line {
  color: var(--parchment-dim);
  font-size: 0.92rem;
  margin: 0 0 26px;
}

.world__callwrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
}

.world__call {
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  position: relative;
  display: inline-block;
}

.world__call::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width 1s ease 0.4s;
}

.world__greeting.is-visible .world__call::after { width: 70%; }

.world__call-arrow {
  color: var(--gold-deep);
  font-size: 1.2rem;
  display: inline-block;
  animation: archift 2.4s ease-in-out infinite;
}

@keyframes archift {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(6px); opacity: 1; }
}

.world__greeting-note {
  font-size: 0.82rem;
  color: var(--parchment-dim);
  opacity: 0.75;
  margin: 0;
}

.term-list {
  max-width: 620px;
  margin: 28px auto 0;
  display: grid;
  gap: 22px;
}

.term-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  transition: border-color 0.3s ease;
}

.term-list__item:hover { border-color: var(--gold); }

.term-list__item dt {
  color: var(--parchment);
  font-size: 1rem;
  font-weight: 600;
}

.term-list__item dt span {
  font-size: 0.72rem;
  color: var(--parchment-dim);
  opacity: 0.7;
  margin-left: 8px;
  font-weight: 400;
}

.term-list__item dd {
  margin: 0;
  color: var(--gold);
  font-size: 0.9rem;
}

/* ---------- characters ---------- */
.characters {
  padding: 130px 0;
  background: var(--ink);
  position: relative;
  z-index: 2;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.char-card {
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, border-color 0.5s ease;
  transform-style: preserve-3d;
  perspective: 800px;
}

.char-card:hover {
  box-shadow: 0 22px 50px rgba(0,0,0,0.5);
  border-color: var(--gold);
}

.char-card__stage {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(245, 199, 102, 0.35) 0%, rgba(169, 118, 47, 0.18) 42%, transparent 72%),
    linear-gradient(180deg, #4a3315 0%, #2a1d10 65%, #16100a 100%);
}

.char-card__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -40px 50px -20px rgba(0,0,0,0.7);
  pointer-events: none;
}

.char-card__silhouette {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 92%;
  width: auto;
  max-width: 88%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,0.55));
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.char-card:hover .char-card__silhouette {
  transform: translateX(-50%) scale(1.05) translateY(-4px);
}

.char-card__body {
  padding: 22px 20px 26px;
}

.char-card__en {
  font-family: var(--font-en);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  color: var(--gold-deep);
  margin: 0 0 6px;
}

.char-card__name {
  font-size: 1.3rem;
  margin: 0 0 12px;
  color: var(--gold-bright);
  font-weight: 600;
}

.char-card__line {
  font-size: 0.86rem;
  color: var(--parchment);
  margin: 0 0 14px;
  line-height: 1.7;
}

.char-card__desc {
  font-size: 0.78rem;
  color: var(--parchment-dim);
  line-height: 1.85;
  margin: 0;
  opacity: 0.9;
}

/* ---------- CTA / play ---------- */
.cta {
  padding: 120px 0 130px;
  background: var(--ink-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.cta__venue {
  color: var(--parchment-dim);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  margin: -30px 0 44px;
}

.cta__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.cta__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 34px;
  border: 1px solid var(--gold-deep);
  border-radius: 2px;
  color: var(--gold-bright);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  overflow: hidden;
  transition: color 0.4s ease, border-color 0.4s ease, transform 0.3s ease;
}

.cta__btn span { position: relative; z-index: 1; }

.cta__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--gold-deep), var(--gold-bright), var(--gold-deep));
  background-size: 220% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta__btn:hover {
  color: var(--ink);
  border-color: var(--gold-bright);
  transform: translateY(-3px);
}

.cta__btn:hover::before { transform: scaleX(1); }

.cta__btn--primary {
  background: rgba(245, 199, 102, 0.08);
  border-color: var(--gold-bright);
}

/* ---------- closing ---------- */
.closing {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.closing__bg { background-position: 50% 30%; }

.closing__inner {
  position: relative;
  z-index: 2;
}

.closing__lead {
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--parchment);
  margin: 0 0 14px;
  text-wrap: balance;
}

.closing__sub {
  font-size: 0.9rem;
  color: var(--parchment-dim);
  letter-spacing: 0.05em;
  margin: 0 0 46px;
}

.saturn-mark--closing .hero__title-en {
  font-size: clamp(1.8rem, 5vw, 3rem);
}

/* ---------- footer ---------- */
.site-footer {
  padding: 34px 20px;
  text-align: center;
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--parchment-dim);
  opacity: 0.6;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .char-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .char-grid { grid-template-columns: 1fr; }
  .section-inner { padding: 0 20px; }
  .prologue { padding: 100px 0 90px; }
  .world { padding: 90px 0 100px; }
  .characters { padding: 90px 0; }
  .bgm-toggle { right: 14px; bottom: 14px; width: 46px; height: 46px; }
}
