/* ============================================================
   AiSAL — shared.css
   Brand: Turquoise #5E8597 | Dark #243A46 | White #FFFFFF
   Fonts: Syne (headings) · DM Sans (body) · Noto Naskh Arabic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Naskh+Arabic:wght@400;600;700&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@500,600,700&display=swap');

/* ── VARIABLES ── */
:root {
  --border: rgba(36,58,70,.14);
  --accent: #5E8597;
  --teal:          #5E8597;
  --teal-dark:     #4A6F80;
  --teal-pale:     rgba(94,133,151,0.08);
  --teal-border:   rgba(94,133,151,0.2);
  --dark:          #243A46;
  --secondary:     #4C6A78;
  --white:         #FFFFFF;
  --off-white:     #EDEEE8;

  --font-head:     'Clash Display', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-arabic:   'Noto Naskh Arabic', serif;

  --radius:        12px;
  --radius-lg:     20px;
  --radius-pill:   999px;
  --shadow-card:   0 4px 24px rgba(94,133,151,0.10);
  --shadow-hover:  0 12px 40px rgba(94,133,151,0.20);
  --transition:    0.3s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--dark);
  overflow-x: hidden;
  line-height: 1.65;
}
img, video { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
/* Fix 4 — iOS touch: remove tap highlight, prevent double-tap zoom, no text selection */
button, .chip {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
ul { list-style: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 3px; }

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(94,133,151,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(94,133,151,0.45);
}
.btn-secondary {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}
.btn-secondary:hover {
  background: var(--teal-pale);
  transform: translateY(-2px);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
}

/* ── SECTION LAYOUT ── */
.section {
  padding: 100px 0;
}
.section-light { background: var(--white); }
.section-off { background: var(--off-white); }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-tag {
  display: inline-block;
  background: var(--teal-pale);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--secondary);
  margin-top: 12px;
  max-width: 560px;
}

.center { text-align: center; }
.center .section-subtitle { margin-left: auto; margin-right: auto; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* ── NAVIGATION ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 72px;
  transition: box-shadow 0.3s ease;
}
#navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.nav-logo img {
  height: 48px;
  width: auto;
  mix-blend-mode: normal;
  filter: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--teal); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: var(--white);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  padding: 24px 32px 32px;
  z-index: 999;
  flex-direction: column;
  gap: 20px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--dark);
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-mobile a:hover { color: var(--teal); }
.nav-mobile .btn { width: 100%; justify-content: center; margin-top: 8px; }

