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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #0d1127;
    color: #f5f0e0;
    font-family: 'Noto Serif KR', serif;
    font-weight: 300;
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
.section-anchor {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 100;
    font-size: clamp(4rem, 10vw, 10rem);
    color: #c9a84c;
    line-height: 1;
    margin-bottom: 1rem;
}

.body-text {
    font-family: 'Noto Serif KR', serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    line-height: 1.9;
    color: #f5f0e0;
    max-width: 38ch;
    opacity: 0.85;
}

.domain-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    letter-spacing: 0.3em;
    text-transform: lowercase;
    color: #d4c477;
}

/* === SECTIONS === */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* === THRESHOLD (Hero) === */
.threshold {
    background: radial-gradient(ellipse at 50% 60%, #1a1a2e 0%, #0d1127 50%, #0a0a0f 100%);
}

.fog-layer {
    position: absolute;
    width: 200%;
    height: 100%;
    top: 0;
    left: -50%;
    opacity: 0.08;
    pointer-events: none;
}

.fog-1 {
    background: radial-gradient(ellipse at 30% 50%, #c9a84c 0%, transparent 50%),
                radial-gradient(ellipse at 70% 30%, #d4c477 0%, transparent 40%);
    animation: fogDrift1 20s ease-in-out infinite;
}

.fog-2 {
    background: radial-gradient(ellipse at 60% 70%, #e8d48b 0%, transparent 45%),
                radial-gradient(ellipse at 20% 40%, #a78d35 0%, transparent 35%);
    animation: fogDrift2 25s ease-in-out infinite;
}

@keyframes fogDrift1 {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(5%) translateY(-3%); }
}

@keyframes fogDrift2 {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-4%) translateY(2%); }
}

.hero-character {
    font-family: 'Josefin Sans', 'Noto Serif KR', sans-serif;
    font-size: clamp(7rem, 16vw, 20rem);
    font-weight: 100;
    color: #e8d48b;
    text-shadow:
        0 1px 0 #e0cc7a,
        0 2px 0 #d8c46a,
        0 3px 0 #d0bc5a,
        0 4px 0 #c9a84c,
        0 5px 0 #c1a03c,
        0 6px 0 #b9982c,
        0 7px 0 #a78d35,
        0 8px 0 #8b6914,
        0 9px 15px rgba(0,0,0,0.4),
        0 0px 40px rgba(201,168,76,0.15);
    filter: drop-shadow(0 0 60px rgba(201,168,76,0.1));
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    cursor: default;
    user-select: none;
}

.threshold-subtitle {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeInUp 2s ease 1s forwards;
}

.threshold-meaning {
    font-family: 'Noto Serif KR', serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1.4vw, 1.1rem);
    color: #d4c477;
    opacity: 0.6;
    margin-top: 0.8rem;
    letter-spacing: 0.05em;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    z-index: 2;
    opacity: 0;
    animation: fadeInUp 2s ease 2s forwards;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, #c9a84c, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.3); }
}

/* === DISSOLUTION === */
.dissolution {
    background: linear-gradient(180deg, #0a0a0f 0%, #0d1127 30%, #1a1a2e 100%);
    min-height: 120vh;
}

.ink-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.3;
}

.dissolution-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 10vh 2rem;
    display: flex;
    flex-direction: column;
    gap: 15vh;
}

.text-cluster {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.text-cluster.visible {
    opacity: 1;
    transform: translateY(0);
}

.cluster-1 {
    align-self: flex-start;
    margin-left: 10%;
}

.cluster-2 {
    align-self: flex-end;
    margin-right: 10%;
    text-align: right;
}

.cluster-3 {
    align-self: flex-start;
    margin-left: 5%;
}

.cluster-4 {
    text-align: center;
}

/* === MOUNTAIN-WATER === */
.mountain-water {
    background: linear-gradient(180deg, #1a1a2e 0%, #0d1127 50%, #0a0a0f 100%);
    min-height: 120vh;
}

.mountain-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.4;
}

.mountain-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 10vh 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8vh;
}

.floating-hangul {
    display: flex;
    gap: clamp(1rem, 4vw, 3rem);
    margin-top: 4rem;
}

.float-char {
    font-family: 'Josefin Sans', 'Noto Serif KR', sans-serif;
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 100;
    color: #c9a84c;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1.5s ease;
    text-shadow:
        0 1px 0 #b9982c,
        0 2px 0 #a78d35,
        0 3px 0 #8b6914,
        0 0 30px rgba(201,168,76,0.1);
}

.float-char.visible {
    opacity: 0.7;
    transform: translateY(0);
}

/* === BREATH === */
.breath {
    background: radial-gradient(ellipse at 50% 50%, #1a1a2e 0%, #0d1127 60%, #0a0a0f 100%);
    min-height: 100vh;
}

.breath-circle {
    position: absolute;
    width: clamp(200px, 40vw, 500px);
    height: clamp(200px, 40vw, 500px);
    border-radius: 50%;
    border: 1px solid rgba(201,168,76,0.15);
    animation: breathe 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.2;
        border-color: rgba(201,168,76,0.1);
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
        border-color: rgba(201,168,76,0.3);
    }
}

.breath-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

/* === RETURN === */
.return {
    background: linear-gradient(180deg, #0a0a0f 0%, #0d1127 50%, #0a0a0f 100%);
    min-height: 80vh;
}

.return-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-character-small {
    font-family: 'Josefin Sans', 'Noto Serif KR', sans-serif;
    font-size: clamp(4rem, 10vw, 10rem);
    font-weight: 100;
    color: #e8d48b;
    text-shadow:
        0 1px 0 #d8c46a,
        0 2px 0 #c9a84c,
        0 3px 0 #a78d35,
        0 4px 0 #8b6914,
        0 0 30px rgba(201,168,76,0.1);
    margin-bottom: 2rem;
}

.return-text {
    font-family: 'Noto Serif KR', serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.5rem);
    line-height: 2;
    color: #d4c477;
    opacity: 0.8;
    margin-bottom: 3rem;
}

.domain-footer {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.5em;
    color: #c9a84c;
    opacity: 0.3;
}

/* === PARALLAX FLOAT === */
.hero-character {
    animation: heroFloat 8s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .cluster-1 { margin-left: 5%; }
    .cluster-2 { margin-right: 5%; }
    .dissolution-content { gap: 10vh; }
}
