/* parallel.day — Forest-Floor Data Observatory
   Goblincore aesthetic meets retro-futuristic data visualization */

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #5c4a3a #1e1a16;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #1e1a16;
}
::-webkit-scrollbar-thumb {
    background: #5c4a3a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a89070;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.7;
    color: #d4c4a8;
    background-color: #1e1a16;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   STIPPLE NOISE TEXTURE OVERLAY
   ============================================ */
.stipple-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ============================================
   SPECIMEN NAVIGATION (Left Edge)
   ============================================ */
.specimen-nav {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
}

.specimen-label {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 6px 12px;
    transform-origin: left center;
    transition: all 0.3s ease;
    position: relative;
}

.label-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: #6b5d4f;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    text-decoration: none;
    border-bottom: 1px dotted #5c4a3a;
    padding-bottom: 4px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.label-desc {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: #a89070;
    opacity: 0;
    white-space: nowrap;
    position: absolute;
    left: 36px;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: #2a2520;
    padding: 4px 8px;
    border: 1px solid #5c4a3a;
    border-radius: 2px;
}

.specimen-label:hover .label-text,
.specimen-label.active .label-text {
    color: #e8c36a;
    border-bottom-color: #e8c36a;
}

.specimen-label:hover .label-desc {
    opacity: 1;
}

/* ============================================
   SPREAD: SHARED LAYOUT
   ============================================ */
.spread {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding: 0 clamp(16px, 4vw, 80px);
}

.spread-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    column-gap: 24px;
    row-gap: 32px;
    padding: clamp(40px, 8vh, 100px) 0;
    min-height: 100vh;
    align-content: center;
    position: relative;
}

