/* Kyroon Landing Page - Custom Styles */

/* ===================================
   CSS Custom Properties (Design Tokens)
   =================================== */

:root {
    /* Dark Theme (Default) */
    --color-bg-primary: #0a0a0f;
    --color-bg-secondary: #12121a;
    --color-bg-tertiary: #1a1a25;
    --color-bg-elevated: #252532;

    --color-text-primary: #ffffff;
    --color-text-secondary: #9ca3af;
    --color-text-tertiary: #6b7280;
    --color-text-muted: #4b5563;

    --color-border-primary: rgba(255, 255, 255, 0.1);
    --color-border-secondary: rgba(255, 255, 255, 0.05);

    --color-purple-400: #a78bfa;
    --color-purple-500: #8b5cf6;
    --color-purple-600: #7c3aed;
    --color-blue-400: #60a5fa;
    --color-blue-500: #3b82f6;

    --color-overlay: rgba(10, 10, 15, 0.95);
    --color-card-bg: rgba(18, 18, 26, 0.8);
    --color-card-hover: rgba(26, 26, 37, 0.9);

    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

    /* Logo paths */
    --logo-main: url('../assets/images/logo-white.png');
    --logo-icon: url('../assets/images/icon-white.png');
}

/* Light Theme */
[data-theme="light"] {
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f9fafb;
    --color-bg-tertiary: #f3f4f6;
    --color-bg-elevated: #e5e7eb;

    --color-text-primary: #111827;
    --color-text-secondary: #4b5563;
    --color-text-tertiary: #6b7280;
    --color-text-muted: #9ca3af;

    --color-border-primary: rgba(0, 0, 0, 0.1);
    --color-border-secondary: rgba(0, 0, 0, 0.05);

    --color-purple-400: #8b5cf6;
    --color-purple-500: #7c3aed;
    --color-purple-600: #6d28d9;
    --color-blue-400: #3b82f6;
    --color-blue-500: #2563eb;

    --color-overlay: rgba(255, 255, 255, 0.95);
    --color-card-bg: rgba(255, 255, 255, 0.9);
    --color-card-hover: rgba(249, 250, 251, 0.95);

    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.2);
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

    /* Logo paths */
    --logo-main: url('../assets/images/logo.png');
    --logo-icon: url('../assets/images/icon.png');
}

/* ===================================
   Base Styles & Resets
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Selection */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: white;
}

/* ===================================
   Scrollbar Styling
   =================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed, #3b82f6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8b5cf6, #60a5fa);
}

/* ===================================
   Gradient Backgrounds
   =================================== */

.hero-gradient {
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 119, 198, 0.15), transparent),
                radial-gradient(ellipse 60% 50% at 80% 50%, rgba(59, 130, 246, 0.1), transparent),
                radial-gradient(ellipse 60% 50% at 20% 50%, rgba(139, 92, 246, 0.1), transparent);
}

.cta-gradient {
    background: radial-gradient(ellipse 100% 80% at 50% 100%, rgba(139, 92, 246, 0.15), transparent),
                radial-gradient(ellipse 80% 60% at 20% 80%, rgba(59, 130, 246, 0.1), transparent),
                radial-gradient(ellipse 80% 60% at 80% 80%, rgba(139, 92, 246, 0.1), transparent);
}

/* ===================================
   Primary Button Styles
   =================================== */

.btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3),
                0 0 0 0 rgba(124, 58, 237, 0);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4),
                0 0 0 4px rgba(124, 58, 237, 0.1);
}

.btn-primary:hover::before {
    left: 100%;
}

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

/* ===================================
   Navbar Styles
   =================================== */

#navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===================================
   Workflow Visual Animation
   =================================== */

.workflow-visual {
    position: relative;
}

.workflow-step {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.workflow-step:nth-child(1) { animation-delay: 1.2s; }
.workflow-step:nth-child(3) { animation-delay: 1.4s; }
.workflow-step:nth-child(5) { animation-delay: 1.6s; }
.workflow-step:nth-child(7) { animation-delay: 1.8s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Stat Cards
   =================================== */

.stat-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.15);
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* ===================================
   Section Reveal Animations
   =================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* ===================================
   Glowing Effects
   =================================== */

.glow-purple {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3),
                0 0 40px rgba(139, 92, 246, 0.2),
                0 0 60px rgba(139, 92, 246, 0.1);
}

.glow-blue {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3),
                0 0 40px rgba(59, 130, 246, 0.2),
                0 0 60px rgba(59, 130, 246, 0.1);
}

/* ===================================
   Product Cards
   =================================== */

#lite:hover .btn-primary,
#enterprise:hover .btn-primary {
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}

/* ===================================
   Pulse Animation for Status Indicators
   =================================== */

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.4;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.8;
    }
}

.pulse-indicator {
    position: relative;
}

.pulse-indicator::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.5;
    animation: pulse-ring 2s infinite;
}

/* ===================================
   Gradient Text
   =================================== */

.gradient-text {
    background: linear-gradient(135deg, #a78bfa 0%, #818cf8 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   Grid Pattern Overlay
   =================================== */

.grid-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ===================================
   Floating Animation
   =================================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

.float-element {
    animation: float 6s ease-in-out infinite;
}

/* ===================================
   Link Underline Effect
   =================================== */

.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7c3aed, #3b82f6);
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

/* ===================================
   Mobile Menu Animation
   =================================== */

#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
    max-height: 500px;
}

/* ===================================
   Card Hover Effects
   =================================== */

.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.3);
}

