/* ===========================================================
   REMOTE HIVE HEADER v17.0
   - FlowingMenu with 6 Services
   - Safari/iOS Compatible
   - GridScan Color Cycling
=========================================================== */

/* ===== CSS VARIABLES ===== */
:root {
    --blue: #3b82f6;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --emerald: #10b981;
    --seagreen: #2EC4B6;
    
    --cta-gradient: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 50%, var(--teal) 100%);
    --text-gradient: linear-gradient(90deg, var(--blue), var(--seagreen), var(--cyan), #ec4899, #8b5cf6, var(--blue));
    
    --bg: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.08);
    
    --navbar-height: 70px;
}

/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }

/* ===========================================================
   NAVBAR
=========================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 24px;
}

.navbar-bar {
    max-width: 1440px;
    margin: 0 auto;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 0 8px 0 16px;
}

/* LEFT: Logo */
.navbar-left {
    flex-shrink: 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
    overflow: hidden;
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-icon img {
    height: 32px;
    width: auto;
}

.logo-text {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    margin-left: 0;
}

.nav-logo:hover .logo-text {
    max-width: 150px;
    opacity: 1;
    margin-left: 10px;
}

.logo-r {
    color: var(--blue);
}

.logo-rest {
    background: linear-gradient(90deg, var(--seagreen), var(--blue), #ffffff);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-animation: gradientShift 4s ease infinite;
    animation: gradientShift 4s ease infinite;
}

/* CENTER: Navigation Links */
.navbar-center {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    border-radius: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--blue);
}

/* Services Link Highlight */
.nav-services {
    position: relative;
    color: var(--teal);
    font-weight: 600;
}

.nav-services::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
    background-size: 200% 100%;
    border-radius: 2px;
    -webkit-animation: gradientShift 3s ease infinite;
    animation: gradientShift 3s ease infinite;
}

.nav-services:hover {
    background: rgba(20, 184, 166, 0.15);
    color: var(--teal);
}

.nav-services svg {
    transition: transform 0.3s ease;
}

.nav-services.active svg {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}

/* RIGHT: CTA */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-cta {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff !important;
    background: var(--cta-gradient);
    background-size: 200% 200%;
    border-radius: 50px;
    white-space: nowrap;
    transition: all 0.3s ease;
    -webkit-animation: gradientShift 4s ease infinite;
    animation: gradientShift 4s ease infinite;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.nav-cta:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    color: #fff !important;
}

@-webkit-keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    gap: 5px;
}

.nav-hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) {
    -webkit-transform: translateY(7px) rotate(45deg);
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    -webkit-transform: translateY(-7px) rotate(-45deg);
    transform: translateY(-7px) rotate(-45deg);
}

/* ===========================================================
   FLOWING MENU OVERLAY - 6 Services
=========================================================== */

.flowing-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s ease;
}

.flowing-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.flowing-menu-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: 50%;
    font-size: 32px;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.flowing-menu-close:hover {
    -webkit-transform: rotate(90deg) scale(1.1);
    transform: rotate(90deg) scale(1.1);
    background: var(--cta-gradient);
    color: #fff;
}

/* FlowingMenu Styles */
.menu-wrap {
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 80px 0 40px;
}

