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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.875rem, 1.2vw, 1.05rem);
    letter-spacing: 0.04em;
    line-height: 2.0;
    color: #5A5266;
    background: linear-gradient(
        to bottom,
        #F0EBF5 0%,
        #F0EBF5 10%,
        #F5F0EB 16.67%,
        #F5F0EB 26%,
        #FAFAFA 33.33%,
        #FAFAFA 43%,
        #FBF5F0 50%,
        #FBF5F0 60%,
        #EDE8F0 66.67%,
        #EDE8F0 76%,
        #E8E4ED 83.33%,
        #E8E4ED 100%
    );
    min-height: 600vh;
    overflow-x: hidden;
}

/* Central Axis Line - #D4CED8 (Thread Gray)
   Opacity gradient: 0% at top, 40% through middle, 0% at bottom */
.axis-line {
    position: fixed;
    top: 0;
    left: 50%;
    width: 0.5px;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(212, 206, 216, 0) 0%,
        rgba(212, 206, 216, 0.4) 30%,
        rgba(212, 206, 216, 0.4) 70%,
        rgba(212, 206, 216, 0) 100%
    );
    z-index: 1;
    opacity: 0;
    transition: opacity 1.5s ease-out;
    pointer-events: none;
}

.axis-line.visible {
    opacity: 1;
}

/* Moments - each 100vh, scroll-snap */
.moment {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    position: relative;
}

/* Content offset: 32px right of center axis */
.moment-content {
    max-width: 480px;
    width: 100%;
    padding: 0 24px;
    margin-left: calc(50% + 32px);
    transform: translateX(-50%);
    position: relative;
}

.moment-content-wide {
    max-width: 560px;
}

/* Annotations - left of central axis, right-aligned */
.annotation {
    position: absolute;
    right: calc(100% + 48px);
    top: 0;
    font-weight: 400;
    font-size: clamp(0.65rem, 0.8vw, 0.75rem);
    color: #A89BB8;
    white-space: nowrap;
    text-align: right;
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

.annotation.visible {
    opacity: 1;
}

.annotation:hover {
    color: #B8A9C8;
}

/* Domain Title - IBM Plex Mono Extra Light */
.domain-title {
    font-weight: 200;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: 0.12em;
    color: #7B6E8A;
    text-align: left;
    line-height: 1.4;
}

.domain-title .char {
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.domain-title .char.visible {
    opacity: 1;
}

/* Body Text - #5A5266 (Dusty Violet) */
.body-text {
    color: #5A5266;
    margin-top: 1em;
}

.small-text {
    font-size: clamp(0.75rem, 1vw, 0.9rem);
}

/* Final mark - 끝 in display style */
.final-mark {
    font-weight: 200;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: #7B6E8A;
    letter-spacing: 0.12em;
    text-align: center;
    margin-top: 0;
}

/* Fade Reveal - opacity 0 to 1, 1200ms ease-out */
.fade-reveal {
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

.fade-reveal.visible {
    opacity: 1;
}

/* Typewriter */
.typewriter-container {
    margin-top: 2em;
    margin-bottom: 2em;
    position: relative;
    min-height: 4em;
}

.typewriter-text {
    color: #5A5266;
    display: inline;
}

/* Cursor: 1px vertical line in #C8A2C8 (Lilac Breath) */
.typewriter-cursor {
    display: inline-block;
    width: 1px;
    height: 1.2em;
    background: #C8A2C8;
    vertical-align: text-bottom;
    margin-left: 2px;
    opacity: 0;
}

.typewriter-cursor.active {
    animation: cursor-pulse 4s ease-in-out infinite;
}

.typewriter-cursor.fade-out {
    animation: none;
    opacity: 0;
    transition: opacity 1s ease-out;
}

@keyframes cursor-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Falling Leaf - 8x14px ellipse, rotated 35deg, #C8A2C8 at 20% opacity */
.falling-leaf {
    position: fixed;
    width: 8px;
    height: 14px;
    background: rgba(200, 162, 200, 0.2);
    border-radius: 50%;
    transform: rotate(35deg);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
}

.falling-leaf.active {
    opacity: 1;
}

/* Breathing Dot - 12px, #D8C8E8, pulses 1.0-1.15 on 4s cycle */
.breathing-dot {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #D8C8E8;
    z-index: 10;
    animation: breathe 4s ease-in-out infinite;
    opacity: 0;
    transition: opacity 1s ease-out;
}

.breathing-dot.visible {
    opacity: 1;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Ghost Clouds - faint radial gradients on wide viewports */
.ghost-cloud {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation: cloud-fade 20s ease-in-out forwards;
}

@keyframes cloud-fade {
    0% { opacity: 0; }
    15% { opacity: 0.03; }
    85% { opacity: 0.03; }
    100% { opacity: 0; }
}

/* Responsive - narrow screens */
@media (max-width: 768px) {
    .moment-content {
        margin-left: 0;
        transform: none;
        padding: 0 32px;
        margin: 0 auto;
    }

    .annotation {
        position: relative;
        right: auto;
        top: auto;
        display: block;
        text-align: left;
        margin-bottom: 1em;
    }
}
