/* bada.studio - Korean Ceramic Art Catalog / Editorial / Parallax */

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

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

body {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.75;
    color: #4A4A42;
    background: #F5F1E8;
    overflow-x: hidden;
}

/* === DOT NAVIGATION === */
.dot-nav {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 100;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid #3D5A3A;
    background: transparent;
    cursor: pointer;
    transition: background 0.4s ease, transform 0.4s ease;
}

.dot.active {
    background: #3D5A3A;
    animation: dotPulse 3s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* === TYPOGRAPHY === */
h1, .hero-heading {
    font-family: 'Poiret One', cursive;
    font-size: clamp(64px, 10vw, 96px);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #2A3D2A;
    line-height: 1.1;
}

h2, .section-heading {
    font-family: 'Poiret One', cursive;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #2A3D2A;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.section-subheading, .hero-subtitle {
    font-family: 'Josefin Sans', sans-serif;
    font-size: clamp(20px, 3vw, 36px);
    font-weight: 300;
    letter-spacing: 0.04em;
    color: #3D5A3A;
    margin-bottom: 1rem;
}

.section-body {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.75;
    color: #4A4A42;
    max-width: 600px;
    margin-bottom: 1rem;
}

.korean-text {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 20px;
    font-weight: 400;
    color: #5C7A5C;
    margin-top: 1rem;
}

.caption {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 16px;
    font-weight: 400;
    color: #7A7A6E;
    margin-top: 0.5rem;
    display: block;
}

/* === SECTIONS === */
.parallax-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 80px 0 120px;
}

