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

html {
    scroll-behavior: smooth;
    background: #0d0d0d;
    color: #e8e4dc;
    font-family: 'Libre Baskerville', serif;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
}

body {
    background: #0d0d0d;
}

/* === THE MASTHEAD === */
.masthead {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 5vw;
}

.masthead-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(5rem, 15vw, 12rem);
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: #e8e4dc;
    line-height: 0.9;
}

.letter {
    display: inline-block;
}

.letter-m {
    transform: translateY(-40px);
}

.letter-n {
    transform: rotate(-2deg);
}

.letter-ai {
    transform: rotate(3deg) translateX(10px);
    color: #c77dff;
}

.letter-o2 {
    transform: translateY(8px);
}

.letter-p {
    transform: translateY(-5px) rotate(1deg);
}

.masthead-tagline {
    position: absolute;
    right: 5vw;
    bottom: 15vh;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #9a9590;
}

.masthead-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.masthead-path {
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    animation: drawMastheadLine 2s ease-out forwards;
}

@keyframes drawMastheadLine {
    to { stroke-dashoffset: 0; }
}

/* === THE MAGAZINE SPREAD === */
.spread {
    position: relative;
    min-height: 300vh;
    padding: 10vh 0;
}

.spread-grid {
    display: grid;
    grid-template-columns: 25vw 5vw 70vw;
    min-height: 250vh;
}

.spread-text {
    padding: 5vh 3vw 5vh 5vw;
}

.spread-text article p {
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.75;
    color: #e8e4dc;
}

.spread-text article p sup {
    font-size: 0.7em;
}

.spread-gutter {
    position: relative;
}

.gutter-label {
    position: absolute;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #c27840;
    opacity: 0.6;
    transform: rotate(-90deg);
    transform-origin: left top;
    white-space: nowrap;
    left: 50%;
}

.spread-viz {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#field-viz {
    width: 90%;
    max-width: 800px;
    height: auto;
}

#field-viz line, #field-viz path {
    stroke: #9d4edd;
    stroke-width: 1;
    fill: none;
    filter: drop-shadow(0 0 4px #c77dff);
}

/* Geometric fragments */
.geo-fragment {
    position: absolute;
    opacity: 0.08;
    background: #e6007e;
}

.frag-1 {
    width: 30px;
    height: 30px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    top: 15%;
    right: 20%;
}

.frag-2 {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    top: 40%;
    right: 10%;
}

.frag-3 {
    width: 25px;
    height: 25px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    top: 65%;
    right: 30%;
}

.frag-4 {
    width: 18px;
    height: 18px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    top: 80%;
    right: 55%;
}

/* Mountain SVG */
.mountain-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    pointer-events: none;
}

.mountain-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

/* === THE COLLISION ZONE === */
.collision {
    position: relative;
    min-height: 100vh;
    padding: 15vh 0;
    overflow: hidden;
}

.collision-block {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 55vw;
    clip-path: polygon(0 2px, 3px 0, 100% 1px, 99% 3px, 100% 100%, 97% 99%, 0 100%, 1px 98%);
}

.collision-left {
    padding-left: 10vw;
    padding-right: 3vw;
    color: #e8e4dc;
}

.collision-right {
    margin-top: -120px;
    margin-left: auto;
    padding-right: 10vw;
    padding-left: 3vw;
    color: #9a9590;
}

/* === THE QUIET FIELD === */
.quiet-field {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #0d0d0d 0%, #1a0a2e 60%, #2d0845 100%);
    overflow: hidden;
}

#quiet-field-viz {
    width: 80%;
    max-width: 900px;
    height: 80%;
}

#quiet-field-viz path {
    stroke: #9d4edd;
    stroke-width: 0.8;
    fill: none;
    filter: drop-shadow(0 0 6px #c77dff);
}

/* Pulse animation for center circles */
@keyframes pulse {
    0%, 100% { r: 4; opacity: 0.8; }
    50% { r: 8; opacity: 1; }
}

@keyframes pulseLarge {
    0%, 100% { r: 8; opacity: 0.8; }
    50% { r: 14; opacity: 1; }
}

.center-pulse {
    fill: #e6007e;
    animation: pulse 3s ease-in-out infinite;
}

.center-pulse-large {
    fill: #e6007e;
    animation: pulseLarge 3s ease-in-out infinite;
}

/* === THE COLOPHON === */
.colophon {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 5vh 5vw;
}

.colophon-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.colophon-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #9a9590;
}

.colophon-line {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.9rem;
    color: #e8e4dc;
    opacity: 0.6;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .spread-grid {
        grid-template-columns: 1fr;
    }

    .spread-gutter {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        padding: 2vh 5vw;
    }

    .gutter-label {
        position: static;
        transform: none;
        display: inline-block;
    }

    .spread-text {
        padding: 5vh 5vw;
    }

    .collision-block {
        max-width: 90vw;
    }

    .collision-left {
        padding-left: 5vw;
    }

    .collision-right {
        padding-right: 5vw;
        margin-top: -60px;
    }

    .masthead-title {
        font-size: clamp(3rem, 12vw, 6rem);
    }
}
