/* ==========================================================
   MUSL Landing Page
   ========================================================== */
:root {
  --brand: #f7931e;
  --brand-2: #e8500e;
  --grad: linear-gradient(135deg, #f9a03f 0%, #e8500e 100%);
  --bg: #0d0f14;
  --bg-2: #13161d;
  --card: #181c25;
  --line: rgba(255, 255, 255, .08);
  --text: #f2f3f5;
  --muted: #9aa1ad;
  --radius: 20px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", "Poppins", system-ui, sans-serif;
  overflow-x: hidden;
}
html[lang="en"] body { font-family: "Poppins", "Cairo", system-ui, sans-serif; }
a { text-decoration: none; }
::selection { background: var(--brand); color: #fff; }

.text-gradient { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-muted-2 { color: var(--muted) !important; }

/* ---------- Buttons ---------- */
.btn-brand {
  background: var(--grad); color: #fff; border: 0; font-weight: 700;
  box-shadow: 0 10px 30px -10px rgba(232, 80, 14, .7);
  transition: transform .2s, box-shadow .2s;
}
.btn-brand:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(232, 80, 14, .9); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.04); font-weight: 600; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: rgba(247,147,30,.06); }

/* ---------- Navbar ---------- */
#mainNav { padding: 18px 0; transition: all .3s; }
#mainNav.scrolled { background: rgba(13, 15, 20, .88); backdrop-filter: blur(14px); padding: 10px 0; border-bottom: 1px solid var(--line); }
.brand-logo { height: 52px; width: auto; object-fit: contain; transform: scale(1.6); }
#mainNav .nav-link { color: #cfd3da; font-weight: 600; padding: 8px 14px !important; position: relative; }
#mainNav .nav-link:hover, #mainNav .nav-link.active { color: #fff; }
#mainNav .nav-link.active::after {
  content: ""; position: absolute; bottom: 2px; inset-inline: 14px; height: 2px; border-radius: 2px; background: var(--grad);
}
@media (max-width: 991.98px) {
  #navMenu { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-top: 10px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 150px 0 90px; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-glow {
  position: absolute; width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(247,147,30,.22), transparent 65%);
  top: -200px; inset-inline-end: -200px; pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  opacity: .5;
}
.badge-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 50px;
  background: rgba(247,147,30,.1); border: 1px solid rgba(247,147,30,.3); color: var(--brand); font-weight: 700; font-size: .9rem;
}
.hero-title { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 900; line-height: 1.2; margin: 22px 0 18px; }
.hero-sub { color: var(--muted); font-size: 1.15rem; max-width: 540px; margin-bottom: 32px; line-height: 1.9; }
@media (max-width: 991.98px) { .hero-sub { margin-inline: auto; } }
.hero-mini { color: var(--muted); font-size: .95rem; }
.hero-mini i { color: var(--brand); }

