/* ==================== */
/* Reset & Base Styles  */
/* ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #0a0e27;
    --color-bg-secondary: #121629;
    --color-text: #e8eaf6;
    --color-text-secondary: #b8bdd8;
    --color-accent-purple: #a78bfa;
    --color-accent-teal: #5eead4;
    --color-accent-blue: #60a5fa;
    --color-glow-purple: rgba(167, 139, 250, 0.4);
    --color-glow-teal: rgba(94, 234, 212, 0.4);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ==================== */
/* Animated Background  */
/* ==================== */

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1429 100%);
}

.bg-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(94, 234, 212, 0.06) 0%, transparent 50%);
    animation: gradientShift 20s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10%, -10%) rotate(180deg); }
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ==================== */
/* Container & Layout   */
/* ==================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero {
    text-align: center;
    padding: 2rem 0;
}

/* ==================== */
/* Logo                 */
/* ==================== */

.logo {
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
}

/* ==================== */
/* Typography           */
/* ==================== */

.headline {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, var(--color-accent-purple), var(--color-accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.subheadline {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 4rem;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* ==================== */
/* Crystal Orb (MAXIMUM MOVEMENT) */
/* ==================== */

.orb-container {
    width: 100%;
    max-width: 700px; /* Much larger container */
    height: 700px; /* Much larger height */
    margin: 0 auto 4rem;
    position: relative;
    animation: fadeIn 1s ease-out 0.6s both;
    /* Large padding to prevent glow clipping - NO BORDERS */
    padding: 100px;
    overflow: visible; /* Ensure glow is never clipped */
}

#orb {
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
    display: block;
    /* Prevent canvas blurriness on high DPI screens */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* NO borders or outlines */
    border: none;
    outline: none;
}

#orb:active {
    cursor: grabbing;
}

/* ==================== */
/* Feature Cards        */
/* ==================== */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto 4rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(167, 139, 250, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(167, 139, 250, 0.15);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    filter: grayscale(0.3);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.5;
}

/* ==================== */
/* Email Capture        */
/* ==================== */

.email-capture {
    max-width: 500px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 1s both;
}

.input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

input[type="email"] {
    flex: 1;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--color-text);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition-smooth);
    outline: none;
}

input[type="email"]::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.6;
}

input[type="email"]:focus {
    border-color: var(--color-accent-purple);
    box-shadow: 0 0 0 3px var(--color-glow-purple);
    background: rgba(255, 255, 255, 0.08);
}

input[type="email"].error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.btn-primary {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-teal));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-accent-teal), var(--color-accent-blue));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--color-glow-purple);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-glow-purple);
}

.form-hint {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-align: center;
    opacity: 0.8;
}

.success-message {
    display: none;
    padding: 1rem;
    background: rgba(94, 234, 212, 0.1);
    border: 1px solid var(--color-accent-teal);
    border-radius: 12px;
    color: var(--color-accent-teal);
    font-size: 0.95rem;
    margin-top: 1rem;
    animation: slideIn 0.4s ease-out;
}

.success-message.show {
    display: block;
}

/* ==================== */
/* Footer               */
/* ==================== */

.footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer a {
    color: var(--color-accent-teal);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer a:hover {
    color: var(--color-accent-purple);
    text-decoration: underline;
}

/* ==================== */
/* Animations           */
/* ==================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== */
/* Accessibility        */
/* ==================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .bg-gradient::before {
        animation: none;
    }
}

/* ==================== */
/* Responsive Design    */
/* ==================== */

@media (max-width: 1024px) {
    .orb-container {
        max-width: 600px;
        height: 600px;
        padding: 80px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .hero {
        padding: 1rem 0;
    }
    
    .orb-container {
        max-width: 450px;
        height: 450px;
        margin-bottom: 3rem;
        padding: 60px;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .btn-primary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.25rem;
    }
    
    .orb-container {
        max-width: 350px;
        height: 350px;
        padding: 40px;
    }
    
    .feature-card {
        padding: 1.5rem 1rem;
    }
}

/* High DPI screen optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #orb {
        image-rendering: auto;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--color-accent-purple);
    outline-offset: 2px;
}