/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    --bg-dark: #040914;
    --bg-dark-gray: #080f1b;
    --card-bg: rgba(13, 24, 46, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    
    /* Branding Colors */
    --color-primary: #0072ff;     /* Electric Blue */
    --color-primary-glow: rgba(0, 114, 255, 0.4);
    --color-accent: #00f0ff;      /* Tech Cyan */
    --color-accent-glow: rgba(0, 240, 255, 0.4);
    --color-red: #ff2a2a;
    
    /* Typography */
    --text-white: #ffffff;
    --text-silver: #a0aab8;
    --text-muted: #5e6b7d;
    
    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & FOUNDATIONS
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-dark);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-white);
    overflow-x: hidden;
    position: relative;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* ==========================================================================
   BACKGROUND EFFECTS (CANVAS & GLOW)
   ========================================================================== */
#starfieldCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 2;
    pointer-events: none;
    opacity: 0.25;
}

.glow-1 {
    top: 10%;
    left: 10%;
    width: 300px;
    height: 300px;
    background-color: var(--color-primary);
}

.glow-2 {
    bottom: 20%;
    right: 10%;
    width: 400px;
    height: 400px;
    background-color: var(--color-accent);
    opacity: 0.15;
}

.glow-3 {
    top: 40%;
    left: 50%;
    width: 250px;
    height: 250px;
    background-color: #0044ff;
    opacity: 0.12;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.landing-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 3;
    padding: 0 4%;
}

/* Header */
.main-header {
    width: 100%;
    padding: 30px 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    z-index: 10;
}

.logos-container {
    display: flex;
    align-items: center;
    gap: 25px;
}

.logo-box {
    display: flex;
    align-items: center;
    height: 45px;
}

.brand-logo-svg {
    height: 100%;
    max-width: 220px;
}

.brand-divider {
    width: 1.5px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero-section {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 40px 0 100px 0;
}

.hero-grid {
    width: 100%;
    min-height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: 0.85fr 1.25fr;
    gap: 20px;
    align-items: center;
    position: relative;
}

/* ==========================================================================
   LEFT COLUMN - CONTENT PANEL
   ========================================================================== */
.content-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    animation: fadeSlideInLeft 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-brand {
    justify-content: center;
}

.badge-tag {
    justify-content: center;
}

.body-description {
    margin-left: auto;
    margin-right: auto;
}

.cta-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.services-footer {
    justify-content: center;
    width: 100%;
}

/* Badge Tag */
.badge-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 114, 255, 0.08);
    border: 1px solid rgba(0, 114, 255, 0.2);
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 32px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-accent);
    animation: blink 2s infinite ease-in-out;
}

.badge-text {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-white);
}

/* Headlines */
.main-headline {
    font-family: 'Outfit', sans-serif;
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: var(--text-white);
    margin-bottom: 25px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
}

/* Description */
.body-description {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--text-silver);
    max-width: none;
    margin: 0 auto 35px;
    text-align: center;
}

.body-description strong {
    color: var(--text-white);
    font-weight: 600;
}

/* ==========================================================================
   BUTTON INTERACTIVO (EXPLORE OUR SOLUTIONS)
   ========================================================================== */
.cta-container {
    margin-bottom: 50px;
}

.btn-explore {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 16px 36px;
    background: linear-gradient(135deg, #0055ff 0%, #0088ff 100%);
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 114, 255, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
    
    /* Entrance and pulse CTA animations combined */
    animation: 
        buttonEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
        buttonPulseCTA 3s ease-in-out infinite 1s;
}

/* Light beam streak running on hover */
.btn-bg-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    pointer-events: none;
}

/* Arrow wrapper for separate hover styling */
.btn-arrow-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-arrow {
    width: 20px;
    height: 20px;
}

/* Button Interactions */
.btn-explore:hover {
    transform: translateY(-3px) scale(1.03);
    background: linear-gradient(135deg, #0066ff 0%, #0099ff 100%);
    box-shadow: 0 12px 30px rgba(0, 114, 255, 0.5), 0 0 15px rgba(0, 240, 255, 0.3);
    border-color: rgba(0, 240, 255, 0.8);
}

.btn-explore:hover .btn-bg-shine {
    animation: btnShine 0.8s ease-out forwards;
}

.btn-explore:hover .btn-arrow-wrapper {
    transform: translateX(6px);
}

.btn-explore:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 6px 15px rgba(0, 114, 255, 0.4);
}

/* Bottom Categories */
.services-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-silver);
    opacity: 0.8;
}

.bullet {
    color: var(--color-primary);
    font-size: 16px;
}

/* ==========================================================================
   RIGHT COLUMN - INTERACTIVE MAP
   ========================================================================== */
