/* SoftGenius Apps — apps.softgenius.ae
   Light theme, deep plum + gold. Logical properties throughout (margin-inline, inset-inline...)
   so Arabic, Urdu and Persian render right-to-left. */

:root {
  --bg: #FFFCF7;
  --bg-alt: #F7F1FA;
  --surface: #FFFFFF;
  --border: #E9DFF0;
  --text: #2A2233;
  --muted: #645A70;
  --plum: #5B2A86;
  --plum-dark: #3E1A5E;
  --plum-soft: #EFE5F7;
  --gold: #E7B54A;
  --gold-dark: #8A6110;
  --gold-soft: #FBF1DA;
  --radius: 18px;
  --max: 1160px;
  --shadow: 0 10px 30px rgba(62, 26, 94, 0.08);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

/* Scripts Inter does not cover */
:lang(ar), :lang(fa) { --font: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif; }
:lang(ur) { --font: 'Noto Nastaliq Urdu', 'Noto Sans Arabic', 'Inter', system-ui, sans-serif; }
:lang(hi) { --font: 'Noto Sans Devanagari', 'Inter', system-ui, sans-serif; }
:lang(bn) { --font: 'Noto Sans Bengali', 'Inter', system-ui, sans-serif; }
:lang(th) { --font: 'Noto Sans Thai', 'Inter', system-ui, sans-serif; }
:lang(ja) { --font: 'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', Meiryo, sans-serif; }
:lang(ko) { --font: 'Inter', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif; }
:lang(zh-Hans) { --font: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif; }
:lang(zh-Hant) { --font: 'Inter', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { color: var(--plum-dark); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
h1, h2, h3, .lead { text-wrap: balance; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(fa) h1, :lang(ur) h1 { letter-spacing: 0; line-height: 1.35; }
.container { max-width: var(--max); margin-inline: auto; padding-inline: 24px; }
.container.narrow { max-width: 820px; }
.narrow-block { max-width: 760px; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--plum); color: #FFF; padding: 10px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { top: 12px; }
.section-title { margin-bottom: 24px; }
.section-lead { color: var(--muted); max-width: 720px; margin-top: -8px; margin-bottom: 28px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 252, 247, 0.9);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { flex: none; }
.brand img { width: 196px; }
.nav-primary { display: flex; gap: 22px; margin-inline-start: auto; }
.nav-primary a { color: var(--muted); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.nav-primary a:hover, .nav-primary a[aria-current] { color: var(--plum-dark); text-decoration: none; }
.nav-primary a[aria-current] { box-shadow: inset 0 -2px 0 var(--gold); }

.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); font-size: 0.9rem; font-weight: 600; background: var(--surface);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { border-color: var(--plum); }
.lang-menu[open] .chev { transform: rotate(180deg); }
.lang-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  width: min(460px, calc(100vw - 32px));
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px;
  margin: 0; padding: 10px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(62, 26, 94, 0.18);
  max-height: 70vh; overflow-y: auto;
}
.lang-list a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); font-size: 0.92rem; }
.lang-list a:hover { background: var(--plum-soft); text-decoration: none; }
.lang-list a[aria-current] { background: var(--plum-soft); color: var(--plum); font-weight: 700; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: #2A1A05; font-weight: 800;
  padding: 14px 24px; border-radius: 999px; transition: transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(231, 181, 74, 0.4); }
.link-arrow { display: inline-block; margin-top: 18px; font-weight: 700; }
[dir="rtl"] .link-arrow span { display: inline-block; transform: scaleX(-1); }

.store-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 168px; padding: 9px 18px 9px 14px; border-radius: 12px;
  background: #111; border: 1px solid #111; color: #FFF;
  font-weight: 700; font-size: 1.05rem; line-height: 1.15;
}
.store-btn:hover { text-decoration: none; background: #000; }
.store-btn small { display: block; font-size: 0.68rem; font-weight: 500; color: #D8D2DE; letter-spacing: 0.01em; }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn.is-soon { background: transparent; color: var(--muted); border: 1px dashed #B9AEC4; }
.store-btn.is-soon small { color: var(--muted); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 80px;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(231, 181, 74, 0.28), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(135deg, var(--plum-dark), var(--plum));
  color: #FFF;
}
[dir="rtl"] .hero { background:
    radial-gradient(900px 420px at 15% -10%, rgba(231, 181, 74, 0.28), transparent 60%),
    linear-gradient(225deg, var(--plum-dark), var(--plum)); }
.hero h1 { color: #FFF; max-width: 820px; }
.hero .lead { font-size: 1.2rem; color: #EADCF5; max-width: 680px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--gold); margin-bottom: 14px; }
:lang(ar) .eyebrow, :lang(fa) .eyebrow, :lang(ur) .eyebrow { letter-spacing: 0; text-transform: none; font-size: 0.95rem; }
.hero .store-btn.is-soon { background: transparent; color: #EADCF5; border-color: rgba(255, 255, 255, 0.45); }
.hero .store-btn.is-soon small { color: #D8C6E6; }
.hero .store-btn { background: #000; border-color: #000; }
.age-note { font-size: 0.9rem; color: #D8C6E6; margin-top: 14px; }

.hero-split { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 48px; align-items: center; }
.hero-copy .app-id { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.hero-copy .app-id .eyebrow { margin: 0; }

/* Phone mock in the Namaya hero (decorative) */
.phone {
  justify-self: center;
  width: 250px; aspect-ratio: 9 / 18.5; border-radius: 38px; padding: 10px;
  background: #1A1022; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), inset 0 0 0 2px #3A2A48;
}
.phone-screen {
  position: relative; height: 100%; border-radius: 30px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background:
    radial-gradient(circle at 30% 20%, rgba(231, 181, 74, 0.55), transparent 40%),
    radial-gradient(circle at 75% 70%, rgba(231, 181, 74, 0.35), transparent 45%),
    linear-gradient(160deg, #7A3DB0, #3E1A5E 70%);
  color: #FFF;
}
.ai-chip { position: absolute; top: 18px; inset-inline-end: 16px; font-size: 0.68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); }
.phone-occasion { color: var(--gold); font-size: 1.6rem; }
.phone-name { font-size: 2.6rem; font-weight: 800; line-height: 1.2; color: #FFF; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35); font-family: 'Noto Sans Arabic', var(--font); }
.phone-name-2 { font-size: 1.3rem; font-weight: 700; color: var(--gold); letter-spacing: 0.08em; font-family: var(--font); }
.phone-wave { display: flex; gap: 4px; align-items: center; height: 28px; margin-top: 12px; }
.phone-wave i { width: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.8); animation: wave 1.2s ease-in-out infinite; }
.phone-wave i:nth-child(1) { height: 30%; } .phone-wave i:nth-child(2) { height: 70%; animation-delay: .1s; }
.phone-wave i:nth-child(3) { height: 100%; animation-delay: .2s; } .phone-wave i:nth-child(4) { height: 60%; animation-delay: .3s; }
.phone-wave i:nth-child(5) { height: 85%; animation-delay: .4s; } .phone-wave i:nth-child(6) { height: 45%; animation-delay: .5s; }
.phone-wave i:nth-child(7) { height: 25%; animation-delay: .6s; }
.phone-time { position: absolute; bottom: 16px; font-size: 0.75rem; opacity: 0.8; }
@keyframes wave { 50% { transform: scaleY(0.4); } }
@media (prefers-reduced-motion: reduce) { .phone-wave i { animation: none; } }

/* ===== Sections ===== */
.apps, .promise, .page-section, .faq { padding: 72px 0; }
.alt-bg { background: var(--bg-alt); }
.promise { background: var(--bg-alt); }

.app-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.app-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
.app-card.is-next { background: transparent; border-style: dashed; box-shadow: none; color: var(--muted); }
.app-card.is-next svg { color: var(--plum); margin-bottom: 14px; }
.app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.app-icon { width: 72px; height: 72px; border-radius: 18px; flex: none; box-shadow: 0 6px 18px rgba(62, 26, 94, 0.25); }
.app-id h3 { font-size: 1.6rem; margin: 0; }
.app-tagline { margin: 2px 0 0; color: var(--muted); font-weight: 600; }

.promise-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.page-section .promise-grid { margin-top: 32px; }
.promise-grid li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.promise-grid svg { color: var(--plum); margin-bottom: 14px; }
.promise-grid p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.occasion-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.occasion { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.occasion svg { color: var(--plum); margin-bottom: 12px; }
.occasion p { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--plum-soft); color: var(--plum); }
.occasion.is-soon { background: var(--gold-soft); border-color: #F0DDAF; }
.occasion.is-soon svg { color: var(--gold-dark); }
.occasion.is-soon .badge { background: var(--gold); color: #2A1A05; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: none; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px 24px; }
.steps svg { color: var(--plum); margin-bottom: 12px; }
.steps p { color: var(--muted); margin: 0; }
.step-num {
  position: absolute; top: -14px; inset-inline-start: 24px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: #2A1A05; font-weight: 800;
}

.shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.shot {
  aspect-ratio: 9 / 19.5; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(160deg, var(--plum-soft), #FFF); border: 2px dashed #CDB8DE; color: var(--plum);
  font-size: 0.85rem; font-weight: 600; text-align: center; padding: 16px;
}
.shots p { text-align: center; margin: 12px 0 0; font-weight: 600; color: var(--text); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 32px 0 0; }
.facts div { background: var(--surface); border: 1px solid var(--border); border-inline-start: 4px solid var(--gold); border-radius: 12px; padding: 18px 20px; }
.facts dt { font-weight: 800; color: var(--plum-dark); margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ===== FAQ ===== */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700; color: var(--plum-dark);
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--plum); flex: none; }
.faq details[open] summary::after { content: "×"; }
.faq details p { padding: 0 22px 18px; margin: 0; color: var(--muted); }

/* ===== Final CTA ===== */
.final-cta { padding: 72px 0; text-align: center; background: linear-gradient(135deg, var(--plum-dark), var(--plum)); color: #EADCF5; }
.final-cta h2 { color: #FFF; }
.final-cta .store-links { justify-content: center; margin: 24px 0; }
.final-cta .store-btn { background: #000; border-color: #000; }
.final-cta .store-btn.is-soon { background: transparent; color: #EADCF5; border-color: rgba(255, 255, 255, 0.45); }
.final-cta .store-btn.is-soon small { color: #D8C6E6; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.legal-links a { color: var(--gold); font-weight: 600; }

/* ===== Inner pages (policy, terms, support) ===== */
.page-hero { padding: 56px 0 40px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.page-hero .lead { font-size: 1.1rem; color: var(--muted); }
.page-hero .btn { margin-top: 8px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.9rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
[dir="rtl"] .breadcrumb span[aria-hidden] { display: inline-block; transform: scaleX(-1); }
.effective { font-size: 0.9rem; font-weight: 600; color: var(--plum); margin: 0; }

.policy { padding: 48px 0 72px; }
.doc-section { margin-bottom: 36px; scroll-margin-top: 90px; }
.policy h2 { font-size: 1.35rem; padding-top: 4px; }
.policy ul, .policy ol { padding-inline-start: 22px; margin: 0 0 1em; }
.policy li { margin-bottom: 6px; }
.policy-note { margin-top: 32px; font-size: 0.95rem; }
.placeholder { background: #FFF1B8; color: #6B4B00; padding: 1px 4px; border-radius: 4px; font-weight: 600; }
.table-wrap { overflow-x: auto; margin: 0 0 1em; }
.policy table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.policy th, .policy td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.policy thead th { background: var(--plum-soft); color: var(--plum-dark); }
.policy tbody th { font-weight: 600; }
.policy + .faq { padding-top: 0; }

/* ===== Footer ===== */
.site-footer { background: #22162E; color: #CFC3DA; padding: 56px 0 28px; font-size: 0.95rem; }
.site-footer a { color: #EADCF5; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-brand img { width: 190px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.site-footer h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 12px; }
:lang(ar) .site-footer h2 { letter-spacing: 0; text-transform: none; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-langs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 36px 0 18px; padding-top: 22px; border-top: 1px solid #3A2B48; font-size: 0.88rem; }
.footer-langs a[aria-current] { color: var(--gold); font-weight: 700; }
.footer-bottom { font-size: 0.85rem; color: #9C8FA8; margin: 0; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .promise-grid { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .hero-split { grid-template-columns: 1fr; }
  .phone { width: 210px; }
}
@media (max-width: 768px) {
  .container { padding-inline: 16px; }
  .header-inner { gap: 12px; }
  .brand img { width: 150px; }
  .nav-primary { display: none; }
  .lang-menu { margin-inline-start: auto; }
  .lang-menu summary span { display: none; }
  .hero { padding: 56px 0; }
  .apps, .promise, .page-section, .faq, .final-cta { padding: 52px 0; }
  .app-grid, .promise-grid, .occasion-grid, .steps, .facts, .footer-cols { grid-template-columns: 1fr; }
  .steps { gap: 28px; }
  .app-card { padding: 24px; }
}
