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

:root {
  --brand: #7a1e3a;
  --brand-2: #a83254;
  --brand-3: #b7333c;
  --brand-ink: #4a1124;
  --brand-soft: #fdf2f5;
  --brand-tint: rgba(122, 30, 58, 0.08);

  --bg: #ffffff;
  --bg-muted: #faf8f9;
  --card: #ffffff;
  --border: #ece7e9;
  --border-strong: #ddd5d8;

  --ink: #1a1320;
  --ink-2: #5d535c;
  --ink-3: #8b8189;

  --shadow-sm: 0 1px 2px rgba(26, 19, 32, 0.06);
  --shadow-md: 0 10px 30px rgba(26, 19, 32, 0.08);
  --shadow-lg: 0 30px 60px rgba(74, 17, 36, 0.16);
  --shadow-phone: 0 40px 80px rgba(74, 17, 36, 0.28);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-ar: "Tajawal", "Inter", system-ui, sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.dl {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.dl[dir="rtl"] { font-family: var(--font-ar); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.dl-container {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ============ BUTTONS ============ */
.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: inherit;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.dl-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.dl-btn--sm { padding: 0.55rem 1rem; font-size: 0.9rem; }
.dl-btn--lg { padding: 0.95rem 1.5rem; font-size: 1.02rem; }

.dl-btn--solid { background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(122, 30, 58, 0.28); }
.dl-btn--solid:hover { background: var(--brand-ink); transform: translateY(-2px); }
.dl-btn--solid small { display: block; font-weight: 500; font-size: 0.74rem; opacity: 0.82; }
.dl-btn--solid strong { display: block; font-weight: 700; line-height: 1.15; }

.dl-btn--ghost { background: var(--card); color: var(--ink); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.dl-btn--ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

.dl-btn--invert { background: #fff; color: var(--brand); box-shadow: 0 12px 30px rgba(0,0,0,0.18); }
.dl-btn--invert:hover { transform: translateY(-2px); }

/* ============ HEADER ============ */
.dl-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.dl-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}
.dl-brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.dl-brand img { width: 36px; height: 36px; object-fit: contain; }
.dl-nav__links { display: flex; gap: 2rem; }
.dl-nav__links a { color: var(--ink-2); font-weight: 600; font-size: 0.95rem; transition: color 0.15s; }
.dl-nav__links a:hover { color: var(--brand); }
.dl-nav__actions { display: flex; align-items: center; gap: 0.75rem; }

.dl-lang { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-muted); border: 1px solid var(--border); }
.dl-lang button {
  border: 0; background: transparent; color: var(--ink-3);
  font: inherit; font-weight: 700; font-size: 0.8rem;
  padding: 0.35rem 0.7rem; border-radius: 999px; cursor: pointer; transition: all 0.15s;
}
.dl-lang button.active { background: var(--brand); color: #fff; }

/* ============ HERO ============ */
.dl-hero {
  position: relative;
  padding: clamp(3rem, 6vw, 6rem) 0 clamp(4rem, 7vw, 7rem);
  background:
    radial-gradient(1100px 600px at 88% -10%, var(--brand-soft), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, #f6eef1, transparent 55%);
}
.dl-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.dl-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.45rem 0.4rem 0.85rem;
  border-radius: 999px; background: var(--card);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm);
  font-size: 0.85rem; font-weight: 600; color: var(--ink-2);
}
.dl-pill svg { width: 18px; height: 18px; color: var(--brand); }
.dl-pill strong { background: var(--brand); color: #fff; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.78rem; }

.dl-hero__title {
  margin: 1.25rem 0 1rem;
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.dl-hero__title em { display: block; color: var(--brand); font-style: normal; }
.dl-hero__lead { margin: 0 0 2rem; max-width: 33rem; font-size: 1.12rem; color: var(--ink-2); }

.dl-hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.dl-hero__stats { display: flex; gap: 2.4rem; margin-top: 2.5rem; }
.dl-stat__num {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink);
}
.dl-stat__num svg { width: 20px; height: 20px; color: #f5a623; }
.dl-stat__label { font-size: 0.82rem; color: var(--ink-3); font-weight: 500; }

/* ============ ART / FLOATING ============ */
.dl-hero__art, .dl-showcase__art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.dl-glow {
  position: absolute;
  width: 110%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(168, 50, 84, 0.22), transparent 62%);
  filter: blur(10px);
  z-index: 0;
}
.dl-glow--soft { background: radial-gradient(circle, rgba(122,30,58,0.14), transparent 64%); }

@keyframes dl-floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ============ DEVICE FRAME + SCREENSHOT ============ */
.dl-phone-render {
  position: relative;
  z-index: 2;
  animation: dl-floaty 6s ease-in-out infinite;
}
.dl-phone-render--static { animation: none; }

.dl-device {
  position: relative;
  width: min(300px, 80vw);
  margin-inline: auto;
  /* outer titanium rail */
  padding: 4px;
  border-radius: 58px;
  background:
    linear-gradient(150deg, #6b6b70 0%, #2a2a2d 22%, #4a4a4e 50%, #1d1d20 78%, #58585c 100%);
  box-shadow:
    0 2px 3px rgba(255, 255, 255, 0.25) inset,
    0 -1px 2px rgba(0, 0, 0, 0.4) inset,
    0 30px 50px -12px rgba(26, 19, 32, 0.45),
    0 60px 90px -30px rgba(122, 30, 58, 0.25);
}

/* inner black bezel */
.dl-device__frame {
  position: relative;
  border-radius: 54px;
  background: #08070a;
  padding: 9px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 1px 2px rgba(255, 255, 255, 0.08) inset;
}

.dl-device__screen {
  position: relative;
  border-radius: 46px;
  overflow: hidden;
  aspect-ratio: 1206 / 2622;
  background: #000;
  z-index: 1;
}

/* Dynamic Island overlay (screenshot already has status bar, so keep this subtle/optional off) */
.dl-phone-render__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.dl-phone-render__shot.is-active {
  opacity: 1;
  visibility: visible;
}

/* screen sheen */
.dl-device__frame::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 46px;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 28%, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, 0.05) 100%);
}

/* side buttons */
.dl-device__btn {
  position: absolute;
  background: linear-gradient(180deg, #4a4a4e, #232326);
  border-radius: 3px;
  z-index: 0;
}
.dl-device__btn--silent { left: -4px; top: 116px; width: 4px; height: 26px; }
.dl-device__btn--up     { left: -4px; top: 158px; width: 4px; height: 50px; }
.dl-device__btn--down   { left: -4px; top: 220px; width: 4px; height: 50px; }
.dl-device__btn--power  { right: -4px; top: 178px; width: 4px; height: 70px; }

body.dl[dir="rtl"] .dl-device__btn--silent,
body.dl[dir="rtl"] .dl-device__btn--up,
body.dl[dir="rtl"] .dl-device__btn--down { left: auto; right: -4px; }
body.dl[dir="rtl"] .dl-device__btn--power { right: auto; left: -4px; }

/* ============ SECTIONS ============ */
.dl-section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.dl-section--muted { background: var(--bg-muted); border-block: 1px solid var(--border); }

.dl-head { max-width: 40rem; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.dl-eyebrow {
  display: inline-block; margin-bottom: 0.9rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint); padding: 0.35rem 0.8rem; border-radius: 999px;
}
.dl-head h2 { margin: 0 0 0.85rem; font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -0.02em; font-weight: 800; }
.dl-head p { margin: 0; font-size: 1.08rem; color: var(--ink-2); }

/* ============ MODULES ============ */
.dl-modules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.dl-module {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem 1.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dl-module:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--brand-tint); }
.dl-module__art { height: 120px; display: grid; place-items: center; margin-bottom: 1.1rem; }
.dl-module__art img { width: 116px; height: 116px; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(74,17,36,0.18)); transition: transform 0.25s ease; }
.dl-module:hover .dl-module__art img { transform: scale(1.08) rotate(-2deg); }
.dl-module h3 { margin: 0 0 0.45rem; font-size: 1.12rem; font-weight: 700; }
.dl-module p { margin: 0; font-size: 0.95rem; color: var(--ink-2); }

/* ============ SHOWCASE ============ */
.dl-showcase {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.dl-showcase__copy h2 { margin: 0.9rem 0 0.85rem; font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -0.02em; font-weight: 800; }
.dl-showcase__copy > p { margin: 0 0 1.8rem; font-size: 1.08rem; color: var(--ink-2); max-width: 34rem; }

.dl-bullets { list-style: none; margin: 0 0 1.8rem; padding: 0; display: grid; gap: 1.2rem; }
.dl-bullets li { display: flex; gap: 0.9rem; align-items: flex-start; }
.dl-bullets__icon { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); }
.dl-bullets__icon svg { width: 22px; height: 22px; }
.dl-bullets strong { display: block; font-size: 1.02rem; }
.dl-bullets span { color: var(--ink-2); font-size: 0.95rem; }

.dl-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.dl-chips span { padding: 0.5rem 1rem; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-size: 0.88rem; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow-sm); }

/* ============ APP ECOSYSTEM ============ */
.dl-section--dark {
  position: relative;
  background:
    radial-gradient(110% 120% at 85% 0%, rgba(168, 50, 84, 0.45) 0%, rgba(168, 50, 84, 0) 55%),
    linear-gradient(160deg, #2a0d18 0%, var(--brand-ink) 45%, #240b16 100%);
  color: #fff;
  overflow: hidden;
}
.dl-section--dark::before {
  content: "";
  position: absolute;
  inset-inline-start: -80px;
  bottom: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
.dl-head--invert h2 { color: #fff; }
.dl-head--invert p { color: rgba(255, 255, 255, 0.72); }
.dl-head--invert .dl-eyebrow { color: #fff; background: rgba(255, 255, 255, 0.14); }

.dl-apps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.dl-app-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-xl);
  padding: 2.1rem 1.7rem;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease, background 0.2s ease;
}
.dl-app-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.32);
}
.dl-app-card--primary {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.3);
}