/* ── HERO ── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--white);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
/* Fallback image — standard cover */
.hero-bg-fallback {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
}
/* Hero background video — clean fill, shifted up to show more distant scene */
.hero-bg-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  /* Subtle left-side gradient for text readability — right opens to show scene */
  background: linear-gradient(
    to right,
    rgba(255,255,255,0.78) 0%,
    rgba(255,255,255,0.38) 42%,
    transparent 100%
  );
  z-index: 1;
}
#heroCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
}
/* Hero stays above the fixed canvas */
#hero {
  position: relative;
  z-index: 1;
}
/* All content sections must have solid bg and sit on top of the fixed canvas */
#stats-bar,
#how-it-works,
#avatars,
#demo,
#pricing,
#testimonials,
footer {
  position: relative;
  z-index: 2;
  background: #ffffff;
}
.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 100px 40px 60px;
  max-width: 1240px;
  margin: 0 auto;
  gap: 40px;
}
.hero-left {
  flex: 0 0 55%;
  max-width: 55%;
}
.hero-logo {
  height: 64px;
  width: auto;
  margin-bottom: 32px;
}
.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero-arabic {
  font-family: var(--font-arabic);
  font-size: 1.4rem;
  color: var(--teal);
  text-align: right;
  direction: rtl;
  margin-bottom: 24px;
  line-height: 1.7;
}
.hero-body {
  font-size: 1.1rem;
  color: var(--secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-right {
  flex: 0 0 45%;
  max-width: 45%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  position: relative;
}
/* Soft teal atmosphere glow behind LAiLA — subtle ambient light effect */
.hero-right::before {
  content: '';
  position: absolute;
  width: 520px;
  height: 640px;
  bottom: 0;
  left: 50%;
  transform: translateX(-48%);
  background: radial-gradient(ellipse 70% 80% at 50% 65%,
    rgba(94,133,151,0.12) 0%,
    rgba(94,133,151,0.05) 45%,
    transparent 75%);
  pointer-events: none;
  z-index: 0;
}
/* ─── AVATAR FRAME — premium light-gradient panel (GeneAI/AIDEL style) ───
   Replaces the flat grey box. An elegant gray→white gradient lets the
   avatar's own light background dissolve into the panel, and the panel
   feathers into the page so it never reads as a pasted-on box.          */
.avatar-container {
  background: linear-gradient(180deg, #fbfbfc 0%, #f1f2f4 46%, #e8e9ec 100%);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px -34px rgba(20,28,52,0.30);
  position: relative;
  z-index: 1;
}
.hero-avatar-wrap {
  height: 75vh;
  max-height: 700px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* Soft vertical light gradient — blends edge-to-edge, no hard frame */
  background: linear-gradient(180deg, #fbfbfc 0%, #f4f5f7 38%, #ebecef 100%);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  /* Feather every edge so the avatar panel melts into the section
     instead of sitting in a box. Avatar (centred, lower) stays crisp.  */
  -webkit-mask-image: radial-gradient(142% 116% at 50% 86%, #000 70%, transparent 100%);
          mask-image: radial-gradient(142% 116% at 50% 86%, #000 70%, transparent 100%);
}
.hero-avatar-wrap video,
.hero-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Green screen filter — INACTIVE until green-bg videos are provided */
/* .avatar-video { filter: url('#greenscreen'); } */


/* ── STATS BAR ── */
#stats-bar {
  background: rgba(94,133,151,0.05);
  border-top: 1px solid rgba(94,133,151,0.1);
  border-bottom: 1px solid rgba(94,133,151,0.1);
  padding: 18px 40px;
}
.stats-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--secondary);
  padding: 6px 28px;
}
.stat-divider {
  color: rgba(94,133,151,0.4);
  font-size: 1.2rem;
}
.stat-icon { font-size: 1rem; }

/* ── HOW IT WORKS ── */
#how-it-works { background: var(--white); }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 60px;
}
.how-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 32px;
  border-left: 3px solid transparent;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.how-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--teal), var(--teal-dark));
  opacity: 0;
  transition: opacity 0.3s;
}
.how-card:hover::before { opacity: 1; }
.how-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.how-number {
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(94,133,151,0.12);
  line-height: 1;
  margin-bottom: 16px;
}
.how-icon { font-size: 2rem; margin-bottom: 12px; }
.how-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}
.how-desc {
  font-size: 0.95rem;
  color: var(--secondary);
  line-height: 1.7;
}

/* ── AVATARS ── */
#avatars { background: var(--off-white); }
.avatars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
}
.avatar-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
}
.avatar-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(94,133,151,0.22);
  border-color: rgba(94,133,151,0.3);
}
.avatar-card-media {
  height: 300px;
  position: relative;      /* needed for loop-mask overlay */
  overflow: hidden;
  /* Light gradient panel — blends the avatar instead of a flat grey box */
  background: linear-gradient(180deg, #fbfbfc 0%, #eef0f2 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
/* ── Loop-cut flash mask — covers the 1-frame hard cut at loop point ── */
.avatar-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fbfbfc 0%, #eef0f2 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s ease;
  z-index: 4;
}
.avatar-card-media.loop-flash::after { opacity: 1; }

/* ─────────────────────────────────────────────────────────────────────
   Avatar card videos — dark card handles black-bg removal visually.
   No mix-blend-mode. No brightness/contrast filters. Clean slate.
   Green screen filter activates via .avatar-video class when ready.
───────────────────────────────────────────────────────────────────── */
.avatar-card-media video {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  transition: none;
  z-index: 2;
}

/* AiYOB & ZAiD are taller — anchor from top so head is always visible */
.avatar-card-media video[data-avatar="aiyob"],
.avatar-card-media video[data-avatar="zaid"] {
  object-position: center top;
  top: 0;
  bottom: auto;
}

.avatar-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 1;
}
.avatar-card:hover .avatar-card-media video {
  /* No blend mode — dark card bg handles black Runway backdrop */
}

