/* ==========================================================================
   Site menu — the overlay the burger opens
   Markup: build_fa.py site_menu(); motion and keys: the Menu part of assets/js/fa.js.
   Layers, back to front: a veil that dims the page, a sheet of light and the navy panel. Opening, the
   sheet and then the panel slide in from the burger's side. The panel's inside slides the other way at
   the same pace, so it holds still while the panel's edge (a line of light) moves across and reveals it.
   Then the cards and the page links rise in, following the edge. Closing is quick: the content fades
   and the layers slide back to the burger. Reduced motion: a plain fade.
   ========================================================================== */

.menu {
  --ice: #a9c1f5;                            /* the brand blue lifted so it reads as light on the navy */
  --menu-dim: rgba(226, 231, 234, 0.68);
  --menu-line: rgba(226, 231, 234, 0.13);
  --menu-back: cubic-bezier(0.45, 0, 0.2, 1); /* closing: moves at once, settles softly */
  position: fixed; inset: 0; z-index: 590; color: var(--mist);
  visibility: hidden; pointer-events: none;
  transition: visibility 0s linear 0.6s;
}
.menu-open .menu { visibility: visible; pointer-events: auto; transition: none; }

/* the page under it holds still (Lenis is stopped too); a page with a classic scroll bar keeps the
   bar's room, so the header does not shift as the bar goes */
html.menu-open { overflow: hidden; }
html.menu-open.menu-gutter { scrollbar-gutter: stable; }

/* the header over the open menu: the brand and the burger stay; the page links and EN step aside (the
   menu has both); a header hidden by scrolling comes back so the burger can close the menu */
.site-header .nav { transition: background 0.4s, border-color 0.4s, opacity 0.35s, visibility 0s; }
.site-header .lang { transition: opacity 0.25s, background 0.25s, visibility 0s; }
.menu-open .site-header .nav, .menu-open .site-header .lang { opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s linear 0.2s; }

/* ---------- Layers ---------- */
.menu__veil { position: absolute; inset: 0; background: radial-gradient(130% 100% at 0% 0%, rgba(5, 16, 44, 0.42), rgba(5, 16, 44, 0.8)); opacity: 0; transition: opacity 0.5s var(--ease); }
.menu-open .menu__veil { opacity: 1; transition: opacity 0.7s var(--ease); }

/* the sheet runs just ahead of the panel: only its leading strip is ever seen, so its light is measured
   from that edge (feathered at the very front, brightest a little behind it) */
.menu__sheet {
  position: absolute; inset: 0; transform: translateX(-101%); transition: transform 0.46s var(--menu-back);
  background: linear-gradient(270deg, rgba(170, 198, 250, 0) 0, rgba(170, 198, 250, 0.4) 90px, rgba(126, 160, 228, 0.26) 260px, rgba(78, 114, 184, 0.16) 520px, rgba(78, 114, 184, 0.1));
}
/* The menu comes in from the burger's side: the left on Persian pages, the right on English ones (these
   mirrors stand before the rules of the open menu, which win over them) */
[dir="ltr"] .menu__sheet { transform: translateX(101%);
  background: linear-gradient(90deg, rgba(170, 198, 250, 0) 0, rgba(170, 198, 250, 0.4) 90px, rgba(126, 160, 228, 0.26) 260px, rgba(78, 114, 184, 0.16) 520px, rgba(78, 114, 184, 0.1)); }
.menu-open .menu__sheet { transform: none; transition: transform 0.8s var(--ease-io); }

