/* River-stone controls: organic radius, neumorphic depth, hover water ripples */

:root {
    --color-stone-zen-900: #2c2825;
    --color-stone-zen-800: #3d3834;
    --color-water-500: #2dd4bf;
}

.stone-btn {
    --stone-radius: 60% 40% 35% 65% / 55% 35% 65% 45%;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    isolation: isolate;
    border: none;
    cursor: pointer;
    text-decoration: none;
    border-radius: var(--stone-radius);
    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.35s ease,
        filter 0.35s ease;
    box-shadow:
        inset 3px 4px 10px rgba(255, 255, 255, 0.22),
        inset -3px -5px 12px rgba(0, 0, 0, 0.22),
        0 6px 18px rgba(44, 40, 37, 0.18),
        0 2px 4px rgba(44, 40, 37, 0.08);
}

.stone-btn:focus-visible {
    outline: 2px solid var(--color-water-500);
    outline-offset: 4px;
}

.stone-btn__label {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.stone-btn::before,
.stone-btn::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    background: transparent;
}

.stone-btn:hover::before {
    opacity: 1;
    animation: stone-water-wave 2.2s ease-out infinite;
}

.stone-btn:hover::after {
    opacity: 1;
    animation: stone-water-wave 2.2s ease-out infinite;
    animation-delay: 0.65s;
}

.stone-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow:
        inset 4px 5px 12px rgba(255, 255, 255, 0.28),
        inset -4px -6px 14px rgba(0, 0, 0, 0.18),
        0 10px 28px rgba(44, 40, 37, 0.22),
        0 4px 8px rgba(13, 148, 136, 0.12);
}

.stone-btn:active {
    transform: translateY(0) scale(0.99);
    transition-duration: 0.08s;
}

@keyframes stone-water-wave {
    0% {
        box-shadow:
            0 0 0 0 rgba(45, 212, 191, 0.55),
            0 0 0 0 rgba(56, 189, 248, 0.35),
            0 0 0 0 rgba(94, 234, 212, 0.25);
    }
    45% {
        box-shadow:
            0 0 0 10px rgba(45, 212, 191, 0.12),
            0 0 0 20px rgba(56, 189, 248, 0.06),
            0 0 0 2px rgba(94, 234, 212, 0.2);
    }
    100% {
        box-shadow:
            0 0 0 22px rgba(45, 212, 191, 0),
            0 0 0 32px rgba(56, 189, 248, 0),
            0 0 0 0 rgba(94, 234, 212, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .stone-btn:hover::before,
    .stone-btn:hover::after {
        animation: none !important;
        opacity: 0.35;
    }

    .stone-btn:hover {
        transform: none;
    }
}

.stone-btn--primary {
    background: linear-gradient(155deg, var(--color-stone-zen-800) 0%, var(--color-stone-zen-900) 45%, #1a1816 100%);
    color: #faf8f5;
    padding: 0.65rem 1.35rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.stone-btn--lg {
    padding: 0.85rem 1.65rem;
    font-size: 0.9375rem;
}

.stone-btn--outline.stone-btn--lg {
    padding: 0.8rem 1.55rem;
    font-size: 0.9375rem;
}

.stone-btn--outline {
    background: linear-gradient(160deg, #fdfcfa 0%, #ebe6e0 100%);
    color: var(--color-stone-zen-900);
    padding: 0.55rem 1.15rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid rgba(44, 40, 37, 0.12);
    box-shadow:
        inset 2px 3px 8px rgba(255, 255, 255, 0.65),
        inset -2px -3px 8px rgba(0, 0, 0, 0.06),
        0 5px 14px rgba(44, 40, 37, 0.1);
}

.stone-btn--outline:hover {
    box-shadow:
        inset 3px 4px 10px rgba(255, 255, 255, 0.75),
        inset -3px -4px 10px rgba(0, 0, 0, 0.05),
        0 8px 22px rgba(44, 40, 37, 0.12),
        0 3px 8px rgba(13, 148, 136, 0.1);
}

.stone-btn--danger {
    background: linear-gradient(155deg, #7f1d1d 0%, #5c1515 50%, #451010 100%);
    color: #fff5f5;
    padding: 0.45rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.stone-btn--danger:hover {
    box-shadow:
        inset 4px 5px 12px rgba(255, 255, 255, 0.15),
        inset -4px -6px 14px rgba(0, 0, 0, 0.25),
        0 10px 28px rgba(127, 29, 29, 0.35),
        0 4px 8px rgba(13, 148, 136, 0.1);
}

.stone-btn--link {
    background: linear-gradient(165deg, #f5f0e8 0%, #e8e0d4 100%);
    color: var(--color-stone-zen-800);
    padding: 0.35rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid rgba(44, 40, 37, 0.08);
    box-shadow:
        inset 1px 2px 6px rgba(255, 255, 255, 0.55),
        inset -1px -2px 6px rgba(0, 0, 0, 0.05),
        0 3px 10px rgba(44, 40, 37, 0.08);
}

.stone-btn--link:hover {
    box-shadow:
        inset 2px 3px 8px rgba(255, 255, 255, 0.65),
        inset -2px -3px 8px rgba(0, 0, 0, 0.04),
        0 6px 16px rgba(44, 40, 37, 0.1),
        0 2px 6px rgba(13, 148, 136, 0.08);
}
