/*!
 * ENTRA V11 layout layer — loaded after entra.min.css / entra-v2.css on every page.
 * 1. Tokens   2. Shared section system   3. Hero   4. Trusted by   5. Case studies
 * 6. Services 7. Inner-page hero   8. Footer   9. Consistency clean-up   10. Responsive
 * New classes use the `ex-` prefix so they never collide with the legacy utility CSS.
 */

/* ===== 1. Tokens ===== */
:root {
  --ex-navy: #011548;
  --ex-navy-2: #0a2a78;
  --ex-orange: #f36e21;
  --ex-orange-ink: #c4530f;          /* AA-contrast orange for small text */
  --ex-ink: #011548;
  --ex-muted: #51607a;
  --ex-line: #dde4ee;
  --ex-surface: #ffffff;
  --ex-surface-alt: #f1f5fa;
  --ex-radius: 18px;
  --ex-shadow: 0 10px 30px rgba(1, 21, 72, .08);
  --ex-display: "Space Grotesk", "Cairo", system-ui, sans-serif;
  --ex-body: "Inter", "Cairo", system-ui, sans-serif;
}

/* ===== 2. Shared section system ===== */
.ex-wrap { max-width: 80rem; margin-inline: auto; padding-inline: clamp(1rem, 3vw, 2rem); }
.ex-section { position: relative; z-index: 10; padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.ex-section-alt { background: var(--ex-surface-alt); border-block: 1px solid var(--ex-line); }
.ex-head { max-width: 46rem; margin-bottom: 2.25rem; }
.ex-head-center { margin-inline: auto; text-align: center; }
.ex-eyebrow { display: inline-block; color: var(--ex-orange-ink); font: 700 .75rem/1.3 var(--ex-body); letter-spacing: .14em; text-transform: uppercase; }
.ex-title { margin-top: .6rem; color: var(--ex-ink); font: 800 clamp(1.75rem, 3.4vw, 2.6rem)/1.12 var(--ex-display); letter-spacing: -.02em; text-wrap: balance; }
.ex-intro { margin-top: .85rem; color: var(--ex-muted); font: 400 1.0625rem/1.65 var(--ex-body); }
.ex-link { color: var(--ex-navy); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--ex-orange); }
.ex-link:hover { color: var(--ex-orange-ink); }
.ex-btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: 0 1.4rem; border-radius: 12px; font: 700 .95rem/1 var(--ex-body); text-decoration: none; transition: background-color .15s, color .15s, border-color .15s; }
.ex-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .ex-btn svg { transform: scaleX(-1); }
.ex-btn-primary { background: var(--ex-orange); color: var(--ex-navy); }
.ex-btn-primary:hover { background: #ff7f33; }
.ex-btn-ghost { border: 1.5px solid var(--ex-navy); color: var(--ex-navy); }
.ex-btn-ghost:hover { background: var(--ex-navy); color: #fff; }
.ex-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.entra-skip-link { position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 100; padding: .6rem 1rem; border-radius: 8px; background: var(--ex-navy); color: #fff; }
.entra-skip-link:focus { top: 1rem; }
#main :is(section[id]) { scroll-margin-top: 88px; }

/* ===== 3. Hero ===== */
.ex-hero { position: relative; z-index: 10; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 6vw, 4.5rem); background: linear-gradient(180deg, #fff 0%, var(--ex-surface-alt) 100%); border-bottom: 1px solid var(--ex-line); }
.ex-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.ex-hero-title { margin-top: 1rem; color: var(--ex-ink); font: 800 clamp(2.2rem, 4.6vw, 3.6rem)/1.05 var(--ex-display); letter-spacing: -.025em; }
.ex-hero-title span { display: block; }
.ex-hero-title-accent { color: var(--ex-orange); }
html[lang="ar"] .ex-hero-title { line-height: 1.3; letter-spacing: 0; }
.ex-hero-lead { max-width: 36rem; margin-top: 1.1rem; color: var(--ex-muted); font: 400 1.125rem/1.65 var(--ex-body); }
.ex-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.ex-hero-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid var(--ex-line); list-style: none; }
.ex-hero-proof b { display: block; color: var(--ex-ink); font: 700 1rem/1.25 var(--ex-display); }
.ex-hero-proof span { display: block; margin-top: .25rem; color: var(--ex-muted); font-size: .85rem; line-height: 1.4; }
.ex-hero-video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 20px; background: #071226; box-shadow: 0 24px 60px rgba(1, 21, 72, .22); }
.ex-hero-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ex-hero-video-preview { position: absolute; inset: 0; display: block; }
.ex-hero-video-preview img { width: 100%; height: 100%; object-fit: cover; }
.ex-play { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: rgba(243, 110, 33, .95); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.ex-play svg { width: 30px; height: 30px; fill: var(--ex-navy); margin-inline-start: 4px; }
.ex-hero-caption { margin-top: .75rem; color: var(--ex-muted); font-size: .85rem; text-align: center; }

/* ===== 4. Trusted by ===== */
.ex-logos { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--ex-line); border-radius: var(--ex-radius); background: var(--ex-line); list-style: none; }
.ex-logos li { display: grid; place-items: center; height: 104px; padding: 1.1rem 1.25rem; background: var(--ex-surface); }
.ex-logos img { max-width: 100%; max-height: 46px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .62; transition: filter .25s, opacity .25s; }
.ex-logos li:hover img { filter: none; opacity: 1; }
.ex-logos-more { max-width: 60rem; margin: 1.25rem auto 0; color: var(--ex-muted); font-size: .9rem; line-height: 1.7; text-align: center; }
.ex-logos-more span { color: var(--ex-ink); font-weight: 700; }
.ex-credentials { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.25rem; margin-top: 2.5rem; }
.ex-cred-block { padding: 1.5rem 1.6rem; border: 1px solid var(--ex-line); border-radius: var(--ex-radius); background: var(--ex-surface); }
.ex-cred-title { color: var(--ex-ink); font: 700 1.1rem/1.3 var(--ex-display); }
.ex-certs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; list-style: none; }
.ex-certs li { padding: .9rem .9rem 1rem; border-radius: 12px; background: var(--ex-surface-alt); border-top: 3px solid var(--ex-navy); }
.ex-certs b { display: block; color: var(--ex-ink); font: 700 .95rem/1.25 var(--ex-display); }
.ex-certs span { display: block; margin-top: .3rem; color: var(--ex-muted); font-size: .8rem; line-height: 1.4; }
.ex-cred-modu { background: var(--ex-navy); border-color: var(--ex-navy); color: #dbe4f5; }
.ex-cred-modu .ex-cred-title { color: #fff; }
.ex-cred-modu p { margin-top: .6rem; font-size: .95rem; line-height: 1.6; }
.ex-cred-modu .ex-link { display: inline-block; margin-top: 1rem; color: #fff; }

/* ===== 5. Case studies (additions to the V10 Alnasr story) ===== */
.ex-mini-cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.ex-mini-case { display: grid; grid-template-columns: 200px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--ex-line); border-radius: var(--ex-radius); background: var(--ex-surface); box-shadow: var(--ex-shadow); }
.ex-mini-case img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; }
.ex-mini-case-body { padding: 1.25rem 1.4rem; }
.ex-mini-case-tag { color: var(--ex-orange-ink); font: 700 .72rem/1.3 var(--ex-body); letter-spacing: .12em; }
.ex-mini-case h3 { margin-top: .45rem; color: var(--ex-ink); font: 700 1.1rem/1.3 var(--ex-display); }
.ex-mini-case p { margin-top: .5rem; color: var(--ex-muted); font-size: .92rem; line-height: 1.6; }
.ex-photo-note { margin-top: .75rem; color: var(--ex-muted); font-size: .78rem; }

/* ===== 6. Services ===== */
.ex-service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.ex-service { display: flex; flex-direction: column; padding: 1.5rem; border: 1px solid var(--ex-line); border-radius: var(--ex-radius); background: var(--ex-surface); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ex-service:hover { border-color: var(--ex-orange); box-shadow: var(--ex-shadow); transform: translateY(-2px); }
.ex-service-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(243, 110, 33, .12); }
.ex-service-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--ex-orange-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ex-service h3 { margin-top: 1rem; color: var(--ex-ink); font: 700 1.05rem/1.3 var(--ex-display); }
.ex-service p { flex: 1; margin-top: .45rem; color: var(--ex-muted); font-size: .9rem; line-height: 1.55; }
.ex-service b { margin-top: 1rem; color: var(--ex-navy); font-size: .9rem; }

/* ===== 7. Inner-page hero ===== */
.ex-page-hero { position: relative; z-index: 10; padding-block: clamp(2.5rem, 5vw, 3.75rem); background: var(--ex-navy); color: #dbe4f5; }
.ex-page-hero .ex-eyebrow { color: #ffb27d; }
.ex-page-title { margin-top: .5rem; color: #fff; font: 800 clamp(1.9rem, 4vw, 3rem)/1.1 var(--ex-display); letter-spacing: -.02em; }
.ex-page-hero .ex-intro { max-width: 46rem; color: #c3cfe6; }
.ex-breadcrumb { display: flex; gap: .5rem; margin-bottom: 1.25rem; font-size: .85rem; color: #9fb0d0; }
.ex-breadcrumb a { color: #fff; text-decoration: none; }
.ex-breadcrumb a:hover { text-decoration: underline; }

/* ===== 8. Footer ===== */
.ex-footer { position: relative; z-index: 10; padding-top: 3.5rem; background: #00102f; color: #aebcd6; font-family: var(--ex-body); }
.ex-footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 2rem; padding-bottom: 2.5rem; }
.ex-footer-brand img { width: 180px; height: auto; padding: .5rem .75rem; border-radius: 10px; background: #fff; }
.ex-footer-brand p { margin-top: 1rem; font-size: .9rem; line-height: 1.6; }
.ex-footer-certs { color: #8193b5; font-size: .8rem !important; }
.ex-footer-col { display: flex; flex-direction: column; gap: .6rem; }
.ex-footer-col h3 { margin-bottom: .25rem; color: #fff; font: 700 .95rem/1.3 var(--ex-display); }
.ex-footer-col a { color: #aebcd6; font-size: .9rem; text-decoration: none; }
.ex-footer-col a:hover { color: #fff; }
.ex-footer-col .ex-footer-cta { align-self: flex-start; margin-top: .4rem; padding: .55rem .9rem; border-radius: 10px; background: var(--ex-orange); color: var(--ex-navy); font-weight: 700; }
.ex-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .82rem; }
.ex-footer-bottom a { color: #aebcd6; }

/* ===== 9. Consistency clean-up of legacy sections =====
 * Calmer, more corporate look: monospace only for data, no glow, no pulsing dots. */
.entra-v11 .animate-ping { animation: none; }
.entra-v11 .shadow-cyan-glow, .entra-v11 .shadow-amber-glow { --tw-shadow: 0 10px 30px rgba(1, 21, 72, .08); }
.entra-v11 main :is(p, li, label, h2, h3, h4, a, button, span).font-mono:not(output):not([id^="sim"]) { font-family: var(--ex-body); letter-spacing: normal; }
.entra-v11 main .industrial-card { border-radius: var(--ex-radius); }
.entra-v11 main section h2.font-display { letter-spacing: -.02em; }
.entra-v11 .entra-privacy-settings { opacity: .85; }

/* ===== 10. Responsive ===== */
@media (max-width: 1100px) {
  .ex-logos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ex-certs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .ex-hero-grid, .ex-credentials, .ex-mini-cases { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ex-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ex-logos li { height: 76px; padding: .8rem; }
  .ex-logos img { max-height: 34px; }
  .ex-hero-proof { grid-template-columns: 1fr; gap: .75rem; }
  .ex-mini-case { grid-template-columns: 1fr; }
  .ex-mini-case img { min-height: 0; aspect-ratio: 16 / 9; }
  .ex-service-grid, .ex-certs, .ex-footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ex-service, .ex-logos img { transition: none; }
}

/* ===== 11. V13 load sequence (pure CSS: no JS, no flash under the CSP) =====
 * One orchestrated moment per page: the H1 lines rise out of a mask, then the
 * supporting content settles in. Disabled entirely for reduced-motion users. */
.mo-lines .ln { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .mo-lines .ln { overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
  .mo-lines .ln > span { display: block; animation: mo-rise .95s cubic-bezier(.19, .8, .22, 1) both; }
  .mo-lines .ln + .ln > span { animation-delay: .1s; }
  .mo-after { animation: mo-settle .8s cubic-bezier(.19, .8, .22, 1) .35s both; }
  .mo-after.mo-late { animation-delay: .5s; }
}
@keyframes mo-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes mo-settle { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* V14 accessibility: contrast fixes flagged by Lighthouse (WCAG AA 4.5:1 for small text). */
[data-i18n="top_status"], [data-i18n="top_iso"] { color: #3d4b60 !important; }
#entraConsentBanner button.primary { background: #c4530f; border-color: #c4530f; }
#entraConsentBanner .ec-foot, #entraConsentBanner .ec-foot a { color: #55647a; }
