/* ============================================
   Widgety — shared design system
   Premium Islamic widgets iOS app
   ============================================ */

:root {
  --bg-0: #0A0A0A;
  --bg-1: #111111;
  --bg-card: #1A1A1A;
  --bg-card-2: #161616;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --gold: #C8A84B;
  --gold-soft: #A88A37;
  --gold-bright: #E5CB76;
  --gold-tint: rgba(200, 168, 75, 0.14);
  --green: #1D6A4A;
  --green-soft: #2a8a62;
  --text: #FFFFFF;
  --text-dim: rgba(255, 255, 255, 0.55);
  --text-dimmer: rgba(255, 255, 255, 0.38);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-gold: 0 10px 40px -10px rgba(200, 168, 75, 0.45), 0 4px 12px -4px rgba(200, 168, 75, 0.3);
  --shadow-card: 0 24px 80px -40px rgba(0, 0, 0, 0.8);

  --gold-gradient: linear-gradient(135deg, #E5CB76 0%, #C8A84B 45%, #A88A37 100%);
  --gold-text: linear-gradient(180deg, #F0DA8E 0%, #C8A84B 100%);

  --font-ar: 'Cairo', 'Noto Naskh Arabic', system-ui, sans-serif;
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-ar);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

[lang="en"], .en {
  font-family: var(--font-en);
}

html[dir="rtl"] body { direction: rtl; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ============== Geometric pattern background ============== */
.geo-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='none' stroke='%23C8A84B' stroke-width='0.7' opacity='0.5'><path d='M60 6 L78 24 L96 24 L96 42 L114 60 L96 78 L96 96 L78 96 L60 114 L42 96 L24 96 L24 78 L6 60 L24 42 L24 24 L42 24 Z'/><path d='M60 24 L84 48 L84 72 L60 96 L36 72 L36 48 Z'/><circle cx='60' cy='60' r='6'/></g></svg>");
  background-size: 240px 240px;
  opacity: 0.06;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

main, header, footer { position: relative; z-index: 1; }

/* ============== Layout ============== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}
.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 28px;
}

section { padding: 96px 0; position: relative; }
section.tight { padding: 64px 0; }

/* ============== Type ============== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border: 1px solid rgba(200, 168, 75, 0.3);
  border-radius: 999px;
  background: rgba(200, 168, 75, 0.06);
}
.eyebrow .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(32px, 4vw, 52px); font-weight: 700; }
h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; }
h4 { font-size: 18px; font-weight: 600; }

.gold-text {
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 640px;
}

.dim { color: var(--text-dim); }
.center { text-align: center; }

/* ============== Gold underline ============== */
.gold-rule {
  width: 56px;
  height: 2px;
  background: var(--gold-gradient);
  border-radius: 2px;
  margin: 0 0 20px;
}
[dir="rtl"] .gold-rule { margin-left: auto; margin-right: 0; }
.center .gold-rule { margin-left: auto; margin-right: auto; }

/* ============== Buttons ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 26px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn-gold {
  background: var(--gold-gradient);
  color: #1a1408;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 50px -10px rgba(200, 168, 75, 0.6);
}
.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); border-color: var(--border-strong); }

/* Download badge — original, NOT the Apple badge */
.dl-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px 10px 18px;
  background: #000;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: #fff;
  height: 54px;
  transition: border-color .2s, transform .2s;
  font-family: var(--font-en);
}
.dl-badge:hover { border-color: var(--gold); transform: translateY(-1px); }
.dl-badge svg { width: 26px; height: 26px; flex-shrink: 0; }
.dl-badge .dl-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.dl-badge .dl-text small { font-size: 10px; color: var(--text-dim); letter-spacing: 0.06em; text-transform: uppercase; }
.dl-badge .dl-text strong { font-size: 16px; font-weight: 600; }

/* ============== Cards ============== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.card-glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(20px);
}

/* ============== Header ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--gold);
}
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--gold-gradient);
  display: grid; place-items: center;
  color: #1a1408;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 4px 12px -2px rgba(200, 168, 75, 0.5);
}
.logo .logo-ar { font-family: var(--font-ar); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  font-size: 15px;
  font-weight: 500;
}
.nav-links a { color: var(--text-dim); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-en);
}
.lang-toggle button {
  height: 28px; padding: 0 12px;
  border-radius: 999px;
  color: var(--text-dim);
  font-weight: 600;
}
.lang-toggle button.active {
  background: var(--gold-gradient);
  color: #1a1408;
}

.btn-nav-cta {
  height: 40px;
  padding: 0 20px;
  background: var(--gold-gradient);
  color: #1a1408;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
}

.mobile-nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .lang-toggle { display: none; }
  .site-header .container { height: 64px; }
}

/* ============== Footer ============== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-1);
  padding: 64px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 48px;
}
.footer-grid h5 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--text-dim); font-size: 14px; }
.footer-grid a:hover { color: var(--text); }
.footer-about p { color: var(--text-dim); font-size: 14px; margin-top: 14px; max-width: 320px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dimmer);
  font-size: 13px;
}
.social { display: flex; gap: 12px; }
.social a {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-dim);
  transition: all .2s;
}
.social a:hover { color: var(--gold); border-color: var(--gold); }
.social svg { width: 16px; height: 16px; }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 16px; }
}

/* ============== Page hero (non-home) ============== */
.page-hero {
  padding: 100px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-hero .gold-rule { margin: 0 auto 20px; }
.page-hero h1 { font-size: clamp(38px, 5vw, 60px); margin-bottom: 18px; }
.page-hero p { color: var(--text-dim); font-size: 18px; max-width: 620px; margin: 0 auto; }

/* ============== Section heading helpers ============== */
.section-head {
  margin-bottom: 56px;
  max-width: 720px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: var(--text-dim); font-size: 18px; }

/* ============== iPhone mockup (original — not Apple branded) ============== */
.iphone {
  --w: 280px;
  width: var(--w);
  aspect-ratio: 1206 / 2622;
  background: linear-gradient(160deg, #2a2a2a, #0a0a0a);
  border-radius: 44px;
  padding: 7px;
  position: relative;
  box-shadow:
    0 0 0 1.5px #3a3a3a,
    0 50px 100px -30px rgba(0,0,0,0.8),
    inset 0 0 0 1px rgba(255,255,255,0.05);
}
.iphone-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 38px;
  overflow: hidden;
  position: relative;
  /* RTL screenshots must always display LTR (the screen content is direction-agnostic, but flexes go LTR) */
  direction: ltr;
}
.iphone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 26px;
  background: #000;
  border-radius: 999px;
  z-index: 5;
}

/* Full screenshot inside iPhone */
.iphone-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 38px;
}
.iphone-shot-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}
/* Subtle vignette + gloss */
.iphone-screen.has-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 38px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.iphone-screen .status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  font-size: 14px;
  font-weight: 600;
  z-index: 4;
  color: #fff;
  font-family: var(--font-en);
}

/* ============== Widget cards (inside phones / galleries) ============== */
.widget {
  border-radius: 18px;
  background: linear-gradient(150deg, #1a1a1a, #0d0d0d);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 14px;
  color: #fff;
  font-family: var(--font-ar);
  position: relative;
  overflow: hidden;
}
.widget.light { background: linear-gradient(150deg, #f5f1e6, #e8e0cb); color: #2a2317; border-color: rgba(0,0,0,0.06); }
.widget.gold { background: var(--gold-gradient); color: #1a1408; border-color: rgba(0,0,0,0.1); }
.widget.green { background: linear-gradient(150deg, #1D6A4A, #0e3a28); border-color: rgba(255,255,255,0.06); }

.widget-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.55;
  font-family: var(--font-en);
}

/* ============== Utility ============== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 0;
}

.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--gold);
}
.stars svg { width: 18px; height: 18px; }

/* Highlight tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--gold-gradient);
  color: #1a1408;
  font-family: var(--font-ar);
}
.tag.green { background: var(--green); color: #fff; }
.tag.ghost { background: rgba(255,255,255,0.05); color: var(--text-dim); border: 1px solid var(--border); }