/* ---------- Phone mockup ---------- */
.phone-wrap { position: relative; max-width: 330px; margin: 0 auto; }
.phone {
  position: relative; border-radius: 44px; padding: 12px; background: #050608;
  border: 2px solid #2a2f3a; box-shadow: 0 40px 80px -20px rgba(0,0,0,.8), 0 0 0 8px rgba(255,255,255,.02);
  animation: floaty 6s ease-in-out infinite;
}
.phone-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 90px; height: 24px; background: #050608; border-radius: 20px; z-index: 2; }
.phone-screen { background: linear-gradient(180deg, #161a22, #0f1218); border-radius: 34px; padding: 54px 18px 22px; min-height: 560px; }
.ph-avatar { width: 40px; height: 40px; border-radius: 50%; background: #222; object-fit: cover; border: 2px solid var(--brand); }
.ring-card { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 18px; }
.ring {
  --p: 60; width: 100px; height: 100px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), rgba(255,255,255,.08) 0);
  display: grid; place-items: center;
}
.ring-inner { width: 78px; height: 78px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.ring-inner strong { font-size: 1.05rem; }
.ring-inner small { color: var(--muted); font-size: .7rem; }
.macros { font-size: .8rem; color: var(--muted); display: grid; gap: 6px; }
.macros b { color: var(--text); margin-inline-start: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 6px; }
.d1, .b1 { background: #f7931e; } .d2, .b2 { background: #4fb3ff; } .d3, .b3 { background: #9b7bff; }
.ph-label { font-weight: 700; font-size: .9rem; margin-bottom: 10px; }
.ph-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.ph-item > i:first-child { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(247,147,30,.12); color: var(--brand); font-size: 1.1rem; }
.ph-item div { flex: 1; display: flex; flex-direction: column; line-height: 1.4; }
.ph-item b { font-size: .88rem; }
.ph-item small { color: var(--muted); font-size: .74rem; }
.ph-item .play { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; }
.ph-item .chev { color: var(--muted); }
[dir="ltr"] .chev { transform: scaleX(-1); }

.float-card {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  background: rgba(24, 28, 37, .85); backdrop-filter: blur(10px); border: 1px solid var(--line);
  padding: 12px 16px; border-radius: 16px; box-shadow: 0 20px 40px -15px rgba(0,0,0,.7);
}
.float-card i { font-size: 1.4rem; color: var(--brand); }
.float-card div { display: flex; flex-direction: column; line-height: 1.3; }
.float-card small { color: var(--muted); font-size: .72rem; }
.float-card strong { font-size: .95rem; }
.fc-1 { top: 90px; inset-inline-start: -90px; animation: floaty 5s ease-in-out infinite reverse; }
.fc-2 { bottom: 90px; inset-inline-end: -80px; animation: floaty 7s ease-in-out infinite; }
@media (max-width: 575.98px) {
  .fc-1 { inset-inline-start: -10px; top: 40px; }
  .fc-2 { inset-inline-end: -10px; bottom: 40px; }
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ---------- Stats ---------- */
.stats { padding: 10px 0 60px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 12px; font-size: 2.3rem; font-weight: 800; }
.stat .counter { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat p { font-size: .95rem; color: var(--muted); font-weight: 600; margin: 4px 0 0; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2, .section h2 { font-weight: 800; font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow { display: inline-block; color: var(--brand); font-weight: 800; letter-spacing: .5px; margin-bottom: 10px; font-size: .95rem; }
.lead-muted { color: var(--muted); font-size: 1.1rem; line-height: 1.9; }

/* ---------- Features ---------- */
.feature {
  height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px;
  transition: transform .3s, border-color .3s, box-shadow .3s; position: relative; overflow: hidden;
}
.feature::after { content: ""; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity .3s; z-index: 0; }
.feature > * { position: relative; z-index: 1; }
.feature:hover { transform: translateY(-6px); border-color: rgba(247,147,30,.4); box-shadow: 0 25px 50px -20px rgba(232,80,14,.35); }
.feature:hover::after { opacity: .05; }
.f-icon { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: var(--grad); margin-bottom: 20px; box-shadow: 0 10px 25px -8px rgba(232,80,14,.6); }
.feature h5 { font-weight: 800; margin-bottom: 10px; }
.feature p { color: var(--muted); margin: 0; line-height: 1.8; }

/* ---------- Scan demo ---------- */
.scan-demo { max-width: 420px; margin: 0 auto; }
.scan-plate {
  position: relative; aspect-ratio: 1 / .8; border-radius: 28px; overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #2a2216 0%, #15171d 70%); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 7rem; color: var(--brand);
}
.scan-line { position: absolute; inset-inline: 8%; height: 3px; background: var(--grad); box-shadow: 0 0 20px 4px rgba(247,147,30,.6); top: 10%; animation: scan 2.6s ease-in-out infinite; }
@keyframes scan { 0%,100% { top: 12%; } 50% { top: 86%; } }
.corner { position: absolute; width: 34px; height: 34px; border: 3px solid var(--brand); }
.corner.tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.corner.tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.corner.bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.corner.br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.scan-result { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin: -40px 24px 0; position: relative; box-shadow: 0 20px 40px -15px rgba(0,0,0,.7); }
.kcal { color: var(--brand); font-weight: 800; }
.bar { display: flex; height: 8px; border-radius: 8px; overflow: hidden; gap: 3px; }
.check-list { list-style: none; padding: 0; margin: 24px 0 0; }
.check-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-weight: 600; }
.check-list i { color: var(--brand); font-size: 1.3rem; }

/* ---------- Steps ---------- */
.step { text-align: center; padding: 30px 20px; position: relative; }
.step-num {
  width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.9rem; font-weight: 900; color: var(--brand); border: 2px dashed rgba(247,147,30,.5); background: rgba(247,147,30,.06);
}
.step h5 { font-weight: 800; }
.step p { color: var(--muted); line-height: 1.8; }
@media (min-width: 768px) {
  .steps > div:not(:last-child) .step::after {
    content: ""; position: absolute; top: 68px; inset-inline-start: calc(50% + 50px); width: calc(100% - 100px);
    border-top: 2px dashed var(--line);
  }
}

/* ---------- Plans ---------- */
.plan {
  height: 100%; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 36px 30px;
  display: flex; flex-direction: column; transition: transform .3s;
}
.plan:hover { transform: translateY(-6px); }
.plan.featured { border: 1px solid rgba(247,147,30,.6); background: linear-gradient(180deg, rgba(247,147,30,.1), var(--card) 45%); box-shadow: 0 30px 60px -25px rgba(232,80,14,.5); }
.plan-tag { position: absolute; top: -14px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-weight: 700; font-size: .8rem; padding: 5px 16px; border-radius: 50px; white-space: nowrap; }
[dir="rtl"] .plan-tag { transform: translateX(50%); }
.plan-icon { font-size: 2rem; color: var(--brand); margin-bottom: 10px; }
.plan h4 { font-weight: 800; margin-bottom: 4px; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 28px; flex: 1; }
.plan li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); color: #d5d9e0; }
.plan li i { color: var(--brand); }

/* ---------- FAQ ---------- */
.faq .accordion-item { background: var(--card); border: 1px solid var(--line); border-radius: 16px !important; margin-bottom: 14px; overflow: hidden; }
.faq .accordion-button { background: transparent; color: var(--text); font-weight: 700; padding: 20px 24px; box-shadow: none; }
.faq .accordion-button:not(.collapsed) { color: var(--brand); }
.faq .accordion-button::after { filter: invert(1) brightness(1.5); }
.faq .accordion-button:not(.collapsed)::after { filter: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23f7931e'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); }
.faq .accordion-body { color: var(--muted); padding: 0 24px 22px; line-height: 1.9; }

/* ---------- CTA ---------- */
.cta { padding: 40px 0 100px; }
.cta-box { background: var(--grad); border-radius: 32px; padding: 56px 48px; position: relative; overflow: hidden; }
.cta-box::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.1); top: -160px; inset-inline-end: -100px; }
.cta-box h2 { font-weight: 900; font-size: clamp(1.8rem, 3.5vw, 2.6rem); position: relative; }
.cta-box p { font-size: 1.1rem; opacity: .92; margin: 0; position: relative; }
.store-btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; background: #0d0f14; color: #fff;
  padding: 10px 20px; border-radius: 14px; transition: transform .2s; direction: ltr; text-align: left;
}
.store-btn:hover { color: #fff; transform: translateY(-3px); }
.store-btn i { font-size: 1.8rem; }
.store-btn div { display: flex; flex-direction: column; line-height: 1.15; }
.store-btn small { font-size: .7rem; opacity: .75; }
.store-btn b { font-size: 1.05rem; font-family: "Poppins", sans-serif; }
@media (max-width: 575.98px) { .cta-box { padding: 40px 22px; } }

/* ---------- Footer ---------- */
.footer { padding: 50px 0 30px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer .brand-logo { transform: none; height: 90px; }
.footer hr { border-color: var(--line); margin: 30px 0 20px; opacity: 1; }
.footer-link { color: var(--muted); margin: 0 12px; font-weight: 600; }
.footer-link:hover { color: var(--brand); }
.social { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); margin: 0 4px; transition: all .2s; }
.social:hover { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; bottom: 24px; inset-inline-end: 24px; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--grad); color: #fff; font-size: 1.2rem; z-index: 50; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone, .float-card, .scan-line { animation: none; }
}
