/* ===================================================
   senggack.org — Isometric Jewel-Toned Mountain Atlas
   =================================================== */

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

:root {
    --deep-emerald: #0A2A1A;
    --ruby-red: #C8304A;
    --sapphire-blue: #2A5AA0;
    --gold: #D4A843;
    --pearl-white: #E8E0D8;
    --dark-jade: #1A3A28;
    --mid-jade: #2A4A38;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep-emerald);
    color: var(--pearl-white);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- Mountain Backdrop (fixed background layers) --- */
.mountain-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.mountain-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.mountain-layer--far {
    height: 35%;
    background: var(--dark-jade);
    clip-path: polygon(
        0% 100%, 0% 70%, 5% 55%, 10% 65%, 15% 45%, 20% 60%, 25% 35%, 30% 50%,
        35% 30%, 40% 48%, 45% 25%, 50% 42%, 55% 32%, 60% 50%, 65% 28%, 70% 45%,
        75% 38%, 80% 55%, 85% 30%, 90% 48%, 95% 40%, 100% 52%, 100% 100%
    );
    opacity: 0.4;
}

.mountain-layer--mid {
    height: 28%;
    background: var(--mid-jade);
    clip-path: polygon(
        0% 100%, 0% 65%, 6% 50%, 12% 62%, 18% 40%, 24% 55%, 30% 38%, 36% 52%,
        42% 35%, 48% 50%, 54% 30%, 60% 48%, 66% 42%, 72% 55%, 78% 35%, 84% 50%,
        90% 45%, 96% 58%, 100% 42%, 100% 100%
    );
    opacity: 0.5;
}

.mountain-layer--near {
    height: 20%;
    background: var(--deep-emerald);
    clip-path: polygon(
        0% 100%, 0% 55%, 8% 40%, 16% 55%, 24% 35%, 32% 50%, 40% 38%, 48% 52%,
        56% 30%, 64% 48%, 72% 40%, 80% 55%, 88% 35%, 96% 50%, 100% 45%, 100% 100%
    );
    opacity: 0.7;
    border-top: 1px solid rgba(212, 168, 67, 0.1);
}

/* --- Header --- */
.atlas-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, var(--deep-emerald) 0%, rgba(10, 42, 26, 0.95) 100%);
    border-bottom: 1px solid rgba(212, 168, 67, 0.2);
    backdrop-filter: blur(8px);
}

.atlas-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.atlas-header__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.atlas-header__compass {
    flex-shrink: 0;
}

.compass-icon {
    display: block;
}

.atlas-header__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pearl-white);
    letter-spacing: 0.02em;
}

.atlas-header__subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.1rem;
}

.atlas-nav {
    display: flex;
    gap: 2rem;
}

.atlas-nav__item {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(232, 224, 216, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.atlas-nav__item:hover {
    color: var(--pearl-white);
}

.atlas-nav__item--active {
    color: var(--gold);
}

.atlas-nav__item--active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
}

/* --- Main Content --- */
.atlas-content {
    position: relative;
    z-index: 1;
}

/* --- Hero Section --- */
.atlas-hero {
    padding: 4rem 2rem 3rem;
}

.atlas-hero__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
    align-items: center;
}

.atlas-hero__kicker {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.atlas-hero__heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4.5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--pearl-white);
    margin-bottom: 1.5rem;
}

.atlas-hero__description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(232, 224, 216, 0.8);
    max-width: 480px;
}

.atlas-hero__illustration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.isometric-mountain {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

/* --- Nature Elements (CSS-Drawn) --- */
.nature-elements {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    height: 60px;
    pointer-events: none;
}

.tree {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    animation: treeGrowIn 0.8s ease forwards;
}

.tree--1 {
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 28px solid var(--mid-jade);
    left: 5%;
    bottom: 0;
    animation-delay: 0.3s;
}

.tree--2 {
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 22px solid var(--dark-jade);
    left: 8%;
    bottom: 0;
    animation-delay: 0.5s;
}

.tree--3 {
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 32px solid var(--mid-jade);
    right: 10%;
    bottom: 0;
    animation-delay: 0.7s;
}

.rock {
    position: absolute;
    bottom: 0;
    opacity: 0;
    animation: treeGrowIn 0.6s ease forwards;
}

.rock--1 {
    width: 20px;
    height: 12px;
    background: var(--dark-jade);
    clip-path: polygon(10% 100%, 0% 40%, 30% 0%, 70% 5%, 100% 45%, 90% 100%);
    left: 45%;
    animation-delay: 0.9s;
}

.rock--2 {
    width: 16px;
    height: 10px;
    background: var(--mid-jade);
    clip-path: polygon(5% 100%, 0% 50%, 25% 0%, 75% 10%, 100% 55%, 95% 100%);
    right: 30%;
    animation-delay: 1.1s;
}

@keyframes treeGrowIn {
    from {
        opacity: 0;
        transform: scaleY(0) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scaleY(1) translateY(0);
    }
}

/* --- Atlas Spread Sections --- */
.atlas-spread {
    padding: 3rem 2rem;
}

.atlas-spread--wide {
    padding: 3rem 2rem 4rem;
}

.atlas-spread__section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--pearl-white);
    max-width: 1100px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.atlas-spread__section-marker {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--ruby-red);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.atlas-spread__section-marker--sapphire {
    background: var(--sapphire-blue);
}