.menu {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    padding: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.menu__item {
    flex: 1;
    position: relative;
    overflow: hidden;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.menu__item:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu__item-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
    color: #fff;
    font-size: clamp(1.2rem, 3vh, 2rem);
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
    z-index: 2;
}

/* Hide text when marquee shows */
.menu__item:hover .menu__item-link {
    opacity: 0;
}

/* Marquee Effect */
.marquee {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: #fff;
    z-index: 1;
    -webkit-transform: translate3d(0, 101%, 0);
    transform: translate3d(0, 101%, 0);
    will-change: transform;
}

.marquee__inner-wrap {
    height: 100%;
    width: 100%;
    display: flex;
}

.marquee__inner {
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
    width: max-content;
    will-change: transform;
    -webkit-animation: marqueeScroll 15s linear infinite;
    animation: marqueeScroll 15s linear infinite;
}

.marquee span {
    color: #060010;
    white-space: nowrap;
    text-transform: uppercase;
    font-weight: 600;
    font-size: clamp(1rem, 2.5vh, 1.5rem);
    line-height: 1.2;
    padding: 0 2vw;
}

.marquee__img {
    width: clamp(80px, 10vw, 120px);
    height: clamp(35px, 4vh, 50px);
    margin: 0 1.5vw;
    border-radius: 50px;
    flex-shrink: 0;
}

@-webkit-keyframes marqueeScroll {
    from { -webkit-transform: translateX(0); transform: translateX(0); }
    to { -webkit-transform: translateX(-50%); transform: translateX(-50%); }
}
@keyframes marqueeScroll {
    from { -webkit-transform: translateX(0); transform: translateX(0); }
    to { -webkit-transform: translateX(-50%); transform: translateX(-50%); }
}

/* ===========================================================
   MOBILE MENU
=========================================================== */

.mobile-menu {
    position: fixed;
    top: calc(var(--navbar-height) + 24px);
    left: 16px;
    right: 16px;
    z-index: 997;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    -webkit-transform: translateY(-20px);
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.mobile-menu.active {
    display: flex;
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

.mobile-link {
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

.mobile-cta {
    margin-top: 8px;
    padding: 16px;
    text-align: center;
    font-weight: 600;
    color: #fff !important;
    background: var(--cta-gradient);
    border-radius: 12px;
}

.mobile-cta:hover {
    color: #fff !important;
}

/* ===========================================================
   HERO SECTION
=========================================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000 !important;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.gridscan {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.gridscan canvas {
    width: 100% !important;
    height: 100% !important;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 24px;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 24px;
}

.hero-title span {
    display: block;
}

/* Gradient Text */
.gradient-text {
    background: var(--text-gradient);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-animation: gradientShift 5s ease infinite;
    animation: gradientShift 5s ease infinite;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff !important;
    background: var(--cta-gradient);
    background-size: 200% 200%;
    border-radius: 100px;
    -webkit-animation: gradientShift 4s ease infinite;
    animation: gradientShift 4s ease infinite;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
    color: #fff !important;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* ===========================================================
   RESPONSIVE
=========================================================== */

@media (max-width: 1200px) {
    .nav-link {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .nav-cta {
        padding: 10px 18px;
        font-size: 13px;
    }
}

@media (max-width: 1024px) {
    .site-header {
        padding: 8px 16px;
    }
    
    .navbar-center {
        display: none;
    }
    
    .nav-cta {
        display: none;
    }
    
    .nav-hamburger {
        display: flex;
    }
    
    .navbar-right {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }
    
    .site-header {
        padding: 8px 12px;
    }
    
    .logo-icon img {
        height: 28px;
    }
    
    /* Show logo text on mobile */
    .logo-text {
        max-width: 120px;
        opacity: 1;
        margin-left: 8px;
        font-size: 16px;
    }
    
    .nav-logo:hover .logo-text {
        max-width: 120px;
        opacity: 1;
        margin-left: 8px;
    }
    
    .menu-wrap {
        padding: 100px 16px 40px;
    }
    
    .menu__item-link {
        font-size: clamp(1rem, 2.5vh, 1.4rem);
    }
    
    .marquee span {
        font-size: clamp(0.85rem, 2vh, 1.1rem);
    }
    
    .marquee__img {
        width: 60px;
        height: 28px;
        margin: 0 1vw;
    }
    
    .flowing-menu-close {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-outline {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* ===========================================================
   DARK MODE
=========================================================== */

[data-theme="dark"] .navbar-bar {
    background: rgba(20, 20, 20, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

[data-theme="dark"] .flowing-menu-close {
    background: #1a1a1a;
    color: #fff;
}