/* Ghanim Law Firm — site styles (built on the Areeb site system) */

@font-face { font-family: "Cairo"; src: url("/assets/fonts/cairo-arabic.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Familjen Grotesk"; src: url("/assets/fonts/familjen-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("/assets/fonts/familjen-grotesk-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --pure: #1A1D1B; --ink: #1D211F; --panel: #202523; --edge: #2C332E; --charcoal: #394C3D; --steel: #556457;
  --gray: #90AA93; --silver: #B8BDAE; --line: #D3D5C8; --light: #E4E4D6; --soft: #EEEEDE; --white: #F8F8F2;
  --accent: #394C3D; --on-accent: #EEEEDE; --accent-hover: #556457; --logo-ink: #EEEEDE; --logo-acc: #556457; --paper: #F8F8F2; --paper-ink: #1A1D1B;
  --wrap: 1160px; --gutter: 24px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --r-lg: 22px; --r-md: 14px; --r-sm: 10px;
  /* type scale (design-foundations 1: Apple numbers, fluid 375 -> 1440) */
  --fs-display: clamp(34px, 26.25px + 2.066vw, 56px);
  --fs-section: clamp(28px, 23.77px + 1.127vw, 40px);
  --fs-lead: clamp(19px, 17.24px + 0.469vw, 24px);
  --fs-sub: clamp(19px, 18.30px + 0.188vw, 21px);
  --fs-body: 17px;
  --fs-small: 14px;
  --lh-head: 1.1; --lh-body: 1.47;
  --measure: 680px;
  --space-section: clamp(48px, 36.73px + 3.005vw, 80px);
}
.lang-ar { --lh-head: 1.35; --lh-body: 1.8; }

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--pure); }
body { margin: 0; background: var(--pure); color: var(--white); font-family: "Inter", "Cairo", system-ui, sans-serif; font-weight: 300; font-size: var(--fs-body); line-height: var(--lh-body); position: relative; overflow-x: hidden; min-height: 100dvh; display: flex; flex-direction: column; }
body.lang-ar { font-family: "Cairo", "Inter", system-ui, sans-serif; }
main { flex: 1 0 auto; }
.latin { font-family: "Inter", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { font-weight: 700; line-height: var(--lh-head); margin: 0; }
.lang-en h1, .lang-en h2, .lang-en h3 { font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); position: relative; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--white); color: var(--pure); padding: 12px 16px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* brand pattern: top-left corner, slow breathing */
.pattern { position: absolute; top: 0; left: 0; width: min(45vw, 620px); pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(to left, transparent, #000 45%), linear-gradient(to top, transparent, #000 45%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to left, transparent, #000 45%), linear-gradient(to top, transparent, #000 45%); mask-composite: intersect;
  animation: breathe 12s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; transition: background .35s, border-color .35s; }
.site-header.is-stuck { background: var(--pure); border-bottom-color: var(--edge); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 24px; transition: padding .35s var(--ease); }
.site-header.is-stuck .header-in { padding-block: 12px; }
.brand { flex: none; }
.brand svg { height: 60px; width: auto; display: block; transition: height .35s var(--ease); }
.site-header.is-stuck .brand svg { height: 44px; }
.main-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; font-size: var(--fs-body); font-weight: 500; }
.main-nav a { min-height: 44px; display: inline-flex; align-items: center; position: relative; color: var(--light); transition: color .25s; }
.main-nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: 6px; height: 1px; background: currentColor; transform: scaleX(0); transition: transform .35s var(--ease); }
.main-nav a[aria-current="page"] { color: var(--white); }
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.lang-switch { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-family: "Inter", "Cairo", sans-serif; font-size: var(--fs-small); color: var(--silver); transition: color .25s; }

/* home header: no logo, light links */
.is-home-head { position: fixed; inset-inline: 0; top: 0; }
.is-home-head .brand { display: none; }
.is-home-head .main-nav { font-size: var(--fs-body); gap: 4px 28px; font-weight: 300; }
.is-home-head .main-nav a { color: var(--silver); }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { font: inherit; display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 24px; font-size: var(--fs-body); font-weight: 700; border: 1px solid transparent; border-radius: var(--r-sm); cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease); }
.btn .ic { flex: none; }
.btn-light { background: var(--accent); color: var(--on-accent); }
.btn-line { background: transparent; border-color: var(--steel); color: var(--white); font-weight: 500; }

/* ---------- inner page head ---------- */
.page-head { padding-block: 64px 40px; display: flex; flex-direction: column; gap: 20px; }
.page-head h1 { font-size: var(--fs-display); line-height: var(--lh-head); }
.page-head .lead { margin-top: 4px; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--silver); max-width: var(--measure); }
.page-head .actions { margin-top: 12px; }
.rule { border: 0; height: 1px; background: var(--charcoal); margin: 0; }
.section { padding-block: var(--space-section); }
.section + .section { padding-top: 0; }
.section-title { font-size: var(--fs-section); margin-bottom: 24px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 24px; font-size: var(--fs-small); color: var(--gray); }
.crumbs a { color: var(--gray); transition: color .2s; }

/* lists with hairlines */
.lines { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--charcoal); }
.lines li { padding: 16px 0; border-bottom: 1px solid var(--charcoal); font-size: var(--fs-body); display: flex; gap: 16px; }
.num { font-family: "Inter", sans-serif; font-weight: 300; color: var(--gray); min-width: 1.4em; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 64px; }

/* dark panel (prepare / fees) */
.panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-lg); overflow: hidden; }
.panel > div { padding: 32px; }
.panel > div + div { border-inline-start: 1px solid var(--edge); }
.panel h3 { font-size: var(--fs-sub); margin-bottom: 12px; }
.panel p { font-size: var(--fs-body); color: var(--silver); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--charcoal); padding: 20px 0; }
.faq details:first-of-type { border-top: 1px solid var(--charcoal); }
.faq summary { cursor: pointer; font-weight: 700; font-size: var(--fs-sub); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-family: "Inter", sans-serif; font-weight: 200; font-size: var(--fs-lead); line-height: 1; color: var(--gray); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 12px; font-size: var(--fs-body); color: var(--silver); max-width: 860px; }

