/* ==========================================
   Cafecito Tañer — Custom Styles
   ========================================== */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* ==========================================
   Animations
   ========================================== */

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes floatDelay {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.03); }
}

@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

@keyframes blobDelay {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-25px, 15px) scale(1.05); }
    66% { transform: translate(15px, -25px) scale(0.95); }
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0.7; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.7; }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out both;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.animate-fade-in-up-delay {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.animate-fade-in-up-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: floatDelay 7s ease-in-out 1s infinite;
}

.animate-blob {
    animation: blob 8s ease-in-out infinite;
}

.animate-blob-delay {
    animation: blob 9s ease-in-out 2s infinite;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ==========================================
   Scroll Reveal
   ========================================== */

.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered reveal delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ==========================================
   Navigation
   ========================================== */

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ==========================================
   Mobile Menu
   ========================================== */

.mobile-link {
    position: relative;
}

/* ==========================================
   Buttons
   ========================================== */

button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================
   Selection
   ========================================== */

::selection {
    background: #047857;
    color: white;
}

/* ==========================================
   Custom Scrollbar
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FDF8F0;
}

::-webkit-scrollbar-thumb {
    background: #047857;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #065f46;
}

/* ==========================================
   Focus Styles
   ========================================== */

:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ==========================================
   Utility Overrides
   ========================================== */

/* Ensure form selects show custom arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
    nav, #back-to-top, .animate-float, .animate-float-delay, .animate-blob, .animate-blob-delay {
        display: none !important;
    }
    
    body {
        color: #1a1a1a;
        background: white;
    }
}
