/* =========================================================
   DEMON AKUMA — El Grimorio
   Negro tinta + rojo sangre. Rituales japoneses × interfaz de VRChat
   ========================================================= */
:root {
  --ink: #060404;
  --ink-2: #0e0807;
  --paper: #110908;
  --red: #ff2116;
  --blood: #b30000;
  --deep: #4a0000;
  --bone: #efe4dc;
  --ash: #8f807a;
  --line: rgba(255, 33, 22, .22);

  --f-goth: "Grenze Gotisch", "UnifrakturCook", serif;
  --f-jp: "Dela Gothic One", "Yu Gothic", sans-serif;
  --f-body: "Zen Kaku Gothic New", system-ui, sans-serif;
  --f-sign: "Mrs Saint Delafield", cursive;
  --f-mincho: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", "MS Mincho", serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(1.25rem, 5vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-width: none; }
body { background: var(--ink); color: var(--bone); font-family: var(--f-body); line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--red); color: var(--ink); }
::-webkit-scrollbar { width: 0; height: 0; }
main { overflow-x: clip; }

.kicker { display: inline-block; font-weight: 700; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--red); }
.kicker::before { content: "✕ "; }

/* ================= CAPAS GLOBALES ================= */
#fx { position: fixed; inset: 0; z-index: 83; pointer-events: none; mix-blend-mode: screen; }
.vignette { position: fixed; inset: 0; z-index: 84; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .7)); }
.grain {
  position: fixed; inset: -50%; z-index: 85; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain .7s steps(5) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0) } 20% { transform: translate(-4%, 3%) } 40% { transform: translate(3%, -2%) } 60% { transform: translate(-2%, -4%) } 80% { transform: translate(4%, 2%) } }
.flash { position: fixed; inset: 0; z-index: 95; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, #fff 0, #ff4a2a 18%, rgba(179, 0, 0, .85) 45%, rgba(0, 0, 0, .9) 100%); }
.flash.go { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { opacity: 0 } 8% { opacity: 1 } 100% { opacity: 0 } }

/* cursor */
.cur, .cur-ring { position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none; opacity: 0; }
.cur { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.cur i::before, .cur i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 2px; background: var(--red); box-shadow: 0 0 8px var(--red); transition: transform .35s var(--ease); }
.cur i::before { transform: translate(-50%, -50%) rotate(45deg); }
.cur i::after { transform: translate(-50%, -50%) rotate(-45deg); }
.cur.hover i::before { transform: translate(-50%, -50%) rotate(0); }
.cur.hover i::after { transform: translate(-50%, -50%) rotate(90deg); }
.cur-ring { width: 44px; height: 44px; margin: -22px 0 0 -22px; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), opacity .3s; }
.cur-ring::before { content: ""; position: absolute; inset: 0; border: 1px dashed rgba(255, 33, 22, .55); border-radius: 50%; animation: spin 9s linear infinite; }
.cur-ring.hover { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
.cur-ring.hover::before { border-color: var(--red); animation-duration: 2.5s; }
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor * { cursor: none !important; }
  body.has-cursor .cur, body.has-cursor .cur-ring { opacity: 1; }
}

