/* ================================================
   Tailwind CSS Overrides & Extensions
   My Sweet Potato - Premium Catering Brand
   ================================================ */

/* ------------------------------------------------
   Custom Tailwind-like Utilities
   ------------------------------------------------ */

/* Brand Colors as Utilities */
.text-primary { color: #8f4e94 !important; }
.text-primary-dark { color: #6d3a72 !important; }
.text-accent { color: #f5ae00 !important; }
.text-charcoal { color: #374151 !important; }

.bg-primary { background-color: #8f4e94 !important; }
.bg-primary-dark { background-color: #6d3a72 !important; }
.bg-accent { background-color: #f5ae00 !important; }
.bg-off-white { background-color: #faf8fb !important; }
.bg-cream { background-color: #f9f6f2 !important; }

.border-primary { border-color: #8f4e94 !important; }
.border-accent { border-color: #f5ae00 !important; }

/* Hover states */
.hover\:bg-primary-dark:hover { background-color: #6d3a72 !important; }
.hover\:text-primary:hover { color: #8f4e94 !important; }
.hover\:border-primary:hover { border-color: #8f4e94 !important; }

/* Focus states */
.focus\:ring-primary:focus { 
    --tw-ring-color: rgba(143, 78, 148, 0.5);
}

/* ------------------------------------------------
   Font Family Extensions
   ------------------------------------------------ */
.font-serif-display {
    font-family: 'Playfair Display', Georgia, serif;
}

.font-script {
    font-family: 'Herr Von Muellerhoff', cursive;
}

/* ------------------------------------------------
   Shadow Extensions
   ------------------------------------------------ */
.shadow-brand-sm {
    box-shadow: 0 1px 2px 0 rgba(143, 78, 148, 0.05);
}

.shadow-brand {
    box-shadow: 0 4px 6px -1px rgba(143, 78, 148, 0.1), 0 2px 4px -2px rgba(143, 78, 148, 0.1);
}

.shadow-brand-lg {
    box-shadow: 0 10px 15px -3px rgba(143, 78, 148, 0.1), 0 4px 6px -4px rgba(143, 78, 148, 0.1);
}

.shadow-brand-xl {
    box-shadow: 0 20px 25px -5px rgba(143, 78, 148, 0.1), 0 8px 10px -6px rgba(143, 78, 148, 0.1);
}

.shadow-soft {
    box-shadow: 0 25px 50px -12px rgba(143, 78, 148, 0.15);
}

/* ------------------------------------------------
   Gradient Backgrounds
   ------------------------------------------------ */
.bg-gradient-lavender {
    background: linear-gradient(135deg, rgba(143, 78, 148, 0.05) 0%, rgba(245, 174, 0, 0.03) 100%);
}

.bg-gradient-hero {
    background: linear-gradient(135deg, rgba(143, 78, 148, 0.85) 0%, rgba(109, 58, 114, 0.75) 100%);
}

.bg-gradient-soft {
    background: linear-gradient(180deg, rgba(143, 78, 148, 0.08) 0%, transparent 100%);
}

.bg-gradient-footer {
    background: linear-gradient(180deg, #faf8fb 0%, rgba(143, 78, 148, 0.05) 100%);
}

/* ------------------------------------------------
   Custom Spacing
   ------------------------------------------------ */
.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

/* ------------------------------------------------
   Aspect Ratio Helpers
   ------------------------------------------------ */
.aspect-4\/3 {
    aspect-ratio: 4 / 3;
}

.aspect-3\/4 {
    aspect-ratio: 3 / 4;
}

.aspect-16\/10 {
    aspect-ratio: 16 / 10;
}

/* ------------------------------------------------
   Animation Utilities
   ------------------------------------------------ */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Staggered animation delays */
.animation-delay-100 { animation-delay: 100ms; }
.animation-delay-200 { animation-delay: 200ms; }
.animation-delay-300 { animation-delay: 300ms; }
.animation-delay-400 { animation-delay: 400ms; }
.animation-delay-500 { animation-delay: 500ms; }

/* ------------------------------------------------
   Backdrop Blur Fallback
   ------------------------------------------------ */
@supports not (backdrop-filter: blur(10px)) {
    .backdrop-blur-custom {
        background-color: rgba(255, 255, 255, 0.95);
    }
}

/* ------------------------------------------------
   Form Focus Ring Override
   ------------------------------------------------ */
input:focus,
textarea:focus,
select:focus {
    --tw-ring-color: rgba(143, 78, 148, 0.5);
    border-color: #8f4e94;
}

/* ------------------------------------------------
   Prose Content Styling
   ------------------------------------------------ */
.prose-brand {
    --tw-prose-body: #374151;
    --tw-prose-headings: #1f2937;
    --tw-prose-links: #8f4e94;
}

.prose-brand a:hover {
    color: #6d3a72;
}

/* ------------------------------------------------
   Masonry Grid for Gallery
   ------------------------------------------------ */
.masonry-grid {
    column-count: 1;
    column-gap: 1rem;
}

@media (min-width: 640px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .masonry-grid {
        column-count: 3;
    }
}

.masonry-grid-item {
    break-inside: avoid;
    margin-bottom: 1rem;
}

/* ------------------------------------------------
   Custom Scrollbar
   ------------------------------------------------ */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f3f0f5;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #8f4e94;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #6d3a72;
}

/* ------------------------------------------------
   Text Balance for Headings
   ------------------------------------------------ */
.text-balance {
    text-wrap: balance;
}

/* ------------------------------------------------
   Container Max Widths Override
   ------------------------------------------------ */
.container-narrow {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

.container-wide {
    max-width: 90rem;
    margin-left: auto;
    margin-right: auto;
}