.map-panel {
    position: absolute;
    top: -25px;
    right: -1%;
    bottom: 0;
    width: 64vw;
    height: calc(100vh + 35px);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    z-index: 2;
    pointer-events: none;
}

.map-wrapper {
    position: relative;
    height: 100%;
    width: auto;
    aspect-ratio: 3004 / 3234;
    max-width: none;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    flex: 0 0 auto;
	
}

.map-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right top;
    border: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 0.95;
    display: block;
    pointer-events: none;
}



/* ==========================================================================
   MAP MARKERS
   ========================================================================== */
.map-marker-container {
    position: absolute;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    cursor: pointer;
    pointer-events: auto;
}

.marker-dot {
    width: 9px;
    height: 9px;
    background-color: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent), 0 0 20px var(--color-primary);
    z-index: 3;
    transition: var(--transition-fast);
}

/* Double-Ring Pulsing Wave Effect */
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1.5px solid var(--color-accent);
    border-radius: 50%;
    opacity: 0;
    animation: markerPulse 2.4s cubic-bezier(0.25, 0, 0, 1) infinite;
    pointer-events: none;
}

.pulse-ring-delayed {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid var(--color-primary);
    border-radius: 50%;
    opacity: 0;
    animation: markerPulse 2.4s cubic-bezier(0.25, 0, 0, 1) infinite 1.2s;
    pointer-events: none;
}

/* Label box adjacent to marker */
.country-label-box {
    position: absolute;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(5, 12, 28, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 5px 10px;
    min-width: 130px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
    transform-origin: left center;
    transition: var(--transition-smooth);
    z-index: 2;
}

/* Layout adjusting: position US and Mexico labels correctly */
[data-country="usa"] .country-label-box {
    left: 22px;
}
[data-country="mexico"] .country-label-box {
    left: auto;
    right: 22px;
    transform-origin: right center;
}
[data-country="ecuador"] .country-label-box {
    left: 22px;
}
[data-country="peru"] .country-label-box {
    left: auto;
    right: 22px;
    transform-origin: right center;
}

.flag-wrapper {
    display: flex;
    align-items: center;
    width: 20px;
}

.mini-flag {
    width: 100%;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.label-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.label-country-name {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 0.5px;
}

.label-presence-type {
    font-size: 7.5px;
    font-weight: 500;
    color: var(--color-accent);
    letter-spacing: 0.3px;
}

/* Marker / Label Interactive Hover Styling */
.map-marker-container:hover .marker-dot {
    background-color: var(--text-white);
    box-shadow: 0 0 15px var(--color-accent), 0 0 30px #ffffff;
    transform: scale(1.3);
}

.map-marker-container:hover .country-label-box {
    background: rgba(0, 114, 255, 0.2);
    border-color: var(--color-accent);
    box-shadow: 0 8px 25px rgba(0, 240, 255, 0.25);
    transform: translateY(-2px) scale(1.03);
}

/* ==========================================================================
   GLASSMORPHISM POPUP CARDS
   ========================================================================== */
.presence-popup-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 280px;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1.5px solid rgba(0, 240, 255, 0.15);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 240, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: 
        opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.4s;
    z-index: 10;
    pointer-events: none;
}

/* Active popup style triggers via JS */
.presence-popup-card.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: none;
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.popup-flag {
    font-size: 20px;
}

.popup-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-white);
}

.popup-desc {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-silver);
    margin-bottom: 12px;
}

.popup-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-accent);
}

.popup-meta i {
    font-size: 11px;
}

/* ==========================================================================
   TOWER AND BEACON VISUAL
   ========================================================================== */
.tower-svg-container {
    position: absolute;
    bottom: 20px;
    left: 47%;
    transform: translateX(-50%);
    width: 140px;
    height: 280px;
    z-index: 4;
    pointer-events: none;
    opacity: 0.65;
    animation: fadeEntrance 1.8s ease-out forwards;
}

.tower-svg {
    width: 100%;
    height: 100%;
}

.tower-beacon-glow {
    animation: beaconPulse 1.5s infinite ease-in-out;
}

/* Concentric Signal Waves propagation animation */
.signal-wave {
    opacity: 0;
    transform-origin: 50px 10px;
}

.signal-wave-1 {
    animation: signalRadiate 2.4s infinite ease-out;
}

.signal-wave-2 {
    animation: signalRadiate 2.4s infinite ease-out 1.2s;
}

/* ==========================================================================
   CITY LIGHTS SKYLINE AT BOTTOM
   ========================================================================== */
.skyline-overlay {
    position: fixed;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 90px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.85;
}

