:root {
    --bg-dark: #111114;
    --bg-cave: #1a1a1c;
    --oto-purple: #6b4c9a;
    --oto-purple-dark: #4b316f;
    --snake-olive: #5b6c5d;
    --blood-red: #8b0000;
    --scroll-paper: #e8ddcb;
    --scroll-paper-dark: #ccb99b;
    --text-light: #e0e0e0;
    --text-ink: #2b2621;
    --font-heading: 'Yuji Syuku', serif;
    --font-body: 'Shippori Mincho', serif;
}

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

body {
    background-color: var(--bg-dark); color: var(--text-light); font-family: var(--font-body);
    line-height: 1.6; overflow-x: hidden; scroll-behavior: smooth;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%236b4c9a" d="M12 2L15 10L23 11L17 16.5L19 24L12 19.5L5 24L7 16.5L1 11L9 10L12 2Z"/></svg>') 12 12, auto;
}

.mist-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 98; overflow: hidden; }
.mist { 
    position: absolute; 
    top: -20vh; left: -20vw; 
    width: 120vw; height: 120vh; 
    background: radial-gradient(circle, rgba(107, 76, 154, 0.15) 0%, transparent 70%); 
    border-radius: 50%; 
    filter: blur(100px); 
    animation: driftMist 35s ease-in-out infinite alternate; 
}
.mist-2 { 
    top: auto; bottom: -30vh; left: 40vw; width: 150vw; height: 100vh;
    background: radial-gradient(circle, rgba(91, 108, 93, 0.12) 0%, transparent 70%); 
    animation-delay: -15s; 
    animation-duration: 45s; 
}
@keyframes driftMist { 
    0% { transform: translate(0, 0) scale(1); } 
    100% { transform: translate(20vw, 15vh) scale(1.3); } 
}

.parchment-bg { position: relative; z-index: 2; background-color: var(--bg-cave); background-image: radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px); background-size: 20px 20px; }
.dark-stone-wrapper { background-color: #121212; border-top: 1px solid #1a1a1c; border-bottom: 1px solid #1a1a1c; box-shadow: inset 0 0 80px rgba(0,0,0,0.9); }
.hrp-stone-wrapper { background-color: #161616; border-top: 1px dashed var(--snake-olive); box-shadow: inset 0 0 50px rgba(0,0,0,0.8); }

/* Ripples */
.ripple-container, .continuous-ripples { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 99; overflow: hidden; }
.continuous-ripples { opacity: 0.9; }
.sound-ripple { position: absolute; border: 1px solid var(--oto-purple); border-radius: 50%; animation: ripple-expand 1.5s ease-out forwards; transform: translate(-50%, -50%); opacity: 0; box-shadow: 0 0 10px rgba(107, 76, 154, 0.5); }
.continuous-ripple-anim { animation: ripple-travel 6s ease-out forwards; border: 2px solid rgba(138, 43, 226, 0.6); box-shadow: 0 0 20px rgba(138, 43, 226, 0.4); }
@keyframes ripple-expand { 0% { width: 0; height: 0; opacity: 0.8; } 100% { width: 250px; height: 250px; opacity: 0; } }
@keyframes ripple-travel {
    0% { width: 0; height: 0; opacity: 0; transform: translate(-50%, -50%); }
    20% { opacity: 0.7; }
    100% { 
        width: 900px; 
        height: 900px; 
        opacity: 0; 
        transform: translate(calc(-50% + var(--drift-x, 100px)), calc(-50% + var(--drift-y, -100px))); 
    }
}

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: normal; }
.title-brush { font-size: 2.5rem; color: var(--scroll-paper); text-align: center; }
.text-light { color: var(--text-light) !important; text-shadow: 2px 2px 4px #000; }
.blood-text { color: var(--blood-red); font-size: 1.5rem; margin-bottom: 15px; border-bottom: 1px dashed var(--blood-red); padding-bottom: 5px; }

/* Hero Section */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; z-index: 2; background: radial-gradient(circle at center, var(--bg-cave) 0%, var(--bg-dark) 100%); border-bottom: 3px solid var(--blood-red); box-shadow: 0 5px 15px rgba(0,0,0,0.8); }
.hero-content { text-align: center; max-width: 800px; padding: 20px; }
.oto-symbol svg { width: 80px; height: 80px; filter: drop-shadow(0 0 8px rgba(107, 76, 154, 0.4)); margin-bottom: 20px; animation: heartbeat 4s infinite ease-in-out; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.05); opacity: 1; } }