/* incienso (progreso) */
.incense { position: fixed; right: 26px; top: 16vh; bottom: 10vh; width: 30px; z-index: 65; pointer-events: none; }
.incense-stick { position: absolute; left: 50%; width: 3px; transform: translateX(-50%); top: 0; bottom: 12px; background: linear-gradient(#7a2c18, #3e170d 70%, #5a3a1a 70%, #5a3a1a); border-radius: 2px; }
.incense-ember { position: absolute; top: -4px; left: 50%; width: 7px; height: 8px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(#fff3c0, #ff7a1a 40%, #ff2116 75%); box-shadow: 0 0 10px #ff4a1a, 0 0 22px var(--red); animation: ember 1.3s ease-in-out infinite alternate; }
@keyframes ember { to { box-shadow: 0 0 4px #ff4a1a, 0 0 12px var(--red); transform: translateX(-50%) scale(.85); } }
.incense-bowl { position: absolute; bottom: 0; left: 50%; width: 30px; height: 13px; transform: translateX(-50%); border-radius: 0 0 15px 15px; background: linear-gradient(#2a0c09, #120605); border-top: 2px solid var(--red); }
.rail { position: fixed; left: 24px; top: 50%; transform: translateY(-50%); z-index: 65; writing-mode: vertical-rl; display: flex; gap: .9rem; font-size: .66rem; letter-spacing: .28em; text-transform: uppercase; color: rgba(239, 228, 220, .35); pointer-events: none; }
.rail b { color: var(--red); font-weight: 400; }
.rail #railChapter { color: rgba(239, 228, 220, .7); }

/* ================= BARRA SUPERIOR ================= */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 70; display: flex; align-items: center; justify-content: space-between; padding: 1.1rem var(--pad); transition: background .4s, padding .4s; }
.top.scrolled { background: linear-gradient(rgba(6, 4, 4, .92), rgba(6, 4, 4, 0)); padding-top: .7rem; padding-bottom: 1.4rem; }
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--f-goth); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.brand img { width: 42px; filter: drop-shadow(0 0 8px rgba(255, 33, 22, .5)); transition: transform .7s var(--ease); }
.brand:hover img { transform: rotate(-14deg) scale(1.1); }
.brand em { font-style: normal; color: var(--red); }
.top-actions { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.4rem); }
.sound-btn { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); transition: color .3s; }
.sound-btn:hover, .sound-btn.on { color: var(--bone); }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 4px; background: var(--ash); transition: background .3s; }
.sound-btn.on .eq i { background: var(--red); animation: eq .7s ease-in-out infinite alternate; }
.sound-btn.on .eq i:nth-child(2) { animation-delay: -.2s; } .sound-btn.on .eq i:nth-child(3) { animation-delay: -.45s; } .sound-btn.on .eq i:nth-child(4) { animation-delay: -.1s; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }
.menu-btn { display: flex; align-items: center; gap: .7rem; text-align: left; }
.menu-btn svg { width: 42px; height: 42px; fill: none; stroke: var(--red); stroke-width: 1.5; transition: transform .8s var(--ease); }
.menu-btn:hover svg { transform: rotate(135deg); }
.menu-btn span { font-family: var(--f-goth); font-weight: 900; font-size: 1.35rem; line-height: 1; }
.menu-btn small { display: block; font-family: var(--f-body); font-weight: 700; font-size: .56rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ash); margin-top: .25rem; }

/* ================= MENÚ RADIAL ================= */
.radial { width: 100%; height: 100%; overflow: visible; display: block; }
.radial .seg { cursor: pointer; outline: none; }
.radial .seg path { fill: rgba(14, 8, 7, .88); stroke: rgba(255, 33, 22, .38); stroke-width: 1.5; transition: fill .25s, stroke .25s; }
.radial .seg .k { font-family: var(--f-jp); font-size: 30px; fill: var(--red); text-anchor: middle; transition: fill .25s; pointer-events: none; }
.radial .seg .l { font-family: var(--f-body); font-weight: 700; font-size: 13px; letter-spacing: 1.5px; fill: var(--bone); text-anchor: middle; text-transform: uppercase; pointer-events: none; transition: fill .25s; }
.radial .seg.hot path, .radial .seg:focus-visible path { fill: rgba(255, 33, 22, .22); stroke: var(--red); }
.radial .seg.on path { fill: var(--red); stroke: var(--red); }
.radial .seg.on .k, .radial .seg.on .l { fill: var(--ink); }
@media (hover: hover) { .radial-mini .radial .seg:hover path { fill: rgba(255, 33, 22, .22); stroke: var(--red); } .radial-mini .radial .seg.on:hover path { fill: #ff4a3a; } }
.radial .rim { pointer-events: none; fill: none; stroke: rgba(255, 33, 22, .25); stroke-width: 1; stroke-dasharray: 2 6; }
.radial .pointer { pointer-events: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; opacity: 0; transition: opacity .2s; filter: drop-shadow(0 0 4px var(--red)); }
.radial .pointer.show { opacity: 1; }
.radial-center { position: absolute; left: 50%; top: 50%; width: 36%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #1f0c0a, #060404 75%); border: 1.5px solid var(--red); box-shadow: 0 0 40px rgba(255, 33, 22, .3), inset 0 0 20px rgba(255, 33, 22, .2); text-align: center; pointer-events: none; }
.radial-center.mini { pointer-events: auto; transition: transform .3s var(--ease); }
.radial-center.mini:hover { transform: translate(-50%, -50%) scale(1.05); }
.rc-kanji { font-family: var(--f-jp); font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1; color: var(--red); text-shadow: 0 0 16px rgba(255, 33, 22, .6); }
.rc-label { font-weight: 700; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; margin-top: .4rem; padding: 0 .8rem; line-height: 1.3; }

.radial-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(6, 4, 4, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.radial-overlay.open { opacity: 1; pointer-events: auto; }
.radial-wrap { position: absolute; left: 50%; top: 50%; width: min(460px, 92vw); aspect-ratio: 1; transform: translate(-50%, -50%) scale(.55) rotate(-40deg); transition: transform .55s var(--ease); }
.radial-overlay.open .radial-wrap { transform: translate(-50%, -50%) scale(1) rotate(0); }
.radial-hint { position: absolute; left: 0; right: 0; bottom: 2rem; text-align: center; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ash); padding: 0 1rem; }
.radial-hint kbd { font-family: inherit; border: 1px solid var(--line); padding: .1rem .4rem; color: var(--bone); }

/* ================= HERO / INVOCACIÓN ================= */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 6rem var(--pad) 5rem; overflow-x: clip; isolation: isolate; --charge: 0; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 50%, rgba(179, 0, 0, calc(.18 + var(--charge) * .45)), transparent 55%); }
.hero-title { position: absolute; inset: 0; pointer-events: none; font-weight: 900; }
.w-demon, .w-akuma { position: absolute; font-family: var(--f-goth); font-weight: 900; font-size: clamp(5rem, 16vw, 15.5rem); line-height: .8; letter-spacing: -.01em; }
.w-demon { top: 11vh; left: var(--pad); color: var(--bone); animation: wordIn 1.6s var(--ease) .2s backwards; }
.w-akuma { bottom: 9vh; right: var(--pad); color: transparent; -webkit-text-stroke: 2px var(--red); text-shadow: 0 0 50px rgba(255, 33, 22, .35); animation: wordIn 1.6s var(--ease) .45s backwards; }
.hero.summoned .w-akuma { animation: akumaFill 1.2s var(--ease) forwards; }
@keyframes akumaFill { from { color: transparent; } to { color: var(--red); text-shadow: 0 0 60px rgba(255, 33, 22, .6); } }
@keyframes wordIn { from { opacity: 0; transform: translateY(35%) skewY(6deg); filter: blur(14px); } }
.hero-vkanji { position: absolute; top: 12vh; right: calc(var(--pad) + .5rem); writing-mode: vertical-rl; font-family: var(--f-jp); font-size: clamp(1.4rem, 2.4vw, 2.2rem); letter-spacing: .35em; color: var(--red); opacity: .85; text-shadow: 0 0 20px rgba(255, 33, 22, .5); animation: wordIn 1.6s var(--ease) .7s backwards; }

.sigil { position: relative; z-index: 2; width: min(74vh, 80vw); aspect-ratio: 1; }
.sigil svg { width: 100%; height: 100%; overflow: visible; }
.sigil .draw { fill: none; stroke: var(--red); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s var(--ease) calc(.4s + var(--i) * .2s) forwards; }
.sigil .sig-outer, .sigil .sig-inner { filter: drop-shadow(0 0 calc(2px + var(--charge) * 10px) rgba(255, 33, 22, .8)); }
.sigil .draw.thin { stroke-width: .8; }
.sigil .draw.star { stroke-width: 1.2; }
.sigil .draw.dashed { stroke-dasharray: .003 .012; stroke-dashoffset: 0; opacity: 0; animation: fadeIn 1s ease calc(.4s + var(--i) * .2s) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
.ring-text { fill: var(--red); font-family: var(--f-body); font-weight: 700; font-size: 15px; letter-spacing: 5px; opacity: 0; animation: fadeIn 1.5s ease 1.6s forwards; }
.vseal circle { fill: #0b0606; stroke: var(--red); stroke-width: 1.4; }
.vseal text { fill: var(--red); font-family: var(--f-jp); font-size: 19px; text-anchor: middle; dominant-baseline: central; }
.vseal { opacity: 0; animation: fadeIn .8s ease forwards; }
.core-glow { transform-box: fill-box; transform-origin: center; transform: scale(calc(1 + var(--charge) * .6)); opacity: calc(.45 + var(--charge) * .55); }
.charge-track { fill: none; stroke: rgba(255, 33, 22, .14); stroke-width: 3; transition: opacity .6s; }
.charge-ring { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--charge)); transform-box: fill-box; transform-origin: center; transform: rotate(-90deg); filter: drop-shadow(0 0 6px var(--red)); transition: opacity .6s; }
.hero.summoned .charge-ring, .hero.summoned .charge-track { opacity: 0; }

.sigil-core { position: absolute; left: 50%; top: 50%; width: 27%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; outline: none; -webkit-tap-highlight-color: transparent; }
.sigil-core:focus-visible { box-shadow: 0 0 0 2px var(--red); }
.core-eye { position: relative; width: 62%; aspect-ratio: 2.1; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, #ff6a3a 0, #e01208 35%, #6a0000 75%, #200000); box-shadow: 0 0 30px rgba(255, 33, 22, .8), inset 0 0 12px rgba(0, 0, 0, .6); animation: blinkEye 5s infinite; transition: transform .3s, opacity .5s; transform: scale(calc(1 + var(--charge) * .35)); }
.core-eye::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11%; height: 86%; border-radius: 50%; background: #050000; transform: translate(calc(-50% + var(--ex, 0) * 1px), calc(-50% + var(--ey, 0) * 1px)) scaleX(calc(1 - var(--charge) * .6)); box-shadow: 0 0 6px #000; }
@keyframes blinkEye { 0%, 46%, 50%, 100% { clip-path: ellipse(50% 50% at 50% 50%); } 48% { clip-path: ellipse(50% 4% at 50% 50%); } }
.sigil-logo { position: absolute; left: 50%; top: 50%; width: 210%; max-width: none; transform: translate(-50%, -50%) scale(.1); opacity: 0; pointer-events: none; filter: drop-shadow(0 0 30px rgba(255, 33, 22, .7)); }
.hero.summoned .core-eye { opacity: 0; transform: scale(0); }
.hero.summoned .sigil-logo { animation: logoBirth 1.2s var(--ease) forwards, logoFloat 6s ease-in-out 1.2s infinite; }
@keyframes logoBirth { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.1) rotate(-20deg); } 55% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(3deg); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes logoFloat { 0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -53%) scale(1.02); } }
.shock { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--red); transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none; box-shadow: 0 0 40px var(--red), inset 0 0 40px var(--red); }
.hero.boom .shock { animation: shock 1.1s var(--ease); }
@keyframes shock { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.2); border-width: 10px; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(5.5); border-width: 1px; } }
.hero.quake { animation: quake .6s linear; }
@keyframes quake { 10% { transform: translate(-8px, 4px) } 20% { transform: translate(7px, -6px) } 30% { transform: translate(-6px, -3px) } 40% { transform: translate(5px, 6px) } 50% { transform: translate(-4px, 2px) } 60% { transform: translate(3px, -3px) } 75% { transform: translate(-2px, 1px) } 100% { transform: none } }

