/**
 * Dual-Brand Homepage Styles
 *
 * @package Nexora
 * @version 1.2.0
 */

/* ------------------------------------------------
   Header & Logo
   ------------------------------------------------ */
.header-inner {
    gap: 48px;
}

.logo-img {
    width: 180px;
    height: 45px;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #1d1d1f;
}

.logo-dot {
    color: #0071e3;
}

/* ------------------------------------------------
   Header Search
   ------------------------------------------------ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-input {
    width: 180px;
    padding: 8px 34px 8px 14px;
    font-size: 13px;
    border: 1px solid #e8e8ed;
    border-radius: 24px;
    background: #ffffff;
    color: #1d1d1f;
    transition: width 0.25s, border-color 0.25s, box-shadow 0.25s;
    outline: none;
}

.header-search-input:focus {
    width: 240px;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

.header-search-input::placeholder {
    color: #a1a1a6;
}

.header-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    color: #6e6e73;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-btn:hover {
    color: #0066cc;
}

.header-search--mobile {
    display: none;
}

@media (max-width: 900px) {
    .header-search--desktop {
        display: none;
    }
}

/* ------------------------------------------------
   Brand Hero Carousel
   ------------------------------------------------ */
.nx-brand-hero {
    min-height: 100vh;
    padding: 120px 0 80px;
    background: linear-gradient(180deg, #f8f9fb 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.nx-brand-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.nx-hero-carousel {
    position: relative;
    display: grid;
}

.nx-hero-slide {
    grid-row: 1;
    grid-column: 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
}

.nx-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nx-hero-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.nx-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
}

.nx-hero-title {
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -2.5px;
    color: #1d1d1f;
    margin-bottom: 24px;
}

.nx-hero-desc {
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.6;
    color: #86868b;
    margin-bottom: 40px;
    max-width: 560px;
}

.nx-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.nx-hero-visual {
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 50%, #f5f5f7 100%);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08);
    position: relative;
}

.nx-hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 113, 227, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 113, 227, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.nx-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.nx-hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.nx-hero-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.nx-hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #d2d2d7;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.nx-hero-dot.is-active {
    background: #1d1d1f;
    transform: scale(1.1);
}

/* ------------------------------------------------
   Stats Counter (replaces trust bar)
   ------------------------------------------------ */
.nx-brand-stats {
    padding: 120px 0;
    background: #f5f5f7;
}

.nx-brand-stats .section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 80px;
}

.nx-brand-stats .section-eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #0071e3;
    margin-bottom: 16px;
}

.nx-brand-stats .section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.nx-brand-stats .section-desc {
    font-size: 18px;
    color: #86868b;
    line-height: 1.6;
}

.nx-brand-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.nx-brand-stats .stat-item {
    text-align: center;
}

.nx-brand-stats .stat-number {
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #1d1d1f, #86868b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nx-brand-stats .stat-label {
    font-size: 14px;
    color: #86868b;
    font-weight: 500;
}

/* ------------------------------------------------
   Product Collections Gateway — Bento Grid
   ------------------------------------------------ */
.nx-brand-gateway {
    padding: 80px 0 60px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
}

.nx-gateway-header {
    text-align: center;
    margin-bottom: 48px;
}

.nx-gateway-eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #0071e3;
    margin-bottom: 16px;
}

.nx-gateway-title-main {
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
    color: #1d1d1f;
}

.nx-gateway-subtitle {
    font-size: 18px;
    color: #86868b;
    max-width: 520px;
    margin: 0 auto;
}

.nx-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 280px 220px;
    gap: 16px;
}

.nx-bento-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e8e8ed;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.nx-bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08);
    border-color: #d2d2d7;
}

.nx-bento-card:nth-child(1) { grid-column: span 2; }
.nx-bento-card:nth-child(4) { grid-column: span 2; }

.nx-bento-visual {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f7 0%, #fafafa 100%);
}

.nx-bento-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 113, 227, 0.04) 0%, transparent 70%);
}