/* Headline zone: columns 1-5 */
.spread-headline {
    grid-column: 1 / 6;
    grid-row: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.spread-headline.reveal-headline {
    opacity: 1;
    transform: translateY(0);
}

/* Figure zone: columns 6-8 */
.spread-figure {
    grid-column: 6 / 9;
    grid-row: 1 / 3;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.spread-figure.reveal-figure {
    opacity: 1;
    transform: translateX(0);
}

/* Body zone: columns 1-5 */
.spread-body {
    grid-column: 1 / 6;
    grid-row: 2;
    max-width: 640px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.spread-body.reveal-body {
    opacity: 1;
    transform: translateY(0);
}

.spread-body p {
    margin-bottom: 1.2em;
}

.spread-body p:last-child {
    margin-bottom: 0;
}

/* Margin annotation: right edge */
.spread-margin {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.spread-margin.reveal-margin {
    opacity: 1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.display-heading {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-weight: 400;
    font-size: clamp(40px, 7vw, 96px);
    line-height: 0.95;
    letter-spacing: 0.08em;
    color: #e8c36a;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.display-dark {
    color: #2a2520;
}

.lede-text {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    font-weight: 600;
    font-size: clamp(18px, 3vw, 32px);
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: #a89070;
    max-width: 540px;
}

.lede-dark {
    color: #6b5d4f;
}

/* ============================================
   HERO SPREAD
   ============================================ */
.spread-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 40px;
}

.hero-title {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-weight: 400;
    font-size: clamp(60px, 15vw, 200px);
    line-height: 0.9;
    letter-spacing: 0.08em;
    color: #e8c36a;
    text-transform: uppercase;
    transition: opacity 0.5s ease;
}

.hero-dot {
    color: #c47a6a;
}

.hero-lede {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(16px, 2vw, 24px);
    color: #d4c4a8;
    margin-top: 20px;
    opacity: 0.8;
    line-height: 1.6;
}

.hero-network {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
}

.hero-network svg {
    width: 100%;
    height: 100%;
}

/* ============================================
   SPREADS: BACKGROUNDS
   ============================================ */
.spread-dark {
    background-color: #1e1a16;
}

.spread-surface {
    background-color: #2a2520;
}

.spread-light {
    background-color: #f5e6c8;
}

.spread-light .spread-body {
    color: #2a2520;
}

.spread-body-light {
    max-width: 100%;
    grid-column: 1 / 7;
}

.spread-inner-light .spread-headline {
    grid-column: 1 / 9;
}

/* Panel overlap effect */
.spread-dark + .spread-surface,
.spread-surface + .spread-dark {
    margin-top: -8px;
    border-top: 1px solid #5c4a3a;
}

/* ============================================
   FIGURE PANELS
   ============================================ */
.figure-panel {
    border: 1px solid #5c4a3a;
    border-radius: 2px;
    padding: 16px;
    background: rgba(42, 37, 32, 0.5);
    position: relative;
}

.data-viz {
    width: 100%;
    height: auto;
    display: block;
}

.figure-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #6b5d4f;
    letter-spacing: 0.04em;
    display: block;
    margin-top: 12px;
    text-align: center;
}

/* ============================================
   MARGIN NOTES (Field Notes)
   ============================================ */
.margin-note {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.note-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: #7a9a6a;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.note-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: #6b5d4f;
    line-height: 1.6;
    display: block;
}

.margin-note-dark .note-label {
    color: #5c4a3a;
}

.margin-note-dark .note-text {
    color: #6b5d4f;
}

/* ============================================
   SPECIMEN CARDS
   ============================================ */
.specimen-card {
    background: #f5e6c8;
    border: 1px solid #5c4a3a;
    outline: 0.5px solid #a89070;
    outline-offset: 4px;
    border-radius: 2px;
    padding: 24px;
    margin: 32px 0;
    position: relative;
}

.specimen-card-on-light {
    background: #fff8ee;
    margin: 0 0 24px 0;
}

.specimen-classification {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #6b5d4f;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

.specimen-title {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    font-weight: 600;
    font-size: clamp(18px, 2.5vw, 28px);
    letter-spacing: 0.04em;
    color: #2a2520;
    margin-bottom: 10px;
}

.specimen-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 1.6;
    color: #6b5d4f;
}

/* ============================================
   ORGANIC BLOBS
   ============================================ */
.organic-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    transition: transform 1.5s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.blob-moss {
    background: #7a9a6a;
    opacity: 0.08;
}

.blob-spore {
    background: #c47a6a;
    opacity: 0.06;
}

.blob-blue {
    background: #4a7a8a;
    opacity: 0.1;
}

.blob-1 {
    width: 400px;
    height: 400px;
    top: 20%;
    right: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    bottom: 10%;
    left: -80px;
}

.blob-3 {
    width: 500px;
    height: 500px;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
}

.blob-4 {
    width: 300px;
    height: 300px;
    bottom: 20%;
    right: 10%;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: #1e1a16;
    border-top: 1px solid #5c4a3a;
    padding: 60px clamp(16px, 4vw, 80px);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-domain {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 24px;
    letter-spacing: 0.08em;
    color: #e8c36a;
}

.footer-note {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 14px;
    color: #a89070;
    font-style: italic;
}

.footer-stamp {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: #6b5d4f;
    text-transform: uppercase;
}

/* ============================================
   SVG NODE PULSE ANIMATION
   ============================================ */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
        opacity: 0.9;
    }
    100% {
        opacity: 0.1;
    }
}

@keyframes ringReveal {
    from {
        stroke-dashoffset: var(--circumference);
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* ============================================
   RESPONSIVE: MOBILE
   ============================================ */
@media (max-width: 768px) {
    .specimen-nav {
        display: none;
    }

    .spread-inner {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .spread-headline,
    .spread-figure,
    .spread-body {
        max-width: 100%;
    }

    .spread-figure {
        order: -1;
    }

    .spread-margin {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
        writing-mode: horizontal-tb;
        margin-top: 24px;
    }

    .margin-note {
        writing-mode: horizontal-tb;
        transform: none;
        border-left: 2px solid #7a9a6a;
        padding-left: 12px;
    }

    .spread-inner-light .spread-headline {
        grid-column: auto;
    }

    .spread-body-light {
        grid-column: auto;
    }

    .hero-title {
        font-size: clamp(48px, 12vw, 120px);
    }
}

@media (max-width: 1024px) {
    .spread-margin {
        display: none;
    }
}

@media (min-width: 1025px) {
    .spread-margin {
        display: block;
    }
}
