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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
    color: #333;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#loading-screen p {
    color: #fff;
    margin-top: 1rem;
    font-size: 1.125rem;
}

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

#three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#flyouts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

main {
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.intro-spacer,
.outro-spacer {
    height: 100vh;
}

#scrolly {
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
}

.step-content {
    height: 100vh;
}

.flyout {
    position: fixed;
    opacity: 0;
    pointer-events: auto;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.flyout.from-left {
    transform: translateX(-150%);
}

.flyout.from-right {
    transform: translateX(150%);
}

.flyout.centered {
    left: 50%;
    top: 5rem;
    transform: translate(-50%, -100%);
}

.flyout.centered.active {
    transform: translate(-50%, 0);
    opacity: 1;
}

.flyout.active {
    transform: translateX(0);
    opacity: 1;
}
