/* --- CSS Variables --- */
:root {
    --bg-color: #0c0c1a;
    --surface-color: #1a1a2e;
    --primary-color: #6a0dad; /* Purple */
    --secondary-color: #007bff; /* Blue */
    --accent-gradient: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0c0;
    --font-family: 'Poppins', sans-serif;
}

/* --- Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Skip Navigation Link --- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    text-align: center;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* --- Screen Reader Only --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Hero Section --- */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background-image: 
        radial-gradient(at 40% 20%, rgba(106, 13, 173, 0.3) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(0, 123, 255, 0.3) 0px, transparent 50%),
        radial-gradient(at 10% 50%, rgba(106, 13, 173, 0.2) 0px, transparent 50%),
        radial-gradient(at 80% 10%, rgba(0, 123, 255, 0.2) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(106, 13, 173, 0.2) 0px, transparent 50%);
    background-size: cover;
    background-position: center;
    padding: 2rem 1rem;
    overflow: hidden;
}

/* Particle/Neuron Canvas */
.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Neon Geometry Canvas */
.neon-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}


.hero::before {
    background-image: url('../images/conny-schneider-pREq0ns_p_E-unsplash.jpg');
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.05; /* Subtle overlay */
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 10; /* Increased to ensure content stays above shapes */
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 10px 30px rgba(106, 13, 173, 0.4)) brightness(1.1) contrast(1.05);
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 10; /* Increased to match hero-content */
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    text-align: center;
    width: 100%;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto 2rem;
    line-height: 2.5;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.7s forwards;
    text-align: center;
}

.rotating-text {
    top: -0.5em;
    display: inline-block;
    position: relative;
    min-width: 220px;
    vertical-align: middle;
    line-height: inherit;
    height: 1.8em; /* Increased to accommodate 1.5x font size */
}

.rotating-text span {
    display: block;
    opacity: 0;
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%) translateY(100%);
    white-space: nowrap;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    line-height: inherit;
    animation: rotateTextVertical 35s infinite;
    width: max-content;
    font-size: 1.2em;
}

.rotating-text span:nth-child(1) { animation-delay: 0s; }
.rotating-text span:nth-child(2) { animation-delay: 4.5s; }
.rotating-text span:nth-child(3) { animation-delay: 9s; }
.rotating-text span:nth-child(4) { animation-delay: 13.5s; }
.rotating-text span:nth-child(5) { animation-delay: 18s; }
.rotating-text span:nth-child(6) { animation-delay: 22.5s; }
.rotating-text span:nth-child(7) { animation-delay: 27s; }

@keyframes rotateTextVertical {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(100%);
    }
    1% {
        opacity: 0;
        transform: translateX(-50%) translateY(100%);
    }
    1.5% {
        opacity: 1;
        transform: translateX(-50%) translateY(50%);
    }
    2% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    7% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    7.5% {
        opacity: 0;
        transform: translateX(-50%) translateY(0);
    }
    8% {
        opacity: 0;
        transform: translateX(-50%) translateY(-100%);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-100%);
    }
}

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

/* --- CTA Form --- */
.cta-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.9s forwards;
    position: relative;
    z-index: 10; /* Ensure form stays above shapes */
}

.email-input {
    padding: 1rem 1.5rem;
    width: 100%;
    max-width: 350px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

.email-input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(106, 13, 173, 0.3);
}

.cta-button {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    background: var(--accent-gradient);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(106, 13, 173, 0.4);
    position: relative;
    overflow: hidden;
    font-family: var(--font-family);
}

.cta-button:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3), 0 5px 15px rgba(106, 13, 173, 0.4);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(106, 13, 173, 0.6);
}

.form-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-height: 20px;
}

.success-message {
    color: #4caf50; /* Green for success */
    font-weight: 600;
}

/* --- Features Teaser Section --- */
.features {
    padding: 6rem 0;
    text-align: center;
    display: none; /* Temporarily hidden */
}

.features h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

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

.feature-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border-color: rgba(106, 13, 173, 0.5);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-card p {
    color: var(--text-secondary);
}

