@tailwind base;
@tailwind components;
@tailwind utilities;

/* 
  Jhey Tompkins Inspired "Whimsy & Click" Styles 
  Focus: Tactile interactions, playful movement, bold feedback.
*/

/* --- Tactile Buttons (.btn-click) --- */
.btn-click {
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    /* Default shadow for "unpressed" state */
    box-shadow: 0 4px 0 0 rgba(0, 0, 0, 0.2);
    transform: translateY(0);
}

/* Specific color overrides can be handled by utility classes, 
   but we need the shadow color to match or be a darker shade. 
   For simplicity in this refactor, we'll use a semi-transparent black 
   which works on most button colors. */

.btn-click:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 0 rgba(0, 0, 0, 0.2);
    filter: brightness(110%);
}

.btn-click:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2);
    /* Shadow disappears on press */
}

/* --- Playful Cards (.card-hover) --- */
.card-hover {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: scale(1.02) rotate(1deg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10;
    /* Pop to front */
}

/* Alternate rotation for variety if needed */
.card-hover.alt-rotate:hover {
    transform: scale(1.02) rotate(-1deg);
}

/* --- Whimsy Inputs (.input-whimsy) --- */
.input-whimsy {
    transition: all 0.2s ease;
    border: 2px solid #e5e7eb;
    /* gray-200 */
}

.input-whimsy:focus {
    outline: none;
    border-color: #0056D2;
    /* brand-600 */
    box-shadow: 4px 4px 0 0 #BAE6FD;
    /* brand-200 offset shadow */
    transform: translate(-2px, -2px);
}

/* --- Custom Checkbox Animation --- */
/* We'll use a wrapper or standard appearance override */
.checkbox-whimsy {
    appearance: none;
    background-color: #fff;
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 1.25em;
    height: 1.25em;
    border: 2px solid #cbd5e1;
    border-radius: 0.35em;
    display: grid;
    place-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.checkbox-whimsy::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em white;
    background-color: white;
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.checkbox-whimsy:checked {
    background-color: #0056D2;
    border-color: #0056D2;
    transform: scale(1.1);
}

.checkbox-whimsy:checked::before {
    transform: scale(1);
}

/* --- Reveal Animation (Existing, just ensuring it's here) --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

/* --- Custom Scrollbar --- */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}