/* ─── Fonts ─────────────────────────────────────────────────── */
@font-face {
  font-family: 'Maghribi';
  src: url('fonts/Samir_Khouaja_Maghribi-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #1e3635;
  --bg-secondary: #162928;
  --bg-card: rgba(255,255,255,0.05);
  --gold: #f5c156;
  --gold-dim: rgba(245,193,86,0.15);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius: 14px;
  --container: 1080px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img {
  max-width: 100%;
  height: auto;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s, opacity 0.2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); opacity: 0.9; }
.btn--small { padding: 8px 18px; font-size: 14px; }
.btn--large { padding: 16px 32px; font-size: 17px; }
.btn--store {
  background: #000;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

/* ─── Header ────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(30,54,53,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--gold);
}
.nav__icon { border-radius: 10px; pointer-events: auto; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav__links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.nav__links a:hover { color: var(--text-primary); }

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero__text h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}
.hero__arabic {
  font-family: 'Maghribi', 'Amiri', serif;
  font-size: clamp(32px, 5vw, 52px);
  color: var(--gold);
  opacity: 0.85;
  margin-bottom: 20px;
  direction: rtl;
}
.hero__subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 32px;
}
.hero__buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero__ornament {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-dim) 0%, transparent 70%);
  pointer-events: none;
}

/* Phone mockup */
.mockup-phone {
  width: 280px;
  height: 560px;
  border-radius: 40px;
  border: 3px solid rgba(245,193,86,0.3);
  background: var(--bg-secondary);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
}
.mockup-screen {
  position: absolute;
  inset: 12px;
  border-radius: 28px;
  background: linear-gradient(160deg, var(--bg-primary), var(--bg-secondary));
  overflow: hidden;
}
.mockup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
}

/* ─── Features ──────────────────────────────────────────────── */
.features {
  padding: 80px 0;
}
.features h2 {
  text-align: center;
  font-size: 32px;
  color: var(--gold);
  margin-bottom: 48px;
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s;
}
.feature-card:hover {
  border-color: rgba(245,193,86,0.3);
}
.feature-card__icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── Showcase ─────────────────────────────────────────────── */
.showcase {
  padding: 80px 0 100px;
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}
.showcase h2 {
  text-align: center;
  font-size: 32px;
  color: var(--gold);
  margin-bottom: 12px;
}
.showcase__subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 56px;
}

/* Marquee wrapper with edge fades */
.showcase__marquee {
  position: relative;
}
.showcase__marquee::before,
.showcase__marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.showcase__marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-secondary), transparent);
}
.showcase__marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-secondary), transparent);
}

/* Animated track */
.showcase__track {
  display: flex;
  gap: 32px;
  width: max-content;
  animation: showcase-scroll 40s linear infinite;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
}
.showcase__track:hover {
  animation-play-state: paused;
}
.showcase__track.is-dragging {
  animation: none !important;
  cursor: grabbing;
  user-select: none;
}

@keyframes showcase-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 16px)); }
}

.showcase__slide {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.showcase__phone {
  width: 220px;
  height: 440px;
  border-radius: 32px;
  border: 3px solid rgba(245,193,86,0.2);
  background: var(--bg-primary);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04);
  transition: transform 0.4s cubic-bezier(.25,.46,.45,.94), box-shadow 0.4s;
}
.showcase__phone:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 32px 80px rgba(0,0,0,0.45), 0 0 40px rgba(245,193,86,0.08);
}
.showcase__phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 29px;
  padding: 8px;
}
.showcase__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .showcase__track {
    animation: none;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dim) transparent;
  }
  .mockup-float { animation: none; }
  .hero__ornament { animation: none; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── Download ──────────────────────────────────────────────── */
.download {
  padding: 80px 0;
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.download__content {
  text-align: center;
}
.download h2 {
  font-size: 32px;
  color: var(--gold);
  margin-bottom: 12px;
}
.download p {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 32px;
}
.download__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gold);
  color: var(--bg-primary);
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  text-align: center;
  max-width: 90vw;
}
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  padding: 40px 0;
}
.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--gold);
}
.footer__brand img { border-radius: 8px; }
.footer__links {
  display: flex;
  gap: 24px;
}
.footer__links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--text-secondary); }
.footer__copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Legal pages ───────────────────────────────────────────── */
.legal {
  padding: 120px 0 80px;
}
.legal h1 {
  font-size: 32px;
  color: var(--gold);
  margin-bottom: 8px;
}
.legal__date {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}
.legal h2 {
  font-size: 20px;
  color: var(--text-primary);
  margin: 32px 0 12px;
}
.legal p, .legal ul {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 16px;
}
.legal ul {
  padding-inline-start: 24px;
}
.legal li {
  margin-bottom: 8px;
}
.legal a {
  color: var(--gold);
  text-decoration: underline;
}

/* ─── Scroll Animations ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(.16,1,.3,1), transform 0.7s cubic-bezier(.16,1,.3,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children (feature cards) */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(.16,1,.3,1), transform 0.6s cubic-bezier(.16,1,.3,1);
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Hero floating phone */
.mockup-float {
  animation: mockup-float 6s ease-in-out infinite;
}
@keyframes mockup-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Hero ornament pulse */
.hero__ornament {
  animation: ornament-pulse 8s ease-in-out infinite;
}
@keyframes ornament-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

/* Feature card glow on hover */
.feature-card {
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.2), 0 0 24px rgba(245,193,86,0.06);
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero__subtitle { margin: 0 auto 32px; }
  .hero__buttons { justify-content: center; }
  .features__grid { grid-template-columns: 1fr; }
  .nav__links > a:not(.btn) { display: none; }
  .mockup-phone { width: 220px; height: 440px; border-radius: 32px; }
  .mockup-screen { border-radius: 22px; }
  .showcase__phone { width: 180px; height: 360px; border-radius: 28px; }
  .showcase__track { gap: 20px; }
  .showcase__track { animation-duration: 30s; }
}

@media (max-width: 480px) {
  .hero__buttons { flex-direction: column; align-items: center; }
  .download__buttons { flex-direction: column; align-items: center; }
}

/* ─── Language Switcher ────────────────────────────────────── */
.lang-switcher {
  position: relative;
}
.lang-switcher select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 6px 28px 6px 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  outline: none;
}
.lang-switcher select:hover,
.lang-switcher select:focus {
  border-color: var(--gold);
  color: var(--gold);
}
.lang-switcher select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.lang-switcher::after {
  content: "\25BE";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 10px;
}

/* ─── RTL (Arabic) ─────────────────────────────────────────── */
[dir="rtl"] body {
  font-family: 'Cairo', 'Traditional Arabic', sans-serif;
}

[dir="rtl"] .hero__ornament {
  right: auto;
  left: -200px;
}

[dir="rtl"] .lang-switcher::after {
  right: auto;
  left: 10px;
}
[dir="rtl"] .lang-switcher select {
  padding: 6px 10px 6px 28px;
}

[dir="rtl"] .legal p,
[dir="rtl"] .legal li {
  line-height: 1.8;
}

[dir="rtl"] .legal h3 {
  font-size: 18px;
}
