/* ===== Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

/* ===== CSS Variables ===== */
:root {
         --brand-purple: #6B46C1;
         --brand-purple-light: #8B5CF6;
         --brand-purple-lighter: #A855F7;
         --text-dark: #111827;
         --text-medium: #6B7280;
         --text-light: #9CA3AF;
         --bg-main: #F9FAFB;
}

/* ===== Base Styles ===== */
*,
*::before,
*::after {
         box-sizing: border-box;
         margin: 0;
         padding: 0;
}

html {
         scroll-behavior: smooth;
         font-family: 'Inter', system-ui, sans-serif;
}

html[dir="rtl"] {
         font-family: 'Tajawal', system-ui, sans-serif;
}

body {
         background-color: var(--bg-main);
         color: var(--text-dark);
         background-image: url("data:image/svg+xml;charset=utf8,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D1D5DB' fill-opacity='0.8'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
         background-repeat: repeat;
         background-size: 60px 60px;
         min-height: 100vh;
         -webkit-font-smoothing: antialiased;
         -moz-osx-font-smoothing: grayscale;
         overflow-x: hidden;
}

.bg-textured {
         background-color: var(--bg-main);
         background-image: url("data:image/svg+xml;charset=utf8,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23A855F7' fill-opacity='0.04'%3E%3Cpath d='M20 20h-4v-4h4v4zm0-8h-4v-4h4v4zm8 8h-4v-4h4v4zm0-8h-4v-4h4v4zm-16 8h-4v-4h4v4zm0-8h-4v-4h4v4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
         background-repeat: repeat;
         background-size: 40px 40px;
}

.font-tajawal {
         font-family: 'Tajawal', sans-serif !important;
}

/* ===== Container ===== */
.container {
         max-width: 1280px;
         margin: 0 auto;
         padding: 0 1.5rem;
}

/* ===== Header ===== */
.header {
         position: sticky;
         top: 0;
         z-index: 50;
         padding: 1rem 0;
         background: rgba(255, 255, 255, 0.8);
         backdrop-filter: blur(12px);
         -webkit-backdrop-filter: blur(12px);
}

.header-inner {
         display: flex;
         justify-content: space-between;
         align-items: center;
}

.logo-link {
         display: flex;
         align-items: center;
         gap: 0.75rem;
         text-decoration: none;
}

.logo-img {
         width: 2.75rem;
         height: 2.75rem;
         border-radius: 1rem;
}

.logo-text {
         font-size: 1.5rem;
         font-weight: 700;
         color: var(--text-dark);
}

/* Desktop Nav */
.desktop-nav {
         display: flex;
         align-items: center;
         gap: 1.5rem;
}

.desktop-nav a {
         color: var(--text-medium);
         text-decoration: none;
         transition: color 0.2s;
}

.desktop-nav a:hover {
         color: var(--brand-purple);
}

.desktop-actions {
         display: flex;
         align-items: center;
         gap: 1rem;
}

/* ===== Buttons ===== */
.btn-primary {
         background: linear-gradient(135deg, #6B46C1, #8B5CF6);
         color: white;
         box-shadow: 0 4px 14px 0 rgba(107, 70, 193, 0.39);
         border: none;
         padding: 0.625rem 1.25rem;
         font-weight: 700;
         border-radius: 0.5rem;
         cursor: pointer;
         transition: all 0.3s ease;
         text-decoration: none;
         display: inline-block;
         text-align: center;
         font-size: 1rem;
}

.btn-primary:hover {
         background: linear-gradient(135deg, #8B5CF6, #A855F7);
         transform: translateY(-2px) scale(1.05);
         box-shadow: 0 6px 20px 0 rgba(107, 70, 193, 0.5);
}

.btn-primary.large {
         padding: 1rem 2rem;
         font-size: 1.1rem;
}

.btn-lang {
         background: rgba(255, 255, 255, 0.9);
         color: #7C3AED;
         font-weight: 500;
         border: 1px solid #DDD6FE;
         padding: 0.5rem 1rem;
         border-radius: 0.5rem;
         cursor: pointer;
         display: flex;
         align-items: center;
         gap: 0.5rem;
         transition: all 0.2s;
         backdrop-filter: blur(4px);
         box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
         font-size: 0.875rem;
}

.btn-lang:hover {
         background: white;
         color: #6D28D9;
         border-color: #C4B5FD;
         box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-lang svg {
         width: 20px;
         height: 20px;
}

/* ===== Mobile Menu ===== */
.mobile-controls {
         display: none;
         align-items: center;
         gap: 0.75rem;
}

.mobile-menu-btn {
         padding: 0.5rem;
         background: none;
         border: none;
         color: var(--text-dark);
         cursor: pointer;
         transition: color 0.2s;
}

.mobile-menu-btn:hover {
         color: var(--brand-purple);
}

.mobile-menu-btn svg {
         width: 24px;
         height: 24px;
}

.mobile-nav {
         display: none;
         max-height: 0;
         opacity: 0;
         overflow: hidden;
         transition: all 0.3s ease-in-out;
}

.mobile-nav.open {
         max-height: 24rem;
         opacity: 1;
}

.mobile-nav-inner {
         padding: 1rem 1.5rem;
         background: rgba(255, 255, 255, 0.95);
         backdrop-filter: blur(12px);
         border-radius: 0 0 0.5rem 0.5rem;
         box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.mobile-nav-inner a,
.mobile-nav-inner button.coming-soon-trigger {
         display: block;
         padding: 0.75rem 0;
         color: var(--text-medium);
         text-decoration: none;
         border-bottom: 1px solid #F3F4F6;
         transition: color 0.2s;
         background: none;
         border-left: none;
         border-right: none;
         border-top: none;
         width: 100%;
         text-align: start;
         font-size: 1rem;
         cursor: pointer;
}

.mobile-nav-inner a:hover {
         color: var(--brand-purple);
}

.mobile-nav-inner .btn-primary {
         margin-top: 0.75rem;
         padding: 0.75rem 1.25rem;
         width: 100%;
}

/* ===== Animated Background Graphics ===== */
.animated-bg {
         position: absolute;
         inset: 0;
         overflow: hidden;
         pointer-events: none;
}

.animated-graphic {
         position: absolute;
         z-index: 0;
         opacity: 0.7;
         filter: blur(40px);
         border-radius: 50%;
}

.graphic-1 {
         width: 24rem;
         height: 24rem;
         background: rgba(107, 70, 193, 0.1);
         top: -10%;
         left: -10%;
         animation: spin-slow 20s infinite linear;
}

.graphic-2 {
         width: 20rem;
         height: 20rem;
         background: rgba(139, 92, 246, 0.1);
         bottom: -20%;
         right: -15%;
         animation: float-up-down 12s infinite ease-in-out;
}

/* ===== Hero Section ===== */
.hero {
         position: relative;
         text-align: center;
         padding: 6rem 0 8rem;
}

.hero h1 {
         font-size: 2.25rem;
         font-weight: 800;
         color: var(--text-dark);
         line-height: 1.2;
}

.hero .highlight {
         color: var(--brand-purple);
         font-weight: 900;
         position: relative;
         display: inline-block;
}

.hero .underline-svg {
         position: absolute;
         bottom: -12px;
         left: 0;
         right: 0;
         display: flex;
         justify-content: center;
}

.hero .underline-svg svg {
         width: 100%;
         height: 16px;
         opacity: 0.6;
}

.hero p {
         margin-top: 1.5rem;
         max-width: 48rem;
         margin-left: auto;
         margin-right: auto;
         font-size: 1.125rem;
         color: var(--text-medium);
         line-height: 1.7;
}

.hero-cta {
         margin-top: 2.5rem;
         display: flex;
         flex-direction: column;
         align-items: center;
         gap: 1rem;
}

/* ===== App Preview Section ===== */
.app-preview {
         padding: 5rem 0 7rem;
         text-align: center;
}

.app-preview h2 {
         font-size: 1.875rem;
         font-weight: 700;
         color: var(--text-dark);
}

.app-preview>.container>p {
         margin-top: 1rem;
         color: var(--text-medium);
         max-width: 42rem;
         margin-left: auto;
         margin-right: auto;
}

.preview-desktop {
         display: none;
         margin-top: 3rem;
         max-width: 64rem;
         margin-left: auto;
         margin-right: auto;
         background: white;
         border-radius: 0.75rem;
         box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
         padding: 0.5rem;
}

.preview-desktop img {
         width: 100%;
         height: 100%;
         object-fit: cover;
         border-radius: 0.5rem;
}

.preview-mobile {
         margin-top: 3rem;
}

.preview-mobile img {
         width: 100%;
         height: auto;
         object-contain: contain;
}

/* ===== Features Section ===== */
.features {
         padding: 5rem 0 7rem;
         background: linear-gradient(to bottom right, #F9FAFB, white);
}

.features .section-header {
         text-align: center;
         max-width: 48rem;
         margin: 0 auto 5rem;
}

.features .section-header h2 {
         font-size: 1.875rem;
         font-weight: 700;
         color: var(--text-dark);
}

.features .section-header p {
         margin-top: 1.5rem;
         font-size: 1.125rem;
         color: var(--text-medium);
}

.features-grid {
         display: grid;
         grid-template-columns: 1fr;
         gap: 2rem;
}

.feature-card {
         position: relative;
         background: white;
         padding: 2rem;
         border-radius: 1rem;
         box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
         border: 1px solid #F3F4F6;
         display: flex;
         flex-direction: column;
         align-items: center;
         text-align: center;
         transition: all 0.3s ease;
         overflow: hidden;
}

.feature-card:hover {
         box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
         transform: translateY(-8px);
         border-color: rgba(107, 70, 193, 0.2);
}

.feature-card::before {
         content: '';
         position: absolute;
         inset: 0;
         background: linear-gradient(to bottom right, rgba(107, 70, 193, 0.05), transparent);
         opacity: 0;
         transition: opacity 0.3s;
         border-radius: 1rem;
}

.feature-card:hover::before {
         opacity: 1;
}

.feature-icon {
         position: relative;
         z-index: 10;
         width: 4rem;
         height: 4rem;
         background: linear-gradient(to bottom right, rgba(168, 85, 247, 0.7), rgba(124, 58, 237, 0.6));
         border-radius: 50%;
         display: flex;
         align-items: center;
         justify-content: center;
         margin-bottom: 1.5rem;
         transition: transform 0.3s;
         box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
         border: 1px solid rgba(168, 85, 247, 0.4);
}

.feature-card:hover .feature-icon {
         transform: scale(1.1);
}

.feature-icon svg {
         width: 2rem;
         height: 2rem;
         fill: white;
}

.feature-card h3 {
         position: relative;
         z-index: 10;
         font-size: 1.25rem;
         font-weight: 700;
         color: var(--text-dark);
         margin-bottom: 1rem;
         transition: color 0.3s;
}

.feature-card:hover h3 {
         color: var(--brand-purple);
}

.feature-card p {
         position: relative;
         z-index: 10;
         color: var(--text-medium);
         line-height: 1.6;
}

.feature-card .accent-line {
         position: absolute;
         bottom: 0;
         left: 2rem;
         right: 2rem;
         height: 4px;
         background: linear-gradient(to right, rgba(107, 70, 193, 0.2), transparent);
         border-radius: 9999px;
         opacity: 0;
         transition: opacity 0.3s;
}

.feature-card:hover .accent-line {
         opacity: 1;
}

/* ===== Use Cases Section ===== */
.use-cases {
         padding: 5rem 0 7rem;
}

.use-cases .section-header {
         text-align: center;
         max-width: 48rem;
         margin: 0 auto 4rem;
}

.use-cases .section-header h2 {
         font-size: 1.875rem;
         font-weight: 700;
         color: var(--text-dark);
}

.use-cases .section-header p {
         margin-top: 1rem;
         color: var(--text-medium);
}

.use-case-block {
         display: grid;
         grid-template-columns: 1fr;
         gap: 1.5rem;
         align-items: center;
         margin-bottom: 4rem;
}

.use-case-text {
         background: white;
         padding: 2rem;
         border-radius: 0.75rem;
         box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.use-case-text h3 {
         font-size: 1.5rem;
         font-weight: 700;
         color: var(--text-dark);
}

.use-case-text p {
         margin-top: 1rem;
         color: var(--text-medium);
         line-height: 1.7;
}

/* Use case images */
.use-case-images-mobile {
         display: flex;
         flex-direction: column;
         gap: 1rem;
}

.use-case-images-mobile .img-left {
         max-width: 280px;
         margin: 0 auto;
}

.use-case-images-mobile .img-right {
         max-width: 240px;
         margin: 0 0 0 auto;
}

[dir="rtl"] .use-case-images-mobile .img-right {
         margin: 0 auto 0 0;
}

.use-case-images-mobile img {
         width: 100%;
         height: auto;
         border-radius: 0.75rem;
         box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.use-case-images-tablet {
         display: none;
         justify-content: center;
         align-items: center;
         gap: 1rem;
}

.use-case-images-tablet img {
         width: 200px;
         border-radius: 0.75rem;
         box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.use-case-images-desktop {
         display: none;
         position: relative;
         height: 400px;
         justify-content: center;
         align-items: center;
}

.use-case-images-desktop .float-card {
         transition: all 0.5s ease-in-out;
         will-change: transform;
}

.use-case-images-desktop .float-card:hover {
         z-index: 50 !important;
         transform: scale(1.05);
}

.use-case-images-desktop .float-card img {
         width: 280px;
         border-radius: 0.75rem;
         box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
         transition: box-shadow 0.5s;
}

.use-case-images-desktop .float-card:hover img {
         box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.float-card.card-left {
         margin-right: -20px;
         z-index: 1;
         animation: float-1 6s ease-in-out infinite;
}

.float-card.card-right {
         z-index: 2;
         animation: float-2 6s ease-in-out infinite;
}

/* ===== CTA Section ===== */
.cta-section {
         padding: 5rem 0 7rem;
         background: white;
         text-align: center;
}

.cta-section h2 {
         font-size: 1.875rem;
         font-weight: 700;
         color: var(--text-dark);
         max-width: 48rem;
         margin: 0 auto;
}

.cta-section p {
         margin-top: 1rem;
         color: var(--text-medium);
         margin-bottom: 2rem;
         max-width: 48rem;
         margin-left: auto;
         margin-right: auto;
}

/* ===== Footer ===== */
.footer {
         background: white;
         padding: 4rem 0;
         text-align: center;
         color: var(--text-medium);
}

.footer-logo {
         display: flex;
         align-items: center;
         justify-content: center;
         gap: 0.75rem;
         margin-bottom: 1rem;
}

.footer-logo img {
         width: 2rem;
         height: 2rem;
         border-radius: 1rem;
}

.footer-logo span {
         font-size: 1.25rem;
         font-weight: 700;
         color: var(--text-dark);
}

.footer-links {
         display: flex;
         justify-content: center;
         gap: 1.5rem;
         margin: 1.5rem 0;
         flex-wrap: wrap;
}

.footer-links a {
         color: var(--text-medium);
         text-decoration: none;
         transition: color 0.2s;
         cursor: pointer;
}

.footer-links a:hover {
         color: var(--brand-purple);
}

.footer-copy {
         font-size: 0.875rem;
         color: var(--text-light);
}

/* ===== Coming Soon Modal ===== */
.modal-overlay {
         position: fixed;
         inset: 0;
         background: rgba(0, 0, 0, 0.5);
         backdrop-filter: blur(4px);
         z-index: 100;
         display: flex;
         align-items: center;
         justify-content: center;
         padding: 1rem;
         opacity: 0;
         visibility: hidden;
         transition: all 0.3s ease;
}

.modal-overlay.active {
         opacity: 1;
         visibility: visible;
}

.modal {
         background: white;
         border-radius: 1.5rem;
         padding: 3rem 2rem;
         max-width: 28rem;
         width: 100%;
         text-align: center;
         transform: scale(0.9) translateY(20px);
         transition: transform 0.3s ease;
         box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
         position: relative;
}

.modal-overlay.active .modal {
         transform: scale(1) translateY(0);
}

.modal-icon {
         width: 5rem;
         height: 5rem;
         background: linear-gradient(135deg, rgba(107, 70, 193, 0.1), rgba(139, 92, 246, 0.15));
         border-radius: 50%;
         display: flex;
         align-items: center;
         justify-content: center;
         margin: 0 auto 1.5rem;
         font-size: 2.5rem;
         animation: pulse-glow 2s infinite;
}

.modal h3 {
         font-size: 1.5rem;
         font-weight: 700;
         color: var(--text-dark);
         margin-bottom: 0.75rem;
}

.modal p {
         color: var(--text-medium);
         line-height: 1.6;
         margin-bottom: 1.5rem;
}

.modal .btn-close {
         background: linear-gradient(135deg, #6B46C1, #8B5CF6);
         color: white;
         border: none;
         padding: 0.75rem 2rem;
         border-radius: 0.5rem;
         font-weight: 600;
         cursor: pointer;
         transition: all 0.3s;
         font-size: 1rem;
}

.modal .btn-close:hover {
         background: linear-gradient(135deg, #8B5CF6, #A855F7);
         transform: translateY(-2px);
         box-shadow: 0 4px 14px rgba(107, 70, 193, 0.4);
}

/* ===== Animations ===== */
@keyframes float-up-down {

         0%,
         100% {
                  transform: translateY(0px);
         }

         50% {
                  transform: translateY(-20px);
         }
}

@keyframes spin-slow {
         0% {
                  transform: rotate(0deg);
         }

         100% {
                  transform: rotate(360deg);
         }
}

@keyframes float-1 {

         0%,
         100% {
                  transform: translateY(0px);
         }

         50% {
                  transform: translateY(-10px);
         }
}

@keyframes float-2 {

         0%,
         100% {
                  transform: translateY(0px);
         }

         50% {
                  transform: translateY(10px);
         }
}

@keyframes pulse-glow {

         0%,
         100% {
                  box-shadow: 0 0 0 0 rgba(107, 70, 193, 0.2);
         }

         50% {
                  box-shadow: 0 0 20px 10px rgba(107, 70, 193, 0.1);
         }
}

@keyframes pulse {

         0%,
         100% {
                  opacity: 1;
         }

         50% {
                  opacity: 0.5;
         }
}

.animate-pulse {
         animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Fade-in on scroll */
.fade-in-section {
         opacity: 0;
         transform: translateY(30px);
         transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
         opacity: 1;
         transform: translateY(0);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
         width: 6px;
}

::-webkit-scrollbar-track {
         background-color: #f3f4f6;
}

::-webkit-scrollbar-thumb {
         background-color: #d1d5db;
         border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
         background-color: #9ca3af;
}

/* ===== Responsive ===== */
@media (min-width: 640px) {
         .hero-cta {
                  flex-direction: row;
                  justify-content: center;
         }

         .use-case-images-mobile {
                  display: none;
         }

         .use-case-images-tablet {
                  display: flex;
         }
}

@media (min-width: 768px) {

         .desktop-nav,
         .desktop-actions {
                  display: flex;
         }

         .mobile-controls,
         .mobile-nav {
                  display: none !important;
         }

         .hero {
                  padding: 8rem 0 10rem;
         }

         .hero h1 {
                  font-size: 3.75rem;
         }

         .hero p {
                  font-size: 1.25rem;
         }

         .preview-desktop {
                  display: block;
         }

         .preview-mobile {
                  display: none;
         }

         .features-grid {
                  grid-template-columns: repeat(2, 1fr);
         }

         .use-case-block {
                  grid-template-columns: repeat(2, 1fr);
                  gap: 3rem;
         }

         .features .section-header h2,
         .use-cases .section-header h2,
         .app-preview h2,
         .cta-section h2 {
                  font-size: 2.75rem;
         }
}

@media (max-width: 767px) {

         .desktop-nav,
         .desktop-actions {
                  display: none;
         }

         .mobile-controls {
                  display: flex;
         }

         .mobile-nav {
                  display: block;
         }

         .btn-lang.mobile {
                  font-size: 0.75rem;
                  padding: 0.5rem 0.75rem;
                  gap: 0.25rem;
         }

         .btn-lang.mobile svg {
                  width: 16px;
                  height: 16px;
         }
}

@media (min-width: 1024px) {
         .features-grid {
                  grid-template-columns: repeat(4, 1fr);
         }

         .use-case-images-tablet {
                  display: none;
         }

         .use-case-images-desktop {
                  display: flex;
         }
}