/* sim-ai.xyz - Cinematic Observatory */

:root {
    --deep-cosmos: #0A0A19;
    --aurora-teal: #00D4AA;
    --aurora-violet: #7B2FBE;
    --aurora-rose: #FF6B9D;
    --midnight-glass: rgba(10, 10, 25, 0.7);
    --pale-silver: #C8CCD4;
    --near-white: #EDF0F5;
    --nebula-blue: #1A1A3E;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep-cosmos);
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(0, 212, 170, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(123, 47, 190, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(255, 107, 157, 0.10) 0%, transparent 40%),
        linear-gradient(180deg, #0A0A19 0%, #0D0D2A 100%);
    background-size: 200% 200%, 200% 200%, 200% 200%, 100% 100%;
    animation: aurora-shift 45s ease-in-out infinite;
    font-family: 'Inter', sans-serif;
    color: var(--pale-silver);
    overflow-x: hidden;
}

@keyframes aurora-shift {
    0% { background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%; }
    33% { background-position: 30% 60%, 70% 30%, 20% 80%, 0% 0%; }
    66% { background-position: 70% 30%, 30% 70%, 80% 20%, 0% 0%; }
    100% { background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%; }
}

/* Top rule */
.top-rule {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--aurora-teal);
    opacity: 0.3;
    z-index: 100;
}

/* Modules */
.module {
    margin: 5vh 4vw;
    position: relative;
}

.module-inner {
    background: var(--midnight-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 212, 170, 0.1);
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 60px;
}

/* Spring reveal animation */
.module {
    opacity: 0;
    transform: translateY(40px);
    transition: transform 700ms cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 500ms ease-out;
}

.module.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Module 1: Hero */
.module-hero {
    margin-top: 0;
    padding-top: 10vh;
}

.module-hero .module-inner {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
}

.aurora-mesh-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(0, 212, 170, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(123, 47, 190, 0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 70%, rgba(255, 107, 157, 0.08) 0%, transparent 40%);
    background-size: 200% 200%;
    animation: aurora-shift 45s ease-in-out infinite reverse;
    z-index: 0;
    pointer-events: none;
}

.hero-domain {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.2em;
    color: var(--near-white);
    position: relative;
    z-index: 1;
    line-height: 1.1;
}

.hero-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.75;
    color: var(--pale-silver);
    max-width: 600px;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

/* Module 2: Primer */
.module-primer {
    width: 84vw;
    margin-left: auto;
    margin-right: auto;
}

.primer-grid {
    display: flex;
    gap: 4vw;
}

.primer-block {
    background: var(--midnight-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 212, 170, 0.15);
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 48px;
}

.primer-text {
    flex: 0 0 40%;
}

.primer-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.module-headline {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--near-white);
    margin-bottom: 1.5rem;
}

.primer-text p {
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.gradient-mesh-svg {
    width: 100%;
    max-width: 400px;
}

.mesh-rotate {
    transform-origin: 200px 150px;
}

.mesh-rotate.r1 { animation: rotate-slow 60s linear infinite; }
.mesh-rotate.r2 { animation: rotate-slow 45s linear infinite reverse; }
.mesh-rotate.r3 { animation: rotate-slow 75s linear infinite; }

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

/* Module 3: Architecture */
.module-architecture {
    width: 76vw;
    margin-left: auto;
    margin-right: auto;
}

.steps-grid {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-top: 2rem;
}

.step {
    flex: 1;
    padding: 20px;
    opacity: 0;
    transform: translateY(40px);
    transition: transform 700ms cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 500ms ease-out;
}

.module-architecture.revealed .step {
    opacity: 1;
    transform: translateY(0);
}

.module-architecture.revealed .step:nth-child(1) { transition-delay: 0ms; }
.module-architecture.revealed .step:nth-child(3) { transition-delay: 120ms; }
.module-architecture.revealed .step:nth-child(5) { transition-delay: 240ms; }
.module-architecture.revealed .step:nth-child(7) { transition-delay: 360ms; }

.step-divider {
    width: 1px;
    background: var(--aurora-teal);
    opacity: 0.3;
    animation: pulse-divider 3s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-divider {
    0%, 100% { transform: scaleY(1); opacity: 0.3; }
    50% { transform: scaleY(1.05); opacity: 0.5; }
}

.step-number {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(2rem, 3vw, 3rem);
    color: var(--aurora-teal);
    display: block;
    margin-bottom: 0.5rem;
}

.step-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--near-white);
    margin-bottom: 0.75rem;
}

.step-desc {
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    line-height: 1.7;
}

/* Module 4: Variables */
.module-variables {
    width: 84vw;
    margin-left: auto;
    margin-right: auto;
}

.variables-layout {
    display: flex;
    gap: 4vw;
    align-items: flex-start;
}

.var-block {
    background: var(--midnight-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 212, 170, 0.1);
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 48px;
    opacity: 0;
    transform: translateY(40px);
    transition: transform 700ms cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 500ms ease-out;
}

.module-variables.revealed .var-block {
    opacity: 1;
    transform: translateY(0);
}

.module-variables.revealed .var-large { transition-delay: 0ms; }
.module-variables.revealed .var-stack .var-small:first-child { transition-delay: 120ms; }
.module-variables.revealed .var-stack .var-small:last-child { transition-delay: 240ms; }

.var-large {
    flex: 0 0 50%;
}

.var-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3vh;
}

.var-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    color: var(--aurora-teal);
    margin-bottom: 1rem;
}

.var-desc {
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.75;
}

/* Module 5: Horizon */
.module-horizon {
    width: 92vw;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    padding-bottom: 10vh;
}

.horizon-inner {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.aurora-mesh-intense {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(0, 212, 170, 0.20) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(123, 47, 190, 0.18) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 70%, rgba(255, 107, 157, 0.15) 0%, transparent 40%);
    background-size: 200% 200%;
    animation: aurora-shift 30s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
    border-radius: 4px;
}

.horizon-statement {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--near-white);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}
