/* miris.monster — Ethereal Botanical Herbarium */

:root {
    --void: #0A0A0A;
    --void-warm: #0B0A09;
    --obsidian: #141414;
    --filament: #C5A55A;
    --filament-dim: #B8963F;
    --aureate: #E8D5A3;
    --phantom: #8B7FA3;
    --bone: #F2EDE4;
    --blush: #A3717B;
    --verdigris: #5A7A6B;
}

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

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

body {
    font-family: 'Space Mono', monospace;
    background-color: var(--void);
    color: var(--aureate);
    overflow-x: hidden;
    line-height: 1.75;
    letter-spacing: 0.04em;
    transition: background-color 2s ease;
}

body.warmed {
    background-color: var(--void-warm);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.title-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.5rem, 6vw + 1rem, 5.5rem);
    letter-spacing: 0.12em;
    color: var(--filament);
    line-height: 1.1;
}

.section-header {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 3vw + 0.5rem, 2.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--aureate);
    margin-bottom: 1.5rem;
}

.mono-body {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.85rem, 1vw + 0.5rem, 1.05rem);
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.04em;
    color: var(--aureate);
}

.specimen-name {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 1.1rem;
    color: var(--bone);
    display: block;
    letter-spacing: 0.05em;
}

.specimen-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(197, 165, 90, 0.5);
    display: block;
    margin-top: 0.25rem;
}

.subtitle-text {
    font-size: 0.9rem;
    color: rgba(197, 165, 90, 0.6);
    margin-top: 1.5rem;
}

/* ========================================
   NAVIGATION SPINE
   ======================================== */

.nav-spine {
    position: fixed;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.vine-svg {
    position: absolute;
    top: -30px;
    bottom: -30px;
    width: 20px;
    height: calc(100% + 60px);
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    opacity: 1;
}

.specimen-num {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: rgba(197, 165, 90, 0.6);
    text-decoration: none;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    transition: color 300ms ease, text-shadow 300ms ease;
    position: relative;
}

.specimen-num:hover {
    color: var(--aureate);
    text-shadow: 0 0 8px rgba(197, 165, 90, 0.3);
}

.specimen-num.active {
    color: var(--filament);
}

/* ========================================
   POLLEN PARTICLES
   ======================================== */

.pollen-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.pollen {
    position: absolute;
    border-radius: 50%;
    background-color: var(--aureate);
    opacity: 0.15;
    animation: pollenDrift var(--drift-duration, 20s) linear infinite;
}

.pollen.large {
    width: 3px;
    height: 3px;
}

.pollen.small {
    width: 2px;
    height: 2px;
    opacity: 0.1;
}

@keyframes pollenDrift {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(var(--drift-x, 50px), var(--drift-y, -80px));
    }
    50% {
        transform: translate(calc(var(--drift-x, 50px) * 0.3), calc(var(--drift-y, -80px) * 2.2));
    }
    75% {
        transform: translate(calc(var(--drift-x, 50px) * -0.5), calc(var(--drift-y, -80px) * 1.3));
    }
    100% {
        transform: translate(0, 0);
    }
}

/* ========================================
   CABINET GRID
   ======================================== */

.cabinet {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1px;
    padding: 0 56px 56px 56px;
    background: linear-gradient(
        180deg,
        rgba(197, 165, 90, 0.06) 0%,
        rgba(197, 165, 90, 0.1) 100%
    );
    max-width: 1440px;
    margin: 0 auto;
}

/* ========================================
   SPECIMEN CASES
   ======================================== */

.specimen-case {
    background-color: var(--void);
    padding: 24px;
    position: relative;
    box-shadow: 0 0 20px rgba(197, 165, 90, 0) inset;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 600ms cubic-bezier(0.23, 1, 0.32, 1),
        transform 600ms cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 800ms ease;
    overflow: hidden;
}

.specimen-case.visible {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 0 20px rgba(197, 165, 90, 0.03) inset;
}

.specimen-case:hover {
    box-shadow: 0 0 30px rgba(197, 165, 90, 0.08) inset;
}

/* Gold leaf shimmer border on hover */
.specimen-case::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(197, 165, 90, 0.4);
    transition: border-color 300ms ease;
    pointer-events: none;
    z-index: 2;
}

