:root {
  --bg-0: #07070a;
  --bg-1: #0e0e12;
  --bg-2: #16161c;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(212, 175, 55, 0.45);
  --gold: #d4af37;
  --gold-bright: #f5d97b;
  --gold-soft: rgba(212, 175, 55, 0.12);
  --text: #f5f5f7;
  --text-dim: #a1a1aa;
  --text-faint: #6b6b75;
  --android: #34a853;
  --android-bright: #4cc26a;
  --ios: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 20px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border) inset;
  --shadow-card-hover: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--border-hover) inset, 0 0 60px -20px rgba(212, 175, 55, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg-0);
  color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessibility: visible focus + skip link */
:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--gold);
  color: #1a1a1f;
  font-weight: 700;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Ambient backdrop */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 600px at 12% -8%, rgba(212, 175, 55, 0.12), transparent 60%),
    radial-gradient(800px 500px at 95% 10%, rgba(212, 175, 55, 0.06), transparent 60%),
    radial-gradient(700px 700px at 50% 110%, rgba(212, 175, 55, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5; pointer-events: none; z-index: 0;
}

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(7, 7, 10, 0.72);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo {
  display: inline-flex; align-items: center;
  text-decoration: none;
}
.logo img {
  height: 40px; width: auto; display: block;
}
.logo-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #1a1a1f; border-radius: 9px;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 20px -6px rgba(212, 175, 55, 0.6);
}
.header-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #1a1a1f; text-decoration: none;
  font-weight: 700; font-size: 13.5px; letter-spacing: 0.02em;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 6px 20px -8px rgba(212, 175, 55, 0.7);
}
.header-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -8px rgba(212, 175, 55, 0.8); }

/* Header actions + language selector */
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-select {
  position: relative;
  display: inline-flex; align-items: center;
}
.lang-select .lang-globe {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-dim);
  pointer-events: none;
}
.lang-select .lang-caret {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--text-dim);
  pointer-events: none;
}
.lang-select select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 30px 8px 33px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
  max-width: 170px;
}
.lang-select select:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.lang-select select option { background: var(--bg-1); color: var(--text); }

/* RTL (Urdu): mirror the selector's icon positions */
[dir="rtl"] .lang-select .lang-globe { left: auto; right: 11px; }
[dir="rtl"] .lang-select .lang-caret { right: auto; left: 9px; }
[dir="rtl"] .lang-select select { padding: 8px 33px 8px 30px; }

/* Hero */
.hero {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 0 auto;
  padding: 56px 20px 32px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--gold-bright);
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 10px var(--gold-bright);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.hero h1 {
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(38px, 8vw, 72px);
  line-height: 1.0; letter-spacing: -0.035em;
  margin-bottom: 18px;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 60%, #b8932e 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--text-dim);
  font-size: clamp(15px, 2vw, 17px);
  max-width: 580px; margin: 0 auto;
}

/* Apps grid */
.apps {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 0 auto;
  padding: 24px 20px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
  isolation: isolate;
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0) 0%, rgba(212, 175, 55, 0.5) 50%, rgba(212, 175, 55, 0) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.card:hover::before { opacity: 1; }

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-2);
}
.card-media svg { width: 100%; height: 100%; display: block; }
.card-media .badge {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.card-body { padding: 18px 18px 20px; }
.card-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 21px; letter-spacing: -0.02em;
  color: var(--gold-bright);
  margin-bottom: 4px;
}
.card-desc {
  color: var(--text-faint);
  font-size: 13px;
  margin-bottom: 16px;
  min-height: 38px;
}

/* Download buttons — App Store / Google Play style */
.dl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
.dl-btn:hover {
  background: #f5f5f7;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(255, 255, 255, 0.4);
}
.dl-btn:active { transform: translateY(0); }
.dl-btn svg.app-icon { width: 20px; height: 20px; flex-shrink: 0; }
.dl-btn .label-row {
  display: flex; flex-direction: column; align-items: flex-start;
  line-height: 1.05;
  min-width: 0;
}
.dl-btn .label-row small {
  font-size: 9px;
  font-weight: 500;
  color: #6b6b75;
  letter-spacing: 0.01em;
  margin-bottom: 2px;
  white-space: nowrap;
}
.dl-btn .label-row strong {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0a0a0c;
  white-space: nowrap;
}