.atlas-spread__section-marker--gold {
    background: var(--gold);
}

/* --- Atlas Grids --- */
.atlas-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    column-gap: 3rem;
    row-gap: 2rem;
}

.atlas-grid--two-col {
    grid-template-columns: 1fr 1fr;
}

.atlas-grid--three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

/* --- Atlas Entry Cards --- */
.atlas-entry {
    background: var(--dark-jade);
    border: 1px solid rgba(212, 168, 67, 0.12);
    padding: 2rem;
    position: relative;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.atlas-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--ruby-red);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.atlas-entry:hover {
    border-color: rgba(212, 168, 67, 0.3);
    transform: translateY(-2px);
}

.atlas-entry:hover::before {
    opacity: 1;
}

.atlas-entry__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.atlas-entry__number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.1em;
}

.atlas-entry__badge {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.25rem 0.75rem;
    border: 1px solid;
}

.atlas-entry__badge--ruby {
    color: var(--ruby-red);
    border-color: var(--ruby-red);
}

.atlas-entry__badge--sapphire {
    color: var(--sapphire-blue);
    border-color: var(--sapphire-blue);
}

.atlas-entry__badge--gold {
    color: var(--gold);
    border-color: var(--gold);
}

.atlas-entry__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pearl-white);
    margin-bottom: 0.75rem;
}

.atlas-entry__body {
    font-size: 0.95rem;
    line-height: 1.75;
    color: rgba(232, 224, 216, 0.75);
    margin-bottom: 1.25rem;
}

.atlas-entry__meta {
    display: flex;
    gap: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(232, 224, 216, 0.4);
    letter-spacing: 0.05em;
    border-top: 1px solid rgba(232, 224, 216, 0.08);
    padding-top: 0.75rem;
}

/* --- Mountain Divider --- */
.mountain-divider {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.mountain-divider__svg {
    width: 100%;
    height: 40px;
    display: block;
}

/* --- Atlas Notes (Three-Column) --- */
.atlas-note {
    background: rgba(26, 58, 40, 0.5);
    border: 1px solid rgba(42, 74, 56, 0.6);
    padding: 1.75rem;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.atlas-note:hover {
    border-color: rgba(212, 168, 67, 0.25);
    background: rgba(26, 58, 40, 0.8);
}

.atlas-note__icon {
    margin-bottom: 1rem;
}

.atlas-note__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pearl-white);
    margin-bottom: 0.5rem;
}

.atlas-note__body {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(232, 224, 216, 0.65);
}

/* --- Skeleton Loading --- */
.skeleton-entry {
    background: var(--dark-jade);
    border: 1px solid rgba(42, 74, 56, 0.4);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-line {
    height: 14px;
    border-radius: 2px;
    background: linear-gradient(90deg, #1A3A28 25%, #2A4A38 50%, #1A3A28 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite ease-in-out;
}

.skeleton-line--short {
    width: 35%;
}

.skeleton-line--medium {
    width: 65%;
}

.skeleton-line--long {
    width: 100%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* --- Footer --- */
.atlas-footer {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    border-top: 1px solid rgba(212, 168, 67, 0.1);
}

.atlas-footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

.atlas-footer__mountain-line {
    margin-bottom: 1.5rem;
}

.atlas-footer__svg {
    width: 100%;
    height: 30px;
    display: block;
}

.atlas-footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.atlas-footer__text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(232, 224, 216, 0.5);
    letter-spacing: 0.05em;
}

.atlas-footer__credit {
    font-size: 0.8rem;
    color: rgba(232, 224, 216, 0.3);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .atlas-hero__inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .atlas-grid--two-col {
        grid-template-columns: 1fr;
    }

    .atlas-grid--three-col {
        grid-template-columns: 1fr 1fr;
    }

    .atlas-header__inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .atlas-nav {
        gap: 1.25rem;
    }

    .atlas-footer__content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .atlas-grid--three-col {
        grid-template-columns: 1fr;
    }

    .atlas-hero {
        padding: 2.5rem 1.25rem 2rem;
    }

    .atlas-spread {
        padding: 2rem 1.25rem;
    }

    .atlas-nav {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}
