/* Sprint 1 motion language — transforms & opacity only */
:root {
    --motion-fast: 120ms;
    --motion-normal: 240ms;
    --motion-slow: 500ms;
    --ease-playful: cubic-bezier(0.2, 0.9, 0.3, 1.2);
    --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
    --color-play-orange: #ff8a3d;
    --color-play-blue: #2f6fed;
    --color-play-amber: #f5a623;
    --color-play-success: #3ecf8e;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@keyframes hp-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hp-rise {
    from { opacity: 0; transform: translateY(18px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hp-bounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    70% { transform: translateY(-4px); }
}

@keyframes hp-pop {
    0% { transform: scale(0.6); opacity: 0; }
    70% { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes hp-float {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-14px) rotate(4deg); }
}

@keyframes hp-drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(12px, -28px); }
}

@keyframes hp-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-6deg); }
    75% { transform: rotate(6deg); }
}

@keyframes hp-pulse-once {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes hp-squash {
    0% { transform: scale(1, 1); }
    40% { transform: scale(1.08, 0.9); }
    70% { transform: scale(0.96, 1.04); }
    100% { transform: scale(1, 1); }
}

@keyframes hp-glow-pulse {
    0%, 100% { filter: drop-shadow(0 0 0 transparent); transform: scale(1); }
    50% { filter: drop-shadow(0 0 10px rgba(62, 207, 142, 0.85)); transform: scale(1.04); }
}

@keyframes hp-note-in {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes hp-sparkle {
    0% { transform: scale(0.2) rotate(0deg); opacity: 0; }
    40% { opacity: 1; }
    100% { transform: scale(1.4) rotate(40deg); opacity: 0; }
}

@keyframes hp-confetti-fall {
    0% { transform: translateY(-10%) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

@keyframes hp-key-hint {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0); transform: translateY(0); }
    50% { box-shadow: 0 0 0 6px rgba(245, 166, 35, 0.45); transform: translateY(-2px); }
}

.hp-anim-fade-in { animation: hp-fade-in var(--motion-slow) var(--ease-soft) both; }
.hp-anim-rise { animation: hp-rise var(--motion-slow) var(--ease-playful) both; }
.hp-anim-bounce { animation: hp-bounce 0.7s var(--ease-playful); }
.hp-anim-pop { animation: hp-pop var(--motion-normal) var(--ease-playful) both; }
.hp-anim-wiggle { animation: hp-wiggle 0.45s var(--ease-playful); }
.hp-anim-pulse-once { animation: hp-pulse-once 1.2s var(--ease-soft) 1; }
.hp-anim-squash { animation: hp-squash var(--motion-normal) var(--ease-playful); }
.hp-anim-note-in { animation: hp-note-in 250ms var(--ease-playful) both; }
.hp-anim-glow { animation: hp-glow-pulse 0.55s var(--ease-soft); }

.hp-float-idle {
    animation: hp-float 3.8s var(--ease-soft) infinite;
}

.hp-btn-play {
    appearance: none;
    border: none;
    cursor: pointer;
    font-weight: 800;
    font-size: clamp(1.35rem, 5vw, 1.75rem);
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(180deg, #ff9f55 0%, var(--color-play-orange) 55%, #f06a1a 100%);
    border-radius: 999px;
    padding: 1rem 2.4rem;
    min-width: min(280px, 86vw);
    box-shadow: 0 8px 0 #d45a12, 0 12px 24px rgba(240, 106, 26, 0.35);
    transition: transform var(--motion-fast) var(--ease-soft), box-shadow var(--motion-fast) var(--ease-soft);
    will-change: transform;
}

.hp-btn-play:hover {
    transform: translateY(-3px);
    box-shadow: 0 11px 0 #d45a12, 0 16px 28px rgba(240, 106, 26, 0.4);
}

.hp-btn-play:active {
    transform: translateY(4px) scale(0.98, 0.94);
    box-shadow: 0 3px 0 #d45a12, 0 6px 12px rgba(240, 106, 26, 0.3);
}

.hp-btn-secondary {
    appearance: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, #5b8fff 0%, var(--color-play-blue) 100%);
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    box-shadow: 0 4px 0 #1b4fbd;
    transition: transform var(--motion-fast) var(--ease-soft);
}

.hp-btn-secondary:active {
    transform: translateY(3px) scale(0.98);
    box-shadow: 0 1px 0 #1b4fbd;
}

.hp-mascot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--hp-mascot-size, 120px);
    height: var(--hp-mascot-size, 120px);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12));
}

.hp-mascot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.hp-mascot--wave img { animation: hp-bounce 1.1s var(--ease-playful) 1; }
.hp-mascot--celebrate img { animation: hp-bounce 0.65s var(--ease-playful) 2; }
.hp-mascot--encourage img { animation: hp-wiggle 0.5s var(--ease-playful); }
.hp-mascot--idle img { /* no continuous bounce — reactions only */ }
.hp-mascot--neutral img { /* still */ }

.hp-float-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hp-float-item {
    position: absolute;
    opacity: 0.55;
    animation: hp-float 4s var(--ease-soft) infinite;
}

.hp-float-item img,
.hp-float-item svg {
    width: 100%;
    height: 100%;
    display: block;
}

.hp-starburst {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: grid;
    place-items: center;
    z-index: 5;
}

.hp-starburst__spark {
    position: absolute;
    width: auto;
    height: auto;
    font-size: 1.1rem;
    line-height: 1;
    color: #f5b700;
    background: none;
    border-radius: 0;
    text-shadow: 0 0 8px rgba(255, 200, 40, 0.7);
    transform: rotate(var(--spark-angle, 0deg)) translateY(-52px) scale(0.2);
    animation: hp-sparkle-star 0.65s var(--ease-playful) forwards;
}

@keyframes hp-sparkle-star {
    0% { opacity: 0; transform: rotate(var(--spark-angle, 0deg)) translateY(-40px) scale(0.3); }
    40% { opacity: 1; transform: rotate(var(--spark-angle, 0deg)) translateY(-56px) scale(1.15); }
    100% { opacity: 0; transform: rotate(var(--spark-angle, 0deg)) translateY(-72px) scale(0.8); }
}

.hp-session-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.hp-session-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
    transition: transform var(--motion-normal) var(--ease-playful), background var(--motion-fast);
}

.hp-session-dot.is-filled {
    background: #ffe566;
    box-shadow: 0 0 0 2px rgba(255, 200, 40, 0.5);
    transform: scale(1.15);
    animation: hp-pop var(--motion-normal) var(--ease-playful);
}

.white-key.key-hint {
    animation: hp-key-hint 1s var(--ease-soft) infinite;
    z-index: 2;
}

.white-key.key-hint-strong {
    animation: hp-key-hint 0.7s var(--ease-soft) infinite;
    background: linear-gradient(180deg, #fff8e0, #ffe08a) !important;
}
