/* 
 * Vortex Access Page Styles - AchieveAI Design System
 * 
 * High-tech, exclusive aesthetic for the invitation-only access page
 */

/* ============================================
   VORTEX BACKGROUND & ATMOSPHERE
   ============================================ */

.vortex-bg {
    background: #0a0d12;
    position: relative;
    overflow: hidden;
}

.vortex-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    background: 
        radial-gradient(ellipse at center, rgba(77, 124, 254, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(0, 255, 162, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 20%, rgba(138, 171, 255, 0.06) 0%, transparent 40%);
    animation: vortex-pulse 8s ease-in-out infinite;
}

@keyframes vortex-pulse {
    0%, 100% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Animated grid lines */
.vortex-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(77, 124, 254, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(77, 124, 254, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 60px;
    }
}

/* Scanning line effect */
.scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 162, 0.4), transparent);
    animation: scan 4s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes scan {
    0% {
        top: 0;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ============================================
   GLOWING TEXT EFFECTS
   ============================================ */

.text-glow {
    text-shadow: 
        0 0 20px rgba(77, 124, 254, 0.5),
        0 0 40px rgba(77, 124, 254, 0.3),
        0 0 60px rgba(77, 124, 254, 0.1);
}

.text-glow-green {
    text-shadow: 
        0 0 20px rgba(0, 255, 162, 0.5),
        0 0 40px rgba(0, 255, 162, 0.3),
        0 0 60px rgba(0, 255, 162, 0.1);
}

/* Headline shimmer */
.headline-shimmer {
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #4D7CFE 20%,
        #00ffa2 40%,
        #ffffff 60%,
        #4D7CFE 80%,
        #ffffff 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: headline-shimmer 4s linear infinite;
}

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

/* ============================================
   ENTRY GATE FORM
   ============================================ */

.entry-gate {
    background: rgba(15, 20, 27, 0.8);
    border: 1px solid rgba(77, 124, 254, 0.3);
    box-shadow: 
        0 0 40px rgba(77, 124, 254, 0.15),
        0 0 80px rgba(0, 255, 162, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.entry-gate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4D7CFE, #00ffa2, transparent);
    animation: gate-scan 3s linear infinite;
}

@keyframes gate-scan {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Input fields with cyber aesthetic */
.cyber-input {
    background: rgba(10, 13, 18, 0.9);
    border: 1px solid rgba(77, 124, 254, 0.25);
    color: #e7ecff;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cyber-input::placeholder {
    color: rgba(138, 171, 255, 0.4);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.75em;
}

.cyber-input:focus {
    outline: none;
    border-color: #4D7CFE;
    box-shadow: 
        0 0 0 3px rgba(77, 124, 254, 0.2),
        0 0 20px rgba(77, 124, 254, 0.3),
        inset 0 0 10px rgba(77, 124, 254, 0.1);
}

.cyber-input.invalid {
    border-color: #ff4444;
    box-shadow: 
        0 0 0 3px rgba(255, 68, 68, 0.2),
        0 0 20px rgba(255, 68, 68, 0.3);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* Submit button with power-up effect */
.enter-btn {
    background: linear-gradient(135deg, #4D7CFE 0%, #00ffa2 100%);
    position: relative;
    overflow: hidden;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.enter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: btn-shine 2s ease-in-out infinite;
}

@keyframes btn-shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

.enter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 40px rgba(77, 124, 254, 0.4),
        0 0 60px rgba(0, 255, 162, 0.3);
}

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

.enter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   TRIAD BOXES
   ============================================ */

.triad-box {
    background: rgba(15, 20, 27, 0.7);
    border: 1px solid rgba(77, 124, 254, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.triad-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4D7CFE, #00ffa2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.triad-box:hover {
    border-color: rgba(77, 124, 254, 0.4);
    transform: translateY(-8px);
    box-shadow: 
        0 20px 60px rgba(77, 124, 254, 0.2),
        0 0 40px rgba(0, 255, 162, 0.1);
}

.triad-box:hover::before {
    transform: scaleX(1);
}

/* Box icons */
.triad-icon {
    background: linear-gradient(135deg, rgba(77, 124, 254, 0.2) 0%, rgba(0, 255, 162, 0.1) 100%);
    border: 1px solid rgba(77, 124, 254, 0.3);
}

/* ============================================
   FLOATING PARTICLES
   ============================================ */

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .headline-shimmer {
        animation-duration: 6s;
    }
    
    .vortex-grid {
        background-size: 40px 40px;
    }
    
    .triad-box:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 640px) {
    .cyber-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* ============================================
   ERROR STATE
   ============================================ */

.error-message {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff6b6b;
    animation: fadeInUp 0.3s ease-out;
}

/* ============================================
   SUCCESS STATE
   ============================================ */

.success-state {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   LOADING STATE
   ============================================ */

.loading-spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

