@font-face {
  font-family: "Cairo";
  src: url("/assets/fonts/cairo-arabic-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Cairo";
  src: url("/assets/fonts/cairo-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #14283f;
  --primary: #1e3a5f;
  --accent: #b8893a;
  --gold-soft: #f1e6cf;
  --cream: #faf5ea;
  --surface: #ffffff;
  --text: #1c2433;
  --muted: #5b6577;
  --border: #e6e0d1;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(20, 40, 63, .06), 0 12px 32px rgba(20, 40, 63, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--cream); color: var(--text); line-height: 1.65;
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { line-height: 1.25; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }

/* Header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(250, 245, 234, .85); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.top.scrolled { border-bottom-color: var(--border); box-shadow: 0 4px 16px rgba(20, 40, 63, .06); }
.bar { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--primary); text-decoration: none; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--text); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.nav a:hover { background: rgba(30, 58, 95, .08); color: var(--primary); }
.lang { min-height: 40px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 16px; cursor: pointer; font: inherit; font-weight: 600; }
.lang:hover { border-color: var(--primary); color: var(--primary); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border-radius: 999px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 700; transition: background .15s, transform .15s; }
.btn:hover { background: var(--navy); }
.btn:active { transform: translateY(1px); }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }
[dir="rtl"] .arr { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arr { transform: scaleX(-1) translateX(3px); }
.btn.gold { background: var(--accent); color: #1c1608; }
.btn.gold:hover { background: #cf9d48; }
.btn.outline { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.btn.outline:hover { background: rgba(255, 255, 255, .12); }
.btn.ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }
.btn.ghost:hover { background: rgba(30, 58, 95, .08); }

/* Hero */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(900px 500px at 85% 10%, rgba(184, 137, 58, .28), transparent 65%), linear-gradient(155deg, #1e3a5f 0%, #0f2033 100%); }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 32px; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { margin: 18px 0 14px; font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 800; letter-spacing: -.01em; }
.hero p { margin: 0 0 28px; max-width: 540px; font-size: 1.12rem; color: rgba(255, 255, 255, .85); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .85rem; font-weight: 600; padding: 5px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }

.hero-art { position: relative; aspect-ratio: 1; width: min(100%, 360px); margin-inline: auto; display: grid; place-items: center; }
.hero-art > img { position: relative; z-index: 2; filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .35)); }
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); }
.r1 { inset: 8%; background: radial-gradient(circle, rgba(184, 137, 58, .18), transparent 70%); }
.r2 { inset: -2%; border-style: dashed; border-color: rgba(184, 137, 58, .4); }
.orb { position: absolute; z-index: 3; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: var(--primary); box-shadow: 0 10px 26px rgba(0, 0, 0, .3); animation: float 6s ease-in-out infinite; }
.orb .icon { background: none; width: auto; height: auto; }
.o1 { top: 6%; inset-inline-start: 4%; }
.o2 { top: 40%; inset-inline-end: -4%; animation-delay: -2s; }
.o3 { bottom: 4%; inset-inline-start: 18%; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Apps */
.apps { padding-top: 72px; padding-bottom: 72px; scroll-margin-top: 60px; }
.sec-head { text-align: center; margin-bottom: 36px; }
.sec-head h2 { margin: 0 0 6px; font-size: clamp(1.6rem, 3.5vw, 2.2rem); color: var(--primary); font-weight: 800; }
.lead { margin: 0; color: var(--muted); font-size: 1.05rem; }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; overflow: hidden; }
.card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--accent), #e0b86a); }
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(20, 40, 63, .06), 0 20px 40px rgba(20, 40, 63, .14); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-soft); color: var(--primary); flex: none; }
.tag { font-size: .8rem; font-weight: 700; color: #6b4e17; background: var(--gold-soft); padding: 4px 12px; border-radius: 999px; }
.card h3 { margin: 4px 0 0; font-size: 1.2rem; color: var(--primary); font-weight: 700; }
.card p { margin: 0; color: var(--muted); }
.card details { color: var(--muted); font-size: .95rem; }
.card summary { cursor: pointer; color: var(--primary); font-weight: 700; padding: 4px 0; }
.card details p { margin-top: 6px; line-height: 1.75; }
.card > .btn, .card > .actions { margin-top: auto; align-self: flex-start; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* CTA band */
.cta { padding: 0 0 72px; }
.cta-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 36px 40px; border-radius: 24px; color: #fff; background: radial-gradient(500px 240px at 90% 0%, rgba(184, 137, 58, .3), transparent 70%), linear-gradient(135deg, #1e3a5f, #14283f); max-width: 1040px; }
.cta h2 { margin: 0 0 4px; font-size: 1.5rem; }
.cta p { margin: 0; color: rgba(255, 255, 255, .8); }

/* Footer */
.foot { background: var(--navy); color: #cfd8e6; position: relative; }
.foot::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 44px; }
.foot-col h2 { margin: 0 0 14px; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
html:lang(ar) .foot-col h2 { letter-spacing: 0; font-size: 1rem; text-transform: none; }
.foot-col p { margin: 0 0 16px; color: #aebbd0; }
.foot .brand { color: #fff; font-size: 1.25rem; margin-bottom: 16px; }
.foot .dev { margin: 0 0 4px; color: #fff; font-size: 1.1rem; }
.foot-list, .socials { list-style: none; margin: 0; padding: 0; }
.foot-list li { margin-bottom: 10px; }
.foot-list a { color: #dbe4f0; text-decoration: none; }
.foot-list a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.soc { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.soc:hover { background: var(--accent); border-color: var(--accent); color: #1c1608; transform: translateY(-2px); }
.foot-bar { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 18px; font-size: .9rem; color: #8fa2bd; text-align: center; }

/* Reveal on scroll (only when JS enabled it) */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.js-reveal .card.reveal:nth-child(2) { transition-delay: .08s; }
.js-reveal .card.reveal:nth-child(3) { transition-delay: .16s; }

html:lang(ar) body { line-height: 1.8; }
html:lang(ar) .hero h1 { letter-spacing: 0; }

@media (max-width: 820px) {
  .foot-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .foot-id { display: flex; flex-direction: column; align-items: center; }
  .socials { justify-content: center; }
  .hero-in { grid-template-columns: 1fr; text-align: center; padding-top: 48px; padding-bottom: 56px; }
  .hero p { margin-inline: auto; }
  .hero-cta, .chips { justify-content: center; }
  .hero-art { width: min(70%, 260px); order: -1; }
  .hero-art > img { width: 90px; height: auto; }
  .orb { width: 46px; height: 46px; border-radius: 13px; }
  .cta-in { padding: 28px 24px; text-align: center; justify-content: center; }
}
@media (max-width: 560px) {
  .brand span { display: none; }
  .foot .brand span { display: inline; }
  .foot-grid { padding-top: 40px; }
  .nav a { padding: 8px 10px; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb { animation: none; }
  .card, .btn, .btn .arr { transition: none; }
  .card:hover { transform: none; }
}

/* Contact picker */
.cta .btn { border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.picker { border: 0; border-radius: 24px; padding: 28px; width: min(92vw, 400px); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(10, 20, 35, .45); text-align: center; }
.picker::backdrop { background: rgba(10, 20, 35, .6); backdrop-filter: blur(3px); }
.picker h2 { margin: 0 0 18px; font-size: 1.3rem; color: var(--primary); }
.picks { display: grid; gap: 10px; margin-bottom: 18px; }
.pick { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 18px; border-radius: 14px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; transition: transform .15s, filter .15s; }
.pick:hover { transform: translateY(-2px); filter: brightness(1.08); }
.pick.wa { background: #1fa855; }
.pick.tg { background: #229ed9; }
.pick.fb { background: #1877f2; }

/* Mobile refinements */
@media (max-width: 560px) {
  html { scroll-padding-top: 68px; }
  .wrap { padding-inline: 16px; }
  .bar { height: 58px; gap: 8px; }
  .nav a { padding: 8px 8px; }
  .lang { min-height: 40px; padding: 6px 14px; }
  .hero-in { padding-top: 28px; padding-bottom: 40px; gap: 20px; }
  .hero-art { width: 150px; }
  .hero-art > img { width: 58px; }
  .orb { width: 36px; height: 36px; border-radius: 11px; }
  .orb .icon svg { width: 20px; height: 20px; }
  .chips { gap: 6px; }
  .chips li { font-size: .78rem; padding: 4px 10px; }
  .hero h1 { font-size: 1.9rem; margin: 14px 0 10px; }
  .hero p { font-size: 1rem; margin-bottom: 22px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .apps { padding-top: 44px; padding-bottom: 44px; }
  .sec-head { margin-bottom: 24px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 20px; border-radius: 18px; }
  .card > .btn, .card .actions .btn { align-self: stretch; }
  .card .actions { flex-direction: column; }
  .cta { padding-bottom: 44px; }
  .cta-in { flex-direction: column; padding: 26px 20px; border-radius: 20px; }
  .cta-in .btn { width: 100%; }
  .picker { padding: 22px; border-radius: 20px; }
  .foot-grid { gap: 28px; padding-bottom: 28px; }
  .socials { flex-direction: column; align-items: stretch; }
  .soc { justify-content: center; }
  .foot-bar { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  .nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .card summary { display: flex; align-items: center; min-height: 44px; }
}

/* CTA band v2 */
.cta-in { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; max-width: 1040px; margin-inline: auto; padding: 36px 40px; }
.cta-in::before, .cta-in::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(184, 137, 58, .35); pointer-events: none; }
.cta-in::before { width: 260px; height: 260px; inset-inline-end: -70px; top: -110px; }
.cta-in::after { width: 160px; height: 160px; inset-inline-start: -50px; bottom: -80px; }
.cta-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: rgba(184, 137, 58, .18); color: #e8c27a; border: 1px solid rgba(184, 137, 58, .45); position: relative; }
.cta-text { position: relative; }
.cta-actions { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.quick { display: flex; gap: 10px; }
.qs { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); transition: background .15s, color .15s, transform .15s; }
.qs:hover { background: var(--accent); border-color: var(--accent); color: #1c1608; transform: translateY(-2px); }
@media (max-width: 820px) {
  .cta-in { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 30px 22px; gap: 16px; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { width: 100%; max-width: 360px; }
}
@media (max-width: 560px) {
  .card > .actions { align-self: stretch; }
}

/* Narrow cards: stack and align buttons (any language) */
.card { container-type: inline-size; container-name: card; }
@container card (max-width: 330px) {
  .card .actions { flex-direction: column; align-self: stretch; }
  .card > .btn, .card .actions .btn { align-self: stretch; width: 100%; }
}
@media (max-width: 960px) and (min-width: 821px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-id { grid-column: 1 / -1; }
}
@media (min-width: 821px) {
  .socials { gap: 8px; }
  .soc { padding: 8px 12px; gap: 6px; font-size: .9rem; }
}
.foot-grid { grid-template-columns: 1.1fr 1fr 1.25fr; }
@media (min-width: 821px) {
  .socials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .soc { justify-content: center; padding-inline: 8px; }
}

/* Footer: two columns (contact lives in the banner above) */
.foot-grid { grid-template-columns: 1fr 1fr; }
.cta { scroll-margin-top: 76px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr; } }
@media (max-width: 960px) and (min-width: 821px) { .foot-id { grid-column: auto; } }

/* Footer v3 */
.foot-grid { grid-template-columns: 1.5fr .8fr 1.3fr; gap: 48px; text-align: start; }
.foot-id { display: block; }
.foot-tag { max-width: 340px; margin: 0 0 20px; }
.dev-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); max-width: 340px; }
.dev-card .dev { margin: 0; font-size: 1.05rem; }
.dev-card p { margin: 2px 0 0; font-size: .9rem; }
.dev-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); }
.foot-list a { display: inline-flex; align-items: center; gap: 8px; }
.foot-list a svg { flex: none; color: var(--accent); }
[dir="rtl"] .foot-list a svg { transform: scaleX(-1); }
.foot-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.to-top { display: inline-flex; align-items: center; gap: 6px; color: #dbe4f0; text-decoration: none; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); transition: background .15s, color .15s; }
.to-top:hover { background: var(--accent); border-color: var(--accent); color: #1c1608; }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px; } .foot-id { grid-column: 1 / -1; } }
@media (max-width: 820px) {
  .foot-grid { grid-template-columns: 1fr; text-align: center; }
  .foot-id { display: flex; flex-direction: column; align-items: center; }
  .foot-list a { justify-content: center; }
  .foot-bar-in { justify-content: center; text-align: center; }
}

.dev-ava { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); box-shadow: 0 0 0 3px rgba(184, 137, 58, .2); }

/* Footer v4: organized layout */
.foot { padding-top: 0; text-align: start; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 52px; padding-bottom: 36px; flex-wrap: wrap; }
.foot-brand-col .brand { margin-bottom: 12px; }
.foot-tag { max-width: 420px; margin: 0; }
.foot .dev-card { max-width: none; min-width: 300px; padding: 14px 18px; }
.foot .dev-ava { width: 64px; height: 64px; }
.foot-apps { padding-top: 32px; padding-bottom: 36px; border-top: 1px solid rgba(255, 255, 255, .1); }
.foot-apps h2 { margin: 0 0 16px; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
html:lang(ar) .foot-apps h2 { letter-spacing: 0; text-transform: none; font-size: 1rem; }
.ft-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ft-tile { display: flex; align-items: center; gap: 14px; height: 100%; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); color: #e6edf7; text-decoration: none; font-weight: 600; line-height: 1.4; transition: background .15s, border-color .15s, transform .15s; }
.ft-tile:hover { background: rgba(255, 255, 255, .1); border-color: var(--accent); transform: translateY(-2px); }
.ft-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(184, 137, 58, .18); color: #e8c27a; }
.ft-name { flex: 1; }
.ft-arr { flex: none; color: var(--accent); }
[dir="rtl"] .ft-arr { transform: scaleX(-1); }
.foot-bar-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.foot-links { display: flex; gap: 6px; }
.foot-links a { color: #cfd8e6; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 600; }
.foot-links a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.foot-bar-in .to-top { justify-self: end; }
@media (max-width: 900px) {
  .ft-tiles { grid-template-columns: 1fr; }
  .foot-bar-in { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .foot-bar-in .to-top { justify-self: center; }
}
@media (max-width: 640px) {
  .foot-top { flex-direction: column; align-items: center; text-align: center; padding-top: 40px; }
  .foot-brand-col { display: flex; flex-direction: column; align-items: center; }
  .foot .dev-card { min-width: 0; width: 100%; text-align: start; }
}

/* Mobile header: keep the brand name visible */
@media (max-width: 560px) {
  .top .brand span { display: inline; font-size: 1rem; white-space: nowrap; }
  .top .brand { gap: 8px; }
  .top .brand img { width: 24px; height: auto; }
  .bar { gap: 6px; }
  .nav a { padding: 8px 6px; font-size: .85rem; }
  .lang { padding: 6px 12px; font-size: .9rem; }
}
@media (max-width: 350px) {
  .nav a[href="#contact"] { display: none; }
}
