/* RESET & VARIABLES */
:root {
    --color-bg: #172027;
    --color-bg-deep: #11181d;
    --color-text: #F1F0FF;
    --color-text-muted: rgba(241, 240, 255, 0.6);
    --color-blue: #4571E1;
    --color-green: #71E3BA;
    --color-pink: #DE9AE9;
    --color-yellow: #FFFA7E;

    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--color-bg);
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "rlig" 1, "calt" 1;
}

body.is-modal-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

/* UTILITIES */
.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid rgba(69, 113, 225, 0.3);
    background: rgba(69, 113, 225, 0.1);
    color: var(--color-blue);
    font-family: monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.gradient-text {
    background: linear-gradient(to right, #4571E1, #71E3BA, #4571E1);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: textGradient 8s linear infinite;
}

@keyframes textGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.text-white {
    color: white;
    font-weight: 500;
}

.desktop-br {
    display: none;
}

@media (min-width: 768px) {
    .desktop-br {
        display: block;
    }
}

/* HERO SECTION */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    padding: 2rem;
    padding-bottom: 4rem;
    z-index: 10;
}

.hero-ring-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

@media (min-width: 768px) {
    .hero-ring-container {
        width: 900px;
        height: 900px;
    }
}

.hero-ring {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-ring-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(to top, #11181d, #172027, transparent);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 400px;
    background: rgba(69, 113, 225, 0.1);
    filter: blur(100px);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -0.05em;
    margin-bottom: 2rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 6rem;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1.6;
}
.hero-map {
    margin-top: 3rem;
}

.hero-map .map-frame {
    max-width: 1100px;
    margin: 0 auto;
}


@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* SCROLL INDICATOR */
.scroll-indicator {
    position: absolute;
    bottom: calc(3rem);
    left: 0;
    right: 0;
    margin-inline: auto;
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 20;
}

.scroll-text {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    opacity: 0.3;
}

.scroll-line {
    width: 1px;
    height: 3rem;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-bead {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: scrollBead 2s infinite ease-in-out;
}

@keyframes scrollBead {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

/* SECTION HEADER */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header.compact {
    margin-top: 0.25rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
    font-weight: 300;
}

/* MAP SECTION */
.map-section {
    position: relative;
    width: 100%;
    margin-top: 0;
    background-color: var(--color-bg-deep);
    z-index: 20;
    padding-bottom: 8rem;
    padding-top: 0.25rem;
    overflow: visible;
}

.map-section::before {
    content: '';
    position: absolute;
    top: -300px;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(to bottom, transparent, var(--color-bg-deep));
    z-index: 1;
    pointer-events: none;
}

.map-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #11181d, #0b1015, #0b1015);
    z-index: -1;
}

.map-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
}

.map-frame {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.95;
    filter: saturate(0.9) contrast(1.02);
}

.map-pins {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: auto;
}

.map-pins.hide-pins .pin {
    display: none;
}

.pin {
    position: absolute;
    transform: translate(calc(-50% + var(--pin-offset-x, 0px)), calc(-360% + var(--pin-offset-y, 0px)));
    pointer-events: auto;
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin.is-dragging {
    cursor: grabbing;
}

.pin:hover,
.pin:focus-visible {
    z-index: 10;
}

.pin__bubble {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px) scale(0.98);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    background: rgba(17, 24, 29, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0.65rem 0.95rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin__bubble::after {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    width: 10px;
    height: 10px;
    transform: translateY(-50%) rotate(45deg);
    background: rgba(17, 24, 29, 0.85);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

.pin__dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: url('assets/ReFi_Logomark.svg') center / cover no-repeat;
    border: 2px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(69, 113, 225, 0.12);
    position: relative;
    transform: scale(1.4);
    transition: transform 0.2s ease;
}
.pin:hover .pin__dot,
.pin:focus-visible .pin__dot {
    transform: scale(1.55);
}

.pin__dot::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    opacity: 0.9;
}

.pin__dot::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}
.pin__title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.pin__flag {
    font-size: 0.95rem;
    line-height: 1;
}

.pin__label {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(241, 240, 255, 0.9);
    white-space: nowrap;
}

.pin__meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: rgba(241, 240, 255, 0.65);
    font-size: 0.7rem;
}

