/* ========================================
   TESSERANT - STYLESHEET
   ======================================== */

:root {
    color-scheme: dark;
    --page-bg: #020617;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-muted: #ffffff;
    --text-subtle: #ffffff;
    --surface-strong-from: rgba(255, 255, 255, 0.12);
    --surface-strong-to: rgba(255, 255, 255, 0.06);
    --surface-mid-from: rgba(255, 255, 255, 0.1);
    --surface-mid-to: rgba(255, 255, 255, 0.05);
    --surface-soft-from: rgba(255, 255, 255, 0.08);
    --surface-soft-to: rgba(255, 255, 255, 0.04);
    --surface-ultra-from: rgba(255, 255, 255, 0.06);
    --surface-ultra-to: rgba(255, 255, 255, 0.03);
    --border-subtle: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.2);
    --border-faint: rgba(255, 255, 255, 0.08);
    --shadow-soft: rgba(0, 0, 0, 0.1);
    --shadow-mid: rgba(0, 0, 0, 0.14);
    --shadow-strong: rgba(0, 0, 0, 0.2);
    --nav-bg: rgba(2, 6, 23, 0.35);
    --nav-bg-scrolled: rgba(2, 6, 23, 0.6);
    --nav-shadow: rgba(0, 0, 0, 0.3);
    --menu-bg-top: rgba(2, 6, 23, 0.95);
    --menu-bg-bottom: rgba(2, 6, 23, 0.92);
    --hero-shine-strong: rgba(2, 6, 23, 0.55);
    --hero-shine-soft: rgba(2, 6, 23, 0.35);
    --hero-shine-mid: rgba(2, 6, 23, 0.45);
    --hero-inner-shadow: rgba(0, 0, 0, 0.45);
    --hero-word-shadow: rgba(0, 0, 0, 0.6);
    --hero-text-highlight: rgba(255, 255, 255, 0.4);
    --hero-accent-shadow: 0 2px 8px rgba(30, 58, 138, 0.75),
        0 0 16px rgba(30, 64, 175, 0.5);
    --hero-accent-outline: rgba(30, 64, 175, 0.75);
    --hero-shimmer-base: rgba(0, 0, 0, 0.35);
    --hero-shimmer-peak: rgba(255, 255, 255, 0.9);
    --card-theme-from: rgba(99, 102, 241, 0.06);
    --card-theme-to: rgba(99, 102, 241, 0.03);
    --card-theme-border: rgba(99, 102, 241, 0.35);
    --card-theme-shadow: rgba(99, 102, 241, 0.18);
    --card-theme-featured-from: rgba(99, 102, 241, 0.09);
    --card-theme-featured-to: rgba(99, 102, 241, 0.045);
    --card-theme-featured-shadow: rgba(99, 102, 241, 0.22);
    --card-glass-border: rgba(255, 255, 255, 0.08);
    --card-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(255, 255, 255, 0.04),
        inset 0 0 16px 8px rgba(255, 255, 255, 0.08);
    --card-glass-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 20px 10px rgba(255, 255, 255, 0.1);
    --card-glass-line-strong: rgba(255, 255, 255, 0.28);
    --card-glass-line-soft: rgba(255, 255, 255, 0.12);
    --card-light-blue: rgba(59, 130, 246, 0.95);
    --card-light-blue-soft: rgba(99, 102, 241, 0.95);
    --card-orb-size: 14px;
    --card-orbit-color-1: rgba(14, 165, 233, 1);
    --card-orbit-color-2: rgba(139, 92, 246, 1);
    --card-orbit-glow-1: rgba(14, 165, 233, 0.95);
    --card-orbit-glow-2: rgba(139, 92, 246, 0.95);
    --card-orbit-tail: 170px;
    --chip-bg: rgba(255, 255, 255, 0.04);
    --feature-bg-from: rgba(99, 102, 241, 0.15);
    --feature-bg-to: rgba(34, 211, 238, 0.1);
    --feature-border: rgba(99, 102, 241, 0.3);
    --feature-text: #c7d2fe;
    --accent-blue: #6366f1;
    --star-color: #ffffff;
    --star-opacity: 0.9;
}

