/* rironbusou.net — Brutalist Terracotta Arsenal */
/* Fonts: Rokkitt, Roboto Slab, Noto Serif JP */
/* Palette: Kiln White #f5ece1, Parchment #f0e2d0, Forge Black #3d2b1f, 
   Terracotta #c2664a, Burnt Sienna #a0522d, Clay Red #8b3a2a, 
   Ash Warm #d4c4b0, Sumi Gray #5a4a3c */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #f5ece1;
    color: #3d2b1f;
    font-family: 'Roboto Slab', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.55;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   SECTION 1: THE ARSENAL (Hero)
   ============================================ */

.arsenal {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background-color: #f5ece1;
    background-image:
        linear-gradient(rgba(61,43,31,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61,43,31,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.arsenal-kanji {
    position: absolute;
    bottom: -5%;
    right: -5%;
    font-family: 'Noto Serif JP', serif;
    font-weight: 500;
    font-size: 45vw;
    color: rgba(194,102,74,0.08);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.arsenal-content {
    position: relative;
    z-index: 2;
    padding-left: 10%;
    max-width: 70%;
}

.arsenal-title {
    font-family: 'Rokkitt', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.15em;
    line-height: 1.05;
    text-transform: uppercase;
    color: #3d2b1f;
    animation: pulse 4s ease-in-out infinite;
}

.arsenal-rule {
    width: 100%;
    max-width: 60vw;
    height: 2px;
    background-color: #3d2b1f;
    margin: 1.5rem 0;
    position: relative;
}

.arsenal-rule::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 10px;
    height: 10px;
    background-color: #c2664a;
}

.arsenal-subtitle {
    font-family: 'Noto Serif JP', serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #c2664a;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.arsenal-tagline {
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #5a4a3c;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.015);
        opacity: 0.92;
    }
}

/* ============================================
   SECTION 2: THE DOCTRINE (Overlapping Cards)
   ============================================ */

.doctrine {
    position: relative;
    min-height: 100vh;
    padding: 8rem 5%;
    overflow: hidden;
    background-color: #f5ece1;
}

.doctrine-kanji {
    position: absolute;
    top: 5%;
    left: -8%;
    font-family: 'Noto Serif JP', serif;
    font-weight: 500;
    font-size: 40vw;
    color: rgba(194,102,74,0.06);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.doctrine-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    gap: 0;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 70vh;
    align-items: start;
}

.doctrine-card {
    background-color: #f0e2d0;
    padding: 2.5rem 2rem;
    box-shadow: 6px 6px 0 #3d2b1f;
    position: relative;
    transform: rotate(calc(var(--base-rotate) + var(--scroll-rotate)));
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: default;
}

.doctrine-card:hover {
    box-shadow: 10px 10px 0 #c2664a;
    transform: rotate(calc(var(--base-rotate) + var(--scroll-rotate))) translate(-2px, -2px);
}

.doctrine-card:active {
    box-shadow: 2px 2px 0 #8b3a2a;
    transform: rotate(calc(var(--base-rotate) + var(--scroll-rotate))) translate(2px, 2px);
}

.card-1 {
    grid-column: 1 / 7;
    grid-row: 1 / 2;
    z-index: 3;
    margin-top: 0;
}

.card-2 {
    grid-column: 5 / 11;
    grid-row: 1 / 2;
    z-index: 2;
    margin-top: 12rem;
}

.card-3 {
    grid-column: 3 / 9;
    grid-row: 2 / 3;
    z-index: 4;
    margin-top: -4rem;
}

.card-label {
    display: inline-block;
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c2664a;
    margin-bottom: 1rem;
    border-bottom: 2px solid #a0522d;
    padding-bottom: 0.25rem;
    animation: labelPulse 5s ease-in-out infinite;
}

@keyframes labelPulse {
    0%, 100% {
        letter-spacing: 0.2em;
    }
    50% {
        letter-spacing: 0.25em;
    }
}

.card-heading {
    font-family: 'Rokkitt', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
    color: #3d2b1f;
    margin-bottom: 1rem;
}

.card-text {
    font-family: 'Roboto Slab', serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1vw, 1rem);
    line-height: 1.55;
    color: #3d2b1f;
}

/* ============================================
   SECTION 3: THE ARMORY (Deep Reading)
   ============================================ */

.armory {
    position: relative;
    min-height: 100vh;
    padding: 8rem 5%;
    overflow: hidden;
    display: flex;
    background-color: #f5ece1;
}

.armory-kanji {
    position: absolute;
    bottom: 10%;
    right: 5%;
    font-family: 'Noto Serif JP', serif;
    font-weight: 500;
    font-size: 35vw;
    color: rgba(194,102,74,0.06);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.armory-content {
    position: relative;
    z-index: 2;
    width: 60%;
    max-width: 720px;
    padding-left: 5%;
}

.section-label {
    display: inline-block;
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c2664a;
    margin-bottom: 1.5rem;
    animation: labelPulse 5s ease-in-out infinite;
}

.armory-heading {
    font-family: 'Rokkitt', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.08em;
    line-height: 1.05;
    text-transform: uppercase;
    color: #3d2b1f;
    margin-bottom: 3rem;
}

.armory-text {
    font-family: 'Roboto Slab', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.55;
    color: #3d2b1f;
    margin-bottom: 2.5rem;
}

.armory-text:last-child {
    margin-bottom: 0;
}

.armory-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: repeating-radial-gradient(
        circle,
        transparent 0px,
        transparent 18px,
        rgba(194,102,74,0.06) 18px,
        rgba(194,102,74,0.06) 20px
    );
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   SECTION 4: THE FIELD (Conclusion)
   ============================================ */

.field {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5ece1;
    background-image:
        linear-gradient(rgba(61,43,31,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61,43,31,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.field-kanji {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Noto Serif JP', serif;
    font-weight: 500;
    font-size: 50vw;
    color: rgba(194,102,74,0.06);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.field-statement {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
    text-align: center;
}

.field-text {
    font-family: 'Rokkitt', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.08em;
    line-height: 1.15;
    text-transform: uppercase;
    color: #3d2b1f;
    animation: pulseFinal 3s ease-in-out infinite;
}

@keyframes pulseFinal {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.04);
        opacity: 0.85;
    }
}

/* ============================================
   BUBBLES SVG OVERLAY
   ============================================ */

.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: visible;
}

.bubble {
    fill: none;
    stroke: #c2664a;
    stroke-width: 1;
    animation: rise var(--duration) ease-in-out infinite, sway var(--sway-duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes rise {
    0% {
        transform: translateY(100vh);
        opacity: var(--bubble-opacity);
    }
    90% {
        opacity: var(--bubble-opacity);
    }
    100% {
        transform: translateY(-10vh);
        opacity: 0;
    }
}

@keyframes sway {
    0%, 100% {
        cx: calc(var(--base-x) - 5px);
    }
    50% {
        cx: calc(var(--base-x) + 5px);
    }
}

/* ============================================
   RESPONSIVE: TABLET (< 768px)
   ============================================ */

@media (max-width: 768px) {
    .doctrine-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .doctrine-card {
        transform: none !important;
        margin-top: 0 !important;
    }

    .card-1, .card-2, .card-3 {
        grid-column: auto;
        grid-row: auto;
        margin-top: 0;
    }

    .armory {
        flex-direction: column;
    }

    .armory-content {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
    }

    .armory-pattern {
        display: none;
    }

    .arsenal-kanji,
    .doctrine-kanji,
    .armory-kanji,
    .field-kanji {
        font-size: 25vw;
    }

    .arsenal-content {
        padding-left: 5%;
        max-width: 90%;
    }
}

/* ============================================
   RESPONSIVE: MOBILE (< 480px)
   ============================================ */

@media (max-width: 480px) {
    .arsenal, .doctrine, .armory, .field {
        padding: 2rem;
    }

    .doctrine {
        padding: 4rem 2rem;
    }

    .arsenal-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .field-text {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .armory-heading {
        font-size: clamp(1.8rem, 6vw, 3rem);
    }

    .card-heading {
        font-size: clamp(1.2rem, 4vw, 1.5rem);
    }
}
