/* === GGOOMIMI.COM - Decorative Patchwork Maximalism === */

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

:root {
    --vermillion: #E8423F;
    --teal: #2A7B6F;
    --gold: #F2B830;
    --coral: #F07167;
    --ink: #1C1A1F;
    --cream: #F5F0E3;
    --indigo: #2D3A6E;
    --sage: #8FBFA8;
}

body {
    background: var(--ink);
    color: var(--ink);
    font-family: 'IBM Plex Sans KR', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.65;
    overflow-x: hidden;
}

/* === BACKGROUND CLASSES === */
.bg-cream { background-color: var(--cream); }
.bg-dark { background-color: var(--ink); }
.bg-sage { background-color: var(--sage); }
.bg-coral { background-color: var(--coral); }

/* === BORDER CLASSES === */
.border-red { border: 3px solid var(--vermillion); }
.border-teal { border: 3px solid var(--teal); }
.border-gold { border: 3px solid var(--gold); }
.border-indigo { border: 3px solid var(--indigo); }

/* === TEXT COLOR HELPERS === */
.light-text { color: var(--cream); }
.dark-text { color: var(--ink); }

/* === PATTERN BACKGROUNDS === */
.pattern-tshape {
    background-image:
        repeating-linear-gradient(0deg, rgba(139, 111, 78, 0.12) 0px, rgba(139, 111, 78, 0.12) 3px, transparent 3px, transparent 20px),
        repeating-linear-gradient(90deg, rgba(139, 111, 78, 0.12) 0px, rgba(139, 111, 78, 0.12) 3px, transparent 3px, transparent 20px);
}

.pattern-diamond {
    background-image:
        repeating-linear-gradient(45deg, rgba(42, 123, 111, 0.15) 0px, rgba(42, 123, 111, 0.15) 1px, transparent 1px, transparent 12px),
        repeating-linear-gradient(-45deg, rgba(42, 123, 111, 0.15) 0px, rgba(42, 123, 111, 0.15) 1px, transparent 1px, transparent 12px);
}

.pattern-chevron {
    background-image:
        repeating-linear-gradient(135deg, rgba(232, 66, 63, 0.1) 0px, rgba(232, 66, 63, 0.1) 2px, transparent 2px, transparent 8px, rgba(232, 66, 63, 0.1) 8px, rgba(232, 66, 63, 0.1) 10px, transparent 10px, transparent 16px);
}

.pattern-concentric {
    background-image:
        repeating-linear-gradient(0deg, rgba(45, 58, 110, 0.12) 0px, rgba(45, 58, 110, 0.12) 2px, transparent 2px, transparent 16px),
        repeating-linear-gradient(90deg, rgba(45, 58, 110, 0.12) 0px, rgba(45, 58, 110, 0.12) 2px, transparent 2px, transparent 16px),
        repeating-linear-gradient(0deg, rgba(45, 58, 110, 0.06) 0px, rgba(45, 58, 110, 0.06) 1px, transparent 1px, transparent 8px),
        repeating-linear-gradient(90deg, rgba(45, 58, 110, 0.06) 0px, rgba(45, 58, 110, 0.06) 1px, transparent 1px, transparent 8px);
}

/* === CLIP-PATH BORDERS === */
.scallop-top {
    clip-path: polygon(0% 5%, 5% 0%, 10% 5%, 15% 0%, 20% 5%, 25% 0%, 30% 5%, 35% 0%, 40% 5%, 45% 0%, 50% 5%, 55% 0%, 60% 5%, 65% 0%, 70% 5%, 75% 0%, 80% 5%, 85% 0%, 90% 5%, 95% 0%, 100% 5%, 100% 100%, 0% 100%);
}

.zigzag-bottom {
    clip-path: polygon(0% 0%, 100% 0%, 100% 95%, 95% 100%, 90% 95%, 85% 100%, 80% 95%, 75% 100%, 70% 95%, 65% 100%, 60% 95%, 55% 100%, 50% 95%, 45% 100%, 40% 95%, 35% 100%, 30% 95%, 25% 100%, 20% 95%, 15% 100%, 10% 95%, 5% 100%, 0% 95%);
}

/* === SECTION 1: OPENING PATCHWORK === */
.opening-quilt {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 0;
    min-height: 100vh;
}

.patch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 16px;
    background-size: 0% 0%;
    transition: background-size 0.4s ease-out;
}

.patch.filled {
    background-size: 100% 100%;
}

.patch-lg { grid-column: span 2; grid-row: span 2; min-height: 240px; }
.patch-tall { grid-row: span 2; min-height: 240px; }
.patch-wide { grid-column: span 2; min-height: 120px; }
.patch-md { min-height: 160px; }
.patch-sm { min-height: 120px; }

