@font-face {
    font-family: 'Safira March';
    src: url('../fonts/SafiraMarchPersonalUse.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Custom Selection Color from Design System */
::selection {
    background-color: rgba(75, 49, 66, 0.2); /* outline-variant */
    color: #4b3142; /* primary */
}

/* Typography Utilities */
.font-safira {
    font-family: 'Safira March', 'Noto Serif Display', serif;
}

.font-safira-fancy {
    font-family: 'Safira March', serif;
    font-feature-settings: "swsh" 1, "ss01" 1, "liga" 1;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fdf9f2; /* surface */
}
::-webkit-scrollbar-thumb {
    background: rgba(75, 49, 66, 0.4); /* primary container semi-transparent */
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4b3142; /* primary */
}

/* Scroll Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }

/* Parallax Effect Utility */
.hero-parallax {
    transform: translateY(0);
    will-change: transform;
}

/* Mobile Nav Overlay transition styles */
#mobile-menu {
    transition: opacity 0.4s ease-in-out;
}

/* Scrolled Navbar State */
.nav-scrolled {
    background-color: rgba(253, 249, 242, 0.95) !important; /* surface with opacity */
    backdrop-filter: blur(12px);
    padding-top: 1.2rem !important;
    padding-bottom: 1.2rem !important;
    border-bottom: 1px solid rgba(75, 49, 66, 0.1);
}

/* Mobile Link Hover Effect - Artisanal Edition */
.mobile-link {
    position: relative;
    display: inline-block;
}
.mobile-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: #644759; /* primary-container */
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mobile-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Input Focus Transitions */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Bento Grid Hover Effects */
.ingredients-grid:hover .bento-cell:not(:hover) {
    opacity: 0.8;
    filter: brightness(0.6);
}
.bento-cell {
    transition: opacity 0.5s ease, filter 0.5s ease;
}

/* Floating Elements Styles */
@keyframes ethereal-float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
    100% {
        transform: translateY(0px);
    }
}

.float-effect {
    animation: ethereal-float 7s ease-in-out infinite;
}

.float-effect-delayed {
    animation: ethereal-float 7s ease-in-out infinite;
    animation-delay: 3.5s;
}

.image-container-float {
    position: relative;
    z-index: 10;
}
.image-container-float::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 15%;
    width: 70%;
    height: 15px;
    background: radial-gradient(ellipse at center, rgba(75, 49, 66, 0.15) 0%, transparent 70%);
    opacity: 0.7;
    border-radius: 50%;
    z-index: -1;
    filter: blur(5px);
    animation: shadow-pulse 7s ease-in-out infinite;
}
.image-container-float:nth-child(2)::after {
    animation-delay: 3.5s;
}

@keyframes shadow-pulse {
    0% {
        transform: scaleX(1) scaleY(1);
        opacity: 0.7;
    }
    50% {
        transform: scaleX(0.85) scaleY(0.9);
        opacity: 0.3;
    }
    100% {
        transform: scaleX(1) scaleY(1);
        opacity: 0.7;
    }
}

.interactive-container {
    cursor: pointer;
}
.interactive-container img {
    will-change: transform;
}

/* Testimonial Section Refinements */
.view-full-testimonial {
    position: relative;
    font-size: 1.25rem;
    line-height: 0;
    vertical-align: middle;
    padding: 0 4px;
    border-radius: 4px;
}

.view-full-testimonial:hover {
    background-color: rgba(75, 49, 66, 0.05);
}

#testimonial-modal {
    scrollbar-width: none; /* Firefox */
}

#testimonial-modal::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

@keyframes modal-pop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-animate-in {
    animation: modal-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
