/* ggaji.com - Design Language */
/* Colors: #e8eff4, #6ba05b, #5b8ba0, #b8c9d6, #f4f1ed, #7a8a9a, #1a2a3a, #a06b5b, #ffffff */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #f4f1ed;
    color: #1a2a3a;
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ========== BUBBLES CONTAINER ========== */
#bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6), rgba(91,139,160,0.08));
    box-shadow: inset 0 -4px 8px rgba(91,139,160,0.12), 0 2px 4px rgba(0,0,0,0.04);
    backdrop-filter: blur(1px);
    animation: bubbleFloat linear infinite;
    opacity: 0;
    transition: opacity 1.5s ease;
}

@keyframes bubbleFloat {
    0% {
        transform: translateY(0) translateX(0) scale(1);
    }
    25% {
        transform: translateY(-15vh) translateX(8px) scale(1.02);
    }
    50% {
        transform: translateY(-30vh) translateX(-5px) scale(0.98);
    }
    75% {
        transform: translateY(-45vh) translateX(12px) scale(1.01);
    }
    100% {
        transform: translateY(-60vh) translateX(0) scale(1);
        opacity: 0;
    }
}

/* ========== POJAGI WRAPPER ========== */
.pojagi-wrapper {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
    padding: 8px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ========== POJAGI BLOCK ========== */
.pojagi-block {
    border: 2px solid #b8c9d6;
    background-color: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(2px);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.pojagi-block.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Pojagi stitch border effect */
.pojagi-block::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 2px dashed #b8c9d6;
    pointer-events: none;
    opacity: 0.5;
}

.block-inner {
    padding: clamp(24px, 4vw, 48px);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ========== HERO BLOCK ========== */
.block-hero {
    grid-column: 1 / -1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(232, 239, 244, 0.4);
}

.block-hero .block-inner {
    align-items: center;
    text-align: center;
}

.korean-main {
    font-family: 'Noto Serif KR', serif;
    font-weight: 900;
    font-size: clamp(80px, 20vw, 280px);
    line-height: 1;
    color: #1a2a3a;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    position: relative;
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(18px, 2.5vw, 32px);
    color: #5b8ba0;
    letter-spacing: 0.05em;
}

/* ========== WATER LEVEL ========== */
.water-level {
    width: 100%;
    height: 60px;
    position: relative;
    margin-top: 40px;
    overflow: hidden;
    border-bottom: 1px solid #b8c9d6;
}

.water-surface {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, rgba(91,139,160,0.15), rgba(91,139,160,0.03));
    transition: height 2s cubic-bezier(0.22, 1, 0.36, 1);
}

.water-surface.rising {
    height: 85%;
}

.water-surface.overflow-active.rising {
    height: 120%;
}

.water-surface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        rgba(91,139,160,0.3) 0px,
        rgba(91,139,160,0.1) 10px,
        transparent 10px,
        transparent 20px
    );
    animation: waveShift 3s linear infinite;
}

@keyframes waveShift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========== CHAPTER BLOCKS ========== */
.block-distance {
    grid-column: 1 / 8;
    min-height: 50vh;
}

.block-patience {
    grid-column: 5 / -1;
    min-height: 45vh;
}

.block-overflow {
    grid-column: 1 / 9;
    min-height: 50vh;
    background-color: rgba(232, 239, 244, 0.5);
}

.block-stillness {
    grid-column: 3 / -1;
    min-height: 45vh;
}

.block-return {
    grid-column: 1 / -1;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(26, 42, 58, 0.04);
}

.block-return .block-inner {
    align-items: center;
    text-align: center;
}

.korean-final {
    font-size: clamp(60px, 15vw, 200px);
    opacity: 0.15;
    transition: opacity 1.5s ease;
}

.korean-final.revealed {
    opacity: 1;
}

/* ========== CHAPTER TYPOGRAPHY ========== */
.chapter-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-style: italic;
    font-size: clamp(32px, 6vw, 80px);
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #1a2a3a;
    margin-bottom: 24px;
}

