/* =============================================
   Karakeb – Main Stylesheet
   ============================================= */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --primary:        #2aa688; /* Modern green-teal */
  --primary-dark:   #20856c;
  --primary-light:  #3bcca8;
  --primary-pale:   #eafaf6;
  --accent:         #6bc740;
  --white:          #ffffff;
  --gray-50:        #f9fafb;
  --gray-100:       #f3f4f6;
  --gray-200:       #e5e7eb;
  --gray-600:       #4b5563;
  --gray-700:       #374151;
  --gray-900:       #111827;
  --gradient-hero:  linear-gradient(135deg, #187a6d 0%, #2aa688 45%, #4ac7aa 100%);
  --gradient-card:  linear-gradient(145deg, #ffffff 0%, #f4fdfb 100%);
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
  --shadow-md:      0 4px 16px rgba(42,166,136,.15);
  --shadow-lg:      0 12px 40px rgba(42,166,136,.20);
  --radius-sm:      8px;
  --radius-md:      16px;
  --radius-lg:      28px;
  --transition:     0.3s cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Inter', system-ui, sans-serif;
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  direction: rtl; /* Set default direction to RTL */
}

img { display: block; max-width: 100%; border-radius: var(--radius-sm); }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-tag {
  display: inline-block;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.3;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 600px;
}

section { padding: 96px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--primary-pale);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.55);
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--white);
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.5px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: rgba(255,255,255,.7); }
.logo svg { width: 32px; height: 32px; fill: var(--white); transition: var(--transition); }
.navbar.scrolled .logo { color: var(--primary); }
.navbar.scrolled .logo span { color: var(--primary-light); }
.navbar.scrolled .logo svg { fill: var(--primary); }

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-links a {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  transition: var(--transition);
}
.navbar.scrolled .nav-links a { color: var(--gray-700); }
.nav-links a:hover { color: var(--white); }
.navbar.scrolled .nav-links a:hover { color: var(--primary); }

.nav-cta {
  background: rgba(255,255,255,.2);
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.4);
  font-weight: 700 !important;
  transition: var(--transition);
}
.navbar.scrolled .nav-cta {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-color: transparent !important;
}
.nav-cta:hover { background: rgba(255,255,255,.3) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 4px;
  background: transparent;
  border: none;
}
.hamburger span {
  display: block;
  width: 28px; height: 3px;
  background: var(--white);
  border-radius: 3px;
  transition: var(--transition);
}
.navbar.scrolled .hamburger span { background: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 600px at 80% 50%, rgba(255,255,255,.05) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 10% 80%, rgba(0,0,0,.1) 0%, transparent 60%);
  pointer-events: none;
}

/* Decorative shapes */
.hero::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.1);
  top: -150px; right: -150px;
  pointer-events: none;
  animation: spin 60s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.hero-badge .badge-dot {
  font-size: 1rem;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero-title .highlight {
  color: #a8f09a; /* Bright green accent */
}

.hero-desc {
  font-size: 1.2rem;
  color: rgba(255,255,255,.9);
  margin-bottom: 40px;
  max-width: 520px;
  line-height: 1.8;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-gplay {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--gray-900);
  color: var(--white);
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  transition: var(--transition);
  font-family: 'Inter', sans-serif; /* Keep English font for Google Play btn */
}
.btn-gplay:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.3); background: #000; }
.btn-gplay .store-icon { font-size: 1.8rem; line-height: 1; }
.btn-gplay .store-text { display: flex; flex-direction: column; text-align: left; direction: ltr;}
.btn-gplay .store-text small { font-size: .7rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; opacity: 0.8; }
.btn-gplay .store-text strong { font-size: 1.2rem; font-weight: 600; }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.2);
}

.stat-item { text-align: right; }
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  display: block;
  line-height: 1.2;
}
.stat-label { font-size: .9rem; color: rgba(255,255,255,.8); font-weight: 500; }

/* Phone mockup */
.hero-visual { display: flex; justify-content: center; align-items: center; }

.phone-wrap {
  position: relative;
  animation: float 6s ease-in-out infinite;
}

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

.phone-outer {
  width: 280px; height: 570px;
  background: rgba(255,255,255,.1);
  border: 4px solid rgba(255,255,255,.3);
  border-radius: 48px;
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.3), inset 0 2px 10px rgba(255,255,255,.4);
}

.phone-inner {
  width: 254px; height: 544px;
  background: var(--white);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Add a notch */
.phone-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 120px; height: 24px;
    background: rgba(255,255,255,.1); /* Match border */
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 10;
    /* Simulated inner notch color */
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.05);
    background-color: var(--gray-900);
}

/* We will display the screenshot inside phone-inner */
.phone-screen-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ---------- Features ---------- */
#features { background: var(--gray-50); }

.features-header { text-align: center; margin-bottom: 64px; }
.features-header .section-sub { margin: 0 auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: var(--gradient-card);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-align: right;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 4px;
  background: var(--gradient-hero);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
  width: 64px; height: 64px;
  background: var(--primary-pale);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 24px;
  transition: var(--transition);
}
.feature-card:hover .feature-icon { background: var(--primary); color: var(--white); }

