:root {
    --color-primary: #166534;
    --color-primary-rgb: 22, 101, 52;
    --color-secondary: #0f7a55;
    --color-secondary-rgb: 15, 122, 85;
    --color-accent: #d4b34c;
    --color-accent-rgb: 212, 179, 76;
    --color-surface: #ffffff;
    --color-surface-muted: #f6f9f7;
    --color-ink: #0b1f13;
    --color-ink-rgb: 11, 31, 19;
}

.bg-primary {
    background-color: var(--color-primary) !important;
}

.bg-primary\/10 {
    background-color: rgba(var(--color-primary-rgb), 0.1) !important;
}

.bg-primary\/20 {
    background-color: rgba(var(--color-primary-rgb), 0.2) !important;
}

.text-primary {
    color: var(--color-primary) !important;
}

.text-yellow-300 {
    color: var(--color-accent) !important;
}

.hero-title {
    min-height: 3.4em;
}

.hero-highlight {
    display: block;
    min-height: 1.2em;
}

body {
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    background-color: var(--color-surface);
    color: var(--color-ink);
    line-height: 1.65;
    font-size-adjust: 0.52;
}

.parallax-bg {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

.scale-on-scroll {
    transform: scale(0.9);
    transition: transform 0.8s ease-out;
}

.scale-on-scroll.visible {
    transform: scale(1);
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-hover {
    transition: all 0.3s ease;
    background-color: var(--color-surface) !important;
    border-color: rgba(var(--color-primary-rgb), 0.08) !important;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(var(--color-primary-rgb), 0.2);
    border-color: rgba(var(--color-primary-rgb), 0.22) !important;
}

.phone-mockup {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.sticky-nav {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.hero-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    align-items: center;
}

.hero-copy {
    max-width: 520px;
    margin-inline: auto;
}

.hero-copy h1 {
    letter-spacing: -0.5px;
}

@media (min-width: 1024px) {
    .hero-copy {
        margin-inline-start: 0;
        margin-inline-end: 0;
    }
}

@media (max-width: 480px) {
    .hero-badge {
        font-size: 0.85rem;
    }

    h1,
    .text-5xl,
    .lg\:text-7xl {
        font-size: 2rem !important;
    }

    h2,
    .text-4xl,
    .lg\:text-5xl {
        font-size: 1.3rem !important;
    }

    .text-xl,
    .lg\:text-2xl {
        font-size: 1rem !important;
    }

    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .hero-content .grid {
        gap: 3rem !important;
    }

    .phone-mockup {
        max-width: 260px;
    }

    .features-grid-mobile {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-hover {
        border-radius: 1.25rem !important;
        padding: 1.5rem !important;
        background: rgba(var(--color-primary-rgb), 0.04) !important;
        box-shadow: 0 12px 30px rgba(var(--color-primary-rgb), 0.12);
        backdrop-filter: blur(10px);
    }

    .card-hover .w-16 {
        width: 3.25rem !important;
        height: 3.25rem !important;
    }

    .card-hover h3 {
        font-size: 1.15rem;
    }

    .get-started-card {
        padding: 1.75rem !important;
        gap: 1.5rem !important;
    }

    .get-started-card .grid {
        gap: 0.75rem !important;
    }

    .get-started-card button {
        font-size: 1.05rem !important;
        padding: 0.9rem 1.25rem !important;
    }

    .hero-copy {
        margin-inline: auto;
    }
}

/* Animation Staggering */
.fade-in:nth-child(1) {
    transition-delay: 0s;
}

.fade-in:nth-child(2) {
    transition-delay: 0.15s;
}

.fade-in:nth-child(3) {
    transition-delay: 0.3s;
}

.fade-in:nth-child(4) {
    transition-delay: 0.45s;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-primary: #1c8d5a;
        --color-primary-rgb: 28, 141, 90;
        --color-secondary: #0c6d46;
        --color-secondary-rgb: 12, 109, 70;
        --color-accent: #f0ce64;
        --color-accent-rgb: 240, 206, 100;
        --color-surface: #0f1912;
        --color-surface-muted: #0a1410;
        --color-ink: #f4fbf6;
        --color-ink-rgb: 244, 251, 246;
    }

    body,
    .bg-white,
    .bg-gray-50 {
        background-color: var(--color-surface) !important;
        color: var(--color-ink) !important;
    }

    .text-gray-600,
    .text-gray-400 {
        color: rgba(244, 251, 246, 0.75) !important;
    }

    .bg-white,
    .bg-gray-50 {
        background-color: var(--color-surface) !important;
    }

    .shadow-lg,
    .shadow-2xl {
        box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.28) !important;
    }

    .text-gray-800,
    .text-gray-900,
    .text-black {
        color: var(--color-ink) !important;
    }

    .text-gray-700 {
        color: rgba(244, 251, 246, 0.84) !important;
    }

    .text-yellow-300 {
        color: var(--color-accent) !important;
    }

    .border-gray-800,
    .border-gray-900,
    .border-black {
        border-color: rgba(244, 251, 246, 0.18) !important;
    }

    .bg-gray-100,
    .bg-gray-200 {
        background-color: var(--color-surface-muted) !important;
    }

    .faq-question:hover,
    .faq-question:focus,
    .faq-question:active {
        background-color: rgba(var(--color-secondary-rgb), 0.2) !important;
        color: var(--color-ink);
    }

    .sticky-nav {
        background: rgba(15, 25, 18, 0.9) !important;
        border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.25);
    }
}

.accent-link {
    color: var(--color-accent);
    transition: color 0.2s ease;
}

.accent-link:hover,
.accent-link:focus {
    color: var(--color-primary);
}

.footer-modern {
    background: rgba(var(--color-primary-rgb), 0.08);
    backdrop-filter: blur(8px);
    border-radius: 1.5rem;
    padding: 2rem;
}

.cta-section {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 55%);
    pointer-events: none;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.82) !important;
}

