/* ============================================================================
 * Interactive Globe Pin Cards — pattern-scoped styles
 *
 * All selectors are namespaced under .tecq-globe-section so generic class
 * names (.pin, .loading, .vignette, .card-*) never leak out of the section.
 * IDs in the markup are tecq-globe-* prefixed for the same reason.
 * ============================================================================ */

.tecq-globe-section {
    --tecq-globe-card-bg: rgba(10, 10, 12, 0.85);
    --tecq-globe-card-border: rgba(255, 255, 255, 0.2);
    --tecq-globe-card-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 12px 32px rgba(0, 0, 0, 0.8),
        0 0 28px rgba(255, 255, 255, 0.04);

    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    color: #ffffff;
    background: #000;
    /*background: radial-gradient(ellipse at 50% 50%, rgba(20, 22, 28, 1) 0%, rgba(0, 0, 0, 1) 80%);*/
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.tecq-globe-section *,
.tecq-globe-section *::before,
.tecq-globe-section *::after {
    box-sizing: border-box;
}

.tecq-globe-section .globe-stage { position: absolute; inset: 0; z-index: 1; }
.tecq-globe-section .globe-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.tecq-globe-section .pin-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }

.tecq-globe-section .pin {
    position: absolute; left: 0; top: 0;
    will-change: transform, opacity;
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease, filter 0.4s ease;
    z-index: 5;
}

.tecq-globe-section .pin.is-revealed { opacity: 1; pointer-events: auto; }
.tecq-globe-section .pin.is-occluded { opacity: 0 !important; pointer-events: none !important; z-index: 1; }
.tecq-globe-section .pin:hover { z-index: 50; }

.tecq-globe-section .pin-layer:has(.pin:hover) .pin.is-revealed:not(:hover) {
    opacity: 0.25; filter: blur(1.5px);
}

/* Compact & expandable card */
.tecq-globe-section .pin-card {
    position: absolute; left: 0; top: 0;
    background: var(--tecq-globe-card-bg);
    border: 1px solid var(--tecq-globe-card-border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 12px; padding: 10px;
    display: flex; flex-direction: row; align-items: flex-start; gap: 10px;
    box-shadow: var(--tecq-globe-card-shadow);
    opacity: 0; pointer-events: auto; cursor: pointer;
    width: 220px;
    z-index: 3;
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity 0.7s ease, border-color 0.2s, background 0.2s,
                box-shadow 0.3s ease;
    text-decoration: none; color: inherit;
    padding: 15x;
}

.tecq-globe-section .pin.is-revealed .pin-card { opacity: 1; }

.tecq-globe-section .pin-card:hover {
    width: 310px;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(20, 20, 24, 0.98);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15),
                0 16px 40px rgba(0, 0, 0, 0.9),
                0 0 40px var(--pin-color);
}

