/* مليان landing — mobile-first, brand tokens from the store app */

:root {
  --primary: #168a5b;
  --primary-rgb: 22, 138, 91;
  --primary-dark: #0f6b46;
  --primary-light: #e8f6f0;
  --bg: #f8fcfa;
  --bg-muted: #e8f6f0;
  --surface: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #d7ebe2;
  --danger: #dc2626;
  --whatsapp: #25d366;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow: 0 4px 18px rgba(15, 107, 70, 0.08);
  --shadow-lg: 0 18px 50px rgba(15, 107, 70, 0.16);
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --wrap: min(1120px, calc(100% - 2rem));
  --header-h: 3.6rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
  height: auto;
}

html.lenis {
  scroll-behavior: auto;
}

.js-motion [data-hero-el],
.js-motion [data-hero-visual],
.js-motion [data-hero-toast],
.js-motion [data-reveal],
.js-motion [data-reveal-stagger] {
  visibility: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(22, 138, 91, 0.12), transparent 55%),
    radial-gradient(900px 420px at -10% 20%, rgba(15, 107, 70, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -3rem;
  background: var(--primary-dark);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.wrap.narrow {
  width: min(720px, calc(100% - 2rem));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  box-shadow: 0 8px 28px rgba(15, 107, 70, 0.08);
  border-bottom-color: color-mix(in srgb, var(--border) 90%, transparent);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
  margin-inline-end: auto;
}

.brand-logo {
  height: 3.1rem;
  width: auto;
  max-width: min(58vw, 12.5rem);
  object-fit: contain;
  object-position: right center;
}

.footer-logo {
  height: 4.5rem;
  width: auto;
  max-width: 5.5rem;
  object-fit: contain;
  object-position: right center;
  margin-bottom: 0.65rem;
}

.nav {
  display: none;
  gap: 1rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a {
  color: var(--text);
  text-decoration: none;
}

.nav a:hover {
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-md);
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 138, 91, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 14px 28px rgba(22, 138, 91, 0.34);
}

.btn-ghost {
  background: var(--surface);
  color: var(--primary-dark);
  border: 1px solid var(--border);
}

.btn-light {
  background: #fff;
  color: var(--primary-dark);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
}

/* Hero */
.hero {
  padding: 1.35rem 0 1rem;
  overflow: clip;
}

.hero-grid {
  display: grid;
  gap: 1.35rem;
  align-items: center;
}

/* Mobile: copy → phones → pills (Qeu-like vertical flow) */
@media (max-width: 959px) {
  .hero-grid {
    justify-items: stretch;
  }

  .hero-copy {
    order: 1;
    text-align: center;
  }

  .hero-visual {
    order: 2;
    min-height: 18rem;
  }

  .hero-wink {
    width: min(82%, 220px);
  }

  .hero-pills {
    order: 3;
    justify-content: center;
  }

  .lede {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .phone-stack {
    width: min(100%, 260px);
    height: 340px;
  }

  .phone-back,
  .phone-front {
    width: 170px;
  }
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5.5vw, 2.85rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--primary-dark);
}

.tagline {
  margin: 0.75rem 0 0;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 700;
  color: var(--primary);
}

.lede {
  margin: 0.9rem 0 0;
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.hero-actions.center {
  justify-content: center;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.hero-pills li {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 22rem;
}

.hero-wink {
  position: relative;
  z-index: 4;
  width: min(88%, 280px);
  height: auto;
  margin: 0 auto 0.35rem;
  filter: drop-shadow(0 14px 28px rgba(15, 107, 70, 0.22));
  pointer-events: none;
}

html:not(.js-motion) .hero-wink {
  animation: float-y 5.2s ease-in-out infinite;
}

.phone-stack {
  position: relative;
  width: min(100%, 280px);
  height: 420px;
}

.phone {
  border-radius: 1.6rem;
  box-shadow: var(--shadow-lg);
  background: #fff;
  object-fit: cover;
  object-position: top center;
}

.phone-stack--solo {
  margin-inline: auto;
}

.plus-visual .phone-stack {
  width: min(100%, 300px);
  height: 400px;
}

.phone-back,
.phone-front {
  position: absolute;
  width: 210px;
  height: auto;
  will-change: transform;
}

html:not(.js-motion) .phone-back,
html:not(.js-motion) .phone-front {
  animation: float-y 5.5s ease-in-out infinite;
}

.phone-back {
  inset-inline-start: 0;
  top: 1.5rem;
  transform: rotate(-8deg);
  opacity: 0.92;
}

html:not(.js-motion) .phone-back {
  animation-delay: -1.2s;
}

.phone-front {
  inset-inline-end: 0;
  top: 0;
  transform: rotate(4deg);
  z-index: 2;
}

.phone-solo {
  width: min(100%, 280px);
  margin-inline: auto;
}

html:not(.js-motion) .phone-solo {
  animation: float-y 6s ease-in-out infinite;
}

.toast-float {
  position: absolute;
  bottom: 1rem;
  inset-inline-start: 50%;
  transform: translateX(50%);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.55rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-dark);
  box-shadow: var(--shadow);
  z-index: 3;
  white-space: nowrap;
}

html:not(.js-motion) .toast-float {
  animation: toast-in 0.6s ease both, pulse-soft 3s ease-in-out 1s infinite;
}

.js-motion .toast-float {
  animation: pulse-soft 3s ease-in-out 1.4s infinite;
}

[dir="rtl"] .toast-float {
  transform: translateX(-50%);
}

.toast-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(22, 138, 91, 0.18);
}

.toast-mascot {
  width: 1.7rem;
  height: auto;
  flex-shrink: 0;
}

@keyframes float-y {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    box-shadow: var(--shadow);
  }
  50% {
    box-shadow: 0 8px 28px rgba(22, 138, 91, 0.2);
  }
}

/* Marquee — JS drives an exact-width loop; CSS animation is fallback only */
.marquee-section {
  padding: 0.5rem 0 1.5rem;
  background: transparent;
}

.marquee {
  /* LTR so a short track is not pinned to the right (RTL leaves a blank strip). */
  direction: ltr;
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  max-width: none;
  margin-inline: 0;
  margin-right: auto;
  margin-left: 0;
  padding-block: 0.35rem;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  gap: 0;
}

.marquee-group {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  gap: 0.85rem;
  /* Padding (not margin) so spacing is inside offsetWidth — seamless pixel loop. */
  padding-inline-end: 0.85rem;
}

html:not(.js-motion) .marquee-track {
  animation: marquee-scroll 28s linear infinite;
}

html:not(.js-motion) .marquee:hover .marquee-track {
  animation-play-state: paused;
}

.chip-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  direction: rtl;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.65rem 1rem 0.65rem 0.65rem;
  box-shadow: var(--shadow);
  min-width: 12.5rem;
  flex-shrink: 0;
}

