/* Round-2 polish (2026-12-03): fixes from the mobile/desktop UX audit.
   One type + button scale, 44px tap targets, readable contrast, one page-head system.
   Loaded last (after motion.css) so it wins over older rules of equal weight. */

/* ---------- contrast + minimum label size ---------- */
.f-row dt, .f-host { color: #626262; font-size: 13px; }
.portfolio-design .r-eyebrow { color: #5c5c5c; }
.r-project-info p, .r-app-head p, .r-app-stat { color: #5c5c5c; }
.r-app-stat { font-size: 12.5px; }
.portfolio-design .r-store, .portfolio-design .r-store span { font-size: 13px; }
.portfolio-design figcaption { font-size: 13px; }
.portfolio-design .product-card-excerpt { font-size: 14px; line-height: 1.75; }

/* ---------- buttons: two sizes, one radius ---------- */
.portfolio-design .r-button,
.portfolio-design .f-ghost,
.portfolio-design .btn:not(.btn-small) { min-height: 48px; font-size: 15px; border-radius: 999px; }
.portfolio-design .btn.btn-small,
.portfolio-design .f-ghost.header-cta { min-height: 44px; font-size: 14px; padding: 10px 20px; border-radius: 999px; }
.f-case-links .r-button { min-height: 48px; }
.portfolio-design .quick-add-btn { width: 44px; height: 44px; }

/* ---------- 44px hit areas ---------- */
.portfolio-design .lang-btn { min-height: 44px; padding: 10px 7px; font-size: 12px; }
.portfolio-design .mobile-menu-toggle { width: 44px; height: 44px; }
.portfolio-design .cart-toggle { min-width: 44px; min-height: 44px; }
.portfolio-design .r-store { min-height: 44px; }
.portfolio-design summary { padding-block: 10px; }
.portfolio-design .f-link { position: relative; }
.portfolio-design .f-link::after { content: ""; position: absolute; inset: -11px -4px; }

/* ---------- footer: a real type scale ---------- */
.r-footer .r-eyebrow { color: #cfcfcf; }
.r-footer-description { font-size: 16px; line-height: 1.85; color: #c9c9c9; max-width: 470px; }
.r-footer-email { font-size: 15px; color: #d6d6d6; padding-block: 12px; }
.r-footer-email:hover { color: #fff; }
.r-footer-links { font-size: 15px; gap: 0 22px; flex-wrap: wrap; }
.r-footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: #dcdcdc; }
.r-footer-links a:hover { color: #fff; }
.r-footer-bottom > p { font-size: 13px; color: #a9a9a9; }
.r-footer-legal { font-size: 13px; color: #b0b0b0; }
.r-footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
.r-copy { unicode-bidi: isolate; }
@media (max-width: 640px) {
  .r-footer h2 { font-size: 30px; letter-spacing: -.6px; }
  [dir="rtl"] .r-footer h2 { font-size: 32px; line-height: 1.4; }
  .r-footer-description { font-size: 15px; }
  .r-footer-links { gap: 0 18px; }
  .r-footer-legal { gap: 0; }
}

/* ---------- one page-head system (inner pages) ---------- */
.portfolio-design .page-hero-title,
.portfolio-design .page-header .page-title,
.portfolio-design .page-title { font-size: clamp(34px, 5vw, 56px); font-weight: 700; line-height: 1.2; letter-spacing: 0; }
.portfolio-design .post-title { font-size: clamp(30px, 4.2vw, 48px); font-weight: 700; line-height: 1.25; letter-spacing: 0; }
.portfolio-design .page-hero-subtitle,
.portfolio-design .page-excerpt,
.portfolio-design .post-excerpt { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.8; color: #555; }
/* multi-line Arabic reads ragged when centred: heads start-align like the body below them */
.portfolio-design :is(.page-hero-title, .page-hero-subtitle, .page-title, .page-excerpt, .post-title, .post-excerpt) { text-align: start; margin-inline: 0; }
.portfolio-design :is(.page-hero, .page-header, .post-header) { text-align: start; }

/* ---------- WhatsApp float: never fights the content ---------- */
.portfolio-design .whatsapp-float { transition: translate .35s cubic-bezier(.2, .7, .2, 1), opacity .35s; }
.portfolio-design .whatsapp-float.is-tucked { translate: 0 120px; opacity: 0; pointer-events: none; }
.page-contact .whatsapp-float, .page-cart .whatsapp-float, .page-checkout-success .whatsapp-float, .page-links .whatsapp-float { display: none !important; }

/* ---------- cart empty state centred ---------- */
.cart-empty-state svg, .mini-cart-empty svg { display: block; margin-inline: auto; }

/* ---------- CLS: product covers keep their real 1400x920 box ---------- */
.portfolio-design .product-card-image { aspect-ratio: 1400 / 920; }
.portfolio-design .post-feature-image img { aspect-ratio: auto 1400 / 920; height: auto; object-fit: cover; }

/* ---------- case-study gallery: show there is more to swipe ---------- */
@media (max-width: 899px) {
  .f-gallery { -webkit-mask-image: linear-gradient(to left, #000 82%, transparent); mask-image: linear-gradient(to left, #000 82%, transparent); }
  [dir="ltr"] .f-gallery { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
}

/* ---------- products: price-on-request items sit apart from the priced grid ---------- */
.f-onrequest { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--f-line, #e9e9e7); }
.f-onrequest-label { font-size: 13px; font-weight: 600; color: #5c5c5c; margin: 0 0 8px; }
.f-onrequest ul { list-style: none; margin: 0; padding: 0; }
.f-onrequest a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 10px 0; border-bottom: 1px solid var(--f-line, #e9e9e7); color: var(--f-ink, #171717); }
.f-onrequest-name { font-weight: 600; }
.f-onrequest-cta { flex: 0 0 auto; font-size: 14px; color: var(--f-violet, #5b3fd6); }

/* ---------- contact: follow links ---------- */
.f-contact-links { flex-wrap: wrap; }
.contact-social .f-contact-links .social-link { height: auto; display: inline-flex; align-items: center; gap: 10px; width: auto; min-height: 48px; padding: 10px 18px; border: 1px solid var(--f-line, #e9e9e7); border-radius: 999px; color: var(--f-ink, #171717); font-weight: 600; }
.contact-social .f-contact-links .social-link:hover { border-color: var(--f-ink, #171717); }

/* ---------- phones: shorter chapters so home stays brisk ---------- */
@media (max-width: 899px) {
  .f-case.m-story .f-row { min-height: 22svh; }
}

/* ---------- contact: main.js adds "body.rtl .contact-method{row-reverse}", which double-flips under dir=rtl ---------- */
html[dir="rtl"] body.rtl .contact-method { flex-direction: row; text-align: start; }