.patch-word {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: clamp(40px, 8vw, 100px);
    letter-spacing: -0.02em;
    color: var(--ink);
    z-index: 2;
    position: relative;
}

.bg-dark .patch-word,
.patch-word.light-text {
    color: var(--cream);
}

.watermark {
    position: absolute;
    font-family: 'Noto Serif KR', serif;
    font-weight: 900;
    font-size: 300px;
    color: var(--ink);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.watermark.light {
    color: var(--cream);
    opacity: 0.08;
}

/* === STICKERS === */
.sticker {
    width: 60px;
    height: 60px;
    z-index: 3;
    position: relative;
}

.abs-sticker {
    position: absolute;
    z-index: 10;
}

.sticker:nth-child(odd) { transform: rotate(5deg); }
.sticker:nth-child(even) { transform: rotate(-3deg); }

/* === GAEGU LABELS === */
.gaegu-label {
    font-family: 'Gaegu', cursive;
    font-weight: 700;
    font-size: clamp(24px, 4vw, 36px);
    color: var(--ink);
    z-index: 2;
    position: relative;
}

.bg-dark .gaegu-label,
.gaegu-label.light-text {
    color: var(--cream);
}

/* === SECTION 2: CASCADE ZONE === */
.cascade-zone {
    padding: 0;
}

.cascade-grid {
    display: grid;
    grid-template-columns: 38% 35% 27%;
    grid-template-rows: 260px 320px 180px;
    grid-template-areas:
        "a a b"
        "c d d"
        "e f f";
    gap: 0;
}

.cascade-patch {
    padding: 24px;
    position: relative;
    overflow: visible;
}

.patch-text {
    font-family: 'IBM Plex Sans KR', sans-serif;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ink);
    margin-top: 12px;
    z-index: 2;
    position: relative;
}

.patch-text.light-text {
    color: rgba(245, 240, 227, 0.85);
}

.patch-text.en {
    font-size: 13px;
    color: var(--teal);
    font-style: italic;
}

/* === SECTION 3: STICKER BOMBING === */
.sticker-bombing {
    min-height: 200vh;
    overflow: hidden;
    padding: 0;
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

.sticker-tile {
    width: 100%;
    aspect-ratio: 1;
    min-height: 100px;
    background-size: 0% 0%;
    transition: background-size 0.4s ease-out, transform 0.1s linear;
}

.sticker-tile.filled {
    background-size: 100% 100%;
}

/* === SECTION 4: FINAL EMBELLISHMENT === */
.final-embellishment {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background:
        repeating-linear-gradient(0deg, rgba(139,111,78,0.04) 0px, rgba(139,111,78,0.04) 2px, transparent 2px, transparent 16px),
        repeating-linear-gradient(90deg, rgba(139,111,78,0.04) 0px, rgba(139,111,78,0.04) 2px, transparent 2px, transparent 16px),
        repeating-linear-gradient(45deg, rgba(42,123,111,0.03) 0px, rgba(42,123,111,0.03) 1px, transparent 1px, transparent 10px),
        repeating-linear-gradient(-45deg, rgba(42,123,111,0.03) 0px, rgba(42,123,111,0.03) 1px, transparent 1px, transparent 10px),
        repeating-linear-gradient(135deg, rgba(232,66,63,0.03) 0px, rgba(232,66,63,0.03) 2px, transparent 2px, transparent 8px),
        var(--cream);
}

.final-patch {
    position: relative;
    width: 90vw;
    max-width: 800px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
}

.final-border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

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

.final-title {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: clamp(48px, 10vw, 120px);
    letter-spacing: -0.02em;
    color: var(--vermillion);
    margin-bottom: 12px;
}

.final-subtitle {
    font-size: clamp(20px, 4vw, 32px);
    color: var(--teal);
    margin-bottom: 8px;
}

.final-en {
    font-family: 'IBM Plex Sans KR', sans-serif;
    font-size: 16px;
    color: var(--indigo);
    font-style: italic;
}

/* Pojagi stitching (dashed border simulation) */
.cascade-patch::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px dashed rgba(139, 111, 78, 0.3);
    pointer-events: none;
    z-index: 1;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .opening-quilt {
        grid-template-columns: repeat(2, 1fr);
    }

    .patch-lg { grid-column: span 2; }
    .patch-wide { grid-column: span 2; }

    .cascade-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "a"
            "b"
            "c"
            "d"
            "e"
            "f";
    }

    .sticker-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .final-title {
        font-size: 48px;
    }
}
