/* ═══════════════════════════════════════════
   UZUMAKI NARUTO — 写輪眼 / 渦巻
   ═══════════════════════════════════════════ */

:root {
  --ink: #050506;
  --ink-2: #0b0b0d;
  --bone: #e8e4dc;
  --smoke: #8a8580;
  --blood: #c0121f;
  --blood-hot: #ff2b2b;
  --ember: #ff6a3d;
  --serif: 'Shippori Mincho', 'Yu Mincho', serif;
  --gothic: 'Zen Kaku Gothic New', sans-serif;
  --display: 'Cinzel', serif;
  --mono: 'Space Grotesk', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  scroll-behavior: smooth
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--gothic);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ═══════════ PRELOADER ═══════════ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--ink);
  display: grid;
  place-items: center;
  transition: opacity .9s var(--ease), visibility .9s;
}

.loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none
}

.loader__inner {
  text-align: center;
  width: min(320px, 80vw)
}

.loader__glyph {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--blood-hot);
  margin-bottom: 2rem;
  text-shadow: 0 0 40px rgba(255, 43, 43, .35);
  animation: glyphPulse 2s ease-in-out infinite;
}

@keyframes glyphPulse {

  0%,
  100% {
    opacity: .85;
    text-shadow: 0 0 30px rgba(255, 43, 43, .25)
  }

  50% {
    opacity: 1;
    text-shadow: 0 0 70px rgba(255, 43, 43, .75)
  }
}

.loader__bar {
  height: 2px;
  background: rgba(232, 228, 220, .12);
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
}

.loader__bar span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--blood), var(--blood-hot));
  box-shadow: 0 0 16px var(--blood-hot);
  transition: width .15s linear;
}

.loader__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .25em;
  color: var(--smoke);
}

/* ═══════════ AMBIENT FX ═══════════ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 91;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(5, 5, 6, .85) 100%);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 92;
  pointer-events: none;
  opacity: .06;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, .25) 50%);
  background-size: 100% 4px;
}

/* ═══════════ AMATERASU / CHAKRA FLAME ═══════════ */
.amaterasu-bed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  z-index: 80;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(5, 5, 6, .95) 0%, transparent 100%);
}

.amaterasu {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  width: 100%;
  z-index: 81;
  pointer-events: none;
  opacity: .85;
  mix-blend-mode: screen;
}

/* ═══════════ STORM / LIGHTNING ═══════════ */
.storm {
  position: fixed;
  inset: 0;
  z-index: 88;
  pointer-events: none;
}

.storm__flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  transition: opacity .08s ease-out;
  mix-blend-mode: overlay;
}

.storm__bolt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ═══════════ CURSOR ═══════════ */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  z-index: 9999;
  pointer-events: none;
}

.cursor span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(255, 43, 43, .75);
  box-shadow: 0 0 18px rgba(255, 43, 43, .6);
  transition: transform .15s ease-out;
}

/* ═══════════ FIXED CHROME ═══════════ */
.chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  pointer-events: none;
}

.chrome>* {
  pointer-events: auto
}

.chrome__mark {
  display: flex;
  align-items: center;
  gap: .9rem;
  font-family: var(--display);
  font-size: .85rem;
  letter-spacing: .3em;
  font-weight: 700;
  color: var(--bone);
  text-shadow: 0 2px 22px rgba(0, 0, 0, .95);
}

.uchiwa {
  width: 26px;
  height: 26px;
  color: var(--blood-hot)
}

.uzumaki-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 43, 43, 0.75));
  transition: transform 0.4s var(--ease);
}

.chrome__mark:hover .uzumaki-logo {
  transform: rotate(360deg);
}

.chrome__nav {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.5rem)
}

.chrome__nav a {
  color: var(--bone);
  text-decoration: none;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .3em;
  opacity: .7;
  transition: opacity .3s var(--ease), color .3s var(--ease);
  position: relative;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .95);
}

.chrome__nav a:hover {
  opacity: 1;
  color: var(--blood-hot)
}

.chrome__sound {
  background: none;
  border: 1px solid rgba(232, 228, 220, .2);
  color: var(--bone);
  padding: .4rem .8rem;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .25em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .6rem;
  transition: border-color .3s, background .3s;
}

