/* Fall Map feature styles. Kept separate from app.css for safer additive work. */

.fall-map-page {
    min-height: 100vh;
}

.fall-map-hero {
    padding: 18vh 0 5vh;
    text-align: center;
}

.fall-map-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
    gap: 1.25rem;
    align-items: start;
}

.fall-map-stage {
    position: relative;
    isolation: isolate;
    min-height: 620px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 12px;
    background-color: #020303;
    box-shadow: inset 0 0 45px rgba(212, 175, 55, 0.05), 0 10px 30px rgba(0, 0, 0, 0.28);
}

.fall-map-world {
    position: absolute;
    inset: 0;
    z-index: 1;
    transform: translate(var(--view-x, 0), var(--view-y, 0)) scale(var(--view-scale, 1));
    transform-origin: center center;
    transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.fall-map-bg-map {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.2)),
        var(--fall-map-art, url("/assets/fall-map/map-global.png"));
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 1;
    filter: saturate(1.16) contrast(1.2) brightness(1.08);
    pointer-events: none;
}

.fall-map-bg-atmosphere {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0.18;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.08), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.08), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.16)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.06), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.18));
}

.fall-map-node-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
}

.fall-map-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 75%);
    pointer-events: none;
    z-index: 2;
    opacity: 0.18;
}

.fall-map-axis {
    position: absolute;
    color: rgba(243, 231, 211, 0.45);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 4;
}

.fall-map-axis.top { top: 1rem; left: 50%; transform: translateX(-50%); }
.fall-map-axis.bottom { bottom: 1rem; left: 50%; transform: translateX(-50%); }
.fall-map-axis.left { left: 1rem; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.fall-map-axis.right { right: 1rem; top: 50%; transform: translateY(-50%) rotate(90deg); }

.fall-map-node {
    position: absolute;
    left: calc(var(--x) * 1%);
    top: calc(var(--y) * 1%);
    transform: translate(-50%, -50%) scale(var(--node-scale, 1));
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(212, 175, 55, 0.48);
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.86);
    color: var(--color-gold);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    z-index: 5;
}

.fall-map-node:hover,
.fall-map-node.active {
    transform: translate(-50%, -50%) scale(calc(var(--node-scale, 1) * 1.08));
    border-color: var(--color-gold);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.28);
}

.fall-map-node.coming-soon {
    border-style: dashed;
    opacity: 0.72;
}

.fall-map-node.system {
    width: 76px;
    height: 76px;
    border-radius: 16px;
    background: rgba(212, 175, 55, 0.12);
    box-shadow: 0 0 26px rgba(212, 175, 55, 0.18);
}

.fall-map-node.region {
    width: 64px;
    height: 64px;
    border-radius: 14px;
}

.fall-map-node.theme {
    width: 52px;
    height: 52px;
    border-color: rgba(212, 175, 55, 0.36);
}

.fall-map-node.cluster-parent {
    border-style: double;
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.14);
}

.fall-map-node.cluster-parent .fall-map-label {
    color: var(--color-gold);
    font-weight: 700;
}

.fall-map-node.map-reset {
    width: 72px;
    height: 44px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.78);
}

.fall-map-reset-button {
    position: absolute;
    top: 1.15rem;
    left: 1.15rem;
    z-index: 20;
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(212, 175, 55, 0.7);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.86);
    color: var(--color-gold);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: auto;
    box-shadow: 0 0 22px rgba(0, 0, 0, 0.6);
}

.fall-map-reset-button:hover {
    border-color: var(--color-gold);
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.2);
}

.fall-map-node img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
}

.fall-map-initials {
    font-family: var(--font-primary);
    font-size: 0.8rem;
}

.fall-map-label {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 118px;
    color: rgba(243, 231, 211, 0.78);
    font-size: 0.72rem;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
}

.fall-map-panel,
.fall-map-legend,
.fall-map-cta-card {
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 10px;
    background: rgba(10, 10, 10, 0.78);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.fall-map-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 7rem);
    overflow: auto;
    padding: 1.25rem;
    position: sticky;
    top: 5.5rem;
    z-index: 6;
}