.kanji-title { font-size: 5rem; color: var(--scroll-paper); letter-spacing: 5px; text-shadow: 2px 2px 5px rgba(0,0,0,0.9); margin: 0; }
.brush-stroke { height: 15px; width: 60%; margin: 10px auto 20px auto; background: url('data:image/svg+xml;utf8,<svg preserveAspectRatio="none" viewBox="0 0 100 10" xmlns="http://www.w3.org/2000/svg"><path d="M0 5 Q 25 1 50 6 T 100 4 L 100 6 Q 75 9 50 4 T 0 5 Z" fill="%238b0000"/></svg>'); background-size: 100% 100%; opacity: 0.8; }
.subtitle { font-size: 1.5rem; color: var(--oto-purple); margin-bottom: 30px; letter-spacing: 2px; }
.hero-quote { font-size: 1.2rem; font-style: italic; color: #888; }
.scroll-down-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 50px; text-decoration: none; color: var(--text-light); font-family: var(--font-heading); padding: 10px 20px; border: 1px solid var(--snake-olive); transition: all 0.3s; background: rgba(0,0,0,0.5); z-index: 10; position: relative;}
.scroll-down-btn:hover { background: var(--snake-olive); border-color: var(--scroll-paper); }
.kunai-pointer { display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 15px solid var(--text-light); animation: float-down 1.5s infinite; }
@keyframes float-down { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* Section Split Image Layout */
.section { padding: 100px 5%; max-width: 1400px; margin: 0 auto; position: relative; }
.section-header { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 60px; width: 100%; }
.shuriken-icon { display: block; width: 24px; height: 24px; background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 0L14 10L24 12L14 14L12 24L10 14L0 12L10 10Z" fill="%235b6c5d"/></svg>'); animation: spin 10s linear infinite; }
.light-shuriken { background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 0L14 10L24 12L14 14L12 24L10 14L0 12L10 10Z" fill="%23e0e0e0"/></svg>'); }
@keyframes spin { 100% { transform: rotate(360deg); } }

.section-split { display: flex; align-items: flex-start; gap: 50px; }
.section-split.reverse { flex-direction: row-reverse; }
.section-image { flex: 1; min-width: 350px; display: flex; justify-content: center; position: sticky; top: 100px; }
.section-image img { width: 100%; max-width: 600px; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.9); border: 2px solid rgba(139, 0, 0, 0.4); object-fit: cover; filter: sepia(0.2) contrast(1.1); }
.section-content { flex: 2; width: 100%; }

/* Scrolls (Identité) */
.scroll-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.ninja-scroll { background-color: var(--scroll-paper); color: var(--text-ink); display: flex; flex-direction: column; position: relative; box-shadow: 3px 5px 15px rgba(0,0,0,0.6); transition: transform 0.3s; padding: 0 10px; }
.ninja-scroll:hover { transform: translateY(-5px); }
.scroll-top, .scroll-bottom { height: 15px; background: #8B4513; border: 1px solid #5C3A21; border-radius: 5px; width: 108%; transform: translateX(-3.5%); box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); }
.scroll-content { padding: 30px 20px; background-image: linear-gradient(to right, rgba(0,0,0,0.03) 0%, transparent 10%, transparent 90%, rgba(0,0,0,0.03) 100%); flex:1; }

/* Timeline (Histoire) */
.ninja-timeline { position: relative; max-width: 100%; margin: 0 auto; padding-left: 30px; }
.kunai-line { position: absolute; left: 0; top: 0; width: 2px; height: 100%; background: var(--snake-olive); }
.kunai-line::before { content: ''; position: absolute; top: -15px; left: -9px; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 20px solid var(--snake-olive); }
.history-node { position: relative; margin-bottom: 50px; }
.node-marker { position: absolute; left: -36px; top: 5px; width: 14px; height: 14px; background: var(--oto-purple); border: 2px solid var(--bg-cave); border-radius: 50%; box-shadow: 0 0 8px var(--oto-purple); }
.node-content { background: rgba(0,0,0,0.5); padding: 25px; border-left: 3px solid var(--oto-purple-dark); transition: background 0.3s; }
.node-content:hover { background: rgba(107, 76, 154, 0.15); }
.period { font-family: var(--font-heading); color: var(--snake-olive); font-weight: bold; font-size: 1.1rem; }
.history-node h3 { color: var(--scroll-paper); margin: 10px 0; font-size: 1.6rem; }

/* Bamboo Tablets (Objectifs) */
.bamboo-tablets { display: flex; flex-direction: column; gap: 30px; }
.tablet { background: #EEDD82; background-image: repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(0,0,0,0.05) 10px, rgba(0,0,0,0.05) 12px); color: #2B2118; padding: 20px; width: 100%; border-radius: 3px; box-shadow: 5px 5px 15px rgba(0,0,0,0.7); position: relative; border-left: 5px solid #8B4513; border-right: 5px solid #8B4513; }
.tablet-head { background: var(--oto-purple-dark); color: #fff; padding: 10px; margin: -20px -20px 20px -20px; text-align: center; border-bottom: 2px solid #333; }
.tablet ul { list-style: none; }
.tablet ul li { margin-bottom: 15px; padding-left: 20px; position: relative; font-weight: bold; font-family: var(--font-body); }
.tablet ul li::before { content: '•'; position: absolute; left: 0; color: var(--blood-red); font-size: 1.5em; top: -5px; }

/* HRP Section */
.ninja-id-card { background: var(--scroll-paper-dark); color: var(--text-ink); max-width: 100%; margin: 0 auto; display: flex; flex-wrap: wrap; border: 2px solid #5C3A21; padding: 5px; box-shadow: inset 0 0 30px rgba(0,0,0,0.3), 5px 5px 20px rgba(0,0,0,0.8); }
.id-left { background: #d0bfa0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; border-right: 2px dashed #5C3A21; position: relative; width: 250px; }
.seal-mark { width: 70px; height: 70px; border: 3px solid var(--blood-red); border-radius: 50%; margin-bottom: 15px; opacity: 0.8; border-style: double; display: flex; align-items: center; justify-content: center; }
.seal-mark::after { content: '音'; font-family: 'Shippori Mincho', sans-serif; color: var(--blood-red); font-size: 35px; font-weight: bold; }
.age-badge { background: #5C3A21; color: #fff; padding: 5px 15px; font-size: 0.9em; margin-top: 10px; border-radius: 3px; font-family: var(--font-heading); letter-spacing: 1px; }
.id-right { flex: 1; padding: 40px; min-width: 250px; background-image: radial-gradient(rgba(0,0,0,0.03) 2px, transparent 2px); background-size: 15px 15px; }
.info-block { margin-bottom: 25px; }
.info-block h4 { color: var(--oto-purple-dark); border-bottom: 1px solid var(--oto-purple-dark); margin-bottom: 10px; display: inline-block; font-size: 1.2rem; }

footer { background-color: #0b0b0d; text-align: center; padding: 50px 20px; border-top: 2px solid var(--oto-purple-dark); }
.footer-wrap { display: inline-block; text-align: center; }
.divider-line { height: 1px; width: 100%; background: var(--snake-olive); margin: 20px 0; opacity: 0.5; }
.small { font-size: 0.85rem; color: #555; }
.footer-wrap strong { color: var(--oto-purple); font-family: var(--font-heading); font-size: 1.2rem; }

/* Effects */
.ink-reveal { opacity: 0; transform: translateY(30px); filter: blur(3px); transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ink-reveal.active { opacity: 1; transform: translateY(0); filter: blur(0); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; } .delay-3 { transition-delay: 0.3s; }

/* Responsive adjustments */
@media (max-width: 950px) {
    .section-split, .section-split.reverse { flex-direction: column; align-items: center; }
    .section-image { position: relative; top: 0; margin-bottom: 30px; width: 100%; }
    .section-image img { max-width: 100%; }
    .id-left { width: 100%; border-right: none; border-bottom: 2px dashed #5C3A21; }
}

@media (max-width: 768px) {
    .kanji-title { font-size: 3rem; }
}