.specimen-case:hover::before {
    border-color: rgba(197, 165, 90, 0.8);
}

/* Noise / watercolor paper grain overlay */
.noise-overlay {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(197, 165, 90, 0.3) 0.5px, transparent 0.5px),
        radial-gradient(circle, rgba(242, 237, 228, 0.15) 0.5px, transparent 0.5px);
    background-size: 7px 7px, 11px 11px;
    background-position: 0 0, 3px 4px;
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

/* Case corner ornaments */
.case-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0.25;
    z-index: 3;
}

.case-corner-tl {
    top: 8px;
    left: 8px;
    clip-path: polygon(0 0, 100% 0, 60% 20%, 40% 40%, 20% 60%, 0 100%);
    background: linear-gradient(135deg, var(--filament), var(--filament-dim));
}

.case-corner-br {
    bottom: 8px;
    right: 8px;
    clip-path: polygon(100% 100%, 0 100%, 40% 80%, 60% 60%, 80% 40%, 100% 0);
    background: linear-gradient(315deg, var(--filament), var(--filament-dim));
}

/* ========================================
   GRID PLACEMENT — 12-column Irregular
   ======================================== */

/* Title: large cell spanning 1-8, rows 1-3 */
.title-case {
    grid-column: 1 / 9;
    grid-row: 1 / 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    min-height: 70vh;
}

/* Specimen 2: columns 9-12, rows 1-2 */
.case-2 {
    grid-column: 9 / 13;
    grid-row: 1 / 3;
    min-height: 300px;
}

/* Specimen 3: columns 9-12, rows 3-5 */
.case-3 {
    grid-column: 9 / 13;
    grid-row: 3 / 5;
    min-height: 320px;
}

/* Specimen 4: columns 1-4, rows 4-5 */
.case-4 {
    grid-column: 1 / 5;
    grid-row: 4 / 6;
    min-height: 260px;
    display: flex;
    align-items: center;
    padding: 2rem;
}

/* Specimen 5: columns 5-12, rows 5-7 */
.case-5 {
    grid-column: 5 / 13;
    grid-row: 5 / 8;
    min-height: 400px;
}

/* Specimen 6: columns 1-6, rows 6-8 */
.case-6 {
    grid-column: 1 / 7;
    grid-row: 6 / 8;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
}

/* Specimen 7: columns 1-5, rows 8-10 */
.case-7 {
    grid-column: 1 / 6;
    grid-row: 8 / 10;
    min-height: 340px;
}

/* Specimen 8: columns 6-12, rows 8-10 */
.case-8 {
    grid-column: 6 / 13;
    grid-row: 8 / 10;
    min-height: 340px;
}

/* Specimen 9: columns 1-4, rows 10-11 */
.case-9 {
    grid-column: 1 / 5;
    grid-row: 10 / 12;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
}

/* Specimen 10: columns 5-9, rows 10-12 */
.case-10 {
    grid-column: 5 / 10;
    grid-row: 10 / 13;
    min-height: 380px;
}

/* Specimen 11: columns 10-12, rows 10-11 */
.case-11 {
    grid-column: 10 / 13;
    grid-row: 10 / 12;
    min-height: 300px;
}

/* Specimen 12: closing — columns 1-12, row 13 */
.case-12 {
    grid-column: 1 / 13;
    grid-row: 13 / 14;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem;
}

.case-text {
    max-width: 520px;
    position: relative;
    z-index: 2;
}

.closing-text {
    max-width: 600px;
}

.closing-meta {
    margin-top: 2rem;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}

/* ========================================
   SPECIMEN LABELS
   ======================================== */

.specimen-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    border: 1px solid rgba(197, 165, 90, 0.3);
    padding: 10px 14px;
    background-color: rgba(10, 10, 10, 0.85);
    z-index: 5;
    transition: border-color 300ms ease;
}

.specimen-case:hover .specimen-label {
    border-color: rgba(197, 165, 90, 0.6);
}

/* ========================================
   BOTANICAL SPECIMENS — CSS WATERCOLOR
   ======================================== */