html[data-theme="light"] {
    color-scheme: light;
    --page-bg: #f8fafc;
    --text-primary: #0b0b0b;
    --text-secondary: #0b0b0b;
    --text-muted: #0b0b0b;
    --text-subtle: #0b0b0b;
    --surface-strong-from: rgba(15, 23, 42, 0.22);
    --surface-strong-to: rgba(15, 23, 42, 0.12);
    --surface-mid-from: rgba(15, 23, 42, 0.18);
    --surface-mid-to: rgba(15, 23, 42, 0.1);
    --surface-soft-from: rgba(15, 23, 42, 0.16);
    --surface-soft-to: rgba(15, 23, 42, 0.08);
    --surface-ultra-from: rgba(15, 23, 42, 0.14);
    --surface-ultra-to: rgba(15, 23, 42, 0.07);
    --border-subtle: rgba(15, 23, 42, 0.18);
    --border-strong: rgba(15, 23, 42, 0.28);
    --border-faint: rgba(15, 23, 42, 0.12);
    --shadow-soft: rgba(15, 23, 42, 0.08);
    --shadow-mid: rgba(15, 23, 42, 0.12);
    --shadow-strong: rgba(15, 23, 42, 0.16);
    --nav-bg: rgba(248, 250, 252, 0.82);
    --nav-bg-scrolled: rgba(248, 250, 252, 0.95);
    --nav-shadow: rgba(15, 23, 42, 0.15);
    --menu-bg-top: rgba(248, 250, 252, 0.96);
    --menu-bg-bottom: rgba(248, 250, 252, 0.92);
    --hero-shine-strong: rgba(248, 250, 252, 0.85);
    --hero-shine-soft: rgba(248, 250, 252, 0.6);
    --hero-shine-mid: rgba(248, 250, 252, 0.7);
    --hero-inner-shadow: rgba(255, 255, 255, 0.7);
    --hero-word-shadow: rgba(255, 255, 255, 0.75);
    --hero-text-highlight: rgba(255, 255, 255, 0.55);
    --hero-accent-shadow: 0 2px 8px rgba(30, 58, 138, 0.6),
        0 0 14px rgba(30, 64, 175, 0.45);
    --hero-accent-outline: rgba(30, 64, 175, 0.6);
    --hero-shimmer-base: rgba(255, 255, 255, 0.28);
    --hero-shimmer-peak: rgba(0, 0, 0, 0.35);
    --card-theme-from: rgba(79, 70, 229, 0.08);
    --card-theme-to: rgba(79, 70, 229, 0.04);
    --card-theme-border: rgba(79, 70, 229, 0.35);
    --card-theme-shadow: rgba(79, 70, 229, 0.2);
    --card-theme-featured-from: rgba(79, 70, 229, 0.11);
    --card-theme-featured-to: rgba(79, 70, 229, 0.055);
    --card-theme-featured-shadow: rgba(79, 70, 229, 0.24);
    --card-glass-border: rgba(255, 255, 255, 0.45);
    --card-glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.12),
        14px 0 28px rgba(59, 130, 246, 0.25),
        -14px 0 28px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2),
        inset 0 0 24px 12px rgba(255, 255, 255, 0.25);
    --card-glass-shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.16),
        16px 0 32px rgba(59, 130, 246, 0.32),
        -16px 0 32px rgba(59, 130, 246, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        inset 0 -1px 0 rgba(255, 255, 255, 0.25),
        inset 0 0 30px 14px rgba(255, 255, 255, 0.3);
    --card-glass-line-strong: rgba(255, 255, 255, 0.9);
    --card-glass-line-soft: rgba(255, 255, 255, 0.35);
    --card-light-blue: rgba(59, 130, 246, 0.8);
    --card-light-blue-soft: rgba(99, 102, 241, 0.85);
    --card-orb-size: 16px;
    --card-orbit-color-1: rgba(59, 130, 246, 1);
    --card-orbit-color-2: rgba(124, 58, 237, 1);
    --card-orbit-glow-1: rgba(59, 130, 246, 0.85);
    --card-orbit-glow-2: rgba(124, 58, 237, 0.85);
    --card-orbit-tail: 150px;
    --chip-bg: rgba(15, 23, 42, 0.1);
    --feature-bg-from: rgba(99, 102, 241, 0.14);
    --feature-bg-to: rgba(34, 211, 238, 0.08);
    --feature-border: rgba(99, 102, 241, 0.25);
    --feature-text: #1e1b4b;
    --accent-blue: #4f46e5;
    --star-color: #0b0b0b;
    --star-opacity: 0.9;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

@supports not (overflow: clip) {

    html,
    body {
        overflow-x: hidden;
    }
}

body {
    background-color: var(--page-bg);
    color: var(--text-primary);
    overflow-x: clip;
}

/* Theme-aware Tailwind utility overrides */
.text-white {
    color: var(--text-primary) !important;
}

.text-slate-200,
.text-slate-300,
.text-slate-400 {
    color: var(--text-secondary) !important;
}

.text-slate-500 {
    color: var(--text-muted) !important;
}

.text-slate-600 {
    color: var(--text-subtle) !important;
}

.bg-white\/5 {
    background-color: var(--chip-bg) !important;
}

.border-white\/10 {
    border-color: var(--border-subtle) !important;
}

.border-white\/5 {
    border-color: var(--border-faint) !important;
}

.keep-white {
    color: #ffffff !important;
}

html[data-theme="light"] .hover\:text-white:hover {
    color: var(--text-primary) !important;
}

/* 3D CANVAS STYLING - Circular Motion Stars */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: filter 0.5s ease;
}

/* Typography & UI Enhancements */
.text-balanced {
    text-wrap: balance;
}