.dl-app-card__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  margin-bottom: 1.3rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.dl-app-card--primary .dl-app-card__icon { background: #fff; color: var(--brand); }
.dl-app-card__icon svg { width: 30px; height: 30px; }

.dl-app-card__tag {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
  margin-bottom: 0.55rem;
}
.dl-app-card h3 { margin: 0 0 0.5rem; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; }
.dl-app-card p { margin: 0 0 1.6rem; font-size: 0.96rem; color: rgba(255, 255, 255, 0.74); line-height: 1.55; }
.dl-app-card .dl-btn { margin-top: auto; }
.dl-app-card__meta { margin: 0.85rem 0 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); }

.dl-btn--block { width: 100%; padding: 0.85rem 1.2rem; font-size: 0.98rem; }
.dl-btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.dl-btn--outline:hover { background: #fff; color: var(--brand-ink); transform: translateY(-2px); }

/* ============ STEPS ============ */
.dl-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.dl-step { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 2.2rem 1.6rem 1.8rem; }
.dl-step__num {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 1.15rem;
  margin-bottom: 1.1rem;
}
.dl-step h3 { margin: 0 0 0.5rem; font-size: 1.12rem; font-weight: 700; }
.dl-step p { margin: 0; color: var(--ink-2); font-size: 0.96rem; }

/* ============ FINAL CTA ============ */
.dl-cta-wrap { padding-top: 0; }
.dl-cta {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.8rem;
  background: linear-gradient(120deg, var(--brand-ink), var(--brand) 55%, var(--brand-2));
  color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(2.2rem, 5vw, 3.4rem);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.dl-cta::after {
  content: ""; position: absolute; inset-inline-end: -60px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.dl-cta__copy { position: relative; z-index: 1; }
.dl-cta__copy h2 { margin: 0 0 0.5rem; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; }
.dl-cta__copy p { margin: 0; max-width: 32rem; opacity: 0.9; }
.dl-cta__action { position: relative; z-index: 1; text-align: center; }
.dl-cta__meta { margin: 0.7rem 0 0; font-size: 0.82rem; opacity: 0.78; }

/* ============ FOOTER ============ */
.dl-footer { padding: 2.5rem 0; border-top: 1px solid var(--border); }
.dl-footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.2rem; }
.dl-brand--footer img { width: 30px; height: 30px; }
.dl-footer__links { display: flex; gap: 1.6rem; }
.dl-footer__links a { color: var(--ink-2); font-size: 0.92rem; font-weight: 500; }
.dl-footer__links a:hover { color: var(--brand); }
.dl-footer__copy { color: var(--ink-3); font-size: 0.88rem; }

/* ============ RTL ============ */
body.dl[dir="rtl"] .dl-hero__title em { text-align: right; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .dl-nav__links { display: none; }
  .dl-hero__grid { grid-template-columns: 1fr; text-align: center; }
  /* lead with the headline + CTA, phone follows as a visual accent */
  .dl-hero__copy { order: 1; }
  .dl-hero__art { order: 2; margin-top: 0.5rem; }
  .dl-hero__lead { margin-inline: auto; }
  .dl-hero__cta, .dl-hero__stats { justify-content: center; }
  .dl-showcase { grid-template-columns: 1fr; }
  .dl-showcase__art { order: 2; }
  .dl-showcase__copy { order: 1; text-align: center; }
  .dl-showcase__copy > p { margin-inline: auto; }
  .dl-bullets li { text-align: start; max-width: 26rem; margin-inline: auto; }
  .dl-chips { justify-content: center; }
  .dl-modules { grid-template-columns: repeat(2, 1fr); }
  .dl-apps { grid-template-columns: 1fr; max-width: 32rem; margin-inline: auto; }
  .dl-steps { grid-template-columns: 1fr; max-width: 32rem; margin-inline: auto; }
}

@media (max-width: 768px) {
  .dl-container { width: min(var(--max), calc(100% - 2rem)); }
}

/* ============ PHONES ============ */
@media (max-width: 560px) {
  /* compact sticky header */
  .dl-nav__inner { min-height: 60px; gap: 0.6rem; }
  .dl-brand { font-size: 1.05rem; gap: 0.45rem; }
  .dl-brand img { width: 30px; height: 30px; }
  .dl-nav__actions { gap: 0.5rem; }
  /* header download collapses to an icon-only round button */
  .dl-nav__actions .dl-btn { padding: 0.6rem; border-radius: 50%; }
  .dl-nav__actions .dl-btn span { display: none; }
  .dl-nav__actions .dl-btn svg { margin: 0; }

  /* hero */
  .dl-hero { padding: 2rem 0 3rem; }
  .dl-pill { font-size: 0.8rem; }
  .dl-hero__title { font-size: clamp(2rem, 9vw, 2.7rem); margin: 1rem 0 0.85rem; }
  .dl-hero__lead { font-size: 1rem; margin-bottom: 1.5rem; }
  .dl-hero__cta { flex-direction: column; align-items: stretch; }
  .dl-hero__cta .dl-btn { width: 100%; }
  .dl-hero__stats { gap: 0; justify-content: space-between; margin-top: 1.8rem; width: 100%; }
  .dl-stat { flex: 1; }
  .dl-stat__num { font-size: 1.3rem; }
  .dl-stat__label { font-size: 0.74rem; }

  /* section rhythm */
  .dl-section { padding: 3rem 0; }
  .dl-head { margin-bottom: 2rem; }
  .dl-head h2 { font-size: clamp(1.55rem, 7vw, 2rem); }
  .dl-head p { font-size: 1rem; }

  /* modules */
  .dl-modules { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
  .dl-module { padding: 1.4rem 0.9rem; }
  .dl-module__art { height: 92px; }
  .dl-module__art img { width: 86px; height: 86px; }

  /* showcase + phone */
  .dl-device { width: min(240px, 72vw); }
  .dl-bullets { gap: 1rem; }

  /* ecosystem app cards */
  .dl-app-card { padding: 1.7rem 1.4rem; }

  /* final cta */
  .dl-cta { flex-direction: column; text-align: center; align-items: stretch; padding: 2rem 1.5rem; }
  .dl-cta__action { width: 100%; }
  .dl-cta__action .dl-btn { width: 100%; }

  /* footer */
  .dl-footer { padding: 2rem 0; }
  .dl-footer__inner { flex-direction: column; text-align: center; gap: 1rem; }
  .dl-footer__links { flex-wrap: wrap; justify-content: center; gap: 0.8rem 1.4rem; }
}

@media (max-width: 360px) {
  .dl-hero__stats { flex-wrap: wrap; gap: 1rem 1.6rem; justify-content: center; }
  .dl-stat { flex: 0 0 auto; }
  .dl-lang button { padding: 0.3rem 0.55rem; }
}