.feature-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
}
.feature-card p { font-size: 1rem; color: var(--gray-600); line-height: 1.7; }

/* ---------- How It Works (Steps) ---------- */
#how-it-works { background: var(--white); }

.how-header { text-align: center; margin-bottom: 72px; }
.how-header .section-sub { margin: 0 auto; }

.steps-container {
    max-width: 900px;
    margin: 0 auto;
}

.step-row {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 64px;
}
.step-row:last-child { margin-bottom: 0; }
.step-row:nth-child(even) { flex-direction: row-reverse; }

.step-content { flex: 1; }
.step-num {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary-pale);
    line-height: 1;
    margin-bottom: -20px;
    opacity: 0.8;
}
.step-content h3 { font-size: 1.8rem; font-weight: 800; color: var(--gray-900); margin-bottom: 16px; position: relative; z-index: 1;}
.step-content p { font-size: 1.1rem; color: var(--gray-600); line-height: 1.8; }

.step-image {
    flex: 1;
    display: flex;
    justify-content: center;
}
.step-image img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 500px;
    width: auto;
    object-fit: contain;
    border: 4px solid var(--gray-100);
}

/* ---------- Screenshots / Gallery ---------- */
#screenshots { background: var(--gray-50); }

.screenshots-header { text-align: center; margin-bottom: 56px; }
.screenshots-header .section-sub { margin: 0 auto; }

.screenshots-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.screenshot-item img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 4px solid var(--white);
}
.screenshot-item:hover img { transform: translateY(-10px) scale(1.03); box-shadow: var(--shadow-lg); }


/* ---------- Contact ---------- */
#contact { background: var(--white); }

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.contact-info .section-sub { margin-bottom: 40px; }

.contact-items { display: flex; flex-direction: column; gap: 24px; }

.contact-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.contact-item .c-icon {
  width: 56px; height: 56px;
  background: var(--primary-pale);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.contact-item h4 { font-size: 1.1rem; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.contact-item p  { font-size: 1rem; color: var(--gray-600); }
.contact-item a  { color: var(--primary); font-weight: 600; text-decoration: underline; text-decoration-color: transparent; transition: var(--transition); }
.contact-item a:hover { text-decoration-color: var(--primary); }

.contact-form {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-lg);
}

.form-group { margin-bottom: 24px; }
.form-group label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--gray-900);
  transition: var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(42,166,136,.1);
}

.btn-submit {
  width: 100%;
  background: var(--gradient-hero);
  color: var(--white);
  padding: 16px;
  border-radius: 100px;
  font-size: 1.1rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  font-family: 'Cairo', sans-serif;
}
.btn-submit:hover { opacity: .95; transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--gradient-hero);
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.1);
  top: -250px; left: -150px;
  pointer-events: none;
}
.cta-banner::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    bottom: -200px; right: 10%;
    pointer-events: none;
}
.cta-banner h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
}
.cta-banner p { color: rgba(255,255,255,.9); font-size: 1.2rem; margin-bottom: 40px; }
.cta-banner .btn-gplay { transform: scale(1.1); }

/* ---------- Footer ---------- */
footer {
  background: var(--gray-900);
  padding: 80px 0 40px;
  color: rgba(255,255,255,.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}

.footer-brand .logo-dark {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-brand .logo-dark span { color: var(--accent); }
.footer-brand p { font-size: 1rem; line-height: 1.8; max-width: 360px; }

.footer-col h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 24px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 14px; }
.footer-col ul li a {
  font-size: 1rem;
  color: rgba(255,255,255,.6);
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--white); padding-right: 6px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p { font-size: .9rem; }
.footer-bottom a { color: var(--accent); font-weight: 600; }

/* ---------- Animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .features-grid    { grid-template-columns: repeat(2, 1fr); }
  .screenshots-track { grid-template-columns: repeat(2, 1fr); gap: 32px;}
  .contact-wrapper { gap: 40px; }
}

@media (max-width: 768px) {
  section { padding: 80px 0; }

  .hamburger { display: flex; }
  .nav-links  {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 32px 24px;
    gap: 24px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--gray-100);
  }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--gray-900) !important; font-size: 1.1rem; }
  .nav-cta { background: var(--primary) !important; color: var(--white) !important; text-align: center; width: 100%; border-color: transparent !important; }

  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 48px; }
  .hero-desc { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats  { justify-content: center; }
  
  .step-row, .step-row:nth-child(even) { flex-direction: column-reverse; text-align: center; gap: 32px; }
  .step-num { margin-bottom: 0;}

  .features-grid    { grid-template-columns: 1fr; }
  .screenshots-track { grid-template-columns: repeat(2, 1fr); }
  
  .contact-wrapper   { grid-template-columns: 1fr; }
  .contact-form { padding: 32px 24px; }
  
  .footer-grid       { grid-template-columns: 1fr; gap: 40px;}
  .footer-bottom     { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .screenshots-track { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; justify-content: center; gap: 24px; }
  .hero-title { font-size: 2rem; }
}