/* Footer */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 20px 44px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12.5px;
}
.footer-18 {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.badge-18 {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--gold-bright);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 12px;
  flex-shrink: 0;
}
.footer-rg-note {
  max-width: 640px; margin: 0 auto 18px;
  color: var(--text-faint);
  font-size: 12px; line-height: 1.6;
}
.footer-row {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  flex-wrap: wrap;
}
.footer a { color: var(--text-dim); text-decoration: none; transition: color 0.15s ease; }
.footer a:hover { color: var(--gold-bright); }
.footer-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }

/* Generic centered message screen (used by 404) */
.age-deny {
  display: grid; place-items: center;
  min-height: 100vh; padding: 40px 20px; text-align: center;
}
.age-deny h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700; font-size: clamp(24px, 5vw, 34px);
  margin-bottom: 12px;
}
.age-deny p { color: var(--text-dim); max-width: 420px; }

/* Legal / content pages */
.legal {
  position: relative; z-index: 1;
  max-width: 820px; margin: 0 auto;
  padding: 48px 20px 72px;
}
.legal-eyebrow {
  display: inline-block;
  color: var(--gold-bright);
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.legal h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700; font-size: clamp(30px, 6vw, 46px);
  letter-spacing: -0.03em; line-height: 1.05;
  margin-bottom: 10px;
}
.legal .updated { color: var(--text-faint); font-size: 13px; margin-bottom: 8px; }
.legal h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700; font-size: 22px; letter-spacing: -0.02em;
  color: var(--gold-bright);
  margin: 34px 0 10px;
}
.legal p, .legal li { color: var(--text-dim); font-size: 15px; line-height: 1.7; }
.legal p { margin-bottom: 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--gold-bright); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal strong { color: var(--text); }
.legal-note {
  margin: 26px 0 10px;
  padding: 14px 16px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: var(--gold-soft);
  border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 13.5px; line-height: 1.6;
}
.legal-back {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 36px;
  color: var(--text-dim); font-size: 14px; font-weight: 600;
  text-decoration: none;
}
.legal-back:hover { color: var(--gold-bright); }

/* Stagger reveal */
.card { opacity: 0; transform: translateY(14px); animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.12s; }
.card:nth-child(3) { animation-delay: 0.19s; }
.card:nth-child(4) { animation-delay: 0.26s; }
.card:nth-child(5) { animation-delay: 0.33s; }
.card:nth-child(6) { animation-delay: 0.40s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* MOBILE OPTIMIZATIONS */
@media (max-width: 640px) {
  .header-inner { padding: 12px 16px; }
  .logo img { height: 32px; }
  .header-cta { padding: 8px 14px; font-size: 12.5px; }
  .header-actions { gap: 8px; }
  .lang-select select { font-size: 12px; max-width: 132px; padding: 7px 26px 7px 29px; }
  .lang-select .lang-globe { left: 9px; width: 14px; height: 14px; }

  .hero { padding: 36px 16px 20px; }
  .hero-eyebrow { font-size: 11px; padding: 6px 12px; margin-bottom: 16px; }
  .hero p { font-size: 14.5px; }

  .apps {
    padding: 16px 14px 60px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-body { padding: 16px 16px 18px; }
  .card-title { font-size: 17px; }
  .card-desc { font-size: 12.5px; min-height: 0; margin-bottom: 14px; }

  .dl-btn { padding: 12px 12px; gap: 10px; }
  .dl-btn svg.app-icon { width: 22px; height: 22px; }
  .dl-btn .label-row small { font-size: 9.5px; }
  .dl-btn .label-row strong { font-size: 14px; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .apps { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