.section-1 { background: #F5F1E8; }
.section-2 { background: #E8E4DC; }
.section-3 { background: #F5F1E8; }
.section-4 { background: #E8E4DC; }
.section-5 { background: #1A2B1A; }
.section-6 { background: #F5F1E8; }

/* === SECTION BORDER (Art Deco linework) === */
.section-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #8B9E6B;
}

.section-border-dark {
    background: #3D5A3A;
}

/* === DANCHEONG BORDER === */
.dancheong-border {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #8B9E6B 0px,
        #8B9E6B 12px,
        #C4A86B 12px,
        #C4A86B 24px,
        #8B9E6B 24px,
        #8B9E6B 36px,
        transparent 36px,
        transparent 40px
    );
    animation: dancheongShift 8s linear infinite;
}

.dancheong-dark {
    background: repeating-linear-gradient(
        90deg,
        #3D5A3A 0px,
        #3D5A3A 12px,
        #2A3D2A 12px,
        #2A3D2A 24px,
        #3D5A3A 24px,
        #3D5A3A 36px,
        transparent 36px,
        transparent 40px
    );
}

@keyframes dancheongShift {
    0% { background-position-x: 0; }
    100% { background-position-x: 20px; }
}

/* === LATTICE BACKGROUND === */
.lattice-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(45deg, #2A3D2A 1px, transparent 1px),
        linear-gradient(-45deg, #2A3D2A 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.03;
    pointer-events: none;
}

/* === DECO FRAMES === */
.deco-frame {
    position: relative;
    padding: 48px 64px;
    max-width: 800px;
    width: 90%;
    text-align: center;
}

.frame-wide {
    max-width: 1100px;
}

.deco-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: #8B9E6B;
    border-style: solid;
}

.deco-corner-tl { top: 0; left: 0; border-width: 1px 0 0 1px; }
.deco-corner-tr { top: 0; right: 0; border-width: 1px 1px 0 0; }
.deco-corner-bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.deco-corner-br { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

.deco-frame-dark .deco-corner {
    border-color: #3D5A3A;
}

/* === SKELETON LOADING === */
.skeleton-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
    background: inherit;
    transition: opacity 0.8s ease;
}

.skeleton-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.skeleton-bar {
    height: 20px;
    background: #E8E4DC;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skeleton-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(196,168,107,0.15) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.8s linear infinite;
}

.skeleton-bar-wide { width: 60%; }
.skeleton-bar-medium { width: 40%; }
.skeleton-bar-narrow { width: 25%; }

.skeleton-rect {
    width: 200px;
    height: 300px;
    background: #E8E4DC;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skeleton-rect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(196,168,107,0.15) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.8s linear infinite;
}

.skeleton-rect-short { height: 180px; }
.skeleton-rect-wide { width: 80%; height: 250px; }

.skeleton-dark .skeleton-bar,
.skeleton-dark .skeleton-rect {
    background: #2A3D2A;
}

.skeleton-dark .skeleton-bar::after,
.skeleton-dark .skeleton-rect::after {
    background: linear-gradient(90deg, transparent 0%, rgba(61,90,58,0.3) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.8s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === SECTION CONTENT === */
.section-content {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.plane-a {
    will-change: transform;
}

/* === BOTANICAL LAYERS === */
.botanical-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2;
    will-change: transform;
}

.botanical {
    position: absolute;
    opacity: 0.85;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.botanical:hover {
    opacity: 1;
    transform: scale(1.015);
}

.pine-branch {
    right: 5%;
    top: 10%;
    width: 280px;
    height: auto;
}

.bamboo {
    left: 3%;
    top: 5%;
    width: 120px;
    height: auto;
}

.chrysanthemum {
    right: 8%;
    bottom: 15%;
    width: 200px;
    height: auto;
}

.dark-botanical {
    right: 10%;
    top: 15%;
    width: 180px;
    height: auto;
    opacity: 0.6;
}

.lotus-bg {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: auto;
}

/* === PATH DRAW ANIMATION === */
.draw-paths path,
.draw-paths circle,
.draw-paths ellipse {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2.4s ease-in-out;
}

.draw-paths .stem {
    transition-duration: 1.6s;
}

.draw-paths .branch {
    transition-delay: 0.4s;
    transition-duration: 1.2s;
}

.draw-paths .leaf {
    transition-delay: 0.8s;
    transition-duration: 1.2s;
}

.botanical.drawn .draw-paths path,
.botanical.drawn .draw-paths circle,
.botanical.drawn .draw-paths ellipse {
    stroke-dashoffset: 0;
}

.fill-layers {
    transition: opacity 1.2s ease;
    transition-delay: 2.4s;
    mix-blend-mode: multiply;
}

.botanical.drawn .fill-layers {
    opacity: 1;
}

/* === CLOUD BAND MOTIFS === */
.cloud-band-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 1.5rem;
}

.cloud-band {
    width: 80px;
    height: 30px;
    flex-shrink: 0;
}

/* === GALLERY === */
.gallery-row {
    display: flex;
    gap: 32px;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-item {
    text-align: center;
}

.gallery-placeholder {
    width: 240px;
    height: 300px;
    border-radius: 2px;
}

.gp-1 {
    background: linear-gradient(180deg, #A8C5A0 0%, #E8E4DC 100%);
}

.gp-2 {
    background: linear-gradient(180deg, #C4A86B 0%, #F5F1E8 100%);
}

.gp-3 {
    background: linear-gradient(180deg, #5C7A5C 0%, #E8E4DC 100%);
}

/* === DARK SECTION OVERRIDES === */
.dark-section {
    background: #1A2B1A;
}

.dark-heading {
    color: #A8C5A0;
}

.dark-text {
    color: #E8E4DC;
    max-width: 600px;
}

.dark-section .deco-corner {
    border-color: #3D5A3A;
}

/* === CLOSING SECTION === */
.closing-heading {
    font-size: clamp(48px, 7vw, 80px);
    margin-bottom: 0.5rem;
}

.closing-body {
    color: #7A7A6E;
    max-width: 500px;
    margin: 0 auto;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .deco-frame {
        padding: 32px 24px;
    }

    .gallery-row {
        flex-direction: column;
        align-items: center;
    }

    .gallery-placeholder {
        width: 200px;
        height: 250px;
    }

    .pine-branch { width: 180px; }
    .bamboo { width: 80px; }
    .chrysanthemum { width: 140px; }

    .dot-nav {
        right: 8px;
    }
}
