/* mosun.xyz - Atmospheric Descent / Frutiger-Aero */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.85;
    color: #E8E4DF;
    background: #E8E4DF;
    overflow-x: hidden;
}

/* ===== Rain Lines ===== */
.rain-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.rain-line {
    position: absolute;
    left: var(--rain-left);
    top: -200px;
    width: 1px;
    height: var(--rain-height);
    background: rgba(255, 255, 255, var(--rain-opacity));
    animation: rain-fall var(--rain-speed) linear infinite;
    animation-delay: var(--rain-delay);
    will-change: transform, opacity;
}

@keyframes rain-fall {
    0% { transform: translateY(-200px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(110vh); opacity: 0; }
}

/* ===== Cloud Drifts ===== */
.cloud-drift {
    position: absolute;
    border-radius: 50%;
    background: #9EA8B2;
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.cloud-drift-1 {
    width: 40vw;
    height: 40vw;
    opacity: 0.08;
    top: 20%;
    left: -10%;
    animation: cloud-move-1 60s linear infinite;
}

.cloud-drift-2 {
    width: 30vw;
    height: 30vw;
    opacity: 0.06;
    top: 50%;
    right: -5%;
    animation: cloud-move-2 75s linear infinite;
}

.cloud-drift-3 {
    width: 35vw;
    height: 35vw;
    opacity: 0.1;
    top: 30%;
    left: 40%;
    animation: cloud-move-3 45s linear infinite;
}

@keyframes cloud-move-1 {
    0% { transform: translateX(-20vw); }
    50% { transform: translateX(30vw); }
    100% { transform: translateX(-20vw); }
}

@keyframes cloud-move-2 {
    0% { transform: translateX(10vw); }
    50% { transform: translateX(-20vw); }
    100% { transform: translateX(10vw); }
}

@keyframes cloud-move-3 {
    0% { transform: translateX(0); }
    50% { transform: translateX(20vw); }
    100% { transform: translateX(0); }
}

/* ===== Stratum I: Stratosphere ===== */
.stratum-1 {
    min-height: 100vh;
    background: linear-gradient(180deg, #E8E4DF, #C4BFB5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-mark {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(3rem, 8vw, 7rem);
    color: #5B6B7A;
    letter-spacing: 0.04em;
    opacity: 0;
    transition: opacity 2s ease 0.5s;
    position: relative;
    z-index: 3;
}

.hero-mark.revealed {
    opacity: 0.7;
}

.breathing-line {
    width: 60px;
    height: 1px;
    background: #C4BFB5;
    margin-top: 3rem;
    animation: breathe 3s ease-in-out infinite;
    position: relative;
    z-index: 3;
}

@keyframes breathe {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* ===== Stratum II: Cloud Deck ===== */
.stratum-2 {
    padding: 15vh 2rem;
    background: linear-gradient(180deg, #C4BFB5, #8E99A4, #5B6B7A);
    position: relative;
    overflow: hidden;
}

/* Frost Cards */
.frost-card {
    position: relative;
    z-index: 3;
    max-width: 55vw;
    padding: 2.5rem;
    margin-bottom: 30vh;
    backdrop-filter: blur(20px);
    background: rgba(200, 210, 220, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.frost-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.frost-card-left {
    margin-left: 15%;
}

.frost-card-right {
    margin-left: 45%;
}

.card-label {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #C4BFB5;
    display: block;
    margin-bottom: 1rem;
}

.card-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    color: #E8E4DF;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

.card-text {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.85;
    color: #E8E4DF;
    letter-spacing: 0.01em;
}

/* ===== Stratum III: Rain Column ===== */
.stratum-3 {
    padding: 15vh 2rem;
    background: linear-gradient(180deg, #5B6B7A, #2A3D4F, #1A2834);
    position: relative;
}

.rain-column-content {
    max-width: 42rem;
    margin: 0 auto;
    position: relative;
    z-index: 3;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.rain-column-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

.column-text {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.85;
    color: #F0EAE0;
    margin-bottom: 2.5rem;
    text-indent: 2em;
}

.column-text:first-child {
    text-indent: 0;
}

/* ===== Stratum IV: Sea Floor ===== */
.stratum-4 {
    min-height: 50vh;
    padding: 10vh 2rem;
    background: linear-gradient(180deg, #1A2834, #0D1B2A);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.horizon-line {
    width: 100%;
    margin-bottom: 4rem;
    opacity: 0;
    transition: opacity 1s ease;
}

.horizon-line.revealed {
    opacity: 1;
}

.horizon-path {
    stroke-dasharray: 1800;
    stroke-dashoffset: 1800;
    transition: stroke-dashoffset 3s ease;
}

.horizon-line.revealed .horizon-path {
    stroke-dashoffset: 0;
}

.sea-floor-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.6s ease 0.5s;
}

.sea-floor-content.revealed {
    opacity: 1;
}

.floor-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: #B8A88A;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.floor-meta {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: #5B6B7A;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .frost-card {
        max-width: 90%;
        margin-left: 5% !important;
        margin-right: 5%;
    }

    .cloud-drift {
        display: none;
    }

    .rain-line:nth-child(n+11) {
        display: none;
    }

    .hero-mark {
        font-size: clamp(2rem, 10vw, 4rem);
    }
}