/* Media (flag → preview image) */
.tecq-globe-section .card-media {
    position: relative; width: 28px; height: 28px; border-radius: 50%;
    flex-shrink: 0; overflow: hidden; background: transparent;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tecq-globe-section .pin-card:hover .card-media { width: 80px; height: 80px; border-radius: 6px; }

.tecq-globe-section .card-flag,
.tecq-globe-section .card-image {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; transition: opacity 0.3s ease, transform 0.3s ease;
}
.tecq-globe-section .card-flag  { opacity: 1; transform: scale(1.02); }
.tecq-globe-section .card-image { opacity: 0; transform: scale(1.1); }

.tecq-globe-section .pin-card:hover .card-flag  { opacity: 0; }
.tecq-globe-section .pin-card:hover .card-image { opacity: 1; transform: scale(1); }

/* Card text body */
.tecq-globe-section .card-body { 
    padding:0;
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
    overflow: hidden; 
}

.tecq-globe-section .card-country {
    font-size: 14px; font-weight: 700; color: #ffffff; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: margin-bottom 0.3s ease;
    margin: 0;
}
.tecq-globe-section .pin-card:hover .card-country { white-space: normal; margin-bottom: 2px; }

.tecq-globe-section .card-domain {
    font-size: 12px; font-weight: 700; color: #a4c2f4;
    margin: 2px 0 4px; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tecq-globe-section .pin-card:hover .card-domain { white-space: normal; }

.tecq-globe-section .card-desc {
    font-size: 12px; font-weight: 400; color: rgba(255, 255, 255, 0.8);
    line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.tecq-globe-section .pin-card:hover .card-desc { -webkit-line-clamp: 5; }

.tecq-globe-section .card-btn {
    opacity: 0; height: 0; margin-top: 0; padding: 0 16px;
    background: rgba(255, 255, 255, 0.15); border-radius: 6px;
    font-size: 11px; font-weight: 600; text-align: center; color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tecq-globe-section .pin-card:hover .card-btn       { opacity: 1; height: 28px; margin-top: 10px; }
.tecq-globe-section .pin-card:hover .card-btn:hover { background: #fff; color: #000; }

@media (max-width: 768px) {
    .tecq-globe-section .pin-card                   { width: 190px; }
    .tecq-globe-section .pin-card:hover             { width: 280px; }
    .tecq-globe-section .pin-card:hover .card-media { width: 70px; height: 70px; }
    .tecq-globe-section .card-country               { font-size: 13px; }
    .tecq-globe-section .card-domain,
    .tecq-globe-section .card-desc                  { font-size: 11px; }
}

/* Pin colour palette (driven by data-color attribute) */
.tecq-globe-section .pin[data-color="red"]    { --pin-color: #ef4444; }
.tecq-globe-section .pin[data-color="blue"]   { --pin-color: #3b82f6; }
.tecq-globe-section .pin[data-color="purple"] { --pin-color: #a855f7; }

.tecq-globe-section .pin-dot {
    position: absolute; left: -5px; top: -5px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--pin-color);
    box-shadow: 0 0 8px var(--pin-color), 0 0 18px var(--pin-color), 0 0 30px rgba(239,68,68,0.25);
    opacity: 0; transition: opacity 0.4s ease 0.25s;
    z-index: 2;
}
.tecq-globe-section .pin.is-revealed .pin-dot {
    opacity: 1;
    animation: tecq-globe-pulse-glow 2.2s infinite ease-in-out;
}

@keyframes tecq-globe-pulse-glow {
    0%   { box-shadow: 0 0 8px  var(--pin-color), 0 0 18px var(--pin-color);                           transform: scale(1); }
    50%  { box-shadow: 0 0 14px var(--pin-color), 0 0 28px var(--pin-color), 0 0 44px var(--pin-color); transform: scale(1.5); }
    100% { box-shadow: 0 0 8px  var(--pin-color), 0 0 18px var(--pin-color);                           transform: scale(1); }
}

.tecq-globe-section .pin:hover .pin-dot { animation: tecq-globe-pulse-glow 1s infinite ease-in-out; }

.tecq-globe-section .pin-line {
    position: absolute; left: 0; top: 0; height: 1px;
    transform-origin: 0 0;
    opacity: 0; transition: opacity 0.5s ease 0.15s;
    background-image: linear-gradient(90deg, var(--pin-color) 0%, transparent 80%);
    z-index: 1;
}
.tecq-globe-section .pin.is-revealed .pin-line { opacity: 0.6; }
.tecq-globe-section .pin:hover .pin-line       { opacity: 1; }

/* Group navigation dots */
.tecq-globe-section .frame-controls {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    z-index: 10; display: flex; gap: 12px;
    padding: 12px 20px; border-radius: 999px;
    background: rgba(10, 10, 12, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.8s ease;
}
.tecq-globe-section.is-active .frame-controls { opacity: 1; pointer-events: auto; }

.tecq-globe-section .frame-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 10px; height: 10px; padding: 0; border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tecq-globe-section .frame-btn.active                 { background: white; border-color: white; transform: scale(1.3); }
.tecq-globe-section .frame-btn:hover:not(.active)     { background: rgba(255, 255, 255, 0.2); }

.tecq-globe-section .vignette {
    position: absolute; inset: 0; z-index: 4; pointer-events: none;
    background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
}

.tecq-globe-section .loading {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
    transition: opacity 0.6s ease;
}
.tecq-globe-section .loading.is-hidden { opacity: 0; pointer-events: none; }

/* ============================================================================
 * Globe wrapper — two-state hero (state-stats / state-full)
 * ============================================================================ */

.tecq-globe-wrapper {
    position: relative;
    width: 100%;
    transition: height 0.6s ease;
}

.tecq-globe-hero-text + .tecq-globe-wrapper {
    /* margin-top: -98px; */
}


.tecq-globe-wrapper.state-stats { height: 55vh; overflow: hidden; }
.tecq-globe-wrapper.state-full  { height: 100vh; overflow: visible; }

/* Force-hide pins + frame controls in stats state */
.tecq-globe-wrapper.state-stats .pin            { opacity: 0 !important; pointer-events: none !important; }
.tecq-globe-wrapper.state-stats .frame-controls { opacity: 0 !important; pointer-events: none !important; }
.tecq-globe-wrapper.state-stats .globe-stage    { pointer-events: none; }

/* ── Stats overlay ────────────────────────────────────────────────────────── */
.tecq-globe-stats-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.tecq-globe-wrapper.state-full .tecq-globe-stats-overlay { opacity: 0; pointer-events: none; }

/* Center: play button — anchored to projected globe center */
.tecq-globe-stats-center {
    position: absolute;
    top: 33vh;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tecq-globe-play-btn {
    width: 100px;
    height: 100px;
    border: none;
    background: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

.tecq-globe-play-btn:hover {
    transform: scale(1.08);
    opacity: 0.85;
}

.tecq-globe-play-btn img {
    width: 72px;
    height: 72px;
    display: block;
}

/* ── Stat block ───────────────────────────────────────────────────────────── */
.tecq-globe-stat-block {
    color: #fff;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    position: absolute;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 280px;
}


.tecq-globe-stat-icon {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.tecq-globe-stat-icon svg { width: 28px; height: 28px; fill: #111; }

.tecq-globe-stat-headline {
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 700;
    line-height: 1.25;
    color: #c8d8f4;
    margin-bottom: 12px;
    white-space: nowrap;
}

.tecq-globe-stat-rule {
    width: 64px;
    height: 4px;
    background: linear-gradient(90deg, #FFFFFF 0%, #A4C2F4 100%);
    margin-bottom: 10px;
    margin-top: 10px;
}

.tecq-globe-stat-subline {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .tecq-globe-stats-overlay  { padding: 24px 4vw; }
    .tecq-globe-stats-center   { padding: 0 16px; }
    .tecq-globe-play-btn       { width: 56px; height: 56px; border: none; background: none; }
    .tecq-globe-play-btn img   { width: 56px; height: 56px; }
    .tecq-globe-stat-icon      { width: 36px; height: 36px; margin-bottom: 10px; }
    .tecq-globe-stat-icon svg  { width: 20px; height: 20px; }
    .tecq-globe-stat-headline  { font-size: clamp(13px, 3.5vw, 18px); margin-bottom: 8px; }
    .tecq-globe-stat-rule      { margin-bottom: 10px; }
    .tecq-globe-stat-subline   { font-size: 14px; }
}

/* ============================================================================
 * Above-globe hero text
 * ============================================================================ */

.tecq-globe-hero-text {
    background: #000;
    text-align: center;
    padding: 24px 24px 48px;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    position: relative;
    z-index: 10;
}

.tecq-globe-badge {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 8px 22px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    letter-spacing: 0.01em;
}

.tecq-globe-heading {
    font-size: clamp(36px, 5.5vw, 48px);
    font-weight: 800;
    color: #fff;
    line-height: 1.08;
    margin: 0 0 10px;
}

.tecq-globe-subtext {
    font-size: clamp(15px, 1.4vw, 20px);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.42);
    line-height: 1.2;
    max-width: 520px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .tecq-globe-hero-text { padding: 56px 20px 36px; }
    .tecq-globe-badge      { font-size: 13px; padding: 7px 18px; margin-bottom: 24px; }
    .tecq-globe-subtext    { font-size: 15px; }
}
