/* sim-ai.com - Frutiger Aero Glassmorphic Simulation */
/* Palette: #0a1628 #1a3a5c #4fc3f7 #26a69a #66bb6a #1a2744 #e0eaff */

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: #0a1628;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: #e0eaff;
    background: linear-gradient(180deg, #0a1628 0%, #1a3a5c 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== Sky Blobs ===== */
#sky-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.sky-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.blob-blue {
    width: 500px;
    height: 500px;
    background: #4fc3f7;
    opacity: 0.1;
    top: 10%;
    left: 20%;
    animation: blobDrift1 20s ease-in-out infinite;
}

.blob-teal {
    width: 400px;
    height: 400px;
    background: #26a69a;
    opacity: 0.08;
    top: 50%;
    right: 10%;
    animation: blobDrift2 25s ease-in-out infinite;
}

.blob-green {
    width: 600px;
    height: 600px;
    background: #66bb6a;
    opacity: 0.06;
    bottom: 10%;
    left: 40%;
    animation: blobDrift3 30s ease-in-out infinite;
}

@keyframes blobDrift1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(80px, 40px); }
}

@keyframes blobDrift2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-60px, -50px); }
}

@keyframes blobDrift3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, -30px); }
}

/* ===== Hero ===== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 60px 5vw;
}

#hero-left {
    flex: 0 0 55%;
    padding-right: 40px;
}

#logotype {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(64px, 10vw, 96px);
    letter-spacing: -0.02em;
    color: #e0eaff;
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.logo-text.visible {
    opacity: 1;
}

.logo-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-20deg);
}

.logo-shine.animate {
    animation: shineSwipe 1s ease-in-out 0.6s forwards;
}

@keyframes shineSwipe {
    0% { left: -100%; }
    100% { left: 200%; }
}

#init-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    color: #e0eaff;
    opacity: 0;
    margin-top: 16px;
    transition: opacity 0.6s ease 1s;
}

#init-text.visible {
    opacity: 0.7;
}

#hero-right {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gradient-mesh {
    position: relative;
    width: 350px;
    height: 350px;
}

.mesh-blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
}

.mesh-1 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #4fc3f7 0%, transparent 70%);
    top: 20%;
    left: 10%;
    animation: meshMove1 8s ease-in-out infinite;
}

.mesh-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #26a69a 0%, transparent 70%);
    top: 40%;
    left: 40%;
    animation: meshMove2 10s ease-in-out infinite;
}

.mesh-3 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, #66bb6a 0%, transparent 70%);
    top: 10%;
    left: 50%;
    animation: meshMove3 12s ease-in-out infinite;
}

@keyframes meshMove1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -20px); }
    66% { transform: translate(-20px, 30px); }
}

@keyframes meshMove2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-25px, 20px); }
    66% { transform: translate(25px, -15px); }
}

@keyframes meshMove3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(20px, 25px); }
    66% { transform: translate(-30px, -10px); }
}

/* ===== Dashboard (Bento) ===== */
#dashboard {
    position: relative;
    z-index: 1;
    padding: 40px 5vw;
    max-width: 1100px;
    margin: 0 auto;
}

.bento-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.bento-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.bento-cell {
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 28px;
    will-change: backdrop-filter;
    transition: background 0.3s ease;
}

.bento-cell:hover {
    background: rgba(255, 255, 255, 0.22);
}

.cell-60 { flex: 0 0 calc(60% - 10px); }
.cell-40 { flex: 0 0 calc(40% - 10px); }
.cell-33 { flex: 1; }

.cell-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #e0eaff;
    margin-bottom: 12px;
}

.cell-body {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #e0eaff;
    opacity: 0.85;
}

.cell-body-sm {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #e0eaff;
    opacity: 0.7;
}

.cell-counter {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 36px;
    font-variant-numeric: tabular-nums;
    color: #4fc3f7;
    margin-bottom: 4px;
}

.cell-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #e0eaff;
    opacity: 0.6;
}

/* ===== Sparklines ===== */
.sparkline-container {
    margin: 16px 0 8px;
}

.sparkline {
    width: 100%;
    max-width: 200px;
    height: 30px;
}

.spark-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 0.8s ease;
}

.bento-row.visible .spark-line {
    stroke-dashoffset: 0;
}

/* ===== Emergence ===== */
#emergence {
    position: relative;
    z-index: 1;
    padding: 120px 5vw;
    display: flex;
    justify-content: center;
}

#emergence-content {
    max-width: 640px;
    text-align: center;
}

.emergence-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: #e0eaff;
    margin-bottom: 32px;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 0.5s ease, filter 0.5s ease;
}

.emergence-text.visible {
    opacity: 0.9;
    filter: blur(0);
}

.emergence-final {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #4fc3f7;
    margin-top: 48px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.emergence-final.visible {
    opacity: 1;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .sky-blob {
        animation: none;
    }

    .mesh-blob {
        animation: none;
    }

    .logo-text {
        opacity: 1;
        transition: none;
    }

    .logo-shine {
        display: none;
    }

    #init-text {
        opacity: 0.7;
        transition: none;
    }

    .bento-row {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .spark-line {
        stroke-dashoffset: 0;
        transition: none;
    }

    .emergence-text {
        opacity: 0.9;
        filter: none;
        transition: none;
    }

    .emergence-final {
        opacity: 1;
        transition: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    #hero {
        flex-direction: column;
        text-align: center;
    }

    #hero-left {
        flex: none;
        padding-right: 0;
        margin-bottom: 40px;
    }

    #hero-right {
        flex: none;
    }

    .bento-row {
        flex-direction: column;
    }

    .cell-60, .cell-40, .cell-33 {
        flex: none;
        width: 100%;
    }

    #gradient-mesh {
        width: 250px;
        height: 250px;
    }
}