.chapter-body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.65;
    color: #3a4a5a;
    max-width: 640px;
}

.closing-text {
    font-style: italic;
    color: #5b8ba0;
}

.korean-accent {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    color: #1a2a3a;
    font-size: 1.1em;
}

/* ========== MONO ANNOTATION ========== */
.mono-annotation {
    font-family: 'Nanum Gothic Coding', monospace;
    font-size: clamp(11px, 1.2vw, 14px);
    color: #7a8a9a;
    margin-top: 24px;
    letter-spacing: 0.02em;
    opacity: 0.7;
}

/* ========== STITCH ACCENT ========== */
.stitch-accent {
    width: 80px;
    height: 2px;
    margin-top: 32px;
    background: repeating-linear-gradient(
        90deg,
        #b8c9d6 0px,
        #b8c9d6 6px,
        transparent 6px,
        transparent 12px
    );
}

.stitch-accent.vertical {
    width: 2px;
    height: 80px;
    margin-top: 16px;
    background: repeating-linear-gradient(
        180deg,
        #b8c9d6 0px,
        #b8c9d6 6px,
        transparent 6px,
        transparent 12px
    );
}

/* ========== DECORATIVE BLOCKS ========== */
.block-deco {
    background-color: rgba(232, 239, 244, 0.3);
}

.block-deco-1 {
    grid-column: 8 / -1;
    grid-row: 3;
    min-height: 200px;
}

.block-deco-2 {
    grid-column: 1 / 3;
    grid-row: 4;
    min-height: 180px;
}

.block-deco-3 {
    grid-column: 9 / -1;
    grid-row: 5;
    min-height: 200px;
}

.block-deco-4 {
    grid-column: 1 / 3;
    grid-row: 6;
    min-height: 120px;
}

/* ========== BUBBLES IN BLOCKS ========== */
.bubble-cluster {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 120px;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6), rgba(91,139,160,0.08));
    box-shadow: inset 0 -4px 8px rgba(91,139,160,0.12), 0 2px 4px rgba(0,0,0,0.04);
}

.bubble-xs {
    width: 20px;
    height: 20px;
    top: 60%;
    left: 20%;
    animation: bubblePulse 4s ease-in-out infinite;
}

.bubble-sm {
    width: 36px;
    height: 36px;
    top: 30%;
    left: 50%;
    animation: bubblePulse 5s ease-in-out infinite 0.5s;
}

.bubble-md {
    width: 56px;
    height: 56px;
    top: 15%;
    left: 25%;
    animation: bubblePulse 6s ease-in-out infinite 1s;
}

.bubble-lg {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 30%;
    animation: bubblePulse 7s ease-in-out infinite 0.3s;
}

@keyframes bubblePulse {
    0%, 100% {
        transform: scale(1) translateY(0);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.08) translateY(-8px);
        opacity: 1;
    }
}

/* ========== SCROLL PROGRESS ========== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #5b8ba0, #a06b5b);
    z-index: 100;
    transition: width 0.1s linear;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .pojagi-wrapper {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 6px;
    }

    .block-distance,
    .block-patience,
    .block-overflow,
    .block-stillness,
    .block-return,
    .block-deco-1,
    .block-deco-2,
    .block-deco-3,
    .block-deco-4 {
        grid-column: 1 / -1;
    }

    .block-deco-1,
    .block-deco-2,
    .block-deco-3,
    .block-deco-4 {
        grid-row: auto;
        min-height: 120px;
    }

    .block-hero {
        min-height: 80vh;
    }

    .korean-main {
        font-size: clamp(60px, 18vw, 160px);
    }

    .chapter-heading {
        font-size: clamp(28px, 8vw, 48px);
    }

    .block-inner {
        padding: clamp(20px, 5vw, 36px);
    }
}

@media (max-width: 480px) {
    .block-hero {
        min-height: 70vh;
    }

    .korean-main {
        font-size: clamp(48px, 16vw, 120px);
    }
}
