/* ---- EMOTION BALLS — STICKY CARD STACK ---- */

.emotion-sticky-outer {
    padding: 0 1.25rem;
    margin: var(--section-gap) 0;
    position: relative;
    z-index: 1;
}

/* Next sibling scrolls over the final pinned card */
.emotion-sticky-outer + * {
    position: relative;
    z-index: 2;
    background: var(--bg-main, #ffffff);
}

/* Each card is a sticky layer in the stack */
.emotion-card {
    position: sticky;
    top: 80px;
    max-width: var(--container-max);
    margin: 0 auto;
    border-radius: 24px;
    min-height: 600px;
    overflow: hidden;
}

.emotion-card-1 {
    z-index: 1;
    background: #f5f0eb;
    cursor: none;
    user-select: none;
}
.emotion-card-2 {
    z-index: 2;
    background: #ffffff;
    box-shadow: 0 -24px 0 0 #ffffff;
}
.emotion-card-3 {
    z-index: 3;
    background: var(--bg-dark);
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    box-shadow: 0 -24px 0 0 var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Target-ring cursor (card 1 only) */
.emotion-cursor-spot {
    position: absolute;
    pointer-events: none;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.2s;
    transform: translate(-50%, -50%);
}
.emotion-cursor-spot .cursor-ring {
    display: block;
    overflow: visible;
}
.cursor-callout {
    position: absolute;
    top: -8px;
    left: 58px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.cursor-callout.visible {
    opacity: 1;
}
.emotion-card-1:hover .emotion-cursor-spot {
    opacity: 1;
}

/* Card 1 header */
.emotion-header {
    text-align: center;
    padding: 2.5rem 1rem 1rem;
    position: relative;
    z-index: 2;
}
.emotion-header h2 {
    font-size: var(--h3);
    color: var(--text-dark);
    margin: 0 0 0.25rem;
}
.emotion-header p {
    color: var(--text-gray);
    font-size: var(--small);
    margin: 0;
}

@keyframes emotionBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* Emotion circles field */
.emotion-field {
    position: relative;
    width: 100%;
    height: 440px;
    overflow: hidden;
}

.emotion-circle {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255,255,255,0.95);
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
    cursor: pointer;
    will-change: transform;
    z-index: 2;
    padding: 0.5rem;
    box-sizing: border-box;
    animation: emotionFloat 6s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    transition: box-shadow 0.3s;
}
.emotion-circle:hover {
    animation: emotionPulse 0.8s ease-in-out infinite;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}
.emotion-circle.clicked {
    animation: none;
    transform: scale(1.3);
    z-index: 10;
}

/* "Klick" hover hint */
.emotion-click-hint {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.emotion-circle:hover .emotion-click-hint {
    opacity: 1;
}
.emotion-circle.clicked .emotion-click-hint {
    display: none;
}

/* Double-down scroll arrow after ball click */
.emotion-scroll-down-arrow {
    display: none;
    justify-content: center;
    padding: 0;
    margin-top: -0.5rem;
    color: var(--text-gray, #999);
    animation: emotionBounce 2s ease-in-out infinite;
    position: relative;
    z-index: 5;
}
.emotion-scroll-down-arrow.visible {
    display: flex;
}
.emotion-scroll-down-arrow svg {
    opacity: 0.55;
}

@keyframes emotionFloat {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(5px, -10px); }
    50% { transform: translate(-4px, 6px); }
    75% { transform: translate(7px, 4px); }
}
@keyframes emotionPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}


/* Card 2: Ball drop */
.emotion-step-2-header {
    text-align: center;
    padding: 2rem 1rem 0;
    position: relative;
    z-index: 2;
}
.emotion-step-2-header h2 {
    font-size: var(--h3);
    color: var(--text-dark);
    margin: 0 0 0.25rem;
}
.emotion-step-2-header p {
    color: var(--text-gray);
    font-size: var(--small);
    margin: 0 0 0.5rem;
}
.emotion-canvas-wrap {
    position: relative;
    width: 100%;
    height: 420px;
}
.emotion-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}


/* Card 3: CTA */
.emotion-card-3 .btn {
    align-self: center;
}
.emotion-card-3 h2 {
    color: var(--text-white);
    font-size: var(--h3);
    margin: 0 0 0.75rem;
    position: relative;
    z-index: 2;
}
.emotion-card-3 p {
    color: rgba(255,255,255,0.65);
    font-size: 1rem;
    margin: 0 0 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

/* Calendar grid pattern */
.emotion-calendar-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.06;
    background-image:
        linear-gradient(rgba(255,255,255,1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,1) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* "Heute" circled label */
.emotion-heute {
    position: relative;
    text-align: center;
    z-index: 1;
    pointer-events: none;
    margin-bottom: 0.25rem;
}
.emotion-heute-text {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    position: relative;
    z-index: 1;
}
.emotion-heute-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 45px;
    transform: translate(-50%, -50%) rotate(-3deg);
    overflow: visible;
}
.emotion-heute-circle path {
    stroke-dasharray: var(--heute-len, 300);
    stroke-dashoffset: var(--heute-len, 300);
}
.emotion-heute.drawn .emotion-heute-circle path {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}


/* ---- Responsive ---- */
@media (max-width: 991px) {
    .emotion-card {
        position: relative;
        top: auto;
        margin-bottom: 1rem;
    }
}

@media (max-width: 767px) {
    .emotion-card {
        position: relative;
        top: auto;
        min-height: 480px;
        border-radius: 18px;
        margin-bottom: 1rem;
    }
    .emotion-field { height: 360px; }
    .emotion-header { padding: 2rem 1rem 0.5rem; }
    .emotion-canvas-wrap { height: 340px; }
    .emotion-card-3 { padding: 3rem 1.5rem; }
    .emotion-calendar-grid { background-size: 36px 36px; }
    .emotion-card {
        margin-bottom: 0;
    }
    .emotion-card-1 {
        cursor: default;
        border-radius: 0;
        margin-left: -1.25rem;
        margin-right: -1.25rem;
        max-width: none;
        width: calc(100% + 2.5rem);
    }
    .emotion-card-2 {
        box-shadow: none;
        border-radius: 18px;
    }
    .emotion-circle {
        cursor: pointer;
        animation: none;
    }
    .emotion-circle.mobile-hidden {
        visibility: hidden;
    }
    .emotion-cursor-spot { display: none; }
}