/* Img is hidden by default — only a fallback if video fails */
.avatar-card-media img {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.avatar-card-media img.img-fallback-visible { opacity: 1; }
.avatar-card-info {
  padding: 16px 20px 20px;
}
.avatar-card-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--dark);
}
.avatar-card-arabic {
  font-family: var(--font-arabic);
  font-size: 1rem;
  color: var(--teal);
  margin-top: 4px;
  direction: rtl;
}
.avatars-cta {
  text-align: center;
  margin-top: 48px;
  font-size: 0.95rem;
  color: var(--secondary);
}
.avatars-cta a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── LIVE DEMO ── */
#demo { background: var(--white); }
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 60px;
}
.demo-avatar-side {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 480px;
}
#demoAvatarContainer {
  background: linear-gradient(180deg, #fbfbfc 0%, #f1f2f4 46%, #e8e9ec 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px -34px rgba(20,28,52,0.30);
  height: 520px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
#demoAvatarContainer video {
  height: 90%;
  width: auto;
  object-fit: contain;
  object-position: bottom;
}
.demo-chat-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 32px rgba(94,133,151,0.12);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 520px;
}
.chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--secondary);
}
.chat-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 2px rgba(94,133,151,0.25);
  animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(94,133,151,0.25); }
  50%      { box-shadow: 0 0 0 5px rgba(94,133,151,0.1); }
}
.demo-lang-toggle {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.lang-btn {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--teal-border);
  color: var(--secondary);
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
}
.lang-btn.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.chat-status-row {
  display: flex;
  align-items: center;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  max-height: 280px;
  padding-right: 4px;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--teal-border); }
.msg {
  max-width: 82%;
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.msg-user {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg-laila {
  background: var(--off-white);
  color: var(--dark);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg-thinking {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 16px;
}
.msg-thinking span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: dotBounce 1.2s infinite;
}
.msg-thinking span:nth-child(2) { animation-delay: 0.2s; }
.msg-thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
  0%,80%,100% { transform: scale(0.7); opacity: 0.5; }
  40%          { transform: scale(1.1); opacity: 1; }
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--teal-border);
  font-size: 0.8rem;
  color: var(--teal);
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  font-family: var(--font-body);
}
.chip:hover {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--off-white);
  border-radius: var(--radius-pill);
  padding: 6px 8px 6px 16px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.chat-input-row:focus-within {
  border-color: var(--teal);
  background: white;
}
.chat-input-row input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--dark);
  outline: none;
}
.chat-input-row input::placeholder { color: #aaa; }
.mic-btn, .send-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  flex-shrink: 0;
}
.mic-btn {
  background: var(--off-white);
  color: var(--secondary);
}
.mic-btn:hover, .mic-btn.active {
  background: var(--teal);
  color: white;
}
.mic-btn.active { animation: micPulse 1s infinite; }
@keyframes micPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(94,133,151,0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(94,133,151,0); }
}
.send-btn {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: white;
}
.send-btn:hover { transform: scale(1.08); }

