/* nlbd.dev - No Leader, But Distributed */
/* Palette: Soft Lavender #C9A6D4, Mint Collective #7BC8A4, Peach Blush #F5C5A3,
   Cream Newsprint #FDF6F0, Ink Charcoal #4A4A5A, Powder Blue #A8D4E6, Lemon Zest #F0E060 */

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

body {
    background-color: #FDF6F0;
    color: #4A4A5A;
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

/* Grid-line underlay */
.grid-underlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(to right, #4A4A5A 1px, transparent 1px),
        linear-gradient(to bottom, #4A4A5A 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.05;
}

/* Ben-Day dot overlay */
.benday-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle, #C9A6D4 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.03;
}

/* Water Bubbles */
.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.water-bubble {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid #7BC8A4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: default;
    animation: bubbleFloat 25s infinite linear;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.water-bubble:nth-child(2) {
    width: 60px;
    height: 60px;
    animation-duration: 32s;
    animation-delay: -5s;
}

.water-bubble:nth-child(3) {
    width: 45px;
    height: 45px;
    animation-duration: 28s;
    animation-delay: -10s;
}

.water-bubble:nth-child(4) {
    width: 70px;
    height: 70px;
    animation-duration: 35s;
    animation-delay: -3s;
}

.water-bubble:nth-child(5) {
    width: 40px;
    height: 40px;
    animation-duration: 22s;
    animation-delay: -8s;
}

.water-bubble:nth-child(6) {
    width: 55px;
    height: 55px;
    animation-duration: 30s;
    animation-delay: -15s;
}

.water-bubble:nth-child(7) {
    width: 48px;
    height: 48px;
    animation-duration: 26s;
    animation-delay: -12s;
}

.water-bubble:nth-child(8) {
    width: 65px;
    height: 65px;
    animation-duration: 38s;
    animation-delay: -7s;
}

.water-bubble:hover {
    opacity: 1;
    animation-play-state: paused;
}

.water-bubble span {
    font-family: 'Karla', sans-serif;
    font-size: 11px;
    color: #7BC8A4;
}

@keyframes bubbleFloat {
    0% { transform: translate(0, 0); }
    25% { transform: translate(30px, -40px); }
    50% { transform: translate(-20px, -80px); }
    75% { transform: translate(40px, -40px); }
    100% { transform: translate(0, 0); }
}

/* Masthead */
.masthead {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 40px 20px;
}

.masthead-inner {
    text-align: center;
}

.masthead-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #4A4A5A;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.letter {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.letter.visible {
    opacity: 1;
    transform: translate(0, 0);
}

.letter-n { transform: translateX(-40px); }
.letter-l { transform: translateY(-40px); }
.letter-b { transform: translateX(40px); }
.letter-d { transform: translateY(40px); }
.letter-dot { transform: scale(0); }
.letter-dot.visible { transform: scale(1); }
.letter-dev { transform: translateY(40px); }

.masthead-subtitle {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 18px;
    letter-spacing: 0.05em;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Halftone Divider */
.halftone-divider {
    width: 100%;
    height: 60px;
    background-image: radial-gradient(circle, #C9A6D4 2px, transparent 2px);
    background-size: 8px 8px;
    opacity: 0.4;
    position: relative;
    z-index: 2;
}

.halftone-divider.inline {
    grid-column: 1 / -1;
    margin: 20px 0;
}

/* Magazine Spread */
.magazine-spread {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr 2fr 1fr 1.5fr;
    gap: 32px;
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.spread-block {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.spread-block.visible {
    opacity: 1;
    transform: scale(1);
}

.block-a { grid-column: 1 / 4; }
.block-b { grid-column: 4 / 7; }
.block-c { grid-column: 2 / 5; }
.block-d { grid-column: 1 / 4; }
.block-e { grid-column: 4 / 7; }
.block-f { grid-column: 1 / 4; }
.block-g { grid-column: 1 / 3; }
.block-h { grid-column: 3 / 6; }
.block-i { grid-column: 5 / 7; }

.section-headline {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #4A4A5A;
    margin-bottom: 16px;
    line-height: 1.15;
}

.body-text {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.65;
    color: #4A4A5A;
}

/* Speech Bubbles */
.speech-bubble {
    position: relative;
    display: inline-block;
    max-width: 320px;
}

.bubble-svg {
    width: 100%;
    height: auto;
}

.bubble-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    font-family: 'Bangers', cursive;
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: #4A4A5A;
    text-align: center;
    width: 80%;
    line-height: 1.2;
}

/* Pull Quotes */
.pullquote-block {
    background-color: #A8D4E6;
    padding: 24px 28px;
    margin: -16px;
}

.pullquote {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: #4A4A5A;
    line-height: 1.4;
    font-style: italic;
}

/* Action Lines */
.action-lines-container {
    position: relative;
    margin-bottom: 16px;
}

.action-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    z-index: 0;
}

.overlay-text {
    position: relative;
    z-index: 1;
}

/* Assembly Section */
.assembly {
    position: relative;
    z-index: 2;
    padding: 120px 40px;
    text-align: center;
}

.assembly-content {
    max-width: 600px;
    margin: 60px auto 0;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.assembly-content.visible {
    opacity: 1;
    transform: scale(1);
}

/* Colophon */
.colophon {
    position: relative;
    z-index: 2;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.colophon-content {
    text-align: center;
}

.colophon-bubble {
    max-width: 420px;
}

.colophon-bubble .bubble-text {
    transform: translate(-50%, -55%);
}

/* Ripple */
.ripple-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.ripple {
    position: absolute;
    width: 0;
    height: 0;
    border: 2px solid #7BC8A4;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rippleExpand 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .magazine-spread {
        display: flex;
        flex-direction: column;
        gap: 32px;
        padding: 40px 20px;
    }

    .spread-block {
        width: 100%;
    }

    .water-bubble:nth-child(n+5) {
        display: none;
    }

    .pullquote-block {
        margin: 0;
    }

    .speech-bubble {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .masthead-title {
        font-size: 2.5rem;
    }

    .section-headline {
        font-size: 1.75rem;
    }
}
