/* ================================================
   matchumnews.com - Isometric Landscape News
   ================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #F0E8D8;
    color: #3D3024;
    overflow-x: hidden;
    position: relative;
}

/* --- Topographic Contour Lines --- */
.contour-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.contour-lines.visible {
    opacity: 1;
}

.contour-lines path {
    fill: none;
    stroke: #8B7B5E;
    stroke-width: 0.5;
    opacity: 0.2;
}

.contour-lines path:nth-child(odd) {
    opacity: 0.15;
}

.contour-lines path:nth-child(3n) {
    opacity: 0.25;
}

/* --- Trail SVG --- */
.trail-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5400px;
    z-index: 1;
    pointer-events: none;
}

.trail-path {
    fill: none;
    stroke: #8B7B5E;
    stroke-width: 1;
    stroke-dasharray: 6 4;
    opacity: 0.3;
    transition: stroke-width 0.4s ease, opacity 0.4s ease;
}

.trail-path.active {
    stroke-width: 2;
    opacity: 0.6;
}

/* --- Summit View (Hero) --- */
.summit-view {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    overflow: hidden;
}

/* Mountains Container */
.mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    z-index: 1;
}

/* Individual Mountain */
.mountain {
    position: absolute;
    bottom: 0;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.8s ease;
}

.mountain.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Mountain 1 - Largest, center-left */
.mountain-1 {
    left: 15%;
    width: 360px;
    height: 320px;
    z-index: 3;
    transition-delay: 0ms;
}

/* Mountain 2 - Medium, center-right */
.mountain-2 {
    left: 45%;
    width: 280px;
    height: 260px;
    z-index: 4;
    transition-delay: 150ms;
}

/* Mountain 3 - Small, far right */
.mountain-3 {
    right: 8%;
    width: 220px;
    height: 200px;
    z-index: 2;
    transition-delay: 300ms;
}

/* Mountain 4 - Smallest, far left background */
.mountain-4 {
    left: 2%;
    width: 180px;
    height: 160px;
    z-index: 1;
    transition-delay: 450ms;
}

/* Mountain Faces - Isometric flat shading */
.mountain-left {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-color: #6B8E5A;
    clip-path: polygon(100% 0%, 0% 100%, 100% 100%);
}

.mountain-right {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-color: #4A7040;
    clip-path: polygon(0% 0%, 0% 100%, 100% 100%);
}

.mountain-ridge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background-color: #8BAF78;
    border-radius: 2px;
}

/* Hero Text */
.hero-text {
    position: relative;
    z-index: 10;
    text-align: center;
    margin-bottom: 15vh;
}

.site-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: #3D3024;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: 0.3em;
}

