/* ========================================================================
   SIPCREW LANDING PAGE — "control room of a telecom network", light theme
   Scoped to Views/Home/Index.cshtml only (loaded via that view's HeadMeta
   section). Everything here is namespaced under .landing-page so it can
   never leak into Blog/Auth/Compliance pages that share _Layout.cshtml.
   Tailwind utilities cover 95% of the design; this file only holds the
   handful of effects utility classes genuinely cannot express (dual
   neumorphic shadows, animated gradient borders, fractal noise, infinite
   marquee, smooth accordion height).
   ======================================================================== */

.landing-page {
    --surface: #EEF1F8;
    --cyan: #22D3EE;
    --cyan-deep: #06B6D4;
    --violet: #8B5CF6;
    --magenta: #D946EF;
    color: #0F172A;
    background: #FFFFFF;
    isolation: isolate;
}

/* ---------- Neumorphic elevated panels (soft-UI, light) ---------- */
.landing-page .neu-panel {
    background: linear-gradient(155deg, #ffffff, var(--surface) 140%);
    box-shadow:
        -10px -10px 24px rgba(255, 255, 255, 0.8),
        14px 14px 32px rgba(163, 177, 198, 0.45);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.landing-page .neu-panel-inset {
    background: var(--surface);
    box-shadow:
        inset 5px 5px 12px rgba(163, 177, 198, 0.5),
        inset -5px -5px 12px rgba(255, 255, 255, 0.9);
}

/* ---------- Glassmorphic panels ---------- */
.landing-page .glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.landing-page .glass-panel-soft {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(15, 23, 42, 0.07);
}

/* ---------- Animated gradient border ---------- */
.landing-page .gradient-border {
    position: relative;
    isolation: isolate;
}

    .landing-page .gradient-border::before {
        content: '';
        position: absolute;
        inset: 0;
        padding: 1.5px;
        border-radius: inherit;
        background: linear-gradient(115deg, var(--cyan), var(--violet), var(--magenta), var(--cyan));
        background-size: 300% 300%;
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        animation: landingBorderFlow 6s linear infinite;
        pointer-events: none;
        z-index: 1;
    }

@keyframes landingBorderFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* ---------- Fractal noise texture (adds "alive" grain, GPU-cheap) ---------- */
.landing-page .noise-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.025;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Mesh gradient blobs ---------- */
.landing-page .mesh-blob {
    position: absolute;
    filter: blur(90px);
    animation: blobMorph 18s ease-in-out infinite;
    will-change: transform, border-radius;
}

/* ---------- Canvas host for the particle network ---------- */
.landing-page .canvas-host {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ---------- Stat / telemetry numerals ---------- */
.landing-page .stat-figure {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* ---------- Magnetic hover buttons ---------- */
.landing-page .magnetic-btn {
    will-change: transform;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

/* ---------- Marquee (testimonials) ---------- */
.landing-page .marquee-viewport {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.landing-page .marquee-track {
    display: flex;
    width: max-content;
    gap: 1.5rem;
    animation: marquee 48s linear infinite;
}

.landing-page .marquee-track--reverse {
    animation-name: marqueeReverse;
    animation-duration: 54s;
}

.landing-page .marquee-viewport:hover .marquee-track,
.landing-page .marquee-track.is-paused {
    animation-play-state: paused;
}

/* ---------- FAQ accordion (JS-driven smooth height) ---------- */
.landing-page .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease, padding 0.35s ease;
    opacity: 0;
}

.landing-page .accordion-item.faq-open .accordion-content {
    opacity: 1;
}

.landing-page .accordion-item .accordion-chevron {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.landing-page .accordion-item.faq-open .accordion-chevron {
    transform: rotate(135deg);
}

/* ---------- Billing toggle switch ---------- */
.landing-page .billing-switch {
    position: relative;
    width: 3.5rem;
    height: 2rem;
    border-radius: 9999px;
    background: var(--surface);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: inset 3px 3px 8px rgba(163, 177, 198, 0.5), inset -2px -2px 6px rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.landing-page .billing-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(2rem - 6px);
    height: calc(2rem - 6px);
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
    box-shadow: 0 2px 8px rgba(34, 211, 238, 0.5);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.landing-page .billing-switch.billing-annual::after {
    transform: translateX(1.5rem);
}

/* ---------- Pricing "most popular" float ---------- */
.landing-page .pricing-elevated {
    animation: floatSlow 7s ease-in-out infinite;
}

/* ---------- Styled map card (static, no external maps lib) ---------- */
.landing-page .map-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(rgba(8, 145, 178, 0.12) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(8, 145, 178, 0.12) 1px, transparent 1px) 0 0 / 28px 28px,
        radial-gradient(circle at 50% 45%, rgba(139, 92, 246, 0.14), transparent 60%),
        var(--surface);
}

.landing-page .map-pin-ping {
    animation: pulseRing 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* ---------- Scrollbar (matches theme) ---------- */
.landing-page {
    scrollbar-color: #0891b2 var(--surface);
}

/* ---------- Reveal (GSAP fallback set via inline styles; class marks targets) ---------- */
.landing-page [data-reveal] {
    will-change: transform, opacity;
}

/* ---------- IntersectionObserver fallback reveal (used only if GSAP/ScrollTrigger fail to load) ---------- */
.landing-page .reveal-fallback {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.landing-page .reveal-fallback-active,
.landing-page .reveal-fallback-active [data-reveal-item] {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ---------- Pricing plan tabs ---------- */
.landing-page [data-pricing-tab] {
    color: #64748B;
    transition: color 0.3s ease, background 0.3s ease;
}

.landing-page [data-pricing-tab].is-active {
    color: #0F172A;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.14), rgba(139, 92, 246, 0.14));
    box-shadow: 0 0 0 1px rgba(8, 145, 178, 0.35) inset;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .landing-page .mesh-blob,
    .landing-page .pricing-elevated,
    .landing-page .map-pin-ping,
    .landing-page .marquee-track,
    .landing-page .animate-pulse,
    .landing-page .animate-bounce,
    .landing-page .animate-float,
    .landing-page .animate-float-slow,
    .landing-page .animate-glow {
        animation: none !important;
    }

    .landing-page .gradient-border::before {
        animation: none !important;
    }

    .landing-page .marquee-track {
        flex-wrap: wrap;
        width: 100%;
    }

    .landing-page .marquee-viewport {
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }
}

@media (max-width: 767px) {
    .landing-page .marquee-track {
        animation-duration: 28s;
    }

    .landing-page .marquee-track--reverse {
        animation-duration: 32s;
    }
}