.chrome__sound:hover {
  border-color: var(--blood-hot)
}

.chrome__sound-jp {
  font-family: var(--serif);
  color: var(--blood-hot)
}

.rail {
  position: fixed;
  top: 50%;
  z-index: 95;
  pointer-events: none;
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .35em;
  color: rgba(232, 228, 220, .4);
  white-space: nowrap;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .95);
}

.rail--left {
  left: 2rem;
  transform: rotate(-90deg) translateY(-50%);
  transform-origin: left center
}

.rail--right {
  right: 2rem;
  transform: rotate(90deg) translateY(-50%);
  transform-origin: right center
}

.hint {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  opacity: .65;
  transition: opacity .6s;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .95);
}

.hint__jp {
  font-family: var(--serif);
  font-size: .8rem
}

.hint__line {
  width: 1px;
  height: 24px;
  background: linear-gradient(180deg, var(--blood-hot), transparent)
}

.hint__en {
  font-family: var(--mono);
  font-size: .55rem;
  letter-spacing: .3em
}

.sticky-badge {
  position: fixed;
  right: 3rem;
  bottom: 3rem;
  z-index: 95;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.sticky-badge__jp {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--blood-hot);
  text-shadow: 0 0 24px rgba(255, 43, 43, .5);
}

.sticky-badge__en {
  font-family: var(--display);
  font-size: .55rem;
  letter-spacing: .35em;
  color: var(--smoke);
}

/* ═══════════ ACT I — SCRUB SECTIONS ═══════════ */
.scrub {
  height: 700vh;
  position: relative
}

.scrub__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.scrub__sticky canvas:not(.feathers) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: contrast(1.06) saturate(1.05);
}

.scrub__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 44%, rgba(255, 43, 43, .32), transparent 46%);
  mix-blend-mode: screen;
}

.feathers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2
}

.scrub__sticky::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .42) 30%, transparent 56%),
    linear-gradient(0deg, rgba(0, 0, 0, .72) 0%, transparent 42%),
    linear-gradient(180deg, rgba(0, 0, 0, .6) 0%, transparent 22%);
}

.phase {
  position: absolute;
  left: clamp(2rem, 7vw, 7rem);
  top: 50%;
  transform: translateY(calc(-50% + var(--y, 0px)));
  opacity: 0;
  pointer-events: none;
  width: calc(100% - clamp(4rem, 14vw, 14rem));
  max-width: min(38ch, 45vw);
  z-index: 3;
  text-shadow:
    0 4px 20px #000,
    0 0 35px #000,
    0 0 60px rgba(0, 0, 0, 0.98),
    -2px 2px 10px #000,
    2px -2px 10px #000;
}

.phase__jp {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 5.5rem);
  line-height: 1.08;
  letter-spacing: .06em;
  word-break: break-word;
  overflow-wrap: break-word;
  text-shadow:
    0 6px 28px #000,
    0 0 40px #000,
    0 0 70px #000,
    -3px 3px 12px #000,
    3px -3px 12px #000;
}

.phase__en {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(.66rem, 1.05vw, .82rem);
  letter-spacing: .32em;
  margin: .8rem 0 .8rem;
  color: var(--blood-hot);
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
  text-shadow:
    0 2px 14px #000,
    0 0 24px #000,
    0 0 45px rgba(255, 43, 43, .6);
}

.phase__sub {
  font-family: var(--serif);
  font-size: clamp(.76rem, 1.05vw, .92rem);
  line-height: 1.9;
  color: rgba(245, 242, 235, .92);
  word-break: break-word;
  text-shadow:
    0 2px 16px #000,
    0 0 28px #000,
    0 0 45px #000,
    -1px 1px 6px #000;
}

.phase--right {
  left: auto;
  right: clamp(2rem, 7vw, 7rem);
  text-align: right;
  margin-left: auto;
}

/* title lockup */
.titleblock {
  position: absolute;
  left: 50%;
  bottom: 19vh;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 3;
  text-shadow:
    0 6px 30px #000,
    0 0 50px #000,
    0 0 80px rgba(0, 0, 0, .98);
}

