@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Orbitron:wght@400;700&family=Noto+Serif+JP:wght@300;600;900&display=swap');

:root {
  --bg: #0a0612;
  --bg-soft: #130c20;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f5f0ff;
  --text-muted: #9e93b3;
  --accent: #e23e3e;
  --accent-glow: rgba(226, 62, 62, 0.35);
  --accent2: #a66bff;
  --accent2-glow: rgba(166, 107, 255, 0.35);
  --gold: #d4af37;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Serif JP', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------- Stage lights ---------- */
.stage-lights {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.light {
  position: absolute;
  top: -10%;
  width: 80vw;
  height: 120vh;
  opacity: 0.12;
  filter: blur(60px);
  transform-origin: top center;
  animation: swing 8s ease-in-out infinite alternate;
}

.light--left {
  left: -20vw;
  background: linear-gradient(120deg, transparent 30%, var(--accent2) 70%);
  animation-delay: -2s;
}

.light--right {
  right: -20vw;
  background: linear-gradient(-120deg, transparent 30%, var(--accent) 70%);
  animation-delay: -4s;
}

.light--center {
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, transparent 80%);
  animation: sway 10s ease-in-out infinite alternate;
}

@keyframes swing {
  from { transform: rotate(-6deg) scaleY(1); }
  to { transform: rotate(6deg) scaleY(1.05); }
}

@keyframes sway {
  from { transform: translateX(-52%) rotate(-2deg); }
  to { transform: translateX(-48%) rotate(2deg); }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background: linear-gradient(to bottom, rgba(10, 6, 18, 0.95), transparent);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text);
  text-transform: uppercase;
  position: relative;
}

.nav__brand::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.nav__brand:hover::after {
  transform: scaleX(1);
}

.nav__menu {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav__menu a {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.nav__menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav__menu a:hover {
  color: var(--text);
}

.nav__menu a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(166, 107, 255, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(226, 62, 62, 0.08) 0%, transparent 50%),
    var(--bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 70%, var(--bg) 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 48px,
      rgba(255, 255, 255, 0.02) 49px,
      rgba(255, 255, 255, 0.02) 50px
    );
  pointer-events: none;
}

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

.hero__subtitle {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 0.4em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
  animation: fadeInDown 1s ease both;
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.hero__name {
  display: block;
  font-size: clamp(3.5rem, 12vw, 8.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.12em;
  background: linear-gradient(180deg, #fff 0%, var(--accent2) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px var(--accent-glow);
  animation: fadeInUp 1s ease both;
}

.hero__name:nth-child(2) {
  animation-delay: 0.15s;
}

.hero__tagline {
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  color: var(--text-muted);
  letter-spacing: 0.18em;
  margin-bottom: 48px;
  animation: fadeInUp 1s ease 0.3s both;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 16px 40px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.25em;
  color: var(--text);
  text-transform: uppercase;
  border: 1px solid var(--accent);
  background: linear-gradient(90deg, transparent, rgba(226, 62, 62, 0.15), transparent);
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease, box-shadow 0.4s ease;
  animation: fadeInUp 1s ease 0.45s both;
}

.hero__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
  z-index: -1;
}

.hero__cta:hover {
  color: #fff;
  box-shadow: 0 0 32px var(--accent-glow);
}

.hero__cta:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    radial-gradient(circle, rgba(226, 62, 62, 0.4) 1px, transparent 1px),
    radial-gradient(circle, rgba(166, 107, 255, 0.4) 1px, transparent 1px);
  background-size: 220px 220px, 320px 320px, 280px 280px;
  background-position: 0 0, 40px 80px, 120px 20px;
  opacity: 0.15;
  animation: particleDrift 40s linear infinite;
}

@keyframes particleDrift {
  from { background-position: 0 0, 40px 80px, 120px 20px; }
  to { background-position: 220px 220px, 360px 400px, 400px 300px; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 120px 24px;
}

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section__title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.section__lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin-bottom: 64px;
  letter-spacing: 0.05em;
}

/* ---------- Profile ---------- */
.section--profile {
  background: linear-gradient(to bottom, var(--bg), var(--bg-soft));
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.profile-card {
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 2px;
  backdrop-filter: blur(4px);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.profile-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.profile-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.profile-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.profile-card--accent {
  border-color: rgba(226, 62, 62, 0.25);
  box-shadow: inset 0 0 40px rgba(226, 62, 62, 0.06);
}

.profile-card--accent:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 0 50px rgba(226, 62, 62, 0.1);
}

/* ---------- Spell Cards ---------- */
.section--spellcards {
  background:
    radial-gradient(circle at 20% 30%, rgba(166, 107, 255, 0.08) 0%, transparent 35%),
    var(--bg);
}

.spell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.spell-card {
  position: relative;
  padding: 36px 32px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 4px solid var(--accent);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.spell-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  transform: translate(40%, -40%);
  transition: transform 0.5s ease;
}

.spell-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4), 0 0 40px var(--accent-glow);
}

.spell-card:hover::before {
  transform: translate(20%, -20%);
}

.spell-card__number {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
}

.spell-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.spell-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- Gallery ---------- */
.section--gallery {
  background: linear-gradient(to bottom, var(--bg), var(--bg-soft));
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 20px;
}

.gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: var(--panel);
}

.gallery-item__visual {
  position: absolute;
  inset: 0;
  transition: transform 0.6s ease, filter 0.4s ease;
}

.gallery-item--large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item__visual--sky {
  background:
    radial-gradient(circle at 30% 30%, rgba(226, 62, 62, 0.35), transparent 50%),
    linear-gradient(160deg, #1a0f2e 0%, #0a0612 100%);
}

.gallery-item__visual--sword {
  background:
    linear-gradient(90deg, transparent 45%, rgba(212, 175, 55, 0.25) 50%, transparent 55%),
    linear-gradient(180deg, #0f0a18 0%, #1e1028 100%);
}

.gallery-item__visual--peach {
  background:
    radial-gradient(circle at 50% 55%, rgba(226, 62, 62, 0.45), transparent 40%),
    radial-gradient(circle at 50% 45%, rgba(212, 175, 55, 0.2), transparent 45%),
    #120a1c;
}

.gallery-item__visual--stage {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.12), transparent 50%),
    repeating-linear-gradient(0deg, transparent 0, transparent 30px, rgba(255, 255, 255, 0.03) 31px),
    #0a0612;
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 20px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--text);
  text-transform: uppercase;
  background: linear-gradient(to top, rgba(10, 6, 18, 0.95), transparent);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-item__visual {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.gallery-item:hover figcaption {
  transform: translateY(0);
}

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 80px 24px 48px;
  text-align: center;
  background: var(--bg);
  border-top: 1px solid var(--panel-border);
}

.site-footer__brand {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

.site-footer__note,
.site-footer__copy {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.site-footer__copy {
  margin-top: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

  .gallery-item--large,
  .gallery-item--wide {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 24px 0;
    background: rgba(10, 6, 18, 0.98);
    border-bottom: 1px solid var(--panel-border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.4s ease;
  }

  .nav__menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__menu li {
    width: 100%;
    text-align: center;
  }

  .nav__menu a {
    display: block;
    padding: 16px 0;
    font-size: 1rem;
  }

  .section {
    padding: 80px 20px;
  }

  .hero {
    padding: 100px 20px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item--large,
  .gallery-item--wide {
    grid-column: span 1;
  }
}
