/* ==========================================================================
   OMID — Premium Scroll Animations & Hover Effects
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. KEYFRAME DEFINITIONS
   -------------------------------------------------------------------------- */

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

@keyframes omidFadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes omidFadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes omidScaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes omidShimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes omidFloatSoft {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes omidGoldLineGrow {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes omidPulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(201, 169, 110, 0);
    }
    50% {
        box-shadow: 0 0 20px 4px rgba(201, 169, 110, 0.15);
    }
}

@keyframes omidTextReveal {
    from {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }
    to {
        clip-path: inset(0 0% 0 0);
        opacity: 1;
    }
}

/* --------------------------------------------------------------------------
   2. SCROLL-TRIGGERED ANIMATION BASE CLASSES
   -------------------------------------------------------------------------- */

/* Hidden state before scroll trigger */
.omid-animate {
    opacity: 0;
    transition: opacity 0.1s ease;
}

/* Visible state — applied by IntersectionObserver */
.omid-animate.omid-visible {
    opacity: 1;
}

/* Kill Switch Override: Instantly visible and no animations if premium mode is disabled */
body.disable-animations .omid-animate {
    opacity: 1 !important;
    animation: none !important;
    transition: none !important;
    transform: none !important;
    clip-path: none !important;
}

/* Direction-specific animations */
.omid-animate[data-animate="fade-up"].omid-visible {
    animation: omidFadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.omid-animate[data-animate="fade-left"].omid-visible {
    animation: omidFadeInLeft 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.omid-animate[data-animate="fade-right"].omid-visible {
    animation: omidFadeInRight 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.omid-animate[data-animate="fade-in"].omid-visible {
    animation: omidFadeIn 0.8s ease-out forwards;
}

.omid-animate[data-animate="scale-in"].omid-visible {
    animation: omidScaleIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.omid-animate[data-animate="text-reveal"].omid-visible {
    animation: omidTextReveal 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Staggered delays for child elements */
.omid-animate.omid-visible .omid-stagger:nth-child(1) { animation-delay: 0s; }
.omid-animate.omid-visible .omid-stagger:nth-child(2) { animation-delay: 0.12s; }
.omid-animate.omid-visible .omid-stagger:nth-child(3) { animation-delay: 0.24s; }
.omid-animate.omid-visible .omid-stagger:nth-child(4) { animation-delay: 0.36s; }
.omid-animate.omid-visible .omid-stagger:nth-child(5) { animation-delay: 0.48s; }

/* Animation delay utilities */
.omid-delay-1 { animation-delay: 0.15s !important; }
.omid-delay-2 { animation-delay: 0.3s !important; }
.omid-delay-3 { animation-delay: 0.45s !important; }
.omid-delay-4 { animation-delay: 0.6s !important; }

/* --------------------------------------------------------------------------
   3. HERO SECTION ANIMATIONS
   -------------------------------------------------------------------------- */

/* Soft floating hero heading */
.hero-heading-new {
    animation: omidFloatSoft 5s ease-in-out infinite;
}

/* Hero overlay gradient for depth */
.hero-content .carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(11, 14, 19, 0.3) 0%,
        rgba(11, 14, 19, 0.1) 40%,
        rgba(11, 14, 19, 0.5) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.hero-content .carousel-item .text-center {
    position: relative;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   4. BUTTON EFFECTS
   -------------------------------------------------------------------------- */

/* Shimmer hover effect on primary buttons */
.btn-primary-sm {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary-sm::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(201, 169, 110, 0.15),
        transparent
    );
    transition: left 0.6s ease;
}

.btn-primary-sm:hover::before {
    left: 100%;
}

.btn-primary-sm:hover {
    transform: translateY(-2px);
    text-shadow: 0 0 12px rgba(201, 169, 110, 0.4);
}

/* Gold pulse glow on primary buttons */
.btn-primary:hover {
    animation: omidPulseGlow 1.5s ease infinite;
}

/* --------------------------------------------------------------------------
   5. IMAGE HOVER EFFECTS
   -------------------------------------------------------------------------- */

/* Smooth zoom on product/favorite images */
section.overflow-hidden .row img,
.image-box-highlight img {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), 
                filter 0.5s ease;
}

section.overflow-hidden .row img:hover,
.image-box-highlight img:hover {
    transform: scale(1.04);
    filter: brightness(1.08);
}

/* --------------------------------------------------------------------------
   6. SECTION DIVIDER ANIMATED LINE
   -------------------------------------------------------------------------- */

.home-page-section-divider {
    position: relative;
    overflow: hidden;
}

.home-page-section-divider::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, transparent, #9498d2, transparent);
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-page-section-divider.omid-visible::after {
    width: 100%;
}

/* --------------------------------------------------------------------------
   7. ABOUT SECTION ENHANCEMENTS
   -------------------------------------------------------------------------- */

.about-us-section {
    position: relative;
    padding-top: 130px !important;
    padding-bottom: 90px !important;
}

.about-us-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 152, 210, 0.3), transparent);
}

.about-us-section h3 {
    font-size: 1.8rem !important;
    font-weight: 500 !important;
    letter-spacing: 2px !important;
}

.about-us-section p {
    font-size: 1.35rem !important;
    line-height: 1.8 !important;
    font-weight: 300 !important;
    color: var(--omid-main-text-color) !important;
}

.about-us-section .expand-button {
    font-size: 0.95rem !important;
    letter-spacing: 1px !important;
    font-weight: 500 !important;
    margin-top: 20px !important;
}



.home-page-step-title {
    letter-spacing: 0.5px !important;
}

/* --------------------------------------------------------------------------
   8. STEP TIMELINE ENHANCEMENTS
   -------------------------------------------------------------------------- */

.home-page-step-count {
    position: relative;
    display: inline-block;
}

.home-page-step-count::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 30px;
    height: 1px;
    background: #9498d2;
    transition: width 0.6s ease;
}

