/* Goose.re Custom Animations & Utilities */

/* Fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Slide in from left (sidebar) */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.3s ease-out forwards;
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.3s ease-out forwards;
}

/* Scale up (modals) */
@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-scale-up {
    animation: scaleUp 0.2s ease-out forwards;
}

/* Skeleton loading pulse */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

/* Smooth transitions */
.transition-smooth {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger children animations */
.stagger-children>*:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 0.15s;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 0.2s;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 0.25s;
}

.stagger-children>*:nth-child(n+6) {
    animation-delay: 0.3s;
}

/* Countdown circle animation */
@keyframes countdown {
    from {
        stroke-dashoffset: 0;
    }

    to {
        stroke-dashoffset: 113;
    }
}

/* Accent color override class */
.accent-accent {
    accent-color: var(--color-accent);
}

/* Custom background image styling */
.hero-bg-grass {
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

.dark .hero-bg-grass {
    opacity: 0.25;
}

/* CTA background image of a goose in the sky */
.cta-bg-sky {
    background-image: url('/assets/img/backgrounds/gooses-in-sky-hd.jpg');
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.dark .cta-bg-sky {
    opacity: 0.8;
}

/* Inline editable preview overrides to ignore global form styling */
.preview-input {
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.dark .preview-input {
    background-color: var(--surface) !important;
}

.preview-input:focus {
    outline: none !important;
    box-shadow: none !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.dark .preview-input:focus {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Ensure all buttons and interactive elements show pointer cursor */
button,
select,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"] {
    cursor: pointer;
}

/* Ensure disabled buttons show not-allowed cursor */
button:disabled,
button[disabled],
input:disabled,
input[disabled],
select:disabled,
[role="button"][disabled] {
    cursor: not-allowed !important;
}

/* Scroll-reveal system — elements start invisible and slide up on viewport entry */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Slide-up entrance for cards */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

/* Hero background image container with fade effects */
.hero-bg-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-bg-image {
    background-image: url('/assets/img/backgrounds/goose-on-grass-hd.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    opacity: 0.16;
    /* Dimmed background image so text is highly legible */
    transition: opacity 0.3s ease;
}

.dark .hero-bg-image {
    opacity: 0.12;
    /* Slightly dimmer in dark mode for high contrast */
}

/* Premium visible grid overlay with yellow/amber glow matching the branding */
.hero-visible-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(255, 193, 7, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 193, 7, 0.08) 1px, transparent 1px);
    mask-image: radial-gradient(circle at 50% 55%, black 40%, transparent 95%);
    -webkit-mask-image: radial-gradient(circle at 50% 55%, black 40%, transparent 95%);
}

.dark .hero-visible-grid {
    background-image:
        linear-gradient(to right, rgba(255, 193, 7, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 193, 7, 0.05) 1px, transparent 1px);
}