/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Apply font globally */
body {
    font-family: 'Inter', sans-serif;
}

/* Custom Utility Classes */
.bg-gradient-cyan-blue {
    background: linear-gradient(135deg, #00D787, #0047FF);
}

.bg-gradient-blue-charcoal {
    background: linear-gradient(180deg, #0047FF, #0A0A0A);
}

.bg-glass {
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* For Safari */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.text-glow-cyan {
    text-shadow: 0 0 10px rgba(0, 215, 135, 0.5);
}

.glow-cyan,
.glow-cyan-hover:hover {
    box-shadow: 0 0 14px rgba(0, 215, 135, 0.18);
}

#cyber-bg-canvas {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    /* avoid capturing pointer events unless necessary */
}

/* Lazy images fallback sizes */
img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: optimizeQuality;
}

/* Abstract X Pattern Background */
.bg-x-pattern {
    background-image:
        linear-gradient(135deg, rgba(0, 215, 135, 0.1) 25%, transparent 25%),
        linear-gradient(225deg, rgba(0, 215, 135, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, rgba(0, 215, 135, 0.1) 25%, transparent 25%),
        linear-gradient(315deg, rgba(0, 215, 135, 0.1) 25%, transparent 25%);
    background-position: 10px 0, 10px 0, 0 0, 0 0;
    background-size: 20px 20px;
    background-repeat: repeat;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Spinner (if needed) */
.loading-spinner {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* product modal */
.product-modal.hidden {
    display: none;
}

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 17, 39, 0.7);
    /* match background */
    backdrop-filter: blur(4px);
}

.product-modal-panel {
    position: relative;
    z-index: 2;
    width: min(920px, 95%);
    max-height: 85vh;
    overflow: auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.7);
    color: #fff;
}

.product-modal-panel:focus,
.article-modal-panel:focus {
    outline: 2px solid rgba(0, 215, 135, 0.18);
    outline-offset: 4px;
}

.group img {
    transform: translateZ(0);
    will-change: transform;
}

.product-modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 1.1rem;
    cursor: pointer;
}

.product-modal-header h2 {
    margin: 0 0 0.25rem 0;
}

.product-modal-body {
    margin-top: 0.75rem;
    color: #e6eef8;
    line-height: 1.6;
}

.product-modal-body ul {
    margin-left: 1rem;
    margin-top: 0.5rem;
}

.product-modal-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .product-modal-panel {
        padding: 1rem;
        border-radius: 8px;
        width: 96%;
        max-height: 92vh;
    }
}

/* article modal styles */
.article-modal.hidden {
    display: none;
}

.article-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 17, 39, 0.7);
    backdrop-filter: blur(4px);
}

.article-modal-panel {
    position: relative;
    z-index: 2;
    width: min(960px, 95%);
    max-height: 85vh;
    overflow: auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.7);
    color: #e6eef8;
}

.article-modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 1.1rem;
    cursor: pointer;
}

.article-modal-header h2 {
    margin: 0 0 0.25rem 0;
}

.article-modal-body {
    margin-top: 0.75rem;
    color: #e6eef8;
    line-height: 1.6;
}

.article-modal-body ul {
    margin-left: 1rem;
    margin-top: 0.5rem;
}

.article-modal-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .article-modal-panel {
        padding: 1rem;
        border-radius: 8px;
        width: 96%;
        max-height: 92vh;
    }
}