/* ============================================================
   Premium globe hero — dark SaaS-style split layout
   ============================================================ */

.xb-hg {
    /* matches the site's established brand palette (breadcrumb/sidebar
       browns, gold accent used across the catalog and filter UI) rather
       than a generic blue "SaaS" scheme */
    --hg-bg-top: #1c0f09;
    --hg-bg-bottom: #2c1108;
    --hg-ink: #f8f4ee;
    --hg-ink-muted: #c7b6a3;
    --hg-accent: #c99054;
    --hg-accent-light: #e3bd8a;
    --hg-accent-soft: rgba(227, 189, 138, 0.14);
    --hg-border: rgba(227, 189, 138, 0.18);
    --hg-glass: rgba(69, 43, 35, 0.55);

    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--hg-bg-top) 0%, var(--hg-bg-bottom) 100%);
    padding: 100px 0 100px;
    isolation: isolate;
}

/* ---------- background layers ---------- */
.xb-hg__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.xb-hg__grid {
    position: absolute;
    inset: -1px;
    background-image:
        linear-gradient(rgba(227, 189, 138, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(227, 189, 138, 0.08) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 65% at 60% 40%, #000 30%, transparent 78%);
    mask-image: radial-gradient(ellipse 80% 65% at 60% 40%, #000 30%, transparent 78%);
}

.xb-hg__radial {
    position: absolute;
    top: 50%;
    right: 6%;
    width: 900px;
    height: 900px;
    max-width: 130vw;
    transform: translateY(-50%);
    background: radial-gradient(circle, rgba(201, 144, 84, 0.28) 0%, rgba(201, 144, 84, 0.1) 38%, transparent 68%);
    filter: blur(10px);
}

.xb-hg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: xbHgOrbDrift 18s ease-in-out infinite;
    /* JS sets --px/--py for cursor parallax; the drift keyframes below animate
       margin instead of transform so the two effects don't fight over the
       same CSS property */
    transform: translate(var(--px, 0px), var(--py, 0px));
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.xb-hg__orb--1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, rgba(201, 144, 84, 0.35), transparent 70%);
    animation-duration: 22s;
}

.xb-hg__orb--2 {
    width: 320px;
    height: 320px;
    bottom: -80px;
    left: 12%;
    background: radial-gradient(circle, rgba(227, 189, 138, 0.28), transparent 70%);
    animation-duration: 26s;
    animation-delay: -6s;
}

.xb-hg__orb--3 {
    width: 260px;
    height: 260px;
    top: 8%;
    right: 8%;
    background: radial-gradient(circle, rgba(165, 102, 73, 0.25), transparent 70%);
    animation-duration: 20s;
    animation-delay: -12s;
}

@keyframes xbHgOrbDrift {
    0%, 100% { margin: 0; }
    33% { margin: -24px 0 0 30px; }
    66% { margin: 18px 0 0 -20px; }
}

.xb-hg__particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.xb-hg__particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(227, 189, 138, 0.75);
    box-shadow: 0 0 6px 1px rgba(201, 144, 84, 0.6);
    animation: xbHgParticleFloat linear infinite;
}

@keyframes xbHgParticleFloat {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-140px) translateX(var(--drift, 20px)); opacity: 0; }
}

/* ---------- layout ---------- */
.xb-hg__container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: center;
    gap: 40px;
}

.xb-hg__content {
    max-width: 560px;
}

.xb-hg__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 50px;
    border: 1px solid var(--hg-border);
    background: rgba(227, 189, 138, 0.1);
    color: var(--hg-accent-light);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 26px;
}

.xb-hg__eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hg-accent-light);
    box-shadow: 0 0 8px 2px rgba(201, 144, 84, 0.8);
}

.xb-hg__title {
    margin: 0 0 22px;
    font-size: clamp(34px, 4.2vw, 54px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--hg-ink);
}

.xb-hg__title span {
    background: linear-gradient(100deg, var(--hg-accent-light), #f3d9b1 60%, var(--hg-accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.xb-hg__text {
    margin: 0 0 38px;
    font-size: 16.5px;
    line-height: 1.7;
    color: var(--hg-ink-muted);
    max-width: 480px;
}

.xb-hg__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.xb-hg__cta-primary,
.xb-hg__cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.xb-hg__cta-primary {
    background: linear-gradient(135deg, var(--hg-accent), var(--hg-accent-light));
    color: #2c1108;
    box-shadow: 0 12px 30px -10px rgba(201, 144, 84, 0.55);
}

.xb-hg__cta-primary:hover,
.xb-hg__cta-primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -8px rgba(201, 144, 84, 0.7);
    color: #2c1108;
    outline: none;
}

