/* monopole.city — terracotta skeuomorphic zen cityscape */

:root {
    --bg-primary: #1a1512;
    --bg-secondary: #2d221a;
    --accent-primary: #c4775a;
    --accent-secondary: #6b8f71;
    --text-primary: #e8d5c4;
    --text-muted: #8a6e5a;
    --highlight: #d4a574;
    --shadow: #3d2a1e;
    --dark-sienna: #5a3d2e;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(45, 34, 26, 0.15) 2px,
            rgba(45, 34, 26, 0.15) 3px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(45, 34, 26, 0.1) 2px,
            rgba(45, 34, 26, 0.1) 3px
        );
    color: var(--text-primary);
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.875rem, 1.2vw, 1.125rem);
    line-height: 2.0;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.monopole-walk {
    position: relative;
    width: 100%;
}

/* ===== ZONE 1: OUTER WALL ===== */

.zone-outer-wall {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.horizon-line {
    position: absolute;
    top: 40vh;
    left: 10%;
    right: 10%;
    height: 0;
    border-top: 1px solid var(--accent-primary);
    opacity: 0.15;
}

.city-sign {
    margin-top: 45vh;
    text-align: center;
    opacity: 0;
    transition: opacity 2s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.city-sign.visible {
    opacity: 1;
}

.sign-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.outer-void {
    min-height: 80vh;
}

/* ===== ZONE 2: THE APPROACH ===== */

.zone-approach {
    min-height: 200vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.approach-fragment {
    padding-left: 15%;
    padding-right: 15%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s cubic-bezier(0.25, 0.1, 0.25, 1.0),
                transform 1.5s cubic-bezier(0.25, 0.1, 0.25, 1.0);
    will-change: opacity;
}

.approach-fragment.visible {
    opacity: 1;
    transform: translateY(0);
}

.fragment-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 2.0;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    max-width: 45ch;
}

.approach-spacer {
    min-height: 70vh;
}

.approach-spacer-end {
    min-height: 40vh;
}

.manhole-divider {
    display: flex;
    justify-content: center;
    padding: 10vh 0;
    color: var(--accent-primary);
    opacity: 0.3;
}

.manhole-svg {
    display: block;
}

/* ===== ZONE 3: THE GRID ===== */

.zone-grid {
    min-height: 200vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.grid-spacer-top {
    min-height: 40vh;
}

.city-grid-container {
    width: 60%;
    max-width: 640px;
    position: relative;
}

.city-grid-svg {
    width: 100%;
    height: auto;
    display: block;
}

.grid-path {
    will-change: stroke-dashoffset;
}

.monopole-point {
    filter: drop-shadow(0 0 8px var(--highlight));
    animation: monopolePulse 8s ease-in-out infinite;
}

.monopole-glow-outer,
.monopole-glow-mid {
    animation: monopolePulse 8s ease-in-out infinite;
}

@keyframes monopolePulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.grid-spacer-bottom {
    min-height: 40vh;
}

/* ===== ZONE 4: THE MONUMENT ===== */

.zone-monument {
    min-height: 200vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: radial-gradient(ellipse at center, var(--bg-secondary) 0%, var(--bg-primary) 70%);
}

.monument-spacer-top {
    min-height: 30vh;
}

.monument-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 5vh 0;
}

.monument-obelisk {
    width: 160px;
    max-width: 25vw;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 3s cubic-bezier(0.25, 0.1, 0.25, 1.0),
                transform 3s cubic-bezier(0.25, 0.1, 0.25, 1.0);
    will-change: opacity;
    filter: grayscale(100%) sepia(60%) contrast(1.2) brightness(0.8);
    mix-blend-mode: screen;
}

.monument-obelisk.visible {
    opacity: 1;
    transform: translateY(0);
}

.obelisk-svg {
    width: 100%;
    height: auto;
    display: block;
}

.cardinal-texts {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 15vh 10vw;
    padding: 15vh 8vw;
}

.cardinal-block {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2s cubic-bezier(0.25, 0.1, 0.25, 1.0),
                transform 2s cubic-bezier(0.25, 0.1, 0.25, 1.0);
    will-change: opacity;
    box-shadow: inset 0 0 80px rgba(26, 21, 18, 0.5);
    padding: 2rem;
    border: 1px solid rgba(196, 119, 90, 0.08);
}

.cardinal-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.cardinal-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--accent-secondary);
    display: block;
    margin-bottom: 1.5rem;
}

.cardinal-content {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.875rem, 1.2vw, 1.125rem);
    font-weight: 400;
    line-height: 2.0;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    max-width: 45ch;
}

.monument-spacer-bottom {
    min-height: 30vh;
}

/* ===== ZONE 5: THE RETURN ===== */

.zone-return {
    min-height: 200vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.return-spacer-top {
    min-height: 30vh;
}

.return-grid-container {
    width: 50%;
    max-width: 500px;
    opacity: 0;
    transition: opacity 3s cubic-bezier(0.25, 0.1, 0.25, 1.0);
    will-change: opacity;
}

.return-grid-container.visible {
    opacity: 1;
}

.return-grid-svg {
    width: 100%;
    height: auto;
    display: block;
}

.return-path {
    will-change: stroke-dashoffset;
}

.return-spacer-mid {
    min-height: 40vh;
}

.return-fragment {
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 2s cubic-bezier(0.25, 0.1, 0.25, 1.0),
                transform 2s cubic-bezier(0.25, 0.1, 0.25, 1.0);
    will-change: opacity;
}

.return-fragment.visible {
    opacity: 1;
    transform: translateY(0);
}

.final-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.return-void {
    min-height: 100vh;
}

/* ===== RESPONSIVE (below 768px) ===== */

@media (max-width: 768px) {
    .approach-fragment {
        padding-left: 8%;
        padding-right: 8%;
    }

    .city-grid-container {
        width: 85%;
    }

    .cardinal-texts {
        grid-template-columns: 1fr;
        gap: 10vh;
        padding: 10vh 6vw;
    }

    .return-grid-container {
        width: 75%;
    }

    .monument-obelisk {
        width: 120px;
    }
}

/* ===== TEXTURE OVERLAY (skeuomorphic canvas grain) ===== */

.monopole-walk::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 1px,
            rgba(26, 21, 18, 0.03) 1px,
            rgba(26, 21, 18, 0.03) 2px
        );
    mix-blend-mode: multiply;
}

/* Vignette effect */
.monopole-walk::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    box-shadow: inset 0 0 200px rgba(26, 21, 18, 0.6);
}
