/* ==========================================================================
   CSS VARIABLES & DESIGN TOKENS (Premium Light Theme)
   ========================================================================== */
:root {
    /* Color Palette */
    --clr-bg-base: #f1f1f1;      /* Requested body/footer background */
    --clr-bg-header: #ffffff;    /* Requested white header */
    --clr-bg-surface: #ffffff;   /* White cards for contrast against #f1f1f1 */
    --clr-bg-glass: rgba(255, 255, 255, 0.85);
    
    --clr-primary-500: #00b792;  /* Brand Color */
    --clr-primary-600: #009879;  /* Darker shade for hover states */
    --clr-primary-glow: rgba(0, 183, 146, 0.15);
    
    --clr-accent-500: #0284c7;   /* Secondary accent */
    --clr-accent-glow: rgba(2, 132, 199, 0.1);
    
    --clr-text-main: #111827;    /* Dark text for light mode */
    --clr-text-muted: #6b7280;   /* Gray text for secondary info */
    
    --clr-border: #e5e7eb;       /* Light borders */
    --clr-border-light: rgba(0, 0, 0, 0.05);

    /* Fluid Typography via clamp() */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --text-xs: clamp(0.75rem, 0.7vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8vw, 1rem);
    --text-base: clamp(1rem, 1vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.2vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.5vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 2vw, 2rem);
    --text-3xl: clamp(2rem, 3vw, 2.5rem);
    --text-4xl: clamp(2.5rem, 4vw, 3.5rem);
    --text-5xl: clamp(3rem, 5vw, 4.5rem);
    --text-hero: clamp(3.5rem, 7vw, 4.5rem); /* Scaled down slightly for 2-column layout */

    /* Fluid Spacing System */
    --space-xs: clamp(0.25rem, 0.5vw, 0.5rem);
    --space-sm: clamp(0.5rem, 1vw, 1rem);
    --space-md: clamp(1rem, 2vw, 1.5rem);
    --space-lg: clamp(1.5rem, 3vw, 2rem);
    --space-xl: clamp(2rem, 4vw, 3rem);
    --space-2xl: clamp(3rem, 6vw, 5rem);
    --space-section: clamp(4rem, 8vw, 8rem);

    /* Layout */
    --container-width: 1280px;
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;

    /* Transitions & Shadows */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 300ms cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-glow: 0 0 30px -5px var(--clr-primary-glow);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background-color: var(--clr-bg-base); }
