/* miris.monster - The Field Guide */

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

body {
    background-color: #E8DCC8;
    color: #2D2416;
    font-family: 'Patrick Hand', cursive;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    line-height: 1.7;
    overflow-x: hidden;
}

/* === The Cover === */
.cover {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 40px rgba(45, 36, 22, 0.15);
    background-image: repeating-conic-gradient(rgba(45,36,22,0.015) 0% 25%, transparent 0% 50%);
    background-size: 3px 3px;
    overflow: hidden;
}

.coffee-stain {
    position: absolute;
    top: 15%;
    right: 12%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 30%, #C4A872 32%, #C4A872 36%, transparent 38%);
    opacity: 0.2;
    pointer-events: none;
}

/* === Creature Silhouettes === */
.creature-sil {
    position: absolute;
    border-radius: 50%;
    background: #2D2416;
    opacity: 0.12;
    pointer-events: none;
}

.creature-sil::before,
.creature-sil::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: #F5F0E5;
}

.sil-1 { width: 30px; height: 30px; top: 20%; left: 8%; }
.sil-1::before { width: 6px; height: 6px; top: 8px; left: 8px; }
.sil-1::after { width: 6px; height: 6px; top: 8px; left: 16px; }

.sil-2 { width: 24px; height: 20px; bottom: 25%; left: 12%; border-radius: 40%; }
.sil-2::before { width: 5px; height: 5px; top: 5px; left: 5px; }

.sil-3 { width: 28px; height: 28px; top: 30%; right: 10%; }
.sil-3::before { width: 8px; height: 8px; top: 7px; left: 10px; }

.sil-4 { width: 22px; height: 18px; bottom: 20%; right: 15%; border-radius: 40%; }
.sil-4::before { width: 5px; height: 5px; top: 4px; left: 5px; }
.sil-4::after { width: 5px; height: 5px; top: 4px; left: 12px; }

.cover-content {
    text-align: center;
    animation: coverReveal 0.6s ease-out forwards;
    transform: scale(0.95);
}

@keyframes coverReveal {
    to { transform: scale(1); }
}

.cover-title {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #2D2416;
    line-height: 1;
    position: relative;
    display: inline-block;
}

.ink-drips {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
}

.cover-subtitle {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: #2D2416;
    letter-spacing: 0.15em;
    margin-top: 8px;
}

.cover-desc {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.1rem;
    color: #7A6E5A;
    margin-top: 24px;
}

/* === The Catalog === */
.catalog {
    padding: 80px 24px 100px;
    max-width: 1100px;
    margin: 0 auto;
}

.catalog-layout {
    display: flex;
    gap: 32px;
}

.catalog-masonry {
    flex: 1;
    columns: 2;
    column-gap: 20px;
}

