/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    /* Fix for mobile browsers */
    position: fixed;
    width: 100%;
}

body {
    overflow-y: hidden; /* Prevent vertical scrolling */
    /* Additional mobile fixes */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

/* Three.js Background Styles */
#three-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    transition: opacity 0.8s ease-in-out;
}



#three-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.three-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(circle at center, rgba(0,0,0,0) 65%, rgba(0,0,0,.5) 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #eee; /* Light text for dark background */
    background: #000; /* Black background to prevent white flash */
    height: 100%;
    max-height: 100%;
}

/* Landing page styles */
.landing {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    padding: 2rem 1rem;
    position: relative;
    z-index: 3;
}

.hero {
    text-align: center;
    max-width: 600px;
    color: white;
    position: relative;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    transition: opacity 0.5s ease;
    position: relative;
    z-index: 5;
}

/* Title container with logo */
.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.logo {
    height: 90px;
    width: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transition: filter 0.3s ease;
}

.logo:hover {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

.title-container h1 {
    margin-bottom: 0;
}

/* Mobile adjustments for logo */
@media (max-width: 768px) {
    .title-container {
        gap: 0.75rem;
    }
    
    .logo {
        height: 80px;
        width: auto;
    }
    
    .flame-logo {
        width: 36px;
        height: 45px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 480px) {
    .title-container {
        gap: 0.5rem;
    }
    
    .logo {
        height: 75px;
        width: auto;
    }
    
    .hero h1 {
        font-size: 2.3rem;
    }
}

.hero .subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Main tagline should be bold */
.hero .subtitle.main-tagline {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 1);
    margin-bottom: 1rem;
    transition: opacity 0.5s ease;
    position: relative;
    z-index: 5;
}

/* Launch announcement should be normal weight */
.hero .subtitle.launch-announcement {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(240, 240, 240, 1.0);
    margin-bottom: 0.5rem;
    transition: opacity 0.5s ease;
    position: relative;
    z-index: 5;
}



/* Instagram Reel-style floating poetic text */
.floating-poetic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 4;
    transition: opacity 0.5s ease;
}

/* Fade background to black on success */
body.success-state #three-container {
    opacity: 0;
}

/* Hide both subtitles in success state */
body.success-state .hero .subtitle.main-tagline {
    opacity: 0;
}

body.success-state .hero .subtitle.launch-announcement {
    opacity: 0;
}

/* Hide veins after successful form submission */
body.success-state .form-spacer::before {
    opacity: 0 !important;
}

/* Hide poetic text after successful form submission */
body.success-state .floating-poetic-overlay {
    opacity: 0;
}

.floating-line {
    position: absolute;
    font-family: 'Caveat', 'Kalam', 'Dancing Script', cursive;
    font-size: 0.91875rem;
    font-weight: 400;
    color: rgba(255,255,255,0.32625);
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    line-height: 1.3;
    text-align: left;
    font-style: normal;
}

/* Different positions for each line - only above and below central content */
#floating-line-1 {
    top: 15%;
    left: 20%;
    transform-origin: left center;
}

#floating-line-2 {
    top: 18%;
    right: 25%;
    text-align: right;
    transform-origin: right center;
}

#floating-line-3 {
    top: 21%;
    left: 30%;
    transform-origin: left center;
}

#floating-line-4 {
    top: 87%;
    left: 20%;
    text-align: right;
    transform-origin: right center;
}

#floating-line-5 {
    top: 89%;
    right: 30%;
    transform-origin: left center;
}

#floating-line-6 {
    top: 91%;
    left: 35%;
    text-align: right;
    transform-origin: right center;
}

#floating-line-7 {
    top: 93%;
    right: 20%;
    transform-origin: left center;
}



/* Optimized word-by-word animation */
@keyframes wordAppear {
    0% { 
        opacity: 0;
        transform: translateY(5px);
    }
    100% { 
        opacity: 1;
        transform: translateY(0);
    }
}

.poetic-word {
    opacity: 0;
    display: inline-block;
    animation: wordAppear 0.4s ease-out forwards;
    margin-right: 0.3em;
}

.floating-line.line-active {
    opacity: 1;
    transform: scale(1);
}

.floating-line.line-active .poetic-word {
    animation-play-state: running;
}

.floating-line:not(.line-active) .poetic-word {
    opacity: 0;
    animation: none;
}

