/* ============================================
   monopole.news — fairycore physics gazette
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --parchment: #f5ecd3;
    --lavender-mist: #e8dff0;
    --wisteria: #c4a7d7;
    --rose-quartz: #d4a0b9;
    --deep-violet: #1e1b2e;
    --twilight-purple: #4a3b6b;
    --golden-amber: #d4a843;
    --muted-lilac: #8b7faa;
    --moss: #7a9b7e;
    --shadow-grey: #3d3d52;
    --angle: 8deg;
}

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

body {
    background-color: var(--parchment);
    color: var(--deep-violet);
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* --- Particle Canvas --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* --- Masthead --- */
.masthead {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem 5rem;
    text-align: center;
    background: linear-gradient(180deg, var(--lavender-mist) 0%, var(--parchment) 100%);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4vh), 0 100%);
}

.masthead-inner {
    max-width: 700px;
    margin: 0 auto;
}

.masthead-rule {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--wisteria), transparent);
    margin: 1.5rem auto;
}

.masthead-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: 0.04em;
    line-height: 1.12;
    color: var(--twilight-purple);
    margin-bottom: 0.5rem;
}

.masthead-dot {
    color: var(--golden-amber);
}

.masthead-subtitle {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--muted-lilac);
    margin-bottom: 0.3rem;
}

.masthead-date {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-lilac);
    opacity: 0.7;
}

/* --- Dispatches --- */
.dispatch {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem;
    clip-path: polygon(0 0, 100% 4vh, 100% 100%, 0 calc(100% - 4vh));
    margin-top: -4vh;
}

.dispatch-1 {
    background: linear-gradient(170deg, var(--parchment) 0%, var(--lavender-mist) 60%, var(--parchment) 100%);
}

.dispatch-2 {
    background: linear-gradient(190deg, var(--lavender-mist) 0%, var(--parchment) 50%, var(--lavender-mist) 100%);
}

.dispatch-3 {
    background: linear-gradient(170deg, var(--parchment) 0%, rgba(122, 155, 126, 0.08) 50%, var(--parchment) 100%);
}

.dispatch-4 {
    background: linear-gradient(190deg, var(--lavender-mist) 0%, var(--parchment) 60%, var(--lavender-mist) 100%);
}

.dispatch-5 {
    background: linear-gradient(170deg, var(--parchment) 0%, rgba(212, 168, 67, 0.06) 50%, var(--parchment) 100%);
}

.dispatch-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 0;
}

.dispatch-meta {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted-lilac);
    margin-bottom: 0.8rem;
    opacity: 0.8;
}

.dispatch-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.8rem, 4vw, 3.6rem);
    letter-spacing: 0.04em;
    line-height: 1.12;
    color: var(--twilight-purple);
    margin-bottom: 2rem;
    max-width: 800px;
}

.dispatch-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

.dispatch-body.reverse {
    grid-template-columns: 1fr 280px;
}

.dispatch-body.reverse .dispatch-illustration {
    order: 2;
}

.dispatch-body.reverse .dispatch-text {
    order: 1;
}

.dispatch-text p {
    margin-bottom: 1.2rem;
    color: var(--deep-violet);
    opacity: 0.9;
}

.dispatch-text p em {
    color: var(--twilight-purple);
    font-style: italic;
}

.dispatch-text.wide {
    grid-column: 1 / -1;
    max-width: 720px;
}

.drop-cap::first-letter {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.4rem;
    float: left;
    line-height: 0.8;
    margin-right: 0.12em;
    margin-top: 0.08em;
    color: var(--twilight-purple);
    font-weight: 500;
}

/* --- Illustrations --- */
.dispatch-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
}

.botanical-svg {
    width: 100%;
    max-width: 280px;
    height: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.botanical-svg.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Field line animation --- */
.field-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 2s ease;
}

.botanical-svg.visible .field-line {
    stroke-dashoffset: 0;
}

/* --- Monopole pulse --- */
@keyframes monopole-pulse {
    0%, 100% { opacity: 0.8; r: 8; }
    50% { opacity: 1; r: 10; }
}

.monopole-core {
    animation: monopole-pulse 3s ease-in-out infinite;
}

@keyframes ring-pulse {
    0%, 100% { opacity: 0.5; r: 14; }
    50% { opacity: 0.8; r: 18; }
}

.monopole-ring {
    animation: ring-pulse 3s ease-in-out infinite;
}

/* --- Monopole fruit twinkle --- */
@keyframes fruit-twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.monopole-fruit:nth-child(odd) {
    animation: fruit-twinkle 2.5s ease-in-out infinite;
}

.monopole-fruit:nth-child(even) {
    animation: fruit-twinkle 3.2s ease-in-out infinite 0.5s;
}

/* --- Detector loop rotation --- */
@keyframes detector-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.detector-loop {
    transform-origin: center;
    animation: detector-breathe 4s ease-in-out infinite;
}

/* --- Dispatch reveal animation --- */
.dispatch-inner {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.dispatch-inner.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Colophon --- */
.colophon {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem 3rem;
    text-align: center;
    background: linear-gradient(180deg, var(--parchment) 0%, var(--lavender-mist) 100%);
    margin-top: -4vh;
}

.colophon-inner {
    max-width: 600px;
    margin: 0 auto;
}

.colophon-rule {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--wisteria), transparent);
    margin: 0 auto 1.5rem;
}

.colophon-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--muted-lilac);
    margin-bottom: 0.5rem;
}

.colophon-text.small {
    font-size: 0.7rem;
    font-style: italic;
    font-family: 'Lora', serif;
    opacity: 0.6;
}

.colophon-sigil {
    margin-top: 1.5rem;
    opacity: 0.6;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .dispatch-body,
    .dispatch-body.reverse {
        grid-template-columns: 1fr;
    }

    .dispatch-body.reverse .dispatch-illustration,
    .dispatch-body.reverse .dispatch-text {
        order: unset;
    }

    .dispatch-illustration {
        max-width: 220px;
        margin: 0 auto 1.5rem;
    }

    .dispatch {
        padding: 3rem 1.2rem;
    }

    .masthead {
        padding: 4rem 1.2rem 3.5rem;
    }
}
