/* ================================================================
   GHIRAS PLATFORM — Premium Marketing Site + Auth
   Deep navy × indigo gradient · RTL · Tajawal
   ================================================================ */

:root {
  --ink:      #0b1023;
  --ink-2:    #111834;
  --ink-3:    #1a2347;
  --brand:    #6366f1;
  --brand-2:  #8b5cf6;
  --brand-grad: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gold:     #f59e0b;
  --gold-2:   #fbbf24;
  --text:     #0f172a;
  --muted:    #5b6478;
  --line:     #e7eaf3;
  --bg:       #f8fafc;
  --card:     #ffffff;
  --radius:   16px;
  --shadow-s: 0 2px 10px rgba(11,16,35,.06);
  --shadow-m: 0 14px 44px rgba(11,16,35,.1);
  --shadow-l: 0 30px 80px rgba(11,16,35,.16);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.muted { color: var(--muted); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-primary, .btn-outline, .btn-ghost, .btn-hero, .btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s, opacity .2s;
}

.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 15px;
  box-shadow: 0 6px 20px rgba(99,102,241,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(99,102,241,.45); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 11px 26px;
  border-radius: 12px;
  font-size: 15px;
  text-align: center;
}
.btn-outline:hover { background: var(--ink); color: #fff; }

.btn-ghost {
  background: transparent;
  color: #e8ecf8;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 15px;
}
.btn-ghost:hover { color: #a5b4fc; }

.btn-block { width: 100%; text-align: center; }

/* ================================================================
   NAV
   ================================================================ */
.p-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,16,35,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(99,102,241,.15);
}
.p-nav .container {
  display: flex;
  align-items: center;
  gap: 34px;
  height: 76px;
}
.p-nav__logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.4px;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex-shrink: 0;
}
.p-nav__links { display: flex; gap: 26px; }
.p-nav__links a {
  color: #c7cee4;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  padding: 6px 0;
}
.p-nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--brand-grad);
  transition: width .25s;
  border-radius: 2px;
}
.p-nav__links a:hover { color: #fff; }
.p-nav__links a:hover::after { width: 100%; }
.p-nav__actions { margin-right: auto; display: flex; gap: 12px; align-items: center; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 480px at 80% -10%, rgba(99,102,241,.2), transparent 60%),
    radial-gradient(700px 400px at 10% 110%, rgba(139,92,246,.18), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .04;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.8) 1px, transparent 1px);
  background-size: 44px 44px;
}
.hero__inner {
  position: relative;
  text-align: center;
  padding: 96px 24px 88px;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.4);
  color: #a5b4fc;
  border-radius: 99px;
  padding: 8px 22px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 28px;
}
.hero__title {
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.hero__title span {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  color: #aab3cf;
  font-size: clamp(15px, 2.2vw, 19px);
  max-width: 640px;
  margin: 18px auto 36px;
  line-height: 1.7;
}
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-hero {
  background: var(--brand-grad);
  color: #fff;
  padding: 16px 42px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 10px 32px rgba(99,102,241,.4);
}
.btn-hero:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(99,102,241,.5); }

.btn-hero-ghost {
  background: rgba(255,255,255,.06);
  color: #e8ecf8;
  padding: 16px 42px;
  border-radius: 14px;
  font-size: 17px;
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.12); }

.hero__stats {
  display: flex;
  justify-content: center;
  margin: 68px auto 0;
  flex-wrap: wrap;
  max-width: 680px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(8px);
}
.hero__stats > div {
  flex: 1;
  min-width: 150px;
  padding: 22px 32px;
  text-align: center;
  border-inline-start: 1px solid rgba(255,255,255,.07);
}
.hero__stats > div:first-child { border-inline-start: none; }
.hero__stats strong { display: block; font-size: 30px; font-weight: 900; color: #a5b4fc; }
.hero__stats span { color: #9aa3c0; font-size: 13.5px; }

/* ================================================================
   SECTIONS
   ================================================================ */
.section-title {
  text-align: center;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -.4px;
  position: relative;
  padding-bottom: 22px;
  margin-bottom: 10px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--brand-grad);
}
.features, .pricing, .stores { padding: 88px 0; }
.features, .stores { background: #fff; }

/* ================================================================
   FEATURE CARDS
   ================================================================ */
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 48px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 28px;
  box-shadow: var(--shadow-s);
  position: relative;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: var(--brand-grad);
  opacity: 0;
  transition: opacity .25s;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); }