.nx-bento-visual img,
.nx-bento-placeholder {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-bento-card:hover .nx-bento-visual img,
.nx-bento-card:hover .nx-bento-placeholder {
    transform: scale(1.03);
}

.nx-bento-placeholder {
    background: linear-gradient(135deg, #e8e8ed 0%, #d2d2d7 100%);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.nx-bento-placeholder::after {
    content: '';
    position: absolute;
    inset: 15%;
    background: linear-gradient(180deg, #ffffff 0%, #f0f0f2 100%);
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.nx-bento-brand {
    position: relative;
    z-index: 2;
    font-size: clamp(18px, 2.5vw, 28px);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.nx-bento-info {
    padding: 16px 20px;
    background: #fff;
}

.nx-bento-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1d1d1f;
}

.nx-bento-info p {
    font-size: 13px;
    color: #86868b;
    line-height: 1.4;
}

.nx-gateway-cta {
    text-align: center;
    margin-top: 40px;
}

.nx-gateway-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    background: #0071e3;
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.25);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-gateway-cta .btn-primary:hover {
    background: #0077ed;
    transform: translateY(-2px);
}

/* ------------------------------------------------
   Industries
   ------------------------------------------------ */
.nx-brand-industries {
    background: #f8f9fb;
}

.nx-industries-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.nx-industry-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e8e8ed;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-industry-card:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08);
    transform: translateY(-6px);
}

.nx-industry-visual {
    aspect-ratio: 16/10;
    background: #f2f2f7;
}

.nx-industry-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-industry-card:hover .nx-industry-visual img {
    transform: scale(1.03);
}

.nx-industry-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f2f2f7, #e8e8ed);
}

.nx-industry-body {
    padding: 28px;
}

