/* =============================================
   interplanetary.biz - The Diplomatic Scroll
   Deep Burgundy Cosmos / Watercolor Parchment
   ============================================= */

:root {
    --parchment: #f5ede3;
    --vellum: #e8d5c4;
    --nebula-rose: #c4506a;
    --cabernet-void: #7a1f3a;
    --ink-burgundy: #2b0a14;
    --deep-wine: #3d1a26;
    --stellar-gold: #c9a84c;
    --dark-claret: #4a0e24;
    --mauve-dust: #8b4a5e;
    --copper-flare: #d4875e;
}

/* =============================================
   Reset & Base
   ============================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--parchment);
    color: var(--deep-wine);
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    line-height: 1.78;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Paper Grain Texture */
.paper-texture {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.03;
    filter: url(#paper-grain);
    background: var(--parchment);
}

/* =============================================
   Typography
   ============================================= */

h1, h2, h3 {
    font-family: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-burgundy);
    text-shadow: 2px 2px 0 rgba(139, 30, 63, 0.15);
}

h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 2rem;
}

h3 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: 0.08em;
}

p {
    margin-bottom: 1.5rem;
}

code {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: #5a2035;
}

/* =============================================
   Zone Labels & Annotations
   ============================================= */

.zone-label {
    font-family: 'Space Grotesk', 'Arial', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mauve-dust);
    margin-bottom: 1rem;
}

.subtitle-annotation {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--cabernet-void);
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
}

.classification-code {
    font-family: 'Space Grotesk', 'Arial', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mauve-dust);
}

.data-field {
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--vellum);
}

.colophon-text {
    font-style: italic;
    color: var(--mauve-dust);
    font-size: 0.95rem;
}

/* =============================================
   Main Layout - Single Column Scroll
   ============================================= */

main {
    position: relative;
    z-index: 2;
    max-width: 100%;
}

/* =============================================
   Zone Containers
   ============================================= */

.zone-container {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zone-content {
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(4rem, 8vh, 10rem) clamp(2rem, 5vw, 6rem);
    position: relative;
    z-index: 3;
}

.zone-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.1s linear, filter 0.1s linear;
}

.zone-overlay svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* =============================================
   Angular Zone Dividers
   ============================================= */

.zone-divider {
    position: relative;
    z-index: 4;
    height: 80px;
    background: var(--dark-claret);
}

.divider-left {
    clip-path: polygon(0 0, 100% 20%, 100% 80%, 0 100%);
}

.divider-right {
    clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 80%);
}

/* =============================================
   Organic Blob Constellations
   ============================================= */

.organic-blob {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    animation: drift 18s ease-in-out infinite alternate;
}

.blob-1 {
    width: 160px;
    height: 160px;
    border-radius: 47% 63% 38% 72% / 55% 42% 68% 35%;
    background: radial-gradient(circle at 40% 40%, rgba(196, 80, 106, 0.3), rgba(122, 31, 58, 0.15));
    top: 10%;
    right: calc(50% + 400px);
}

.blob-2 {
    width: 100px;
    height: 100px;
    border-radius: 62% 38% 55% 45% / 40% 65% 35% 60%;
    background: radial-gradient(circle at 50% 50%, rgba(196, 80, 106, 0.25), rgba(122, 31, 58, 0.1));
    bottom: 15%;
    left: calc(50% + 420px);
    animation-delay: -5s;
    animation-duration: 22s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    border-radius: 35% 65% 50% 50% / 60% 35% 65% 40%;
    background: radial-gradient(circle at 45% 45%, rgba(196, 80, 106, 0.35), rgba(122, 31, 58, 0.15));
    top: 5%;
    left: calc(50% + 380px);
    animation-delay: -3s;
}

.blob-4 {
    width: 80px;
    height: 80px;
    border-radius: 55% 45% 60% 40% / 42% 58% 42% 58%;
    background: radial-gradient(circle at 50% 50%, rgba(196, 80, 106, 0.2), rgba(122, 31, 58, 0.08));
    top: 40%;
    right: calc(50% + 430px);
    animation-delay: -8s;
    animation-duration: 20s;
}

.blob-5 {
    width: 120px;
    height: 120px;
    border-radius: 42% 58% 65% 35% / 50% 40% 60% 50%;
    background: radial-gradient(circle at 55% 40%, rgba(196, 80, 106, 0.28), rgba(122, 31, 58, 0.12));
    bottom: 10%;
    right: calc(50% + 390px);
    animation-delay: -12s;
    animation-duration: 24s;
}