.feature-card:hover::before { opacity: 1; }
.feature-card__icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.06));
  border: 1px solid rgba(99,102,241,.2);
}
.feature-card h3 { font-size: 18.5px; font-weight: 800; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* ================================================================
   PRICING
   ================================================================ */
.pricing { background: linear-gradient(180deg, var(--bg), #eef1f9); }
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 52px;
  align-items: stretch;
}
.pricing-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 38px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-s);
  transition: transform .25s, box-shadow .25s;
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); }
.pricing-card--featured {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-3) 100%);
  color: #fff;
  border: 1px solid rgba(99,102,241,.45);
  box-shadow: var(--shadow-l);
  transform: scale(1.04);
  z-index: 1;
}
.pricing-card--featured:hover { transform: scale(1.04) translateY(-6px); }
.pricing-card--featured .muted { color: #94a3b8; }
.pricing-card__badge {
  position: absolute;
  top: -14px;
  right: 50%;
  transform: translateX(50%);
  background: var(--brand-grad);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: 99px;
  padding: 6px 22px;
  box-shadow: 0 6px 18px rgba(99,102,241,.4);
  white-space: nowrap;
}
.pricing-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
.pricing-card__price { margin-bottom: 24px; }
.price-amount { font-size: 46px; font-weight: 900; letter-spacing: -1px; }
.pricing-card--featured .price-amount {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.price-currency { color: var(--muted); font-size: 14px; margin-inline-start: 6px; }
.pricing-card__features { list-style: none; margin-bottom: 30px; flex: 1; }
.pricing-card__features li {
  padding: 9px 0;
  font-size: 14.5px;
  border-bottom: 1px dashed rgba(128,138,165,.22);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-card__features li:last-child { border-bottom: none; }
.pricing-card__features li::before { content: '✓'; color: #10b981; font-weight: 900; flex-shrink: 0; }
.pricing-card--featured .pricing-card__features li { border-color: rgba(255,255,255,.1); color: #cbd5e1; }
.pricing-card .btn-primary, .pricing-card .btn-outline { text-align: center; justify-content: center; }
.pricing-card--featured .btn-outline { color: #fff; border-color: rgba(255,255,255,.38); }
.pricing-card--featured .btn-outline:hover { background: rgba(255,255,255,.1); }

/* ================================================================
   CTA SECTION
   ================================================================ */
.cta-section {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #fff;
  padding: 88px 24px;
  background:
    radial-gradient(700px 380px at 50% -20%, rgba(99,102,241,.22), transparent 60%),
    linear-gradient(180deg, var(--ink-2), var(--ink));
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .03;
  background-image:
    linear-gradient(rgba(255,255,255,1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,1) 1px, transparent 1px);
  background-size: 40px 40px;
}
.cta-section h2 { position: relative; font-size: clamp(28px, 4.6vw, 44px); font-weight: 900; margin-bottom: 12px; }
.cta-section p  { position: relative; color: #aab3cf; font-size: 17px; margin-bottom: 32px; }

/* ================================================================
   STORES SHOWCASE
   ================================================================ */
.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 48px;
}
.store-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-s);
  transition: transform .22s, box-shadow .22s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.store-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-m); }
.store-card__logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--line);
}
.store-card h3 { font-size: 17px; font-weight: 800; }
.store-card p { font-size: 13.5px; color: var(--muted); flex: 1; }
.store-card a { font-size: 13.5px; font-weight: 700; color: var(--brand); }

/* ================================================================
   FOOTER
   ================================================================ */
.p-footer {
  background: var(--ink);
  color: #8a93b5;
  padding: 36px 0;
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.p-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.p-footer__brand {
  font-size: 20px;
  font-weight: 900;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.p-footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.p-footer__links a { color: #8a93b5; transition: color .2s; }
.p-footer__links a:hover { color: #a5b4fc; }

/* ================================================================
   AUTH PAGES
   ================================================================ */
.auth-page { min-height: 100vh; background: var(--ink); }
.auth-wrapper { display: flex; width: 100%; min-height: 100vh; }

.auth-side {
  flex: 1;
  color: #fff;
  padding: 70px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 400px at 20% 0%, rgba(99,102,241,.18), transparent 55%),
    radial-gradient(500px 380px at 90% 100%, rgba(139,92,246,.16), transparent 60%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-3) 100%);
}
.auth-side::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .04;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,1) 1px, transparent 1px);
  background-size: 40px 40px;
}

