/* monopole.news - Anti-Design Opulence Physics Broadsheet */
/* Colors: #0c0a12, #c4a265, #f0ebe0, #2d1b4e, #1a1040, #e8c547, #d4577a, #8b6e3f */
/* Fonts: Space Grotesk, Inter, IBM Plex Sans */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0c0a12;
    color: #f0ebe0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.1vw, 1.05rem);
    line-height: 1.55;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ====================== */
/* Background Grid Layer  */
/* ====================== */
.bg-grid-layer {
    position: fixed;
    top: 0;
    left: 7px;
    width: calc(100% + 80px);
    height: 200vh;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(196, 162, 101, 0.03) 0px,
            rgba(196, 162, 101, 0.03) 1px,
            transparent 1px,
            transparent 80px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(196, 162, 101, 0.02) 0px,
            rgba(196, 162, 101, 0.02) 1px,
            transparent 1px,
            transparent 80px
        );
    will-change: transform;
}

/* ====================== */
/* Disruption Lines       */
/* ====================== */
.disruption-line {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 300%;
    height: 1px;
    background-color: rgba(196, 162, 101, 0.06);
    pointer-events: none;
    z-index: 1;
}

.disruption-line-1 {
    transform: rotate(17deg);
    transform-origin: center center;
}

.disruption-line-2 {
    transform: rotate(-23deg);
    transform-origin: center center;
}

.disruption-line-3 {
    transform: rotate(41deg);
    transform-origin: center center;
}

/* ====================== */
/* Typography Watermark   */
/* ====================== */
.watermark {
    position: fixed;
    top: 20vh;
    left: -5vw;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 22vw;
    color: rgba(196, 162, 101, 0.03);
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    transform: rotate(-4deg);
    will-change: transform;
    line-height: 1;
}

/* ====================== */
/* Annotation / Caption   */
/* ====================== */
.annotation {
    display: block;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(240, 235, 224, 0.5);
    margin-bottom: 0.75rem;
}

/* ====================== */
/* Bento Grid             */
/* ====================== */
.bento-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem 1.5rem;
    padding: 12vh 3vw 4rem 5vw;
    max-width: 1600px;
}

@media (min-width: 1200px) {
    .bento-grid {
        margin-left: 2vw;
    }
}

/* ====================== */
/* Bento Cells (General)  */
/* ====================== */
.bento-cell {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #2d1b4e 0%, #0c0a12 45%, #1a1040 100%);
    border: 1px solid transparent;
    border-image: linear-gradient(90deg, #c4a265, #8b6e3f, #c4a265) 1;
    border-image-slice: 1;
}

.bento-cell .cell-content {
    transform: translateX(0);
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-cell[data-reveal='left'] .cell-content {
    transform: translateX(-110%);
}

.bento-cell[data-reveal='right'] .cell-content {
    transform: translateX(110%);
}

.bento-cell.revealed .cell-content {
    transform: translateX(0) !important;
}

/* ====================== */
/* Detection Cell         */
/* ====================== */
.detection-cell {
    grid-column: 1 / 8;
    grid-row: 1 / 5;
    border-top: none;
    padding: 3.2rem 2rem 1rem 4.8rem;
    transform: translate(6px, -4px);
    z-index: 3;
    background:
        repeating-conic-gradient(#c4a265 0% 25%, transparent 0% 50%) 0 0 / 3px 3px,
        linear-gradient(160deg, #2d1b4e 0%, #0c0a12 45%, #1a1040 100%);
    background-blend-mode: overlay;
}

.detection-cell::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-conic-gradient(#c4a265 0% 25%, transparent 0% 50%) 0 0 / 3px 3px;
    opacity: 0.03;
    pointer-events: none;
}

.hero-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 6.4rem);
    letter-spacing: -0.03em;
    line-height: 0.92;
    color: #f0ebe0;
    margin-bottom: 2rem;
    margin-top: 1.5rem;
    animation: headline-breathe 8s linear infinite;
}

@keyframes headline-breathe {
    0%, 100% { letter-spacing: -0.03em; }
    50% { letter-spacing: -0.025em; }
}

.arc-flash {
    color: #e8c547;
}

.hero-subhead {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    letter-spacing: 0.08em;
    line-height: 1.4;
    color: rgba(240, 235, 224, 0.7);
    margin-bottom: 2rem;
    max-width: 640px;
}

/* ====================== */
/* Apparatus Cell         */
/* ====================== */
.apparatus-cell {
    grid-column: 8 / 13;
    grid-row: 1 / 3;
    overflow: visible;
    transform: translate(-8px, 10px);
    z-index: 4;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: transparent;
    border: none;
    border-image: none;
}

.apparatus-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    overflow: visible;
}

.apparatus-ring {
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.apparatus-cell.revealed .apparatus-ring {
    stroke-dashoffset: 0;
}

.apparatus-cell.revealed .ring-1 { transition-delay: 0s; }
.apparatus-cell.revealed .ring-2 { transition-delay: 0.2s; }
.apparatus-cell.revealed .ring-3 { transition-delay: 0.4s; }
.apparatus-cell.revealed .ring-4 { transition-delay: 0.6s; }
.apparatus-cell.revealed .ring-5 { transition-delay: 0.8s; }

.monopole-core {
    opacity: 0;
    transition: opacity 0.6s ease 1.2s;
}

.apparatus-cell.revealed .monopole-core {
    opacity: 1;
}

.apparatus-label {
    margin-top: 1rem;
    text-align: center;
}

/* ====================== */
/* Void Cell              */
/* ====================== */
.void-cell {
    grid-column: 8 / 12;
    grid-row: 3 / 6;
    background: transparent;
    border: none;
    border-image: none;
    position: relative;
    overflow: visible;
}

.void-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 141.42%;
    height: 1px;
    background-color: rgba(196, 162, 101, 0.4);
    transform-origin: top left;
    transform: rotate(45deg);
}

/* ====================== */
/* Dispatch Cells         */
/* ====================== */
.dispatch-cell {
    padding: 2rem 1.8rem;
    transition: transform 0.15s ease;
}

.dispatch-cell:nth-child(3n+1) {
    z-index: 5;
}

.dispatch-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    color: #f0ebe0;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.dispatch-body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.1vw, 1.05rem);
    line-height: 1.55;
    color: rgba(240, 235, 224, 0.8);
}