/* ── PRICING ── */
#pricing { background: var(--off-white); }
.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 32px 0 0;
  font-size: 0.9rem;
  color: var(--secondary);
}
.toggle-switch {
  position: relative;
  width: 52px; height: 28px;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 999px;
  transition: background 0.3s;
}
.toggle-switch input:checked + .toggle-track { background: var(--teal); }
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked ~ .toggle-thumb { transform: translateX(24px); }
.savings-badge {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
  align-items: start;
}
.pricing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.pricing-card.featured {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: white;
  transform: scale(1.05);
  box-shadow: 0 12px 48px rgba(94,133,151,0.4);
}
.pricing-card.featured:hover { transform: scale(1.05) translateY(-4px); }
.popular-badge {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.plan-name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}
.pricing-card.featured .plan-name { color: white; }
.plan-desc {
  font-size: 0.88rem;
  color: var(--secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}
.pricing-card.featured .plan-desc { color: rgba(255,255,255,0.8); }
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}
.price-currency {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--teal);
}
.pricing-card.featured .price-currency { color: rgba(255,255,255,0.8); }
.price-amount {
  font-family: var(--font-head);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
}
.pricing-card.featured .price-amount { color: white; }
.price-period {
  font-size: 0.85rem;
  color: var(--secondary);
}
.pricing-card.featured .price-period { color: rgba(255,255,255,0.7); }
.price-annual {
  font-size: 0.82rem;
  color: var(--secondary);
  margin-bottom: 28px;
  height: 18px;
}
.pricing-card.featured .price-annual { color: rgba(255,255,255,0.75); }
.plan-features {
  list-style: none;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--secondary);
}
.pricing-card.featured .plan-features li { color: rgba(255,255,255,0.9); }
.feature-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(94,133,151,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.pricing-card.featured .feature-check { background: rgba(255,255,255,0.25); }
.feature-check svg { color: var(--teal); }
.pricing-card.featured .feature-check svg { color: white; }
.pricing-divider {
  height: 1px;
  background: rgba(0,0,0,0.07);
  margin-bottom: 28px;
}
.pricing-card.featured .pricing-divider { background: rgba(255,255,255,0.2); }
.pricing-card .btn-primary { width: 100%; justify-content: center; }
.pricing-card.featured .btn-primary {
  background: rgba(255,255,255,0.2);
  box-shadow: none;
  border: 2px solid rgba(255,255,255,0.5);
  color: white;
}
.pricing-card.featured .btn-primary:hover { background: rgba(255,255,255,0.35); }

/* ── FAQ ── */
#faq { background: var(--white); }
.faq-list {
  margin-top: 60px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  text-align: left;
  background: none;
  border: none;
  gap: 16px;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--teal); }
.faq-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform 0.3s;
  line-height: 1;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-answer-inner {
  padding: 0 0 24px;
  font-size: 0.95rem;
  color: var(--secondary);
  line-height: 1.75;
}
.faq-item.open .faq-answer { max-height: 300px; }

/* ── CONTACT ── */
#contact { background: var(--off-white); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  margin-top: 60px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-info-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--secondary);
}
.contact-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--teal-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.whatsapp-btn:hover { background: #1ebe5d; transform: translateY(-2px); }
.response-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--secondary);
  padding: 12px 16px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(94,133,151,0.15);
}
.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}
.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--dark);
  background: var(--off-white);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teal);
  background: white;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A6A7A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* CAPTCHA */
