/* Mirux public site: layout from the PDF, motion from the landing reel
   (fade + rise 40px, 0.8s ease-out, staggered; word-mask headlines; floating; marquee). */
body { background: var(--s-bg); color: var(--s-ink); overflow-x: hidden; font-size: var(--site-body); font-family: var(--site-font); transition: background .4s, color .4s; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(1360px, 92vw); margin: 0 auto; }
.narrow { width: min(820px, 92vw); margin: 0 auto; }

/* ---------- motion primitives */
[data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal="pop"] { transform: translateY(30px) scale(.94); }
[data-reveal="left"] { transform: translateX(-50px); }
[data-reveal="right"] { transform: translateX(50px); }
[data-reveal="fade"] { transform: none; }
.in[data-reveal] { opacity: 1; transform: none; }
.split .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(110%); transition: transform .9s var(--ease-out); transition-delay: calc(var(--i) * 60ms + 100ms); }
.split.in .w > span { transform: none; }

/* ---------- header */
.site-nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--s-bg) 82%, transparent); backdrop-filter: blur(14px); transition: box-shadow .3s; }
.site-nav.scrolled { box-shadow: 0 1px 0 var(--s-line); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 88px; }
.site-nav .logo img { height: 28px; width: auto; }
.menu { display: flex; gap: 4px; position: relative; padding: 4px; }
.menu a { position: relative; z-index: 1; padding: 9px 20px; font-size: var(--site-small); border-radius: 999px; transition: color .3s; }
.menu a.on { color: var(--mx-orange); }
.menu .hover-pill { position: absolute; top: 4px; bottom: 4px; border-radius: 999px; background: color-mix(in srgb, var(--mx-orange) 9%, transparent); opacity: 0; pointer-events: none; transition: left .4s var(--ease-out), width .4s var(--ease-out), opacity .25s; }
.burger { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; }

