/**
 * High Leverage Humans - Ultra Premium Form Design
 * Complete overhaul of amateur form fields into sophisticated glassmorphism
 */

/* ULTRA PREMIUM FORM CONTAINER */
.email-capture-form {
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.9) 0%, 
        rgba(17, 17, 17, 0.95) 50%, 
        rgba(26, 26, 26, 0.9) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 24px;
    padding: 4rem 3.5rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.4),
        0 16px 32px rgba(0, 230, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.email-capture-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 230, 255, 0.08) 0%, 
        rgba(255, 0, 79, 0.05) 50%, 
        rgba(0, 230, 255, 0.08) 100%);
    pointer-events: none;
    z-index: 1;
}

.email-capture-form::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--color-neon-blue) 0%, 
        var(--color-electric-red) 25%, 
        var(--color-neon-blue) 50%, 
        var(--color-electric-red) 75%, 
        var(--color-neon-blue) 100%);
    border-radius: 26px;
    z-index: -1;
    opacity: 0.6;
    background-size: 400% 400%;
    animation: borderFlow 8s ease-in-out infinite;
}

@keyframes borderFlow {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

/* PREMIUM FORM GROUPS */
.form-group {
    position: relative;
    margin-bottom: 2.5rem;
    z-index: 2;
}

.form-group:last-of-type {
    margin-bottom: 3rem;
}

/* INPUT FIELD REVOLUTIONARY DESIGN */
.email-capture-form input[type="email"],
.email-capture-form input[type="text"] {
    width: 100%;
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.8) 0%, 
        rgba(17, 17, 17, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 230, 255, 0.15);
    border-radius: 16px;
    color: var(--color-white);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.email-capture-form input::placeholder {
    color: var(--color-gray-500);
    font-style: italic;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* ENHANCED FOCUS STATES */
.email-capture-form input:focus {
    outline: none;
    border-color: var(--color-neon-blue);
    background: linear-gradient(135deg, 
        rgba(0, 230, 255, 0.05) 0%, 
        rgba(26, 26, 26, 0.9) 100%);
    box-shadow: 
        0 0 0 4px rgba(0, 230, 255, 0.1),
        0 12px 40px rgba(0, 230, 255, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-3px) scale(1.02);
}

.email-capture-form input:focus::placeholder {
    opacity: 0.4;
    transform: translateX(8px);
}

/* HOVER STATES */
.email-capture-form input:hover:not(:focus) {
    border-color: rgba(0, 230, 255, 0.25);
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.85) 0%, 
        rgba(17, 17, 17, 0.95) 100%);
    transform: translateY(-1px);
    box-shadow: 
        0 10px 36px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* PREMIUM SUBMIT BUTTON */
.email-capture-form button[type="submit"],
.email-capture-form .submit-btn {
    width: 100%;
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-charcoal);
    background: linear-gradient(135deg, 
        var(--color-neon-blue) 0%, 
        var(--color-neon-blue-light) 50%, 
        var(--color-neon-blue) 100%);
    padding: 1.8rem 2rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 2;
    box-shadow: 
        0 20px 40px rgba(0, 230, 255, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.email-capture-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.email-capture-form button:hover::before {
    left: 100%;
}

.email-capture-form button::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, 
        var(--color-neon-blue) 0%, 
        var(--color-electric-red) 25%, 
        var(--color-neon-blue) 50%, 
        var(--color-electric-red) 75%, 
        var(--color-neon-blue) 100%);
    border-radius: 19px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    background-size: 400% 400%;
    animation: buttonBorderGlow 4s linear infinite;
}

.email-capture-form button:hover::after {
    opacity: 0.8;
}

.email-capture-form button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 230, 255, 0.5),
        0 12px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes buttonBorderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* SOPHISTICATED ERROR STATES */
.form-group.error input {
    border-color: var(--color-electric-red);
    background: linear-gradient(135deg, 
        rgba(255, 0, 79, 0.05) 0%, 
        rgba(26, 26, 26, 0.9) 100%);
    box-shadow: 
        0 0 0 3px rgba(255, 0, 79, 0.1),
        0 8px 32px rgba(255, 0, 79, 0.2);
}

.error-message {
    display: block;
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--color-electric-red);
    margin-top: 0.8rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-group.error .error-message {
    opacity: 1;
    transform: translateY(0);
}

/* SUCCESS STATES */
.form-group.success input {
    border-color: #00ff88;
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.05) 0%, 
        rgba(26, 26, 26, 0.9) 100%);
    box-shadow: 
        0 0 0 3px rgba(0, 255, 136, 0.1),
        0 8px 32px rgba(0, 255, 136, 0.2);
}

/* LOADING STATES */
.email-capture-form button.loading {
    pointer-events: none;
    opacity: 0.8;
    color: transparent;
}

.email-capture-form button.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(17, 17, 17, 0.3);
    border-top: 3px solid var(--color-charcoal);
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
    z-index: 2;
}

@keyframes loadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .email-capture-form {
        padding: 3rem 2.5rem;
        border-radius: 20px;
        margin: 0 1rem;
    }
    
    .email-capture-form input {
        padding: 1.3rem 1.5rem;
        font-size: 1rem;
    }
    
    .email-capture-form button {
        padding: 1.5rem 1.5rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .email-capture-form {
        padding: 2.5rem 2rem;
        border-radius: 16px;
    }
    
    .email-capture-form input {
        padding: 1.2rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .email-capture-form button {
        padding: 1.4rem 1rem;
        font-size: 1rem;
    }
}

/* ACCESSIBILITY IMPROVEMENTS */
@media (prefers-reduced-motion: reduce) {
    .email-capture-form::after,
    .email-capture-form button::after {
        animation: none;
    }
    
    .email-capture-form input:focus,
    .email-capture-form button:hover {
        transform: none;
    }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    .email-capture-form input {
        border-width: 3px;
        background: rgba(0, 0, 0, 0.9);
    }
    
    .email-capture-form button {
        border: 3px solid var(--color-neon-blue);
    }
}

/* FOCUS VISIBLE FOR KEYBOARD NAVIGATION */
.email-capture-form input:focus-visible {
    outline: 3px solid var(--color-neon-blue);
    outline-offset: 2px;
}

.email-capture-form button:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 3px;
}

/* PERFORMANCE OPTIMIZATIONS */
.email-capture-form,
.email-capture-form input,
.email-capture-form button {
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* ULTRA PREMIUM FLOATING LABELS (OPTIONAL ENHANCEMENT) */
.form-group.floating-label {
    position: relative;
}

.form-group.floating-label label {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    font-size: 1.1rem;
    color: var(--color-gray-500);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 3;
}

.form-group.floating-label input:focus + label,
.form-group.floating-label input:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 1rem;
    font-size: 0.8rem;
    color: var(--color-neon-blue);
    background: var(--color-charcoal);
    padding: 0 0.5rem;
    border-radius: 4px;
}