.botanical-specimen {
    position: relative;
    width: 100%;
    height: calc(100% - 80px);
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Paper grain overlay on specimens */
.botanical-specimen::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(197, 165, 90, 0.3) 0.5px, transparent 0.5px);
    background-size: 6px 6px;
    background-position: 1px 1px;
    opacity: 0.04;
    pointer-events: none;
}

/* Common petal styles */
.petal {
    position: absolute;
    border-radius: 40% 60% 55% 45% / 60% 40% 50% 55%;
    opacity: 0.6;
    transition: transform 600ms ease-out;
    mix-blend-mode: screen;
}

.specimen-case:hover .petal {
    transform: scale(1.03);
}

/* Common leaf styles */
.leaf {
    position: absolute;
    opacity: 0.45;
    transition: transform 600ms ease-out;
}

.specimen-case:hover .leaf {
    transform: scale(1.03);
}

/* Stems */
.stem {
    position: absolute;
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, var(--verdigris), transparent);
    bottom: 5%;
    left: 50%;
    opacity: 0.35;
}

.stem-long {
    height: 120px;
}

.stem-thin {
    width: 1px;
    height: 60px;
    opacity: 0.25;
}

.stem-curve {
    width: 2px;
    height: 90px;
    background: linear-gradient(to bottom, var(--verdigris), transparent);
    bottom: 5%;
    left: 45%;
    opacity: 0.3;
    transform: rotate(5deg);
}

.stamen {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--filament);
    top: 35%;
    left: 48%;
    opacity: 0.5;
    box-shadow:
        6px 3px 0 rgba(197, 165, 90, 0.3),
        -4px 5px 0 rgba(197, 165, 90, 0.2),
        2px -4px 0 rgba(197, 165, 90, 0.25);
}

/* ============ VARIANT A — Rosa Phantasma ============ */
.petal-a1 {
    width: 80px; height: 90px;
    background: radial-gradient(ellipse at 40% 40%, var(--blush), rgba(163, 113, 123, 0.15));
    top: 15%; left: 28%;
}

.petal-a2 {
    width: 70px; height: 85px;
    background: radial-gradient(ellipse at 60% 30%, var(--phantom), rgba(139, 127, 163, 0.15));
    top: 8%; left: 48%;
    border-radius: 50% 45% 55% 50% / 55% 50% 45% 50%;
    transform: rotate(25deg);
}

.petal-a3 {
    width: 60px; height: 70px;
    background: radial-gradient(ellipse at 50% 50%, rgba(163, 113, 123, 0.8), transparent);
    top: 30%; left: 40%;
    border-radius: 45% 55% 50% 50% / 50% 55% 45% 55%;
    transform: rotate(-15deg);
}

.petal-a4 {
    width: 50px; height: 60px;
    background: radial-gradient(ellipse at 45% 55%, rgba(139, 127, 163, 0.6), transparent);
    top: 22%; left: 55%;
    border-radius: 55% 45% 50% 50% / 45% 55% 50% 50%;
}

.leaf-a1 {
    width: 40px; height: 60px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(135deg, var(--verdigris), transparent);
    bottom: 12%; left: 32%;
}

.leaf-a2 {
    width: 35px; height: 55px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(45deg, var(--verdigris), transparent);
    bottom: 18%; right: 25%;
    transform: rotate(20deg);
}

/* ============ VARIANT B — Lunaria Digitalis ============ */
.variant-b .petal-b1 {
    width: 90px; height: 70px;
    background: radial-gradient(ellipse at 50% 40%, var(--phantom), rgba(139, 127, 163, 0.1));
    top: 12%; left: 22%;
    border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%;
}

.variant-b .petal-b2 {
    width: 75px; height: 88px;
    background: radial-gradient(ellipse at 40% 60%, var(--blush), rgba(163, 113, 123, 0.1));
    top: 20%; left: 48%;
    border-radius: 45% 55% 50% 50% / 50% 50% 55% 45%;
}

.variant-b .petal-b3 {
    width: 55px; height: 65px;
    background: radial-gradient(ellipse at 55% 35%, rgba(139, 127, 163, 0.7), transparent);
    top: 28%; left: 35%;
    border-radius: 52% 48% 46% 54% / 58% 42% 55% 45%;
}

