/* ==============================================
   senggack.org — Styles
   Muji minimalism + Dopamine neon
   ============================================== */

/* --- Color tokens (DESIGN.md palette) ---
   Neon Magenta    #FF2D7B
   Acid Chartreuse #CDFF00
   Plasma Violet   #8B00FF
   Cyber Coral     #FF6B4A
   Ion Blue        #00D4FF
   Bone White      #F7F5F0
   Obsidian        #0D0D0D
   Ash             #B0AEAA
   Smoke           #E3E0DB
   White           #FFFFFF
   Gray Body       #3D3D3D
   Light Body      #E8E8E8
*/

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: #3D3D3D;
    background-color: #F7F5F0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Scroll Progress Bar --- */
#progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    width: 3px;
    height: 100vh;
    z-index: 1000;
    pointer-events: none;
    background: rgba(176, 174, 170, 0.15);
}

#progress-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        #FF2D7B 0%,
        #CDFF00 25%,
        #8B00FF 50%,
        #FF6B4A 75%,
        #00D4FF 100%
    );
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 0.1s linear;
}

/* --- Hero Panels --- */
.hero-panel {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    overflow: hidden;
    background-color: #F7F5F0;
}

.panel-content {
    position: relative;
    max-width: 680px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    padding: 2rem;
}

/* --- Panel Spacers --- */
.panel-spacer {
    height: 40vh;
    background-color: #F7F5F0;
}

.end-spacer {
    height: 30vh;
    background-color: #F7F5F0;
}

/* --- Opening Panel --- */
.opening-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    z-index: 10;
}

.site-name {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #B0AEAA;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.site-name.visible {
    opacity: 1;
}

.enter-text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #B0AEAA;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.enter-text.visible {
    opacity: 0.7;
}

/* --- Organic Blobs --- */
.blob-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -55%);
    width: clamp(320px, 55vw, 560px);
    height: clamp(320px, 55vw, 560px);
    z-index: 1;
    pointer-events: none;
}

.blob-container-right {
    transform: translate(-15%, -55%);
}

.blob-container-left {
    transform: translate(-65%, -55%);
}

.blob-container-opening {
    transform: translate(-50%, -50%);
}

.organic-blob {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.hero-panel.out-of-view .organic-blob {
    transform: scale(0.9);
    opacity: 0.6;
}

#panel-opening .organic-blob {
    transform: scale(0);
    opacity: 0;
    transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1s ease;
}

#panel-opening .organic-blob.visible {
    transform: scale(1);
    opacity: 1;
}

/* --- Candle Elements --- */
.candle {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2.4rem;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.candle.visible {
    opacity: 1;
}

.candle-stem {
    width: 6px;
    height: 90px;
    background-color: #0D0D0D;
    border-radius: 3px;
}

.candle-flame-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.candle-flame {
    width: 18px;
    height: 28px;
    transform-origin: bottom center;
    animation: flame-flicker 2.5s ease-in-out infinite, flame-wobble 3.8s ease-in-out infinite;
}

.flame-delay-1 { animation-delay: 0s, 0s; }
.flame-delay-2 { animation-delay: 0.4s, 0.6s; }
.flame-delay-3 { animation-delay: 0.8s, 1.2s; }
.flame-delay-4 { animation-delay: 1.2s, 0.3s; }
.flame-delay-5 { animation-delay: 1.6s, 0.9s; }

@keyframes flame-flicker {
    0%, 100% { transform: scaleY(1) scaleX(1); }
    50%      { transform: scaleY(1.05) scaleX(0.95); }
}

@keyframes flame-wobble {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(3deg); }
    75%      { transform: rotate(-3deg); }
}

.flame-glow {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 40px 22px var(--glow-color);
    opacity: 0.25;
    animation: glow-pulse 2.5s ease-in-out infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.22; }
    50%      { opacity: 0.42; }
}

/* --- Typography --- */
.panel-heading {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    letter-spacing: 0.04em;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
}

.heading-on-light {
    color: #0D0D0D;
}

.heading-on-blob {
    color: #FFFFFF;
}

.panel-body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.8;
    letter-spacing: 0.01em;
    color: #3D3D3D;
    max-width: 520px;
    position: relative;
    z-index: 10;
}

.panel-body::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.6em;
    vertical-align: middle;
    background-color: #B0AEAA;
}

#panel-violet .panel-body::before {
    background-color: #8B00FF;
}

#panel-blue .panel-body::before {
    background-color: #00D4FF;
}

/* --- Counter Elements --- */
.counter-wrap {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.counter {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.06em;
    line-height: 1;
    transition: transform 0.18s ease-out;
}

.counter.pulse {
    transform: scale(1.02);
}

#panel-counter-1 .counter {
    color: #CDFF00;
    text-shadow: 0 0 24px rgba(205, 255, 0, 0.35);
}

#panel-counter-2 .counter {
    color: #FF6B4A;
    text-shadow: 0 0 24px rgba(255, 107, 74, 0.35);
}

.counter-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    color: #B0AEAA;
    letter-spacing: 0.05em;
    margin-top: 0.4rem;
}

/* --- Candle Gallery --- */
.candle-gallery {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(1.6rem, 4.5vw, 3.6rem);
    padding: 4rem 2rem;
    position: relative;
    z-index: 5;
}

.gallery-candle {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(var(--offset-y));
}

.gallery-candle .candle-stem {
    width: 6px;
    height: 110px;
    background-color: #0D0D0D;
    border-radius: 3px;
}

.gallery-candle .candle-flame-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.gallery-candle .candle-flame {
    width: 18px;
    height: 28px;
    transform-origin: bottom center;
    animation: flame-flicker 2.5s ease-in-out infinite, flame-wobble 3.8s ease-in-out infinite;
}

.gallery-candle .flame-glow {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 50px 28px var(--glow-color);
    opacity: 0.3;
    animation: glow-pulse 2.5s ease-in-out infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* --- Closing Panel --- */
.hero-panel-closing {
    background-color: #F7F5F0;
}

.closing-title {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #0D0D0D;
    letter-spacing: 0.04em;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.closing-line {
    width: 0;
    height: 1px;
    background-color: #B0AEAA;
    margin: 0 auto 2rem;
    transition: width 1s ease-out;
}

.closing-line.visible {
    width: 220px;
}

.closing-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    color: #3D3D3D;
    letter-spacing: 0.01em;
    line-height: 1.8;
}

/* --- Section Divider Lines (utility) --- */
.section-divider {
    width: 0;
    height: 1px;
    background-color: #E3E0DB;
    margin: 0 auto;
    transition: width 0.8s ease-out;
}

.section-divider.visible {
    width: 80%;
    max-width: 600px;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .panel-content {
        max-width: 90vw;
        padding: 1.5rem;
    }

    .panel-spacer {
        height: 20vh;
    }

    .blob-container {
        width: clamp(260px, 80vw, 360px);
        height: clamp(260px, 80vw, 360px);
        transform: translate(-50%, -55%);
    }

    .blob-container-right,
    .blob-container-left {
        transform: translate(-50%, -55%);
    }

    #progress-bar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 3px;
    }

    #progress-fill {
        background: linear-gradient(
            to right,
            #FF2D7B 0%,
            #CDFF00 25%,
            #8B00FF 50%,
            #FF6B4A 75%,
            #00D4FF 100%
        );
        transform-origin: left;
        transform: scaleX(0);
    }

    .candle-gallery {
        gap: 1rem;
        padding: 2rem 1rem;
    }

    .gallery-candle .candle-stem {
        height: 70px;
    }

    .candle-stem {
        height: 70px;
    }
}
