/* =========================================================================
   mobile.css — phone-only layer for alaaddinenasloubi.com
   Loaded with media="(max-width: 768px)" AFTER styles.css, so it only
   applies on phones and never touches the desktop experience.
   Goal: a purpose-built, fast, thumb-friendly mobile site on the same URLs
   (responsive = best SEO/AEO; no duplicate mobile URLs).
   ========================================================================= */

@media (max-width: 768px) {

  :root { --max: 100%; }

  body { font-size: 16px; }

  /* Show all content immediately on mobile — no scroll-reveal dependency
     (faster perceived load, zero risk of blank sections if JS is slow). */
  .reveal { opacity: 1 !important; transform: none !important; }

  /* ---- Rhythm: tighter vertical spacing ---- */
  section { padding: 60px 0; }
  .wrap { padding: 0 20px; }
  .section-head { margin-bottom: 32px; }

  /* ---- Type scale tuned for small screens ---- */
  h1 { font-size: clamp(2.4rem, 12vw, 3.2rem); letter-spacing: -0.03em; }
  h2 { font-size: clamp(1.7rem, 7vw, 2.1rem); }
  .hero p.lead, .lead { font-size: 1.08rem; }
  .article-body p, .article-body li { font-size: 1.02rem; }

  /* ---- Header / full-screen menu ---- */
  .site-header { height: 60px; }
  .nav { height: 60px; padding: 0 18px; }
  .brand { font-size: .98rem; }
  .brand .mark { width: 30px; height: 30px; }

  .nav-links {
    position: fixed; inset: 60px 0 0 0; height: calc(100dvh - 60px);
    background: rgba(7,7,12,.98); backdrop-filter: blur(20px);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 0; padding: 12px 22px 28px; display: none; overflow-y: auto; z-index: 55;
  }
  .nav-links.open { display: flex; animation: m-menu-in .22s ease both; }
  @keyframes m-menu-in { from { opacity: 0; transform: translateY(-6px);} to { opacity: 1; transform: none; } }
  .nav-links a {
    padding: 18px 4px; width: 100%; font-size: 1.25rem; font-family: var(--display);
    font-weight: 600; color: #fff; border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-of-type { border-bottom: 0; }
  .nav-links .btn { margin-top: 18px; width: 100%; justify-content: center; padding: 16px; font-size: 1rem; }
  body.menu-open { overflow: hidden; }

  /* ---- Hero ---- */
  .hero { padding: 40px 0 56px; }
  .hero-grid { gap: 40px; }
  .hero .btn-row { flex-direction: column; }
  .hero .btn-row .btn { width: 100%; justify-content: center; padding: 15px; }
  .hero .sub, .sub { font-size: .78rem; }
  .eyebrow { margin-bottom: 16px; font-size: .68rem; letter-spacing: .1em; }

  /* Portrait: contained, centered, lighter effects */
  .portrait-frame { max-width: 320px; margin: 0 auto; width: 100%; }
  .portrait-frame::after { inset: -14px; filter: blur(16px); opacity: .4; }
  .orb { filter: blur(20px); opacity: .6; }
  .orb-a { width: 96px; height: 96px; top: -20px; left: -16px; }
  .orb-b { width: 86px; height: 86px; right: -18px; }
  .orb-c { width: 66px; height: 66px; }
  .orb-d { display: none; }
  /* keep floating chips on-screen */
  .float-chip { font-size: .68rem; padding: 7px 11px; }
  .float-chip.fc-1 { top: 10px; left: 6px; }
  .float-chip.fc-2 { bottom: 64px; right: 6px; }
  .portrait-badge { font-size: .68rem; padding: 8px 14px; bottom: -14px; }

  /* ---- Marquee ---- */
  .strip { padding: 13px 0; }
  .strip-track { font-size: .72rem; animation-duration: 26s; }
  .strip-track span { padding: 0 16px; }
  .strip-track span::after { margin-left: 16px; }

  /* ---- Metrics: 2-up, sized down ---- */
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { padding: 22px 18px; }
  .metric .n { font-size: 2.1rem; }
  .metric .n .u { font-size: 1.1rem; }
  .metric .l { font-size: .84rem; margin-top: 10px; }
  .metric .s { font-size: .72rem; }

  /* ---- Cards / panels ---- */
  .grid-2, .grid-3, .entities { gap: 14px; }
  .card { padding: 26px 22px; }
  .panel { padding: 34px 22px; border-radius: 22px; }
  .panel h2 { font-size: 1.9rem; }
  .panel .btn, .card .btn { width: 100%; justify-content: center; }

  /* CTA / centered button rows go full-width and stack */
  .btn-row { gap: 12px; }
  section .wrap.prose .btn-row .btn,
  .panel .btn-row .btn { width: 100%; justify-content: center; }

  /* ---- Step flow: wrap as compact pills ---- */
  .flow { gap: 8px; }
  .flow .step { padding: 9px 14px; font-size: .82rem; }
  .flow .arrow { display: none; }

  /* ---- Country chips ---- */
  .chip { font-size: .76rem; padding: 8px 10px; }

  /* ---- Timeline ---- */
  .timeline { padding-left: 22px; }
  .timeline .item::before { left: -28px; }
  .timeline .role { font-size: .98rem; }

  /* ---- Console: allow horizontal scroll, no overflow ---- */
  .console { overflow-x: auto; }
  .console-row { font-size: .74rem; white-space: nowrap; }

  /* ---- Fufills floating logo ---- */
  .flogo { max-width: 280px; }

  /* ---- Quote ---- */
  .quote { font-size: 1.3rem; padding-left: 20px; }

  /* ---- Footer ---- */
  .site-footer { padding: 52px 0 110px; } /* room for sticky bar */
  .footer-bottom { flex-direction: column; gap: 8px; font-size: .76rem; }

  /* ---- Perf: lighten the hero mesh on mobile ---- */
  .mesh { height: 520px; filter: blur(48px); opacity: .42; }
  .mesh i:nth-child(4) { display: none; }

  /* ---- Sticky bottom action bar (injected by mobile.js) ---- */
  .m-actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(7,7,12,.92); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .m-actionbar a { flex: 1; text-align: center; padding: 13px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
  .m-actionbar .b-primary { color: #fff; background: var(--plasma); box-shadow: 0 6px 20px rgba(255,61,129,.3); }
  .m-actionbar .b-ghost { color: #fff; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); }
}

/* Small phones */
@media (max-width: 380px) {
  h1 { font-size: 2.1rem; }
  .metric .n { font-size: 1.8rem; }
  .float-chip { display: none; } /* avoid crowding tiny screens */
}