.menu__panel, .menu__in { position: absolute; inset: 0; transition: transform 0.46s var(--menu-back); }
.menu__panel { overflow: hidden; transform: translateX(-101%); }
.menu__in {
  transform: translateX(101%);
  background:
    radial-gradient(70% 62% at 4% 0%, rgba(78, 114, 184, 0.42), transparent 70%),
    radial-gradient(58% 55% at 100% 100%, rgba(78, 114, 184, 0.2), transparent 72%),
    linear-gradient(180deg, #0c2d72, #082159);
}
[dir="ltr"] .menu__panel { transform: translateX(101%); }
[dir="ltr"] .menu__in {
  transform: translateX(-101%);
  background:
    radial-gradient(70% 62% at 96% 0%, rgba(78, 114, 184, 0.42), transparent 70%),
    radial-gradient(58% 55% at 0% 100%, rgba(78, 114, 184, 0.2), transparent 72%),
    linear-gradient(180deg, #0c2d72, #082159);
}
.menu-open .menu__panel, .menu-open .menu__in { transform: none; transition: transform 0.82s var(--ease-io) 0.06s; }

/* the panel's leading edge: a line of light, and a glow just inside it that the content is revealed
   through; both fade once the panel has arrived */
.menu__panel::before, .menu__panel::after { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 0; z-index: 3; pointer-events: none; opacity: 0; }
.menu__panel::before { width: min(34vw, 460px); background: linear-gradient(270deg, rgba(150, 182, 240, 0.32), rgba(150, 182, 240, 0.1) 40%, rgba(150, 182, 240, 0)); }
[dir="ltr"] .menu__panel::before { background: linear-gradient(90deg, rgba(150, 182, 240, 0.32), rgba(150, 182, 240, 0.1) 40%, rgba(150, 182, 240, 0)); }
.menu__panel::after {
  width: 2px;
  background: linear-gradient(180deg, rgba(214, 228, 255, 0), rgba(214, 228, 255, 0.95) 24%, #fff 50%, rgba(214, 228, 255, 0.95) 76%, rgba(214, 228, 255, 0));
  box-shadow: 0 0 16px 3px rgba(150, 182, 240, 0.7), 0 0 80px 26px rgba(78, 114, 184, 0.42);
}
.menu-open .menu__panel::before, .menu-open .menu__panel::after { animation: menu-edge 0.88s linear both; }
@keyframes menu-edge { 0%, 7% { opacity: 0; } 18% { opacity: 1; } 64% { opacity: 0.85; } 100% { opacity: 0; } }

/* a soft dust of light (drawn by fa.js while the menu is open) */
.menu__dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.menu-open .menu__dust { opacity: 1; transition: opacity 1.4s ease 0.3s; }

/* ---------- Layout ---------- */
/* the menu's own scroll (when it is taller than the window) starts under the header bar, and what scrolls
   up fades out at that edge instead of running under the logo and the burger */
.menu__scroll {
  position: absolute; inset: var(--header-h) 0 0; display: flex; flex-direction: column;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(226, 231, 234, 0.25) transparent;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 16px); mask-image: linear-gradient(180deg, transparent, #000 16px);
  padding: clamp(6px, 1.6vh, 18px) var(--gutter) clamp(16px, 3.2vh, 34px);
  opacity: 0; transition: opacity 0.18s;
}
.menu-open .menu__scroll { opacity: 1; transition: none; }
.menu__grid {
  flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  column-gap: clamp(36px, 6vw, 120px); align-content: center; align-items: start;
  padding-block: clamp(4px, 1.4vh, 22px) clamp(14px, 2.8vh, 34px);
}
.menu__main, .menu__biz { min-width: 0; }
.menu__biz { width: 100%; max-width: 920px; justify-self: end; }

.menu__label { display: flex; align-items: center; gap: 12px; margin: 0 0 clamp(4px, 1.1vh, 14px); font-size: 14.5px; font-weight: 500; line-height: 1.6; color: var(--ice); opacity: 0; transition: opacity 0.15s; }
.menu__label::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: currentColor; }
.menu-open .menu__label { opacity: 1; transition: opacity 0.8s var(--ease) 0.3s; }
[dir="ltr"] .menu__label::before { transform: scaleX(-1); }

.menu :focus-visible { outline: 2px solid rgba(226, 231, 234, 0.9); outline-offset: 4px; border-radius: 10px; }

/* ---------- Pages: numbered, large; the one you are on is marked ----------
   Hover (or keyboard focus): the name steps forward, a light passes over its letters, a line draws
   under it and a few words say what the page holds. */
/* a band of soft light rests behind the page you are on and glides to the one pointed at, like the pill of
   the header's links (fa.js sets --lit-y and --lit-h, the top and height of that row) */
.menu__pages ul { position: relative; }
.menu__pages ul::before {
  content: ""; position: absolute; top: 0; inset-inline-start: -18px; inset-inline-end: 0; z-index: -1; height: var(--lit-h, 80px); border-radius: 20px; pointer-events: none;
  background: linear-gradient(270deg, rgba(126, 160, 228, 0.22), rgba(126, 160, 228, 0.08) 42%, rgba(126, 160, 228, 0) 82%);
  box-shadow: inset -2px 0 0 rgba(169, 193, 245, 0.75);
  opacity: 0; transform: translateY(var(--lit-y, 0px)); transition: opacity 0.5s, transform 0.7s var(--ease), height 0.7s var(--ease);
}
[dir="ltr"] .menu__pages ul::before { background: linear-gradient(90deg, rgba(126, 160, 228, 0.22), rgba(126, 160, 228, 0.08) 42%, rgba(126, 160, 228, 0) 82%); box-shadow: inset 2px 0 0 rgba(169, 193, 245, 0.75); }
.menu-open .menu__pages ul.is-lit::before { opacity: 1; transition: opacity 0.9s var(--ease) 0.5s, transform 0.7s var(--ease), height 0.7s var(--ease); }
.menu-open .menu__pages ul.is-lit.is-moved::before { transition: opacity 0.4s, transform 0.7s var(--ease), height 0.7s var(--ease); }
.menu__pages ul.no-glide::before { transition: none !important; }
.menu__pages li:nth-child(1) { --d: 0.36s; }
.menu__pages li:nth-child(2) { --d: 0.42s; }
.menu__pages li:nth-child(3) { --d: 0.48s; }
.menu__pages li:nth-child(4) { --d: 0.54s; }
.menu__pages li:nth-child(5) { --d: 0.6s; }
.mlink {
  --ink: var(--mist); --fs: clamp(30px, min(4.3vw, 7.1vh), 96px);
  position: relative; display: grid; grid-template-columns: 2.8em auto minmax(0, 1fr) auto; align-items: center;
  column-gap: clamp(10px, 1.3vw, 22px); padding: clamp(0px, 0.4vh, 6px) 0;
}
.mlink::after {
  content: ""; position: absolute; right: 0; left: 0; bottom: 0; height: 1px; pointer-events: none;
  background: linear-gradient(270deg, rgba(226, 231, 234, 0.55), rgba(226, 231, 234, 0.1) 70%, rgba(226, 231, 234, 0));
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform 0.7s var(--ease);
}
[dir="ltr"] .mlink::after { background: linear-gradient(90deg, rgba(226, 231, 234, 0.55), rgba(226, 231, 234, 0.1) 70%, rgba(226, 231, 234, 0)); transform-origin: 0 50%; }
.mlink:focus-visible { outline: 1.5px solid rgba(226, 231, 234, 0.55); outline-offset: 4px; border-radius: 14px; }
.menu__pages:focus { outline: none; } /* where the focus lands when the menu is opened with a pointer */
.mlink__num { display: inline-flex; align-items: center; gap: 9px; justify-self: start; font-size: 15px; font-weight: 500; line-height: 1; color: var(--ice); opacity: 0; transition: opacity 0.15s; }
.menu-open .mlink__num { opacity: 0.9; transition: opacity 0.8s var(--ease) var(--d); }
.mlink__title { display: block; overflow: hidden; padding: 0.04em 0.12em 0.2em; margin: -0.04em -0.12em -0.2em; font-size: var(--fs); font-weight: 700; line-height: 1.24; white-space: nowrap; transition: transform 0.6s var(--ease); }
.mlink__title > span {
  display: inline-block;
  background: linear-gradient(90deg, var(--ink) 0 43%, #a3bdf5 47%, #fff 50%, #a3bdf5 53%, var(--ink) 57% 100%) 0 0 / 300% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  transform: translateY(115%); transition: transform 0.2s;
}
.menu-open .mlink__title > span { transform: none; transition: transform 1s var(--ease) var(--d); }
/* the few words about the page: beside its name, in at most two balanced lines */
.mlink__note {
  justify-self: start; max-width: 100%; margin-inline-start: 6px; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  font-size: clamp(13.5px, 1vw, 15.5px); line-height: 1.6; color: var(--menu-dim); text-wrap: balance;
  opacity: 0; transform: translateX(14px); transition: opacity 0.25s, transform 0.5s var(--ease);
}
.mlink__go { display: grid; place-items: center; width: clamp(38px, 3.2vw, 48px); height: clamp(38px, 3.2vw, 48px); border-radius: 50%; border: 1px solid var(--line-2); opacity: 0; transform: translateX(16px) scale(0.85); transition: opacity 0.3s, transform 0.5s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s; }
.mlink__go svg { width: 18px; height: 18px; }
.mlink:hover .mlink__title, .mlink:focus-visible .mlink__title { transform: translateX(-12px); }
/* English: the name steps forward to the right, the note and the arrow wait to its left, the arrow points right
   (before the hover rules below, which win over the waiting places) */
[dir="ltr"] .mlink:hover .mlink__title, [dir="ltr"] .mlink:focus-visible .mlink__title { transform: translateX(12px); }
[dir="ltr"] .mlink__note { transform: translateX(-14px); }
[dir="ltr"] .mlink__go { transform: translateX(-16px) scale(0.85); }
[dir="ltr"] .mlink__go svg { transform: scaleX(-1); }
.mlink:hover .mlink__title > span, .mlink:focus-visible .mlink__title > span { animation: menu-sweep 1s cubic-bezier(0.45, 0, 0.3, 1) both; }
.mlink:hover::after, .mlink:focus-visible::after { transform: scaleX(1); }
.mlink:hover .mlink__note, .mlink:focus-visible .mlink__note { opacity: 1; transform: none; transition-delay: 0.05s; }
.mlink:hover .mlink__go, .mlink:focus-visible .mlink__go { opacity: 1; transform: none; background: var(--mist); color: var(--navy); border-color: var(--mist); }
@keyframes menu-sweep { from { background-position: 0% 0; } to { background-position: 100% 0; } }
/* the light passes over the letters the way they read: left to right on English pages */
@keyframes menu-sweep-ltr { from { background-position: 100% 0; } to { background-position: 0% 0; } }
[dir="ltr"] .mlink:hover .mlink__title > span, [dir="ltr"] .mlink:focus-visible .mlink__title > span { animation-name: menu-sweep-ltr; }

/* you are here: a glowing dot, the name in light blue and a tag; «راهکارها» keeps a ring while you are
   on one of the businesses */
.mlink[aria-current="page"] { --ink: var(--ice); }
.mlink[aria-current="page"] .mlink__num::before, .mlink.is-parent .mlink__num::before { content: ""; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; }
.mlink[aria-current="page"] .mlink__num::before { background: #dce7ff; box-shadow: 0 0 0 4px rgba(169, 193, 245, 0.16), 0 0 14px 3px rgba(150, 182, 240, 0.6); }
.mlink.is-parent .mlink__num::before { border: 1.5px solid var(--ice); }
.mlink[aria-current="page"] .mlink__go { visibility: hidden; }
.mlink__here { justify-self: start; display: inline-flex; align-items: center; height: 28px; padding: 0 13px; border-radius: 99px; border: 1px solid rgba(169, 193, 245, 0.45); background: rgba(169, 193, 245, 0.1); color: var(--ice); font-size: 13px; font-weight: 500; white-space: nowrap; opacity: 0; transition: opacity 0.15s; }
.menu-open .mlink__here { opacity: 1; transition: opacity 0.8s var(--ease) calc(var(--d) + 0.25s); }

.menu .menu__cta { margin-top: clamp(14px, 3.2vh, 36px); height: clamp(48px, 6.4vh, 56px); opacity: 0; transform: translateY(14px); transition: opacity 0.15s, transform 0s 0.15s, color 0.45s var(--ease), box-shadow 0.4s; }
.menu-open .menu .menu__cta { opacity: 1; transform: none; transition: opacity 0.8s var(--ease) 0.68s, transform 0.9s var(--ease) 0.68s, color 0.45s var(--ease), box-shadow 0.4s; }

/* ---------- The businesses: cards; hover wakes the emblem and shows the business's drawing ---------- */
.menu__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 18px); }
.menu__cards > li { display: flex; min-width: 0; opacity: 0; transform: translateY(18px); transition: opacity 0.15s, transform 0s 0.15s; }
.menu-open .menu__cards > li { opacity: 1; transform: none; transition: opacity 0.8s var(--ease) var(--d), transform 1s var(--ease) var(--d); }
.menu__cards > li:nth-child(1) { --d: 0.26s; }
.menu__cards > li:nth-child(2) { --d: 0.32s; }
.menu__cards > li:nth-child(3) { --d: 0.38s; }
.menu__cards > li:nth-child(4) { --d: 0.44s; }
.mcard {
  position: relative; flex: 1; min-width: 0; display: grid; isolation: isolate; overflow: hidden;
  grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(6px, 1fr) auto auto;
  grid-template-areas: "viz . corner" ". . ." "head head head" "sub sub sub";
  min-height: clamp(148px, 22vh, 250px); padding: clamp(14px, 1.4vw, 24px); border-radius: 22px;
  border: 1px solid var(--menu-line); background: linear-gradient(160deg, #15398a, #0d2b6d 72%);
  box-shadow: 0 30px 60px -42px rgba(2, 8, 26, 0.95);
  transition: transform 0.55s var(--ease), border-color 0.4s, box-shadow 0.55s var(--ease);
}
.mcard:focus-visible { outline-offset: 3px; border-radius: 22px; }
.mcard:hover, .mcard:focus-visible { transform: translateY(-4px); border-color: rgba(169, 193, 245, 0.42); box-shadow: 0 36px 70px -36px rgba(2, 8, 26, 0.95); }
/* the drawing: light lines on the dark card (shown on hover); a shade keeps the words below it legible */
.mcard__art {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; background: center 36% / cover no-repeat;
  filter: grayscale(1) invert(1) contrast(1.6) brightness(0.9); mix-blend-mode: screen;
  opacity: 0; transform: scale(1.14); transition: opacity 0.7s var(--ease), transform 2.6s var(--ease);
}
.mcard::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(0deg, #0d2b6d 16%, rgba(13, 43, 109, 0.42) 56%, rgba(13, 43, 109, 0.04)); }
.mcard:hover .mcard__art, .mcard:focus-visible .mcard__art { opacity: 0.5; transform: scale(1.02); }
.mcard__viz { grid-area: viz; display: grid; place-items: center; width: clamp(40px, 3.4vw, 52px); height: clamp(40px, 3.4vw, 52px); border-radius: 15px; background: rgba(78, 114, 184, 0.3); color: var(--mist); transition: background-color 0.4s, color 0.4s; }
.mcard__viz svg { width: 64%; height: 64%; overflow: visible; }
.mcard:hover .mcard__viz, .mcard:focus-visible .mcard__viz { background: var(--mist); color: var(--navy); }
.mcard__go { grid-area: corner; align-self: start; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); opacity: 0.55; transition: opacity 0.3s, transform 0.5s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s; }
.mcard__go svg { width: 16px; height: 16px; }
.mcard:hover .mcard__go, .mcard:focus-visible .mcard__go { opacity: 1; transform: translate(-3px, -3px); background: var(--mist); color: var(--navy); border-color: var(--mist); }
/* the arrow up and forward: up and to the right on English pages */
[dir="ltr"] .mcard__go svg { transform: scaleX(-1); }
[dir="ltr"] .mcard:hover .mcard__go, [dir="ltr"] .mcard:focus-visible .mcard__go { transform: translate(3px, -3px); }
.mcard__here { grid-area: corner; align-self: start; display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 99px; border: 1px solid rgba(169, 193, 245, 0.45); background: rgba(169, 193, 245, 0.1); color: var(--ice); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.mcard[aria-current="page"] { border-color: rgba(169, 193, 245, 0.5); }
.mcard__head { grid-area: head; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 8px; }
.mcard__head b { font-size: clamp(21px, 1.9vw, 34px); line-height: 1.35; color: var(--white); }
.mcard__key { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; border: 1px solid rgba(169, 193, 245, 0.3); font-size: 12.5px; font-weight: 500; color: var(--ice); white-space: nowrap; }
/* a one-line tagline that wraps (like the subs elsewhere on the site, not justified: two short lines would
   open wide gaps); its lines are balanced */
.mcard__sub { grid-area: sub; margin-top: 4px; font-size: clamp(13px, 0.95vw, 16px); line-height: 1.8; color: var(--menu-dim); text-wrap: balance; }
/* the emblems move only while their card is pointed at (and their one dotted ring is drawn whole) */
.mcard__viz .orbit, .mcard__viz .spin { transform-origin: 24px 24px; animation: menu-spin 7s linear infinite paused; }
.mcard__viz .led { animation: menu-led 1.6s steps(2) infinite paused; }
.mcard__viz .led:nth-of-type(2n) { animation-delay: 0.4s; }
.mcard__viz .led:nth-of-type(3n) { animation-delay: 0.9s; }
.mcard__viz .wave { stroke-dasharray: 60; animation: menu-wave 2.6s linear infinite paused; }
.mcard__viz circle[stroke-dasharray] { stroke-dasharray: none; opacity: 0.3; }
.mcard:hover .mcard__viz *, .mcard:focus-visible .mcard__viz * { animation-play-state: running; }
@keyframes menu-spin { to { transform: rotate(360deg); } }
@keyframes menu-led { 50% { opacity: 0.2; } }
@keyframes menu-wave { to { stroke-dashoffset: -120; } }

/* ---------- Foot: quick ways to reach Karun, and the language ---------- */
.menu__foot { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 30px; padding-top: clamp(12px, 2.2vh, 22px); }
.menu__foot::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 1px; background: linear-gradient(90deg, rgba(226, 231, 234, 0), rgba(226, 231, 234, 0.12) 30%, rgba(226, 231, 234, 0.24)); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.2s; }
.menu-open .menu__foot::before { transform: none; transition: transform 1.2s var(--ease) 0.45s; }
[dir="ltr"] .menu__foot::before { background: linear-gradient(270deg, rgba(226, 231, 234, 0), rgba(226, 231, 234, 0.12) 30%, rgba(226, 231, 234, 0.24)); transform-origin: 100% 50%; }
.menu__quick, .menu__lang { opacity: 0; transform: translateY(10px); transition: opacity 0.15s, transform 0s 0.15s; }
.menu-open .menu__quick, .menu-open .menu__lang { opacity: 1; transform: none; transition: opacity 0.8s var(--ease) 0.7s, transform 0.9s var(--ease) 0.7s; }
.menu__quick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px clamp(18px, 2.4vw, 40px); }
.menu__quick > li { display: flex; align-items: center; gap: 12px; }
.mq { display: inline-flex; align-items: center; gap: 12px; border-radius: 99px; }
.mq__ico { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.mq__ico svg { width: 18px; height: 18px; }
.mq__t { display: grid; justify-items: start; line-height: 1.45; }
.mq__t small { font-size: 12.5px; color: var(--menu-dim); }
.mq__t > span { font-size: 15px; font-weight: 500; }
.mq:hover .mq__ico, .mq:focus-visible .mq__ico { background: var(--mist); color: var(--navy); border-color: var(--mist); }
.mq-copy { min-width: 64px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 500; line-height: 1; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.mq-copy:hover { background: rgba(226, 231, 234, 0.1); }
.mq-copy.is-done { background: var(--blue); border-color: var(--blue); color: var(--white); }
.menu__lang { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 99px; border: 1px solid var(--menu-line); background: rgba(226, 231, 234, 0.04); }
.menu__lang > * { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 99px; font-size: 14.5px; font-weight: 500; line-height: 1; }
.menu__lang > [aria-current] { background: var(--blue); color: var(--white); }
.menu__lang a { font-family: "Inter", system-ui, sans-serif; font-size: 13.5px; letter-spacing: 0.02em; opacity: 0.8; transition: opacity 0.25s, background-color 0.25s; }
.menu__lang a:hover { opacity: 1; background: rgba(226, 231, 234, 0.1); }
.menu__say { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* a page that is closing under the page curtain, or coming back from the history: no transitions */
.menu-snap .menu, .menu-snap .menu *, .menu-snap .menu *::before, .menu-snap .menu *::after,
.menu-snap .site-header, .menu-snap .site-header * { transition: none !important; animation: none !important; }

/* narrower desktops: the arrow gives its room to the words about the page */
@media (min-width: 900.02px) and (max-width: 1279px) {
  .mlink { grid-template-columns: 2.8em auto minmax(0, 1fr); }
  .mlink__go { display: none; }
}

/* ---------- Phones and small tablets: one column that scrolls ---------- */
@media (max-width: 900px) {
  .menu__scroll { padding: 8px var(--gutter) 26px; }
  .menu__grid { grid-template-columns: minmax(0, 1fr); row-gap: 28px; align-content: start; padding-block: 4px 24px; }
  .menu__biz { max-width: none; }
  .mlink { --fs: clamp(26px, min(8.4vw, 9.6vh), 42px); grid-template-columns: 2.4em auto minmax(0, 1fr); padding: 3px 0; }
  .mlink__note, .mlink__go { display: none; }
  .menu .menu__cta { margin-top: 22px; }
  /* one card per row on a phone, two side by side when there is room (tablets, phones held sideways) */
  .menu__cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px; }
  .mcard {
    grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto;
    grid-template-areas: "viz head corner" "viz sub corner";
    column-gap: 14px; min-height: 0; padding: 12px 14px; border-radius: 18px;
  }
  .mcard__viz { align-self: center; width: 46px; height: 46px; border-radius: 14px; }
  .mcard__head { margin: 0; }
  .mcard__head b { font-size: 19px; }
  .mcard__sub { margin: 0; font-size: 13px; line-height: 1.75; }
  .mcard__go, .mcard__here { align-self: center; }
  .mcard__art { display: none; }
  .menu__foot { flex-direction: column; align-items: stretch; gap: 18px; }
  .menu__quick { gap: 12px 30px; }
  .menu__lang { align-self: start; }
}
@media (max-width: 560px) {
  .menu .menu__cta { width: 100%; justify-content: center; }
  .menu__quick { flex-direction: column; align-items: stretch; gap: 10px; }
  .menu__quick > li { justify-content: space-between; }
}

/* ---------- Reduced motion: the menu fades in and out; nothing slides ---------- */
@media (prefers-reduced-motion: reduce) {
  .menu { opacity: 0; transition: opacity 0.25s linear, visibility 0s linear 0.25s !important; }
  .menu-open .menu { opacity: 1; transition: opacity 0.25s linear !important; }
  .menu__sheet, .menu__panel::before, .menu__panel::after { display: none; }
  .menu__panel, .menu__in, .mlink__title > span, .menu__cards > li, .menu .menu__cta, .menu__quick, .menu__lang, .menu__foot::before { transform: none !important; }
  .menu__veil, .menu__dust, .menu__scroll, .menu__label, .mlink__here, .menu__cards > li, .menu .menu__cta, .menu__quick, .menu__lang { opacity: 1 !important; }
  .mlink__num { opacity: 0.9 !important; }
  .mlink:hover .mlink__title, .mlink:focus-visible .mlink__title, .mcard:hover, .mcard:focus-visible { transform: none; }
  .mlink:hover .mlink__title > span, .mlink:focus-visible .mlink__title > span { animation: none; }
}

/* ---------- Forced colours: plain text, no painted letters ---------- */
@media (forced-colors: active) {
  .mlink__title > span { background: none; -webkit-text-fill-color: currentColor; }
  .menu__in { background: Canvas; }
  .mcard__art { display: none; }
}

/* ---------- The two pages «راهکارها» leads to: two quiet links under it ---------- */
.menu__pages .msub::before { display: none; }
.msub { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: clamp(0px, 0.6vh, 6px) 0 clamp(4px, 1.2vh, 14px); padding-inline-start: calc(2.8em + clamp(10px, 1.3vw, 22px)); opacity: 0; transition: opacity 0.15s; }
.menu-open .msub { opacity: 1; transition: opacity 0.8s var(--ease) 0.62s; }
.msub__a { display: inline-flex; align-items: center; gap: 10px; height: clamp(32px, 4.6vh, 42px); padding: 0 16px; border-radius: 99px; border: 1px solid var(--menu-line); font-size: clamp(14px, 1.1vw, 16.5px); font-weight: 500; line-height: 1;
  color: var(--mist); white-space: nowrap; transition: background-color 0.3s, border-color 0.3s, color 0.3s; }
.msub__a::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--ice); opacity: 0.7; }
.msub__a small { display: none; }
.msub__a:hover, .msub__a:focus-visible { background: rgba(226, 231, 234, 0.1); border-color: var(--line-2); }
.msub__a[aria-current="page"] { background: rgba(169, 193, 245, 0.14); border-color: rgba(169, 193, 245, 0.5); color: var(--ice); }
.msub__a[aria-current="page"]::before { opacity: 1; box-shadow: 0 0 0 4px rgba(169, 193, 245, 0.16); }
.msub__a[aria-current="page"] small { display: inline; font-size: 12px; font-weight: 500; opacity: 0.8; }
@media (prefers-reduced-motion: reduce) { .msub { opacity: 1 !important; } }

/* ---------- Phones: the pages' names at a reading size (they were set as large as a poster), lighter, with
   air between the rows; the cards and labels a step smaller with them ---------- */
@media (max-width: 900px) {
  .menu__grid { row-gap: 22px; }
  .menu__label { margin-bottom: 8px; font-size: 13px; }
  .mlink { --fs: clamp(19px, 5.5vw, 23px); grid-template-columns: 2em auto minmax(0, 1fr); column-gap: 8px; padding: 8px 0; }
  .mlink__title { font-weight: 500; line-height: 1.55; }
  .mlink__num { font-size: 12.5px; }
  .mlink[aria-current="page"] .mlink__title, .mlink.is-parent .mlink__title { font-weight: 700; }
  .mlink__here { height: 24px; padding: 0 10px; font-size: 12px; }
  .menu__pages > ul > li + li { border-top: 1px solid rgba(226, 231, 234, 0.08); }
  .msub { margin: 0 0 10px; padding-inline-start: calc(2em + 8px); gap: 6px 8px; }
  .msub__a { height: 34px; padding: 0 13px; font-size: 13.5px; }
  .menu .menu__cta { margin-top: 16px; height: 50px; font-size: 15.5px; }
  .mcard { padding: 10px 12px; column-gap: 12px; border-radius: 16px; }
  .mcard__viz { width: 40px; height: 40px; border-radius: 12px; }
  .mcard__head b { font-size: 17px; }
  .mcard__key { height: 22px; padding: 0 9px; font-size: 11.5px; }
  .mcard__sub { font-size: 12.5px; line-height: 1.7; }
  .mq__t > span { font-size: 14px; }
  .mq__ico { width: 38px; height: 38px; }
}

/* the menu is dark whatever the page under it: the header shows its light logo (also over a light section, where
   the header had faded that logo out) */
.menu-open .site-header .brand .on-dark-logo { opacity: 1 !important; }
