/* ==========================================================================
   ReAlarm Liquid Glass UI Design System (Apple iOS & Samsung One UI Inspired)
   Translucent layered frost, specular inner rims, and multicolor ambient glow
   ========================================================================== */

:root {
    --lg-bg: #f1f7f5;
    --lg-text: #0f172a;
    --lg-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.44) 100%);
    --lg-surface-strong: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.62) 100%);
    --lg-surface-subtle: linear-gradient(135deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.28) 100%);
    --lg-border: rgba(255, 255, 255, 0.78);
    --lg-border-soft: rgba(15, 23, 42, 0.08);
    --lg-highlight: rgba(255, 255, 255, 0.94);
    --lg-shadow: 0 14px 36px -10px rgba(15, 23, 42, 0.09), 0 4px 12px -2px rgba(16, 185, 129, 0.06);
    --lg-shadow-hover: 0 24px 48px -12px rgba(15, 23, 42, 0.14), 0 8px 20px -4px rgba(16, 185, 129, 0.12);
    --lg-nav-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.80) 0%, rgba(255, 255, 255, 0.62) 100%);
    --lg-pill-bg: rgba(255, 255, 255, 0.62);
}

html.dark {
    --lg-bg: #070b14;
    --lg-text: #f1f5f9;
    --lg-surface: linear-gradient(135deg, rgba(30, 41, 59, 0.66) 0%, rgba(15, 23, 42, 0.50) 100%);
    --lg-surface-strong: linear-gradient(145deg, rgba(30, 41, 59, 0.82) 0%, rgba(15, 23, 42, 0.68) 100%);
    --lg-surface-subtle: linear-gradient(135deg, rgba(30, 41, 59, 0.44) 0%, rgba(15, 23, 42, 0.34) 100%);
    --lg-border: rgba(255, 255, 255, 0.14);
    --lg-border-soft: rgba(255, 255, 255, 0.08);
    --lg-highlight: rgba(255, 255, 255, 0.22);
    --lg-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.56), 0 4px 16px -4px rgba(16, 185, 129, 0.08);
    --lg-shadow-hover: 0 26px 56px -12px rgba(0, 0, 0, 0.72), 0 10px 26px -4px rgba(34, 197, 94, 0.18);
    --lg-nav-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.58) 100%);
    --lg-pill-bg: rgba(30, 41, 59, 0.68);
}

/* Base Canvas */
body.lg-body {
    background-color: var(--lg-bg);
    color: var(--lg-text);
    position: relative;
    overflow-x: hidden;
}

/* Fixed Ambient Multicolor Mesh Orbs (gives Liquid Glass real chromatic refraction) */
.lg-ambient-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 14%, rgba(34, 197, 94, 0.18) 0%, transparent 42%),
        radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.16) 0%, transparent 40%),
        radial-gradient(circle at 78% 58%, rgba(168, 85, 247, 0.14) 0%, transparent 44%),
        radial-gradient(circle at 18% 72%, rgba(245, 158, 11, 0.12) 0%, transparent 42%),
        radial-gradient(circle at 52% 92%, rgba(6, 182, 212, 0.14) 0%, transparent 46%);
}

html.dark .lg-ambient-canvas {
    background:
        radial-gradient(circle at 14% 12%, rgba(34, 197, 94, 0.20) 0%, transparent 45%),
        radial-gradient(circle at 86% 14%, rgba(59, 130, 246, 0.18) 0%, transparent 42%),
        radial-gradient(circle at 80% 60%, rgba(168, 85, 247, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 16% 74%, rgba(245, 158, 11, 0.12) 0%, transparent 42%),
        radial-gradient(circle at 50% 94%, rgba(20, 184, 166, 0.16) 0%, transparent 48%);
}

/* Subtle decorative glass orbs */
.lg-orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(72px);
    opacity: 0.45;
}

html.dark .lg-orb {
    opacity: 0.34;
}

