/**
 * Knoito Custom CSS
 * Animations, effects, and styles that can't be defined in theme.json
 */

/* ==========================================================================
   Animations
   ========================================================================== */

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

@keyframes knoito-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes knoito-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

.has-gradient-text {
    background: linear-gradient(135deg, #5CE1E6 0%, #3B82F6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.knoito-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(27, 42, 78, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(92, 225, 230, 0.1);
    transition: background-color 0.3s ease;
}

.knoito-header.is-scrolled {
    background: rgba(27, 42, 78, 0.95);
}

/* ==========================================================================
   Section Backgrounds
   ========================================================================== */

.knoito-section-dark {
    position: relative;
}

.knoito-section-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(92, 225, 230, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* Subtle grain texture */
.knoito-section-dark::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

.knoito-z-1 {
    position: relative;
    z-index: 1;
}

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

.is-style-knoito-primary .wp-block-button__link {
    background: linear-gradient(135deg, #5CE1E6 0%, #3B82F6 100%);
    color: #1B2A4E;
    font-weight: 600;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.is-style-knoito-primary .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(92, 225, 230, 0.3);
}

.is-style-knoito-secondary .wp-block-button__link {
    background: transparent;
    color: #FFFFFF;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.is-style-knoito-secondary .wp-block-button__link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.is-style-knoito-nav-cta .wp-block-button__link,
.knoito-nav-cta .wp-block-button__link {
    background: linear-gradient(135deg, #5CE1E6 0%, #3B82F6 100%);
    color: #1B2A4E;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 9999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.is-style-knoito-nav-cta .wp-block-button__link:hover,
.knoito-nav-cta .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(92, 225, 230, 0.3);
}

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

.knoito-feature-card {
    transition: all 0.2s ease;
}

.knoito-feature-card:hover {
    border-color: #5CE1E6 !important;
    box-shadow: 0 0 0 1px #5CE1E6, 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.knoito-jtbd-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.knoito-jtbd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Phone Mockup
   ========================================================================== */

.knoito-phone-mockup {
    position: relative;
    width: 280px;
    animation: knoito-float 4s ease-in-out infinite;
}

.knoito-phone-frame {
    background: #000;
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(92, 225, 230, 0.2);
}

.knoito-phone-screen {
    background: #FFFFFF;
    border-radius: 28px;
    aspect-ratio: 390 / 844;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==========================================================================
   Avatar
   ========================================================================== */

.knoito-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5CE1E6 0%, #3B82F6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1B2A4E;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

/* ==========================================================================
   Badge
   ========================================================================== */

.knoito-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(92, 225, 230, 0.1);
    border: 1px solid rgba(92, 225, 230, 0.2);
    border-radius: 9999px;
    color: #5CE1E6;
}

/* ==========================================================================
   Footer Links
   ========================================================================== */

.knoito-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.knoito-footer-links li {
    margin-bottom: 12px;
}

.knoito-footer-links a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.knoito-footer-links a:hover {
    color: #5CE1E6;
}

/* ==========================================================================
   Mobile Navigation
   ========================================================================== */

.knoito-mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    padding: 8px;
}

.knoito-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.98);
    z-index: 999;
    padding: 80px 24px 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.knoito-mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.knoito-mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    padding: 8px;
}

/* ==========================================================================
   Smooth Scroll Offset
   ========================================================================== */

html {
    scroll-padding-top: 80px;
}

/* Target anchors for scroll offset */
[id] {
    scroll-margin-top: 80px;
}

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

@media (max-width: 968px) {
    .knoito-phone-mockup {
        width: 240px;
    }

    /* Hide desktop nav, show mobile toggle */
    .knoito-header .wp-block-navigation {
        display: none;
    }

    .knoito-mobile-menu-toggle {
        display: block;
    }

    .knoito-mobile-menu {
        display: block;
    }
}

@media (max-width: 600px) {
    .knoito-phone-mockup {
        width: 220px;
    }

    .knoito-feature-card,
    .knoito-jtbd-card,
    .knoito-testimonial-card {
        padding: 24px !important;
    }

    .is-style-knoito-primary .wp-block-button__link,
    .is-style-knoito-secondary .wp-block-button__link {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* ==========================================================================
   Focus States (Accessibility)
   ========================================================================== */

a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible {
    outline: 2px solid #5CE1E6;
    outline-offset: 2px;
}

/* ==========================================================================
   Skip to Content Link
   ========================================================================== */

.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #5CE1E6;
    color: #1B2A4E;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 16px;
}