.site-name .char {
    display: inline-block;
    font-variation-settings: 'wght' 300;
    transition: font-variation-settings 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.site-name.animated .char[data-weight="700"] {
    font-variation-settings: 'wght' 700;
}

.site-name.animated .char[data-weight="600"] {
    font-variation-settings: 'wght' 600;
}

.site-name.animated .char[data-weight="500"] {
    font-variation-settings: 'wght' 500;
}

.site-name.animated .char[data-weight="400"] {
    font-variation-settings: 'wght' 400;
}

.site-subtitle {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 1.2rem;
    color: #8B7B5E;
    letter-spacing: 0.1em;
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1.5s forwards;
}

.scroll-arrow {
    animation: bobDown 2s ease-in-out infinite;
}

@keyframes bobDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* --- Trail Marker Labels --- */
.trail-marker {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: #8B7B5E;
    text-transform: lowercase;
    margin-bottom: 16px;
}

/* --- Trail Sections --- */
.trail-section {
    position: relative;
    min-height: 80vh;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 60px 0;
}

/* News Clusters - positioned at varying horizontal positions */
.news-cluster {
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.news-cluster.visible {
    opacity: 1;
    transform: translateY(0);
}

.cluster-left {
    margin-left: 15vw;
}

.cluster-center {
    margin-left: 45vw;
}

.cluster-right {
    margin-left: 60vw;
}

/* --- Article Cards --- */
.article-card {
    background-color: #FFFFFF;
    border: 1px solid #C4B8A0;
    border-radius: 4px;
    padding: 20px 24px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.news-cluster.visible .article-card:nth-child(2) {
    transition-delay: 100ms;
}

.news-cluster.visible .article-card:nth-child(3) {
    transition-delay: 200ms;
}

.news-cluster.visible .article-card:nth-child(4) {
    transition-delay: 300ms;
}

.news-cluster.visible .article-card {
    opacity: 1;
    transform: translateY(0);
}

.card-headline {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    color: #3D3024;
    line-height: 1.3;
    margin-bottom: 8px;
}

.card-preview {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.05vw, 1rem);
    color: #8B7B5E;
    line-height: 1.75;
}

/* --- Glitch-Art Valley --- */
.glitch-valley {
    position: relative;
    min-height: 60vh;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    overflow: hidden;
}

.glitch-container {
    max-width: 500px;
    width: 90%;
    margin: 0 auto;
    position: relative;
}

.glitch-block {
    position: relative;
    margin-bottom: 24px;
}

.glitch-offset-1 {
    transform: translate(3px, -2px);
}

.glitch-offset-2 {
    transform: translate(-4px, 3px);
}

.glitch-block .article-card {
    border-style: dashed;
    border-color: #C4B8A0;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.glitch-container.visible .glitch-block .article-card {
    opacity: 1;
    transform: translateY(0);
}

.glitch-container.visible .glitch-offset-1 .article-card {
    transition-delay: 0ms;
}

.glitch-container.visible .glitch-offset-2 .article-card {
    transition-delay: 150ms;
}

.glitch-marker {
    position: relative;
    z-index: 2;
}

/* Glitch Artifacts */
.glitch-artifact {
    position: absolute;
    background-color: #6B8E5A;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.artifact-1 {
    width: 40px;
    height: 8px;
    top: 30%;
    right: -20px;
}

.artifact-2 {
    width: 12px;
    height: 30px;
    bottom: 20%;
    left: -10px;
}

.artifact-3 {
    width: 24px;
    height: 6px;
    bottom: 10%;
    right: 15%;
}

/* Glitch shimmer animation for artifacts */
@keyframes glitchShimmer {
    0%, 92% { opacity: 0.15; }
    94% { opacity: 0.35; transform: translate(1px, -1px); }
    96% { opacity: 0.1; transform: translate(-2px, 1px); }
    98% { opacity: 0.4; transform: translate(0, 0); }
    100% { opacity: 0.15; }
}

.glitch-container.visible .glitch-artifact {
    animation: glitchShimmer 4s ease-in-out infinite;
}

.glitch-container.visible .artifact-1 {
    animation-delay: 0s;
}

.glitch-container.visible .artifact-2 {
    animation-delay: 1.3s;
}

.glitch-container.visible .artifact-3 {
    animation-delay: 2.7s;
}

/* --- Base Camp Footer --- */
.base-camp {
    position: relative;
    z-index: 2;
    background-color: #3D3024;
    padding: 80px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Isometric Tent Icon */
.tent-icon {
    position: relative;
    width: 48px;
    height: 48px;
}

.tent-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 36px;
    background-color: transparent;
    overflow: visible;
}

.tent-body::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 36px;
    background-color: #6B8E5A;
    clip-path: polygon(100% 0%, 0% 100%, 100% 100%);
}

.tent-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 36px;
    background-color: #4A7040;
    clip-path: polygon(0% 0%, 0% 100%, 100% 100%);
}

.tent-door {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 16px;
    background-color: #3D3024;
    border-radius: 6px 6px 0 0;
    z-index: 2;
}

.tent-pole {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 48px;
    background-color: #8BAF78;
}

.footer-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #8B7B5E;
    letter-spacing: 0.06em;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .cluster-left,
    .cluster-center,
    .cluster-right {
        margin-left: 8vw;
        margin-right: 8vw;
        max-width: 90vw;
    }

    .mountain-1 {
        left: 5%;
        width: 240px;
        height: 220px;
    }

    .mountain-2 {
        left: 35%;
        width: 200px;
        height: 180px;
    }

    .mountain-3 {
        right: 2%;
        width: 160px;
        height: 140px;
    }

    .mountain-4 {
        left: 0;
        width: 120px;
        height: 110px;
    }
}

@media (max-width: 600px) {
    .cluster-left,
    .cluster-center,
    .cluster-right {
        margin-left: 5vw;
        margin-right: 5vw;
    }

    .trail-section {
        min-height: auto;
        padding: 40px 0;
    }

    .mountain-1 {
        left: 0;
        width: 180px;
        height: 160px;
    }

    .mountain-2 {
        left: 30%;
        width: 150px;
        height: 140px;
    }

    .mountain-3 {
        right: 0;
        width: 120px;
        height: 100px;
    }

    .mountain-4 {
        display: none;
    }

    .glitch-container {
        width: 92%;
    }
}