.home-page-step-entry:hover .home-page-step-count::after {
    width: 60px;
}

.home-page-step-title {
    transition: color 0.3s ease, letter-spacing 0.4s ease;
}

.home-page-step-entry:hover .home-page-step-title {
    letter-spacing: -1px;
}

/* --------------------------------------------------------------------------
   9. MAILING LIST SECTION
   -------------------------------------------------------------------------- */

.join-mailing-list-container {
    position: relative;
    overflow: hidden;
}

.join-mailing-list-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at 30% 50%,
        rgba(148, 152, 210, 0.06) 0%,
        transparent 50%
    );
    animation: omidFloatSoft 8s ease-in-out infinite;
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0);
}

/* Email input focus glow */
.join-mailing-list-container .form-control-underlined:focus {
    border-bottom-color: #9498d2 !important;
    box-shadow: 0 2px 8px rgba(148, 152, 210, 0.2) !important;
}

/* --------------------------------------------------------------------------
   10. SHOWROOM SECTION HOVER
   -------------------------------------------------------------------------- */

.home-page-showroom-entry {
    transition: transform 0.5s ease;
}

/* --------------------------------------------------------------------------
   11. NAVBAR ENHANCEMENTS
   -------------------------------------------------------------------------- */

.navbar-brand {
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.navbar-brand:hover {
    text-shadow: 0 0 20px rgba(201, 169, 110, 0.4);
}

/* Smooth dropdown appearance */
.dropdown-menu-animated {
    animation: omidFadeInUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   12. SMOOTH SCROLL & GENERAL TRANSITIONS
   -------------------------------------------------------------------------- */

/* Smooth scroll for entire page (managed by Lenis JS now) */
html {
    /* scroll-behavior: smooth; removed for Lenis */
}

/* Global link transition */
a {
    transition: color 0.3s ease, opacity 0.3s ease;
}

/* Carousel crossfade enhancement */
.carousel-fade .carousel-item {
    transition: opacity 1.2s ease-in-out !important;
}

/* --------------------------------------------------------------------------
   13. REDUCED MOTION ACCESSIBILITY
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .omid-animate,
    .omid-animate.omid-visible,
    .hero-heading-new,
    .btn-primary-sm,
    .btn-primary,
    .home-page-section-divider::after,
    .join-mailing-list-container::before {
        animation: none !important;
        transition: none !important;
    }

    .omid-animate {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --------------------------------------------------------------------------
   14. BORDER REMOVAL OVERRIDES
   -------------------------------------------------------------------------- */

/* Remove thin frame borders around text and image boxes */
.image-box-highlight {
    border: none !important;
    padding: 0 !important;
}

/* Remove colored outline/border wrappers around clipped showroom images */
.home-page-showroom-wrapper-outer-1,
.home-page-showroom-wrapper-outer-2 {
    background: transparent !important;
    padding: 0 !important;
}

/* Remove colored outline/border wrappers around timeline steps */
.home-page-step-wrapper-outer-1,
.home-page-step-wrapper-outer-2,
.home-page-step-wrapper-outer-3,
.home-page-step-wrapper-outer-4 {
    background: transparent !important;
    padding: 0 !important;
}

/* --------------------------------------------------------------------------
   15. TIMELINE STEP TEXT POSITIONING OVERRIDES
   -------------------------------------------------------------------------- */

/* Bring Step 1 text up */
.home-page-step-timeline .home-page-step-entry:nth-child(1) .home-page-step-content {
    justify-content: flex-start !important;
    padding-top: 60px !important;
}

/* Lower Step 2 text */
.home-page-step-timeline .home-page-step-entry:nth-child(2) .home-page-step-content {
    justify-content: flex-end !important;
    padding-bottom: 60px !important;
}

/* Adjust timeline heights from 100vh to 65vh */
.home-page-step-entry {
    min-height: 65vh !important;
}

.home-page-step-wrapper-1,
.home-page-step-wrapper-2,
.home-page-step-wrapper-3,
.home-page-step-wrapper-4 {
    min-height: 65vh !important;
}

/* Pull Step 1 and Step 2 closer together to compensate for the diagonal cutout */
.home-page-step-entry-2 {
    margin-top: -15vh !important;
    position: relative;
    z-index: 2;
}

/* Add space between Step 2, Step 3, and Step 4 */
.home-page-step-entry-3 {
    margin-top: 10vh !important;
    position: relative;
    z-index: 3;
}

.home-page-step-entry-4 {
    margin-top: 10vh !important;
    position: relative;
    z-index: 4;
}

/* Reset overlapping margins and positioning on mobile devices */
@media (max-width: 991.98px) {
    .home-page-step-entry-2,
    .home-page-step-entry-3,
    .home-page-step-entry-4 {
        margin-top: 3rem !important;
    }
    .home-page-step-timeline .home-page-step-entry:nth-child(1) .home-page-step-content,
    .home-page-step-timeline .home-page-step-entry:nth-child(2) .home-page-step-content {
        padding: 0 !important;
        justify-content: flex-start !important;
    }
    .home-page-step-entry {
        min-height: auto !important;
        padding-bottom: 3rem !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .home-page-step-content {
        order: 2 !important;
        margin-top: 2rem !important;
        padding: 0 15px !important;
    }
    .home-page-step-wrapper-outer-1,
    .home-page-step-wrapper-outer-2,
    .home-page-step-wrapper-outer-3,
    .home-page-step-wrapper-outer-4 {
        order: 1 !important;
        min-height: 45vh !important;
        width: 100% !important;
    }
    .home-page-step-wrapper-1,
    .home-page-step-wrapper-2,
    .home-page-step-wrapper-3,
    .home-page-step-wrapper-4 {
        min-height: 45vh !important;
    }
}

