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

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-blue);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Focus Styles for Keyboard Navigation */
*:focus-visible {
    outline: 3px solid #6FB3FF;
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 3px solid #6FB3FF;
    outline-offset: 3px;
}

/* High contrast focus for form elements */
.newsletter-form-input:focus-visible {
    outline: 3px solid #6FB3FF;
    outline-offset: 2px;
    border: 2px solid #6FB3FF;
}

:root {
    --primary-dark: #000000;
    --secondary-dark: #0a0a0a;
    --accent-blue: #4a9eff;
    --accent-purple: #9f7aea;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85); /* Improved contrast from 0.7 to 0.85 */
    --text-muted: rgba(255, 255, 255, 0.65); /* Improved contrast from 0.5 to 0.65 */
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.05);
    --max-width: 1200px;
    --focus-color: #6FB3FF; /* High contrast focus color */
    --error-color: #FF6B6B; /* High contrast error color */
    --success-color: #51CF66; /* High contrast success color */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-dark);
    overflow-x: hidden;
    font-weight: 300;
}

/* Animated Gradient Background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, #000000 50%);
    z-index: -2;
}

/* Breathing Animation Circles */
.breathing-circles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.1) 0%, transparent 70%);
    animation: breathe 16s infinite ease-in-out;
}

.circle-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.circle-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    animation-delay: 4s;
}

.circle-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 8s;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.1;
    }
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Glass morphism navigation bar */
nav {
    margin: 20px;
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 0.75rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Scroll effect - make nav more solid when scrolling */
header.scrolled nav {
    background: rgba(10, 10, 10, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0;
}

.logo {
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary) 0%, rgba(255, 255, 255, 0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Add logo icon/symbol */
.logo::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    border-radius: 8px;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9); /* Improved contrast from 0.75 to 0.9 */
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.nav-links a:focus-visible {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* CTA button style for last nav item */
.nav-links li:last-child a {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
}

.nav-links li:last-child a:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(74, 158, 255, 0.3);
}

/* Main Content */
main {
    padding-top: 80px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 200;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

/* Breathing Preview Animation */
.breathing-preview {
    margin: 3rem 0;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.preview-circle {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.05) 0%, transparent 70%);
    border: 1px solid rgba(74, 158, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 4s linear;
}

.phase-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.count {
    font-size: 3rem;
    font-weight: 100;
    color: var(--text-primary);
}

/* Breathing animation controlled by JavaScript */

/* Hero Waitlist */
.hero-waitlist {
    margin-top: 3rem;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.hero-waitlist .form-container {
    margin-bottom: 1.5rem;
}

.hero-waitlist .form-group {
    max-width: 500px;
    margin: 0 auto;
}

.coming-soon {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Features Section */
.features {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 200;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: -1px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.5), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.feature-card:hover::before {
    transform: translateX(100%);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 158, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.2) 0%, rgba(159, 122, 234, 0.2) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-blue);
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* How It Works Section */
.how-it-works {
    padding: 6rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(74, 158, 255, 0.02) 50%, transparent 100%);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 200;
    color: var(--accent-blue);
}

.step h4 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Waitlist Section */
.waitlist {
    padding: 6rem 0;
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.waitlist-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.waitlist h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 200;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.waitlist > .container > .waitlist-content > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Form Styles */
.form-container {
    margin-bottom: 3rem;
}

.newsletter-form {
    width: 100%;
}

.form-group {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.form-group input[type="email"] {
    flex: 1;
    padding: 16px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input[type="email"]::placeholder {
    color: var(--text-muted);
}

.form-group input[type="email"]:focus {
    border-color: rgba(74, 158, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.submit-button {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.4);
}

.submit-button svg {
    transition: transform 0.3s ease;
}

.submit-button:hover svg {
    transform: translateX(4px);
}

.form-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary); /* Improved contrast */
    text-align: center;
}

/* Form Messages - Improved accessibility */
.form-message {
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    text-align: center;
    animation: slideIn 0.3s ease;
    font-weight: 500;
}

.form-message.success {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15) 0%, rgba(34, 197, 94, 0.15) 100%);
    border: 2px solid rgba(74, 222, 128, 0.4);
    color: var(--success-color);
}

.form-message.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: var(--error-color);
}

/* Form validation states */
.newsletter-form-input:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

.newsletter-form-input:valid:not(:placeholder-shown) {
    border-color: var(--success-color);
    background: rgba(74, 222, 128, 0.05);
}

/* Form labels for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.submit-button.loading,
.newsletter-loading-button {
    opacity: 0.7;
    cursor: wait;
}

/* Newsletter form specific styles */
.newsletter-form-input {
    flex: 1;
    padding: 16px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

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

.newsletter-form-input:focus {
    border-color: rgba(74, 158, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-back-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 8px 16px;
    transition: color 0.3s ease;
}

.newsletter-back-button:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.newsletter-success p,
.newsletter-error p {
    margin: 0;
}

/* Benefits List */
.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: left;
}

.benefit svg {
    color: #4ade80;
    flex-shrink: 0;
}

.benefit span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-brand {
    text-align: left;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 200;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        margin: 16px;
        padding: 0.6rem 1.5rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo::before {
        width: 28px;
        height: 28px;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .nav-links li:last-child a {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .form-group input[type="email"] {
        width: 100%;
    }
    
    .submit-button {
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    nav {
        margin: 12px;
        padding: 0.5rem 1rem;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .logo::before {
        width: 24px;
        height: 24px;
    }
    
    .nav-links {
        gap: 0.3rem;
    }
    
    .nav-links a {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
    
    .nav-links li:last-child a {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .preview-circle {
        width: 160px;
        height: 160px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Loading Animation for Form */
.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-button.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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