.blob-6 {
    width: 140px;
    height: 140px;
    border-radius: 50% 50% 40% 60% / 55% 45% 55% 45%;
    background: radial-gradient(circle at 40% 50%, rgba(196, 80, 106, 0.3), rgba(122, 31, 58, 0.12));
    top: 20%;
    left: calc(50% + 400px);
    animation-delay: -7s;
    animation-duration: 21s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(8px, -12px) rotate(3deg);
    }
}

/* =============================================
   Wax Seal
   ============================================= */

.wax-seal {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.wax-seal-bottom {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.seal-svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 2px 8px rgba(43, 10, 20, 0.4));
    transition: transform 0.4s ease, filter 0.4s ease;
    cursor: default;
}

.seal-svg:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 4px 16px rgba(43, 10, 20, 0.6));
}

.seal-text {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 10px;
    fill: var(--parchment);
    letter-spacing: 0.15em;
}

/* =============================================
   Trade Route Map
   ============================================= */

.trade-routes {
    margin: 2rem 0;
    overflow: hidden;
}

.route-map {
    width: 100%;
    max-width: 720px;
    height: auto;
    background: rgba(245, 237, 227, 0.3);
    border: 1px solid var(--vellum);
}

.route-annotation {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 9px;
    fill: var(--mauve-dust);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* =============================================
   Resource Catalog
   ============================================= */

.resource-catalog {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem 0;
    justify-content: center;
}

.resource-blob {
    width: 160px;
    height: 160px;
    border-radius: 47% 63% 38% 72% / 55% 42% 68% 35%;
    background: radial-gradient(circle at 40% 40%, rgba(196, 80, 106, 0.2), rgba(122, 31, 58, 0.35));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    transition: transform 0.6s ease;
}

.resource-blob:nth-child(2) {
    border-radius: 62% 38% 55% 45% / 40% 65% 35% 60%;
}

.resource-blob:nth-child(3) {
    border-radius: 35% 65% 50% 50% / 60% 35% 65% 40%;
}

.resource-blob:nth-child(4) {
    border-radius: 55% 45% 60% 40% / 42% 58% 42% 58%;
}

.resource-name {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--parchment);
    display: block;
    margin-bottom: 0.25rem;
}

.resource-origin {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.8rem;
    color: var(--vellum);
    display: block;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.resource-code {
    display: block;
}

.resource-code code {
    font-size: 0.65rem;
    color: var(--copper-flare);
}

/* =============================================
   Governance Blocks
   ============================================= */

.governance-block {
    margin-bottom: 2.5rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--stellar-gold);
}

/* =============================================
   Communication Details
   ============================================= */

.comm-details {
    margin: 2rem 0;
}

.comm-line {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(232, 213, 196, 0.6);
    align-items: baseline;
}

.comm-label {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-burgundy);
    min-width: 140px;
}

.comm-value code {
    font-size: 0.8rem;
    color: var(--mauve-dust);
}

/* =============================================
   Certification Stamps
   ============================================= */

.certification-stamps {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.stamp {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    padding: 0.6rem 1.8rem;
    border: 3px solid;
    transform: rotate(-5deg);
    opacity: 0.7;
}

.stamp-verified {
    color: var(--cabernet-void);
    border-color: var(--cabernet-void);
    transform: rotate(-5deg);
}

.stamp-authentic {
    color: var(--stellar-gold);
    border-color: var(--stellar-gold);
    transform: rotate(3deg);
}

.stamp-sealed {
    color: var(--dark-claret);
    border-color: var(--dark-claret);
    transform: rotate(-2deg);
}

/* =============================================
   Mercury Zone - Title Section
   ============================================= */

.zone-mercury .zone-content {
    text-align: center;
    padding-top: clamp(6rem, 12vh, 14rem);
    padding-bottom: clamp(6rem, 12vh, 14rem);
}

.title-cartouche {
    position: relative;
    display: inline-block;
}

.title-cartouche::before,
.title-cartouche::after {
    content: '';
    display: block;
    width: 60%;
    height: 2px;
    background: var(--stellar-gold);
    margin: 1rem auto;
}

/* =============================================
   Responsive Adjustments
   ============================================= */

@media (max-width: 900px) {
    .organic-blob {
        display: none;
    }
    
    .resource-catalog {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .zone-content {
        padding: clamp(2rem, 5vh, 4rem) 1.5rem;
    }

    .comm-line {
        flex-direction: column;
        gap: 0.25rem;
    }

    .certification-stamps {
        gap: 1rem;
    }

    .stamp {
        font-size: 1.1rem;
        padding: 0.4rem 1.2rem;
    }

    .zone-divider {
        height: 50px;
    }
}
