@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

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

:root {
  --primary: #e11d48;
  --primary-dark: #be123c;
  --primary-light: #fef2f4;
  --bg: #ffffff;
  --bg-alt: #f8f9fb;
  --fg: #0f172a;
  --fg-muted: #64748b;
  --border: #e2e8f0;
  --card: #ffffff;
  --radius: 1rem;
  --font: 'Tajawal', sans-serif;
  --nav-h: 68px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --shadow-red: 0 8px 32px rgba(225,29,72,.22);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
img { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── NAVBAR ─────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--fg);
  transition: opacity .2s;
}
.nav-logo:hover { opacity: .8; }
.nav-logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #f43f5e, var(--primary));
  border-radius: .7rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.nav-logo-icon svg { width: 20px; height: 20px; fill: #fff; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.btn-lang {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--fg);
  font-size: .82rem;
  font-weight: 700;
  padding: .35rem .85rem;
  border-radius: 2rem;
  transition: border-color .2s, color .2s;
}
.btn-lang:hover { border-color: var(--primary); color: var(--primary); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  padding: .55rem 1.3rem;
  border-radius: 2rem;
  border: none;
  box-shadow: var(--shadow-red);
  transition: background .2s, box-shadow .2s, transform .15s;
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(225,29,72,.28);
}
.btn-primary:active { transform: translateY(0); }

.btn-primary-lg {
  font-size: 1.05rem;
  padding: .85rem 2rem;
  border-radius: 2rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: .4rem;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* ── HERO ────────────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 5rem 0 6rem;
  background: radial-gradient(ellipse 80% 60% at 80% 20%, rgba(225,29,72,.07) 0%, transparent 70%);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text { display: flex; flex-direction: column; gap: 1.5rem; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--primary);
  font-weight: 600;
  font-size: .9rem;
}
.hero-badge::before {
  content: '';
  display: block;
  width: 2rem; height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--fg);
}
.hero-title .accent {
  background: linear-gradient(90deg, var(--primary), #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--fg-muted);
  line-height: 1.8;
  max-width: 28rem;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-cta-note {
  font-size: .85rem;
  color: var(--fg-muted);
}

/* ── PHONE MOCKUP ───────────────────────────── */
.phone-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.phone-wrapper::after {
  content: '';
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle, rgba(225,29,72,.12) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.phone-frame {
  position: relative;
  z-index: 1;
  width: 270px;
  height: 570px;
  background: #111;
  border-radius: 44px;
  border: 8px solid #1e1e1e;
  box-shadow: 0 0 0 1px #333, var(--shadow-lg), 0 24px 80px rgba(0,0,0,.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .55rem 1.1rem .2rem;
  color: rgba(255,255,255,.7);
  font-size: .6rem;
  font-weight: 600;
}
.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px; height: 18px;
  background: #111;
  border-radius: 0 0 12px 12px;
  z-index: 10;
}
.battery {
  width: 18px; height: 9px;
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: 2px;
  position: relative;
}
.battery::after {
  content: '';
  position: absolute;
  right: -4px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 5px;
  background: rgba(255,255,255,.4);
  border-radius: 0 1px 1px 0;
}
.battery::before {
  content: '';
  position: absolute;
  inset: 1.5px 5px 1.5px 1.5px;
  background: rgba(255,255,255,.6);
  border-radius: 1px;
}

.phone-video {
  margin: 0 .5rem;
  border-radius: 16px;
  overflow: hidden;
  height: 195px;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #db2777);
}
.phone-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 50%);
}
.video-badges {
  position: absolute;
  top: .6rem;
  left: .6rem;
  right: .6rem;
  display: flex;
  justify-content: space-between;
}
.video-badge {
  font-size: .55rem;
  font-weight: 700;
  background: rgba(0,0,0,.4);
  color: rgba(255,255,255,.85);
  padding: .15rem .4rem;
  border-radius: .3rem;
  font-family: monospace;
}
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play-btn::after {
  content: '';
  width: 0; height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #fff;
  margin-right: -2px;
}
.video-info {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  padding: .5rem .7rem .55rem;
}
.video-name {
  color: #fff;
  font-size: .65rem;
  font-weight: 600;
  margin-bottom: .35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  text-align: left;
}
.progress-row {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.progress-time {
  font-size: .55rem;
  color: rgba(255,255,255,.6);
  font-family: monospace;
  flex-shrink: 0;
}
.progress-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,.2);
  border-radius: 3px;
  position: relative;
}
.progress-fill {
  position: absolute;
  top: 0; left: 0;
  width: 38%;
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}
.progress-thumb {
  position: absolute;
  top: 50%;
  left: 38%;
  transform: translate(-50%, -50%);
  width: 9px; height: 9px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0,0,0,.4);
}