.btn { display: inline-flex; align-items: center; gap: 14px; border: 0; cursor: pointer; padding: 15px 22px 15px 30px; border-radius: 12px; background: var(--mx-orange); color: #fff; font-weight: 500; font-size: var(--site-small); transition: transform .35s var(--ease-out), box-shadow .35s, background .2s; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--mx-orange) 80%, transparent); }
.btn:hover { transform: translateY(-2px); background: var(--mx-orange-600); box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--mx-orange) 90%, transparent); }
.btn .chev { width: 22px; height: 22px; border-radius: 4px; background: #fff; color: var(--mx-orange); display: grid; place-items: center; transition: transform .35s var(--ease-out); }
.btn:hover .chev { transform: translateY(2px); }
.btn.outline { background: transparent; color: var(--mx-orange); box-shadow: none; border: 1px dashed color-mix(in srgb, var(--s-ink) 45%, transparent); padding: 15px 30px; }
.btn.outline:hover { background: color-mix(in srgb, var(--mx-orange) 7%, transparent); }
.btn.round { border-radius: 999px; padding: 13px 26px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- section scaffolding */
section { padding: 110px 0; }
.blush { background: var(--s-blush-2); }
.blush-strong { background: var(--s-blush); }
.kicker { font-size: var(--site-small); color: color-mix(in srgb, currentColor 70%, transparent); text-align: center; margin: 0 0 14px; }
h1, h2, h3 { letter-spacing: -0.035em; font-weight: var(--weight-title); margin: 0; }
h2.title { font-size: var(--site-h2); text-align: center; line-height: 1.08; margin-bottom: 56px; }
.center { text-align: center; }

/* ---------- footer */
.site-foot { padding: 90px 0 70px; }
.site-foot .wrap { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.site-foot .logo img { height: 34px; width: auto; margin-bottom: 26px; }
.site-foot p { line-height: 1.6; max-width: 440px; margin: 0 0 28px; }
.site-foot h4 { font-size: var(--site-h3); font-weight: 500; margin: 0 0 22px; letter-spacing: -0.02em; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font-size: var(--site-small); }
.site-foot ul a { position: relative; } .site-foot ul a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: var(--mx-orange); transition: right .35s var(--ease-out); }
.site-foot ul a:hover::after { right: 0; }
.socials { display: flex; gap: 18px; margin-top: 30px; }
.socials a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.socials a:hover { background: var(--s-blush); }

/* ---------- ready CTA band */
.ready { text-align: center; padding: 90px 0; }
.ready h2 { font-size: var(--site-h1); line-height: 1.05; max-width: 640px; margin: 0 auto 22px; }
.ready p { max-width: 460px; margin: 0 auto 30px; line-height: 1.5; font-size: var(--site-body); }

/* ---------- testimonials (dark cards from the Mirux moodboard) */
.tsec { overflow: hidden; }
.tsec.dark { color: #F8F9F4; }
.tmarquee { overflow: hidden; padding: 10px 0 30px; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ttrack { display: flex; gap: 28px; width: max-content; animation: tslide 60s linear infinite; align-items: flex-start; }
.tmarquee:hover .ttrack { animation-play-state: paused; }
@keyframes tslide { to { transform: translateX(-50%); } }
.tcard { width: 350px; flex: none; background: #080B0E; color: #F8F9F4; border-radius: 22px; padding: 24px 24px 22px; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 24px 50px -30px rgba(0,0,0,.6); transition: opacity .8s var(--ease-out), transform .6s var(--ease-out); }
.tcard:nth-child(3n+2) { margin-top: 26px; } .tcard:nth-child(3n) { margin-top: 12px; }
.tcard:hover { transform: translateY(-8px) rotate(-.6deg); }
.tcard header { display: flex; gap: 14px; align-items: center; }
.tcard .av { width: 50px; height: 50px; border-radius: 50%; background: #141a20 center / cover; display: grid; place-items: center; font-size: 15px; flex: none; }
.tcard b { font-weight: 500; font-size: var(--site-body); } .tcard small { display: block; font-size: 12px; opacity: .6; margin-top: 3px; }
.tcard .qm { color: var(--mx-orange); font-size: 30px; line-height: 1; margin: 22px 0 8px; }
.tcard p { font-size: var(--site-small); line-height: 1.55; margin: 0 0 20px; opacity: .92; }
.tcard footer { display: flex; gap: 10px; flex-wrap: wrap; }
.tcard .chip { background: var(--mx-paper); color: var(--mx-ink); font-size: 12px; padding: 7px 12px; border-radius: 6px; }
.tcard .vp { flex: 1; text-align: center; background: var(--mx-paper); color: var(--mx-ink); border-radius: 12px; padding: 10px; font-size: 13px; transition: background .2s; }
.tcard .vp:hover { background: var(--mx-orange); color: #fff; }

/* ---------- warm dark gradient (moodboard page 2: #190703 → #C73818) */
.ember { background: linear-gradient(180deg, #190703 0%, #320e06 35%, #641c0c 70%, #952a12 90%, #c73818 100%); color: var(--mx-paper); }

@media (max-width: 900px) {
  .menu { display: none; position: absolute; top: 80px; left: 4vw; right: 4vw; flex-direction: column; background: var(--s-bg); border-radius: 16px; padding: 10px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.3); }
  .menu.open { display: flex; } .menu .hover-pill { display: none; }
  .burger { display: block; } .site-nav .cta-top { display: none; }
  .site-foot .wrap { grid-template-columns: 1fr 1fr; } .site-foot .wrap > :first-child { grid-column: 1 / -1; }
  section { padding: 80px 0; } .tcard { width: 300px; }
}


/* ---------- v6: header tools (language + theme), logo per theme, right-to-left */
.tools { display: flex; gap: 10px; align-items: center; }
.langs { position: relative; display: flex; padding: 3px; border-radius: 999px; border: 1px solid var(--s-line); }
.langs button { position: relative; z-index: 1; background: none; border: 0; cursor: pointer; padding: 6px 10px; border-radius: 999px; font-size: 12px; color: color-mix(in srgb, var(--s-ink) 60%, transparent); transition: color .3s; }
.langs button.on { color: #fff; }
.langs .lpill { position: absolute; top: 3px; bottom: 3px; border-radius: 999px; background: var(--mx-orange); transition: left .45s var(--ease-out), width .45s var(--ease-out); }
.themebtn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--s-line); background: none; color: var(--s-ink); cursor: pointer; display: grid; place-items: center; font-size: 15px; transition: transform .4s var(--ease-out), background .2s; }
.themebtn:hover { background: color-mix(in srgb, var(--mx-orange) 10%, transparent); }
.themebtn:active { transform: rotate(40deg) scale(.92); }
.themebtn .moon, [data-theme="dark"] .themebtn .sun { display: none; } [data-theme="dark"] .themebtn .moon { display: inline; }
.logo .logo-d, [data-theme="dark"] .logo .logo-l { display: none; } [data-theme="dark"] .logo .logo-d { display: block; }
[data-theme="dark"] .site-foot { border-top: 1px solid var(--s-line); }
[data-theme="dark"] .burger { color: var(--s-ink); }

/* Arabic: no negative tracking (it breaks the joined letters), marquees run the other way */
[dir="rtl"] body, [dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] .split { letter-spacing: 0 !important; }
[dir="rtl"] .split .w { padding-bottom: .2em; margin-bottom: -.2em; }
[dir="rtl"] .site-foot ul a::after { left: 100%; right: 0; } [dir="rtl"] .site-foot ul a:hover::after { left: 0; }
@keyframes slide-rtl { to { transform: translateX(50%); } }
[dir="rtl"] .track, [dir="rtl"] .ttrack { animation-name: slide-rtl; }
@media (max-width: 900px) { .langs button { padding: 6px 7px; } .themebtn { width: 34px; height: 34px; } }
@media (max-width: 560px) { .tools .cta-top { display: none; } }

[dir="rtl"] .hero h1, [dir="rtl"] h2.title, [dir="rtl"] .ready h2 { line-height: 1.35; }


/* ---------- v7: Chat on WhatsApp (button, floating bubble, mobile bar) */
.btn.wa { gap: 10px; padding: 15px 24px; }
.btn.wa.outline { color: var(--s-ink); }
.btn.wa svg { color: #25D366; }
.wa-float { position: fixed; inset-inline-end: 22px; bottom: 22px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 14px 30px -10px rgba(37,211,102,.7); transition: transform .35s var(--ease-out); animation: waPulse 2.8s ease-out infinite; }
.wa-float svg { width: 28px; height: 28px; }
.wa-float:hover { transform: scale(1.08); }
@keyframes waPulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55), 0 14px 30px -10px rgba(37,211,102,.7); } 70%, 100% { box-shadow: 0 0 0 16px rgba(37,211,102,0), 0 14px 30px -10px rgba(37,211,102,.7); } }
.mbar { display: none; }
@media (max-width: 900px) {
  .wa-float { display: none; }
  .mbar { display: flex; gap: 10px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; padding: 8px; border-radius: 16px; background: color-mix(in srgb, var(--s-bg) 88%, transparent); backdrop-filter: blur(14px); box-shadow: 0 18px 40px -16px rgba(0,0,0,.35); transform: translateY(140%); transition: transform .5s var(--ease-out); }
  .mbar.show { transform: none; }
  .mbar .btn { flex: 1; justify-content: center; }
  .mbar .mwa { width: 50px; flex: none; border-radius: 12px; background: #25D366; color: #fff; display: grid; place-items: center; }
  .mbar .mwa svg { width: 24px; height: 24px; }
  .site-foot { padding-bottom: 110px; }
}
/* blank photo until one is added */
.ph-blank { background: var(--s-grey); display: grid; place-items: center; color: color-mix(in srgb, var(--s-ink) 45%, transparent); font-weight: 500; }
/* v13 navbar badge: 3D "mx" (static/logo3d.js) + the word "mirux"; the flat logo stays without WebGL */
.site-nav .logo { display: flex; align-items: center; direction: ltr; }
.logo .word-l, .logo .word-d, .logo.has3d .logo-l, .logo.has3d .logo-d { display: none; }
.logo.has3d .word-l { display: block; } [data-theme="dark"] .logo.has3d .word-l { display: none; } [data-theme="dark"] .logo.has3d .word-d { display: block; }
.site-nav .logo .word-l, .site-nav .logo .word-d { height: 21px; width: auto; }
.badge3d { width: 54px; height: 34px; margin-inline-end: 4px; display: block; transition: filter .35s; }
.badge3d canvas { width: 100% !important; height: 100% !important; display: block; }
.logo.lit .badge3d { filter: drop-shadow(0 0 10px rgba(249,70,31,.65)) drop-shadow(0 0 22px rgba(249,70,31,.35)); }
