/* ppuzzle.works - Sci-Fi Botanical Field Guide */

:root {
    --parchment: #E8E0D0;
    --lavender: #9B8EB0;
    --dark-earth: #3A3226;
    --warm-stone: #7A7264;
    --cream: #F4EDE0;
    --ivory: #FAF5EC;
    --terracotta: #C4A088;
    --graphite: #4A4A4A;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--ivory);
    color: var(--dark-earth);
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.8;
    overflow-x: hidden;
}

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 40px;
}

/* Cover Plate */
.cover-plate {
    flex-direction: column;
    text-align: center;
    background: var(--cream);
    gap: 24px;
}

.cover-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--warm-stone);
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.wordmark {
    font-family: 'EB Garamond', serif;
    font-weight: 500;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    letter-spacing: 0.02em;
    color: var(--dark-earth);
    opacity: 0;
    animation: coverReveal 1.5s ease-out 0.3s forwards;
}

.cover-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--warm-stone);
    max-width: 500px;
    margin: 0 auto;
    opacity: 0;
    animation: coverReveal 1.2s ease-out 0.8s forwards;
}

.cover-edition {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 14px;
    color: var(--terracotta);
    letter-spacing: 0.08em;
    opacity: 0;
    animation: coverReveal 1s ease-out 1.2s forwards;
}

@keyframes coverReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cover-botanical {
    opacity: 0.4;
    margin-top: 16px;
}

/* Plates */
.plate {
    flex-direction: column;
    max-width: 700px;
    margin: 0 auto;
    gap: 32px;
}

.plate-header {
    text-align: center;
}

.plate-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--terracotta);
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.plate-title {
    font-family: 'EB Garamond', serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: 0.02em;
    color: var(--dark-earth);
    margin-bottom: 4px;
}

.plate-label {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 14px;
    color: var(--lavender);
    letter-spacing: 0.04em;
}

.plate-body {
    max-width: 560px;
    margin: 0 auto;
}

.plate-text {
    font-size: 16px;
    color: var(--dark-earth);
    line-height: 1.9;
    margin-bottom: 24px;
    text-align: justify;
}

/* Pullquotes */
.pullquote {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 18px;
    color: var(--lavender);
    padding: 20px 0;
    border-top: 1px solid rgba(155, 142, 176, 0.2);
    border-bottom: 1px solid rgba(155, 142, 176, 0.2);
    text-align: center;
    line-height: 1.7;
}

/* Reveal animation */
.reveal-block {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-block.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Specimen Grid */
.specimen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.specimen {
    padding: 16px;
    border: 1px solid rgba(122, 114, 100, 0.15);
    text-align: center;
}

.specimen-label {
    display: block;
    font-family: 'EB Garamond', serif;
    font-weight: 500;
    font-size: 15px;
    color: var(--dark-earth);
    margin-bottom: 4px;
}

.specimen-class {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 12px;
    color: var(--warm-stone);
}

/* Alternating plate backgrounds */
#plate1 {
    background: var(--ivory);
}

#plate2 {
    background: var(--cream);
}

#plate3 {
    background: var(--parchment);
}

/* Endpiece */
.endpiece {
    background: var(--dark-earth);
    text-align: center;
}

.endpiece-content {
    max-width: 500px;
}

.endpiece-title {
    font-family: 'EB Garamond', serif;
    font-weight: 500;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    color: var(--cream);
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

.endpiece-text {
    font-size: 15px;
    color: var(--parchment);
    line-height: 1.8;
    margin-bottom: 28px;
}

.endpiece-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.contact-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    color: var(--warm-stone);
    text-transform: uppercase;
}

.contact-value {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 15px;
    color: var(--terracotta);
}

/* Glitch Overlay */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(155, 142, 176, 0.08) 2px,
        rgba(155, 142, 176, 0.08) 4px
    );
    transition: opacity 0.1s;
}

.glitch-overlay.active {
    opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .specimen-grid {
        grid-template-columns: 1fr;
    }
}
