/* ==========================================================================
   Nirvaanix Digital - Frontend Public Theme Stylesheet (front.css)
   ========================================================================== */

/* Base Typography & Backdrop */
body {
    background-color: #020617; /* Obsidian backdrop override */
    color: #e0e3e5;
    -webkit-font-smoothing: antialiased;
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

/* Glassmorphism Panels and Cards */
.glass-card, .glass-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.01), 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Gradient Text Utilities */
.text-gradient-primary, .text-gradient {
    background: linear-gradient(135deg, #d0bcff 0%, #4cd7f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Primary Button with Hover Overlay */
.btn-primary {
    background: linear-gradient(135deg, #6d3bd7 0%, #03b5d3 100%);
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #a078ff 0%, #4cd7f6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary > span, .btn-primary > a {
    position: relative;
    z-index: 2;
}

/* Secondary Button with Gradient Border */
.btn-secondary {
    background: transparent;
    position: relative;
    z-index: 1;
}

.btn-secondary::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #d0bcff, #4cd7f6);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

/* Glow Accents */
.glow-accent-violet {
    box-shadow: 0 0 40px 10px rgba(109, 59, 215, 0.15);
}

.glow-accent-cyan {
    box-shadow: 0 0 40px 10px rgba(3, 181, 211, 0.15);
}

.glow-accent {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(76, 215, 246, 0.15) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Background Grid Pattern */
.grid-bg-pattern {
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Custom Input Styling */
.input-dark,
input.input-dark,
input[type="text"].input-dark,
input[type="email"].input-dark,
select.input-dark,
textarea.input-dark {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

/* Fix WebKit Browser Autofill turning inputs white */
input.input-dark:-webkit-autofill,
input.input-dark:-webkit-autofill:hover, 
input.input-dark:-webkit-autofill:focus, 
input.input-dark:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.input-dark:focus,
input.input-dark:focus,
select.input-dark:focus,
textarea.input-dark:focus {
    border-color: #4cd7f6 !important;
    box-shadow: 0 0 12px rgba(76, 215, 246, 0.25) !important;
    outline: none !important;
}

.input-dark::placeholder,
input.input-dark::placeholder,
textarea.input-dark::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

/* Select dropdown option styling */
select.input-dark option {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #020617; }
::-webkit-scrollbar-thumb { background: #323537; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #494454; }

html { 
    scroll-behavior: smooth; 
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
}

/* Responsive Media & Container Helpers */
img, video, canvas {
    max-width: 100%;
    height: auto;
}

/* Table Responsive Container */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Breakpoint Optimizations (max-width: 768px) */
@media (max-width: 768px) {
    .glass-card, .glass-panel {
        padding: 1.25rem !important;
        border-radius: 1rem !important;
    }
    
    h1 {
        font-size: 2.25rem !important;
        line-height: 2.75rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
        line-height: 2.25rem !important;
    }

    .px-margin-mobile {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Prevent mobile button overflow */
    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Small Mobile Breakpoint Optimizations (max-width: 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.85rem !important;
        line-height: 2.35rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }

    .px-margin-mobile {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* ==========================================================================
   Scroll Reveal & Section Entrance Animations
   ========================================================================== */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

.reveal-blur {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), filter 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, filter, transform;
}

.reveal-blur.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Stagger Delay Classes */
.delay-75  { transition-delay: 75ms; }
.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Brand Logo Layout and Size Safeguards */
header a picture,
header a picture img,
header a > img {
    display: block;
    height: 40px !important;
    max-height: 40px !important;
    width: auto !important;
    object-fit: contain !important;
}

@media (min-width: 768px) {
    header a picture,
    header a picture img,
    header a > img {
        height: 48px !important;
        max-height: 48px !important;
    }
}

footer a picture,
footer a picture img,
footer a > img {
    display: block;
    height: 48px !important;
    max-height: 48px !important;
    width: auto !important;
    object-fit: contain !important;
}

@media (min-width: 768px) {
    footer a picture,
    footer a picture img,
    footer a > img {
        height: 64px !important;
        max-height: 64px !important;
    }
}

/* Page Loader & Logo Spinner Styles */
#page-loader {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    background: #020617 !important;
    background-color: #020617 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity 0.7s ease-out, visibility 0.7s ease-out, transform 0.7s ease-out !important;
}

#page-loader.opacity-0 {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#page-loader.scale-105 {
    transform: scale(1.05) !important;
}

#page-loader .loader-glow-1 {
    position: absolute;
    width: 320px;
    height: 320px;
    background: rgba(208, 188, 255, 0.15);
    border-radius: 9999px;
    filter: blur(120px);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
}

#page-loader .loader-glow-2 {
    position: absolute;
    width: 320px;
    height: 320px;
    background: rgba(76, 215, 246, 0.15);
    border-radius: 9999px;
    filter: blur(120px);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite 0.5s;
    pointer-events: none;
}

#page-loader .loader-spinner-container {
    width: 128px !important;
    height: 128px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#page-loader .loader-ring-spin {
    position: absolute !important;
    inset: 0 !important;
    border-radius: 9999px !important;
    border: 2px solid transparent !important;
    border-top-color: #d0bcff !important;
    border-right-color: #4cd7f6 !important;
    border-bottom-color: rgba(208, 188, 255, 0.3) !important;
    animation: spin 1.2s linear infinite !important;
}

#page-loader .loader-ring-pulse {
    position: absolute !important;
    inset: 8px !important;
    border-radius: 9999px !important;
    border: 1px solid rgba(208, 188, 255, 0.2) !important;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite !important;
    opacity: 0.3 !important;
}

#page-loader img {
    height: 44px !important;
    max-height: 44px !important;
    width: auto !important;
    max-width: 88px !important;
    object-fit: contain !important;
    display: block !important;
    position: relative !important;
    z-index: 10 !important;
}

#page-loader .loader-progress-track {
    width: 192px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

#page-loader #loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d0bcff 0%, #4cd7f6 100%);
    border-radius: 9999px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 12px rgba(76, 215, 246, 0.6);
}


