/* ==========================================================================
   Design Tokens & Variables
   ========================================================================== */
:root {
    --bg-dark: #06040a;
    --bg-card: rgba(14, 11, 22, 0.45);
    --border-card: rgba(255, 255, 255, 0.07);
    --border-card-hover: rgba(255, 255, 255, 0.12);
    
    /* Harmonious Indigo/Violet/Pink color scheme matching 'Bright' */
    --color-primary: #818cf8;    /* Indigo */
    --color-secondary: #c084fc;  /* Purple */
    --color-accent: #f472b6;     /* Pink */
    
    --text-primary: #f8fafc;     /* Near white */
    --text-secondary: #94a3b8;   /* Slate gray */
    --text-muted: #64748b;
    
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-quick: all 0.2s ease;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================================================================
   Ambient Background Glows (Micro-animations)
   ========================================================================== */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.45;
    pointer-events: none;
    will-change: transform;
}

.glow-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
    top: -10%;
    left: -10%;
    animation: floatOrb1 25s infinite alternate ease-in-out;
}

.glow-orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(192, 132, 252, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: -15%;
    right: -10%;
    animation: floatOrb2 30s infinite alternate ease-in-out;
}

.glow-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: floatOrb3 20s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, 50px) scale(1.1); }
}

@keyframes floatOrb2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-100px, -60px) scale(0.9); }
}

@keyframes floatOrb3 {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-45%, -55%) rotate(360deg) scale(1.15); }
}

/* ==========================================================================
   Layout Container
   ========================================================================== */
.container {
    width: 100%;
    max-width: 680px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    z-index: 10;
}

/* ==========================================================================
   Logo Styles
   ========================================================================== */
.logo-wrapper {
    margin-bottom: 40px;
    text-align: center;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 1s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.logo {
    max-width: 260px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
    transition: var(--transition-smooth);
}

.logo:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

/* ==========================================================================
   Card Component (Glassmorphism)
   ========================================================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    border: 1px solid var(--border-card);
    border-radius: 28px;
    padding: 56px 48px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s 0.2s forwards cubic-bezier(0.16, 1, 0.3, 1);
    transition: border-color 0.5s ease;
}

.card:hover {
    border-color: var(--border-card-hover);
}

/* Badge decoration */
.badge {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--color-primary);
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    border-radius: 100px;
    margin-bottom: 24px;
    text-transform: uppercase;
    display: inline-block;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

/* Typography */
.title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 30%, #e2e8f0 70%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    font-weight: 300;
}

/* ==========================================================================
   Progress Bar Component
   ========================================================================== */
.progress-container {
    width: 100%;
    margin-bottom: 44px;
    max-width: 480px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.progress-label {
    color: var(--text-muted);
    text-transform: uppercase;
}

.progress-percentage {
    color: var(--color-secondary);
    font-weight: 600;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 100px;
    position: relative;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
    animation: fillProgress 1.8s ease-out forwards;
}

.progress-glow {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 20px;
    background: white;
    opacity: 0.6;
    filter: blur(4px);
}

@keyframes fillProgress {
    from { width: 0%; }
}

/* ==========================================================================
   Form Components
   ========================================================================== */
.form-wrapper {
    width: 100%;
    max-width: 480px;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 6px;
    transition: var(--transition-smooth);
    position: relative;
}

.input-group:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.05);
}

.email-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 12px 16px;
    width: 100%;
}

.email-input::placeholder {
    color: var(--text-muted);
}

.submit-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border: none;
    outline: none;
    color: white;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0 24px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-quick);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.submit-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.btn-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-arrow {
    transform: translateX(4px);
}

.form-message {
    font-size: 0.8rem;
    min-height: 20px;
    margin-top: 4px;
    transition: var(--transition-quick);
    text-align: left;
    padding-left: 12px;
}

.form-message.success {
    color: #34d399; /* Emerald */
}

.form-message.error {
    color: #f87171; /* Coral red */
}

/* ==========================================================================
   Footer Component
   ========================================================================== */
.footer {
    margin-top: 48px;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.8s 0.4s forwards ease;
}

.contact-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.email-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-quick);
    border-bottom: 1px dotted transparent;
}

.email-link:hover {
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Success Modal (Glassmorphic Pop-up)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 3, 7, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: rgba(20, 16, 32, 0.85);
    border: 1px solid var(--border-card-hover);
    border-radius: 24px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.success-icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: #34d399;
}

.success-check {
    width: 32px;
    height: 32px;
}

.modal h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 12px;
    color: white;
}

.modal p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 32px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-quick);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 600px) {
    .container {
        padding: 24px 16px;
    }
    .card {
        padding: 40px 24px;
        border-radius: 20px;
    }
    .title {
        font-size: 1.85rem;
    }
    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 32px;
    }
    .logo {
        max-width: 200px;
    }
    .input-group {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 12px;
    }
    .input-group:focus-within {
        box-shadow: none;
        background: transparent;
    }
    .email-input {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 14px;
        padding: 14px 16px;
    }
    .email-input:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.12);
    }
    .submit-btn {
        padding: 14px 24px;
        border-radius: 14px;
        width: 100%;
    }
}
