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

html {
    scroll-behavior: smooth;
}

body {
    background: #f2e6d4;
    color: #2b1f16;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Rokkitt', serif;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.02em;
}

/* === HERO === */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#hero-upper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f2e6d4;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 15%);
    z-index: 2;
    display: flex;
    align-items: flex-start;
    padding: clamp(3rem, 8vw, 8rem) clamp(2rem, 6vw, 6rem);
}

#hero-text {
    max-width: 600px;
}

.wordmark {
    font-size: clamp(3.5rem, 8vw, 7rem);
    color: #3d2114;
    margin-bottom: 0.3em;
}

.tagline {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: #2b1f16;
    font-weight: 400;
    margin-bottom: 0.3em;
}

.tagline-en {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: #3a6b6b;
    font-weight: 400;
}

#hero-lower {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #c4603a;
    clip-path: polygon(0 15%, 100% 85%, 100% 100%, 0 100%);
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0 clamp(2rem, 6vw, 8rem) clamp(2rem, 4vw, 4rem);
    /* halftone pattern */
    background-image: radial-gradient(circle, #3d2114 1px, transparent 1px);
    background-size: 4px 4px;
    background-color: #c4603a;
}

#crystal-hero {
    max-width: 50vw;
    height: auto;
}

#crystal-hero .facet {
    opacity: 0;
    will-change: opacity;
    transition: opacity 0.3s ease;
}

#crystal-hero.revealed .facet {
    opacity: 1;
}

#hero-stamp {
    position: absolute;
    top: clamp(2rem, 5vw, 5rem);
    right: clamp(2rem, 5vw, 5rem);
    z-index: 3;
    transform: rotate(-30deg);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s ease;
}

#hero-stamp.revealed {
    transform: rotate(-18deg);
    opacity: 0.7;
}

/* === IDENTITY PANELS === */
.identity-panel {
    position: relative;
    min-height: 80vh;
    padding: clamp(6rem, 10vw, 12rem) clamp(2rem, 6vw, 6rem) clamp(4rem, 6vw, 6rem);
    overflow: hidden;
}

.diagonal-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#panel1 {
    background: #f2e6d4;
}

#panel2 {
    background: #3d2114;
    color: #f5efe6;
}

#panel3 {
    background: #c4603a;
    color: #f5efe6;
    background-image: radial-gradient(circle, #3d2114 1px, transparent 1px);
    background-size: 4px 4px;
}

.panel-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.panel-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.panel-text h2 {
    font-size: clamp(1.6rem, 3.5vw, 3rem);
    margin-bottom: 0.8em;
}

.panel-text p {
    margin-bottom: 1.2em;
    max-width: 520px;
}

.chapter-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #d94f30;
    display: block;
    margin-bottom: 1em;
}

.chapter-label.light {
    color: #d4a94e;
}

.panel-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(80px) rotate(2deg);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-slide="left"] .panel-visual {
    transform: translateX(-80px) rotate(-2deg);
}

.panel-visual.visible {
    opacity: 1;
    transform: translateX(0) rotate(0);
}

.crystal-shape {
    max-width: 100%;
    height: auto;
}

.stamp-tilted {
    position: absolute;
    bottom: 10%;
    right: 5%;
    transform: rotate(22deg);
}

.stamp-tilted-alt {
    position: absolute;
    bottom: 10%;
    left: 5%;
    transform: rotate(-15deg);
}

/* document border motif */
.panel-text h2 {
    position: relative;
    padding-bottom: 0.5em;
}

.panel-text h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 0;
    border-top: 2px solid currentColor;
    margin-top: 0.4em;
    opacity: 0.4;
}

/* === PROCESS STRIP === */
#process-strip {
    background: #f2e6d4;
    min-height: 30vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 5vw, 5rem) clamp(1rem, 3vw, 3rem);
}

.process-steps {
    display: flex;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: scale(1.3);
    filter: blur(1px);
    transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}

.step.visible {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

.stamp-icon {
    width: clamp(80px, 12vw, 120px);
    height: clamp(80px, 12vw, 120px);
}

.step-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #2b1f16;
}

/* === CLOSING === */
#closing {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#closing-upper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #3d2114;
    clip-path: polygon(0 0, 100% 0, 100% 15%, 0 85%);
    z-index: 1;
}

#closing-lower {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f2e6d4;
    clip-path: polygon(0 85%, 100% 15%, 100% 100%, 0 100%);
    z-index: 1;
}

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

.closing-text {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    color: #f5efe6;
    margin-bottom: 0.4em;
}

.closing-text-kr {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #d4a94e;
    font-weight: 400;
    margin-bottom: 2rem;
}

#crystal-closing {
    display: block;
    margin: 0 auto 2rem;
    animation: slow-rotate 60s linear infinite;
}

@keyframes slow-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#closing-stamps {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.closing-stamp.s1 { transform: rotate(-22deg); }
.closing-stamp.s2 { transform: rotate(15deg); }
.closing-stamp.s3 { transform: rotate(-8deg); }

/* === DIAGONAL SECTION ACCENTS === */
#panel1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #c4603a;
    clip-path: polygon(0 0, 100% 0, 100% 20%, 0 100%);
    z-index: 0;
}

#panel2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #f2e6d4;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: 0;
}

#panel3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #3d2114;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    z-index: 0;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .panel-content {
        grid-template-columns: 1fr;
    }

    .panel-visual {
        order: -1;
        max-width: 250px;
        margin: 0 auto;
    }

    #crystal-hero {
        max-width: 200px;
    }

    #hero-upper {
        clip-path: polygon(0 0, 100% 0, 100% 90%, 0 10%);
    }

    #hero-lower {
        clip-path: polygon(0 10%, 100% 90%, 100% 100%, 0 100%);
    }

    .stamp-tilted, .stamp-tilted-alt {
        display: none;
    }
}
