/* ============================================================
   BoatRent Customer — Animations & motion utilities
   Pure CSS, no runtime deps. Designed for the light-theme
   marketplace shell (Home / Storefront / Book / Success).
   ============================================================ */

/* ---------- Keyframes ---------- */

@keyframes fadeInUp {
    from { opacity: 0; transform: translate3d(0, 20px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translate3d(0, 40px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

@keyframes shine {
    0%   { transform: translateX(-120%) skewX(-20deg); }
    100% { transform: translateX(220%) skewX(-20deg); }
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

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

@keyframes pulseSoft {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.08); opacity: 0.85; }
}

@keyframes heartPop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.4); }
    60%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes checkPop {
    0%   { transform: scale(0.3); opacity: 0; }
    60%  { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.35), 0 0 40px rgba(34, 197, 94, 0.15); }
    50%      { box-shadow: 0 0 30px rgba(34, 197, 94, 0.55), 0 0 60px rgba(34, 197, 94, 0.25); }
}

@keyframes waveScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes typewriter {
    from { width: 0; }
    to   { width: 100%; }
}

@keyframes caretBlink {
    50% { border-color: transparent; }
}

/* ---------- Utility classes ---------- */

.animate-fade-in     { animation: fadeIn 0.6s ease-out both; }
.animate-fade-in-up  { animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.animate-slide-up    { animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.animate-float       { animation: float 4s ease-in-out infinite; }
.animate-bounce-soft { animation: bounceSoft 1.6s ease-in-out infinite; }
.animate-pulse-soft  { animation: pulseSoft 2s ease-in-out infinite; }
.animate-heart-pop   { animation: heartPop 0.45s ease-out; }
.animate-check-pop   { animation: checkPop 0.65s cubic-bezier(0.16, 1, 0.3, 1) both; }
.animate-glow        { animation: glow 2.4s ease-in-out infinite; }
.animate-gradient    {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* ---------- Stagger children ---------- */

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.15s; }
.stagger-3 { animation-delay: 0.25s; }
.stagger-4 { animation-delay: 0.35s; }
.stagger-5 { animation-delay: 0.45s; }
.stagger-6 { animation-delay: 0.55s; }
.stagger-7 { animation-delay: 0.65s; }
.stagger-8 { animation-delay: 0.75s; }

/* ---------- Hover-lift for cards ---------- */

.hover-lift {
    transition:
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.25s ease;
    will-change: transform;
}
.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.25);
}

/* ---------- Shimmer skeleton ---------- */

.shimmer {
    background: linear-gradient(
        90deg,
        #f1f5f9 0%,
        #e2e8f0 40%,
        #f8fafc 50%,
        #e2e8f0 60%,
        #f1f5f9 100%
    );
    background-size: 800px 100%;
    animation: shimmer 1.6s linear infinite;
    border-radius: 0.5rem;
}

/* ---------- Glassmorphism ---------- */

.glass {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 20px 60px -20px rgba(15, 23, 42, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.glass-dark {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
}

/* ---------- Animated brand gradient text ---------- */

.gradient-text-animated {
    background: linear-gradient(90deg, #2563eb, #06b6d4, #22d3ee, #06b6d4, #2563eb);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 8s linear infinite;
}

/* ---------- Scroll reveal ---------- */

.reveal {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal.in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.reveal-left    { transform: translate3d(-30px, 0, 0); }
.reveal-right   { transform: translate3d(30px, 0, 0); }
.reveal-left.in-view,
.reveal-right.in-view { transform: translate3d(0, 0, 0); }

/* ---------- Shine sweep on primary CTAs ---------- */

.shine-on-hover {
    position: relative;
    overflow: hidden;
}
.shine-on-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 100%
    );
    transform: translateX(-120%) skewX(-20deg);
    pointer-events: none;
}
.shine-on-hover:hover::before {
    animation: shine 0.9s ease-out;
}

/* ---------- Ocean waves (SVG-backed hero decoration) ---------- */

.waves-wrap {
    position: absolute;
    inset-inline: 0;
    bottom: -1px;
    height: 90px;
    overflow: hidden;
    pointer-events: none;
}
.waves-svg {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    width: 200%;
    height: 100%;
    animation: waveScroll 18s linear infinite;
}

/* ---------- Floating label inputs ---------- */

.float-field {
    position: relative;
}
.float-field .float-input {
    width: 100%;
    padding: 1.15rem 0.9rem 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    background: white;
    font-size: 0.95rem;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.float-field .float-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.float-field .float-label {
    position: absolute;
    left: 0.95rem;
    top: 0.85rem;
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
    transition: transform 0.18s ease, color 0.18s ease, font-size 0.18s ease;
    background: transparent;
}
.float-field .float-input:focus ~ .float-label,
.float-field .float-input:not(:placeholder-shown) ~ .float-label {
    transform: translateY(-0.75rem);
    font-size: 0.7rem;
    color: #2563eb;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ---------- Number ticker (animated total) ---------- */

.ticker {
    transition: color 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
}
.ticker.bump {
    transform: scale(1.06);
    color: #06b6d4;
}

/* ---------- Typewriter (reference code reveal) ---------- */

.typewriter {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #2563eb;
    animation:
        typewriter 1.1s steps(20, end) both,
        caretBlink 0.9s step-end 6;
}

/* ---------- Reduced motion — respect user preference ---------- */

@media (prefers-reduced-motion: reduce) {
    .animate-fade-in,
    .animate-fade-in-up,
    .animate-slide-up,
    .animate-float,
    .animate-bounce-soft,
    .animate-pulse-soft,
    .animate-heart-pop,
    .animate-check-pop,
    .animate-glow,
    .animate-gradient,
    .gradient-text-animated,
    .shimmer,
    .waves-svg,
    .typewriter {
        animation: none !important;
    }
    .reveal { opacity: 1; transform: none !important; transition: none; }
    .hover-lift:hover { transform: none; }
    .shine-on-hover:hover::before { animation: none; }
}
