/* ============================================================
   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: var(--sg-globe-bg, #070b18);
    overflow: hidden;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #fbf8f2;
}

/* Desktop: pull the hero up under the fixed site header (matches the original
   layout that the old JS relocation produced) so there is no vertical shift. */
@media (min-width: 1024px) {
    body.sg-front-page #sg-globe-panel {
        margin-top: -76px;
    }
}

/* ── loading overlay (replaced by canvas when .sg-ready) ── */
.sg-globe-loader {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sg-globe-bg, #070b18);
    transition: opacity .55s cubic-bezier(.22, 1, .36, 1), visibility .55s;
}
#sg-globe-panel.sg-ready .sg-globe-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sg-loader-scene {
    position: absolute;
    width: min(42vw, 220px);
    height: min(42vw, 220px);
    left: 50%;
    top: 47%;
    transform: translate(-50%, -50%);
}
.sg-loader-glow {
    position: absolute;
    inset: -18%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(86, 124, 224, .22) 0%, rgba(46, 87, 178, .08) 45%, transparent 72%);
    animation: sg-loader-pulse 2.4s ease-in-out infinite;
}
.sg-loader-sphere {
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, rgba(26, 40, 84, .95) 0%, rgba(9, 13, 28, .98) 68%, rgba(7, 11, 24, 1) 100%);
    box-shadow:
        inset 0 0 40px rgba(132, 166, 255, .12),
        0 0 60px rgba(76, 123, 232, .18);
}
.sg-loader-orbit {
    position: absolute;
    inset: -4%;
    border-radius: 50%;
    border: 1px solid rgba(165, 188, 245, .14);
    border-top-color: rgba(178, 200, 255, .75);
    border-right-color: rgba(143, 211, 168, .35);
    animation: sg-loader-spin 1.35s linear infinite;
}
.sg-loader-orbit--delay {
    inset: -14%;
    opacity: .55;
    animation-duration: 2.1s;
    animation-direction: reverse;
    border-top-color: rgba(173, 196, 255, .45);
}

@keyframes sg-loader-spin {
    to { transform: rotate(360deg); }
}
@keyframes sg-loader-pulse {
    0%, 100% { transform: scale(.96); opacity: .75; }
    50%      { transform: scale(1.04); opacity: 1; }
}

/* hide live globe UI until ready, then cross-fade in */
#sg-globe-panel:not(.sg-ready) #sg-globe,
#sg-globe-panel:not(.sg-ready) .sg-cluster,
#sg-globe-panel:not(.sg-ready) #sg-feed,
#sg-globe-panel:not(.sg-ready) .sg-legend,
#sg-globe-panel:not(.sg-ready) .sg-actions,
#sg-globe-panel:not(.sg-ready) .sg-sitecue {
    opacity: 0;
    visibility: hidden;
}
#sg-globe-panel.sg-ready #sg-globe,
#sg-globe-panel.sg-ready .sg-cluster,
#sg-globe-panel.sg-ready #sg-feed,
#sg-globe-panel.sg-ready .sg-legend,
#sg-globe-panel.sg-ready .sg-actions,
#sg-globe-panel.sg-ready .sg-sitecue {
    opacity: 1;
    visibility: visible;
    transition: opacity .65s cubic-bezier(.22, 1, .36, 1), visibility .65s;
}

/* canvas fills the whole panel */
#sg-globe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
    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;
}

/* ── hero actions: domain-check form + secondary "Get started" ── */
.sg-actions {
    position: absolute;
    left: 50%;
    bottom: 10vh;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: min(92vw, 540px);
}
body.leaving .sg-actions { opacity: 0; transform: translateX(-50%) scale(.97); }

/* the input + button live inside one pill */
.sg-check {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 7px 7px 7px 8px;
    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,.10),
        0 0 60px -12px rgba(76,123,232,.45);
    transition: box-shadow .35s ease, transform .25s cubic-bezier(.22,1,.36,1);
    animation: sg-breathe 5s ease-in-out infinite;
}
.sg-check:focus-within {
    animation: none;
    box-shadow:
        0 24px 80px -16px rgba(0,0,0,.75),
        0 0 0 2px rgba(76,123,232,.55),
        0 0 70px -8px rgba(76,123,232,.55);
}
.sg-check.sg-check-err {
    animation: sg-shake .4s ease;
    box-shadow: 0 24px 80px -16px rgba(0,0,0,.75), 0 0 0 2px rgba(242,116,98,.85);
}
@keyframes sg-breathe {
    0%,100% { box-shadow: 0 24px 70px -16px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.10), 0 0 60px -12px rgba(76,123,232,.35); }
    50%      { box-shadow: 0 24px 70px -16px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.14), 0 0 84px -8px rgba(76,123,232,.6); }
}
@keyframes sg-shake {
    0%,100% { transform: translateX(0); }
    25%     { transform: translateX(-7px); }
    75%     { transform: translateX(7px); }
}
.sg-check input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #14182a;
    font-family: inherit;
    font-size: 16px;            /* 16px avoids iOS zoom-on-focus */
    font-weight: 500;
    letter-spacing: .01em;
    padding: 12px 10px 12px 16px;
}
.sg-check input::placeholder { color: #9aa0b4; font-weight: 500; }
.sg-check-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    border: none;
    color: #f7f9ff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 14px 26px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2f63e8, #1f49c8);
    box-shadow: 0 10px 26px -10px rgba(31,73,200,.9);
    transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s ease, filter .25s ease;
    white-space: nowrap;
}
.sg-check-btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 32px -10px rgba(31,73,200,1); }
.sg-check-btn:active { transform: translateY(0); }
.sg-ar { transition: transform .3s cubic-bezier(.22,1,.36,1); display: inline-block; }
.sg-check-btn:hover .sg-ar { transform: translateX(4px); }

.sg-check-sub {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .04em;
    color: rgba(251,248,242,.5);
}

/* secondary, low-emphasis path for people who don't want to type */
.sg-getstarted {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: rgba(251,248,242,.72);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 4px;
    transition: color .25s ease;
}
.sg-getstarted:hover { color: #fff; }
.sg-getstarted:hover .sg-ar { transform: translateX(4px); }

/* ── 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-actions  { bottom: 12vh; gap: 11px; }
    .sg-check-btn { padding: 13px 18px; letter-spacing: .1em; }
    .sg-check input { padding: 11px 6px 11px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .sg-loader-orbit,
    .sg-loader-glow { animation: none; }
}

/* ── 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); }
}
