/* AWAKE Custom Styles v1.5.22 - Fixed counter movement, notification line break, and optimizations */

/* Import clean sans-serif font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    --color-primary-dark: #243E4F;
    --color-text-light: #F7F3EB;
    --color-light-beige: #F8E6CA;
    --color-light-blue: #90B9C5;
    --color-medium-blue: #3E6E8C;
    --color-green: #2DAD71;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Force clean typography on AWAKE page */
.awake-page-active * {
    font-family: var(--font-primary) !important;
}

/* Background and Particles Container */
#awake-particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-medium-blue) 50%, var(--color-light-blue) 100%);
    overflow: hidden;
}

/* Geometric Pattern - SVG Triangles */
.awake-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    filter: blur(2px);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgba(255,255,255,0.1);stop-opacity:1" /><stop offset="100%" style="stop-color:rgba(255,255,255,0.05);stop-opacity:1" /></linearGradient></defs><polygon points="600,150 750,450 450,450" fill="url(%23grad1)" /><polygon points="200,100 350,400 50,400" fill="rgba(255,255,255,0.08)" /><polygon points="1000,200 1150,500 850,500" fill="rgba(255,255,255,0.06)" /><polygon points="400,500 550,800 250,800" fill="rgba(255,255,255,0.07)" /><polygon points="800,400 950,700 650,700" fill="rgba(255,255,255,0.05)" /></svg>');
    background-size: cover;
    background-position: center;
    animation: float 20s ease-in-out infinite;
    z-index: 1;
}

/* Network overlay */
.awake-network-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    background-image: 
        linear-gradient(60deg, transparent 45%, rgba(255,255,255,0.03) 49%, rgba(255,255,255,0.03) 51%, transparent 55%),
        linear-gradient(-60deg, transparent 45%, rgba(255,255,255,0.03) 49%, rgba(255,255,255,0.03) 51%, transparent 55%);
    background-size: 300px 300px;
    animation: pulse 10s ease-in-out infinite;
    z-index: 2;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, -30px) scale(1.05); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

/* Canvas for particles */
#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

/* Force AWAKE page specific styles */
body.awake-page-active {
    background: transparent !important;
    position: relative;
}

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

/* Header styles - Fixed with proper spacing */
.awake-header {
    position: fixed;
    top: 30px; /* Moved down from 0 */
    left: 0;
    right: 0;
    background: transparent;
    padding: 20px;
    text-align: center;
    z-index: 100;
}

.awake-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: rgba(247, 243, 235, 0.9);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.awake-header p {
    margin: 5px 0 0 0;
    font-size: 0.875rem;
    color: rgba(247, 243, 235, 0.7);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Hide header on mobile */
@media (max-width: 768px) {
    .awake-header {
        display: none;
    }
}

/* Footer styles */
.awake-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    padding: 20px;
    text-align: center;
    z-index: 10;
}

.awake-footer p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(247, 243, 235, 0.6);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Header Subtitle */
.awake-header-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem) !important;
    font-weight: 300 !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    margin-bottom: 20px !important;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out;
}

/* Main Title */
.awake-main-title {
    font-size: clamp(5rem, 20vw, 12rem) !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 10px !important;
    text-shadow: 0 4px 30px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease-out 0.2s both;
    line-height: 0.9 !important;
}

/* Author Credit */
.awake-author-credit {
    font-size: clamp(1rem, 2vw, 1.3rem) !important;
    font-weight: 400 !important;
    opacity: 0.8;
    margin-bottom: 20px !important;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Tagline */
.awake-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem) !important;
    font-weight: 300 !important;
    opacity: 0.8;
    margin-bottom: 20px !important;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* CTA Text */
.awake-cta-text {
    font-size: 1.1rem !important;
    font-weight: 400 !important;
    margin-bottom: 30px !important;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.5s both;
}

/* AWAKE-specific form styles */
.awake-form-container {
    position: relative;
    margin: 0 auto;
    text-align: center;
    max-width: 800px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Waitlist container */
.awake-waitlist-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    gap: 15px; /* Consistent gap between elements */
}