.cta-button {
    display: inline-flex;
    min-width: 220px;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #0f1f16;
    background: #fff;
    box-shadow: 0 22px 45px rgba(var(--color-primary-rgb), 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.cta-button:hover,
.cta-button:focus {
    transform: translateY(-3px);
    box-shadow: 0 26px 55px rgba(var(--color-primary-rgb), 0.32);
    filter: brightness(1.02);
}

.cta-button::after {
    content: '↗';
    font-size: 1.1rem;
    margin-inline-start: 0.4rem;
}

@media (max-width: 640px) {
    .cta-section h2 {
        font-size: 2.2rem !important;
    }

    .cta-button {
        width: 100%;
    }
}

/* Base preloader styles (work even if Tailwind CDN fails) */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Fade-out helper */
#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

/* Lottie box size fallback */
#ejaz-loader {
    width: 112px;
    height: 112px;
}

/* Notice strip collapse styles */
#notice-strip {
    transition: all 0.25s ease;
    background-color: var(--color-surface-muted) !important;
    color: var(--color-ink);
    border-color: rgba(var(--color-primary-rgb), 0.12) !important;
}

#notice-strip.collapsed {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* Hide long texts when collapsed */
#notice-strip .ns-text {
    display: inline;
}

#notice-strip.collapsed .ns-text {
    display: none;
}

#notice-strip strong {
    color: var(--color-primary) !important;
}

#notice-strip .text-gray-600 {
    color: rgba(var(--color-ink-rgb), 0.72) !important;
}

/* Rotate the toggle chevron when collapsed */
#notice-toggle {
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

#notice-strip.collapsed #notice-toggle {
    transform: rotate(180deg);
}
#hero-subtitle {
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.82);
}

#hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    color: #fff;
    padding: 1rem 2.25rem;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 18px 38px rgba(var(--color-primary-rgb), 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    margin-inline: auto;
}

#hero-cta svg {
    width: 1.35rem;
    height: 1.35rem;
}

#hero-cta:hover,
#hero-cta:focus {
    transform: translateY(-3px);
    box-shadow: 0 22px 45px rgba(var(--color-primary-rgb), 0.3);
    filter: brightness(1.03);
}

#hero-cta-secondary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    box-shadow: 0 18px 38px rgba(var(--color-primary-rgb), 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

#hero-cta-secondary:hover,
#hero-cta-secondary:focus {
    transform: translateY(-2px);
    box-shadow: 0 22px 50px rgba(var(--color-primary-rgb), 0.32);
    filter: brightness(1.05);
}

@media (min-width: 1024px) {
    #hero-cta {
        margin-inline: 0;
    }

    #hero-cta-secondary {
        width: 100%;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(var(--color-accent-rgb), 0.18);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.store-card {
    position: relative;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid rgba(var(--color-primary-rgb), 0.1);
    pointer-events: none;
}

.store-card svg {
    color: var(--color-primary);
}

.store-card .text-sm {
    font-size: 0.95rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.hero-badge svg {
    stroke-width: 2.25;
}

.hero-badge-logo {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
}

.tilt-card {
    perspective: 1400px;
}

.tilt-card-inner {
    transform-style: preserve-3d;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    will-change: transform;
}

.tilt-card-inner img,
.tilt-card-inner picture,
.tilt-card-inner .absolute {
    transform: translateZ(0);
}

.tilt-card.is-tilting .tilt-card-inner {
    box-shadow: 0 35px 65px rgba(var(--color-primary-rgb), 0.35);
}

@media (max-width: 768px) {
    .tilt-card {
        perspective: 1100px;
    }
}