.skyline-svg {
    width: 100%;
    height: 100%;
    /* Gradient mask to blend skyline with background at the top */
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes buttonEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Breathing / pulse effect to draw user click action */
@keyframes buttonPulseCTA {
    0% {
        box-shadow: 0 4px 20px rgba(0, 114, 255, 0.3), 0 0 0 0 rgba(0, 114, 255, 0);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 114, 255, 0.45), 0 0 0 10px rgba(0, 114, 255, 0.15);
        transform: scale(1.015);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 114, 255, 0.3), 0 0 0 0 rgba(0, 114, 255, 0);
    }
}

/* Diagonal shine streak animation */
@keyframes btnShine {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

/* Pulsing rings on map markers */
@keyframes markerPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.9;
    }
    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

/* SVG Line dashoffset data flow simulation */
@keyframes flowDash {
    to {
        stroke-dashoffset: -40;
    }
}

/* Warning light flash at top of tower */
@keyframes beaconPulse {
    0% {
        r: 2px;
        fill: var(--color-accent);
        opacity: 0.4;
    }
    50% {
        r: 6px;
        fill: var(--color-red);
        opacity: 1;
        filter: drop-shadow(0 0 4px var(--color-red));
    }
    100% {
        r: 2px;
        fill: var(--color-accent);
        opacity: 0.4;
    }
}

/* Antenna radiating signal waves */
@keyframes signalRadiate {
    0% {
        opacity: 0.1;
        transform: scale(0.6);
        stroke-width: 0.5px;
    }
    50% {
        opacity: 0.8;
        stroke-width: 1px;
    }
    100% {
        opacity: 0;
        transform: scale(1.6);
        stroke-width: 0.3px;
    }
}

/* Standard slide-in triggers */
@keyframes fadeSlideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeSlideInRight {
    0% {
        opacity: 0;
        transform: translateX(40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeEntrance {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    100% {
        opacity: 0.65;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes blink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Large Screens Adjustments */
@media (min-width: 1400px) {
    .main-headline {
        font-size: 60px;
    }
    .body-description {
        font-size: 18px;
        max-width: 520px;
    }
    .map-wrapper {
        max-width: none;
    }
    .tower-svg-container {
        height: 330px;
    }
}

/* Tablets and Medium Viewports */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 80px;
        justify-items: center;
    }
    
    .content-panel {
        align-items: center;
        text-align: center;
		
    }
    
    .body-description {
        max-width: 600px;
    }
    
    .services-footer {
        justify-content: center;
    }
    
    .map-panel {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        height: 70vh;
        max-width: none;
        justify-content: center;
    }
    
    .tower-svg-container {
        display: none; /* Hide the tower in single column stack to reduce visual noise */
    }
    
    .main-header {
        justify-content: center;
    }
}

/* Mobile Devices */
@media (max-width: 640px) {
    .landing-wrapper {
        padding: 0 6%;
    }
    
    .main-header {
        padding: 20px 0;
    }
    
    .logos-container {
        gap: 12px;
    }
    
    .brand-divider {
        height: 25px;
    }
    
    .brand-logo-svg {
        max-width: 140px;
        height: 35px;
    }
    
    .main-headline {
        font-size: 34px;
        line-height: 1.25;
    }
    
    .body-description {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .btn-explore {
        padding: 14px 28px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }
    
    .services-footer {
        font-size: 10px;
        letter-spacing: 1px;
    }
    
    .map-wrapper {
        height: 100%;
        max-width: none;
    }
    
    .country-label-box {
        padding: 3px 6px;
        min-width: 95px;
    }
    
    .label-country-name {
        font-size: 8px;
    }
    
    .label-presence-type {
        font-size: 6px;
    }
    
    .flag-wrapper {
        width: 14px;
    }
    
    /* Adjust specific mobile positions for labels */
    [data-country="mexico"] .country-label-box {
        right: 15px;
    }
    [data-country="peru"] .country-label-box {
        right: 15px;
    }
    
    .presence-popup-card {
        width: calc(100% - 30px);
        bottom: 15px;
        left: 15px;
        padding: 12px;
    }
    
    .skyline-overlay {
        height: 60px;
    }
}

/*=============================
 HERO BRAND
=============================*/

.hero-brand{

    display:flex;
    align-items:center;
    gap:34px;

    margin-bottom:20px;
}

.hero-logo{

    height:100px;
    width:auto;
    object-fit:contain;

    transition:.3s;
}

.hero-logo:hover{

    transform:translateY(-2px);
}

.hero-divider{

    width:1px;
    height:46px;

    background:linear-gradient(
        to bottom,
        transparent,
        rgba(255,255,255,.95),
        transparent
    );

    box-shadow:0 0 14px rgba(0,170,255,.35);
}