/* ========================================
   eesugi.com - Flat-Design Maximalism
   Sunset Warm Palette / Radial Bloom Layout
   ======================================== */

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

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

body {
    background-color: #1B1035;
    color: #FFF5E6;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
.heading-primary {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 72px;
    line-height: 1.0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #FFF5E6;
}

.heading-secondary {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 48px;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

.heading-tertiary {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 28px;
    line-height: 1.15;
}

.body-text {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
}

.petal-label {
    font-family: 'Stint Ultra Condensed', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 12px;
    opacity: 0.7;
}

/* --- Cursor Trail --- */
#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.trail-bubble {
    position: absolute;
    border-radius: 50%;
    background-color: #FF6F61;
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
    transition: none;
}

.trail-bubble:nth-child(1) { width: 24px; height: 24px; }
.trail-bubble:nth-child(2) { width: 22px; height: 22px; }
.trail-bubble:nth-child(3) { width: 20px; height: 20px; }
.trail-bubble:nth-child(4) { width: 18px; height: 18px; }
.trail-bubble:nth-child(5) { width: 16px; height: 16px; }
.trail-bubble:nth-child(6) { width: 14px; height: 14px; }
.trail-bubble:nth-child(7) { width: 13px; height: 13px; }
.trail-bubble:nth-child(8) { width: 12px; height: 12px; }

/* --- Bubble Atmospheric Layer --- */
#bubble-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#pollen-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* --- Scroll Container --- */
#scroll-container {
    position: relative;
    z-index: 3;
}

.bloom-stage {
    height: 100vh;
    width: 100%;
    position: relative;
}

/* --- Central Hub --- */
#central-hub {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(40vw, 420px);
    height: min(40vw, 420px);
    border-radius: 50%;
    background-color: #1B1035;
    border: 2px solid rgba(255, 179, 71, 0.3);
    overflow: hidden;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hub-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#hub-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
}

#hub-wordmark {
    font-size: 56px;
    transition: opacity 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

#hub-message {
    font-size: 14px;
    color: #FFCBA4;
    max-width: 280px;
    margin: 16px auto 0;
    opacity: 0;
    transition: opacity 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

#hub-message.visible {
    opacity: 1;
}

#hub-botanicals {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1;
    opacity: 0.4;
}

.hub-flower {
    width: 60px;
    height: 60px;
}

/* --- Petal Container --- */
#petal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* --- Petal Panels --- */
.petal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 400px;
    border-radius: 24px;
    pointer-events: auto;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) translateY(0px) scale(0.3);
    will-change: transform, opacity;
    transition: transform 800ms cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 800ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.petal.bloomed {
    opacity: 1;
}

.petal-inner {
    padding: 32px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
    color: #FFF5E6;
    overflow: hidden;
    position: relative;
}

.petal-inner--light {
    color: #1B1035;
}

.petal-inner--light .petal-label {
    color: #1B1035;
}

.petal-inner--light .heading-secondary {
    color: #1B1035;
}

/* Petal Colors */
#petal-1 { background-color: #FF6F61; }
#petal-2 { background-color: #FFB347; }
#petal-3 { background-color: #FF8FA3; }
#petal-4 { background-color: #FFCBA4; }
#petal-5 { background-color: #2D1A4E; }
#petal-6 { background-color: #E91E8C; }

/* --- Botanical SVGs in Petals --- */
.cedar-branch {
    width: 100%;
    max-width: 200px;
    margin-top: auto;
    opacity: 0.5;
}

.flower-motif {
    width: 50px;
    height: 50px;
    margin-top: auto;
    opacity: 0.7;
}

.leaf-cluster {
    width: 80px;
    margin-top: auto;
    opacity: 0.6;
}

.leaf-cluster svg {
    width: 100%;
    height: auto;
}

/* Leaf cluster color accents - #3A2268 mid-purple for botanical depth */
.leaf-cluster path {
    fill: #3A2268;
}

.leaf-cluster path:first-child {
    fill: #2D1A4E;
}

/* --- Water Bubble Animations --- */
@keyframes bubble-drift-1 {
    0% { transform: translate(0, 0); }
    25% { transform: translate(15px, -30vh); }
    50% { transform: translate(-10px, -60vh); }
    75% { transform: translate(20px, -80vh); }
    100% { transform: translate(5px, -110vh); }
}

@keyframes bubble-drift-2 {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-20px, -25vh); }
    50% { transform: translate(15px, -55vh); }
    75% { transform: translate(-10px, -85vh); }
    100% { transform: translate(-5px, -110vh); }
}

@keyframes bubble-drift-3 {
    0% { transform: translate(0, 0); }
    33% { transform: translate(25px, -35vh); }
    66% { transform: translate(-15px, -70vh); }
    100% { transform: translate(10px, -110vh); }
}

@keyframes bubble-sway {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

@keyframes pollen-float {
    0% { transform: translate(0, 0); opacity: 0.4; }
    25% { transform: translate(10px, -15px); opacity: 0.2; }
    50% { transform: translate(-5px, -30px); opacity: 0.4; }
    75% { transform: translate(15px, -20px); opacity: 0.15; }
    100% { transform: translate(0, -40px); opacity: 0.4; }
}

@keyframes hub-bubble-rise {
    0% { transform: translateY(100%); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100%); opacity: 0; }
}

/* --- Background Transition for Stage 6 --- */
body.stage-6-active {
    background-color: #2D1A4E;
    transition: background-color 1.5s ease-in-out;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .heading-primary {
        font-size: 42px;
    }

    .heading-secondary {
        font-size: 32px;
    }

    #central-hub {
        width: 70vw;
        height: 70vw;
        max-width: 320px;
        max-height: 320px;
    }

    #hub-wordmark {
        font-size: 36px;
    }

    #hub-message {
        font-size: 13px;
        max-width: 200px;
    }

    /* On mobile, petals become stacked cards */
    #petal-container {
        position: relative;
        z-index: 5;
        pointer-events: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
        padding: 20px;
        padding-top: calc(70vw + 40px);
    }

    .petal {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        max-width: 360px;
        height: auto;
        min-height: 300px;
        transform: none;
        opacity: 0;
        transition: opacity 600ms cubic-bezier(0.34, 1.56, 0.64, 1),
                    transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .petal.bloomed {
        opacity: 1;
        transform: none;
    }

    /* Circular botanical motif in top-left of each mobile card */
    .petal::before {
        content: '';
        position: absolute;
        top: -10px;
        left: -10px;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background-color: rgba(255, 245, 230, 0.15);
        border: 1px solid rgba(255, 245, 230, 0.2);
    }

    #central-hub {
        position: relative;
        transform: none;
        margin: 20px auto;
    }

    #scroll-container {
        display: none;
    }
}

/* --- Desktop Petal Positions (computed via JS, but defaults) --- */
@media (min-width: 769px) {
    .petal {
        transform-origin: center center;
    }
}