.chip-card img {
  width: 3.2rem;
  height: 3.2rem;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  padding: 0.25rem;
}

.chip-card img.chip-shot {
  object-fit: cover;
  object-position: top center;
  padding: 0;
}

.chip-card span {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-dark);
}

@keyframes marquee-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Sections */
.section {
  padding: 3.25rem 0;
}

.section-tint {
  background: linear-gradient(180deg, rgba(232, 246, 240, 0.75), rgba(248, 252, 250, 0.2));
}

.section-dark {
  background:
    linear-gradient(145deg, rgba(15, 107, 70, 0.96), rgba(22, 138, 91, 0.92)),
    var(--primary-dark);
  color: #fff;
}

.section-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.section-head h2,
.plus-copy h2,
.why-inner h2,
.cta-box h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: inherit;
}

.section-head p {
  margin: 0.55rem auto 0;
  max-width: 36rem;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  gap: 1rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.feature-card h3 {
  margin: 0.75rem 0 0.4rem;
  font-size: 1.08rem;
  color: var(--primary-dark);
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-icon {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fff, var(--primary-light));
  color: var(--primary);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(22, 138, 91, 0.1);
}

.feature-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.feature-card:hover .feature-icon {
  color: var(--primary-dark);
  background: var(--primary-light);
}

.plus-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.65rem;
}

.check-list li {
  position: relative;
  padding-inline-start: 1.7rem;
  font-weight: 600;
  color: var(--text);
}

.check-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.4rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 28%, transparent 29%),
    var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 138, 91, 0.15);
}

.areas-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.areas-grid li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.9rem;
  text-align: center;
  font-weight: 650;
  color: var(--primary-dark);
  box-shadow: var(--shadow);
}

.why-inner {
  text-align: center;
  max-width: 42rem;
  margin-inline: auto;
}

.why-mascot {
  width: min(42vw, 8.5rem);
  height: auto;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.28));
}

.why-inner p {
  margin: 1rem auto 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
}

.why-badge {
  display: inline-block;
  margin: 1.25rem 0 1.5rem !important;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 700;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.35rem 1rem;
  box-shadow: var(--shadow);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--primary-dark);
  padding: 0.85rem 0;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: left;
  color: var(--primary);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0 0 0.95rem;
  color: var(--text-muted);
}

.faq-note {
  color: var(--primary-dark);
  font-weight: 700;
}

.section-cta {
  padding-top: 1rem;
}

.cta-box {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-lg) + 4px);
  padding: 2rem 1.25rem;
  box-shadow: var(--shadow-lg);
}

.cta-brand {
  width: min(72vw, 16rem);
  height: auto;
  margin: 0 auto 1.1rem;
  filter: drop-shadow(0 10px 22px rgba(15, 107, 70, 0.16));
}

.cta-box .lede {
  margin-inline: auto;
}

.wa-hint {
  margin: 0.85rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 2.5rem 0 6rem;
  background: #0b3d2a;
  color: rgba(255, 255, 255, 0.88);
}

.site-footer a {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-grid h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: #fff;
}

.footer-grid p {
  margin: 0.25rem 0;
}

.footer-bottom {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
}

.fab-wa {
  position: fixed;
  inset-inline-end: 1rem;
  bottom: 1rem;
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
  z-index: 60;
  text-decoration: none !important;
  transition: transform 0.18s ease;
}

.fab-wa:hover {
  transform: scale(1.06);
}

/* Desktop */
@media (min-width: 720px) {
  .nav {
    display: flex;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .areas-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .cta-box {
    padding: 2.75rem;
  }
}

@media (min-width: 960px) {
  .hero {
    padding: 3.25rem 0 2rem;
  }

  .hero-grid,
  .plus-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
  }

  .hero-pills {
    grid-column: 1;
  }

  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .areas-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .phone-stack {
    width: 340px;
    height: 480px;
  }

  .phone-back,
  .phone-front {
    width: 240px;
  }

  .hero-visual {
    min-height: 30rem;
  }

  .hero-wink {
    position: absolute;
    inset-inline-start: -6%;
    top: 0.25rem;
    width: min(58%, 250px);
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-motion [data-hero-el],
  .js-motion [data-hero-visual],
  .js-motion [data-hero-toast],
  .js-motion [data-reveal],
  .js-motion [data-reveal-stagger] {
    visibility: visible;
  }

  .phone-back,
  .phone-front,
  .phone-solo,
  .toast-float,
  .marquee-track {
    animation: none !important;
  }
}