/* Join Waitlist Button */
.awake-join-btn {
    background: var(--color-green) !important;
    color: var(--color-text-light) !important;
    border: none !important;
    padding: 20px 40px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 3px !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    white-space: nowrap;
    position: relative;
    overflow: visible;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 auto;
    min-width: 200px;
}

.awake-join-btn:hover {
    background: #25925f !important;
    transform: translateY(-2px);
}

.awake-join-btn:focus {
    outline: none !important;
}

.awake-join-btn.active {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
}

/* Form Fields Container */
.awake-form-fields {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 700px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
    padding: 30px;
    background: transparent;
    box-sizing: border-box;
}

.awake-form-fields.active {
    opacity: 1;
    visibility: visible;
}

/* Form row for inputs */
.awake-form-row {
    display: flex;
    gap: 15px;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
}

/* Form Inputs */
.awake-form-fields input[type="text"],
.awake-form-fields input[type="email"] {
    flex: 1;
    padding: 18px 20px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    border: 1px solid rgba(247, 243, 235, 0.2) !important;
    border-radius: 3px !important;
    background: rgba(247, 243, 235, 0.05) !important;
    color: var(--color-text-light) !important;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.awake-form-fields input::placeholder {
    color: rgba(247, 243, 235, 0.5);
}

.awake-form-fields input:focus {
    outline: none;
    border-color: var(--color-green) !important;
    background: rgba(247, 243, 235, 0.08) !important;
}

/* Submit Button */
.awake-submit-btn {
    padding: 18px 40px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 3px !important;
    background: var(--color-green) !important;
    color: var(--color-text-light) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
}

.awake-submit-btn:hover {
    background: #25925f !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(45, 173, 113, 0.5);
}

/* Terms of Service Text */
.awake-tos-text {
    margin-top: 15px;
    text-align: center;
    width: 100%;
}

.awake-tos-text p {
    font-size: 0.85rem;
    color: rgba(247, 243, 235, 0.7);
    line-height: 1.4;
    margin: 0;
}

.awake-tos-link {
    color: rgba(247, 243, 235, 0.9);
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.awake-tos-link:hover {
    color: rgba(247, 243, 235, 1);
    opacity: 1;
}

/* Bottom info - Soul Counter - Fixed dynamic positioning with more movement */
.awake-bottom-info {
    margin-top: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Move counter down when form is active - increased to 45px movement */
.awake-form-fields.active ~ .awake-bottom-info {
    margin-top: 60px; /* 45px additional movement (was 45px, now 60px) */
}

/* Waitlist Counter */
.awake-counter-wrapper {
    text-align: center;
    margin: 0;
    padding: 0;
}

.awake-counter {
    font-size: 18px !important;
    color: rgba(247, 243, 235, 0.7);
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.awake-counter-number {
    font-weight: bold;
    color: var(--color-green);
    font-size: 20px !important;
}

/* Success message */
.awake-success-message {
    display: none;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
    padding: 20px;
}

.awake-success-message.show {
    display: block;
}

.awake-success-message p {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    margin-bottom: 10px;
    color: var(--color-text-light) !important;
    font-family: 'Inter', sans-serif !important;
    letter-spacing: -0.02em;
}

.awake-success-message span {
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    color: var(--color-text-light) !important;
    font-family: 'Inter', sans-serif !important;
}

/* Error State */
.awake-form-fields input.error {
    border-color: #ff6b6b !important;
    animation: wiggle 0.5s ease;
}

@keyframes wiggle {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Toast Notifications */
.awake-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff6b6b;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.awake-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Success Popup */
.awake-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.awake-success-overlay.show {
    opacity: 1;
    visibility: visible;
}

.awake-success-popup {
    background: var(--color-primary-dark);
    border: 2px solid var(--color-green);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.awake-success-overlay.show .awake-success-popup {
    transform: scale(1);
}

.awake-success-popup h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--color-text-light);
}

.awake-success-popup p {
    font-size: 18px;
    margin-bottom: 15px;
    color: rgba(247, 243, 235, 0.9);
}

.awake-success-italic {
    font-style: italic !important;
    margin-top: 20px !important;
    opacity: 0.9;
}

/* Exit Popup */
.awake-exit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.awake-exit-popup.show {
    opacity: 1;
    visibility: visible;
}

.awake-exit-content {
    background: var(--color-primary-dark);
    border: 2px solid var(--color-green);
    border-radius: 8px;
    padding: 50px;
    text-align: center;
    max-width: 500px;
    position: relative;
}

.awake-exit-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: rgba(247, 243, 235, 0.6);
    cursor: pointer;
    transition: color 0.3s ease;
}

.awake-exit-close:hover {
    color: rgba(247, 243, 235, 1);
}

.awake-exit-content h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--color-text-light);
}

.awake-exit-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: rgba(247, 243, 235, 0.9);
}

