/* Site chrome (main-site nav drawer + footer).
   Auto-enqueued by inc/enqueue.php's per-page CSS partial loader (any file in
   assets/css/pages/ loads after style.css). Redesigned 2026-07-14 per owner
   feedback: a proper full-screen mobile menu (header + close + CTA) and a
   bold full-bleed green footer signature. */

/* ====================================================================
   Mobile nav drawer — full-screen, header + links + footer CTA.
   Below 920px the desktop .nav-links row is hidden (style.css); this is the
   replacement. Reuses .nav-actions/.lang-toggle/.btn/.brand from style.css.
   ==================================================================== */

/* The top-bar AR/EN pill moves into the drawer below 920px so the collapsed
   bar has one clean affordance — the hamburger. */
@media (max-width: 919px) {
  .nav-actions > .lang-toggle { display: none; }
}

/* ---- Hamburger toggle ---- */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
@media (min-width: 920px) { .nav-toggle { display: none; } }
.nav-toggle-bar {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent-mid); outline-offset: 2px; }

/* ---- Drawer shell ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  transition: visibility 0s linear 0.36s;
}
.mobile-menu.is-open { visibility: visible; transition-delay: 0s; }
@media (min-width: 920px) { .mobile-menu { display: none; } }

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.5);
  opacity: 0;
  transition: opacity 0.36s var(--ease-out);
}
.mobile-menu.is-open .mobile-menu-backdrop { opacity: 1; }

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 440px);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.42s var(--ease-out);
}
.mobile-menu.is-open .mobile-menu-panel { transform: translateX(0); }
/* RTL: slides in from the left, content right-aligned. */
body.lang-ar .mobile-menu-panel {
  right: auto;
  left: 0;
  text-align: right;
  transform: translateX(-100%);
}
body.lang-ar .mobile-menu.is-open .mobile-menu-panel { transform: translateX(0); }

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-head .brand-logo { height: 26px; width: auto; }
.mobile-menu-close {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.mobile-menu-close:hover { background: var(--text); color: var(--bg); }
.mobile-menu-close:focus-visible { outline: 2px solid var(--accent-mid); outline-offset: 2px; }

.mobile-menu-links { display: flex; flex-direction: column; padding: 10px 24px; }
.mobile-menu-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: color 0.2s;
}
.mobile-menu-links a .display { font-size: 27px; line-height: 1.1; }
body.lang-ar .mobile-menu-links a .display { font-size: 23px; }
.mobile-menu-links a .mm-arrow { font-size: 17px; color: var(--text-dim); transition: transform 0.25s var(--ease-out), color 0.2s; }
body.lang-ar .mobile-menu-links a .mm-arrow { transform: scaleX(-1); }
.mobile-menu-links a:hover,
.mobile-menu-links a:focus-visible { color: var(--accent-mid); }
.mobile-menu-links a:hover .mm-arrow,
.mobile-menu-links a:focus-visible .mm-arrow { color: var(--accent-mid); transform: translateX(4px); }
body.lang-ar .mobile-menu-links a:hover .mm-arrow,
body.lang-ar .mobile-menu-links a:focus-visible .mm-arrow { transform: scaleX(-1) translateX(4px); }
.mobile-menu-links a:focus-visible { outline: 2px solid var(--accent-mid); outline-offset: -2px; }

.mobile-menu-foot {
  margin-top: auto;
  padding: 22px 24px 30px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mobile-menu-lang { align-self: flex-start; }
body.lang-ar .mobile-menu-lang { align-self: flex-end; }
.mobile-menu-cta { width: 100%; justify-content: center; }
.mobile-menu-contact { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.mobile-menu-contact a { color: var(--text-dim); font-size: 15px; transition: color 0.2s; }
.mobile-menu-contact a:hover { color: var(--text); }

/* Scroll lock while the drawer is open (toggled on <html> by main.js). */
html.nav-open,
html.nav-open body { overflow: hidden; }

/* ====================================================================
   Footer — bold full-bleed brand-green signature.
   ==================================================================== */
.mag-footer {
  background: var(--accent);
  color: #0A0A0F;
  padding: clamp(56px, 9vw, 100px) 0 30px;
}
body.lang-ar .mag-footer { direction: rtl; text-align: right; }

.mag-footer-eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(10, 10, 15, 0.72);
  margin-bottom: 14px;
}
.mag-footer-email {
  display: inline-block;
  font-family: "Bacasime Antique", Georgia, serif;
  font-size: clamp(34px, 8.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: #0A0A0F;
  word-break: break-word;
  margin-bottom: clamp(30px, 5vw, 48px);
  transition: opacity 0.2s;
}
body.lang-ar .mag-footer-email { direction: ltr; }
.mag-footer-email:hover { opacity: 0.72; }

.mag-footer-social { display: flex; gap: 12px; margin-bottom: clamp(32px, 6vw, 48px); }
.mag-footer-social-link {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1.5px solid #0A0A0F;
  color: #0A0A0F;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.mag-footer-social-link svg { width: 22px; height: 22px; }
.mag-footer-social-link:hover { background: #0A0A0F; color: var(--accent); transform: translateY(-2px); }
.mag-footer-social-link:focus-visible { outline: 2px solid #0A0A0F; outline-offset: 3px; }

.mag-footer-rule { border: none; border-top: 1px solid rgba(10, 10, 15, 0.26); margin: 0 0 clamp(28px, 5vw, 40px); }

.mag-footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: clamp(32px, 5vw, 44px); }
.mag-footer-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(10, 10, 15, 0.58);
  margin-bottom: 12px;
}
.mag-footer-col a,
.mag-footer-loc { display: block; color: #0A0A0F; font-size: 16px; line-height: 1.95; }
.mag-footer-col a { transition: opacity 0.2s; }
.mag-footer-col a:hover { opacity: 0.6; }
.mag-footer-loc { color: rgba(10, 10, 15, 0.7); margin-top: 4px; }

.mag-footer-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: clamp(36px, 6vw, 52px); }
.mag-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.2s var(--ease-out), background 0.2s, color 0.2s;
}
.mag-footer-btn.is-solid { background: #0A0A0F; color: var(--accent); }
.mag-footer-btn.is-solid:hover { transform: translateY(-2px); }
.mag-footer-btn.is-outline { background: transparent; color: #0A0A0F; border: 1.5px solid #0A0A0F; }
.mag-footer-btn.is-outline:hover { background: #0A0A0F; color: var(--accent); }
.mag-footer-btn:focus-visible { outline: 2px solid #0A0A0F; outline-offset: 3px; }

.mag-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding-top: 22px;
  border-top: 1px solid rgba(10, 10, 15, 0.26);
  font-size: 13px;
  color: rgba(10, 10, 15, 0.66);
}

@media (max-width: 599px) {
  .mag-footer-cols { grid-template-columns: 1fr; gap: 26px; }
  .mag-footer-cta { flex-direction: column; }
  .mag-footer-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .mobile-menu-backdrop,
  .mobile-menu-panel,
  .nav-toggle-bar,
  .mobile-menu-links a .mm-arrow,
  .mag-footer-social-link,
  .mag-footer-btn { transition: none !important; }
}
