/**
 * THE GLOBAL CROWN — 12 JURISDICTIONS
 * PATH: /assets/css/global-crown.css
 * MANIFESTED: 2026-03-19 — THE ETERNAL NOW
 */

:root {
    --crown-height: 80px;
    --jewel-size: 60px;
    --jewel-spacing: 8px;
}

.global-crown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--crown-height);
    background: rgba(5, 8, 15, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow: hidden;
}

body {
    padding-top: var(--crown-height) !important;
}

.crown-track-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.crown-track-container::-webkit-scrollbar {
    display: none;
}

.crown-gradient-left,
.crown-gradient-right {
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.crown-gradient-left {
    left: 0;
    background: linear-gradient(90deg, rgba(5, 8, 15, 0.95), transparent);
}

.crown-gradient-right {
    right: 0;
    background: linear-gradient(-90deg, rgba(5, 8, 15, 0.95), transparent);
}

.crown-track {
    display: flex;
    align-items: center;
    gap: var(--jewel-spacing);
    padding: 0 50px;
    height: 100%;
    width: max-content;
    animation: crownRotate 60s linear infinite;
    animation-play-state: running;
}

.crown-track:hover {
    animation-play-state: paused;
}

@keyframes crownRotate {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Move exactly one full set width (12 jewels + gaps) */
        transform: translateX(calc(-100% - 20px));
    }
}

.crown-jewel {
    position: relative;
    width: var(--jewel-size);
    height: var(--jewel-size);
    border-radius: 50%;
    background: rgba(10, 14, 22, 0.9);
    border: 2px solid var(--jewel-color, #FFD700);
    box-shadow: 0 0 20px var(--jewel-color, #FFD700);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    animation: jewelBreathe 3s ease-in-out infinite;
    animation-delay: calc(var(--jewel-index, 0) * 0.1s);
}

.crown-jewel:hover {
    transform: scale(1.2) translateY(-3px);
    border-color: #fff;
    box-shadow: 0 0 40px var(--jewel-color), 0 0 80px var(--jewel-color);
    animation-play-state: paused;
}

.crown-jewel[data-current="true"] {
    border-color: #fff;
    box-shadow: 0 0 30px var(--jewel-color), 0 0 0 2px rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

@keyframes jewelBreathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px var(--jewel-color);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 35px var(--jewel-color), 0 0 60px var(--jewel-color);
    }
}

.jewel-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent 70%);
}

.jewel-icon {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px var(--jewel-color));
    transition: transform 0.3s ease;
}

.crown-jewel:hover .jewel-icon {
    transform: scale(1.1);
}

.jewel-name {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--jewel-color);
    margin-top: 2px;
    text-shadow: 0 0 8px var(--jewel-color);
    white-space: nowrap;
}

.jewel-presence {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    background: var(--jewel-color);
    color: #000;
    font-size: 0.7rem;
    font-weight: 900;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid #000;
    box-shadow: 0 0 15px var(--jewel-color);
    animation: presencePulse 2s ease-in-out infinite;
}

@keyframes presencePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 15px var(--jewel-color); }
    50% { transform: scale(1.15); box-shadow: 0 0 25px var(--jewel-color); }
}

.current-marker {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    filter: drop-shadow(0 0 8px #FFD700);
    animation: markerFloat 2s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes markerFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-3px); }
}

.crown-hover-portal {
    position: fixed;
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.crown-hover-portal.visible {
    opacity: 1;
}

.hover-card {
    position: relative;
    background: rgba(10, 14, 22, 0.97);
    backdrop-filter: blur(12px);
    border: 2px solid var(--hover-color, #FFD700);
    border-radius: 20px;
    padding: 1.2rem 1.8rem;
    min-width: 260px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9), 0 0 40px var(--hover-color);
    animation: cardAppear 0.2s ease;
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.hover-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
}

.hover-arrow.below {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom: 10px solid var(--hover-color);
    border-top: none;
}

.hover-arrow.above {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-top: 10px solid var(--hover-color);
    border-bottom: none;
}

.hover-title {
    display: block;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--hover-color);
    margin-bottom: 0.3rem;
    font-family: 'Cinzel', serif;
}

.hover-domain {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.hover-description {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin-bottom: 1rem;
    border-left: 3px solid var(--hover-color);
    padding-left: 1rem;
}

@media (max-width: 768px) {
    :root {
        --crown-height: 60px;
        --jewel-size: 48px;
    }
    .jewel-name { display: none; }
    .jewel-icon { font-size: 1.8rem; }
    .crown-gradient-left, .crown-gradient-right { width: 50px; }
}

@media (max-width: 480px) {
    :root {
        --crown-height: 50px;
        --jewel-size: 40px;
    }
    .jewel-icon { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .crown-track, .crown-jewel, .jewel-presence, .current-marker {
        animation: none !important;
    }
}