/* areas index */
.area-list { display: flex; flex-direction: column; border-top: 1px solid var(--charcoal); }
.area-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 24px; align-items: center; padding: 28px 16px; border-bottom: 1px solid var(--charcoal); transition: background .25s; }
.area-name { font-weight: 700; font-size: var(--fs-sub); }
.area-short { color: var(--silver); font-size: var(--fs-body); }
.area-arrow { color: var(--gray); font-size: var(--fs-sub); transition: transform .3s var(--ease), color .3s; }

/* about: commitments */
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; border-top: 1px solid var(--charcoal); }
.points > div { padding: 24px 0; border-bottom: 1px solid var(--charcoal); }
.points h3 { font-size: var(--fs-sub); margin-bottom: 8px; }
.points p { font-size: var(--fs-body); color: var(--silver); }

/* about: client logo wall */
.client-wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); border-top: 1px solid var(--charcoal); border-inline-start: 1px solid var(--charcoal); }
.client-wall li { min-height: 132px; display: flex; align-items: center; justify-content: center; padding: 24px; border-bottom: 1px solid var(--charcoal); border-inline-end: 1px solid var(--charcoal); text-align: center; }
.client-wall img { width: auto; max-width: 100%; object-fit: contain; }
.client-wall .c-name { font-size: var(--fs-body); font-weight: 500; color: var(--light); line-height: 1.6; }

/* contact */
.contact-rows { display: flex; flex-direction: column; border-top: 1px solid var(--charcoal); max-width: 820px; }
.contact-rows .ct-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 20px; padding: 24px 16px; border-bottom: 1px solid var(--charcoal); font-size: var(--fs-body); color: var(--silver); transition: background .25s; }
.contact-rows .ct-label { display: inline-flex; align-items: center; gap: 12px; }
.contact-rows strong { color: var(--white); font-weight: 400; font-size: var(--fs-sub); }
.ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ct-actions strong { margin-inline-start: 8px; }
.ct-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--edge); border-radius: var(--r-sm); color: var(--white); font-size: var(--fs-body); transition: background .25s, border-color .25s; }
.ct-btn .ic, .ct-btn svg { width: 18px; height: 18px; }
.contact-meta { color: var(--gray); margin-top: 24px; font-size: var(--fs-body); }

/* blog */
.post-list { border-top: 1px solid var(--charcoal); }
.post-row { display: flex; flex-direction: column; gap: 8px; padding: 24px 16px; border-bottom: 1px solid var(--charcoal); transition: background .25s; }
.card-title { font-weight: 700; font-size: var(--fs-sub); line-height: 1.6; }
.eyebrow { font-size: var(--fs-small); color: var(--gray); }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 36px; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-lg); }
.empty p { font-size: var(--fs-body); color: var(--silver); }
.article { max-width: 820px; padding-bottom: 96px; }
.article h1 { font-size: var(--fs-display); margin: 32px 0 16px; }
.meta { color: var(--gray); font-size: var(--fs-small); margin-bottom: 28px; }
.summary { font-size: var(--fs-lead); color: var(--white); padding: 24px 0; border-block: 1px solid var(--charcoal); margin-bottom: 28px; }
.prose { font-size: var(--fs-body); color: var(--light); }
.prose h2 { font-size: var(--fs-section); margin: 40px 0 16px; color: var(--white); }
.prose h3 { font-size: var(--fs-sub); margin: 32px 0 12px; color: var(--white); }
.prose p, .prose ul, .prose ol { margin: 0 0 20px; }
.prose a { text-decoration: underline; text-underline-offset: 5px; }
.article .actions { margin-top: 40px; }

/* closing call-to-action on inner pages */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 32px; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-lg); }
.cta h2 { font-size: var(--fs-lead); }
.cta p { color: var(--silver); font-size: var(--fs-body); margin-top: 8px; }

/* ---------- footer (fixed, bilingual) ---------- */
.site-footer { background: var(--pure); border-top: 1px solid var(--edge); margin-top: var(--space-section); font-family: "Cairo", "Inter", sans-serif; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 32px; padding-block: 56px 36px; }
.footer-id { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.footer-id img { height: 176px; width: auto; align-self: center; margin-bottom: 8px; }
.f-name-ar { font-weight: 700; font-size: var(--fs-sub); }
.f-name-en { font-family: "Inter", sans-serif; font-size: var(--fs-small); letter-spacing: .12em; white-space: nowrap; color: var(--gray); }
.f-muted { font-size: var(--fs-small); color: var(--gray); }
.footer-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 36px; max-width: 100%; }
.footer-contact a { display: flex; flex-direction: row-reverse; justify-content: flex-start; align-items: center; gap: 16px; min-height: 48px; color: var(--white); font-family: "Inter", sans-serif; font-size: var(--fs-body); line-height: 1; transition: color .25s; }
.footer-bottom { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; padding-block: 24px 104px; border-top: 1px solid var(--edge); }
.social { display: flex; gap: 12px; }
.social a { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--charcoal); border-radius: var(--r-md); transition: border-color .25s, transform .25s var(--ease); }