.variant-b .leaf-b1 {
    width: 32px; height: 48px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(135deg, var(--verdigris), transparent);
    bottom: 25%; left: 50%;
}

.variant-b .leaf-b2 {
    width: 28px; height: 42px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(225deg, var(--verdigris), transparent);
    bottom: 30%; left: 35%;
    transform: rotate(-15deg);
}

/* ============ VARIANT C — Iris Nocturna ============ */
.variant-c .petal-c1 {
    width: 110px; height: 90px;
    background: radial-gradient(ellipse at 30% 40%, var(--blush), rgba(163, 113, 123, 0.12));
    top: 8%; left: 15%;
}

.variant-c .petal-c2 {
    width: 80px; height: 110px;
    background: radial-gradient(ellipse at 50% 30%, var(--phantom), rgba(139, 127, 163, 0.12));
    top: 3%; left: 50%;
    border-radius: 55% 45% 50% 50% / 45% 55% 50% 50%;
}

.variant-c .petal-c3 {
    width: 65px; height: 75px;
    background: radial-gradient(ellipse at 60% 50%, rgba(163, 113, 123, 0.7), transparent);
    top: 28%; left: 38%;
    border-radius: 48% 52% 55% 45% / 52% 48% 45% 55%;
}

.variant-c .petal-c4 {
    width: 70px; height: 60px;
    background: radial-gradient(ellipse at 40% 60%, rgba(139, 127, 163, 0.5), transparent);
    top: 18%; left: 30%;
    border-radius: 55% 45% 48% 52% / 50% 50% 52% 48%;
    transform: rotate(10deg);
}

.variant-c .petal-c5 {
    width: 55px; height: 80px;
    background: radial-gradient(ellipse at 50% 40%, rgba(163, 113, 123, 0.4), transparent);
    top: 15%; left: 60%;
    border-radius: 42% 58% 52% 48% / 55% 45% 48% 52%;
}

.variant-c .leaf-c1 {
    width: 50px; height: 70px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(135deg, var(--verdigris), transparent);
    bottom: 8%; left: 22%;
    opacity: 0.4;
}

.variant-c .leaf-c2 {
    width: 40px; height: 55px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(45deg, var(--verdigris), transparent);
    bottom: 12%; right: 22%;
    opacity: 0.35;
    transform: rotate(15deg);
}

.variant-c .leaf-c3 {
    width: 30px; height: 45px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(90deg, var(--verdigris), transparent);
    bottom: 20%; left: 45%;
    opacity: 0.3;
}

/* ============ VARIANT D — Viola Memoria ============ */
.variant-d .petal-d1 {
    width: 85px; height: 95px;
    background: radial-gradient(ellipse at 40% 35%, var(--phantom), rgba(139, 127, 163, 0.1));
    top: 12%; left: 25%;
    border-radius: 50% 50% 40% 60% / 60% 40% 55% 45%;
}

.variant-d .petal-d2 {
    width: 70px; height: 80px;
    background: radial-gradient(ellipse at 55% 45%, var(--blush), rgba(163, 113, 123, 0.15));
    top: 22%; left: 50%;
    border-radius: 45% 55% 52% 48% / 48% 52% 45% 55%;
}

.variant-d .petal-d3 {
    width: 55px; height: 65px;
    background: radial-gradient(ellipse at 50% 50%, rgba(139, 127, 163, 0.6), transparent);
    top: 30%; left: 38%;
    border-radius: 52% 48% 45% 55% / 55% 45% 50% 50%;
}

.variant-d .leaf-d1 {
    width: 42px; height: 60px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(135deg, var(--verdigris), transparent);
    bottom: 15%; left: 35%;
    opacity: 0.4;
}

.variant-d .leaf-d2 {
    width: 35px; height: 50px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(45deg, var(--verdigris), transparent);
    bottom: 20%; right: 30%;
    opacity: 0.35;
    transform: rotate(-10deg);
}