.hold-hint { position: absolute; left: 50%; top: calc(50% + min(15vh, 16vw)); transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: .6rem; padding: .45rem .95rem; border-radius: 99px; background: rgba(6, 4, 4, .78); border: 1px solid var(--line); font-weight: 700; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); white-space: nowrap; pointer-events: none; transition: color .4s, opacity .8s; }
.hold-hint.gone { opacity: 0; }
.hh-icon { width: 14px; height: 14px; flex: 0 0 14px; border-radius: 50%; border: 1.5px solid var(--red); position: relative; }
.hh-icon::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--red); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.4); opacity: .4; } }
.hold-hint.nudge { color: var(--bone); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(-50%) translateY(-4px); text-shadow: 0 0 14px var(--red); } }
.hero.summoned .hold-hint { color: var(--red); animation: none; }

.hero-copy { position: absolute; left: var(--pad); bottom: 4.5rem; z-index: 3; width: min(22rem, 30vw); animation: wordIn 1.6s var(--ease) .9s backwards; }
.hero-lead { margin-top: .7rem; font-size: 1.02rem; color: rgba(239, 228, 220, .82); }
.hero-ctas { display: flex; align-items: center; gap: 2rem; margin-top: 1.4rem; }
.seal-btn { position: relative; width: 112px; height: 112px; flex: 0 0 112px; display: grid; place-items: center; }
.seal-btn svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 16s linear infinite; overflow: visible; }
.seal-btn text { fill: var(--bone); font-family: var(--f-body); font-weight: 700; font-size: 11px; letter-spacing: 3.4px; }
.seal-btn b { width: 60px; height: 60px; display: grid; place-items: center; background: var(--red); color: var(--ink); font-family: var(--f-jp); font-weight: 400; font-size: 1.7rem; border-radius: 10px; transform: rotate(-8deg); box-shadow: 0 6px 0 #5a0000, 0 0 30px rgba(255, 33, 22, .5); transition: transform .3s var(--ease), box-shadow .3s; }
.seal-btn:hover b { transform: rotate(0) translateY(4px); box-shadow: 0 2px 0 #5a0000, 0 0 50px rgba(255, 33, 22, .8); }
.seal-btn:active b { transform: translateY(6px) scale(.95); box-shadow: 0 0 0 #5a0000; }
@keyframes spin { to { transform: rotate(360deg); } }
.ink-link { position: relative; font-family: var(--f-goth); font-weight: 700; font-size: 1.7rem; line-height: 1; padding-bottom: .5rem; transition: color .3s; }
.ink-link svg { position: absolute; left: -4px; bottom: -4px; width: calc(100% + 8px); height: 12px; overflow: visible; }
.ink-link path { fill: none; stroke: var(--red); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 220; stroke-dashoffset: 0; opacity: .6; }
.ink-link:hover { color: var(--red); }
.ink-link:hover path { opacity: 1; animation: brushDraw .7s var(--ease); }
@keyframes brushDraw { from { stroke-dashoffset: 220; } to { stroke-dashoffset: 0; } }

/* goteo de sangre */
.drips { position: absolute; left: 0; right: 0; bottom: 0; height: 0; z-index: 4; pointer-events: none; }
.drips::before { content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 3px; background: var(--red); box-shadow: 0 0 18px var(--red); }
.drips i { position: absolute; top: -1px; width: var(--w); height: var(--h); background: var(--red); border-radius: 0 0 999px 999px; transform-origin: top; animation: dripGrow var(--d) ease-in-out infinite alternate; box-shadow: 0 0 10px rgba(255, 33, 22, .5); }
.drips i::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: calc(var(--w) * 1.25); aspect-ratio: .8; transform: translateX(-50%); background: var(--red); border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; animation: dropFall calc(var(--d) * 1.4) ease-in infinite; animation-delay: var(--dl); opacity: 0; }
@keyframes dripGrow { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes dropFall { 0%, 60% { opacity: 0; transform: translate(-50%, 0); } 62% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 160px) scaleY(1.3); } }

/* ================= SECCIONES ================= */
.sec { position: relative; padding: clamp(7rem, 13vw, 11rem) var(--pad); }
.chapter { position: relative; margin-bottom: clamp(3rem, 6vw, 5rem); max-width: 64rem; }
.chapter-num { display: block; font-family: var(--f-goth); font-weight: 700; font-size: 1.2rem; color: var(--red); margin-bottom: .2rem; }
.chapter-title { position: relative; z-index: 1; font-family: var(--f-goth); font-weight: 900; font-size: clamp(3.6rem, 9vw, 8rem); line-height: .88; color: var(--bone); }
.chapter-kanji { position: absolute; z-index: 0; top: -3.2rem; left: min(52vw, 36rem); font-family: var(--f-jp); font-size: clamp(7rem, 17vw, 15rem); line-height: 1; color: rgba(179, 0, 0, .2); pointer-events: none; }
.brush { display: block; width: min(24rem, 70vw); height: 18px; margin-top: .8rem; overflow: visible; }
.brush path { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 420; stroke-dashoffset: 420; }
.chapter.in .brush path { animation: brushIn 1.4s var(--ease) .35s forwards; }
@keyframes brushIn { to { stroke-dashoffset: 0; } }
.chapter-desc { position: relative; z-index: 1; margin-top: 1.3rem; max-width: 34rem; color: var(--ash); font-size: 1.05rem; }

.reveal { opacity: 0; }
.reveal.in { opacity: 1; animation: inkIn 1.15s var(--ease) var(--d, 0s) backwards; }
@keyframes inkIn { from { opacity: 0; transform: translateY(36px); clip-path: inset(-50% -50% 100% -50%); } to { opacity: 1; transform: none; clip-path: inset(-50% -50% -50% -50%); } }

/* ================= I · EL DEMONIO ================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.stage { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1 / 1.08; margin: 0 auto; }
.stage-figure { position: absolute; left: 12%; right: 12%; top: 6%; aspect-ratio: 799 / 800; z-index: 2; animation: bob 4.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(1deg); } }
.fig { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: filter .5s, opacity .3s; }
.fig.main { filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .6)); }
.fig.g1, .fig.g2, .fig.pix { opacity: 0; pointer-events: none; }
.fig.pix { image-rendering: pixelated; }
.eye-glow { position: absolute; width: 17%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #fff 0 6%, rgba(255, 60, 40, .95) 12%, rgba(255, 0, 0, .45) 34%, transparent 66%); mix-blend-mode: screen; opacity: 0; transition: opacity .4s; pointer-events: none; }
.eye-glow::after { content: ""; position: absolute; left: -90%; right: -90%; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, rgba(255, 60, 40, .9), transparent); }
.eye-glow.l { left: 37%; top: 53.5%; } .eye-glow.r { left: 61.5%; top: 53.5%; }
.stage.fx-eyes .eye-glow { opacity: 1; animation: eyePulse 1.6s ease-in-out infinite; }
@keyframes eyePulse { 50% { transform: translate(-50%, -50%) scale(1.25); } }
.stage.fx-shadow .fig.main, .stage.fx-shadow .fig.pix { filter: brightness(0) drop-shadow(0 0 1px #ff2116) drop-shadow(0 0 2px #ff2116) drop-shadow(0 0 16px #ff2116); }
.stage.fx-quest .fig.main { opacity: 0; }
.stage.fx-quest .fig.pix { opacity: 1; }
.stage.fx-glitch .fig.g1 { opacity: .85; filter: sepia(1) saturate(9) hue-rotate(-40deg) brightness(1.1); mix-blend-mode: screen; animation: glA 1.1s steps(1) infinite; }
.stage.fx-glitch .fig.g2 { opacity: .7; filter: grayscale(1) brightness(2.2); mix-blend-mode: screen; animation: glB 1.1s steps(1) infinite; }
.stage.fx-glitch .fig.main, .stage.fx-glitch .fig.pix { animation: glMain 1.1s steps(1) infinite; }
@keyframes glA { 0% { clip-path: inset(10% 0 70% 0); transform: translate(-10px, 0); } 20% { clip-path: inset(55% 0 20% 0); transform: translate(8px, 0); } 40% { clip-path: inset(30% 0 50% 0); transform: translate(-5px, 0); } 60% { clip-path: inset(80% 0 5% 0); transform: translate(12px, 0); } 80% { clip-path: inset(0 0 90% 0); transform: translate(-7px, 0); } }
@keyframes glB { 0% { clip-path: inset(60% 0 25% 0); transform: translate(9px, 0); } 25% { clip-path: inset(15% 0 75% 0); transform: translate(-8px, 0); } 50% { clip-path: inset(40% 0 45% 0); transform: translate(6px, 0); } 75% { clip-path: inset(88% 0 2% 0); transform: translate(-10px, 0); } }
@keyframes glMain { 0%, 100% { transform: none; } 30% { transform: translate(-3px, 1px) skewX(-3deg); } 31% { transform: none; } 70% { transform: translate(4px, 0); } 71% { transform: none; } }
.stage-aura { position: absolute; left: 12%; right: 12%; top: 8%; bottom: 16%; z-index: 1; opacity: 0; transition: opacity .6s; pointer-events: none; }
.stage-aura i { position: absolute; bottom: 4%; width: 34%; height: 80%; border-radius: 50% 50% 30% 30% / 70% 70% 30% 30%; background: radial-gradient(ellipse at 50% 100%, #ff5a1a 0, #ff2116 30%, rgba(179, 0, 0, .6) 55%, transparent 72%); filter: blur(16px); mix-blend-mode: screen; transform-origin: 50% 100%; animation: flame 1.3s ease-in-out infinite alternate; }
.stage-aura i:nth-child(1) { left: 2%; animation-delay: -.3s; height: 66%; }
.stage-aura i:nth-child(2) { left: 18%; animation-delay: -.8s; height: 88%; }
.stage-aura i:nth-child(3) { left: 33%; animation-delay: -.1s; height: 100%; }
.stage-aura i:nth-child(4) { left: 48%; animation-delay: -.6s; height: 86%; }
.stage-aura i:nth-child(5) { left: 64%; animation-delay: -1s; height: 64%; }
@keyframes flame { from { transform: scaleY(.85) skewX(-4deg); opacity: .75; } to { transform: scaleY(1.08) skewX(5deg); opacity: 1; } }
.stage.fx-aura .stage-aura { opacity: 1; }
.stage-halo { position: absolute; width: 40%; left: 30%; top: -5%; z-index: 3; overflow: visible; opacity: 0; transform: perspective(500px) rotateX(68deg) scale(.6); transition: opacity .5s, transform .7s var(--ease); pointer-events: none; }
.stage-halo circle { fill: none; stroke: var(--red); stroke-width: 3; filter: drop-shadow(0 0 6px var(--red)); }
.stage-halo circle.thin { stroke-width: 1; }
.stage-halo #haloSpikes { animation: spin 6s linear infinite; transform-origin: 0 0; }
.stage-halo polygon { fill: var(--red); }
.stage.fx-halo .stage-halo { opacity: 1; transform: perspective(500px) rotateX(68deg) scale(1); }
.pedestal { position: absolute; left: 14%; right: 14%; bottom: 7%; height: 16%; z-index: 0; }
.pedestal i { position: absolute; inset: 0; border-radius: 50%; }
.pedestal i:nth-child(1) { border: 2px solid var(--red); background: radial-gradient(ellipse, rgba(255, 33, 22, .35), rgba(255, 33, 22, .05) 60%, transparent 70%); box-shadow: 0 0 40px rgba(255, 33, 22, .4), inset 0 0 30px rgba(255, 33, 22, .3); }
.pedestal i:nth-child(2) { border: 1px solid var(--red); animation: ripple 2.6s ease-out infinite; }
@keyframes ripple { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.stage-tag { position: absolute; left: 0; right: 0; bottom: -1.2rem; text-align: center; font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ash); }
.stage-tag b { color: var(--bone); }
#perfRank { transition: color .3s; }
#perfRank[data-r="2"] { color: #ffb347; } #perfRank[data-r="3"] { color: #ff7a1a; } #perfRank[data-r="4"] { color: var(--red); }

.about-lead { font-size: clamp(1.25rem, 2.1vw, 1.7rem); line-height: 1.5; margin-bottom: 1.2rem; }
.about-lead strong { font-family: var(--f-goth); font-weight: 900; font-size: 1.25em; color: var(--red); }
.about-lead em { font-family: var(--f-sign); font-style: normal; font-size: 1.7em; color: var(--red); line-height: .5; }
.about-body { color: #cbbcb6; }
.toggles { margin-top: 2.5rem; display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; }
.toggles-head p { margin-top: .5rem; color: var(--ash); max-width: 13rem; }
.toggles-head b { color: var(--bone); }
.radial-mini { position: relative; width: min(330px, 100%); aspect-ratio: 1; justify-self: center; }

/* ================= II · TALISMANES ================= */
.rope-scroller { margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 4rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.rope-scroller::-webkit-scrollbar { display: none; }
.rope-line { position: relative; min-width: 1000px; padding-bottom: 2rem; }
.rope { position: absolute; left: -2%; width: 104%; top: 0; height: 60px; overflow: visible; pointer-events: none; z-index: 2; }
.rope-a { fill: none; stroke: #3c1510; stroke-width: 10; stroke-linecap: round; }
.rope-b { fill: none; stroke: var(--red); stroke-width: 10; stroke-dasharray: 5 9; opacity: .55; }
.ofudas { position: relative; display: flex; justify-content: space-between; padding: 0 3%; }
.ofuda-wrap { position: relative; width: clamp(130px, 12vw, 172px); padding-top: 96px; transform-origin: 50% var(--ry, 30px); will-change: transform; }
.ofuda-wrap::before { content: ""; position: absolute; left: 50%; top: var(--ry, 30px); width: 2px; height: calc(96px - var(--ry, 30px)); transform: translateX(-50%); background: linear-gradient(#ff2116, #5a1a14); }
.ofuda-wrap::after { content: ""; position: absolute; left: 50%; top: calc(var(--ry, 30px) - 5px); width: 11px; height: 11px; transform: translateX(-50%); border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
.ofuda { display: block; width: 100%; aspect-ratio: 1 / 2.45; perspective: 1000px; text-align: center; }
.ofuda-inner { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s var(--ease); }
@media (hover: hover) { .ofuda:hover .ofuda-inner { transform: rotateY(180deg); } }
.ofuda.flip .ofuda-inner { transform: rotateY(180deg); }
.of-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; padding: 16px 12px 14px; overflow: hidden;
  background: repeating-linear-gradient(87deg, rgba(255, 255, 255, .015) 0 2px, transparent 2px 7px), linear-gradient(175deg, #1c0e0c, #0d0605);
  box-shadow: inset 0 0 0 1px rgba(255, 33, 22, .55), inset 0 0 0 6px #140908, inset 0 0 0 7px rgba(255, 33, 22, .35), 0 24px 50px rgba(0, 0, 0, .7); }
.of-top { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--red); display: grid; place-items: center; font-family: var(--f-mincho); font-size: .9rem; color: var(--red); flex: 0 0 auto; }
.of-k { font-family: var(--f-jp); font-size: clamp(3.2rem, 4.6vw, 4.6rem); line-height: 1; color: var(--red); margin-top: 1.1rem; text-shadow: 0 0 24px rgba(255, 33, 22, .45); }
.of-spell { writing-mode: vertical-rl; font-family: var(--f-mincho); font-weight: 700; font-size: 1rem; letter-spacing: .35em; color: rgba(239, 228, 220, .5); margin-top: 1rem; flex: 1; overflow: hidden; }
.of-title { font-weight: 900; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; line-height: 1.3; color: var(--bone); margin-top: .6rem; }
.of-hanko { margin-top: .7rem; width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; background: var(--red); color: var(--ink); font-family: var(--f-mincho); font-weight: 700; font-size: 1rem; border-radius: 4px; transform: rotate(-8deg); }
.of-back { transform: rotateY(180deg); justify-content: center; gap: .8rem; padding: 18px 16px; background: linear-gradient(170deg, #d4120a, #7a0303); color: var(--ink); box-shadow: inset 0 0 0 6px #b30a05, inset 0 0 0 7px rgba(0, 0, 0, .5), 0 24px 50px rgba(0, 0, 0, .7); }
.of-bk { font-family: var(--f-jp); font-size: 2.4rem; line-height: 1; color: rgba(0, 0, 0, .55); }
.of-back h3 { font-family: var(--f-goth); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.of-back p { font-size: .84rem; line-height: 1.5; font-weight: 500; }
.of-x { font-size: 1.1rem; font-weight: 900; }

/* ================= III · ESPEJO ================= */
.mirror-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.mirror { width: 100%; max-width: 430px; justify-self: center; }
.mirror-frame { position: relative; padding: 18px 18px 14px; border-radius: 50% 50% 8px 8px / 24% 24% 8px 8px; background: linear-gradient(150deg, #2c0e0b, #0b0505 45%, #260b08); box-shadow: 0 0 0 1px rgba(255, 33, 22, .45), 0 0 0 7px #0b0505, 0 0 0 8px rgba(255, 33, 22, .25), 0 40px 90px rgba(0, 0, 0, .8), 0 0 80px rgba(179, 0, 0, .25); }
.orn { position: absolute; font-family: var(--f-mincho); font-size: .72rem; color: var(--red); line-height: 1; }
.orn.tl { top: 22%; left: 3px; } .orn.tr { top: 22%; right: 3px; } .orn.bl { bottom: 62px; left: 3px; } .orn.br { bottom: 62px; right: 3px; }
.mirror-glass { position: relative; aspect-ratio: 3 / 4; border-radius: 50% 50% 4px 4px / 23% 23% 4px 4px; overflow: hidden; background: radial-gradient(ellipse at 50% 35%, #2e0b09, #070404 72%); box-shadow: inset 0 0 0 1px rgba(255, 33, 22, .5), inset 0 0 70px rgba(0, 0, 0, .9); }
.mirror-glass::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 33, 22, .3) 0 2px, transparent 2px 7px); opacity: 0; transition: opacity .2s; pointer-events: none; }
.mirror.swapping .mirror-glass::after { opacity: 1; animation: scanMove .4s linear infinite; }
@keyframes scanMove { to { background-position: 0 14px; } }
.mirror-media { position: absolute; inset: 0; display: grid; place-items: center; transition: filter .45s, opacity .45s, transform .7s var(--ease); }
.mirror.swapping .mirror-media { filter: blur(12px) brightness(2.4) saturate(0); opacity: 0; transform: scale(1.08); }
.mirror.lq .mirror-media { filter: blur(2.5px) saturate(.35) contrast(.85); }
.mirror-media img.full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mirror-media img.contain { position: relative; width: 86%; margin-top: 14%; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .7)); animation: bob 4.2s ease-in-out infinite; }
.mirror-media img.logo { position: relative; width: 58%; filter: drop-shadow(0 0 30px rgba(255, 33, 22, .6)); animation: bob 5s ease-in-out infinite; }
.mm-k { position: absolute; font-family: var(--f-jp); font-size: clamp(9rem, 22vw, 17rem); line-height: 1; color: rgba(255, 33, 22, .1); }
.mirror-sweep { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .08) 46%, transparent 54%) 0 0 / 300% 100%; animation: sweep 7s ease-in-out infinite; }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.mirror-loading { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); display: flex; gap: .8rem; align-items: center; padding: .55rem 1rem; background: rgba(6, 4, 4, .8); border: 1px solid var(--red); font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; opacity: 0; transition: opacity .2s; }
.mirror-loading b { color: var(--red); min-width: 3ch; }
.mirror.swapping .mirror-loading { opacity: 1; }
.mirror-ui { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 6px 0; }
.mq { display: flex; }
.mq button { font-weight: 900; font-size: .66rem; letter-spacing: .1em; padding: .35rem .7rem; border: 1px solid rgba(255, 33, 22, .4); color: var(--ash); transition: all .25s; }
.mq button + button { border-left: 0; }
.mq button.on { background: var(--red); border-color: var(--red); color: var(--ink); }
.mirror-name { text-align: right; line-height: 1; }
.mirror-name small { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin-bottom: .3rem; }
.mirror-name b { font-family: var(--f-goth); font-weight: 900; font-size: 1.7rem; }

.am-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.am-tabs { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.am-tabs button { position: relative; font-weight: 700; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ash); padding: .3rem 0; transition: color .3s; }
.am-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .4s var(--ease); }
.am-tabs button.on { color: var(--bone); }
.am-tabs button.on::after { transform: scaleX(1); }
.am-list { list-style: none; display: grid; gap: .55rem; }
.am-item { position: relative; display: grid; grid-template-columns: 60px 1fr auto; gap: 1rem; align-items: center; padding: .55rem .9rem .55rem .55rem; background: rgba(17, 9, 8, .75); border: 1px solid transparent; cursor: pointer; transition: border-color .3s, transform .4s var(--ease), background .3s; outline: none; }
.am-item:hover, .am-item:focus-visible { border-color: rgba(255, 33, 22, .4); transform: translateX(8px); }
.am-item.on { border-color: var(--red); background: linear-gradient(90deg, rgba(255, 33, 22, .18), rgba(17, 9, 8, .75)); }
.am-item.on::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 4px; background: var(--red); }
.am-item.hide { display: none; }
.am-thumb { width: 60px; height: 60px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle, #2a0b09, #0b0505); font-family: var(--f-jp); font-size: 1.7rem; color: var(--red); }
.am-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.am-name b { display: block; font-family: var(--f-goth); font-weight: 900; font-size: 1.35rem; line-height: 1.05; }
.am-name small { font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.am-go { font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ash); }
.am-item.on .am-go { color: var(--red); }
.am-desc { margin-top: 1.5rem; padding-left: 1rem; border-left: 2px solid var(--red); color: var(--ash); min-height: 3.2em; }

/* ================= IV · RITUAL ================= */
.ritual { position: relative; height: 480vh; }
.ritual-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 5rem); padding: 5rem var(--pad) 3rem; overflow: hidden; }
.ritual-circle { position: relative; width: min(66vh, 40vw); aspect-ratio: 1; justify-self: center; --p: 0; --cw: min(3.6vh, 2.1vw); }
.ritual-circle svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.rc-o { fill: none; stroke: rgba(255, 33, 22, .3); stroke-width: 1.5; }
.rc-o.thin { stroke-width: .8; }
.rc-o.dashed { stroke-dasharray: 3 9; transform-origin: 0 0; animation: spin 40s linear infinite; }
.rc-star { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); filter: drop-shadow(0 0 6px var(--red)); }
.ritual-circle::before { content: ""; position: absolute; inset: 20%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 33, 22, calc(var(--p) * .45)), transparent 70%); filter: blur(20px); }
.candles { position: absolute; inset: 0; }
.candle { position: absolute; width: var(--cw, 26px); transform: translate(-50%, -65%); }
.candle .wax { display: block; width: 100%; aspect-ratio: 1 / 2.2; border-radius: 3px 3px 2px 2px; background: linear-gradient(90deg, #2a0807, #8a1d14 45%, #3a0d0a); position: relative; }
.candle .wax::before { content: ""; position: absolute; left: 12%; top: 0; width: 22%; height: 34%; background: #8a1d14; border-radius: 0 0 99px 99px; }
.candle .wick { position: absolute; left: 50%; bottom: 100%; width: 2px; height: calc(var(--cw, 26px) * .3); transform: translateX(-50%); background: #1a0a08; }
.candle .flame { position: absolute; left: 50%; bottom: calc(100% + var(--cw, 26px) * .15); width: 70%; aspect-ratio: 1 / 1.9; transform: translateX(-50%) scale(.2); transform-origin: 50% 100%; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(ellipse at 50% 72%, #fff6d8 0 14%, #ffc23a 28%, #ff4a16 52%, rgba(255, 33, 22, 0) 72%); opacity: 0; transition: opacity .4s, transform .5s var(--ease); }
.candle.lit .flame { opacity: 1; transform: translateX(-50%) scale(1); animation: flicker .12s ease-in-out infinite alternate; }
.candle::after { content: ""; position: absolute; left: 50%; bottom: 100%; width: 400%; aspect-ratio: 1; transform: translate(-50%, 40%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 120, 40, .35), transparent 65%); opacity: 0; transition: opacity .5s; pointer-events: none; }
.candle.lit::after { opacity: 1; }
@keyframes flicker { from { transform: translateX(-50%) scale(1) skewX(-3deg); } to { transform: translateX(-50%) scale(1.06, .94) skewX(3deg); } }
.candle .smoke { position: absolute; left: 50%; bottom: 100%; width: 2px; height: calc(var(--cw, 26px) * 1.4); transform: translateX(-50%); background: linear-gradient(transparent, rgba(200, 190, 190, .35)); opacity: 0; border-radius: 2px; }
.candle:not(.lit) .smoke { animation: smoke 2.8s ease-out infinite; }
@keyframes smoke { 0% { opacity: 0; transform: translate(-50%, 0) scaleY(.4); } 30% { opacity: .8; } 100% { opacity: 0; transform: translate(-40%, -60%) scaleY(1.2) skewX(20deg); } }
.ritual-kanji { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--f-jp); font-size: clamp(3.5rem, 8vw, 7rem); line-height: 1; color: var(--red); text-shadow: 0 0 30px rgba(255, 33, 22, .6); }
.ritual-kanji.pop { animation: kanjiPop .6s var(--ease); }
@keyframes kanjiPop { from { opacity: 0; transform: translate(-50%, -50%) scale(1.6); filter: blur(8px); } }
.ritual-text .chapter-num { margin-bottom: 1.4rem; }
.ritual-steps { position: relative; min-height: 17rem; }
.rstep { position: absolute; inset: 0; opacity: 0; transform: translateY(30px); transition: opacity .6s var(--ease), transform .8s var(--ease); pointer-events: none; }
.rstep.on { opacity: 1; transform: none; }
.rstep .num { display: block; font-family: var(--f-goth); font-weight: 900; font-size: clamp(3rem, 6vw, 5rem); line-height: .8; color: var(--red); text-shadow: 0 0 24px rgba(255, 33, 22, .5); }
.rstep h3 { font-family: var(--f-goth); font-weight: 900; font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1; margin: .4rem 0 .8rem; }
.rstep p { color: #c9bab4; max-width: 28rem; font-size: 1.05rem; }
.ritual-progress { width: min(28rem, 100%); height: 2px; background: #241312; margin-top: 1.5rem; }
.ritual-progress span { display: block; height: 100%; width: 0; background: var(--red); box-shadow: 0 0 10px var(--red); }
.ritual-scroll { margin-top: 1rem; font-size: .68rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); }

/* ================= V · PACTOS ================= */
.slots { display: flex; align-items: center; gap: 1.6rem; margin: -1rem 0 4rem; flex-wrap: wrap; }
.slot-candles { display: flex; align-items: flex-end; gap: 1.2rem; padding-top: 2.4rem; --cw: 22px; }
.slot-candles .candle { position: relative; transform: none; }
.slot-text { color: var(--ash); max-width: 30rem; }
.slot-text b { color: var(--bone); font-family: var(--f-goth); font-size: 1.5rem; }

.pact-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.4rem, 3vw, 2.6rem); align-items: start; }
.pact { position: relative; padding: 2.6rem 2rem 3rem; background: repeating-linear-gradient(92deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 9px), linear-gradient(175deg, #170b0a, #0e0706); box-shadow: 0 30px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 33, 22, .25); transform: rotate(var(--rot, 0deg)); transition: transform .6s var(--ease); }
.pact::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: radial-gradient(circle at 7px 0, #0e0706 6.5px, transparent 7px) 0 0 / 14px 10px repeat-x; }
.pact:hover { transform: rotate(0) translateY(-10px); }
.pact.thud { animation: thud .35s ease; }
@keyframes thud { 40% { transform: rotate(0) translateY(4px) scale(.985); } }
.pact-seal { width: 56px; height: 56px; display: grid; place-items: center; border: 2px solid var(--red); border-radius: 8px; color: var(--red); font-family: var(--f-jp); font-size: 1.6rem; transform: rotate(-8deg); box-shadow: inset 0 0 0 3px #150a09, inset 0 0 0 4px rgba(255, 33, 22, .5); margin-bottom: 1.4rem; }
.pact h3 { font-family: var(--f-goth); font-weight: 900; font-size: 3.6rem; line-height: .85; }
.pact-sub { margin-top: .4rem; font-weight: 700; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.pact-price { margin: 1.4rem 0; padding: .9rem 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ash); }
.pact-price b { display: block; font-family: var(--f-goth); font-weight: 900; font-size: 2.1rem; letter-spacing: 0; text-transform: none; color: var(--bone); line-height: 1.1; }
.pact ul { list-style: none; }
.pact li { position: relative; padding: .38rem 0 .38rem 1.5rem; color: #d8cac4; }
.pact li::before { content: ""; position: absolute; left: 2px; top: .9em; width: 8px; height: 8px; background: var(--red); border-radius: 50% 0 50% 50%; transform: rotate(-45deg); }
.sign-btn { margin-top: 2rem; display: inline-flex; align-items: center; gap: .9rem; font-family: var(--f-goth); font-weight: 700; font-size: 1.45rem; transition: color .3s; }
.sb-seal { width: 48px; height: 48px; display: grid; place-items: center; background: var(--red); color: var(--ink); font-family: var(--f-jp); font-size: 1.2rem; border-radius: 9px; transform: rotate(-7deg); box-shadow: 0 6px 0 #5a0000; transition: transform .25s var(--ease), box-shadow .25s; }
.sign-btn:hover { color: var(--red); }
.sign-btn:hover .sb-seal { transform: rotate(0) translateY(3px); box-shadow: 0 3px 0 #5a0000; }
.sign-btn:active .sb-seal { transform: translateY(6px); box-shadow: 0 0 0 #5a0000; }
.stamp { position: absolute; right: 1.6rem; bottom: 2.2rem; writing-mode: vertical-rl; font-family: var(--f-jp); font-size: 1.6rem; letter-spacing: .12em; color: var(--red); border: 3px solid var(--red); border-radius: 8px; padding: .45rem .3rem; opacity: 0; pointer-events: none; transform: rotate(14deg) scale(2.6); mix-blend-mode: screen; }
.signed > .stamp { animation: stampIn .4s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes stampIn { 0% { opacity: 0; transform: rotate(14deg) scale(2.6); } 60% { opacity: 1; transform: rotate(14deg) scale(.9); } 100% { opacity: .92; transform: rotate(14deg) scale(1); } }
.pact.featured { background: repeating-linear-gradient(92deg, rgba(0, 0, 0, .05) 0 2px, transparent 2px 9px), linear-gradient(175deg, #c8110b, #6e0404); color: #0a0303; box-shadow: 0 30px 70px rgba(179, 0, 0, .35); }
.pact.featured::after { background: radial-gradient(circle at 7px 0, #6e0404 6.5px, transparent 7px) 0 0 / 14px 10px repeat-x; }
.pact.featured .pact-seal { border-color: #0a0303; color: #0a0303; box-shadow: inset 0 0 0 3px #b30d08, inset 0 0 0 4px rgba(0, 0, 0, .5); }
.pact.featured .pact-sub { color: #0a0303; }
.pact.featured .pact-price { color: rgba(0, 0, 0, .65); border-color: rgba(0, 0, 0, .35); }
.pact.featured .pact-price b { color: #0a0303; }
.pact.featured li { color: #1a0505; font-weight: 500; }
.pact.featured li::before { background: #0a0303; }
.pact.featured .sign-btn:hover { color: var(--bone); }
.pact.featured .sb-seal { background: #0a0303; color: var(--red); box-shadow: 0 6px 0 #3a0000; }
.pact.featured .stamp { color: #0a0303; border-color: #0a0303; mix-blend-mode: multiply; }
.pact-ribbon { position: absolute; top: 1.3rem; right: -.5rem; background: #0a0303; color: var(--red); font-weight: 900; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; padding: .45rem .9rem; }

.oracle { max-width: 860px; margin: clamp(5rem, 10vw, 8rem) auto 0; }
.oracle-title { font-family: var(--f-goth); font-weight: 900; font-size: clamp(2.2rem, 4vw, 3rem); margin-bottom: 1rem; }
.oracle details { border-bottom: 1px solid var(--line); }
.oracle summary { list-style: none; display: flex; align-items: center; gap: 1.2rem; padding: 1.3rem 0; font-size: 1.15rem; font-weight: 500; cursor: pointer; transition: color .3s; }
.oracle summary::-webkit-details-marker { display: none; }
.oracle summary i { font-style: normal; font-family: var(--f-jp); color: var(--red); width: 2rem; flex: 0 0 2rem; font-size: 1.3rem; }
.oracle summary::after { content: "✕"; margin-left: auto; color: var(--red); transform: rotate(45deg); transition: transform .5s var(--ease); }
.oracle details[open] summary::after { transform: rotate(180deg); }
.oracle summary:hover { color: var(--red); }
.oracle details p { padding: 0 0 1.4rem 3.2rem; color: var(--ash); animation: oracleIn .7s var(--ease); }
@keyframes oracleIn { from { clip-path: circle(0 at 0 0); opacity: 0; } to { clip-path: circle(150% at 0 0); opacity: 1; } }

/* ================= VI · CONTRATO ================= */
.contract-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contract { position: relative; padding: clamp(1.6rem, 4vw, 3.2rem); background: repeating-linear-gradient(92deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 9px), linear-gradient(175deg, #150a09, #0d0605); box-shadow: inset 0 0 0 1px rgba(255, 33, 22, .4), inset 0 0 0 9px #110807, inset 0 0 0 10px rgba(255, 33, 22, .18), 0 40px 80px rgba(0, 0, 0, .6); }
.contract-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding-bottom: 1rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--line); font-family: var(--f-goth); font-weight: 900; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.contract-head span { font-family: var(--f-body); font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ash); }
.contract-head b { color: var(--red); }
.contract-body { font-size: clamp(1.1rem, 1.7vw, 1.45rem); line-height: 2.25; color: #e2d6d0; }
.contract-body strong { font-family: var(--f-goth); font-weight: 900; color: var(--red); font-size: 1.15em; }
.contract input, .contract select { font: inherit; color: var(--red); background-color: transparent; border: 0; border-bottom: 1.5px dashed rgba(255, 33, 22, .55); padding: 0 .25rem; width: 13ch; max-width: 100%; outline: none; transition: border-color .3s, background-color .3s; border-radius: 0; }
.contract select { width: auto; appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 1.1rem; background-image: linear-gradient(45deg, transparent 50%, var(--red) 50%); background-position: right .25rem center; background-size: 6px 6px; background-repeat: no-repeat; }
.contract select option { background: var(--ink); color: var(--bone); }
.contract input::placeholder { color: rgba(239, 228, 220, .3); }
.contract input:focus, .contract select:focus { border-bottom-style: solid; border-bottom-color: var(--red); background-color: rgba(255, 33, 22, .07); }
.contract textarea { display: block; width: 100%; margin-top: 1rem; font: inherit; font-size: 1rem; color: var(--bone); background: rgba(0, 0, 0, .35); border: 1px dashed rgba(255, 33, 22, .45); padding: 1rem; resize: vertical; outline: none; transition: border-color .3s; }
.contract textarea:focus { border-style: solid; border-color: var(--red); }
.contract .invalid { border-color: var(--red) !important; border-style: solid !important; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.contract-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-top: 2.2rem; }
.signature { flex: 1; max-width: 22rem; min-width: 0; }
.sig-name { display: block; font-family: var(--f-sign); font-size: 3.4rem; line-height: 1.1; color: var(--red); min-height: 1.2em; border-bottom: 1px solid var(--ash); white-space: nowrap; overflow: hidden; padding-left: .3rem; }
.sig-line { display: block; margin-top: .4rem; font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ash); }
.hanko { flex: 0 0 auto; width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: .1rem; background: radial-gradient(circle at 35% 30%, #ff4a3a, var(--red) 40%, #a10000); color: var(--ink); box-shadow: 0 8px 0 #5a0000, 0 0 40px rgba(255, 33, 22, .45); transition: transform .15s, box-shadow .15s; }
.hanko span { font-family: var(--f-jp); font-size: 1.6rem; line-height: 1; }
.hanko small { font-weight: 900; font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; }
.hanko:hover { transform: translateY(3px); box-shadow: 0 5px 0 #5a0000, 0 0 60px rgba(255, 33, 22, .7); }
.hanko:active { transform: translateY(8px); box-shadow: 0 0 0 #5a0000; }
.contract-msg { margin-top: 1.2rem; min-height: 1.4em; font-size: .9rem; font-weight: 700; color: var(--red); }
.contract .stamp.big { right: 30%; bottom: 22%; font-size: 3rem; }

.channels { display: grid; }
.channels .kicker { margin-bottom: 1rem; }
.channel { position: relative; display: grid; grid-template-columns: 1fr auto; padding: 1.05rem 0 1.05rem .2rem; border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate; }
.channel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(255, 33, 22, .2), transparent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.channel b { font-family: var(--f-goth); font-weight: 900; font-size: 2.1rem; line-height: 1; transition: transform .5s var(--ease), color .3s; }
.channel span { grid-column: 1; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ash); margin-top: .3rem; transition: transform .5s var(--ease); }
.channel i { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; font-size: 1.5rem; color: var(--red); transition: transform .5s var(--ease); }
.channel:hover::before { transform: scaleX(1); }
.channel:hover b { color: var(--red); transform: translateX(14px); }
.channel:hover span { transform: translateX(14px); }
.channel:hover i { transform: rotate(45deg) scale(1.2); }

/* ================= FOOTER ================= */
.foot { position: relative; padding: 5rem var(--pad) 2rem; text-align: center; overflow: hidden; border-top: 1px solid var(--line); }
.foot-kanji { font-family: var(--f-jp); font-size: clamp(8rem, 28vw, 24rem); line-height: .95; color: transparent; -webkit-text-stroke: 1px rgba(255, 33, 22, .4); background: linear-gradient(180deg, rgba(255, 33, 22, .35), transparent 75%); -webkit-background-clip: text; background-clip: text; user-select: none; }
.foot-end { font-family: var(--f-goth); font-weight: 700; font-size: 1.6rem; color: var(--red); margin-top: 1rem; }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 3.5rem; font-size: .78rem; color: var(--ash); }
.foot-row a { color: var(--red); font-weight: 700; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .pact-list { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
  .pact { --rot: 0deg !important; }
  .mirror-grid, .contract-grid { grid-template-columns: 1fr; }
  .toggles { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .rail, .incense { display: none; }
  .menu-btn small, .sound-label { display: none; }
  .hero { display: flex; flex-direction: column; align-items: center; padding: 6.5rem var(--pad) 5rem; gap: .5rem; text-align: center; }
  .hero-title { display: contents; }
  .w-demon, .w-akuma { position: static; font-size: 25vw; }
  .w-demon { order: 1; }
  .sigil { order: 2; width: min(86vw, 430px); margin: -4vw 0; }
  .hold-hint { order: 3; position: static; transform: none; white-space: normal; justify-content: center; font-size: .6rem; }
  .hold-hint.nudge { animation: none; color: var(--bone); }
  .w-akuma { order: 4; margin-top: .6rem; }
  .hero-copy { order: 5; position: static; width: 100%; max-width: 26rem; margin-top: 1.5rem; }
  .hero-ctas { justify-content: center; }
  .hero-vkanji { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .chapter-kanji { left: auto; right: -1rem; top: -2.5rem; }
  .ritual { height: 420vh; }
  .ritual-sticky { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 1.5rem; padding-top: 4.5rem; text-align: center; }
  .ritual-circle { width: min(78vw, 42vh); --cw: min(4.2vw, 2.3vh); }
  .ritual-steps { min-height: 13rem; }
  .rstep p { margin: 0 auto; }
  .ritual-progress { margin: 1rem auto 0; }
  .ritual-text .chapter-num { margin-bottom: .6rem; }
}
@media (max-width: 560px) {
  .contract-foot { flex-direction: column; align-items: stretch; }
  .hanko { align-self: center; }
  .contract input { width: 100%; }
  .channel b { font-size: 1.7rem; }
  .seal-btn { width: 96px; height: 96px; flex-basis: 96px; }
  .ink-link { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; }
}

/* ---------- precios de los pactos ---------- */
.pact-price b small { font-family: var(--f-body); font-weight: 700; font-size: .36em; letter-spacing: .1em; vertical-align: .95em; margin-right: .25em; opacity: .7; }
.pact-price b { font-size: 2.8rem; }
.tag18 { display: inline-block; padding: .05rem .38rem; margin: 0 .1rem; border: 1.5px solid var(--red); border-radius: 4px; font-size: .68em; font-weight: 900; letter-spacing: .04em; line-height: 1.3; color: var(--red); vertical-align: .1em; }
.pact.featured .tag18 { border-color: #0a0303; color: #0a0303; }
.pact-note { max-width: 760px; margin: 2.6rem auto 0; text-align: center; font-size: .82rem; color: var(--ash); }