/* LIQUID GLASS - Navigation */
.glass-header {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

/* Shared base for all 3 glass layers */
.lg-filter,
.lg-overlay,
.lg-specular {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Layer 1: Blur + Refraction (lowest) */
.lg-filter {
    z-index: 0;
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    filter: url(#navLensFilter) saturate(120%) brightness(1.1);
}

/* Layer 2: Color Tint */
.lg-overlay {
    z-index: 1;
    background: var(--nav-bg);
    transition: background 0.3s ease;
}

/* Layer 3: Specular Highlight (edge shine) */
.lg-specular {
    z-index: 2;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 8px rgba(255, 255, 255, 0.12);
    border-bottom: 0.5px solid var(--border-faint);
}

/* Drop shadow on the nav itself */
.glass-header {
    box-shadow: 0 4px 24px var(--nav-shadow),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Scrolled state: deeper glass */
.glass-header.scrolled .lg-filter {
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
}

.glass-header.scrolled .lg-overlay {
    background: var(--nav-bg-scrolled);
}

.glass-header.scrolled .lg-specular {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 12px rgba(255, 255, 255, 0.15);
    border-bottom: 0.5px solid var(--border-subtle);
}

.glass-header.scrolled {
    box-shadow: 0 8px 32px var(--nav-shadow),
        0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Light theme adjustments */
html[data-theme="light"] .lg-filter {
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    filter: url(#navLensFilter) saturate(110%) brightness(1.02);
}

html[data-theme="light"] .lg-overlay {
    background: rgba(248, 250, 252, 0.12);
}

html[data-theme="light"] .lg-specular {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04),
        inset 0 0 12px rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .glass-header {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .glass-header.scrolled .lg-filter {
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
}

html[data-theme="light"] .glass-header.scrolled .lg-overlay {
    background: rgba(248, 250, 252, 0.25);
}

html[data-theme="light"] .glass-header.scrolled .lg-specular {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06),
        inset 0 0 16px rgba(255, 255, 255, 0.65);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .glass-header.scrolled {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Active Nav Indicator */
.nav-item {
    position: relative;
    transition: color 0.3s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #22d3ee);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.active::after {
    width: 100%;
}

/* Simple Theme Button */
.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
}

.theme-btn:active {
    transform: scale(0.92);
}

.theme-btn i {
    font-size: 1.1rem;
}

/* Light Theme Adjustments */
html[data-theme="light"] .theme-btn {
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

html[data-theme="light"] .theme-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.theme-switch:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.theme-switch.light:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.theme-switch:active .theme-switch__knob {
    width: 34px;
    border-radius: 15px;
}

@media (max-width: 640px) {
    .theme-switch {
        width: 44px;
        height: 28px;
    }

    .theme-switch__label {
        display: none;
    }

    .theme-switch__knob {
        width: 22px;
        height: 22px;
    }

    .theme-switch__knob i {
        font-size: 0.6rem;
    }
}

/* View Transition - Circular Reveal for Theme Toggle */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
    pointer-events: none;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 9999;
}

/* Logo Animation */
.logo-icon {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.logo-icon:hover {
    transform: rotate(360deg) scale(1.1);
    animation: pulse-glow 0.6s ease-in-out;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }

    50% {
        box-shadow: 0 0 20px 10px rgba(99, 102, 241, 0);
    }
}

/* Hero Tagline Animations */
.hero-tagline {
    display: inline-block;
    overflow: visible;
    position: relative;
    line-height: 1.2;
    z-index: 0;
}

.hero-tagline .hero-word {
    position: relative;
    z-index: 2;
}

.hero-tagline::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    white-space: pre-line;
    pointer-events: none;
    background-image: radial-gradient(ellipse at center,
            rgba(0, 0, 0, 0) 35%,
            var(--hero-inner-shadow) 85%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    mix-blend-mode: multiply;
    opacity: 0;
    animation: none;
    z-index: 3;
}

.hero-tagline::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    white-space: pre-line;
    pointer-events: none;
    background-image: linear-gradient(120deg,
            transparent 0%,
            var(--hero-shimmer-base) 35%,
            var(--hero-shimmer-peak) 50%,
            var(--hero-shimmer-base) 65%,
            transparent 100%);
    background-size: 160px 100%;
    background-position: -160px 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroShimmer 4s linear 3.6s infinite;
    will-change: background-position;
    z-index: 4;
}

.hero-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    font-weight: 800;
    animation: wordReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--reveal-delay, 0s);
    white-space: nowrap;
    padding-bottom: 0.15em;
    margin-bottom: -0.15em;
    color: var(--hero-text-color, var(--text-primary));
    text-shadow: none;
}

.hero-word.think {
    animation: wordRevealGlow 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--reveal-delay, 0s);
}

.hero-word.execute {
    position: relative;
    animation: wordRevealGlow 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--reveal-delay, 0s);
}

.hero-word.execute::after {
    content: none;
}

@keyframes wordReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wordRevealGlow {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    50% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wordRevealExecute {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes underlineGrow {
    to {
        width: 100%;
    }
}

.hero-gradient {
    --hero-text-color: var(--text-primary);
}

.hero-accent {
    --hero-text-color: var(--accent-blue);
    text-shadow: none;
    -webkit-text-stroke: 0;
}

@supports (color: color-mix(in srgb, #000, #fff)) {
    .hero-word {
        --hero-word-light: color-mix(in srgb, var(--hero-text-color) 42%, #ffffff 58%);
        --hero-word-dark: color-mix(in srgb, var(--hero-text-color) 88%, #000000 12%);
        background-image: linear-gradient(135deg,
                var(--hero-word-light) 0%,
                var(--hero-text-color) 45%,
                var(--hero-word-dark) 100%);
        background-size: 100% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
    }
}

@supports (color: color-mix(in srgb, #000, #fff)) {
    html[data-theme="dark"] .hero-gradient {
        --hero-word-dark: color-mix(in srgb, var(--hero-text-color) 70%, #000000 30%);
    }
}

@supports not (-webkit-background-clip: text) {
    .hero-word {
        color: var(--hero-text-color, var(--text-primary));
    }
}

@keyframes heroShimmer {
    0% {
        background-position: -160px 0;
    }

    17.5% {
        background-position: calc(100% + 160px) 0;
    }

    100% {
        background-position: calc(100% + 160px) 0;
    }
}

@keyframes heroInnerShade {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.6;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-tagline .hero-word {
        animation-name: wordReveal;
        animation-duration: 0.8s;
        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
        animation-fill-mode: forwards;
        animation-iteration-count: 1;
        animation-delay: var(--reveal-delay, 0s);
    }

    .hero-tagline .hero-word.think {
        animation-name: wordRevealGlow;
        animation-duration: 1s;
    }

    .hero-tagline .hero-word.execute {
        animation-name: wordRevealExecute;
        animation-duration: 1s;
    }

    .hero-tagline::after {
        animation: none;
        background-position: 0 0;
        opacity: 0;
    }

    .hero-tagline::before {
        animation: none;
        opacity: 0;
    }
}

/* Logic Flow Line */
.logic-line {
    display: none;
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #6366f1, #22d3ee, transparent);
    opacity: 0;
    animation: logicFlow 2s ease-in-out 4s forwards;
}

@keyframes logicFlow {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Service Cards with Grid Animation */
/* iOS Glass - Service Cards */
.service-card {
    --card-radius: 2.5rem;
    background: linear-gradient(135deg,
            var(--card-theme-from) 0%,
            var(--card-theme-to) 100%);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 1px solid var(--card-glass-border);
    box-shadow: var(--card-glass-shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow, border-color;
}

.service-card:hover {
    background: linear-gradient(135deg,
            var(--card-theme-featured-from) 0%,
            var(--card-theme-featured-to) 100%);
    border-color: var(--card-glass-border);
    transform: translateY(-14px) scale(1.02) !important;
    box-shadow: var(--card-glass-shadow-hover);
}

.service-card:hover .service-icon {
    transform: rotate(10deg);
}

.service-card:hover .outcome-text {
    text-shadow: 0 0 20px currentColor;
}

.service-icon {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.outcome-text {
    transition: text-shadow 0.3s ease;
}

/* Magnetic Buttons */
.magnetic-btn {
    position: relative;
    transition: transform 0.2s ease;
}

/* Feature Tag */
.feature-tag {
    background: linear-gradient(135deg,
            var(--feature-bg-from) 0%,
            var(--feature-bg-to) 100%);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 0.5px solid var(--feature-border);
    padding: 6px 14px;
    border-radius: 99px;
    color: var(--feature-text);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow:
        0 4px 16px rgba(99, 102, 241, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Glass Card */
/* iOS Glass Cards */
.glass-card {
    --card-radius: 1.5rem;
    background: linear-gradient(135deg,
            var(--card-theme-from) 0%,
            var(--card-theme-to) 100%);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 1px solid var(--card-glass-border);
    box-shadow: var(--card-glass-shadow);
}

/* Animated Stats */
.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.stat-wrapper {
    position: relative;
}

.stat-wrapper.counted::after {
    content: '';
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent);
    animation: statGlow 1s ease-out;
    pointer-events: none;
    z-index: -1;
}

@keyframes statGlow {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

/* About Section Border Animation */
.border-trace {
    position: relative;
}

.border-trace::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, #6366f1, #22d3ee);
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.border-trace.traced::before {
    height: 100%;
}

/* Pricing Cards */
/* iOS Glass - Pricing Cards */
.pricing-card {
    --card-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: visible;
    background: linear-gradient(135deg,
            var(--card-theme-featured-from) 0%,
            var(--card-theme-featured-to) 100%);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 1px solid var(--card-glass-border);
    box-shadow: var(--card-glass-shadow);
    transition: all 0.4s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform, box-shadow, border-color;
}

.pricing-card::before {
    clip-path: inset(0 round var(--card-radius, 1.5rem));
}

.pricing-card:hover {
    background: linear-gradient(135deg,
            var(--card-theme-featured-from) 0%,
            var(--card-theme-featured-to) 100%);
    transform: translateY(-12px) scale(1.02) !important;
    border-color: var(--card-glass-border);
    box-shadow: var(--card-glass-shadow-hover);
}

.pricing-card.featured {
    background: linear-gradient(135deg,
            var(--card-theme-featured-from) 0%,
            var(--card-theme-featured-to) 100%);
    border: 1px solid var(--card-glass-border);
    box-shadow: var(--card-glass-shadow);
}

.pricing-card a {
    margin-top: auto;
}

.pricing-badge {
    z-index: 3;
    animation: badgeFloat 3s ease-in-out infinite;
}

@keyframes badgeFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* FAQ */
/* iOS Glass - FAQ */
.faq-item {
    --card-radius: 1rem;
    background: linear-gradient(135deg,
            var(--card-theme-from) 0%,
            var(--card-theme-to) 100%);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 1px solid var(--card-glass-border);
    box-shadow: var(--card-glass-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item:hover {
    background: linear-gradient(135deg,
            var(--card-theme-featured-from) 0%,
            var(--card-theme-featured-to) 100%);
    border-color: var(--card-glass-border);
    box-shadow: var(--card-glass-shadow-hover);
}

.faq-content {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s ease,
        padding 0.4s ease;
}

.faq-content.open {
    max-height: 500px;
    opacity: 1;
    padding-top: 1rem;
}

.faq-chevron {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-chevron.rotated {
    transform: rotate(180deg);
}

.faq-pulse {
    animation: faqPulse 2s ease-in-out 1;
}

@keyframes faqPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.2);
    }
}

/* ========================================
   iOS GLASS BUTTONS
   ======================================== */

/* Standard iOS Glass Button */
.glass-btn {
    background: linear-gradient(135deg,
            var(--surface-strong-from) 0%,
            var(--surface-strong-to) 100%);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 0.5px solid var(--border-strong);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    box-shadow:
        0 4px 16px var(--shadow-soft),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    will-change: transform;
    display: inline-block;
    text-decoration: none;
}

.glass-btn:hover {
    background: linear-gradient(135deg,
            var(--surface-mid-from) 0%,
            var(--surface-mid-to) 100%);
    border-color: var(--border-strong);
    box-shadow:
        0 6px 24px var(--shadow-mid),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.glass-btn:active {
    background: linear-gradient(135deg,
            var(--surface-soft-from) 0%,
            var(--surface-soft-to) 100%);
    box-shadow:
        0 2px 8px var(--shadow-soft),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

/* Primary Glass Button (with accent) */
.glass-btn-primary {
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.4) 0%,
            rgba(99, 102, 241, 0.2) 100%);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 0.5px solid rgba(99, 102, 241, 0.4);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    box-shadow:
        0 4px 16px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    will-change: transform;
    display: inline-block;
    text-decoration: none;
}

html[data-theme="light"] .glass-btn-primary {
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.9) 0%,
            rgba(99, 102, 241, 0.65) 100%);
    border-color: rgba(99, 102, 241, 0.85);
    box-shadow:
        0 10px 30px rgba(99, 102, 241, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.glass-btn-primary:hover {
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.5) 0%,
            rgba(99, 102, 241, 0.3) 100%);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow:
        0 6px 24px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.glass-btn-primary:active {
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.35) 0%,
            rgba(99, 102, 241, 0.15) 100%);
    box-shadow:
        0 2px 8px rgba(99, 102, 241, 0.15),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

/* Secondary Glass Button (cyan accent) */
.glass-btn-secondary {
    background: linear-gradient(135deg,
            rgba(34, 211, 238, 0.3) 0%,
            rgba(34, 211, 238, 0.15) 100%);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 0.5px solid rgba(34, 211, 238, 0.35);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    box-shadow:
        0 4px 16px rgba(34, 211, 238, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    will-change: transform;
    display: inline-block;
    text-decoration: none;
}

html[data-theme="light"] .glass-btn-secondary {
    background: linear-gradient(135deg,
            rgba(34, 211, 238, 0.85) 0%,
            rgba(34, 211, 238, 0.6) 100%);
    border-color: rgba(34, 211, 238, 0.8);
    box-shadow:
        0 10px 30px rgba(34, 211, 238, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.glass-btn-secondary:hover {
    background: linear-gradient(135deg,
            rgba(34, 211, 238, 0.4) 0%,
            rgba(34, 211, 238, 0.25) 100%);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow:
        0 6px 24px rgba(34, 211, 238, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.glass-btn-secondary:active {
    background: linear-gradient(135deg,
            rgba(34, 211, 238, 0.25) 0%,
            rgba(34, 211, 238, 0.1) 100%);
    box-shadow:
        0 2px 8px rgba(34, 211, 238, 0.12),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

/* Glass Container (for content blocks) */
.glass-container {
    --card-radius: 1.25rem;
    background: linear-gradient(135deg,
            var(--card-theme-from) 0%,
            var(--card-theme-to) 100%);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 1px solid var(--card-glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow:
        var(--card-glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow, border-color;
}

.glass-container:hover {
    background: linear-gradient(135deg,
            var(--card-theme-featured-from) 0%,
            var(--card-theme-featured-to) 100%);
    border-color: var(--card-glass-border);
    box-shadow:
        var(--card-glass-shadow-hover);
    transform: translateY(-2px);
}

/* Elevated Glass (for important sections) */
.glass-elevated {
    background: linear-gradient(135deg,
            var(--card-theme-featured-from) 0%,
            var(--card-theme-featured-to) 100%);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 1px solid var(--card-glass-border);
    box-shadow: var(--card-glass-shadow-hover);
}

/* Light Sweep Enhancement */
.glass-sweep,
:is(.service-card, .pricing-card, .glass-card, .glass-container, .faq-item, .stack-card, .testimonial-card) {
    position: relative;
    overflow: hidden;
}

.glass-sweep::before,
:is(.service-card, .pricing-card, .glass-card, .glass-container, .faq-item, .stack-card, .testimonial-card)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    background-size: 200% 100%;
    background-position: -120% 0;
    opacity: 0;
    transition: background-position 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    pointer-events: none;
    z-index: 2;
    clip-path: inset(0 round var(--card-radius, 1.5rem));
}

.glass-sweep:hover::before,
:is(.service-card, .pricing-card, .glass-card, .glass-container, .faq-item, .stack-card, .testimonial-card):hover::before {
    background-position: 120% 0;
    opacity: 1;
}

/* Step Connector */
.step-connector {
    display: none;
}

.step-connector.active {
    transform: translateY(-50%) scaleX(1);
}

.step-highlight {
    transition: all 0.5s ease;
}

.step-highlight.active {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.glass-card.step-highlight:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: var(--card-glass-shadow-hover);
}

/* Testimonial Focus */
.testimonial-card {
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.testimonials-container:has(.testimonial-card:hover) .testimonial-card:not(:hover) {
    filter: blur(2px);
    opacity: 0.6;
}

/* Glass Lines (Reference Effect) */
.service-card,
.pricing-card,
.glass-card,
.glass-container,
.faq-item,
.stack-card {
    position: relative;
    overflow: hidden;
}

/* Allow pricing badges to sit above the card without clipping */
.pricing-card {
    overflow: visible;
}

/* Orbit stroke layer */
.card-orbit {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.rotating-glow-card {
    position: relative;
    overflow: hidden;
}

.pricing-card.rotating-glow-card {
    overflow: visible;
}

.rotating-glow-card> :not(.absolute):not(.fixed):not(.sticky):not(.card-orbit) {
    position: relative;
    z-index: 3;
}

.btn-label {
    position: relative;
    z-index: 2;
    display: inline-block;
}

.card-orbit-path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: butt;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    animation: orbitDash 6s linear infinite;
    animation-play-state: paused;
    stroke-dashoffset: 0;
    will-change: stroke-dashoffset;
}

.card-orbit-path-1 {
    stroke: var(--card-orbit-color-1);
    filter: drop-shadow(0 0 8px var(--card-orbit-glow-1));
}

.card-orbit-path-2 {
    stroke: var(--card-orbit-color-2);
    filter: drop-shadow(0 0 8px var(--card-orbit-glow-2));
    animation-delay: -3s;
}

.rotating-glow-card:hover .card-orbit-path {
    animation-play-state: running;
}

.service-card> :not(.absolute):not(.fixed):not(.sticky):not(.card-orbit),
.pricing-card> :not(.absolute):not(.fixed):not(.sticky):not(.card-orbit),
.glass-card> :not(.absolute):not(.fixed):not(.sticky):not(.card-orbit),
.glass-container> :not(.absolute):not(.fixed):not(.sticky):not(.card-orbit),
.faq-item> :not(.absolute):not(.fixed):not(.sticky):not(.card-orbit),
.stack-card> :not(.absolute):not(.fixed):not(.sticky):not(.card-orbit) {
    position: relative;
    z-index: 2;
}

.service-card>.absolute,
.pricing-card>.absolute,
.glass-card>.absolute,
.glass-container>.absolute,
.faq-item>.absolute,
.stack-card>.absolute {
    z-index: 2;
}

.service-card .\-z-10,
.pricing-card .\-z-10,
.glass-card .\-z-10,
.glass-container .\-z-10,
.faq-item .\-z-10,
.stack-card .\-z-10 {
    z-index: -1 !important;
}

@keyframes orbitDash {
    to {
        stroke-dashoffset: calc(-1 * var(--orbit-length, 0px));
    }
}

/* CTA Energy Wave */
.cta-section {
    position: relative;
}

.energy-wave {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.15), transparent 70%);
    animation: energyPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes energyPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Button Ripple */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

/* Section Glow Enhancement */
.section-glow {
    transition: filter 0.5s ease;
}

.section-glow.enhanced #bg-canvas {
    filter: brightness(1.3);
}

/* iOS Glass - Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: calc(100vw - 0.5rem);
    overflow-x: hidden;
    will-change: transform;
    background: linear-gradient(180deg,
            var(--menu-bg-top) 0%,
            var(--menu-bg-bottom) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-left: 0.5px solid var(--border-subtle);
    box-shadow: -4px 0 24px var(--shadow-strong);
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Card stack reveal */
.stack-card {
    --card-radius: 0.75rem;
    --card-theme-from: rgba(255, 255, 255, 0.06);
    --card-theme-to: rgba(255, 255, 255, 0.03);
    --card-light-blue: rgba(255, 255, 255, 0.35);
    --card-light-blue-soft: rgba(255, 255, 255, 0.18);
    --card-orb-size: 8px;
    --card-glass-line-strong: rgba(255, 255, 255, 0.2);
    --card-glass-line-soft: rgba(255, 255, 255, 0.08);
    --card-glass-shadow: none;
    --card-glass-shadow-hover: none;
    background: linear-gradient(135deg,
            var(--card-theme-from) 0%,
            var(--card-theme-to) 100%);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 1px solid var(--card-glass-border);
    box-shadow: none;
    opacity: 0;
    transform: translateX(-30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] .stack-card {
    --card-theme-from: rgba(15, 23, 42, 0.06);
    --card-theme-to: rgba(15, 23, 42, 0.03);
    --card-light-blue: rgba(15, 23, 42, 0.25);
    --card-light-blue-soft: rgba(15, 23, 42, 0.15);
    --card-glass-line-strong: rgba(15, 23, 42, 0.22);
    --card-glass-line-soft: rgba(15, 23, 42, 0.1);
    --card-glass-shadow: none;
    --card-glass-shadow-hover: none;
}

.stack-card.revealed {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.stack-card i.fa-circle-check {
    color: #22c55e;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.45);
}

html[data-theme="light"] .stack-card i.fa-circle-check {
    color: #16a34a;
    text-shadow: 0 0 10px rgba(22, 163, 74, 0.4);
}

/* ========================================
   CHATBOT WIDGET (bottom right)
   ======================================== */
.chatbot-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif);
}

.chatbot-toggle {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(34, 211, 238, 0.15) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 0 24px rgba(99, 102, 241, 0.25);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.12) inset,
        0 0 32px rgba(99, 102, 241, 0.35);
    border-color: rgba(99, 102, 241, 0.5);
}

.chatbot-toggle:active {
    transform: scale(0.98);
}

.chatbot-toggle i {
    font-size: 1.35rem;
    position: relative;
    z-index: 1;
}

.chatbot-toggle-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.5);
    opacity: 0;
    animation: chatbot-pulse 2s ease-out infinite;
}

@keyframes chatbot-pulse {
    0% {
        transform: scale(0.92);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.chatbot-widget.open .chatbot-toggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.chatbot-widget.open .chatbot-panel {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.chatbot-panel {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 2rem);
    height: 520px;
    max-height: calc(100vh - 6rem);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.92) 0%, rgba(2, 6, 23, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 0 40px rgba(99, 102, 241, 0.08);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.85) translateY(20px);
    transform-origin: bottom right;
    transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        visibility 0.35s ease,
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chatbot-header {
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.12) 0%, transparent 100%);
    border-radius: 20px 20px 0 0;
}

.chatbot-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.chatbot-logo i {
    color: #6366f1;
    font-size: 1rem;
}

.chatbot-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: scale(1.05);
}

.chatbot-change-num {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.chatbot-change-num:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scroll-behavior: smooth;
}

.chatbot-welcome {
    align-self: flex-start;
    max-width: 88%;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(34, 211, 238, 0.06) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.5;
    animation: chatbot-msg-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.chatbot-msg {
    max-width: 88%;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: chatbot-msg-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.chatbot-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35) 0%, rgba(99, 102, 241, 0.2) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #fff;
}

.chatbot-msg.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
}

@keyframes chatbot-msg-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-typing {
    flex-shrink: 0;
    padding: 0 1.25rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
}

.chatbot-typing[aria-hidden="true"] {
    display: none;
}

.chatbot-typing[aria-hidden="false"] {
    display: flex;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.7);
    animation: chatbot-typing-bounce 1.4s ease-in-out infinite both;
}

.chatbot-typing span:nth-child(1) {
    animation-delay: 0s;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chatbot-typing-bounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chatbot-input-wrap {
    flex-shrink: 0;
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    height: 46px;
    padding: 0 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chatbot-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.chatbot-send {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.chatbot-send:active {
    transform: scale(0.96);
}

.chatbot-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chatbot-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.chatbot-msg.bot ul {
    margin: 0.4rem 0 0.6rem 1.1rem;
    padding: 0;
}

.chatbot-msg.bot li {
    margin-bottom: 0.35rem;
    line-height: 1.45;
}

.chatbot-gap {
    height: 0.6rem;
}

.chatbot-msg.bot strong {
    color: #c7d2fe;
    font-weight: 600;
}

/* ---- Chatbot rich formatting (small additions) ---- */
.chatbot-msg.bot h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    /* Reduced from 8px */
    color: #c7d2fe;
    line-height: 1.2;
}

.chatbot-msg.bot p {
    margin: 4px 0;
    /* Reduced from 6px */
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.94rem;
}

.chatbot-msg.bot ul {
    margin: 4px 0 6px 16px;
    /* Reduced from 8px/10px */
    padding: 0;
}

.chatbot-msg.bot li {
    margin-bottom: 3px;
    /* Reduced from 6px */
    line-height: 1.35;
    font-size: 0.94rem;
}

.chatbot-msg.bot strong {
    color: #e6eefc;
    font-weight: 700;
}

/* Light theme overrides for chatbot */
html[data-theme="light"] .chatbot-panel {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(15, 23, 42, 0.06) inset;
}

html[data-theme="light"] .chatbot-toggle {
    border-color: rgba(15, 23, 42, 0.22);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.92) 0%, rgba(37, 99, 235, 0.88) 100%);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    color: #ffffff;
}

html[data-theme="light"] .chatbot-toggle:hover {
    border-color: rgba(79, 70, 229, 0.55);
    box-shadow: 0 16px 36px rgba(79, 70, 229, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

html[data-theme="light"] .chatbot-toggle-pulse {
    border-color: rgba(79, 70, 229, 0.45);
}

html[data-theme="light"] .chatbot-header {
    border-bottom-color: rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
}

html[data-theme="light"] .chatbot-logo {
    color: #0f172a;
}

html[data-theme="light"] .chatbot-close {
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
}

html[data-theme="light"] .chatbot-close:hover {
    background: rgba(15, 23, 42, 0.14);
    color: #0f172a;
}

html[data-theme="light"] .chatbot-welcome,
html[data-theme="light"] .chatbot-msg.bot {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.15);
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .chatbot-msg.user {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Light Mode Text Overrides for Bot Rich Content */
html[data-theme="light"] .chatbot-msg.bot h3 {
    color: #4338ca;
}

html[data-theme="light"] .chatbot-msg.bot p {
    color: #334155;
}

html[data-theme="light"] .chatbot-msg.bot li {
    color: #475569;
}

html[data-theme="light"] .chatbot-msg.bot strong {
    color: #1e293b;
}

html[data-theme="light"] .chatbot-input {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

html[data-theme="light"] .chatbot-input::placeholder {
    color: #64748b;
}

html[data-theme="light"] .chatbot-input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .chatbot-typing span {
    background: rgba(99, 102, 241, 0.6);
}

/* Chatbot Auth Screen */
.chatbot-auth-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.5rem;
    gap: 0.4rem;
    text-align: center;
}

.chatbot-auth-screen.hidden {
    display: none !important;
}

.chatbot-auth-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(34, 211, 238, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.15rem;
}

.chatbot-auth-icon i {
    color: #6366f1;
    font-size: 0.9rem;
}

.chatbot-auth-title {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0;
}

.chatbot-auth-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    margin: 0 0 0.35rem 0;
    line-height: 1.35;
}

/* Phone row: country code + number side-by-side */
.chatbot-phone-row {
    display: flex;
    gap: 6px;
    width: 100%;
}

/* Custom Country Code Dropdown */
.cc-dropdown {
    position: relative;
    flex-shrink: 0;
}

.cc-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 34px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s ease;
}

.cc-dropdown-btn:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.cc-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

.cc-arrow {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.cc-dropdown.open .cc-arrow {
    transform: rotate(180deg);
}

.cc-dropdown-list {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 160px;
    max-height: 180px;
    overflow-y: auto;
    margin: 0 0 4px 0;
    padding: 4px 0;
    list-style: none;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.cc-dropdown.open .cc-dropdown-list {
    display: block;
}

.cc-dropdown-list::-webkit-scrollbar {
    width: 4px;
}

.cc-dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.cc-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.8);
    transition: background 0.15s ease;
}

.cc-dropdown-item:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #fff;
}

.cc-dropdown-item.active {
    background: rgba(99, 102, 241, 0.2);
    color: #fff;
}

.cc-dropdown-item img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

.chatbot-phone-input {
    flex: 1;
    height: 34px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.85rem;
    font-family: inherit;
    padding: 0 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-phone-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.chatbot-phone-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.chatbot-phone-error {
    color: #f87171;
    font-size: 0.7rem;
    margin: 0;
    min-height: 0.85rem;
    line-height: 1;
    text-align: left;
    width: 100%;
}

.chatbot-auth-btn {
    width: 100%;
    height: 34px;
    border-radius: 6px;
    border: none;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.chatbot-auth-btn:active {
    transform: translateY(0);
}

/* Change number link */
.chatbot-change-wrap {
    flex-shrink: 0;
    text-align: center;
    padding: 0 1.25rem 0.6rem;
}

.chatbot-change-wrap.hidden {
    display: none !important;
}

.chatbot-change-link {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.68rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.chatbot-change-link:hover {
    color: #6366f1;
}

/* Fix: hidden overrides */
.chatbot-messages.hidden {
    display: none !important;
}

.chatbot-input-wrap.hidden {
    display: none !important;
}

.chatbot-typing.hidden {
    display: none !important;
}

/* Light theme auth screen */
html[data-theme="light"] .chatbot-auth-title {
    color: #0f172a;
}

html[data-theme="light"] .chatbot-auth-subtitle {
    color: #64748b;
}

html[data-theme="light"] .chatbot-auth-icon {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-color: rgba(79, 70, 229, 0.2);
}

html[data-theme="light"] .cc-dropdown-btn {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

html[data-theme="light"] .cc-dropdown-list {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .cc-dropdown-item {
    color: #334155;
}

html[data-theme="light"] .cc-dropdown-item:hover {
    background: rgba(79, 70, 229, 0.08);
    color: #0f172a;
}

html[data-theme="light"] .cc-arrow {
    color: rgba(15, 23, 42, 0.4);
}

html[data-theme="light"] .chatbot-phone-input {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

html[data-theme="light"] .chatbot-phone-input::placeholder {
    color: #94a3b8;
}

html[data-theme="light"] .chatbot-change-link {
    color: #94a3b8;
}

html[data-theme="light"] .chatbot-change-link:hover {
    color: #4f46e5;
}

/* ========================================
   MARKDOWN STYLES FOR CHATBOT
   ======================================== */
.chatbot-msg.bot p {
    margin: 0 0 0.5rem 0;
}

.chatbot-msg.bot p:last-child {
    margin-bottom: 0;
}

.chatbot-msg.bot ul,
.chatbot-msg.bot ol {
    margin: 0.5rem 0 0.5rem 1.25rem;
    padding: 0;
}

.chatbot-msg.bot li {
    margin-bottom: 0.25rem;
}

.chatbot-msg.bot strong {
    font-weight: 700;
    color: #c7d2fe;
}

.chatbot-msg.bot h1,
.chatbot-msg.bot h2,
.chatbot-msg.bot h3,
.chatbot-msg.bot h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem 0;
    color: #ffffff;
    line-height: 1.3;
}

.chatbot-msg.bot h1:first-child,
.chatbot-msg.bot h2:first-child,
.chatbot-msg.bot h3:first-child,
.chatbot-msg.bot h4:first-child {
    margin-top: 0;
}

.chatbot-msg.bot code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85em;
    color: #e2e8f0;
}

.chatbot-msg.bot pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.chatbot-msg.bot pre code {
    background: transparent;
    padding: 0;
    color: #e2e8f0;
}

/* Light Mode Overrides for Markdown */
html[data-theme="light"] .chatbot-msg.bot strong {
    color: #4338ca;
}

html[data-theme="light"] .chatbot-msg.bot h1,
html[data-theme="light"] .chatbot-msg.bot h2,
html[data-theme="light"] .chatbot-msg.bot h3,
html[data-theme="light"] .chatbot-msg.bot h4 {
    color: #1e293b;
}

html[data-theme="light"] .chatbot-msg.bot code {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
}

html[data-theme="light"] .chatbot-msg.bot pre {
    background: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .chatbot-msg.bot pre code {
    color: #334155;
    background: transparent;
}

/* ========================================
   CHATBOT CONTEXTUAL NAV BUTTONS
   ======================================== */
.chatbot-nav-btns {
    align-self: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    margin-bottom: 2px;
    max-width: 92%;
    animation: chatbot-nav-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.15s;
    opacity: 0;
}

@keyframes chatbot-nav-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.08);
    color: rgba(199, 210, 254, 0.92);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.chatbot-nav-btn:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(99, 102, 241, 0.65);
    color: #fff;
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.28);
}

.chatbot-nav-btn:active {
    transform: translateY(0) scale(0.97);
}

/* "Get Audit" button — filled accent style */
.chatbot-nav-btn.get-audit {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35) 0%, rgba(34, 211, 238, 0.2) 100%);
    border-color: rgba(99, 102, 241, 0.6);
    color: #fff;
}

.chatbot-nav-btn.get-audit:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.6) 0%, rgba(34, 211, 238, 0.35) 100%);
    border-color: rgba(99, 102, 241, 0.9);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
}

/* Light theme overrides */
html[data-theme="light"] .chatbot-nav-btn {
    border-color: rgba(79, 70, 229, 0.3);
    background: rgba(79, 70, 229, 0.07);
    color: #4338ca;
}

html[data-theme="light"] .chatbot-nav-btn:hover {
    background: rgba(79, 70, 229, 0.16);
    border-color: rgba(79, 70, 229, 0.55);
    color: #3730a3;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.18);
}

html[data-theme="light"] .chatbot-nav-btn.get-audit {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.18) 0%, rgba(6, 182, 212, 0.12) 100%);
    border-color: rgba(79, 70, 229, 0.5);
    color: #3730a3;
}

html[data-theme="light"] .chatbot-nav-btn.get-audit:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.35) 0%, rgba(6, 182, 212, 0.22) 100%);
    color: #1e1b4b;
}