/* === Creature Card === */
.creature-card {
    background: #F5F0E5;
    padding: 24px;
    margin-bottom: 20px;
    break-inside: avoid;
    transform: rotate(var(--rot, 0deg));
    box-shadow:
        1px 1px 0 #7A6E5A,
        -1px 0 0 rgba(122, 110, 90, 0.5),
        0 -1px 0 rgba(122, 110, 90, 0.3);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.creature-card.revealed {
    opacity: 1;
}

.creature-name {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(1.3rem, 2.5vw, 1.5rem);
    color: #2D2416;
    margin-bottom: 12px;
}

/* === Creature Art (CSS Illustrations) === */
.creature-art {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    position: relative;
}

/* Blob Monster - Gooplet */
.blob-body {
    width: 80px;
    height: 70px;
    background: #5A7A50;
    border-radius: 50% 50% 45% 55%;
    position: absolute;
    top: 25px;
    left: 20px;
    opacity: 0.7;
}

.blob-eye {
    width: 12px;
    height: 12px;
    background: #F5F0E5;
    border-radius: 50%;
    position: absolute;
}

.blob-eye::after {
    content: '';
    width: 5px;
    height: 5px;
    background: #2D2416;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 4px;
}

.blob-eye.eye-1 { top: 35px; left: 35px; }
.blob-eye.eye-2 { top: 30px; left: 55px; }
.blob-eye.eye-3 { top: 45px; left: 70px; }

/* Spike Beast - Thornback */
.spike-body {
    width: 70px;
    height: 50px;
    background: #8B3A2A;
    border-radius: 8px;
    position: absolute;
    top: 40px;
    left: 25px;
    opacity: 0.7;
}

.spike-horn {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 20px solid #8B3A2A;
    position: absolute;
    opacity: 0.7;
}

.spike-horn.horn-1 { top: 20px; left: 35px; }
.spike-horn.horn-2 { top: 15px; left: 55px; }
.spike-horn.horn-3 { top: 22px; left: 72px; }

.spike-eye {
    width: 14px;
    height: 8px;
    background: #B8963A;
    border-radius: 50%;
    position: absolute;
    top: 52px;
    left: 50px;
}

/* Floating Eye - Gazeling */
.eye-outer {
    width: 60px;
    height: 60px;
    border: 3px solid #5A4A7A;
    border-radius: 50%;
    position: absolute;
    top: 20px;
    left: 30px;
    opacity: 0.6;
}

.eye-iris {
    width: 30px;
    height: 30px;
    background: #5A4A7A;
    border-radius: 50%;
    position: absolute;
    top: 35px;
    left: 45px;
    opacity: 0.5;
}

.eye-pupil {
    width: 12px;
    height: 12px;
    background: #2D2416;
    border-radius: 50%;
    position: absolute;
    top: 44px;
    left: 54px;
}

.eye-wisp {
    width: 20px;
    height: 2px;
    background: #5A4A7A;
    position: absolute;
    top: 50px;
    opacity: 0.3;
}

.eye-wisp.wisp-l { left: 10px; transform: rotate(-10deg); }
.eye-wisp.wisp-r { right: 10px; transform: rotate(10deg); }

/* Mushroom - Sporeling */
.shroom-cap {
    width: 60px;
    height: 35px;
    background: #8B3A2A;
    border-radius: 50% 50% 10% 10%;
    position: absolute;
    top: 20px;
    left: 30px;
    opacity: 0.6;
}

.shroom-stem {
    width: 24px;
    height: 30px;
    background: #E8DCC8;
    border-radius: 4px;
    position: absolute;
    top: 50px;
    left: 48px;
    border: 1px solid #7A6E5A;
}

.shroom-foot {
    width: 14px;
    height: 10px;
    background: #7A6E5A;
    border-radius: 50%;
    position: absolute;
    top: 80px;
    opacity: 0.5;
}

.shroom-foot.foot-l { left: 40px; }
.shroom-foot.foot-r { left: 66px; }

.shroom-eye {
    width: 8px;
    height: 8px;
    background: #F5F0E5;
    border-radius: 50%;
    position: absolute;
    top: 55px;
}

.shroom-eye::after {
    content: '';
    width: 4px;
    height: 4px;
    background: #2D2416;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
}

.shroom-eye.eye-l { left: 48px; }
.shroom-eye.eye-r { left: 60px; }

/* Shadow Crawler - Noctilurk */
.shadow-body {
    width: 60px;
    height: 40px;
    background: #2D2416;
    border-radius: 30% 30% 50% 50%;
    position: absolute;
    top: 40px;
    left: 30px;
    opacity: 0.6;
}

.shadow-limb {
    width: 3px;
    height: 25px;
    background: #2D2416;
    position: absolute;
    opacity: 0.4;
    border-radius: 2px;
}

.shadow-limb.limb-1 { top: 65px; left: 38px; transform: rotate(-20deg); }
.shadow-limb.limb-2 { top: 65px; left: 50px; transform: rotate(-5deg); }
.shadow-limb.limb-3 { top: 65px; left: 62px; transform: rotate(5deg); }
.shadow-limb.limb-4 { top: 65px; left: 74px; transform: rotate(20deg); }

.shadow-eyes {
    width: 8px;
    height: 4px;
    background: #B8963A;
    border-radius: 50%;
    position: absolute;
    top: 50px;
    left: 52px;
    box-shadow: 16px 0 0 #B8963A;
}

/* Crystal Turtle - Geode Tortus */
.turtle-shell {
    width: 70px;
    height: 50px;
    background: #5A4A7A;
    border-radius: 50% 50% 40% 40%;
    position: absolute;
    top: 25px;
    left: 25px;
    opacity: 0.5;
}

.turtle-head {
    width: 20px;
    height: 18px;
    background: #7A6E5A;
    border-radius: 50%;
    position: absolute;
    top: 40px;
    left: 10px;
    opacity: 0.6;
}

.turtle-leg {
    width: 14px;
    height: 12px;
    background: #7A6E5A;
    border-radius: 40%;
    position: absolute;
    opacity: 0.5;
}

.turtle-leg.tl-1 { top: 65px; left: 32px; }
.turtle-leg.tl-2 { top: 65px; left: 72px; }

/* === Stat Block === */
.stat-block {
    margin: 12px 0;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.stat-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    color: #7A6E5A;
    width: 28px;
}

.stat-bar {
    height: 4px;
    max-width: 60px;
    border-radius: 2px;
}

.bar-hp { background: #8B3A2A; }
.bar-atk { background: #B8963A; }
.bar-def { background: #5A7A50; }

/* === Field Notes === */
.field-notes {
    font-family: 'Patrick Hand', cursive;
    font-size: 0.95rem;
    color: #2D2416;
    line-height: 1.7;
    margin-bottom: 12px;
}

/* === Tags === */
.habitat-tag {
    display: inline-block;
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    background: rgba(90, 122, 80, 0.15);
    color: #5A7A50;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 6px;
}

.rarity-tag {
    display: inline-block;
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    background: rgba(139, 58, 42, 0.15);
    color: #8B3A2A;
    padding: 2px 8px;
    border-radius: 3px;
}

.rarity-tag.magic {
    background: rgba(90, 74, 122, 0.15);
    color: #5A4A7A;
}

.rarity-tag.rare {
    background: rgba(184, 150, 58, 0.15);
    color: #B8963A;
}

/* === Sketch Wall === */
.sketch-wall {
    width: 180px;
    position: sticky;
    top: 20px;
    flex-shrink: 0;
    align-self: flex-start;
}

.sketch-piece {
    margin-bottom: 24px;
    text-align: center;
}

.sketch-label {
    font-family: 'Patrick Hand', cursive;
    font-size: 0.8rem;
    color: #7A6E5A;
    display: block;
    margin-top: 4px;
}

/* === The Final Page === */
.final-page {
    padding: 80px 24px 60px;
    text-align: center;
}

.page-divider {
    width: 120px;
    height: 1px;
    background: #2D2416;
    opacity: 0.2;
    margin: 0 auto 40px;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, 24px);
    gap: 6px;
    justify-content: center;
    margin-bottom: 32px;
}

.thumb {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    opacity: 0.6;
}

.t1, .t5, .t9, .t13 { background: #5A7A50; }
.t2, .t6, .t10, .t14 { background: #8B3A2A; }
.t3, .t7, .t11, .t15 { background: #5A4A7A; }
.t4, .t8, .t12, .t16 { background: #B8963A; }

.specimen-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
    color: #7A6E5A;
    margin-bottom: 4px;
}

.specimen-count {
    font-family: 'Courier Prime', monospace;
    font-size: 1.5rem;
    color: #2D2416;
    margin-bottom: 32px;
}

.final-note {
    font-family: 'Patrick Hand', cursive;
    font-size: 1rem;
    color: #7A6E5A;
    margin-bottom: 24px;
}

.signature {
    display: block;
    margin: 0 auto;
}

/* === Responsive === */
@media (max-width: 900px) {
    .sketch-wall { display: none; }
    .catalog-layout { display: block; }
}

@media (max-width: 600px) {
    .catalog-masonry {
        columns: 1;
    }

    .creature-card {
        transform: none;
    }
}
