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

html {
    scroll-behavior: smooth;
}

body {
    background: #0e0e12;
    color: #c8beb0;
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    overflow-x: hidden;
}

/* === SECTION HEADERS === */
.section-header {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #a8787a;
    margin-bottom: clamp(2rem, 4vw, 4rem);
    text-align: center;
}

.section-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: #6a6058;
    margin: 1rem auto 0;
}

/* ============================
   ZONE 1: THE THRESHOLD
   ============================ */
.threshold {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0e0e12;
    position: relative;
    overflow: hidden;
}

.hero-kanji-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-radial {
    position: absolute;
    width: 60vw;
    height: 60vw;
    max-width: 800px;
    max-height: 800px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, #3a2e28 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.kanji-spear,
.kanji-shield {
    position: absolute;
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(8rem, 22vw, 20rem);
    font-weight: 300;
    color: #2d2418;
    z-index: 1;
    will-change: transform;
    user-select: none;
}

.kanji-spear {
    transform: translateX(0);
}

.kanji-shield {
    transform: translateX(0);
}

.hero-wordmark {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 0.05em;
    margin-top: 20vh;
}

.hero-wordmark .letter {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(4rem, 14vw, 12rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #c8beb0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-wordmark .letter.visible {
    opacity: 1;
}

/* ============================
   ZONE 2: THE TENSION FIELD
   ============================ */
.tension-field {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 4rem);
    padding-top: clamp(4rem, 8vw, 8rem);
}

.card-row {
    display: grid;
    gap: clamp(1rem, 2vw, 2rem);
    margin-bottom: clamp(1rem, 2vw, 2rem);
}

.row-65-35 { grid-template-columns: 65fr 35fr; }
.row-35-65 { grid-template-columns: 35fr 65fr; }
.row-50-50 { grid-template-columns: 1fr 1fr; }

.card {
    background: #1a1820;
    border: 1px solid #5a4a3d;
    padding: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease, border-color 0.4s ease;
}

.card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    border-color: #a8787a;
}

.card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #a8787a;
    margin-bottom: 1rem;
}

.card p {
    color: #b8a99a;
}


.card-kanji {
    font-family: 'Noto Serif JP', serif;
    font-size: 6rem;
    font-weight: 700;
    color: #5a6878;
    opacity: 0.15;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.card-compact .card-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

/* ============================
   ZONE 3: THE WAVE
   ============================ */
.wave-zone {
    height: 100vh;
    min-height: 100vh;
    position: relative;
    background: linear-gradient(180deg, #0e0e12, #1a1820);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wave-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wave-a { z-index: 1; }
.wave-b { z-index: 2; }
.wave-c { z-index: 3; }

.wave-text-container {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.wave-text {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    color: #c8beb0;
    font-size: clamp(1rem, 2vw, 1.5rem);
    opacity: 0;
    transition: opacity 1s ease;
}

.wave-text.visible {
    opacity: 1;
}

/* ============================
   ZONE 4: THE ARCHIVE
   ============================ */
.archive {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 4rem);
    padding-top: clamp(4rem, 8vw, 8rem);
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
    max-width: 1200px;
    margin: 0 auto;
}

.archive-card {
    background: #1a1820;
    border: 1px solid #5a4a3d;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease, border-color 0.4s ease;
}

.archive-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.archive-card:hover {
    border-color: #a8787a;
}

.archive-card.notched {
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
}

.watermark-kanji {
    position: absolute;
    top: -10%;
    right: -5%;
    font-family: 'Noto Serif JP', serif;
    font-size: 8rem;
    color: #5a6878;
    opacity: 0.08;
    font-weight: 700;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

.redaction-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.redaction-line {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 1px;
    background: #8b7a5e;
    opacity: 0.3;
}

.archive-text {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 1.5rem 2rem;
    max-width: 90%;
}

.archive-text p {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    color: #b8a99a;
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ============================
   ZONE 5: THE STILLNESS
   ============================ */
.stillness {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #0e0e12;
    position: relative;
    overflow: hidden;
}

.stillness-text {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: #c8beb0;
    max-width: 600px;
    text-align: center;
    line-height: 1.8;
    padding: 0 2rem;
}

.stillness-kanji {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 300;
    color: #c8beb0;
    opacity: 0.08;
    margin-top: 2rem;
    animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.05; }
    50% { opacity: 0.12; }
}

/* === FILM GRAIN === */
#grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
    opacity: 0.04;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .row-65-35,
    .row-35-65,
    .row-50-50 {
        grid-template-columns: 1fr;
    }

    .card-row .card + .card {
        border-top: 1px solid #5a4a3d;
    }

    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kanji-spear,
    .kanji-shield {
        font-size: clamp(5rem, 30vw, 10rem);
    }
}

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