/* Floating Pill / Dock Navbar */
.lg-nav-shell {
    background: var(--lg-nav-bg);
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    backdrop-filter: blur(26px) saturate(190%);
    border: 1px solid var(--lg-border);
    box-shadow:
        inset 0 1px 0 var(--lg-highlight),
        0 10px 30px -8px rgba(15, 23, 42, 0.12);
}

/* Primary Liquid Glass Panel */
.lg-panel {
    background: var(--lg-surface-strong);
    -webkit-backdrop-filter: blur(28px) saturate(185%);
    backdrop-filter: blur(28px) saturate(185%);
    border: 1px solid var(--lg-border);
    box-shadow:
        inset 0 1px 0 var(--lg-highlight),
        inset 1px 0 0 rgba(255, 255, 255, 0.25),
        var(--lg-shadow);
}

/* Feature Card & Content Glass Card */
.lg-card {
    position: relative;
    background: var(--lg-surface);
    -webkit-backdrop-filter: blur(22px) saturate(175%);
    backdrop-filter: blur(22px) saturate(175%);
    border: 1px solid var(--lg-border);
    box-shadow:
        inset 0 1px 0 var(--lg-highlight),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08),
        var(--lg-shadow);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.34s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.25s ease;
}

.lg-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 42%);
    opacity: 0.55;
    transition: opacity 0.3s ease;
}

html.dark .lg-card::after {
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 44%);
    opacity: 0.45;
}

.lg-card-hover:hover {
    transform: translateY(-5px) scale(1.008);
    box-shadow:
        inset 0 1px 0 var(--lg-highlight),
        var(--lg-shadow-hover);
}

.lg-card-hover:hover::after {
    opacity: 0.9;
}