.xb-hg__cta-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--hg-ink);
    border: 1px solid var(--hg-border);
}

.xb-hg__cta-secondary i {
    font-size: 12px;
    transition: transform 0.25s ease;
}

.xb-hg__cta-secondary:hover,
.xb-hg__cta-secondary:focus-visible {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(227, 189, 138, 0.4);
    color: #ffffff;
    outline: none;
}

.xb-hg__cta-secondary:hover i {
    transform: translateX(3px);
}

.xb-hg__stats {
    display: flex;
    gap: 34px;
    margin-top: 52px;
    padding-top: 32px;
    border-top: 1px solid var(--hg-border);
}

.xb-hg__stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--hg-ink);
    font-variant-numeric: tabular-nums;
}

.xb-hg__stat-label {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--hg-ink-muted);
}

/* ---------- globe column ---------- */
.xb-hg__globe-col {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 480px;
}

.xb-hg__globe-float {
    position: relative;
    width: min(720px, 92vw);
    aspect-ratio: 1 / 1;
    animation: xbHgFloat 7s ease-in-out infinite;
}

@keyframes xbHgFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

.xb-hg__glow {
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 144, 84, 0.35) 0%, rgba(201, 144, 84, 0.08) 45%, transparent 72%);
    filter: blur(6px);
    z-index: 0;
}

.xb-globe-scene {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.xb-globe-scene canvas {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    cursor: grab;
    touch-action: none;
}

.xb-globe-scene canvas.is-ready {
    opacity: 1;
}

.xb-globe-scene canvas:active {
    cursor: grabbing;
}

/* ---------- floating labels ---------- */
.xb-globe-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.xb-globe-label {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 10px;
    border-radius: 50px;
    background: rgba(44, 17, 8, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(227, 189, 138, 0.22);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s ease, top 0.35s cubic-bezier(0.22, 1, 0.36, 1), left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    animation: xbLabelBob 3.4s ease-in-out infinite;
    animation-play-state: paused;
}

.xb-globe-label.is-visible {
    opacity: 1;
    animation-play-state: running;
}

.xb-globe-label__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hg-accent-light);
    box-shadow: 0 0 8px 2px rgba(201, 144, 84, 0.85);
    flex-shrink: 0;
}

/* the on-demand label shown when a user clicks any of the 45 markers */
.xb-globe-label--click {
    background: rgba(201, 144, 84, 0.24);
    border-color: rgba(227, 189, 138, 0.6);
    box-shadow: 0 8px 24px -8px rgba(201, 144, 84, 0.55);
}

@keyframes xbLabelBob {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -5px; }
}

@media (prefers-reduced-motion: reduce) {
    .xb-hg__orb,
    .xb-hg__particle,
    .xb-hg__globe-float,
    .xb-globe-label {
        animation: none !important;
    }
    .xb-globe-scene canvas {
        transition: none !important;
    }
}

/* ---------- entrance reveal ---------- */
[data-hg-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-hg-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}

[data-hg-reveal-child] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.is-revealed [data-hg-reveal-child] {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    [data-hg-reveal],
    [data-hg-reveal-child] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
    .xb-hg__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 56px;
    }

    .xb-hg__content {
        max-width: 640px;
        margin: 0 auto;
    }

    .xb-hg__text {
        margin-left: auto;
        margin-right: auto;
    }

    .xb-hg__actions {
        justify-content: center;
    }

    .xb-hg__stats {
        justify-content: center;
    }

    .xb-hg__globe-col {
        order: 2;
    }

    .xb-hg__globe-float {
        width: min(560px, 86vw);
    }
}

@media (max-width: 767px) {
    .xb-hg {
        padding: 90px 0 80px;
    }

    .xb-hg__container {
        padding: 0 20px;
        gap: 44px;
    }

    .xb-hg__title {
        font-size: 30px;
    }

    .xb-hg__text {
        font-size: 15px;
    }

    .xb-hg__stats {
        gap: 24px;
        flex-wrap: wrap;
    }

    .xb-hg__globe-float {
        width: min(400px, 88vw);
    }

    .xb-globe-label {
        font-size: 11px;
        padding: 6px 12px 6px 9px;
    }
}

@media (max-width: 420px) {
    .xb-hg__actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .xb-hg__cta-primary,
    .xb-hg__cta-secondary {
        justify-content: center;
        width: 100%;
    }
}
