/* Base Styles */
html {
    font-family: 'Alexandria', 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
    font-family: 'El Messiri', 'Alexandria', serif;
    letter-spacing: -0.01em;
}

.brand-script {
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.05;
    text-transform: none;
    text-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

body {
    background: linear-gradient(180deg, #020617 0%, #0f172a 50%, #111827 100%);
    color: #e2e8f0;
}

img {
    max-width: 100%;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f59e0b, #1d4ed8);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #fbbf24, #2563eb);
}

/* Accessible focus ring, consistent across the site */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Premium section treatments */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.section-title {
    font-size: clamp(2rem, 3.4vw, 3rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #f8fafc;
    display: inline-block;
    transition: transform 0.3s ease, text-shadow 0.3s ease, letter-spacing 0.3s ease;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #fbbf24, #60a5fa);
    transition: width 0.35s ease;
}

.section-title:hover {
    transform: translateY(-2px);
    letter-spacing: -0.01em;
    text-shadow: 0 12px 24px rgba(96, 165, 250, 0.18);
}

.section-title:hover::after {
    width: 100%;
}

.section-lead {
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.8;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
}

.hero-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px -18px rgba(2, 6, 23, 0.6);
}

.hero-highlight i {
    color: #fbbf24;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
    font-size: 0.92rem;
    font-weight: 600;
}

.premium-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04)) !important;
    box-shadow: 0 24px 60px -24px rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(16px);
}

.premium-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(245, 158, 11, 0.15));
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 0;
}

.premium-card:hover::before {
    opacity: 1;
}

.premium-card > * {
    position: relative;
    z-index: 1;
}

.contact-shell {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.75), rgba(2, 6, 23, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 25px 60px -24px rgba(2, 6, 23, 0.75);
}

.product-highlight-card {
    position: relative;
    padding: 1.25rem 1.35rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 24px 60px -30px rgba(2, 6, 23, 0.6);
    overflow: hidden;
}

.product-highlight-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, #fbbf24 0%, #60a5fa 45%, #f472b6 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
}

.contact-panel {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 24px 50px -20px rgba(2, 6, 23, 0.8);
}

.footer-nav a {
    position: relative;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.25rem;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.footer-nav a:hover::after {
    transform: scaleX(1);
}

/* Gradient text accent for key words in headings */
.text-gradient-accent {
    background: linear-gradient(90deg, #fbbf24, #f59e0b 60%, #d97706);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Premium CTA button — subtle shine sweep on hover */
.btn-shine {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-shine::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.45) 40%, transparent 60%);
    transform: translateX(-120%);
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

.btn-shine:hover::before {
    transform: translateX(120%);
}

/* Elevated card hover treatment shared across benefit/detail cards */
.card-elevate {
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.3);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.35s ease,
        filter 0.35s ease;
    transform: translateY(0) scale(1);
    filter: saturate(0.96);
}

.card-elevate:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 35px -18px rgba(2, 6, 23, 0.6),
        0 0 28px -8px rgba(59, 130, 246, 0.35);
    border-color: rgba(245, 158, 11, 0.45) !important;
    filter: saturate(1.05);
}

.card-elevate:hover h3,
.card-elevate:hover .text-gradient-accent {
    color: #fbbf24;
}

/* ===== Splash / Loading Screen ===== */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.splash-logo {
    width: 280px;
    max-width: 70vw;
    object-fit: contain;
    animation: splashLogoIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    border-radius: 12px;
}