/* --- Footer CTA --- */
.footer-cta {
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.footer-cta .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-cta p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.footer-cta a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-cta a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-cta a:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- Privacy Policy Link --- */
.privacy-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.privacy-link a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-link a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.privacy-link a:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- Responsive Design --- */
@media (max-width: 767px) {
    .logo {
        width: 160px;
    }
    
    .hero-subtitle {
        max-width: 500px;
        line-height: 1.8;
    }
    
    .cta-form {
        flex-direction: column;
        align-items: center;
        width: 90%;
        max-width: none;
    }

    .email-input, .cta-button {
        width: 100%;
        max-width: none;
    }
}

/* Small devices - horizontal carousel effect (for < 600px) */
@media (max-width: 767px) {
    .rotating-text {
        clear: both;
        display: block;
        top: 0px;
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
        height: 2.8em; /* Increased to accommodate 1.5x font size */
        position: relative;
    }
    
    .rotating-text span {
        position: absolute;
        left: 50%;
        top: 0;
        transform: translateX(calc(50vw + 100%));
        white-space: nowrap;
        opacity: 0;
        animation: rotateTextHorizontal 70s infinite;
        animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
        pointer-events: none;
        font-size: 1.5em;
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-weight: 600;
    }
    
    .rotating-text span:nth-child(1) { 
        animation-delay: 0s; 
    }
    .rotating-text span:nth-child(2) { 
        animation-delay: 10s; 
    }
    .rotating-text span:nth-child(3) { 
        animation-delay: 20s; 
    }
    .rotating-text span:nth-child(4) { 
        animation-delay: 30s; 
    }
    .rotating-text span:nth-child(5) { 
        animation-delay: 40s; 
    }
    .rotating-text span:nth-child(6) { 
        animation-delay: 50s; 
    }
    .rotating-text span:nth-child(7) { 
        animation-delay: 60s; 
    }
    
    @keyframes rotateTextHorizontal {
        0% {
            opacity: 0;
            transform: translateX(calc(50vw + 100%));
        }
        1.4% {
            opacity: 1;
            transform: translateX(calc(50vw + 100%));
        }
        2.1% {
            opacity: 1;
            transform: translateX(-50%);
        }
        9.3% {
            opacity: 1;
            transform: translateX(-50%);
        }
        12.9% {
            opacity: 1;
            transform: translateX(calc(-50vw - 100%));
        }
        14.3%, 100% {
            opacity: 0;
            transform: translateX(calc(-50vw - 100%));
        }
    }
}

/* Ensure vertical animation works properly for >= 768px */
@media (min-width: 768px) {
    .rotating-text {
        display: inline-block;
        position: relative;
        min-width: 220px;
        vertical-align: baseline;
        line-height: inherit;
        height: 1.8em; /* Increased to accommodate 1.5x font size */
    }
    
    .rotating-text span {
        display: block;
        opacity: 0;
        position: absolute;
        left: 50%;
        top: 0;
        transform: translateX(-50%) translateY(100%);
        white-space: nowrap;
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-weight: 600;
        line-height: inherit;
        animation: rotateTextVertical 35s infinite;
        width: max-content;
        font-size: 1.5em;
    }
    
    .rotating-text span:nth-child(1) { animation-delay: 0s; }
    .rotating-text span:nth-child(2) { animation-delay: 4.5s; }
    .rotating-text span:nth-child(3) { animation-delay: 9s; }
    .rotating-text span:nth-child(4) { animation-delay: 13.5s; }
    .rotating-text span:nth-child(5) { animation-delay: 18s; }
    .rotating-text span:nth-child(6) { animation-delay: 22.5s; }
    .rotating-text span:nth-child(7) { animation-delay: 27s; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .logo {
        width: 200px;
    }
}

@media (min-width: 1024px) {
    .logo {
        width: 280px;
    }
    
    .cta-form {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
    }
    
    .email-input {
        width: auto;
        min-width: 300px;
        max-width: 400px;
        flex: 0 1 auto;
    }
    
    .cta-button {
        width: auto;
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