.phone-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem 1.2rem .5rem;
}
.ctrl-icon {
  color: rgba(255,255,255,.5);
  font-size: .9rem;
  background: none;
  border: none;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
}
.ctrl-play {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(225,29,72,.4);
}
.ctrl-play::after {
  content: '';
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 11px solid #fff;
  margin-right: -2px;
}

.phone-queue {
  flex: 1;
  padding: .2rem .5rem .5rem;
  overflow: hidden;
}
.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .2rem .25rem .4rem;
}
.queue-label {
  font-size: .6rem;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.queue-see-all {
  font-size: .6rem;
  color: var(--primary);
  font-weight: 600;
}
.queue-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .4rem;
  border-radius: .7rem;
  margin-bottom: .3rem;
  background: rgba(255,255,255,.05);
}
.queue-item--active {
  background: rgba(225,29,72,.15);
  border: 1px solid rgba(225,29,72,.25);
}
.queue-thumb {
  width: 32px; height: 32px;
  border-radius: .5rem;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.queue-item--active .queue-thumb { background: rgba(225,29,72,.25); }
.queue-thumb svg { width: 14px; height: 14px; fill: rgba(255,255,255,.4); }
.queue-item--active .queue-thumb svg { fill: var(--primary); }
.queue-meta { flex: 1; min-width: 0; }
.queue-name {
  font-size: .62rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  text-align: left;
}
.queue-item--active .queue-name { color: rgba(255,255,255,.9); }
.queue-dur {
  font-size: .56rem;
  color: rgba(255,255,255,.3);
  font-family: monospace;
  flex-shrink: 0;
}

/* ── FEATURES ──────────────────────────────── */
.features {
  padding: 6rem 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.section-header {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 3.5rem;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--fg);
  margin-bottom: .75rem;
}
.section-sub {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.7;
}

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

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: border-color .25s, box-shadow .25s, transform .2s;
}
.feature-card:hover {
  border-color: rgba(225,29,72,.35);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.feature-icon {
  width: 52px; height: 52px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: .85rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  transition: background .25s, color .25s;
}
.feature-card:hover .feature-icon {
  background: var(--primary);
  color: #fff;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: .6rem;
}
.feature-desc {
  font-size: .9rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* ── CTA ────────────────────────────────────── */
.cta {
  padding: 7rem 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(225,29,72,.04) 100%);
}
.cta-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--fg);
  margin-bottom: 1rem;
}
.cta-sub {
  font-size: 1.1rem;
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
}

/* ── FOOTER ─────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: .85rem;
}
.footer-brand-desc {
  font-size: .9rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 22rem;
}
.footer-col-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1rem;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.footer-links a {
  font-size: .88rem;
  color: var(--fg-muted);
  transition: color .2s;
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  font-size: .82rem;
  color: var(--fg-muted);
  text-align: center;
}

/* ── LEGAL PAGES ─────────────────────────────── */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}
.legal-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.legal-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--fg);
  margin-bottom: .5rem;
}
.legal-date {
  font-size: .9rem;
  color: var(--fg-muted);
}
.legal-section { margin-bottom: 2.5rem; }
.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.legal-section p {
  font-size: .95rem;
  color: var(--fg-muted);
  line-height: 1.85;
  margin-bottom: .75rem;
}
.legal-section ul {
  padding-right: 1.5rem;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
html[dir="ltr"] .legal-section ul {
  padding-left: 1.5rem;
  padding-right: 0;
}
.legal-section li {
  font-size: .95rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > *:first-child { grid-column: 1 / -1; }
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-badge { justify-content: center; }
  .hero-sub { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .phone-wrapper { order: -1; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 4rem; }
  .btn-primary-lg { width: 100%; }
  .phone-frame { width: 240px; height: 510px; }
  .phone-video { height: 170px; }
}

/* ── LTR OVERRIDES ──────────────────────────── */
html[dir="ltr"] .hero-badge::before { order: -1; }
html[dir="ltr"] .hero-sub { margin: 0 0 0 auto; }
html[dir="ltr"] .footer-brand-desc { margin: 0; }
html[dir="ltr"] .legal-section ul { padding-left: 1.5rem; padding-right: 0; }

/* ── ANIMATION ──────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim { animation: fadeInUp .65s ease both; }
.anim-d1 { animation-delay: .1s; }
.anim-d2 { animation-delay: .2s; }
.anim-d3 { animation-delay: .35s; }
.anim-d4 { animation-delay: .5s; }