.fall-map-panel-kicker,
.fall-map-status {
    color: var(--color-gold);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.fall-map-panel h2 {
    margin: 0.7rem 0 0.45rem;
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 1.4rem;
    line-height: 1.15;
}

.fall-map-thesis {
    color: rgba(243, 231, 211, 0.82);
    line-height: 1.65;
}

.fall-map-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
}

.fall-map-actions .btn {
    min-height: auto;
    padding: 0.55rem 0.85rem;
    font-size: 0.88rem;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
}

.fall-map-actions .btn.disabled,
.fall-map-actions .btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.fall-map-cluster {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 175, 55, 0.18);
}

.fall-map-cluster h3 {
    margin: 0 0 0.75rem;
    color: var(--color-gold);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fall-map-cluster-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.fall-map-cluster-card {
    display: grid;
    gap: 0.25rem;
    min-height: 0;
    padding: 0.65rem;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.24);
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.fall-map-cluster-card:hover,
.fall-map-cluster-card.active {
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(212, 175, 55, 0.08);
    transform: translateY(-1px);
}

.fall-map-cluster-name {
    color: var(--color-text);
    font-weight: 700;
    font-size: 0.84rem;
    line-height: 1.2;
}

.fall-map-cluster-status {
    color: var(--color-gold);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fall-map-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.fall-map-pill {
    border: 1px solid rgba(212, 175, 55, 0.24);
    border-radius: 999px;
    padding: 0.3rem 0.6rem;
    color: rgba(243, 231, 211, 0.76);
    font-size: 0.78rem;
}

.fall-map-support {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.fall-map-legend,
.fall-map-cta-card {
    padding: 1rem;
}

.fall-map-legend h3,
.fall-map-cta-card h3 {
    margin: 0 0 0.5rem;
    color: var(--color-gold);
}

.fall-map-legend-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fall-map-dot {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    margin-right: 0.45rem;
    border: 1px solid var(--color-gold);
    border-radius: 50%;
}

.fall-map-dot.coming-soon {
    border-style: dashed;
    opacity: 0.65;
}

.fall-map-cta-card {
    display: grid;
    gap: 0.75rem;
}

.fall-map-cta-card p {
    margin: 0;
    color: rgba(243, 231, 211, 0.78);
    line-height: 1.55;
}

.fall-map-empty {
    color: rgba(243, 231, 211, 0.68);
}

.philosophy-article {
    padding: 16vh 0 6vh;
}

.philosophy-article-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.25rem;
    align-items: start;
}

.philosophy-article-body {
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 10px;
    background: rgba(10, 10, 10, 0.72);
    padding: 1.5rem;
}

.philosophy-article-body h2,
.philosophy-article-side h3 {
    color: var(--color-gold);
}

.philosophy-article-body p {
    color: rgba(243, 231, 211, 0.84);
    line-height: 1.75;
}

.philosophy-article-side {
    position: sticky;
    top: 6rem;
}

@media (max-width: 900px) {
    .fall-map-shell,
    .fall-map-support,
    .philosophy-article-grid {
        grid-template-columns: 1fr;
    }

    .fall-map-stage,
    .fall-map-panel {
        min-height: 560px;
    }

    .fall-map-panel {
        min-height: 0;
        max-height: none;
        overflow: visible;
        position: relative;
        top: auto;
    }

    .fall-map-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .philosophy-article-side {
        position: static;
    }
}

@media (max-width: 560px) {
    .fall-map-stage {
        min-height: 520px;
    }

    .fall-map-node {
        width: 48px;
        height: 48px;
    }

    .fall-map-node.system {
        width: 62px;
        height: 62px;
    }

    .fall-map-node.region,
    .fall-map-node.theme {
        width: 46px;
        height: 46px;
    }

    .fall-map-node img {
        width: 34px;
        height: 34px;
    }

    .fall-map-label {
        display: none;
    }

    .fall-map-actions {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .fall-map-actions .btn {
        width: 100%;
        padding: 0.55rem 0.75rem;
    }

    .fall-map-cluster-grid {
        grid-template-columns: 1fr;
    }
}