/* ===================================
   Responsive Typography Adjustments
   =================================== */

@media (max-width: 640px) {
    .hero-headline {
        font-size: 2rem;
        line-height: 1.2;
    }
}

/* ===================================
   Loading Skeleton
   =================================== */

.skeleton {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===================================
   Tooltip Styles
   =================================== */

.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: #1a1a25;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 12px;
    color: white;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ===================================
   Focus States for Accessibility
   =================================== */

a:focus-visible,
button:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* ===================================
   Reduced Motion
   =================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}

/* ===================================
   Theme Toggle Button
   =================================== */

.theme-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: var(--color-bg-tertiary);
    border-radius: 14px;
    border: 1px solid var(--color-border-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 2px;
}

.theme-toggle:hover {
    border-color: var(--color-purple-500);
}

.theme-toggle-slider {
    position: absolute;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--color-purple-500), var(--color-blue-500));
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    left: 2px;
}

[data-theme="light"] .theme-toggle-slider {
    transform: translateX(28px);
}

.theme-toggle-icon {
    width: 14px;
    height: 14px;
    color: white;
}

.theme-toggle-icon.sun {
    display: none;
}

.theme-toggle-icon.moon {
    display: block;
}

[data-theme="light"] .theme-toggle-icon.sun {
    display: block;
}

[data-theme="light"] .theme-toggle-icon.moon {
    display: none;
}

/* ===================================
   Language Selector
   =================================== */

.lang-selector {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.lang-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    border: 1px solid var(--color-border-primary);
    border-radius: 6px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    border-color: var(--color-purple-500);
    color: var(--color-text-primary);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--color-purple-500), var(--color-blue-500));
    border-color: transparent;
    color: white;
}

/* Language Dropdown Alternative */
.lang-dropdown {
    position: relative;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border-primary);
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-dropdown-btn:hover {
    border-color: var(--color-purple-500);
    color: var(--color-text-primary);
}

.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 140px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 100;
}

.lang-dropdown.open .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: var(--color-text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-dropdown-item:first-child {
    border-radius: 7px 7px 0 0;
}

.lang-dropdown-item:last-child {
    border-radius: 0 0 7px 7px;
}

.lang-dropdown-item:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
}

.lang-dropdown-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    color: var(--color-purple-400);
}

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

/* ===================================
   Theme-Aware Components
   =================================== */

/* Cards with theme support */
.theme-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border-secondary);
    transition: all 0.3s ease;
}

.theme-card:hover {
    background: var(--color-card-hover);
    border-color: var(--color-border-primary);
    box-shadow: var(--shadow-card);
}

/* Text colors with theme support */
.theme-text-primary {
    color: var(--color-text-primary);
}

.theme-text-secondary {
    color: var(--color-text-secondary);
}

.theme-text-tertiary {
    color: var(--color-text-tertiary);
}

/* Background with theme support */
.theme-bg-primary {
    background-color: var(--color-bg-primary);
}

.theme-bg-secondary {
    background-color: var(--color-bg-secondary);
}

.theme-bg-elevated {
    background-color: var(--color-bg-elevated);
}

/* Border with theme support */
.theme-border {
    border-color: var(--color-border-primary);
}

/* ===================================
   Logo Container
   =================================== */

.logo-image {
    transition: opacity 0.3s ease;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===================================
   Light Theme Specific Overrides
   =================================== */

[data-theme="light"] .hero-gradient {
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 119, 198, 0.08), transparent),
                radial-gradient(ellipse 60% 50% at 80% 50%, rgba(59, 130, 246, 0.05), transparent),
                radial-gradient(ellipse 60% 50% at 20% 50%, rgba(139, 92, 246, 0.05), transparent);
}

[data-theme="light"] .cta-gradient {
    background: radial-gradient(ellipse 100% 80% at 50% 100%, rgba(139, 92, 246, 0.08), transparent),
                radial-gradient(ellipse 80% 60% at 20% 80%, rgba(59, 130, 246, 0.05), transparent),
                radial-gradient(ellipse 80% 60% at 80% 80%, rgba(139, 92, 246, 0.05), transparent);
}

[data-theme="light"] #navbar.scrolled {
    background: var(--color-overlay);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border-secondary);
}

[data-theme="light"] .stat-card:hover {
    box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.1);
}

[data-theme="light"] .btn-primary {
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2),
                0 0 0 0 rgba(124, 58, 237, 0);
}

[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.3),
                0 0 0 4px rgba(124, 58, 237, 0.05);
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f3f4f6;
}

[data-theme="light"] ::selection {
    background: rgba(139, 92, 246, 0.2);
    color: #111827;
}

/* ===================================
   Price Card Styles
   =================================== */

.price-card {
    background: var(--color-card-bg);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.price-tag {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-purple-400), var(--color-blue-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

.price-divider {
    margin: 12px 0;
    height: 1px;
    background: var(--color-border-primary);
}

.price-savings {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #22c55e;
}

/* ===================================
   Settings Panel (Theme & Language)
   =================================== */

.settings-panel {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 768px) {
    .settings-panel {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        border-top: 1px solid var(--color-border-secondary);
    }

    .theme-toggle {
        width: 100%;
        max-width: 200px;
    }

    .lang-selector {
        width: 100%;
        justify-content: center;
    }
}
