:root {
    --primary: #8a2be2;
    --primary-hover: #b062f8;
    --text-main: #ffffff;
    --text-muted: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: #050510;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Fixed Background */
.background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('back.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    /* Optional: subtle parallax or overlay */
    /* background-attachment: fixed; -- disabled: broken on iOS Safari mobile */
}

.background-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(5, 5, 16, 0.3) 0%, rgba(5, 5, 16, 0.8) 100%);
    z-index: 0;
}

/* Layout */
.container {
    width: 100%;
    min-height: 200vh;
    /* Make document scrollable */
    display: flex;
    flex-direction: column;
}

/* ------------- Hero Section ------------- */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
    gap: 2rem;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 4rem;
    max-width: 800px;
    text-align: center;
    box-shadow: var(--glass-shadow);
    transform: translateY(0);
    animation: floatIn 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-logo {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.1));
}

.glass-card--logo {
    background: rgba(255, 255, 255, 0.40);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.1), var(--glass-shadow);
}

.text-fill {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons / Links */
.nav-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
}

.nav-btn.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.nav-btn.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.4);
}

/* Scroll Prompt */
.scroll-prompt {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    animation: breathe 3s infinite ease-in-out;
}

.scroll-text {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-mouse {
    width: 26px;
    height: 42px;
    border: 2px solid #fff;
    border-radius: 20px;
    position: relative;
    display: flex;
    justify-content: center;
}

.wheel {
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    margin-top: 6px;
    animation: scrollWheel 2s infinite ease;
}

@keyframes scrollWheel {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(12px);
        opacity: 0;
    }
}

@keyframes breathe {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

/* ------------- Agent Section Trigger ------------- */
.agent-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.trigger-space {
    width: 100%;
    height: 50vh;
}

/* Fixed corner agent */
.agent-graphic {
    position: fixed;
    bottom: -50px;
    right: -50px;
    width: 30vw;
    max-width: 380px;
    min-width: 200px;
    height: auto;
    z-index: 100;
    pointer-events: none;
    /* Let clicks pass through */

    /* Remove any frames */
    border: none;
    background: transparent;
    box-shadow: none;
    outline: none;
    /* Optional slight drop shadow for blending */
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.4));

    /* Animation initial states */
    opacity: 0;
    transform: translate(30px, 30px) scale(0.9);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Class added when scrolled into view */
.agent-graphic.revealed {
    opacity: 1;
    transform: translate(0, 0) scale(1);
    bottom: 0px;
    /* Snug in the corner */
    right: 0px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 1rem;
        justify-content: flex-start;
        padding-top: 2rem;
    }

    .glass-card {
        padding: 1.5rem 1rem;
        margin: 0.5rem 0;
    }

    .main-logo {
        max-height: 80px;
        margin-bottom: 1rem;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .nav-btn {
        width: 100%;
    }
}