/* ==========================================================================
   Ingenuity AI Pvt. Ltd. — Global Styles
   Design system: dark nebula + cyan/purple neon + glassmorphism
   ========================================================================== */

:root {
    --bg: #040714;
    --bg-soft: #070c1e;
    --deep-blue: #0d1b2a;
    --card: rgba(13, 22, 48, 0.5);
    --cyan: #00d2ff;
    --purple: #b026ff;
    --violet: #8a2be2;
    --border: rgba(0, 210, 255, 0.12);
    --text: #e2e8f0;
    --muted: #94a3b8;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Ambient page glow that follows the section rhythm */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(60rem 40rem at 12% 8%, rgba(0, 210, 255, 0.10), transparent 60%),
        radial-gradient(55rem 40rem at 88% 22%, rgba(176, 38, 255, 0.12), transparent 62%),
        radial-gradient(50rem 42rem at 50% 100%, rgba(138, 43, 226, 0.10), transparent 60%);
}

/* --------------------------------------------------------------------------
   AI background — neural-network constellation (canvas) + futuristic grid
   The canvas sits behind all content (z-index 0) and never intercepts clicks.
   -------------------------------------------------------------------------- */
#ai-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
}

/* Faint perspective grid + soft vignette layered over the canvas for depth.
   Kept extremely subtle so text stays crisp and readable. */
.ai-grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 210, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 210, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    /* Fade the grid out toward the edges so it never fights the content */
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 35%, transparent 85%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 35%, transparent 85%);
}

/* Gentle top-to-bottom vignette to focus attention on the page centre. */
.ai-vignette {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 120% 90% at 50% 30%, transparent 55%, rgba(2, 4, 12, 0.55) 100%);
}

/* --------------------------------------------------------------------------
   Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #040714;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 210, 255, 0.45), rgba(176, 38, 255, 0.45));
    border-radius: 8px;
    border: 2px solid #040714;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(0, 210, 255, 0.85), rgba(176, 38, 255, 0.85));
}

/* Selection */
::selection {
    background: var(--cyan);
    color: #040714;
}

/* Focus visibility for keyboard users */
:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Surfaces
   -------------------------------------------------------------------------- */
.glass-card {
    background: var(--card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card--hover:hover {
    border-color: rgba(0, 210, 255, 0.45);
    box-shadow: 0 18px 40px -18px rgba(0, 210, 255, 0.35), inset 0 0 22px rgba(176, 38, 255, 0.08);
    transform: translateY(-5px);
}

.glass-nav {
    background: rgba(4, 7, 20, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.glass-nav.is-scrolled {
    background: rgba(4, 7, 20, 0.92);
    box-shadow: 0 12px 40px -20px rgba(0, 210, 255, 0.45);
    border-bottom-color: rgba(0, 210, 255, 0.18);
}

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */
.text-gradient {
    background: linear-gradient(120deg, #00d2ff 0%, #9d4edd 50%, #b026ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.text-gradient-cyan {
    background: linear-gradient(120deg, #00d2ff 0%, #3a86ef 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.section-eyebrow {
    letter-spacing: 0.3em;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.neon-border-btn {
    position: relative;
    background: linear-gradient(135deg, #00d2ff, #b026ff);
    padding: 1.5px;
    border-radius: 9999px;
    display: inline-block;
    transition: box-shadow 0.35s ease;
}
.neon-border-btn:hover {
    box-shadow: 0 0 26px rgba(0, 210, 255, 0.45);
}
.neon-border-btn-inner {
    background: #070c1e;
    border-radius: 9999px;
    transition: background 0.35s ease, color 0.35s ease;
}
.neon-border-btn:hover .neon-border-btn-inner {
    background: transparent;
}

.btn-primary {
    background: linear-gradient(120deg, #00d2ff, #b026ff);
    color: #04070f;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}
.btn-primary:hover {
    box-shadow: 0 0 34px rgba(0, 210, 255, 0.55);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Background patterns
   -------------------------------------------------------------------------- */
/* The grid is painted on its own fixed pseudo-element.
   IMPORTANT: never put mask-image on <body> or <html>. A mask on the body
   element masks ALL of its content — text included — so everything below a
   certain point fades out as the page gets taller. Keeping the mask on this
   dedicated layer limits it to the decorative grid only. */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-size: 44px 44px;
    background-image:
        linear-gradient(to right, rgba(0, 210, 255, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(176, 38, 255, 0.045) 1px, transparent 1px);
    -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 25%, #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 85% 65% at 50% 25%, #000 35%, transparent 100%);
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes pulseGlow {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(1.06); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@keyframes ping {
    0% { transform: scale(1); opacity: 1; }
    75%, 100% { transform: scale(2.4); opacity: 0; }
}

.animate-pulse-glow { animation: pulseGlow 5s ease-in-out infinite; }
.animate-float { animation: float 6s ease-in-out infinite; }

.pulse-dot {
    position: relative;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 9999px;
    background: var(--cyan);
}
.pulse-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: var(--cyan);
    animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Marquee */
.marquee {
    display: flex;
    width: max-content;
    animation: marquee 32s linear infinite;
}
.marquee-mask {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee-wrap:hover .marquee { animation-play-state: paused; }

/* Scroll-reveal animation removed: content is always visible.
   The `.reveal` class is kept as a harmless no-op hook in case a fade is
   reintroduced later. */
.reveal {
    opacity: 1;
    transform: none;
}

/* Service filter transitions */
.service-card.is-hidden {
    display: none;
}

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
.faq-item summary {
    list-style: none;
    cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-icon { transition: transform 0.3s ease; }
.faq-item[open] summary .faq-icon { transform: rotate(45deg); }
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}
.faq-item[open] .faq-answer {
    grid-template-rows: 1fr;
}
.faq-answer > div { overflow: hidden; }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal-backdrop {
    background: rgba(2, 4, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.modal-panel {
    transform: translateY(16px) scale(0.97);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}
.modal.is-open .modal-panel {
    transform: none;
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast {
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    pointer-events: none;
}
.toast.is-visible {
    transform: none;
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */
#back-to-top {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

/* Active nav link */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 2px;
    width: 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.is-active::after {
    width: 100%;
}
.nav-link.is-active {
    color: var(--cyan);
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