/* ============ VARIANT E — Helleborus Spectrale ============ */
.variant-e .petal-e1 {
    width: 95px; height: 80px;
    background: radial-gradient(ellipse at 45% 40%, var(--phantom), rgba(139, 127, 163, 0.12));
    top: 10%; left: 20%;
    border-radius: 48% 52% 55% 45% / 55% 45% 48% 52%;
}

.variant-e .petal-e2 {
    width: 75px; height: 95px;
    background: radial-gradient(ellipse at 50% 35%, var(--blush), rgba(163, 113, 123, 0.12));
    top: 5%; left: 50%;
    border-radius: 52% 48% 45% 55% / 48% 52% 55% 45%;
}

.variant-e .petal-e3 {
    width: 60px; height: 70px;
    background: radial-gradient(ellipse at 55% 50%, rgba(163, 113, 123, 0.65), transparent);
    top: 25%; left: 35%;
}

.variant-e .petal-e4 {
    width: 50px; height: 55px;
    background: radial-gradient(ellipse at 40% 45%, rgba(139, 127, 163, 0.5), transparent);
    top: 20%; left: 55%;
    border-radius: 55% 45% 50% 50% / 50% 50% 45% 55%;
}

.variant-e .leaf-e1 {
    width: 45px; height: 65px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(160deg, var(--verdigris), transparent);
    bottom: 12%; left: 30%;
    opacity: 0.4;
}

/* ============ VARIANT F — Dahlia Umbrae ============ */
.variant-f .petal-f1 {
    width: 100px; height: 85px;
    background: radial-gradient(ellipse at 35% 45%, var(--blush), rgba(163, 113, 123, 0.1));
    top: 8%; left: 18%;
    border-radius: 50% 50% 45% 55% / 55% 45% 52% 48%;
}

.variant-f .petal-f2 {
    width: 85px; height: 100px;
    background: radial-gradient(ellipse at 55% 35%, var(--phantom), rgba(139, 127, 163, 0.1));
    top: 3%; left: 48%;
    border-radius: 45% 55% 52% 48% / 50% 50% 48% 52%;
}

.variant-f .petal-f3 {
    width: 70px; height: 75px;
    background: radial-gradient(ellipse at 50% 50%, rgba(163, 113, 123, 0.6), transparent);
    top: 22%; left: 32%;
    border-radius: 52% 48% 50% 50% / 48% 52% 50% 50%;
}

.variant-f .petal-f4 {
    width: 60px; height: 70px;
    background: radial-gradient(ellipse at 45% 40%, rgba(139, 127, 163, 0.5), transparent);
    top: 15%; left: 55%;
    border-radius: 48% 52% 45% 55% / 55% 45% 52% 48%;
    transform: rotate(8deg);
}

.variant-f .petal-f5 {
    width: 45px; height: 55px;
    background: radial-gradient(ellipse at 50% 55%, rgba(163, 113, 123, 0.4), transparent);
    top: 35%; left: 42%;
    border-radius: 55% 45% 48% 52% / 52% 48% 55% 45%;
}

.variant-f .leaf-f1 {
    width: 48px; height: 68px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(135deg, var(--verdigris), transparent);
    bottom: 10%; left: 25%;
    opacity: 0.4;
}

.variant-f .leaf-f2 {
    width: 38px; height: 55px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(45deg, var(--verdigris), transparent);
    bottom: 15%; right: 20%;
    opacity: 0.35;
    transform: rotate(12deg);
}

/* ============ VARIANT G — Aconitum Somnium ============ */
.variant-g .petal-g1 {
    width: 75px; height: 85px;
    background: radial-gradient(ellipse at 45% 40%, var(--phantom), rgba(139, 127, 163, 0.12));
    top: 10%; left: 25%;
    border-radius: 50% 50% 42% 58% / 58% 42% 50% 50%;
}

.variant-g .petal-g2 {
    width: 60px; height: 75px;
    background: radial-gradient(ellipse at 55% 50%, var(--blush), rgba(163, 113, 123, 0.12));
    top: 20%; left: 50%;
    border-radius: 45% 55% 55% 45% / 50% 50% 45% 55%;
}

.variant-g .leaf-g1 {
    width: 35px; height: 50px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(135deg, var(--verdigris), transparent);
    bottom: 20%; left: 40%;
    opacity: 0.4;
}

