/* ===== FAMS website custom styles ===== */

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* السهم في اتجاه عربي يحتاج عكس — في LTR ما نعكسه */
.rtl-flip {
  transform: scaleX(-1);
}
html[dir="ltr"] .rtl-flip {
  transform: none;
}

/* تأثير ظهور تدريجي للأقسام */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar shadow عند التمرير */
#navbar.scrolled {
  box-shadow: 0 6px 20px -10px rgba(15, 23, 42, 0.15);
}

/* لا تستخدم letter-spacing مع العربية — يكسر اتصال الحروف */
h1, h2, h3, h4, h5, h6,
.brand-name, .brand-name * {
  letter-spacing: 0 !important;
  word-spacing: 0 !important;
}
.brand-name {
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
.brand-name > span {
  font-family: inherit;
  font-weight: inherit;
  font-style: inherit;
}

/* الاسم الإنجليزي — يقدر يحتوي على letter-spacing لأنه Latin */
.brand-en {
  letter-spacing: -0.03em;
  font-feature-settings: "ss01", "kern";
}

/* ========== Hero H1 — Arabic-safe rendering ==========
   المشكلة: leading-tight + bg-clip-text + النقاط العربية = تندمج مع السطر الثاني.
   الحل: line-height أوسع + padding-block للنقاط والمدّات + gradient بـ inline-block.
*/
.hero-h1 {
  line-height: 1.5;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
.hero-h1 > span {
  display: block;
  line-height: 1.4;
  padding-block: 0.08em 0.18em;
}
.hero-h1-grad {
  background: linear-gradient(to left, #183964 0%, #345c89 50%, #1DC0DF 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  padding-block: 0.1em 0.25em !important;
}
html[dir="ltr"] .hero-h1-grad {
  background: linear-gradient(to right, #183964 0%, #345c89 50%, #1DC0DF 100%);
  -webkit-background-clip: text;
          background-clip: text;
}

/* مدخلات النموذج */
input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

/* التركيز على الأزرار */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #2f9b8a;
  outline-offset: 2px;
  border-radius: 8px;
}

/* تحسين التمرير على الموبايل */
@media (max-width: 768px) {
  section {
    scroll-margin-top: 70px;
  }
}

/* اخفاء scrollbar في الإطارات الفرعية لو وجدت */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============================================================
   إضافات هوية أصولك · Osolk (2026-09)
   ============================================================ */

/* Hero animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.animate-float        { animation: float 5s ease-in-out infinite; }
.animate-float.delay-300 { animation-delay: 0.3s; }
.animate-float.delay-500 { animation-delay: 0.5s; }
.animate-float.delay-700 { animation-delay: 0.7s; }

@keyframes spinSlow { to { transform: rotate(360deg); } }
.animate-spin-slow    { animation: spinSlow 40s linear infinite; }
.animate-spin-reverse { animation: spinSlow 30s linear infinite reverse; }

/* Grid background pattern */
.bg-grid {
  background-image:
    linear-gradient(rgba(24, 57, 100, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 57, 100, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
}
.bg-slate-900 .bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
}

/* Reveal delays */
.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* ============ Shock stats band (dark section) ============ */
.stat-band {
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  transition: all 0.4s ease;
  text-align: center;
}
.stat-band:hover {
  border-color: rgba(29, 192, 223, 0.5);
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06);
}
.stat-band-accent {
  background: linear-gradient(135deg, rgba(29, 192, 223, 0.15), rgba(29, 192, 223, 0.05));
  border-color: rgba(29, 192, 223, 0.3);
}
.stat-band-num {
  font-size: 2.5rem;
  line-height: 1;
  font-weight: 900;
  color: white;
  letter-spacing: -0.02em;
}
@media (min-width: 640px) {
  .stat-band-num { font-size: 3rem; }
}
.stat-band-label {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #6cdcea;
}
.stat-band-desc {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.55;
}

/* ============ Executive value cards ============ */
.exec-card {
  position: relative;
  padding: 32px 28px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 24px;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.exec-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #183964, #1DC0DF);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s ease;
}
.exec-card:hover {
  border-color: #c4f1f8;
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -20px rgba(24, 57, 100, 0.22);
}
.exec-card:hover::before { transform: scaleX(1); }

.exec-card-featured {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9fc 100%);
  border-color: #9be7f1;
}
.exec-card-featured::before {
  transform: scaleX(1);
  height: 6px;
}
.exec-card-featured:hover {
  transform: translateY(-10px);
}

.exec-badge {
  position: absolute;
  top: 20px;
  left: 24px;
  font-size: 0.75rem;
  font-weight: 900;
  color: #cbd5e1;
  letter-spacing: 0.1em;
}
[dir="rtl"] .exec-badge { left: auto; right: 24px; }

.exec-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, #e9eef5 0%, #c8d4e4 100%);
  color: #183964;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  transition: all 0.5s ease;
}
.exec-icon svg { width: 30px; height: 30px; }
.exec-card:hover .exec-icon {
  transform: scale(1.1) rotate(-6deg);
  background: linear-gradient(135deg, #1DC0DF 0%, #183964 100%);
  color: white;
}
.exec-card-featured .exec-icon {
  background: linear-gradient(135deg, #1DC0DF 0%, #183964 100%);
  color: white;
}
.exec-card h3 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #183964;
  margin-bottom: 8px;
}
.exec-lede {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1DC0DF;
  margin-bottom: 12px;
}
.exec-body {
  color: #64748b;
  line-height: 1.75;
  font-size: 0.95rem;
  margin-bottom: 20px;
}
.exec-outcome {
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #183964;
}

/* Shadow utilities extended */
.shadow-glow {
  box-shadow: 0 20px 50px -12px rgba(29, 192, 223, 0.45),
              0 8px 20px -8px rgba(24, 57, 100, 0.25);
}

/* Hero gradient text uses the primary→secondary blend */
.hero-title-gradient {
  background: linear-gradient(90deg, #183964, #1DC0DF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Journey CTA hover translate — RTL-aware */
[dir="rtl"] .group:hover .group-hover\:translate-x-\[-4px\] {
  transform: translateX(4px);
}

/* Focus ring — align with brand */
button:focus-visible, a:focus-visible {
  outline: 2px solid #1DC0DF !important;
  outline-offset: 3px;
  border-radius: 10px;
}

/* Mobile refinements */
@media (max-width: 640px) {
  .exec-card { padding: 24px 20px; }
  .exec-card h3 { font-size: 1.25rem; }
  .exec-icon { width: 52px; height: 52px; }
  .exec-icon svg { width: 26px; height: 26px; }
  .stat-band { padding: 18px 14px; }
  .stat-band-num { font-size: 2rem; }
  .stat-band-label { font-size: 0.8rem; }
  .stat-band-desc { display: none; }
  .exec-card:hover, .stat-band:hover { transform: none; }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in-up,
  .animate-float,
  .animate-spin-slow,
  .animate-spin-reverse { animation: none !important; opacity: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