/* ---------- entrance + reveal ---------- */
.rise { opacity: 0; animation: rise .8s var(--ease) forwards; }
.d0 { animation-delay: 0s; } .d1 { animation-delay: .12s; } .d2 { animation-delay: .24s; } .d3 { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- loader (home) + page veil ---------- */
.loader { position: fixed; inset: 0; z-index: 90; background: var(--pure); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; cursor: pointer; animation: ld-out var(--loader) var(--ease) forwards; }
.loader .ld-mark { width: min(22vw, 96px); height: auto; margin-bottom: 8px; animation: ld-in 1.2s var(--ease) both; }
.loader .ld-type { width: min(70vw, 336px); height: auto; opacity: 0; animation: rise .8s 1s var(--ease) forwards; }
@keyframes ld-out { 0%, 86% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
@keyframes ld-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.veil { position: fixed; inset: 0; z-index: 95; background: var(--pure); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .38s ease, visibility 0s .38s; }
.veil svg { width: 56px; height: auto; }
.veil.is-on { opacity: 1; visibility: visible; transition: opacity .38s ease; }
.js body:not(.is-home) .veil { animation: veil-out .55s .05s ease both; }
.js body:not(.is-home) .veil.is-on { animation: none; }
@keyframes veil-out { from { opacity: 1; visibility: visible; } to { opacity: 0; visibility: hidden; } }

/* ---------- home stage ---------- */
body.is-home { min-height: 100dvh; }
.is-home .rise { animation-delay: calc(var(--home-delay, 5s) + var(--i, 0s)); }
.stage { position: relative; z-index: 1; height: 100dvh; min-height: 560px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; padding: 64px 16px 8px; overflow-y: auto; }
.stage-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.stage-logo { width: auto; height: clamp(190px, 42vh, 410px); }
.stage-logo-h { display: none; width: auto; }
.stage-title { font-size: var(--fs-lead); font-weight: 500; color: var(--light); margin-top: 8px; max-height: 80px; overflow: hidden; transition: max-height .5s var(--ease), opacity .4s, margin .5s; }
.stage.is-active { justify-content: flex-start; }
.stage.is-active .stage-logo { display: none; }
.stage.is-active .stage-logo-h { display: block; height: clamp(70px, 12vh, 100px); animation: fade .5s var(--ease) both; }
.stage.is-active .stage-title { max-height: 0; opacity: 0; margin: 0; }
.stage.is-active .home-clients { display: none; }

/* ---------- chat ---------- */
.chat { width: min(680px, 100%); display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.stage.is-active .chat { flex: 1; min-height: 0; }
.chat-progress { display: none; list-style: none; margin: 0; padding: 0; gap: 8px; }
.chat.is-active .chat-progress { display: flex; }
.chat-progress li { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-small); color: var(--gray); }
.chat-progress li::before { content: ""; height: 2px; border-radius: 2px; background: var(--charcoal); transition: background .4s; }
.chat-progress li.is-done::before, .chat-progress li.is-now::before { background: var(--white); }
.chat-progress li.is-now { color: var(--white); }
.chat-log { display: none; flex-direction: column; gap: 12px; overflow-y: auto; padding: 8px 4px; scroll-behavior: smooth; }
.chat-log > * { flex-shrink: 0; }
.chat.is-active .chat-log { display: flex; flex: 1; min-height: 120px; }
.msg { max-width: min(80%, 560px); padding: 12px 16px; border-radius: var(--r-lg); font-size: var(--fs-body); line-height: 1.8; animation: fade .35s var(--ease) both; }
.msg p { margin: 0; white-space: pre-wrap; }
.msg-bot { align-self: flex-start; background: var(--panel); border: 1px solid var(--edge); border-start-start-radius: 6px; }
.msg-user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-start-end-radius: 6px; }
.msg-typing { display: inline-flex; gap: 4px; padding: 16px 20px; }
.msg-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); animation: dot 1s infinite ease-in-out; }
.msg-typing span:nth-child(2) { animation-delay: .15s; } .msg-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-options { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-options:empty { display: none; }
.opt { font: inherit; font-weight: 500; font-size: var(--fs-small); min-height: 40px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--charcoal); background: var(--panel); color: var(--white); cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ease); animation: fade .35s var(--ease) both; }
.chat-input { display: flex; align-items: flex-end; gap: 12px; padding: 8px; padding-inline-start: 20px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--edge); transition: border-color .25s; }
.chat-input:focus-within { border-color: var(--silver); }
.chat-input textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; color: var(--white); font: inherit; font-size: var(--fs-body); line-height: 1.6; padding: 8px 0; max-height: 140px; }
.chat-input textarea::placeholder { color: var(--gray); }
.chat-input textarea:disabled { opacity: .5; }
.chat-send { flex: none; width: 40px; height: 40px; border-radius: var(--r-md); border: 0; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s var(--ease), background .2s; }
.chat-topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chat-topics[hidden] { display: none; }
.topic { font: inherit; text-align: start; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px 8px 12px; border-radius: var(--r-md); border: 1px solid var(--edge); background: var(--panel); color: var(--white); cursor: pointer; transition: border-color .25s, background .25s, transform .25s var(--ease); }
.t-ic { flex: none; width: 18px; height: 18px; color: var(--gray); }
.t-txt { display: flex; flex-direction: column; min-width: 0; }
.t-title { font-weight: 500; font-size: var(--fs-small); }
.t-ex { display: none; }
.chat-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.chat-note { font-size: var(--fs-small); color: var(--gray); max-width: 640px; }
.chat-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.chat-human, .chat-restart { font: inherit; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--steel); color: var(--white); background: transparent; font-size: var(--fs-small); cursor: pointer; transition: background .2s, color .2s; }
.chat-restart[hidden] { display: none; }
.summary-card { align-self: stretch; background: var(--paper); color: var(--paper-ink); border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden; animation: fade .45s var(--ease) both; }
.summary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid #E4E4D6; }
.summary-head img { height: 40px; width: auto; }
.summary-label { font-size: var(--fs-small); color: var(--steel); }
.summary-card dl { margin: 0; padding: 16px 24px; display: grid; grid-template-columns: minmax(110px, 34%) 1fr; font-size: var(--fs-small); }
.summary-card dt, .summary-card dd { padding: 8px 0; border-bottom: 1px solid #E4E4D6; }
.summary-card dt { color: #556457; }
.summary-card dd { margin: 0; font-weight: 500; white-space: pre-wrap; }
.summary-card dt:nth-last-of-type(1), .summary-card dd:last-of-type { border-bottom: 0; }
.summary-send { align-self: flex-start; display: inline-flex; align-items: center; min-height: 50px; padding: 0 24px; margin: 0 24px 24px; border-radius: var(--r-sm); background: #394C3D; color: #F8F8F2; font-weight: 700; }
.handoff-btn { margin: 0; background: var(--accent); color: var(--on-accent); }

/* ask button + popover (inner pages) */
.ask-fab { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 30; display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 24px; border: 0; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; font-size: var(--fs-body); cursor: pointer; box-shadow: 0 6px 24px rgba(0,0,0,.45); transition: transform .25s var(--ease), background .25s; }
.chat-drawer { position: fixed; inset: auto; bottom: 90px; inset-inline-end: 22px; inset-inline-start: auto; margin: 0; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 120px)); max-height: none; max-width: 100%; padding: 16px; border: 1px solid #262626; border-radius: var(--r-lg); background: var(--pure); color: var(--white); flex-direction: column; gap: 12px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.9); }
.chat-drawer[open] { display: flex; animation: drawer-in .4s var(--ease); }
.chat-drawer::backdrop { background: rgba(0,0,0,.45); }
@keyframes drawer-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; justify-content: center; align-items: center; position: relative; }
.drawer-head .drawer-logo { height: 96px; width: auto; }
.drawer-logo-h { display: none; width: auto; }
.chat-drawer:has(.chat.is-active) .drawer-head .drawer-logo { display: none; }
.chat-drawer:has(.chat.is-active) .drawer-head .drawer-logo-h { display: block; height: 52px; }
.chat-drawer:has(.chat.is-active) .drawer-greet { display: none; }
.drawer-close { position: absolute; top: 0; inset-inline-end: 0; width: 40px; height: 40px; border-radius: var(--r-md); border: 1px solid var(--charcoal); background: transparent; color: var(--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.drawer-greet { text-align: center; font-size: var(--fs-body); font-weight: 500; color: var(--light); }
.chat-drawer .chat { flex: 1; min-height: 0; width: 100%; }
.chat-drawer .chat.is-active .chat-log { flex: 1; }
.chat-drawer .chat-foot .chat-note { font-size: var(--fs-small); }
html.drawer-open { overflow: hidden; }

/* ---------- client marquee ---------- */
.marquee { position: relative; overflow: hidden; width: 100%; cursor: grab; touch-action: pan-y; user-select: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee.is-drag { cursor: grabbing; }
.marquee-track { display: flex; align-items: center; width: max-content; will-change: transform; }
.m-item { flex: none; height: 88px; padding: 0 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.m-item img { width: auto; height: var(--h, 56px); max-width: 300px; pointer-events: none; transition: transform .35s var(--ease); }
.m-name { font-family: "Cairo", "Inter", sans-serif; font-weight: 700; font-size: var(--fs-body); color: var(--light); white-space: nowrap; }
.m-name[lang="en"] { font-family: "Inter", sans-serif; font-weight: 500; font-size: var(--fs-body); }
.home-clients { width: min(1240px, 100%); display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: auto; padding-top: 4px; }
.hc-label { font-size: var(--fs-sub); font-weight: 500; color: var(--light); }
.home-clients .m-name { font-size: var(--fs-body); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .two-col, .points, .panel { grid-template-columns: 1fr; }
  .panel > div + div { border-inline-start: 0; border-top: 1px solid var(--edge); }
  .area-row { grid-template-columns: 1fr auto; }
  .area-short { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 720px) {
  :root { --gutter: 18px; }
  .header-in { flex-wrap: wrap; padding-block: 16px; }
  .brand svg { height: 46px; }
  .site-header.is-stuck .brand svg { height: 38px; }
  .main-nav { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 4px 24px; font-size: var(--fs-body); }
  .site-header.is-stuck .main-nav { display: none; }
  .is-home-head .main-nav { order: 0; flex-basis: auto; font-size: var(--fs-small); gap: 4px 16px; }
  .page-head { padding-block: 36px 28px; }
  .lines li { font-size: var(--fs-body); }
  .panel > div, .cta, .empty { padding: 24px; }
  .client-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-wall li { min-height: 104px; padding: 16px; }
  .ask-fab span { display: none; }
  .ask-fab { padding: 0 16px; }
  .chat-drawer { inset: 0; width: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .stage { padding-top: 60px; gap: 12px; }
  .stage-logo { height: clamp(170px, 31vh, 260px); }
  .topic { padding: 8px 12px; }
  .msg { max-width: 88%; }
  .footer-bottom { padding-bottom: 96px; }
}
@media (max-height: 800px) {
  .stage { padding-top: 60px; gap: 8px; }
  .stage-logo { height: clamp(170px, 35vh, 320px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pattern { animation: none; }
  .loader, .veil, .js body:not(.is-home) .veil { display: none; }
  .rise, .is-home .rise { opacity: 1; animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .topic:hover, .opt:hover, .social a:hover, .ask-fab:hover { transform: none; }
  .msg, .opt, .summary-card, .chat-drawer[open] { animation: none; }
  .marquee-track { flex-wrap: wrap; justify-content: center; width: auto; transform: none !important; }
  .marquee-track .m-item[aria-hidden] { display: none; }
}

/* client name under logos that do not carry it */
.m-label, .c-label { font-family: "Cairo", "Inter", sans-serif; font-size: var(--fs-small); font-weight: 500; color: var(--silver); line-height: 1.3; white-space: nowrap; }
.m-label[lang="en"], .c-label[lang="en"] { font-family: "Inter", sans-serif; font-size: var(--fs-small); }
.client-wall li { flex-direction: column; gap: 12px; }
.client-wall .c-label { font-size: var(--fs-small); }

/* upload inside the chat */
.upload-box { align-self: stretch; display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px dashed var(--steel); border-radius: var(--r-md); background: var(--panel); animation: fade .35s var(--ease) both; }
.upload-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.upload-pick { background: var(--white); color: var(--pure); border-color: var(--white); }
.upload-go:disabled { opacity: .45; cursor: wait; transform: none; }
.upload-hint { font-size: var(--fs-small); color: var(--gray); }
.upload-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-small); }
.upload-list li { padding-inline-start: 24px; position: relative; color: var(--light); overflow-wrap: anywhere; }
.upload-list li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--gray); }
.upload-list li.is-ok::before { background: var(--white); }
.upload-list li.is-err { color: var(--gray); }
.upload-list li.is-busy::before { animation: dot 1s infinite ease-in-out; }


.m-label, .c-label { white-space: normal; text-align: center; max-width: 230px; }
.home-clients .m-label { font-size: var(--fs-small); max-width: 210px; }

/* services list */
.svc-list { border-top: 1px solid var(--charcoal); }
.svc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px 48px; padding: 28px 8px; border-bottom: 1px solid var(--charcoal); }
.svc-name { font-size: var(--fs-sub); line-height: 1.5; }
.svc-body p { font-size: var(--fs-body); color: var(--silver); }
.svc-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 12px; }
.svc-links a { font-size: var(--fs-body); font-weight: 500; color: var(--white); border-bottom: 1px solid var(--steel); padding-bottom: 4px; transition: border-color .25s; }
.section-lead { margin: -8px 0 24px; }
@media (max-width: 860px) { .svc { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .ct-actions { width: 100%; }
  .ct-actions strong { flex-basis: 100%; margin: 0 0 4px; }
  .ct-btn { flex: 1; justify-content: center; }
}

/* ---------- header bar ---------- */
.site-header .header-in { max-width: none; display: flex; align-items: center; gap: 16px 28px; padding-inline: clamp(16px, 3vw, 44px); }
.brand { order: 0; }
.main-nav { order: 1; flex: 1; justify-content: flex-start; align-items: center; gap: 4px 28px; font-size: var(--fs-body); font-weight: 500; flex-wrap: nowrap; }
.head-cta { order: 2; flex: none; display: inline-flex; align-items: center; min-height: 42px; padding: 0 24px; border-radius: var(--r-sm); background: var(--white); color: var(--pure); font-weight: 700; font-size: var(--fs-small); transition: background .25s, transform .25s var(--ease); }
.head-tools { order: 3; flex: none; display: flex; align-items: center; gap: 16px; }
.head-phone { font-size: var(--fs-small); color: var(--silver); white-space: nowrap; transition: color .25s; }
.head-social { display: inline-flex; align-items: center; gap: 4px; }
.head-social a { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--silver); border-radius: var(--r-md); transition: color .25s, background .25s; }
.head-social svg { width: 20px; height: 20px; }
.lang-pair { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); color: var(--steel); margin-inline-start: 8px; }
.lang-pair a { min-height: 44px; display: inline-flex; align-items: center; color: var(--gray); }
.lang-pair a[aria-current] { color: var(--white); font-weight: 700; }
.lang-pair a::after { display: none; }
.theme-toggle { flex: none; width: 38px; height: 38px; border-radius: var(--r-md); border: 1px solid var(--edge); background: transparent; color: var(--silver); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color .25s, border-color .25s; }
.theme-toggle .ic-moon { display: none; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: var(--r-md); border: 1px solid var(--edge); background: transparent; color: var(--white); align-items: center; justify-content: center; cursor: pointer; }
.nav-drop { position: relative; }
.nav-drop > a { gap: 8px; }
.nav-drop .chev { transition: transform .25s; }
.drop-menu { position: absolute; top: 100%; inset-inline-start: -16px; min-width: 230px; padding: 12px; background: var(--pure); border: 1px solid var(--edge); border-radius: var(--r-md); display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s; z-index: 40; }
.drop-menu a { min-height: 40px; display: flex; align-items: center; padding: 0 12px; border-radius: var(--r-sm); font-weight: 400; font-size: var(--fs-small); color: var(--light); white-space: nowrap; }
.drop-menu a::after { display: none; }
.drop-menu .drop-all { border-top: 1px solid var(--edge); border-radius: 0; margin-top: 8px; padding-top: 8px; color: var(--silver); }
.nav-drop:focus-within .drop-menu { opacity: 1; visibility: visible; transform: none; }
.site-header { background: var(--pure); border-bottom-color: var(--edge); }
.is-home-head { position: fixed; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; }
.is-home-head.is-stuck { background: var(--pure); border-bottom-color: var(--edge); }
.is-home-head .brand { display: block; opacity: 0; visibility: hidden; transition: opacity .3s; }
.is-home-head.is-stuck .brand { opacity: 1; visibility: visible; }
.is-home-head .main-nav { font-size: var(--fs-body); gap: 4px 28px; font-weight: 500; }
.is-home-head .main-nav a { color: var(--light); }
.stage { padding-top: 80px; }
@media (max-width: 1180px) { .head-phone { display: none; } }
@media (max-width: 1100px) { .head-social { display: none; } }
.main-nav { min-width: 0; }
@media (max-width: 960px) {
  .head-social, .head-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .main-nav { position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px clamp(16px, 3vw, 44px) 20px; background: var(--pure); border-bottom: 1px solid var(--edge); display: none; flex-basis: auto; order: 5; }
  .site-header.nav-open .main-nav { display: flex; }
  .site-header.is-stuck .main-nav { display: none; }
  .site-header.is-stuck.nav-open .main-nav { display: flex; }
  .main-nav > a, .nav-drop > a { min-height: 48px; border-bottom: 1px solid var(--edge); }
  .main-nav a::after { display: none; }
  .drop-menu { position: static; opacity: 1; visibility: visible; transform: none; border: 0; padding: 0 12px 8px; min-width: 0; background: transparent; }
  .nav-drop .chev { display: none; }
  .lang-pair { margin: 8px 0 0; }
  .is-home-head .brand { opacity: 1; visibility: visible; }
  .is-home-head .main-nav { font-size: var(--fs-body); }
  .brand { flex: 1; }
  .brand svg { height: 42px; }
}

/* ---------- footer ---------- */
.site-footer { text-align: start; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr 1.3fr; gap: 40px 48px; padding-block: 64px 44px; align-items: start; }
.f-col { display: flex; flex-direction: column; gap: 12px; }
.f-brand { align-items: flex-start; gap: 8px; }
.f-brand svg { height: 230px; width: auto; margin-bottom: 16px; }
.f-head { font-size: var(--fs-body); font-weight: 700; color: var(--white); margin-bottom: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--edge); }
.f-col > a { color: var(--silver); font-size: var(--fs-small); display: inline-flex; align-items: center; gap: 12px; min-height: 30px; transition: color .25s; }
.f-contact > a { font-size: var(--fs-body); color: var(--light); }
.f-contact .ic, .f-contact svg { width: 20px; height: 20px; flex: none; }
.f-contact .social { margin-top: 12px; gap: 8px; }
.f-contact .social a { width: 42px; height: 42px; }
.footer-bottom { display: block; text-align: center; padding-block: 24px 100px; border-top: 1px solid var(--edge); color: var(--gray); font-size: var(--fs-small); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .f-brand { grid-column: 1 / -1; align-items: center; text-align: center; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } .f-brand svg { height: 180px; } }

/* ---------- home: sections below the chat ---------- */
.home-more { position: relative; z-index: 1; border-top: 1px solid var(--edge); }
.home-more .section-title { margin-bottom: 16px; }
.home-more .section-lead + .section-lead { margin-top: 12px; }

/* ---------- client logos: dark / light versions ---------- */
.lg-l { display: none !important; }

/* ---------- light theme (system preference or toggle) ---------- */
:root[data-theme="light"] {--pure: #F8F8F2; --ink: #F3F3EA; --panel: #EEEEDE; --edge: #DDDECF; --charcoal: #C9CCBD; --steel: #90AA93; --gray: #556457; --silver: #464946; --line: #394C3D; --light: #202523; --soft: #1A1D1B; --white: #1A1D1B; --accent: #394C3D; --on-accent: #F8F8F2; --accent-hover: #202523; --logo-ink: #1B221A; --logo-acc: #394C3D; color-scheme: light;}
:root[data-theme="light"] .pattern { background-image: url("/assets/img/pattern-light.svg"); }
:root[data-theme="light"] .lg-d { display: none !important; }
:root[data-theme="light"] .lg-l { display: block !important; }
:root[data-theme="light"] .theme-toggle .ic-sun { display: none; }
:root[data-theme="light"] .theme-toggle .ic-moon { display: block; }
:root[data-theme="light"] .ask-fab { box-shadow: 0 6px 24px rgba(0,0,0,.15); }
:root[data-theme="light"] .drop-menu { box-shadow: 0 12px 32px rgba(0,0,0,.08); }
@media (prefers-color-scheme: light) {
:root:not([data-theme="dark"]) {--pure: #F8F8F2; --ink: #F3F3EA; --panel: #EEEEDE; --edge: #DDDECF; --charcoal: #C9CCBD; --steel: #90AA93; --gray: #556457; --silver: #464946; --line: #394C3D; --light: #202523; --soft: #1A1D1B; --white: #1A1D1B; --accent: #394C3D; --on-accent: #F8F8F2; --accent-hover: #202523; --logo-ink: #1B221A; --logo-acc: #394C3D; color-scheme: light;}
:root:not([data-theme="dark"]) .pattern { background-image: url("/assets/img/pattern-light.svg"); }
:root:not([data-theme="dark"]) .lg-d { display: none !important; }
:root:not([data-theme="dark"]) .lg-l { display: block !important; }
:root:not([data-theme="dark"]) .theme-toggle .ic-sun { display: none; }
:root:not([data-theme="dark"]) .theme-toggle .ic-moon { display: block; }
:root:not([data-theme="dark"]) .ask-fab { box-shadow: 0 6px 24px rgba(0,0,0,.15); }
:root:not([data-theme="dark"]) .drop-menu { box-shadow: 0 12px 32px rgba(0,0,0,.08); }
}
.theme-toggle .ic-moon { }
/* fixes */
.footer-grid > * { min-width: 0; }
@media (min-width: 961px) { .footer-grid { grid-template-columns: 1.7fr 1fr 1.5fr 1.3fr; } }
.f-brand { align-items: center; text-align: center; }
.f-brand .f-name-ar { font-size: var(--fs-sub); }
.lang-en .site-footer, .lang-en .f-col > a { font-family: "Inter", system-ui, sans-serif; }
.lang-en .f-head { font-family: "Inter", system-ui, sans-serif; font-weight: 600; }
.is-home-head:not(.is-stuck) .brand { display: none; }
@media (max-width: 960px) { .drop-menu { box-shadow: none !important; } .is-home-head:not(.is-stuck) .brand { display: block; } }

/* touch targets on phones and tablets */
@media (max-width: 1023px) {
  .f-col > a, .crumbs a, .svc-links a { min-height: 44px; display: inline-flex; align-items: center; }
  .svc-links { gap: 0 24px; }
}

/* home stage: grows with its content when the screen is short (nothing clipped), fixed height only while chatting */
.stage:not(.is-active) { height: auto; min-height: max(560px, 100dvh); overflow-y: visible; padding-bottom: 20px; }
@media (max-width: 380px) {
  .topic { padding: 8px 8px; gap: 8px; }
  .t-title { font-size: var(--fs-small); }
  .chat-input { padding-inline-start: 16px; }
}

/* privacy policy */
.policy { max-width: 860px; }
.policy-sec { padding: 28px 0; border-top: 1px solid var(--charcoal); }
.policy-sec h2 { font-size: var(--fs-lead); margin-bottom: 12px; }
.policy-sec p, .policy-sec li { font-size: var(--fs-body); color: var(--light); }
.policy-sec p + p { margin-top: 12px; }
.policy-sec ul { margin: 0 0 12px; padding-inline-start: 24px; display: flex; flex-direction: column; gap: 8px; }
.policy-basis { padding-top: 24px; border-top: 1px solid var(--charcoal); font-size: var(--fs-body); color: var(--gray); }
.policy-basis strong { color: var(--light); font-weight: 700; }
.chat-note a, .upload-hint a, .f-legal a { text-decoration: underline; text-underline-offset: 4px; }
.f-legal { margin-top: 8px; }
.f-legal a { color: var(--gray); }
.policy bdi { white-space: nowrap; }

/* footer contact: icons on the left in Arabic */

/* ---------- design foundations: rhythm, touch, press, hover ---------- */
.faq details p, .prose p, .prose ul, .prose ol, .policy-sec p, .policy-sec li, .section-lead { max-width: var(--measure); }
.section-title, .prose h2 { line-height: var(--lh-head); }
* { -webkit-tap-highlight-color: transparent; }
a, button, summary, [role="button"] { touch-action: manipulation; }
.arr { display: inline-block; width: 1em; height: 1em; vertical-align: -.15em; margin-inline-start: 4px; }
html[dir="rtl"] .arr { transform: scaleX(-1); }
/* instant press feedback (scale .97 in 100ms), released smoothly */
.btn, .opt, .topic, .chat-send, .ask-fab, .head-cta, .ct-btn, .chat-human, .chat-restart, .summary-send, .theme-toggle, .menu-btn, .social a, .drawer-close, .head-social a { transition-property: background, color, border-color, transform, opacity; transition-duration: .25s; transition-timing-function: var(--ease); }
.btn:active, .opt:active, .topic:active, .chat-send:active, .ask-fab:active, .head-cta:active, .ct-btn:active, .chat-human:active, .chat-restart:active, .summary-send:active, .theme-toggle:active, .menu-btn:active, .social a:active, .drawer-close:active, .head-social a:active { transform: scale(.97); transition-duration: .1s; }
/* hover effects only on devices that hover, so nothing stays lit after a tap */
@media (hover: hover) and (pointer: fine) {
  .main-nav a:hover { color: var(--white); }
  .main-nav a:hover::after { transform: scaleX(1); }
  .lang-switch:hover { color: var(--white); }
  .btn:hover { transform: translateY(-2px); }
  .btn-light:hover { background: var(--light); }
  .btn-line:hover { border-color: var(--silver); }
  .crumbs a:hover { color: var(--white); }
  .area-row:hover { background: var(--panel); }
  .area-row:hover .area-arrow { color: var(--white); transform: translateX(-4px); }
  .lang-en .area-row:hover .area-arrow { transform: translateX(4px); }
  .contact-rows a.ct-row:hover { background: var(--panel); }
  .ct-btn:hover { background: var(--panel); border-color: var(--silver); }
  .post-row:hover { background: var(--panel); }
  .footer-contact a:hover { color: var(--silver); }
  .social a:hover { border-color: var(--silver); transform: translateY(-2px); }
  .opt:hover { background: var(--white); color: var(--pure); transform: translateY(-2px); }
  .chat-send:hover { transform: translateY(-2px); background: var(--light); }
  .topic:hover { border-color: var(--gray); background: var(--edge); transform: translateY(-2px); }
  .chat-human:hover, .chat-restart:hover { background: var(--white); color: var(--pure); }
  .summary-send:hover { background: #202523; color: #F8F8F2; }
  .handoff-btn:hover { background: var(--light); color: var(--pure); }
  .ask-fab:hover { background: var(--light); transform: translateY(-2px); }
  .m-item:hover img { transform: scale(1.05); }
  .upload-pick:hover { background: var(--light); }
  .svc-links a:hover { border-color: var(--white); }
  .head-cta:hover { background: var(--light); transform: translateY(-1px); }
  .head-phone:hover { color: var(--white); }
  .head-social a:hover { color: var(--white); background: var(--panel); }
  .theme-toggle:hover { color: var(--white); border-color: var(--steel); }
  .drop-menu a:hover { background: var(--panel); color: var(--white); }
  .nav-drop:hover .drop-menu { opacity: 1; visibility: visible; transform: none; }
  .nav-drop:hover .chev { transform: rotate(180deg); }
  .f-col > a:hover { color: var(--white); }
  .f-legal a:hover { color: var(--white); }
}
@media (prefers-reduced-motion: reduce) {
  .btn:active, .opt:active, .topic:active, .chat-send:active, .ask-fab:active, .head-cta:active, .ct-btn:active, .chat-human:active, .chat-restart:active, .summary-send:active, .theme-toggle:active, .menu-btn:active, .social a:active, .drawer-close:active, .head-social a:active { transform: none; opacity: .75; }
  .btn:hover, .topic:hover, .opt:hover, .social a:hover, .ask-fab:hover, .head-cta:hover, .chat-send:hover { transform: none; }
}
@media (hover: hover) and (pointer: fine) { .upload-go:disabled:hover { transform: none; } }


/* ---------- loading screen: type scale, 8 grid, one-line names, tap to skip ---------- */
.loader .ld-ar { font-family: "Cairo", sans-serif; font-weight: 700; font-size: var(--fs-lead); line-height: var(--lh-head); opacity: 0; animation: rise .8s 1.8s var(--ease) forwards; }
.loader .ld-en { font-family: "Inter", sans-serif; font-size: var(--fs-small); letter-spacing: .2em; white-space: nowrap; color: var(--silver); opacity: 0; animation: rise .8s 2.2s var(--ease) forwards; }
.loader.is-skip { animation: none; opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility 0s .3s; }
body.intro-done .rise { animation-delay: var(--i, 0s) !important; }
@media (max-width: 380px) { .loader .ld-en { letter-spacing: .1em; } .f-name-en { letter-spacing: .04em; } }

/* ---------- home stage rhythm (8 grid: close inside a group, wider between groups) ---------- */
.stage { gap: 0; }
.stage-head { gap: 24px; }
.stage-logo { height: clamp(160px, 34vh, 340px); }
.stage-title { margin-top: 0; }
.stage .chat { margin-top: 16px; gap: 12px; }
.stage .chat-foot { margin-top: 4px; }
.stage:not(.is-active) { justify-content: center; }
.home-clients { gap: 16px; margin-top: 40px; padding-top: 0; }
.chat-actions:not(:has(> :not([hidden]))) { display: none; }
.stage.is-active .chat { margin-top: 8px; }

/* ---------- client logos: optically balanced (each logo's --h is set from its shape and ink weight) ---------- */
.m-item { height: auto; min-height: 88px; padding: 0 40px; gap: 8px; }
.m-item img, .home-clients .m-item img { height: var(--h, 48px); max-width: 240px; }
.home-clients .m-item { min-height: 96px; padding: 0 40px; }
.m-label, .home-clients .m-label { font-size: var(--fs-small); max-width: 200px; }
@media (max-width: 720px) {
  .stage-logo { height: clamp(140px, 24vh, 220px); }
  .m-item, .home-clients .m-item { min-height: 80px; padding: 0 24px; }
  .m-item img, .home-clients .m-item img { height: calc(var(--h, 48px) * .8); max-width: 200px; }
}
.ld-skip { position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); inset-inline: 0; margin-inline: auto; width: max-content; min-height: 40px; padding: 0 16px; border: 0; background: transparent; color: var(--gray); font: inherit; font-size: var(--fs-small); cursor: pointer; }


/* ---------- Ghanim identity layer ---------- */
.lg-ink { fill: var(--logo-ink); }
.lg-acc { fill: var(--logo-acc); }
.brand, .stage-logo, .stage-logo-h, .drawer-logo-h, .ld-mark, .veil-mark, .f-logo { line-height: 0; }
.brand svg { display: block; width: auto; }
.stage-logo svg, .stage-logo-h svg, .drawer-logo-h svg, .ld-mark svg, .veil-mark svg, .f-logo svg { display: block; height: 100%; width: auto; }
.veil-mark { height: 64px; }
.stage-logo { display: block; }
.stage-logo-h { height: clamp(64px, 11vh, 88px); }
.drawer-logo-h { display: block; height: 52px; }
.chat-drawer:has(.chat.is-active) .drawer-head .drawer-logo-h { height: 44px; }
.veil svg { height: 64px; width: auto; }
/* pattern: brand pattern fixed at -30deg, top corner, slow breathing */
.pattern { position: absolute; top: 0; inset-inline-end: auto; left: 0; width: min(52vw, 720px); height: min(64vh, 560px); background: url("/assets/img/pattern-dark.svg") 0 0 / 1600px 1000px no-repeat; }
/* loader: brand cover, mark then names */
.loader .ld-mark { height: clamp(120px, 22vh, 190px); width: auto; margin-bottom: 16px; }
.loader .ld-ar { font-weight: 700; }
/* footer: pattern band (brand: most used at the footer of a layout) */
.site-footer { position: relative; }
.site-footer::before { content: ""; display: block; height: 56px; background: var(--accent) url("/assets/img/pattern-green.svg") 0 0 / 1600px 1000px repeat-x; border-bottom: 1px solid var(--edge); }
.f-logo { display: block; height: 150px; margin-bottom: 16px; }
.f-address { color: var(--silver); font-size: var(--fs-small); }
@media (max-width: 560px) { .f-logo { height: 120px; } }
/* English headings: Familjen Grotesk (brand primary typeface) */
.lang-en h1, .lang-en h2, .lang-en h3, .lang-en .section-title, .lang-en .stage-title { font-family: "Familjen Grotesk", "Inter", system-ui, sans-serif; font-weight: 600; letter-spacing: -0.01em; }
/* numbers row */
.stats { display: flex; flex-wrap: wrap; gap: 32px 64px; margin-top: 32px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-n { font-family: "Inter", sans-serif; font-weight: 600; font-size: clamp(36px, 28px + 2vw, 56px); line-height: 1.1; color: var(--white); font-variant-numeric: tabular-nums; }
.lang-en .stat-n { font-family: "Familjen Grotesk", "Inter", sans-serif; }
.stat-l { color: var(--silver); }
.steps-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 48px; margin: 32px 0 0; padding: 0; list-style: none; counter-reset: st; }
.steps-list li { border-top: 1px solid var(--charcoal); padding-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps-list h3 { font-size: var(--fs-sub); }
.steps-list p { color: var(--silver); }
.packages { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; padding: clamp(24px, 4vw, 48px); border-radius: var(--r-lg); background: var(--accent) url("/assets/img/pattern-green.svg") 0 0 / 1600px 1000px; color: var(--on-accent); }
.packages h2 { font-size: var(--fs-section); }
.packages p { max-width: var(--measure); margin-top: 12px; color: var(--on-accent); opacity: .9; }
.packages .btn { background: var(--on-accent); color: #1A1D1B; }
@media (hover: hover) { .packages .btn:hover { background: #FFFFFF; transform: translateY(-2px); } .btn-light:hover { background: var(--accent-hover); } }
.stage-logo { height: clamp(150px, 30vh, 290px); }
@media (max-width: 640px) { .stage-logo { height: clamp(130px, 24vh, 200px); } }
/* loader = brand cover: green field, pattern frame, cream mark (same in both themes) */
.loader { background: #394C3D url("/assets/img/pattern-green.svg") center / 1600px 1000px; color: #EEEEDE; --logo-ink: #EEEEDE; --logo-acc: #90AA93; }
.loader::before { content: ""; position: absolute; inset: clamp(40px, 9vmin, 96px); background: #394C3D; border: 1px solid rgba(238, 238, 222, .28); border-radius: 4px; }
.loader > * { position: relative; }
.loader .ld-en { color: #B8BDAE; }
.loader .ld-skip { color: #B8BDAE; position: absolute; bottom: max(8px, env(safe-area-inset-bottom)); }
.veil { background: #394C3D; --logo-ink: #EEEEDE; --logo-acc: #90AA93; }
@media (max-width: 960px) { .is-home-head:not(.is-stuck) .brand { display: none; } }
.summary-card { border: 1px solid var(--edge); }

/* round 2 */
.stage-logo { height: clamp(120px, 22vh, 210px); }
@media (max-width: 640px) { .stage-logo { height: clamp(110px, 18vh, 160px); } }
.f-brand .f-name-ar { font-size: var(--fs-body); white-space: nowrap; }
.f-contact .social { justify-content: flex-start; }
.f-contact > a span { unicode-bidi: plaintext; }
.f-brand .f-muted { white-space: nowrap; }

/* ---------- spacing rhythm (one system, 8-point grid) ----------
   title -> its content 32 | title -> lead 16 | lead -> content 32 | lead -> lead 16 */
.section-title, .home-more .section-title { margin-bottom: 32px; }
.section-title:has(+ .section-lead), .home-more .section-title:has(+ .section-lead) { margin-bottom: 16px; }
.section-lead, .home-more .section-lead { margin: 0 0 32px; }
.section-lead + .section-lead, .home-more .section-lead + .section-lead { margin-top: -16px; }
.section-lead:last-child { margin-bottom: 0; }
.steps-list, .stats { margin-top: 0; }
.packages p { margin-top: 16px; }
.page-head { gap: 24px; padding-block: 64px 48px; }
.page-head .lead { margin-top: 0; }
.page-head .lead + .lead { margin-top: -8px; }
.page-head .actions { margin-top: 8px; }
.policy-sec { padding: 32px 0; }
.policy-sec h2 { margin-bottom: 16px; }
.policy-sec p + p { margin-top: 16px; }
.empty { padding: 32px; gap: 24px; }
.cta { padding: 32px; gap: 24px; }
.contact-meta { margin-top: 32px; }
.contact-meta + .contact-meta { margin-top: 8px; }
.faq details p { margin-top: 16px; }
.points h3, .panel h3 { margin-bottom: 8px; }
.panel h3 { margin-bottom: 16px; }
.crumbs { padding-top: 32px; gap: 8px; }
.theme-toggle, .menu-btn { width: 44px; height: 44px; padding: 0; }
.chat-send { padding: 0; }
.f-brand { gap: 8px; }
.f-logo { margin-bottom: 16px; }
.footer-grid { padding-block: 64px 48px; gap: 40px 48px; }
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .page-head { padding-block: 40px 32px; }
  .panel > div, .cta, .empty { padding: 24px; }
}
.crumbs { align-items: center; }
.crumbs > * { display: inline-flex; align-items: center; min-height: 44px; }
.page-head .lead[dir="ltr"] { text-align: start; }
html[dir="rtl"] .page-head .lead[dir="ltr"] { text-align: right; }
