/* =============================================
   K-ACTUS - Custom Styles
   ============================================== */

/* === CSS CUSTOM PROPERTIES === */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
    --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3rem);
    --text-5xl: clamp(3rem, 2rem + 5vw, 4rem);
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* === BASE === */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

::selection {
    background-color: rgba(245, 191, 35, 0.3);
    color: inherit;
}

/* === NAVIGATION === */
#navbar {
    backdrop-filter: blur(0);
    background: transparent;
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    #navbar.scrolled {
        background: rgba(15, 23, 42, 0.95);
    }
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

#navbar.scrolled .nav-link {
    color: #334155;
}

#navbar.scrolled .nav-link:hover {
    color: #B8930F;
    background: rgba(245, 191, 35, 0.1);
}

@media (prefers-color-scheme: dark) {
    #navbar.scrolled .nav-link {
        color: rgba(255, 255, 255, 0.8);
    }
    #navbar.scrolled .nav-link:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Logo visibility: white logo by default (hero is always dark) */
.nav-logo-white { display: block; }
.nav-logo-dark { display: none; }

/* Scrolled + light mode: swap to dark logo */
#navbar.scrolled .nav-logo-white { display: none !important; }
#navbar.scrolled .nav-logo-dark { display: block !important; }

/* Scrolled + dark mode: keep white logo */
@media (prefers-color-scheme: dark) {
    #navbar.scrolled .nav-logo-white { display: block !important; }
    #navbar.scrolled .nav-logo-dark { display: none !important; }
}

/* CTA buttons: yellow (matches logo brackets) */
.nav-cta,
.btn-cta {
    background-color: #F5BF23;
    color: #0F172A;
}

.nav-cta:hover,
.btn-cta:hover {
    background-color: #E0AD1A;
}

/* CTA outline buttons */
.btn-cta-outline {
    border-color: #F5BF23;
    color: #F5BF23;
}

.btn-cta-outline:hover {
    background-color: #F5BF23;
    color: #0F172A;
}

@media (prefers-color-scheme: light) {
    .btn-cta-outline {
        color: #0F172A;
        border-color: #E0AD1A;
    }
}

/* Mobile menu button colors */
#mobile-menu-btn {
    color: #ffffff;
}

#navbar.scrolled #mobile-menu-btn {
    color: #334155;
}

@media (prefers-color-scheme: dark) {
    #navbar.scrolled #mobile-menu-btn {
        color: #ffffff;
    }
}

/* Mobile nav links */
.mobile-nav-link {
    color: #334155;
}

.mobile-nav-link:hover {
    background: rgba(245, 191, 35, 0.1);
    color: #B8930F;
}

@media (prefers-color-scheme: dark) {
    .mobile-nav-link {
        color: rgba(255, 255, 255, 0.8);
    }
    .mobile-nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

@keyframes scrollDown {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(8px); }
}

.scroll-indicator {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* === DETAILS/SUMMARY (FAQ) === */
details summary {
    -webkit-tap-highlight-color: transparent;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    color: #B8930F;
}

/* === FORM STYLES === */
input:focus, select:focus, textarea:focus {
    border-color: #F5BF23;
    box-shadow: 0 0 0 3px rgba(245, 191, 35, 0.15);
}

input[type="checkbox"] {
    accent-color: #F5BF23;
}

/* Form status messages */
.form-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@media (prefers-color-scheme: dark) {
    .form-success {
        background: rgba(20, 184, 166, 0.1);
        color: #5eead4;
        border-color: rgba(20, 184, 166, 0.3);
    }
    .form-error {
        background: rgba(211, 47, 47, 0.1);
        color: #fca5a5;
        border-color: rgba(211, 47, 47, 0.3);
    }
}

/* === SMOOTH SCROLL SECTIONS === */
section {
    scroll-margin-top: 5rem;
}

/* === FOCUS STYLES === */
:focus-visible {
    outline: 2px solid #F5BF23;
    outline-offset: 2px;
}

/* === PRICING CARD POPULAR === */
.pricing-highlight {
    background: linear-gradient(to bottom, #F5BF23, #E0AD1A);
    border: 2px solid #F5BF23;
}

@media (prefers-color-scheme: dark) {
    .pricing-highlight {
        color: #0F172A;
    }
}

@media (max-width: 639px) {
    .scale-\[1\.02\] {
        transform: none;
    }
}