.nx-industry-title {
    font-size: 17px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.nx-industry-desc {
    font-size: 13px;
    line-height: 1.55;
    color: #6e6e73;
    margin-bottom: 12px;
}

.nx-industry-link {
    font-size: 13px;
    font-weight: 600;
    color: #0066cc;
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.nx-industry-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nx-industry-link:hover::after {
    width: 100%;
}

/* ------------------------------------------------
   Featured Products
   ------------------------------------------------ */
.nx-brand-products {
    background: #ffffff;
}

.nx-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.nx-product-card--placeholder .card-visual {
    aspect-ratio: 4/3;
}

/* ------------------------------------------------
   Client Marquee (replaces static grid)
   ------------------------------------------------ */
.nx-brand-clients {
    padding: 80px 0;
    background: #ffffff;
    border-top: 1px solid #e8e8ed;
    border-bottom: 1px solid #e8e8ed;
    overflow: hidden;
}

.nx-marquee-track {
    display: flex;
    gap: 80px;
    animation: nx-marquee-scroll 30s linear infinite;
    width: max-content;
}

@keyframes nx-marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.nx-marquee-item {
    font-size: 24px;
    font-weight: 600;
    color: #a1a1a6;
    white-space: nowrap;
    letter-spacing: -0.5px;
}

/* ------------------------------------------------
   CTA
   ------------------------------------------------ */
.nx-brand-cta {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.nx-brand-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 900px;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 113, 227, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.nx-brand-cta .container {
    position: relative;
    z-index: 1;
}

.nx-brand-cta .btn {
    margin: 0 8px 8px;
}

/* ------------------------------------------------
   Scroll Progress Bar
   ------------------------------------------------ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #0071e3, #0077ed);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 10001;
    pointer-events: none;
}

/* ------------------------------------------------
   Responsive
   ------------------------------------------------ */
@media (max-width: 1024px) {
    .nx-hero-row {
        gap: 40px;
    }

    .nx-industries-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nx-clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        padding: 0 24px 16px;
        gap: 0;
        border-bottom: 1px solid #e8e8ed;
        z-index: 999;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }

    .nav.mobile-open {
        display: flex !important;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .nav-menu > li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #f0f0f2;
    }

    .nav-menu > li:last-child {
        border-bottom: none;
    }

    .nav-menu > li > a {
        font-size: 15px;
        font-weight: 500;
        opacity: 1;
        display: block;
        width: 100%;
        padding: 12px 0;
        color: #1d1d1f;
        position: relative;
    }

    .nav-menu > li.current-menu-item > a,
    .nav-menu > li.current-menu-parent > a {
        color: #0071e3;
    }

    /* Accordion sub-menus */
    .nav-menu ul {
        display: none;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 16px;
        margin: 0;
        min-width: auto;
        list-style: none;
    }

    .nav-menu ul ul {
        padding-left: 16px;
    }

    .nav-menu li.menu-open > ul {
        display: block;
    }

    .nav-menu ul li {
        border-bottom: none;
    }

    .nav-menu ul li a {
        font-size: 14px;
        padding: 8px 0;
        color: #86868b;
        display: block;
        text-decoration: none;
        transition: color 0.25s;
    }

    .nav-menu ul li a:hover {
        color: #0071e3;
        background: transparent;
    }

    /* Accordion toggle indicator */
    .nav-menu .menu-item-has-children > a {
        padding-right: 28px;
    }

    .nav-menu .menu-item-has-children > a::after {
        content: '+';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 20px;
        font-weight: 300;
        color: #86868b;
        line-height: 1;
    }

    .nav-menu li.menu-open > a::after {
        content: '\2212';
        color: #0071e3;
    }

    /* Mobile search inside nav panel */
    .header-search--mobile {
        display: flex;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #f0f0f2;
    }

    .header-search--mobile .header-search-input {
        width: 100%;
    }

    .mobile-toggle {
        display: flex;
    }

    body.menu-open {
        overflow: hidden;
    }

    .nx-brand-hero {
        padding: 80px 0 60px;
        min-height: auto;
    }

    .nx-hero-row {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nx-hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .nx-hero-buttons {
        justify-content: center;
    }

    .nx-hero-visual {
        order: -1;
        max-width: 480px;
        margin: 0 auto;
    }

    .nx-brand-stats,
    .nx-brand-cta,
    .cta-section {
        padding: 80px 0;
    }

    .nx-brand-stats .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .nx-bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    .nx-bento-card:nth-child(1),
    .nx-bento-card:nth-child(4) { grid-column: span 1; }
    .nx-bento-card { min-height: 240px; }

    .nx-industries-grid {
        grid-template-columns: 1fr;
    }

    .nx-products-grid {
        grid-template-columns: 1fr;
    }

    .nx-marquee-track {
        gap: 48px;
    }

    .nx-marquee-item {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .nx-bento-grid { grid-template-columns: 1fr; }
    .nx-bento-card { min-height: 200px; }

    .nx-brand-stats .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .nx-marquee-track {
        gap: 32px;
    }

    .nx-marquee-item {
        font-size: 15px;
    }
}


/* ============================================
   EXCLUSIVE BADGES
   ============================================ */

.nx-brand-badges {
    padding: 80px 0;
    background: var(--bg-primary);
}

.nx-badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.nx-badge-card {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nx-badge-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.nx-badge-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 16px;
}

.nx-badge-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.nx-badge-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 768px) {
    .nx-badges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .nx-badge-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .nx-badges-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.nx-back-to-top {
    position: fixed;
    bottom: 96px;
    right: 32px;
    z-index: 9998;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.nx-back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.nx-back-to-top:hover {
    background: rgba(255, 255, 255, 0.98);
    transform: scale(1.08);
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.nx-back-to-top:active {
    transform: scale(0.96);
}

@media (max-width: 768px) {
    .nx-back-to-top {
        width: 44px;
        height: 44px;
        bottom: 84px;
        right: 24px;
    }
}

@media (max-width: 480px) {
    .nx-back-to-top {
        bottom: 76px;
        right: 20px;
    }
}

/* iPhone safe-area */
@supports (padding: max(0px)) {
    .nx-back-to-top {
        bottom: max(96px, env(safe-area-inset-bottom) + 72px);
        right: max(32px, env(safe-area-inset-right) + 16px);
    }
    @media (max-width: 768px) {
        .nx-back-to-top {
            bottom: max(84px, env(safe-area-inset-bottom) + 60px);
            right: max(24px, env(safe-area-inset-right) + 12px);
        }
    }
    @media (max-width: 480px) {
        .nx-back-to-top {
            bottom: max(76px, env(safe-area-inset-bottom) + 52px);
            right: max(20px, env(safe-area-inset-right) + 8px);
        }
    }
}