.auth-logo {
  position: relative;
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 44px;
  display: inline-block;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-side h1 {
  position: relative;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 12px;
}
.auth-side p { position: relative; color: #aab3cf; font-size: 16px; }

.auth-features {
  position: relative;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-features div {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 14.5px;
  color: #dfe4f5;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-form-wrap {
  width: min(520px, 100%);
  background: #fff;
  padding: 60px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-form-wrap h2 { font-size: 26px; font-weight: 900; margin-bottom: 28px; }

.auth-form .form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 7px;
  color: #334155;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14.5px;
  background: #fafbfe;
  transition: border-color .2s, box-shadow .2s;
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(99,102,241,.14);
  background: #fff;
}
.form-group textarea { resize: vertical; }

.auth-switch { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--brand); font-weight: 700; }
.auth-terms { margin-top: 10px; font-size: 12.5px; color: #9aa3bb; text-align: center; }
.auth-terms a { text-decoration: underline; }

/* ================================================================
   ALERTS
   ================================================================ */
.alert {
  padding: 13px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: #ecfdf5; color: #065f46; border-right: 4px solid #10b981; }
.alert-error   { background: #fef2f2; color: #991b1b; border-right: 4px solid #ef4444; }
.alert-info    { background: #eff6ff; color: #1e40af; border-right: 4px solid #3b82f6; }

/* ================================================================
   ANIMATION
   ================================================================ */
@media (prefers-reduced-motion: no-preference) {
  .feature-card, .pricing-card {
    animation: rise .6s ease both;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
  }
  .features__grid > :nth-child(2),
  .pricing__grid  > :nth-child(2) { animation-delay: .08s; }
  .features__grid > :nth-child(3),
  .pricing__grid  > :nth-child(3) { animation-delay: .16s; }
  .features__grid > :nth-child(4) { animation-delay: .24s; }
  .features__grid > :nth-child(5) { animation-delay: .32s; }
  .features__grid > :nth-child(6) { animation-delay: .40s; }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
  .auth-side { display: none; }
  .auth-form-wrap { width: 100%; padding: 48px 28px; min-height: 100vh; }
  .auth-page { background: #fff; }
}
/* ── Mobile nav toggle — hidden on desktop ── */
.p-nav__toggle { display: none; }
.p-nav__drawer  { display: none; }
.p-nav__overlay { display: none; }

@media (max-width: 760px) {
  .p-nav .container { gap: 14px; height: 68px; }
  .p-nav__links { display: none; }
  .p-nav__actions .btn-ghost,
  .p-nav__actions .btn-primary { display: none; }

  /* hamburger button */
  .p-nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-inline-start: 8px;
    flex-shrink: 0;
  }
  .p-nav__toggle span {
    display: block;
    height: 2px;
    background: #c7cee4;
    border-radius: 2px;
    transition: all .25s;
    transform-origin: center;
  }
  .p-nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .p-nav__toggle.open span:nth-child(2) { opacity: 0; }
  .p-nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* drawer */
  .p-nav__drawer {
    position: fixed;
    top: 68px;
    right: 0;
    left: 0;
    background: rgba(11,16,35,.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 99;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(99,102,241,.2);
  }
  .p-nav__drawer.open { display: flex; flex-direction: column; }
  .p-nav__drawer a {
    color: #c7cee4;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: block;
  }
  .p-nav__drawer a:hover { color: #fff; }
  .p-nav__drawer-actions { display: flex; gap: 10px; margin-top: 16px; }
  .p-nav__drawer-actions a { flex: 1; text-align: center; }

  /* overlay */
  .p-nav__overlay {
    position: fixed;
    inset: 0;
    z-index: 98;
    background: rgba(0,0,0,.4);
  }
  .p-nav__overlay.open { display: block; }

  .hero__inner { padding: 68px 20px 56px; }
  .pricing-card--featured { transform: none; }
  .pricing-card--featured:hover { transform: translateY(-6px); }
  .features, .pricing, .stores { padding: 60px 0; }
}
@media (max-width: 480px) {
  .hero__cta { flex-direction: column; align-items: center; }
  .btn-hero, .btn-hero-ghost { width: 100%; max-width: 320px; }
}