/* ========================================
   TYPEWRITER SYSTEM
   ======================================== */

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: var(--filament);
    vertical-align: text-bottom;
    animation: blink 530ms step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.typewriter .char {
    opacity: 0;
    transition: opacity 80ms ease-in;
}

.typewriter .char.revealed {
    opacity: 1;
}

/* ========================================
   GOLD LEAF SHIMMER EFFECT
   ======================================== */

.specimen-case::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: repeating-linear-gradient(
        90deg,
        rgba(197, 165, 90, 0.5) 0px,
        rgba(184, 150, 63, 0.7) 1px,
        rgba(197, 165, 90, 0.4) 2px,
        rgba(184, 150, 63, 0.6) 3px
    );
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 400ms ease, transform 600ms ease;
    transform: translateX(-100%);
}

.specimen-case:hover::after {
    opacity: 0.04;
    transform: translateX(0);
}

/* ========================================
   RESPONSIVE — TABLET (768px - 1200px)
   ======================================== */

@media (max-width: 1200px) {
    .cabinet {
        grid-template-columns: repeat(6, 1fr);
        padding: 0 36px 36px 36px;
    }

    .title-case {
        grid-column: 1 / 7;
        grid-row: 1 / 3;
        min-height: 55vh;
        padding: 3rem;
    }
    .case-2 { grid-column: 1 / 4; grid-row: 3 / 5; }
    .case-3 { grid-column: 4 / 7; grid-row: 3 / 5; }
    .case-4 { grid-column: 1 / 4; grid-row: 5 / 6; }
    .case-5 { grid-column: 4 / 7; grid-row: 5 / 7; }
    .case-6 { grid-column: 1 / 4; grid-row: 6 / 7; }
    .case-7 { grid-column: 1 / 4; grid-row: 7 / 9; }
    .case-8 { grid-column: 4 / 7; grid-row: 7 / 9; }
    .case-9 { grid-column: 1 / 4; grid-row: 9 / 10; }
    .case-10 { grid-column: 4 / 7; grid-row: 9 / 11; }
    .case-11 { grid-column: 1 / 4; grid-row: 10 / 11; }
    .case-12 { grid-column: 1 / 7; grid-row: 11 / 12; }
}

/* ========================================
   RESPONSIVE — MOBILE (< 768px)
   ======================================== */

@media (max-width: 768px) {
    .cabinet {
        grid-template-columns: 3fr 2fr;
        padding: 0 16px 16px 16px;
    }

    .title-case { grid-column: 1 / 3; grid-row: auto; min-height: 50vh; }
    .case-2 { grid-column: 1 / 2; grid-row: auto; }
    .case-3 { grid-column: 2 / 3; grid-row: auto; }
    .case-4 { grid-column: 1 / 3; grid-row: auto; }
    .case-5 { grid-column: 1 / 3; grid-row: auto; }
    .case-6 { grid-column: 1 / 3; grid-row: auto; }
    .case-7 { grid-column: 1 / 2; grid-row: auto; }
    .case-8 { grid-column: 2 / 3; grid-row: auto; }
    .case-9 { grid-column: 1 / 3; grid-row: auto; }
    .case-10 { grid-column: 1 / 2; grid-row: auto; }
    .case-11 { grid-column: 2 / 3; grid-row: auto; }
    .case-12 { grid-column: 1 / 3; grid-row: auto; }

    .nav-spine { display: none; }

    .specimen-case { min-height: 250px; }
    .title-case { padding: 2rem; }
}

/* ========================================
   RESPONSIVE — SMALL MOBILE (< 480px)
   ======================================== */

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

    .title-case,
    .case-2, .case-3, .case-4, .case-5,
    .case-6, .case-7, .case-8, .case-9,
    .case-10, .case-11, .case-12 {
        grid-column: 1;
        grid-row: auto;
        border-bottom: 1px solid rgba(197, 165, 90, 0.2);
    }

    .title-text {
        font-size: 2.5rem;
    }

    .cabinet {
        padding: 0 12px 12px 12px;
    }

    .specimen-case {
        padding: 20px;
    }
}