/* Dispatch 1 */
.dispatch-1 {
    grid-column: 1 / 5;
    grid-row: 5 / 7;
    background: linear-gradient(135deg, #2d1b4e 0%, #1a1040 100%);
    transform: translate(4px, 0px);
}

/* Dispatch 2 */
.dispatch-2 {
    grid-column: 5 / 8;
    grid-row: 5 / 7;
    background: linear-gradient(200deg, #2d1b4e 0%, #0c0a12 100%);
    transform: translate(-6px, 8px);
    z-index: 5;
}

/* Dispatch 3 - the micro-rotated one */
.dispatch-3 {
    grid-column: 1 / 5;
    grid-row: 7 / 9;
    background: linear-gradient(315deg, #1a1040 0%, #2d1b4e 100%);
    transform: translate(10px, -4px) rotate(0.7deg);
}

/* Dispatch 4 */
.dispatch-4 {
    grid-column: 5 / 9;
    grid-row: 7 / 10;
    background: linear-gradient(135deg, #1a1040 0%, #0c0a12 100%);
    transform: translate(-4px, 12px);
}

/* Dispatch 5 */
.dispatch-5 {
    grid-column: 9 / 13;
    grid-row: 6 / 9;
    background: linear-gradient(200deg, #2d1b4e 0%, #1a1040 100%);
    transform: translate(-12px, 4px);
    z-index: 5;
}

/* Dispatch 6 */
.dispatch-6 {
    grid-column: 9 / 13;
    grid-row: 9 / 11;
    background: linear-gradient(315deg, #0c0a12 0%, #1a1040 100%);
    transform: translate(4px, -8px);
}

/* Dispatch cell animations */
.dispatch-cell .cell-content {
    transition-duration: 0.6s;
}

/* Border shimmer animation */
@keyframes border-shimmer {
    0% { border-image-source: linear-gradient(90deg, #c4a265, #8b6e3f, #c4a265); }
    50% { border-image-source: linear-gradient(90deg, #8b6e3f, #c4a265, #8b6e3f); }
    100% { border-image-source: linear-gradient(90deg, #c4a265, #8b6e3f, #c4a265); }
}

.detection-cell,
.dispatch-cell {
    animation: border-shimmer 12s linear infinite;
}


/* Dispatch cell hover micro-disruption */
.dispatch-cell {
    --hover-x: 0px;
    --hover-y: 0px;
}

.dispatch-cell.hovered {
    filter: brightness(1.05);
}

.dispatch-1.hovered { transform: translate(calc(4px + var(--hover-x)), var(--hover-y)); }
.dispatch-2.hovered { transform: translate(calc(-6px + var(--hover-x)), calc(8px + var(--hover-y))); z-index: 6; }
.dispatch-3.hovered { transform: translate(calc(10px + var(--hover-x)), calc(-4px + var(--hover-y))) rotate(0.7deg); }
.dispatch-4.hovered { transform: translate(calc(-4px + var(--hover-x)), calc(12px + var(--hover-y))); }
.dispatch-5.hovered { transform: translate(calc(-12px + var(--hover-x)), calc(4px + var(--hover-y))); z-index: 6; }
.dispatch-6.hovered { transform: translate(calc(4px + var(--hover-x)), calc(-8px + var(--hover-y))); }

/* ====================== */
/* Footer Attribution     */
/* ====================== */
.footer-attribution {
    position: relative;
    z-index: 2;
    padding: 4rem 5vw 2rem;
    text-align: left;
}

.footer-attribution .annotation {
    color: rgba(240, 235, 224, 0.3);
}

/* ====================== */
/* Responsive / Mobile    */
/* ====================== */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 8vh 4vw 3rem;
    }

    .detection-cell,
    .apparatus-cell,
    .void-cell,
    .dispatch-1,
    .dispatch-2,
    .dispatch-3,
    .dispatch-4,
    .dispatch-5,
    .dispatch-6 {
        grid-column: 1 / -1;
        grid-row: auto;
        transform: translate(0, 0);
    }

    .dispatch-3 {
        transform: rotate(0.7deg);
    }

    .detection-cell {
        padding: 2rem 1.5rem;
        border-top: none;
    }

    .void-cell {
        min-height: 80px;
    }

    .watermark {
        font-size: 30vw;
        top: 10vh;
    }

    .hero-headline {
        font-size: clamp(2rem, 10vw, 3.6rem);
    }
}
