/* ============================================================
   ONZMEDIA — Custom CSS (supplements Tailwind CDN)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+Arabic:wght@400;500;600;700;800;900&display=swap');

:root {
  --font-inter: 'Inter', system-ui, sans-serif;
  --font-arabic: 'Noto Sans Arabic', system-ui, sans-serif;
  --color-bg: #020617;
  --color-emerald: #10b981;
  --color-emerald-600: #059669;
  --color-orange: #ea580c;
  --color-orange-600: #ea580c;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-slate-950: #020617;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: #f8fafc;
  font-family: var(--font-inter);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6366f1; }

/* ── Bento card ────────────────────────────────────── */
.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #1e293b;
  background: rgba(15,23,42,0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.bento-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-2px);
}

/* ── Gradient text ─────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #fff 0%, #818cf8 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-orange {
  background: linear-gradient(135deg, #fff 0%, #fb923c 40%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Ping dot (hero badge) ─────────────────────────── */
@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
.ping { animation: ping 1s cubic-bezier(0,0,0.2,1) infinite; }

/* ── Fade/slide in on scroll ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Laila voice widget rings ──────────────────────── */
@keyframes laila-ping {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}
.laila-ring   { animation: laila-ping 2s ease-out infinite; }
.laila-ring-2 { animation: laila-ping 2s ease-out 0.6s infinite; }
.laila-ring-3 { animation: laila-ping 2s ease-out 1.2s infinite; }

/* ── Range slider ──────────────────────────────────── */
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: linear-gradient(to right, #6366f1, #818cf8);
  border-radius: 3px;
  outline: none;
  width: 100%;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #6366f1;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #6366f1;
}
input[type='range']::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #6366f1;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #6366f1;
}

/* ── Video modal overlay ───────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  position: relative;
  width: 100%;
  max-width: 56rem;
  aspect-ratio: 16/9;
  background: #0f172a;
  border-radius: 1rem;
  border: 1px solid #334155;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal-box { transform: scale(1); }

/* ── Step slide animation ──────────────────────────── */
.step-panel { animation: slideIn 0.25s ease both; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
.step-panel.slide-right { animation: slideInRight 0.25s ease both; }
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Typing indicator dots ─────────────────────────── */
@keyframes bounce-dot {
  0%, 80%, 100% { transform: translateY(0); }
  40%           { transform: translateY(-6px); }
}
.dot-1 { animation: bounce-dot 1.2s ease-in-out infinite; }
.dot-2 { animation: bounce-dot 1.2s ease-in-out 0.2s infinite; }
.dot-3 { animation: bounce-dot 1.2s ease-in-out 0.4s infinite; }

/* ── Animate spin ──────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

/* ── Navbar blur ───────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(30,41,59,0.6);
  background: rgba(2,6,23,0.8);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* ── Lang switcher ─────────────────────────────────── */
.lang-switcher {
  display: inline-flex; align-items: center;
  border-radius: 0.5rem;
  border: 1px solid #334155;
  background: rgba(15,23,42,0.7);
  padding: 0.25rem;
  direction: ltr;
}
.lang-btn {
  border-radius: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 11px; font-weight: 600;
  color: #cbd5e1;
  cursor: pointer; border: none; background: transparent;
  transition: background 0.15s, color 0.15s;
}
.lang-btn:hover { background: #1e293b; color: #fff; }
.lang-btn.active { background: #059669; color: #fff; }

/* ── Form inputs common ────────────────────────────── */
.form-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #334155;
  background: rgba(30,41,59,0.5);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #fff;
  outline: none;
  transition: border-color 0.15s;
  font-family: var(--font-arabic), var(--font-inter);
}
.form-input::placeholder { color: #64748b; }
.form-input:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,0.2); }
.form-input-orange:focus { border-color: #ea580c; box-shadow: 0 0 0 2px rgba(234,88,12,0.2); }

/* ── Choice button ─────────────────────────────────── */
.choice-btn {
  border-radius: 0.75rem;
  border: 1px solid #334155;
  background: rgba(30,41,59,0.4);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  text-align: right;
  color: #cbd5e1;
  cursor: pointer; width: 100%;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-family: var(--font-arabic), var(--font-inter);
}
.choice-btn:hover { border-color: #475569; }
.choice-btn.selected-green {
  border-color: #10b981;
  background: rgba(16,185,129,0.1);
  color: #6ee7b7;
}
.choice-btn.selected-orange {
  border-color: #f97316;
  background: rgba(249,115,22,0.1);
  color: #fdba74;
}

/* ── Progress bar ──────────────────────────────────── */
.progress-bar {
  height: 6px; border-radius: 9999px;
  background: #1e293b; overflow: hidden;
  margin-bottom: 1.75rem;
}
.progress-fill {
  height: 100%;
  background: #10b981;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* ── Chat widget ───────────────────────────────────── */
.chat-msg {
  max-width: 80%;
  border-radius: 1rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  font-family: var(--font-arabic);
}
.chat-msg.ai {
  border-top-right-radius: 0;
  background: #1e293b; color: #cbd5e1;
}
.chat-msg.user {
  border-top-left-radius: 0;
  background: rgba(234,88,12,0.9); color: #fff;
}

/* ── Laila widget panel ────────────────────────────── */
.laila-panel {
  position: fixed; bottom: 5.5rem; right: 1.5rem; z-index: 200;
  width: 20rem;
  border-radius: 1rem;
  border: 1px solid rgba(51,65,85,0.6);
  background: rgba(15,23,42,0.95);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
  overflow: hidden;
  display: none;
  direction: rtl;
}
.laila-panel.open { display: block; }

/* ── Video grid overlay ────────────────────────────── */
.video-grid {
  position: absolute; inset: 0; opacity: 0.1;
  pointer-events: none;
}

/* ── Step indicator row (systeme form) ─────────────── */
.step-indicator-line {
  flex: 1; height: 1px; margin: 0 0.75rem 1rem; min-width: 40px;
  background: #1e293b;
  transition: background 0.5s;
}
.step-indicator-line.done { background: rgba(16,185,129,0.4); }

/* ── Section background glow ───────────────────────── */
.hero-glow-green {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 90% 58% at 50% -8%, rgba(34,197,94,0.16) 0%, transparent 68%);
}
.hero-glow-orange {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 90% 55% at 50% -5%, rgba(234,88,12,0.12) 0%, transparent 68%);
}

/* ── Responsive helpers ────────────────────────────── */
@media (max-width: 767px) {
  .md\:hidden { display: none !important; }
  .sm\:flex-row { flex-direction: row !important; }
}
@media (min-width: 768px) {
  .md\:flex { display: flex !important; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2,1fr) !important; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4,1fr) !important; }
  .md\:flex-row { flex-direction: row !important; }
}
@media (min-width: 1024px) {
  .lg\:col-span-3 { grid-column: span 3/span 3 !important; }
  .lg\:col-span-2 { grid-column: span 2/span 2 !important; }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5,1fr) !important; }
}