body {
    font-family: var(--font-sans);
    color: var(--clr-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ==========================================================================
   UTILITY CLASSES & LAYOUT
   ========================================================================== */
.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 var(--space-md); }

.text-gradient {
    background: linear-gradient(135deg, #111827 0%, #4b5563 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.text-gradient-primary {
    background: linear-gradient(135deg, var(--clr-primary-500) 0%, var(--clr-primary-600) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.glass-panel {
    background: var(--clr-bg-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.section { padding: var(--space-section) 0; position: relative; }
.text-center { text-align: center; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.w-full { width: 100%; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.5rem; font-size: var(--text-sm); font-weight: 600;
    border-radius: var(--radius-full); transition: all var(--transition-fast);
    cursor: pointer; border: 1px solid transparent;
}
.btn-primary {
    background: var(--clr-primary-500); color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 183, 146, 0.2);
}
.btn-primary:hover {
    background: var(--clr-primary-600); transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--clr-primary-glow);
}
.btn-ghost {
    background: transparent; color: var(--clr-text-main);
    border: 1px solid var(--clr-border); background-color: #ffffff;
}
.btn-ghost:hover { background: var(--clr-bg-base); border-color: var(--clr-text-muted); }
.btn-large { padding: 1rem 2rem; font-size: var(--text-base); }

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: 72px; z-index: 100;
    background: var(--clr-bg-header);
    border-bottom: 1px solid var(--clr-border);
    transition: all var(--transition-smooth);
}
.site-header.scrolled {
    background: var(--clr-bg-glass);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}
.header-container { display: flex; align-items: center; justify-content: space-between; height: 100%; }

/* Strict Logo Sizing */
.brand-logo { display: flex; align-items: center; gap: var(--space-sm); font-weight: 700; font-size: var(--text-lg); z-index: 101; }
.brand-logo .logo-img { height: 32px; max-height: 32px; width: auto; max-width: 150px; object-fit: contain; display: block; }
.footer-brand .logo-img { height: 28px; max-height: 28px; }

.desktop-nav { display: none; }
.nav-list { display: flex; gap: var(--space-lg); }
.nav-link { font-size: var(--text-sm); color: var(--clr-text-muted); font-weight: 500; transition: color var(--transition-fast); }
.nav-link:hover { color: var(--clr-primary-500); }
.header-actions { display: flex; align-items: center; gap: var(--space-sm); }
.hide-mobile { display: none; }

/* Mobile Menu Toggle */
.mobile-menu-toggle { display: flex; flex-direction: column; justify-content: space-between; width: 24px; height: 16px; background: transparent; border: none; cursor: pointer; z-index: 101; }
.hamburger-line { width: 100%; height: 2px; background: var(--clr-text-main); transition: all var(--transition-smooth); transform-origin: left; }
.mobile-menu-toggle.active .hamburger-line:nth-child(1) { transform: rotate(45deg); }
.mobile-menu-toggle.active .hamburger-line:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active .hamburger-line:nth-child(3) { transform: rotate(-45deg); }

/* Mobile Menu Overlay */
.mobile-nav-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--clr-bg-header); z-index: 99;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all var(--transition-smooth);
    display: flex; flex-direction: column; padding-top: 100px;
}
.mobile-nav-overlay.active { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-nav-list { display: flex; flex-direction: column; padding: 0 var(--space-md); gap: var(--space-md); }
.mobile-nav-link { font-size: var(--text-2xl); font-weight: 600; color: var(--clr-text-main); }
.mobile-nav-actions { margin-top: auto; padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); }

/* Language Switcher */
.lang-switcher { position: relative; display: inline-block; }
.lang-btn { display: flex; align-items: center; gap: 0.5rem; background: transparent; border: 1px solid var(--clr-border); padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); cursor: pointer; font-size: var(--text-xs); font-weight: 600; color: var(--clr-text-main); transition: all var(--transition-fast); }
.lang-btn:hover { background: var(--clr-bg-surface); }
.lang-dropdown { position: absolute; top: 100%; right: 0; margin-top: 0.5rem; background: var(--clr-bg-surface); border: 1px solid var(--clr-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 120px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all var(--transition-fast); z-index: 1000; }
.lang-switcher:hover .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dropdown a { display: block; padding: 0.5rem 1rem; font-size: var(--text-sm); color: var(--clr-text-muted); text-decoration: none; transition: background var(--transition-fast); }
.lang-dropdown a:hover { background: var(--clr-bg-base); color: var(--clr-primary-500); }
.lang-dropdown a.active { color: var(--clr-primary-500); font-weight: 600; }

/* ==========================================================================
   HERO SECTION (2-Column Layout + QR Swarm)
   ========================================================================== */
.hero { position: relative; padding-top: calc(72px + var(--space-2xl)); padding-bottom: var(--space-section); overflow: hidden; }
.hero-bg-glow {
    position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
    width: 80vw; height: 80vw;
    background: radial-gradient(circle, var(--clr-primary-glow) 0%, transparent 60%);
    filter: blur(60px); opacity: 0.7; z-index: -1;
}

/* Split content layout */
.hero-content {
    display: flex;
    flex-direction: column; /* Stacks vertically on mobile */
    align-items: center;
    gap: var(--space-xl);
    max-width: var(--container-width);
    margin: 0 auto;
    text-align: center; /* Center text on mobile */
}

.hero-text-block { flex: 1; }
.hero-banner-block { flex: 1; width: 100%; display: flex; justify-content: center; align-items: center; }

.hero-banner-img {
    width: 100%;
    max-width: 550px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 20px 40px -10px rgba(0, 183, 146, 0.15);
    border: 1px solid var(--clr-border);
    object-fit: cover;
    transition: transform var(--transition-smooth);
}
.hero-banner-img:hover { transform: translateY(-5px); }

.hero-title { font-size: var(--text-hero); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: var(--space-md); }
.hero-subtitle { font-size: var(--text-xl); color: var(--clr-text-muted); margin-bottom: var(--space-xl); }
.hero-actions { display: flex; flex-direction: column; gap: var(--space-sm); align-items: center; justify-content: center; }

/* QR Swarm Interactive Box */
.hero-visual { margin-top: var(--space-2xl); position: relative; width: 100%; }

#hero-interactive {
    position: relative;
    width: 100%;
    height: 500px;
    background: radial-gradient(circle at center, var(--clr-bg-surface) 0%, var(--clr-bg-base) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), inset 0 0 60px rgba(0, 183, 146, 0.05);
}

.interactive-hero-text {
    position: relative;
    z-index: 2;
    pointer-events: none;
    text-align: center;
    padding: var(--space-xl) var(--space-xl);
    max-width: 800px;
}
.interactive-hero-text h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* White Neon Badge */
.white-neon-badge {
    position: absolute; top: -10px; right: 0px;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.2em; color: #ffffff;
    padding: 0.3rem 0.8rem; border: 1px solid #ffffff; border-radius: 50px;
    transform: rotate(12deg); background: rgba(255, 255, 255, 0.05);
    text-shadow: 0 0 5px #ffffff, 0 0 10px #ffffff, 0 0 20px #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), inset 0 0 8px rgba(255, 255, 255, 0.8);
    animation: neon-pulse 2s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes neon-pulse {
    0% { opacity: 0.8; text-shadow: 0 0 4px #ffffff, 0 0 8px #ffffff; box-shadow: 0 0 4px rgba(255, 255, 255, 0.5), inset 0 0 4px rgba(255, 255, 255, 0.5); }
    100% { opacity: 1; text-shadow: 0 0 8px #ffffff, 0 0 16px #ffffff, 0 0 24px #ffffff; box-shadow: 0 0 12px rgba(255, 255, 255, 1), inset 0 0 12px rgba(255, 255, 255, 1); }
}

/* QR Swarm Nuggets */
#nuggets-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.nugget { position: absolute; top: 0; left: 0; background: #78F5C1; border-radius: 2px; box-shadow: 0 2px 8px rgba(120, 245, 193, 0.2); will-change: transform; opacity: 0; transition: opacity 0.8s ease; }
.nugget.visible { opacity: 1; }

/* ==========================================================================
   FEATURES SECTION
   ========================================================================== */
.section-header { text-align: center; max-width: 600px; margin: 0 auto var(--space-2xl); }
.section-tag { color: var(--clr-primary-500); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--text-xs); margin-bottom: var(--space-sm); display: block; }
.section-title { font-size: var(--text-4xl); margin-bottom: var(--space-sm); color: var(--clr-text-main); }
.section-desc { color: var(--clr-text-muted); font-size: var(--text-lg); }

.features-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.feature-card { padding: var(--space-xl); transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth); background: var(--clr-bg-surface); }
.feature-card:hover { transform: translateY(-5px); border-color: var(--clr-primary-500); box-shadow: var(--shadow-lg); }
.feature-icon { width: 48px; height: 48px; background: rgba(0, 183, 146, 0.1); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-md); color: var(--clr-primary-500); }
.feature-title { font-size: var(--text-xl); margin-bottom: var(--space-sm); color: var(--clr-text-main); }
.feature-desc { color: var(--clr-text-muted); font-size: var(--text-base); }

/* ==========================================================================
   SEO BOX SECTION
   ========================================================================== */
.seo-box { padding: var(--space-2xl) var(--space-md); background: linear-gradient(180deg, var(--clr-bg-surface) 0%, var(--clr-bg-base) 100%); border-top: 2px solid var(--clr-primary-500); }

/* ==========================================================================
   HOW IT WORKS (Steps)
   ========================================================================== */
.steps-container { display: flex; flex-direction: column; gap: var(--space-xl); position: relative; }
.step-item { display: grid; grid-template-columns: 1fr; gap: var(--space-md); background: var(--clr-bg-surface); border: 1px solid var(--clr-border); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm); }
.step-number { font-size: var(--text-5xl); font-weight: 800; color: var(--clr-border); line-height: 1; margin-bottom: var(--space-sm); }