.captcha-wrap {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.captcha-wrap.error { border-color: #E53E3E; }
.captcha-wrap.success { border-color: var(--teal); }
.captcha-question {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 14px;
}
.captcha-avatars {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.captcha-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: var(--transition);
  background: transparent;
}
.captcha-option img,
.captcha-option video {
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  display: block;
}
.captcha-option span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
}
.captcha-option:hover { border-color: var(--teal-border); background: var(--white); }
.captcha-option.selected { border-color: var(--teal); background: rgba(94,133,151,0.06); }
.captcha-feedback {
  font-size: 0.8rem;
  margin-top: 8px;
  text-align: center;
  min-height: 18px;
}
.captcha-feedback.error { color: #E53E3E; }
.captcha-feedback.success { color: var(--teal); }
.form-submit-row { display: flex; align-items: center; gap: 20px; }
.form-submit-row .btn { flex-shrink: 0; }
.form-success {
  display: none;
  background: rgba(94,133,151,0.08);
  border: 1px solid rgba(94,133,151,0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--teal);
  font-weight: 500;
}

/* ── FOOTER ── */
#footer {
  background: #243A46;
  color: rgba(255,255,255,0.7);
  padding: 72px 0 0;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}
.footer-brand .footer-logo {
  height: 48px;
  margin-bottom: 16px;
  background: none;
  border-radius: 0;
  padding: 0;
  mix-blend-mode: normal;
  filter: none;
  object-fit: contain;
  display: block;
}
.footer-tagline {
  font-family: var(--font-arabic);
  font-size: 1rem;
  color: var(--teal);
  margin-bottom: 20px;
  direction: rtl;
  text-align: right;
}
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.social-link {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: rgba(255,255,255,0.6);
}
.social-link:hover { background: var(--teal); color: white; }
.footer-col h4 {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 24px 32px;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}
#footer .footer-bottom-outer {
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-bottom-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .avatars-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr 1fr; }
  .how-grid .how-card:last-child { grid-column: 1 / -1; max-width: 400px; margin: 0 auto; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 440px; margin-left: auto; margin-right: auto; }
  .pricing-card.featured { transform: none; }
  .pricing-card.featured:hover { transform: translateY(-4px); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  #navbar { padding: 0 20px; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .hero-content { flex-direction: column; padding: 100px 20px 40px; }
  .hero-left, .hero-right { flex: 0 0 100%; max-width: 100%; }
  .hero-right { display: none; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { justify-content: center; }
  .demo-grid { grid-template-columns: 1fr; gap: 24px; }
  .demo-avatar-side {
    display: flex;
    min-height: unset;
    order: -1; /* avatar above chat on mobile */
  }
  #demoAvatarContainer {
    height: 260px;
    width: 100%;
    border-radius: 16px;
  }
  #demoAvatarContainer video {
    height: 100%;
    width: auto;
  }
  .avatars-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr; }
  .how-grid .how-card:last-child { grid-column: 1; max-width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom-inner { flex-direction: column; gap: 8px; text-align: center; }
  .section { padding: 64px 0; }
  .container { padding: 0 20px; }
  #stats-bar { padding: 14px 20px; }
  .stats-inner { gap: 4px; }
  .stat-item { padding: 4px 12px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .avatars-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .avatar-card-media { height: 200px; }
  .demo-chat-panel { padding: 20px; }
  .contact-form-wrap { padding: 24px; }
}

/* ── iOS keyboard: keep input row visible above keyboard on mobile ──────────
   position:sticky pins the input to the bottom of the scroll container
   (the page body) so iOS keyboard rising does not cover it.
   env(safe-area-inset-bottom) pads for the iPhone home indicator bar.    */
@media (max-width: 768px) {
  .chat-input-row {
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    /* Safe-area accounts for iPhone home bar; fallback 0 for older devices */
    bottom: env(safe-area-inset-bottom, 0px);
    background: #ffffff;
    z-index: 10;
    border-radius: var(--radius-pill);
    /* Subtle separator between sticky row and messages scrolling behind */
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    /* Small padding so the row never butts directly against screen edge */
    padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
  }
  /* Ensure the chip row (above input) also stays visible, not hidden behind keyboard */
  .chip-row {
    position: -webkit-sticky;
    position: sticky;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    z-index: 9;
    padding-bottom: 4px;
  }
  /* Allow demo panel to grow tall enough for sticky children to scroll against */
  .demo-chat-panel {
    overflow: visible;
  }
}

/* ══════════════════════════════════════════════
   DEPLOY MODAL
══════════════════════════════════════════════ */
.deploy-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,35,50,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.32s ease;
}
.deploy-modal-overlay.visible { opacity: 1; }

