/* ============================================================
   SKYSNAG GLOBE HERO — globe.css
   Scoped to body.sg-front-page — zero impact on other pages
   ============================================================ */

/* ── reset page scroll so globe panel fills viewport ── */
body.sg-front-page {
    overflow-x: hidden;
}

/* ── globe panel: full viewport, dark background ── */
#sg-globe-panel {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh; /* mobile: exclude browser chrome so CTA is never cut off */
    min-height: 600px;
    background: #070b18;
    overflow: hidden;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #fbf8f2;
}

/* canvas fills the whole panel */
#sg-globe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    transition: transform .8s cubic-bezier(.5,0,.3,1), opacity .8s cubic-bezier(.5,0,.3,1);
}
body.leaving #sg-globe {
    transform: scale(1.35);
    opacity: .25;
}

/* ── CTA button ── */
.sg-cta {
    position: absolute;
    left: 50%;
    bottom: 11vh;
    transform: translateX(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: #070b18;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 20px 42px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff, #f3efe5);
    box-shadow:
        0 24px 70px -16px rgba(0,0,0,.7),
        0 0 0 1px rgba(255,255,255,.08),
        0 0 60px -10px rgba(76,123,232,.35);
    transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .3s;
    animation: sg-breathe 5s ease-in-out infinite;
    white-space: nowrap;
}
@keyframes sg-breathe {
    0%,100% { box-shadow: 0 24px 70px -16px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08), 0 0 60px -10px rgba(76,123,232,.30); }
    50%      { box-shadow: 0 24px 70px -16px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.10), 0 0 80px -8px rgba(76,123,232,.5); }
}
.sg-cta:hover { transform: translateX(-50%) translateY(-3px) scale(1.02); }
.sg-cta:active { transform: translateX(-50%) translateY(-1px) scale(.995); }
.sg-ar { transition: transform .3s cubic-bezier(.22,1,.36,1); }
.sg-cta:hover .sg-ar { transform: translateX(5px); }
body.leaving .sg-cta { opacity: 0; }

/* ── hide theme CTA pill while globe is on screen ── */
.sg-hide-on-globe {
    transition: opacity .3s ease, visibility .3s ease;
}
body.sg-front-page:not(.sg-scrolled) .sg-hide-on-globe {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ── right cluster: LIVE + Log in + language pill (top-right over globe) ── */
.sg-cluster {
    position: absolute;
    top: 30px;
    right: 32px;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 18px;
    font-family: 'Inter', -apple-system, sans-serif;
}
.sg-live {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: rgba(143,211,168,.8);
}
.sg-live i {
    width: 6px; height: 6px; border-radius: 50%;
    background: #4ade80; font-style: normal;
    animation: sg-ping 2.2s ease-out infinite;
}
.sg-acct {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 9px 8px 9px 16px;
    color: #14182a;
    box-shadow: 0 18px 50px -16px rgba(0,0,0,.5);
}
.sg-acct a {
    color: #14182a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.sg-acct svg { width: 15px; height: 15px; }
.sg-div { width: 1px; height: 18px; background: #e6e3da; margin: 0 12px; }
.sg-cv { font-size: 8px; opacity: .55; }
.sg-lang { position: relative; }
.sg-lang > a {
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    transition: background .15s;
}
.sg-lang > a:hover { background: #eef2fb; }
.sg-lang-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 30px 70px -18px rgba(0,0,0,.55);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .2s cubic-bezier(.22,1,.36,1), transform .2s cubic-bezier(.22,1,.36,1), visibility .2s;
}
.sg-lang-panel::before {
    content: "";
    position: absolute;
    top: -14px; left: 0; right: 0; height: 14px;
}
.sg-lang:hover .sg-lang-panel,
.sg-lang:focus-within .sg-lang-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.sg-lang-panel a {
    display: block;
    padding: 9px 14px;
    border-radius: 9px;
    color: #2c3247;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: background .15s;
}
.sg-lang-panel a:hover { background: #eef2fb; }

/* ── live event feed (bottom-left) ── */
#sg-feed {
    position: absolute;
    left: 36px;
    bottom: 84px;
    z-index: 2;
    font-size: 11.5px;
    color: rgba(251,248,242,.45);
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: 9px;
    opacity: 0;
    transition: opacity .8s ease;
}
#sg-feed.show { opacity: 1; }
body.leaving #sg-feed { opacity: 0; }
#sg-feed i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #8fd3a8;
    font-style: normal;
    flex-shrink: 0;
    transition: background .3s;
}
#sg-feed b {
    color: rgba(251,248,242,.75);
    font-weight: 500;
}

/* ── legend (bottom-right) ── */
.sg-legend {
    position: absolute;
    right: 36px;
    bottom: 80px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    transition: opacity .3s;
}
.sg-legend span {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(251,248,242,.07);
    background: rgba(7,11,24,.35);
    color: rgba(251,248,242,.34);
    transition: color .45s ease, border-color .45s ease,
                background .45s ease, box-shadow .45s ease,
                transform .45s cubic-bezier(.22,1,.36,1);
}
.sg-legend i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lg);
    opacity: .55;
    font-style: normal;
    flex-shrink: 0;
    transition: opacity .45s ease, box-shadow .45s ease, transform .45s ease;
}
/* active group — lights up while its event is live on the globe */
.sg-legend span.sg-on {
    color: rgba(251,248,242,.92);
    border-color: rgba(var(--lg-rgb), .45);
    background: rgba(var(--lg-rgb), .10);
    box-shadow: 0 0 18px -4px rgba(var(--lg-rgb), .35);
    transform: translateX(-3px);
}
.sg-legend span.sg-on i {
    opacity: 1;
    transform: scale(1.35);
    box-shadow: 0 0 8px 1px rgba(var(--lg-rgb), .7);
}
body.leaving .sg-legend { opacity: 0; }

/* ── scroll cue: arrow only, in a soft ring below the CTA ── */
.sg-sitecue {
    position: absolute;
    left: 50%;
    bottom: 3vh;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(251,248,242,.16);
    color: rgba(251,248,242,.45);
    text-decoration: none;
    transition: color .3s, border-color .3s, opacity .3s;
}
.sg-sitecue:hover {
    color: rgba(251,248,242,.9);
    border-color: rgba(251,248,242,.4);
}
.sg-sitecue svg {
    width: 16px;
    height: 16px;
    animation: sg-bob 2.4s ease-in-out infinite;
}
@keyframes sg-bob {
    0%,100% { transform: translateY(0); opacity: .5; }
    50%      { transform: translateY(5px); opacity: 1; }
}
body.leaving .sg-sitecue { opacity: 0; }

/* ── circle-wipe ── */
#sg-wipe {
    position: fixed;
    z-index: 99999;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #fbf8f2;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
}
#sg-wipe.go {
    transition: transform .72s cubic-bezier(.55,0,.25,1);
}

/* ── content anchor — push WP content below globe ── */
#sg-content {
    display: block;
}

/* ── responsive ── */
@media (max-width: 960px) {
    .sg-cluster  { display: none; }
}
@media (max-width: 600px) {
    #sg-feed     { left: 24px; bottom: 60px; }
    .sg-legend   { display: none; }
    .sg-cta      { bottom: 13vh; padding: 18px 34px; }
}

/* ── ping keyframe used by JS if needed ── */
@keyframes sg-ping {
    0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.4); }
    70%  { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
    100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