/* Notification Box - Fixed for no line break and frosted glass */
.awake-notification-box {
    position: fixed;
    bottom: 30px;
    left: 30px; /* Changed from right to left */
    background: rgba(255, 255, 255, 0.08); /* Light frosted glass background */
    backdrop-filter: blur(12px); /* Frosted glass blur effect */
    -webkit-backdrop-filter: blur(12px); /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.18); /* Light border for glass effect */
    border-radius: 12px;
    padding: 18px 28px;
    max-width: 450px; /* Increased to prevent line breaks */
    width: auto; /* Auto width */
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); /* Soft shadow for depth */
}

.awake-notification-box.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.awake-notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.awake-notification-text {
    font-size: 14px;
    color: rgba(247, 243, 235, 0.95); /* Slightly brighter text for glass effect */
    line-height: 1.5;
    white-space: nowrap; /* Prevent line breaks */
}

.awake-notification-location {
    color: var(--color-green);
    font-weight: 600;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Maintain proper spacing on mobile */
    .awake-waitlist-container {
        padding: 10px 20px;
        gap: 15px;
    }
    
    .awake-join-btn {
        padding: 18px 35px !important;
        font-size: 1.05rem !important;
        width: 100% !important;
        max-width: 350px !important;
        position: relative !important;
        left: auto !important;
        transform: none !important;
        box-sizing: border-box;
    }
    
    /* Hide button when form is active */
    .awake-join-btn.active {
        display: none !important;
    }

    /* Fix form positioning - in document flow */
    .awake-form-fields {
        padding: 0;
        position: static !important;
        top: auto;
        left: auto;
        right: auto;
        transform: none !important;
        margin: 0;
        margin-bottom: 0 !important;
        width: 100%;
        max-width: 100%;
        z-index: 10;
        /* Hide completely when not active to prevent spacing issues */
        display: none;
    }
    
    /* Show form when active */
    .awake-form-fields.active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Counter movement on mobile - no additional movement */
    .awake-form-fields.active ~ .awake-bottom-info {
        margin-top: 15px !important; /* Keep original spacing on mobile */
    }

    /* KEEP BOTTOM INFO CLOSE */
    .awake-bottom-info {
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        margin-top: 15px !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        transition: margin-top 0.3s ease;
    }

    .awake-form-row {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .awake-form-fields input[type="text"],
    .awake-form-fields input[type="email"] {
        width: 100%;
        font-size: 16px !important;
        box-sizing: border-box;
    }
    
    /* Submit button same width as inputs */
    .awake-submit-btn {
        width: 100% !important;
        padding: 18px 30px !important;
        box-sizing: border-box;
        display: block !important;
        margin: 0 !important;
        white-space: normal !important;
        flex-shrink: 1 !important;
    }

    /* TOS text styling on mobile */
    .awake-tos-text {
        margin-top: 12px;
        margin-bottom: 0 !important;
        padding: 0;
    }

    .awake-tos-text p {
        font-size: 0.8rem;
        line-height: 1.3;
        opacity: 0.8;
    }

    /* Enhanced success message on mobile */
    .awake-success-message p {
        font-size: 1.6rem !important;
    }

    .awake-success-message span {
        font-size: 1.1rem !important;
    }

    /* Notification box on mobile - allow line break */
    .awake-notification-box {
        left: 20px; /* Keep on left but with smaller margin */
        right: 20px; /* Add right margin for balance */
        bottom: 20px; /* Closer to bottom on mobile */
        max-width: calc(100% - 40px); /* Full width minus margins */
        width: auto; /* Auto width */
        transform: translateY(20px);
    }

    .awake-notification-box.show {
        transform: translateY(0);
    }

    .awake-notification-content {
        justify-content: flex-start; /* Align content to start */
        text-align: left; /* Left align text */
        flex-direction: column; /* Stack vertically on mobile */
        gap: 8px;
        align-items: flex-start;
    }

    .awake-notification-text {
        font-size: 13px; /* Slightly smaller on mobile */
        white-space: normal; /* Allow line breaks on mobile */
        line-height: 1.4;
    }

    .awake-success-popup {
        padding: 30px;
        width: 95%;
    }

    .awake-success-popup h3 {
        font-size: 24px;
    }

    .awake-success-popup p {
        font-size: 16px;
    }

    .awake-exit-content {
        padding: 40px 30px;
        margin: 20px;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    /* Better button sizing on small screens */
    .awake-join-btn {
        padding: 16px 30px !important;
        font-size: 1rem !important;
        letter-spacing: 0.05em;
    }

    .awake-waitlist-container {
        padding: 10px 70px; /* Consistent padding on all mobile sizes */
    }

    .awake-form-container {
        padding: 0;
    }

    .awake-form-fields input[type="text"],
    .awake-form-fields input[type="email"] {
        padding: 14px 16px !important;
        font-size: 16px !important;
    }

    .awake-submit-btn {
        padding: 16px 25px !important;
        font-size: 0.95rem !important;
    }

    /* TOS text on small screens */
    .awake-tos-text p {
        font-size: 0.75rem;
    }

    /* Enhanced success message on small screens */
    .awake-success-message p {
        font-size: 1.4rem !important;
    }

    .awake-success-message span {
        font-size: 1rem !important;
    }

    /* Tighter spacing on small screens */
    .awake-bottom-info {
        margin-top: 15px !important;
        padding: 0 !important;
    }

    /* Notification box on small screens */
    .awake-notification-box {
        padding: 15px 20px;
    }
}

/* Testimonial Section */
.awake-testimonial-section {
    margin: 40px 0;
    text-align: center;
}

.awake-testimonial-header {
    margin-bottom: 30px;
}

.awake-stars {
    color: #FFD700;
    font-size: 24px;
    margin-bottom: 10px;
}

.awake-reviews-count {
    font-size: 14px;
    color: rgba(247, 243, 235, 0.7);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.awake-testimonial-slider {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.awake-testimonial-slide {
    display: none;
    padding: 20px;
}

.awake-testimonial-slide.active {
    display: block;
}

.awake-testimonial-text {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(247, 243, 235, 0.9);
    margin-bottom: 20px;
    font-style: italic;
}

.awake-testimonial-author {
    font-size: 16px;
    color: var(--color-green);
    font-weight: 600;
}

.awake-testimonial-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
}

.testimonial-prev,
.testimonial-next {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-light);
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--color-green);
}

/* Founder Section */
.awake-founder-section {
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 60px 0;
    padding: 40px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.awake-founder-image {
    flex-shrink: 0;
}

.awake-founder-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--color-green);
}

.awake-founder-quote {
    position: relative;
}

.quote-mark {
    position: absolute;
    top: -20px;
    left: -20px;
    font-size: 60px;
    color: var(--color-green);
    opacity: 0.3;
}

.awake-founder-quote p {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(247, 243, 235, 0.9);
    margin-bottom: 20px;
}

.quote-author {
    font-size: 18px;
    color: var(--color-green);
    font-weight: 600;
}

/* Honeypot field - v1.5.23 */
#awake_website {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ensure honeypot doesn't affect layout */
.awake-form-fields {
    position: relative;
}