@keyframes splashLogoIn {
    0% {
        opacity: 0;
        transform: scale(0.7);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.splash-loader {
    width: 200px;
    max-width: 50vw;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    animation: splashLogoIn 0.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.splash-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #3b82f6, #22c55e);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: splashBarFill 1.8s 0.5s ease-in-out forwards, splashBarShimmer 1.5s 0.5s linear infinite;
}

@keyframes splashBarFill {
    0% {
        width: 0%;
    }

    60% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

@keyframes splashBarShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Glassmorphism Header */
.glass-header {
    background-color: transparent;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
}

.glass-header.scrolled {
    background-color: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

/* Hero Section - Full Page with Background Image */
.hero-bg-img {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Hero text staggered entrance animations */
.hero-title-line {
    opacity: 0;
    transform: translateY(40px);
    animation: heroTextReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title-line:nth-child(1) {
    animation-delay: 0.3s;
}

.hero-title-line:nth-child(2) {
    animation-delay: 0.5s;
}

.hero-title-line:nth-child(3) {
    animation-delay: 0.7s;
}

.hero-subtitle-line {
    opacity: 0;
    transform: translateY(30px);
    animation: heroTextReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

.hero-scroll-indicator {
    opacity: 0;
    transform: translateY(20px);
    animation: heroTextReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
}

@keyframes heroTextReveal {
    0% {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Scroll dot bounce animation */
.scroll-dot-anim {
    animation: scrollDotBounce 1.8s ease-in-out infinite;
}

@keyframes scrollDotBounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(16px);
        opacity: 0.3;
    }
}

/* Hero parallax scroll effect via JS class */
.hero-parallax-active .hero-bg-img {
    transform: scale(1.05);
}

/* Hero product image entrance animation */
.hero-product-img {
    opacity: 0;
    transform: translateX(60px) scale(0.95);
    animation: heroProductReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes heroProductReveal {
    0% {
        opacity: 0;
        transform: translateX(60px) scale(0.95);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

/* Animated Fluid Blob behind product */
.blob-shape {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: blob-bounce 8s ease-in-out infinite;
}

@keyframes blob-bounce {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(0deg) scale(1);
    }

    50% {
        border-radius: 50% 60% 70% 40% / 50% 60% 30% 60%;
        transform: rotate(180deg) scale(1.05);
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(360deg) scale(1);
    }
}

/* Scroll Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(10px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    filter: blur(8px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    filter: blur(8px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(8px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

/* Delay modifiers */
.reveal.delay-100 {
    transition-delay: 100ms;
}

.reveal.delay-200 {
    transition-delay: 200ms;
}

.reveal.delay-300 {
    transition-delay: 300ms;
}

/* Interactive Active Nav Link styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #f59e0b;
    /* Accent yellow */
    transition: width 0.3s ease;
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* Form success overlay control */
#formSuccess.show {
    display: flex;
    opacity: 1;
}

/* Show field validation errors */
.form-group.has-error .error-msg {
    display: block !important;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
}

#formStatus {
    display: none;
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

#formStatus.is-error {
    display: block;
    background: rgba(127, 29, 29, 0.45);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #fecaca;
}

#formStatus.is-success {
    display: block;
    background: rgba(20, 83, 45, 0.45);
    border: 1px solid rgba(74, 222, 128, 0.45);
    color: #bbf7d0;
}

/* Mobile Nav Menu Show/Hide transitions */
#mobile-menu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Direction aware icons (Arabic / French) */
html[dir="rtl"] .arrow-icon {
    transform: rotate(180deg);
}

html[dir="rtl"] .main-nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .main-nav> :not([hidden])~ :not([hidden]) {
    --tw-space-x-reverse: 1;
    margin-right: 2rem;
    margin-left: 0px;
}

/* How to use connecting line and active circle states */
.step-num-circle {
    transition: all 0.3s ease;
}

.step-num-circle.active {
    box-shadow: 0 0 0 8px rgba(30, 64, 175, 0.2);
}

/* Brand Font Styles */
.brand-wrapper {
    display: inline-flex;
    align-items: baseline;
    direction: ltr;
    margin: 0 0.25rem;
    vertical-align: bottom;
}

.brand-v {
    font-family: 'Great Vibes', cursive;
    font-size: 1.6em;
    margin-right: -0.03em;
    color: inherit;
    font-weight: normal;
    line-height: 0.8;
    padding-right: 0.05em;
}

.brand-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Scroll Animations */
.reveal-left {
    opacity: 0;
    transform: translateX(-60px) translateY(var(--parallax-y, 0));
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px) translateY(var(--parallax-y, 0));
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translateX(0) translateY(var(--parallax-y, 0));
}

.parallax-text {
    /* Smooth transition for parallax to avoid jitter */
    transition: transform 0.1s ease-out, opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================ */
/*  Staggered Text Reveal Animation on Scroll   */
/* ============================================ */
.animate-title .line-wrapper {
    /* This creates the "mask" to hide the text */
    display: inline-block;
    overflow: hidden;
    padding: 2px 0;
    /* Adjust if letters get cut off */
}

.animate-title .line-content {
    display: inline-block;
    /* Initially hidden and moved down */
    opacity: 0;
    transform: translateY(110%);
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When the parent is active, reveal the line */
.animate-title.active .line-content {
    opacity: 1;
    transform: translateY(0);
}