.deploy-modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 48px 44px 40px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.28);
  transform: translateY(20px);
  transition: transform 0.32s ease;
}
.deploy-modal-overlay.visible .deploy-modal-box {
  transform: translateY(0);
}

.deploy-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.deploy-modal-close:hover { background: var(--off-white); color: var(--dark); }

.deploy-modal-header { margin-bottom: 36px; }
.deploy-modal-badge {
  display: inline-block;
  background: var(--teal-pale);
  color: var(--teal-dark);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
.deploy-modal-title {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 10px;
  line-height: 1.2;
}
.deploy-modal-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--secondary);
  margin: 0;
}

/* Steps */
.deploy-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 36px;
}
.deploy-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(94,133,151,0.10);
  position: relative;
}
.deploy-step:last-child { border-bottom: none; }

.deploy-step-num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(94,133,151,0.30);
}

.deploy-step-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 5px;
}
.deploy-step-desc {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--secondary);
  line-height: 1.6;
}
.deploy-step-desc code {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  background: var(--teal-pale);
  color: var(--teal-dark);
  padding: 1px 5px;
  border-radius: 4px;
}

/* CTA row */
.deploy-modal-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.deploy-modal-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: #25D366;
  text-decoration: none;
  transition: opacity 0.2s;
}
.deploy-modal-wa:hover { opacity: 0.8; }

@media (max-width: 600px) {
  .deploy-modal-box { padding: 32px 24px 28px; }
  .deploy-modal-title { font-size: 1.4rem; }
  .deploy-modal-cta { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════
   AUTH MODALS — Login & Sign Up
══════════════════════════════════════════════ */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,35,50,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.auth-modal-overlay.visible { opacity: 1; }
.auth-modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  padding: 44px 40px 36px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.30);
  transform: translateY(16px);
  transition: transform 0.3s ease;
}
.auth-modal-overlay.visible .auth-modal-box { transform: translateY(0); }
.auth-modal-logo {
  height: 48px;
  margin-bottom: 24px;
  display: block;
  mix-blend-mode: normal;
  filter: none;
}
.auth-modal-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 6px;
}
.auth-modal-subtitle {
  font-size: 0.9rem;
  color: var(--secondary);
  margin: 0 0 28px;
  line-height: 1.5;
}
.auth-modal-badge {
  display: inline-block;
  background: rgba(94,133,151,0.10);
  color: var(--teal-dark);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.auth-form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
}
.auth-form-group input {
  padding: 11px 14px;
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--dark);
  background: var(--off-white);
  transition: border-color 0.2s;
  outline: none;
}
.auth-form-group input:focus { border-color: var(--teal); background: #fff; }
.auth-form-group input.error { border-color: #E53E3E; }
.auth-submit-btn {
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  font-size: 1rem;
  border-radius: var(--radius);
}
.auth-error {
  font-size: 0.82rem;
  color: #E53E3E;
  margin-top: 8px;
  text-align: center;
  min-height: 18px;
}
.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--secondary);
}
.auth-switch a, .auth-switch button {
  color: var(--teal-dark);
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 0.85rem;
}
.auth-switch a:hover, .auth-switch button:hover { text-decoration: underline; }
.auth-divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 20px 0;
}
.auth-modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none;
  font-size: 26px; line-height: 1;
  color: var(--secondary); cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
}
.auth-modal-close:hover { background: var(--off-white); color: var(--dark); }

/* Logged-in nav state */
.nav-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(94,133,151,0.10);
  border-radius: var(--radius-pill);
  padding: 6px 14px 6px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal-dark);
  text-decoration: none;
}
.nav-user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 600px) {
  .auth-modal-box { padding: 32px 22px 28px; }
  .auth-form-row { grid-template-columns: 1fr; }
}

/* Mobile: hide Three.js canvas */
@media (max-width: 767px) {
  #heroCanvas { display: none; }
}

/* Stats bar SVG icon alignment */
.stat-item svg { vertical-align: middle; flex-shrink: 0; }
.how-icon svg { display: block; }
