/* monopole.one - Grainy Textured Botanical Science */
/* Colors: #1C1014, #C8B0A8, #3A6040, #B8963C, #8A5040, #4A2030, #E8D8D0, #F0E4D8 */
/* Fonts: Cormorant Garamond, Lora, JetBrains Mono */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #1C1014;
    color: #E8D8D0;
    font-family: 'Lora', serif;
    min-height: 100vh;
    position: relative;
}

/* Paper grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1000;
    opacity: 0.6;
}

/* Opening Border */
#opening-border {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border: 1px solid #8A5040;
    z-index: 500;
    pointer-events: none;
    animation: borderDraw 1.5s ease forwards;
}

@keyframes borderDraw {
    0% { width: 0; height: 0; opacity: 1; }
    50% { width: 80vw; height: 80vh; opacity: 1; }
    100% { width: 100vw; height: 100vh; opacity: 0; }
}

/* Header */
#cabinet-header {
    text-align: center;
    padding: 4rem 2rem 2rem;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.collection-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.01em;
    color: #E8D8D0;
    margin-bottom: 0.5rem;
}

.collection-subtitle {
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    color: #C8B0A8;
    font-style: italic;
}

/* Specimen Grid */
#specimen-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Specimen Cards */
.specimen-card {
    background: linear-gradient(145deg, #4A2030 0%, #2A1018 100%);
    border: 1px solid #8A5040;
    border-radius: 2px;
    padding: 1.5rem;
    aspect-ratio: 3 / 4;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.specimen-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.specimen-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Card grain overlay */
.specimen-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* Card Illustration */
.card-illustration {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(138, 80, 64, 0.3);
    margin-bottom: 1rem;
}

.specimen-svg {
    width: 100%;
    max-width: 160px;
    height: auto;
    opacity: 0.85;
}

/* Card Text */
.card-text {
    position: relative;
    z-index: 2;
}

.specimen-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    letter-spacing: 0.01em;
    color: #E8D8D0;
    margin-bottom: 0.25rem;
}

.specimen-latin {
    font-family: 'Lora', serif;
    font-size: 0.75rem;
    font-style: italic;
    color: #B8963C;
    margin-bottom: 0.75rem;
}

.specimen-body {
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    line-height: 1.75;
    font-weight: 400;
    color: #C8B0A8;
}

.specimen-number {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: #8A5040;
    z-index: 2;
}

/* Responsive */
@media (max-width: 900px) {
    #specimen-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #specimen-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .specimen-card {
        aspect-ratio: auto;
    }
}
