/* Oswald's Fertilization - Custom Styles */
/* This file complements Tailwind CSS with custom design elements */

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Base styles */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #fdfbf7; /* cream-50 */
    color: #1a1a1a;
    line-height: 1.6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #faf5ee; /* cream-100 */
}

::-webkit-scrollbar-thumb {
    background: #166534; /* emerald-800 */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #14532d; /* emerald-900 */
}

/* Typography enhancements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Button hover effects with transform */
.btn-primary,
.btn-secondary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(20, 83, 45, 0.3);
}

.btn-secondary:hover {
    background-color: #166534;
    color: white;
    transform: translateY(-2px);
}

/* Card hover effects */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(20, 83, 45, 0.15);
}

/* Image frame decorative border */
.image-frame {
    position: relative;
}

.image-frame::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid #15803d; /* emerald-700 */
    z-index: -1;
    transition: all 0.3s ease;
}

.image-frame:hover::after {
    top: 15px;
    left: 15px;
    right: -15px;
    bottom: -15px;
}

/* Navigation scroll effect */
.nav-scrolled {
    background-color: rgba(253, 251, 247, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Mobile menu transitions */
.mobile-menu {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form input focus states */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #15803d; /* emerald-700 */
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.1);
}

/* Testimonial card left border animation */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    border-left-width: 6px;
    padding-left: calc(2.5rem - 2px);
}

/* Process step number styling */
.process-step::before {
    transition: all 0.3s ease;
}

.process-step:hover::before {
    color: #166534; /* emerald-800 */
}

/* Stat number animation on scroll */
.stat-number {
    transition: all 0.6s ease;
}

/* Decorative line animation */
.decoration-line {
    transition: width 0.3s ease;
}

.decoration-line:hover {
    width: 120px;
}

/* Image lazy loading fade-in */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Print styles */
@media print {
    .btn-primary,
    .btn-secondary {
        background-color: #166534 !important;
        color: white !important;
        border: none !important;
    }
    
    .hero-split {
        grid-template-columns: 1fr !important;
    }
    
    .image-frame::after {
        display: none;
    }
}

/* Accessibility: Focus visible styles */
*:focus-visible {
    outline: 3px solid #166534;
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card {
        border: 2px solid #000;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    :root {
        --cream-50: #1a1a1a;
        --cream-100: #2a2a2a;
        --cream-200: #3a3a3a;
    }
}

/* Utility classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-gradient-emerald {
    background: linear-gradient(135deg, #14532d 0%, #166534 50%, #15803d 100%);
}

.bg-gradient-cream {
    background: linear-gradient(135deg, #fdfbf7 0%, #faf5ee 50%, #f5edd8 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .headline-large {
        font-size: 2.5rem;
    }
    
    .headline-medium {
        font-size: 2rem;
    }
    
    .headline-small {
        font-size: 1.5rem;
    }
    
    .image-frame::after {
        display: none;
    }
    
    .process-step {
        padding-left: 0;
        margin-bottom: 2rem;
    }
    
    .process-step::before {
        display: none;
    }
}

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

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

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

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

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

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

/* Delay classes for staggered animations */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}