/* Tablet adjustments */
@media (max-width: 1024px) {
    .logo {
        height: 85px;
        width: auto;
    }
    
    .hero h1 {
        font-size: 3.2rem;
    }
    
    #floating-line-1 {
        top: 8%;
        left: 18%;
    }
    
    #floating-line-2 {
        top: 11%;
        right: 22%;
    }
    
    #floating-line-3 {
        top: 14%;
        left: 25%;
    }
    
    #floating-line-4 {
        top: 82%;
        left: 20%;
    }
    
    #floating-line-5 {
        top: 84%;
        right: 25%;
    }
    
    #floating-line-6 {
        top: 86%;
        left: 30%;
    }
    
    #floating-line-7 {
        top: 88%;
        right: 20%;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    html, body {
        height: 100%;
        position: fixed;
        overflow: hidden;
    }
    
    .landing {
        padding: 1.5rem 1rem;
    }
    
    .floating-line {
        font-size: 1.3125rem;
        white-space: nowrap;
    }
    
    #floating-line-1 {
        top: 5%;
        left: 15%;
    }
    
    #floating-line-2 {
        top: 8%;
        right: 20%;
    }
    
    #floating-line-3 {
        top: 11%;
        left: 25%;
    }
    
    #floating-line-4 {
        top: 78%;
        left: 18%;
        font-size: 1rem;
    }
    
    #floating-line-5 {
        top: 80%;
        right: 22%;
    }
    
    #floating-line-6 {
        top: 82%;
        left: 28%;
    }
    
    #floating-line-7 {
        top: 84%;
        right: 20%;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    body {
        overflow: hidden; /* Ensure no scrolling on small screens */
        position: fixed;
        height: 100%;
    }
    
    .landing {
        padding: 1rem 0.5rem;
        height: 100%;
        max-height: 100%;
    }
    
    .floating-line {
        font-size: 0.9rem;
    }
    
    #floating-line-1 {
        top: 3%;
        left: 12%;
    }
    
    #floating-line-2 {
        top: 6%;
        right: 15%;
    }
    
    #floating-line-3 {
        top: 9%;
        left: 20%;
    }
    
    #floating-line-4 {
        top: 76%;
        left: 15%;
        font-size: 0.9rem;
    }
    
    #floating-line-5 {
        top: 78%;
        right: 18%;
    }
    
    #floating-line-6 {
        top: 80%;
        left: 25%;
    }
    
    #floating-line-7 {
        top: 82%;
        right: 18%;
    }
}







.cta-button {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 3;
    min-width: 200px; /* Fixed width to prevent size changes */
    height: 56px; /* Fixed height to prevent size changes */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cta-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.cta-button:active:not(:disabled) {
    transform: translateY(0);
}

.cta-button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Loading spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none; /* Hidden by default */
    position: absolute;
}

/* Button text */
.button-text {
    display: inline-block;
}

/* Loading state - show spinner, hide text */
.cta-button.loading .loading-spinner {
    display: inline-block;
}

.cta-button.loading .button-text {
    display: none;
}

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

/* Form container to maintain space */
.form-spacer {
    height: 8.1rem;
    margin: 1.5rem 0 2rem 0;
    position: relative;
}

/* Heartbeat pulse animation */
@keyframes heartbeat {
    0%, 100% { opacity: 0.27; }
    50% { opacity: 0.45; }
}

/* Vein decoration behind form elements */
.form-spacer::before {
    content: '';
    position: absolute;
    top: calc(50% - 45px);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    height: 155px;
    background: url('images/veins/veins_9.png') no-repeat center;
    background-size: contain;
    opacity: 0.27;
    filter: brightness(0) invert(1);
    z-index: 4;
    pointer-events: none;
    transition: opacity 0.3s ease;
    animation: heartbeat 4.5s ease-in-out infinite;
}

/* Pulsing glow animation for focused state */
@keyframes veinGlow {
    0%, 100% { 
        filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.4));
    }
    50% { 
        filter: brightness(0) invert(1) drop-shadow(0 0 12px rgba(255, 255, 255, 1)) drop-shadow(0 0 24px rgba(255, 255, 255, 0.6));
    }
}

/* Fade vein to bright white with glow when email input is focused */
.form-inputs:focus-within ~ .form-spacer::before,
.form-spacer:focus-within::before {
    opacity: 0.9;
    animation: veinGlow 2s ease-in-out infinite;
}

/* Waitlist Form */
.waitlist-form {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 5;
}

.form-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    position: relative; /* For error overlay positioning */
    z-index: 5;
}

.form-inputs input,
.form-inputs select {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    z-index: 6; /* Ensure input appears above veins on Safari */
}





.form-inputs input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-inputs input:focus,
.form-inputs select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.form-inputs input.error {
    border-color: rgba(255, 68, 68, 0.7);
    background: rgba(255, 68, 68, 0.05);
    transition: all 0.3s ease;
}

.form-inputs input.error:focus {
    border-color: rgba(255, 68, 68, 0.9);
    background: rgba(255, 68, 68, 0.1);
}

.form-inputs select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-inputs select option {
    background: #333;
    color: white;
}

/* Error callout box below the email input */
.error-overlay {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 180px;
    z-index: 10;
    color: #ff4444;
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid rgba(255, 68, 68, 0.5);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    word-break: break-word;
}

/* Triangle pointer using CSS borders - pointing up */
.error-overlay::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 68, 68, 0.5);
}

.error-overlay::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(255, 68, 68, 0.2);
}

.error-overlay.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Success message */
.success-message {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInSuccess 0.9s ease-in-out 0.3s forwards; /* Reduced delay */
    z-index: 10;
}

@keyframes fadeInSuccess {
    0% { 
        opacity: 0;
    }
    100% { 
        opacity: 1;
    }
}

.success-message p {
    margin: 0;
}

/* Blue to purple gradient for bold text */
b, strong {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Yellow to orange gradient for success message bold text */
.success-message b,
.success-message strong {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Responsive design */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .form-inputs {
        max-width: 280px;
    }
    
    .form-inputs input,
    .form-inputs select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .tagline {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .cta-button {
        font-size: 1.2rem;
        padding: 1.25rem 2.5rem;
    }
}

 