.pin__metaRow {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    white-space: nowrap;
}

.pin__metaLabel {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.55rem;
    color: rgba(241, 240, 255, 0.45);
}

.pin__metaValue {
    font-size: 0.72rem;
    color: rgba(241, 240, 255, 0.75);
}
.pin__stem {
    margin: 0 auto;
    width: 2px;
    height: 14px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    display: none;
}

.pin__dot {
    animation: pinPulse 2.4s ease-in-out infinite;
}

.pin:hover .pin__bubble,
.pin:focus-visible .pin__bubble {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
}

.pin.is-tour-current .pin__bubble {
    border-color: rgba(113, 227, 186, 0.6);
    box-shadow: 0 0 0 6px rgba(113, 227, 186, 0.15), 0 10px 20px rgba(0, 0, 0, 0.3);
}

@keyframes pinPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(113, 227, 186, 0.2);
    }

    60% {
        box-shadow: 0 0 0 10px rgba(113, 227, 186, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(113, 227, 186, 0);
    }
}

.map-actions {
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 6;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(241, 240, 255, 0.9);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, color 0.2s;
}

.ghost-button:hover {
    transform: translateY(-1px);
    border-color: rgba(113, 227, 186, 0.5);
    color: white;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: url('assets/ReFi_Logomark.svg');
    background-size: cover;
    background-position: center;
    color: white;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, filter 0.2s;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(69, 113, 225, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.tour-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.tour-layer__svg {
    width: 100%;
    height: 100%;
    display: block;
}

#tourPath {
    fill: none;
    stroke: rgba(113, 227, 186, 0.8);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-dasharray: 2.2 2.4;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.tour-layer.is-animating #tourPath {
    animation: dashMove 900ms linear infinite;
}

@keyframes dashMove {
    from {
        stroke-dashoffset: 0;
    }

    to {
        stroke-dashoffset: -20;
    }
}

.tour-panel {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    width: min(360px, calc(100% - 2rem));
    z-index: 5;
    background: rgba(17, 24, 29, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    padding: 1rem;
}

.tour-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.tour-panel__kicker {
    font-size: 0.7rem;
    color: rgba(241, 240, 255, 0.6);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tour-panel__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tour-panel__meta {
    font-size: 0.8rem;
    color: rgba(241, 240, 255, 0.6);
    margin-bottom: 0.5rem;
}

.tour-panel__text {
    font-size: 0.85rem;
    color: rgba(241, 240, 255, 0.8);
}

.tour-panel__actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.map-hud {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 4;
    background: rgba(17, 24, 29, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    pointer-events: none;
}

.map-hud__title {
    font-size: 0.7rem;
    color: rgba(241, 240, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.4rem;
}

.map-hud__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-hud__label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(241, 240, 255, 0.5);
}

.map-hud__value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-hud__hint {
    margin-top: 0.4rem;
    font-size: 0.7rem;
    color: rgba(241, 240, 255, 0.5);
}

/* NODE GRID */
.node-list {
    margin-top: 0.75rem;
}

.node-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    justify-content: space-between;
}

.node-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0;
}

.node-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.node-sort__select {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(241, 240, 255, 0.8);
    padding: 0.45rem 1.1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, color 0.2s, transform 0.2s, background 0.2s;
}

.node-sort__select:hover,
.node-sort__select:focus-visible {
    border-color: rgba(113, 227, 186, 0.5);
    color: rgba(241, 240, 255, 0.95);
    transform: translateY(-1px);
}

.node-filter {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(241, 240, 255, 0.75);
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.node-filter:hover {
    color: white;
    border-color: rgba(113, 227, 186, 0.6);
    transform: translateY(-1px);
}

.node-filter.is-active {
    color: rgba(17, 24, 29, 0.95);
    background: rgba(113, 227, 186, 0.9);
    border-color: rgba(113, 227, 186, 0.9);
}

.node-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.node-card {
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s;
    cursor: pointer;
    overflow: hidden;
}

.node-card:hover {
    transform: translateY(-4px);
    border-color: rgba(113, 227, 186, 0.4);
}

.node-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .node-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.node-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(255, 255, 255, 0.04);
}

.node-card__media.is-empty {
    background: radial-gradient(circle at 20% 20%, rgba(69, 113, 225, 0.25), transparent 55%),
        radial-gradient(circle at 80% 30%, rgba(113, 227, 186, 0.2), transparent 50%),
        rgba(17, 24, 29, 0.9);
}

.node-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.node-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.node-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.node-meta {
    font-size: 0.85rem;
    color: rgba(241, 240, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.node-description {
    color: rgba(241, 240, 255, 0.6);
    font-weight: 300;
    font-size: 0.95rem;
}

/* MODAL */
.modal {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    padding: 0;
    width: min(1100px, calc(100vw - 3rem));
    max-height: calc(100vh - 3rem);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    background: rgba(17, 24, 29, 0.95);
    overflow: hidden;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.modal::backdrop {
    background: rgba(10, 16, 20, 0.7);
    backdrop-filter: blur(6px);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 12, 16, 0.65);
    color: rgba(241, 240, 255, 0.9);
    font-size: 1.4rem;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s, border-color 0.2s, color 0.2s;
}

.modal-close:hover {
    transform: translateY(-1px);
    border-color: rgba(113, 227, 186, 0.5);
    color: white;
}

.modal-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(113, 227, 186, 0.2), 0 12px 24px rgba(0, 0, 0, 0.35);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
}

.modal-meta {
    font-size: 0.8rem;
    color: rgba(241, 240, 255, 0.5);
    margin-top: 0.25rem;
}

.modal-body {
    padding: 1.5rem;
    overflow: auto;
    max-height: calc(min(90vh, 760px) - 72px);
}

.modal.admin-modal {
    width: min(600px, calc(100vw - 2rem));
}

.node-modal {
    width: min(1100px, calc(100vw - 3rem));
    max-height: calc(100vh - 3rem);
    overflow: auto;
    scroll-behavior: smooth;
    scrollbar-gutter: stable both-edges;
}

.node-modal.is-opening {
    animation: modalPop 0.35s ease;
}

@keyframes modalPop {
    0% {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 12px)) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.node-modal__header {
    background: rgba(10, 14, 18, var(--header-opacity, 0.9));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 5;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    transition: background 0.2s ease;
}

.node-modal__titlegroup {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transform: translateY(calc(-6px * var(--hero-collapse, 0)));
    transition: transform 0.2s ease;
    width: 100%;
}

.node-modal__identity {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.node-modal__logo {
    width: 100px;
    height: 100px;
    border-radius: 0.75rem;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
    display: block;
}

.node-modal .modal-title {
    color: rgba(241, 240, 255, 0.98);
    font-size: 1.6rem;
}

.node-modal .modal-meta {
    color: rgba(241, 240, 255, 0.6);
    font-size: 0.9rem;
}

.node-modal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

.node-modal__years {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.35rem 0.5rem;
    justify-content: flex-end;
}

.node-modal__yearsLabel {
    display: none;
}

.node-modal__yearTabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0;
}

.node-modal__yearTab {
    border-radius: 0.75rem 0.75rem 0 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: none;
    background: rgba(8, 12, 16, 0.5);
    color: rgba(241, 240, 255, 0.7);
    font-size: 0.75rem;
    padding: 0.35rem 0.9rem 0.5rem;
    margin-bottom: -20px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, transform 0.2s, background 0.2s;
}

.node-modal__yearTab:hover,
.node-modal__yearTab:focus-visible {
    border-color: rgba(113, 227, 186, 0.5);
    color: rgba(241, 240, 255, 0.95);
    transform: translateY(1px);
}

.node-modal__yearTab.is-active {
    background: rgba(69, 113, 225, 0.28);
    border-color: rgba(69, 113, 225, 0.65);
    color: rgba(241, 240, 255, 0.98);
    pointer-events: none;
}

.node-modal__metaItem {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
}

.node-modal__metaLabel {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.65rem;
    color: rgba(241, 240, 255, 0.45);
}

.node-modal__metaValue {
    font-size: 0.9rem;
    color: rgba(241, 240, 255, 0.75);
}

.node-modal__metaValue a {
    text-decoration: underline;
    text-decoration-color: rgba(241, 240, 255, 0.5);
    text-underline-offset: 3px;
}

.node-modal__metaValue a:hover,
.node-modal__metaValue a:focus-visible {
    text-decoration-color: rgba(241, 240, 255, 0.9);
}

.node-modal__body {
    display: grid;
    gap: 1.5rem;
    overflow: visible;
    max-height: none;
}

.node-modal__hero {
    grid-column: 1 / -1;
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    max-height: calc(320px * (1 - var(--hero-collapse, 0)));
    opacity: calc(1 - var(--hero-collapse, 0));
    transform: translateY(calc(-12px * var(--hero-collapse, 0)));
    transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease;
}

.node-modal__heroImg {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 320px;
}

.node-modal__content {
    border-radius: 1rem;
    padding: 1.5rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.node-modal.is-switching .node-modal__content {
    opacity: 0;
    transform: translateY(8px);
}

.node-modal.is-loading .node-modal__content {
    opacity: 0.2;
    transform: translateY(6px);
}

.node-media {
    margin: 1.25rem 0;
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.node-media__img {
    width: 100%;
    height: auto;
    display: block;
}

.node-media__caption {
    padding: 0.65rem 0.9rem;
    font-size: 0.8rem;
    color: rgba(241, 240, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.prose {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(241, 240, 255, 0.8);
}

.prose h2,
.prose h3 {
    font-family: var(--font-heading);
    margin: 1.5rem 0 0.75rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul {
    margin: 0 0 1rem 1.5rem;
}

.prose a {
    color: var(--color-green);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.caption {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: rgba(241, 240, 255, 0.5);
}

.muted {
    color: rgba(241, 240, 255, 0.55);
}

/* FOOTER */
.footer {
    position: relative;
    padding: 3rem 1rem;
    background-color: #050709;
    text-align: center;
    overflow: hidden;
}

.join-inline {
    position: relative;
    padding: 0;
    margin-top: 5rem;
}

.join-inline__content {
    position: relative;
    padding: 3rem 2rem;
    text-align: center;
}

.join-inline__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 520px;
    height: 620px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(69, 113, 225, 0.22), transparent 65%);
    opacity: 0.55;
    pointer-events: none;
}

.join-inline__title {
    position: relative;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.join-inline__text {
    position: relative;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-top: 0.75rem;
}

.join-inline__button {
    position: relative;
    margin-top: 1.75rem;
}

@media (min-width: 768px) {
    .join-inline__content {
        padding: 3.5rem 3rem;
    }

    .join-inline__title {
        font-size: 3.25rem;
    }
}

.footer p {
    font-size: 0.875rem;
    opacity: 0.4;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.2);
    text-underline-offset: 4px;
    transition: color 0.2s;
}

.footer-admin-button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.2);
    text-underline-offset: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-admin-button:hover {
    color: white;
}

/* Fade In Animation Helpers */
.fade-in-up {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ADMIN UTILITIES */
.admin-only {
    display: none;
}

body.is-admin .admin-only {
    display: inline-flex;
}

body.is-picking-pin .map-pins {
    cursor: crosshair;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .node-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .node-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 740px) {
    .map-actions {
        left: 1rem;
        right: auto;
        flex-direction: column;
        align-items: flex-start;
    }

    .node-grid {
        grid-template-columns: 1fr;
    }

    .pin__label {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .modal-header {
        flex-wrap: wrap;
    }
}