/* ==========================================================================
   PRICING
   ========================================================================== */
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); max-width: 900px; margin: 0 auto; }
.pricing-card { padding: var(--space-xl); display: flex; flex-direction: column; position: relative; overflow: hidden; background: var(--clr-bg-surface); }
.pricing-card.popular { border-color: var(--clr-primary-500); box-shadow: var(--shadow-lg); border-width: 2px; }
.popular-badge { position: absolute; top: 0; right: 0; background: var(--clr-primary-500); color: #fff; font-size: var(--text-xs); font-weight: 600; padding: 0.25rem 1rem; border-bottom-left-radius: var(--radius-md); }
.pricing-tier { font-size: var(--text-xl); font-weight: 600; margin-bottom: var(--space-sm); }
.pricing-price { font-size: var(--text-5xl); font-weight: 800; margin-bottom: var(--space-md); color: var(--clr-text-main); }
.pricing-price span { font-size: var(--text-base); color: var(--clr-text-muted); font-weight: 500; }
.pricing-features { margin-bottom: var(--space-xl); flex-grow: 1; }
.pricing-features li { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; color: var(--clr-text-muted); }
.pricing-features li::before { content: "✓"; color: var(--clr-primary-500); font-weight: bold; }

/* ==========================================================================
   FINAL CTA & FOOTER
   ========================================================================== */
.cta-section { background: var(--clr-bg-base); text-align: center; }
.cta-box { border: 1px solid var(--clr-border); border-radius: var(--radius-lg); padding: var(--space-2xl) var(--space-md); position: relative; overflow: hidden; background: var(--clr-bg-surface); box-shadow: var(--shadow-md); }
.cta-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at center, var(--clr-primary-glow) 0%, transparent 70%); opacity: 0.5; z-index: 0; }
.cta-content { position: relative; z-index: 1; }