/* Subtle Inner Surface (non-blur nested containers to keep GPU 60fps) */
.lg-subcard {
    background: var(--lg-surface-subtle);
    border: 1px solid var(--lg-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

html.dark .lg-subcard {
    border-color: var(--lg-border-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Liquid Glass Pill / Chip */
.lg-pill {
    background: var(--lg-pill-bg);
    border: 1px solid var(--lg-border);
    box-shadow: inset 0 1px 0 var(--lg-highlight), 0 4px 12px -4px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease, border-color 0.2s ease;
}

.lg-pill:hover {
    transform: translateY(-1px);
}

/* Category Multicolor Glow Accents on Card Hover */
.lg-cat-scheduling:hover { border-color: rgba(16, 185, 129, 0.58); box-shadow: inset 0 1px 0 var(--lg-highlight), 0 22px 44px -12px rgba(16, 185, 129, 0.24); }
.lg-cat-challenges:hover { border-color: rgba(244, 63, 94, 0.55); box-shadow: inset 0 1px 0 var(--lg-highlight), 0 22px 44px -12px rgba(244, 63, 94, 0.22); }
.lg-cat-audio-visual:hover { border-color: rgba(245, 158, 11, 0.58); box-shadow: inset 0 1px 0 var(--lg-highlight), 0 22px 44px -12px rgba(245, 158, 11, 0.22); }
.lg-cat-ecosystem:hover { border-color: rgba(59, 130, 246, 0.58); box-shadow: inset 0 1px 0 var(--lg-highlight), 0 22px 44px -12px rgba(59, 130, 246, 0.24); }
.lg-cat-analytics:hover { border-color: rgba(139, 92, 246, 0.58); box-shadow: inset 0 1px 0 var(--lg-highlight), 0 22px 44px -12px rgba(139, 92, 246, 0.24); }
.lg-cat-platform:hover { border-color: rgba(20, 184, 166, 0.58); box-shadow: inset 0 1px 0 var(--lg-highlight), 0 22px 44px -12px rgba(20, 184, 166, 0.24); }

/* Jewel Liquid Icon Badges (Samsung One UI squircle radius + glossy specular sheen) */
.lg-icon-box {
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65), 0 8px 18px -6px rgba(15, 23, 42, 0.22);
}

.lg-icon-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 58%);
    pointer-events: none;
}

/* Primary Glass Hero Showcase */
.lg-hero-backdrop {
    background:
        radial-gradient(circle at 18% 22%, rgba(34, 197, 94, 0.38) 0%, transparent 48%),
        radial-gradient(circle at 82% 24%, rgba(59, 130, 246, 0.34) 0%, transparent 45%),
        radial-gradient(circle at 60% 86%, rgba(168, 85, 247, 0.28) 0%, transparent 48%),
        radial-gradient(circle at 12% 84%, rgba(245, 158, 11, 0.24) 0%, transparent 45%),
        linear-gradient(135deg, #064e3b 0%, #0f766e 44%, #0f172a 100%);
}

html.dark .lg-hero-backdrop {
    background:
        radial-gradient(circle at 18% 22%, rgba(34, 197, 94, 0.30) 0%, transparent 48%),
        radial-gradient(circle at 82% 24%, rgba(59, 130, 246, 0.28) 0%, transparent 45%),
        radial-gradient(circle at 60% 86%, rgba(168, 85, 247, 0.24) 0%, transparent 48%),
        radial-gradient(circle at 12% 84%, rgba(245, 158, 11, 0.20) 0%, transparent 45%),
        linear-gradient(135deg, #022c22 0%, #093533 48%, #020617 100%);
}

.lg-hero-glass {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.06) 100%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    backdrop-filter: blur(26px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        0 28px 64px -16px rgba(0, 0, 0, 0.45);
}

/* Primary Emerald Gloss Button */
.lg-btn-emerald {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 55%, #059669 100%);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 12px 26px -6px rgba(16, 185, 129, 0.45);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.lg-btn-emerald:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 18px 34px -6px rgba(16, 185, 129, 0.55);
}

/* Glass FAQ Details & Tables */
.lg-details {
    background: var(--lg-surface);
    border: 1px solid var(--lg-border);
    box-shadow: inset 0 1px 0 var(--lg-highlight), 0 6px 18px -6px rgba(15, 23, 42, 0.08);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.lg-details[open] {
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: inset 0 1px 0 var(--lg-highlight), 0 14px 32px -8px rgba(16, 185, 129, 0.16);
}

/* Docs Glass Sidebar Scrollbar */
.lg-sidebar-scroll::-webkit-scrollbar { width: 5px; }
.lg-sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.lg-sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.38); border-radius: 9999px; }

/* Mermaid Diagram Glass Container */
.lg-mermaid-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.48) 100%);
    border: 1px solid var(--lg-border);
    box-shadow: inset 0 1px 0 var(--lg-highlight);
}

html.dark .lg-mermaid-box {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.74) 0%, rgba(30, 41, 59, 0.58) 100%);
}

/* Horizontal Animated Reviews Marquee (60fps GPU-composited) */
.lg-marquee-mask {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.lg-marquee-track {
    display: flex;
    width: max-content;
    gap: 1.25rem;
    will-change: transform;
    animation: lg-scroll-left 62s linear infinite;
}

.lg-marquee-track-reverse {
    animation: lg-scroll-right 68s linear infinite;
}

.lg-marquee-mask:hover .lg-marquee-track,
.lg-marquee-mask:focus-within .lg-marquee-track {
    animation-play-state: paused;
}

@keyframes lg-scroll-left {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes lg-scroll-right {
    0% { transform: translate3d(-50%, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

/* Reduced Motion Respect (Battery & Accessibility) */
@media (prefers-reduced-motion: reduce) {
    .lg-card,
    .lg-pill,
    .lg-btn-emerald {
        transition: none !important;
        transform: none !important;
    }
    .lg-marquee-mask {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .lg-marquee-track,
    .lg-marquee-track-reverse {
        animation: none !important;
        transform: none !important;
    }
}
