/* ========================================
   Just Ink - Custom Styles
   Terracotta & Sand Editorial Design
======================================= */

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection Color */
::selection {
    background-color: #d68266;
    color: #faf9f7;
}

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

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Scroll Line Animation */
@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

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

/* ========================================
   Reveal Animations (Progressive Enhancement)
======================================= */

/* Default state: visible for accessibility */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: none;
}

/* Animated state (applied via JS or prefers-reduced-motion check) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b84f37;
}

/* ========================================
   Form Styles
======================================= */

input:focus,
select:focus,
textarea:focus {
    outline: none;
}

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

#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Focus Visible for Accessibility
======================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d68266;
    outline-offset: 2px;
}

/* ========================================
   Utility Classes
======================================= */

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

@media print {
    header,
    footer,
    .reveal {
        display: none;
    }
    
    body {
        color: #1a1614;
        background: white;
    }
}