.site-footer { border-top: 1px solid var(--clr-border); padding: var(--space-xl) 0 var(--space-md); background: var(--clr-bg-base); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); margin-bottom: var(--space-xl); }
.footer-desc { color: var(--clr-text-muted); font-size: var(--text-sm); }
.footer-heading { font-weight: 600; margin-bottom: var(--space-sm); color: var(--clr-text-main); }
.footer-links ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: var(--clr-text-muted); font-size: var(--text-sm); transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--clr-primary-500); }
.footer-bottom { border-top: 1px solid var(--clr-border); padding-top: var(--space-md); text-align: center; color: var(--clr-text-muted); font-size: var(--text-xs); }

/* ==========================================================================
   MEDIA QUERIES (Adaptive & Desktop)
   ========================================================================== */
@media (min-width: 768px) {
    .hide-mobile { display: inline-flex; }
    .mobile-menu-toggle { display: none; }
    .desktop-nav { display: block; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .step-item { grid-template-columns: 100px 1fr; align-items: center; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* Desktop Overrides for Hero Banner Layout */
@media (min-width: 1024px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); }
    
    .hero-content {
        flex-direction: row; /* Side-by-side on desktop */
        text-align: left;    /* Left-align text */
        gap: var(--space-2xl);
    }
    .hero-actions {
        flex-direction: row; /* Side-by-side buttons */
        justify-content: flex-start;
    }
}

/* Mobile Hero Height Adjustment */
@media (max-width: 768px) {
    #hero-interactive { height: 400px; }
}

/* ==========================================================================
   ANIMATIONS (Scroll Reveals)
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }

/* ==========================================================================
   INTERNATIONALIZATION (i18n) & RTL SUPPORT
   ========================================================================== */
html[dir="rtl"] body { font-family: 'Cairo', var(--font-sans); }
html[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
html[dir="rtl"] .white-neon-badge { right: auto; left: 0px; transform: rotate(-12deg); }
html[dir="rtl"] .pricing-features li::before { margin-left: 0.5rem; margin-right: 0; }
html[dir="rtl"] .popular-badge { right: auto; left: 0; border-bottom-left-radius: 0; border-bottom-right-radius: var(--radius-md); }

@media (min-width: 1024px) {
    /* Right-to-Left (Arabic) desktop layout tweak */
    html[dir="rtl"] .hero-content { text-align: right; }
    html[dir="rtl"] .hero-actions { justify-content: flex-start; }
}

@media (max-width: 768px) { 
    html[dir="rtl"] .white-neon-badge { right: auto; left: 10px; } 
}