/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0f0e0d;
    color: #d4c9a8;
    font-family: 'Cormorant Garamond', serif;
    overflow-x: hidden;
    /* Leather texture via layered gradients */
    background-image:
        /* #1a1510 leather grain */
        radial-gradient(ellipse at 20% 50%, #1a1510 2px, transparent 2px),
        radial-gradient(ellipse at 80% 20%, rgba(26, 21, 16, 0.3) 5px, transparent 5px),
        radial-gradient(ellipse at 50% 80%, rgba(26, 21, 16, 0.2) 11px, transparent 11px);
    background-size: 4px 4px, 10px 10px, 22px 22px;
}

/* === NAVIGATION === */
#kanji-nav {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-kanji {
    font-family: 'Noto Serif JP', serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: #7b917a;
    cursor: pointer;
    transition: color 0.6s ease, text-shadow 0.6s ease;
    opacity: 0.6;
}

.nav-kanji:hover {
    color: #2ec4d4;
    opacity: 1;
    text-shadow: 0 0 20px rgba(46, 196, 212, 0.3);
}

/* === SECTIONS === */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem;
}

.section-content {
    text-align: center;
    max-width: 600px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.section-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === TYPOGRAPHY === */
.kinetic-title {
    font-family: 'Noto Serif JP', serif;
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 7rem);
    color: #d4c9a8;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    position: relative;
}

.kinetic-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    color: #c44832;
    opacity: 0;
    transform: translateX(3px) translateY(-3px);
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.kinetic-title:hover::after {
    opacity: 0.4;
}

.subtitle {
    font-family: 'Inconsolata', monospace;
    font-size: 0.9rem;
    color: #7b917a;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.section-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1.8;
    color: #d4c9a8;
    opacity: 0.85;
}

.mono-text {
    font-family: 'Inconsolata', monospace;
    font-size: 1rem;
    color: #2ec4d4;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

/* === DECORATIVE ELEMENTS === */
.stitch-line {
    width: 80px;
    height: 1px;
    margin: 3rem auto 0;
    background: repeating-linear-gradient(
        90deg,
        #3d2b1a 0px,
        #3d2b1a 6px,
        transparent 6px,
        transparent 10px
    );
    opacity: 0.6;
}

.ink-circle {
    width: 120px;
    height: 120px;
    margin: 3rem auto 0;
    border: 2px solid #7b917a;
    border-radius: 50%;
    opacity: 0.3;
    animation: ink-pulse 4s ease-in-out infinite;
}

@keyframes ink-pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.05); opacity: 0.5; }
}

.enso {
    width: 150px;
    height: 150px;
    margin: 3rem auto 0;
    border: 3px solid #d4872e;
    border-radius: 50%;
    border-top-color: transparent;
    opacity: 0.4;
    animation: enso-rotate 20s linear infinite;
}

@keyframes enso-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === SCROLL-DRIVEN COLOR SHIFTS === */
#void-opening {
    background: radial-gradient(ellipse at center, #1a1832 0%, #0f0e0d 70%);
}

#spear-section .kinetic-title {
    color: #c44832;
}

#shield-section .kinetic-title {
    color: #2ec4d4;
}

#paradox-section .kinetic-title {
    color: #d4872e;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    #kanji-nav {
        right: 1rem;
    }

    .section {
        padding: 2rem;
    }

    .nav-kanji {
        font-size: 1.2rem;
    }
}