.titleblock__kicker {
  font-family: var(--serif);
  font-size: .7rem;
  letter-spacing: .6em;
  color: rgba(232, 228, 220, .6);
  margin-bottom: 1rem;
}

.titleblock__jp {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 6.4rem);
  line-height: 1;
  letter-spacing: .1em;
}

.titleblock__jp span {
  color: var(--blood-hot);
  text-shadow: 0 0 44px rgba(255, 43, 43, .55);
}

.titleblock__en {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(.6rem, 1.2vw, .8rem);
  letter-spacing: .42em;
  margin-top: 1rem;
  color: rgba(232, 228, 220, .7);
}

/* ═══════════ 1000vh IMAGE GHOST REVEAL SECTIONS ═══════════ */
.image-sec {
  height: 400vh;
  position: relative;
}

.image-sec__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #050506;
  --rx: 50%;
  --ry: 50%;
  --r: 340px;
}

/* Faint dark ambient base image */
.image-sec__bg-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: contrast(1.1) saturate(0.8) brightness(0.18);
  opacity: 0.85;
}

/* Bright ghost spotlight reveal following mouse cursor */
.image-sec__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: contrast(1.18) saturate(1.2) brightness(1.05);
  -webkit-mask-image: radial-gradient(circle var(--r, 340px) at var(--rx, 50%) var(--ry, 50%), #000 0%, rgba(0, 0, 0, .75) 40%, rgba(0, 0, 0, .2) 68%, transparent 85%);
  mask-image: radial-gradient(circle var(--r, 340px) at var(--rx, 50%) var(--ry, 50%), #000 0%, rgba(0, 0, 0, .75) 40%, rgba(0, 0, 0, .2) 68%, transparent 85%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  z-index: 1;
}

.image-sec__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 20%, rgba(5, 5, 6, 0.85) 90%);
  pointer-events: none;
}

.image-sec__quote {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
  width: min(92%, 58ch);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.image-sec__jp {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2rem, 4.8vw, 4.5rem);
  line-height: 1.25;
  margin-bottom: 1.2rem;
  letter-spacing: .06em;
  color: var(--bone);
  text-shadow:
    0 4px 24px #000,
    0 0 45px #000,
    0 0 80px #000,
    -2px 2px 10px #000;
}

.image-sec__en {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(.68rem, 1.1vw, .92rem);
  letter-spacing: .25em;
  color: var(--blood-hot);
  margin-bottom: 1rem;
  text-shadow: 0 2px 16px #000, 0 0 30px #000;
}

.image-sec__id {
  font-family: var(--serif);
  font-size: clamp(.85rem, 1.15vw, 1.08rem);
  line-height: 1.8;
  color: rgba(245, 242, 235, 0.92);
  font-style: italic;
  text-shadow: 0 2px 18px #000, 0 0 35px #000;
}

/* ═══════════ HAMBURGER MENU BUTTON ═══════════ */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 102;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--bone);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s;
}
.menu-toggle.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  background: var(--blood-hot);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  background: var(--blood-hot);
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width:820px) {
  /* Hide UZUMAKI text on mobile */
  .chrome__mark span {
    display: none;
  }

  /* Show hamburger button on mobile */
  .menu-toggle {
    display: flex;
  }

  /* Mobile Slide-out Navigation Drawer */
  .chrome__nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 78vw;
    max-width: 320px;
    background: rgba(8, 8, 10, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(232, 228, 220, 0.1);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.2rem;
    padding: 3rem 2rem;
    z-index: 101;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
  }

  .chrome__nav.open {
    transform: translateX(0);
  }

  .chrome__nav a {
    font-size: 0.95rem;
    letter-spacing: 0.35em;
  }

  .scrub {
    height: 520vh;
  }

  .phase {
    left: 50%;
    top: auto;
    bottom: 18vh;
    transform: translate(-50%, var(--y, 0px));
    text-align: center;
    max-width: 86vw;
    width: auto;
  }

  .phase--right {
    left: 50%;
    right: auto;
    margin-left: 0;
    text-align: center;
  }

  .titleblock {
    bottom: 8vh;
  }
}