/* EP Group — light-theme scroll journey */
.epj {
  --ink: #0e1422;
  --muted: #5c6675;
  --line: rgba(10, 20, 40, .1);
  --accent: #003E9B;
  --accent2: #2f7ff0;
  --sans: 'Ubuntu', system-ui, sans-serif;
  --ease: cubic-bezier(.25, 1, .5, 1);
  position: relative;
  font-family: var(--sans);
  color: var(--ink);
  background: #eef1f6;
  /* full-bleed breakout from any theme container */
  width: 100vw; margin-left: calc(50% - 50vw);
  overflow-x: clip;
}
.epj #stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.epj .epj-page { position: relative; z-index: 1; }

.epj .kicker { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 700; display: block; margin-bottom: 16px; }
.epj .h2 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.02em; line-height: 1.1; font-weight: 700; }
.epj .h2 em, .epj .hero h1 em { font-style: normal; color: var(--accent); }
.epj .rv { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.epj .rv.in { opacity: 1; transform: none; }

/* hero */
.epj .hero { min-height: 92svh; display: grid; align-items: center; justify-items: start; padding: 90px clamp(20px, 6vw, 90px) 60px; position: relative; }
.epj .hero__card { max-width: 600px; }
.epj .hero h1 { font-size: clamp(2.5rem, 5vw, 4.2rem); line-height: 1.05; letter-spacing: -.025em; font-weight: 700; }
.epj .hero__sub { margin: 22px 0 0; max-width: 500px; color: var(--muted); line-height: 1.65; font-size: clamp(1rem, 1.4vw, 1.14rem); }
.epj .hero__scroll { position: absolute; bottom: 26px; left: clamp(20px, 6vw, 90px); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.epj .hero__scroll::after { content: ""; display: block; width: 2px; height: 42px; margin: 10px auto 0; background: linear-gradient(var(--accent), transparent); animation: epjdrip 2s var(--ease) infinite; }
@keyframes epjdrip { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 56% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* journey scroll track + pinned steps */
.epj .journey .act { height: 160vh; }
.epj .steps {
  position: fixed; left: clamp(18px, 3vw, 44px); bottom: clamp(18px, 4vh, 42px);
  z-index: 6; max-width: 470px;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), visibility .5s;
}
.epj .steps.vis { opacity: 1; visibility: visible; transform: none; }
.epj .step { padding: 9px 0; }
.epj .step__head { display: flex; align-items: center; gap: 12px; }
.epj .step__num { font-size: 13px; color: var(--muted); border-radius: 8px; padding: 4px 8px; transition: all .35s var(--ease); font-weight: 700; }
.epj .step__t { font-size: 1.05rem; font-weight: 500; color: var(--muted); transition: all .35s var(--ease); }
.epj .step.on .step__num { background: var(--accent); color: #fff; }
.epj .step.on .step__t { font-size: 1.8rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.epj .step__wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.epj .step__wrap > div { overflow: hidden; }
.epj .step.on .step__wrap { grid-template-rows: 1fr; }
.epj .step__body { margin: 10px 0 6px 16px; padding-left: 16px; border-left: 2px solid rgba(0, 62, 155, .3); max-width: 420px; transition: all .45s var(--ease); }
.epj .step__short { font-size: 1.02rem; line-height: 1.65; color: var(--muted); margin: 0; }
/* close-up phase: the card expands with logo, imagery and the full brief */
.epj .step__rich { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .6s var(--ease), opacity .5s var(--ease); }
.epj .step__richin { overflow: hidden; }
.epj .step.on.close .step__rich { grid-template-rows: 1fr; opacity: 1; }
.epj .step.on.close .step__body {
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 18px; padding: 24px 28px; border-left: 3px solid var(--accent);
  box-shadow: 0 22px 54px -24px rgba(10, 25, 60, .5); max-width: none;
}
.epj .step__logo { height: 42px; width: auto; display: block; margin: 16px 0 14px; }
.epj .step__imgs { display: flex; gap: 12px; margin: 0 0 14px; }
.epj .step__imgs img { width: calc(50% - 6px); height: 180px; object-fit: cover; border-radius: 12px; box-shadow: 0 12px 26px -16px rgba(10, 25, 60, .5); }
.epj .step__brief { font-size: 1.02rem; line-height: 1.66; color: #3c4554; margin: 0 0 12px; }
.epj .step__acts { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.epj .step__acts li { font-size: .93rem; line-height: 1.45; color: #3c4554; padding-left: 18px; position: relative; }
.epj .step__acts li::before { content: ""; position: absolute; left: 0; top: .48em; width: 8px; height: 8px; border-radius: 3px; background: var(--accent2); }
.epj .step__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.epj .step__facts span { font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: var(--accent); background: rgba(0, 62, 155, .08); border: 1px solid rgba(0, 62, 155, .18); border-radius: 999px; padding: 5px 13px; }
.epj .steps.close { max-width: min(900px, 62vw); }
.epj .step__head { cursor: pointer; }
.epj .step__head:hover .step__t { color: var(--ink); }
/* mobile: the expanded card scrolls inside itself instead of growing past the viewport */
@media (max-width: 700px) {
  .epj .steps { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .epj .steps.close { max-width: none; }
  .epj .step.on .step__t { font-size: 1.4rem; }
  .epj .step.on.close .step__body {
    padding: 14px 16px; margin-left: 0;
    max-height: calc(100svh - 240px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .epj .step__short { font-size: .92rem; line-height: 1.55; }
  .epj .step__logo { height: 28px; margin: 10px 0 8px; }
  .epj .step__imgs img { height: 88px; border-radius: 8px; }
  .epj .step__brief { font-size: .9rem; line-height: 1.55; }
  .epj .step__acts { grid-template-columns: 1fr; gap: 4px; margin-bottom: 10px; }
  .epj .step__acts li { font-size: .86rem; }
  .epj .step__facts span { font-size: .72rem; padding: 4px 10px; }
}
.epj .step { transition: opacity .4s var(--ease); }
.epj .steps.close .step:not(.on) { opacity: 0; max-height: 0; padding: 0; overflow: hidden; } /* focus the expanded company card */

/* brand cards under the journey */
.epj .brands { padding: clamp(80px, 14vh, 150px) clamp(20px, 5vw, 64px); position: relative; }
.epj .brands__head { max-width: 1180px; margin: 0 auto 48px; }
.epj .brands__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; max-width: 1180px; margin: 0 auto; }
.epj .bcard {
  display: block; padding: 26px 24px; border-radius: 18px; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 10px 30px -18px rgba(10, 25, 60, .25);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.epj .bcard:hover { transform: translateY(-5px); border-color: var(--accent2); box-shadow: 0 20px 44px -20px rgba(0, 62, 155, .35); }
.epj .bcard h3 { font-size: 1.1rem; margin: 0 0 8px; font-weight: 700; }
.epj .bcard p { font-size: .92rem; line-height: 1.6; color: var(--muted); margin: 0; }
.epj .brands__cta { max-width: 1180px; margin: 40px auto 0; }
.epj .btn {
  display: inline-flex; align-items: center; height: 48px; padding: 0 30px;
  border-radius: 999px; font-size: 15px; font-weight: 700; text-decoration: none;
  background: var(--accent); color: #fff;
  box-shadow: 0 12px 30px -12px rgba(0, 62, 155, .55);
  transition: transform .25s var(--ease);
}
.epj .btn:hover { transform: translateY(-2px); }

/* SEO content layer under the journey (light-theme port of the evenson layer) */
.epj section.seo { padding: clamp(60px, 10vh, 110px) clamp(20px, 5vw, 64px); position: relative; }
.epj .seo__head { max-width: 1180px; margin: 0 auto 40px; }
.epj .seo__lead { margin-top: 18px; color: var(--muted); line-height: 1.75; font-size: 1.02rem; max-width: 780px; }
.epj .seo__lead a { color: var(--accent); border-bottom: 1px solid rgba(0, 62, 155, .3); text-decoration: none; }
.epj .seo__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 26px; max-width: 1180px; margin: 0 auto; }
.epj .seo__item { display: block; padding: 18px 14px; border-radius: 14px; border-top: 1px solid var(--line); transition: background .25s; text-decoration: none; color: inherit; }
.epj .seo__item:hover { background: #fff; }
.epj .seo__item img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; filter: saturate(.92); transition: filter .25s, transform .25s; }
.epj .seo__item:hover img { filter: saturate(1) brightness(1.02); transform: scale(1.015); }
.epj .seo__item h3 { font-size: 1.05rem; margin: 0 0 6px; font-weight: 700; }
.epj .seo__item h3::after { content: " →"; color: var(--accent); font-weight: 400; opacity: 0; transition: opacity .2s; }
.epj .seo__item:hover h3::after { opacity: 1; }
.epj .seo__item p { font-size: .9rem; line-height: 1.6; color: var(--muted); margin: 0; }
.epj .seo__links { display: flex; flex-wrap: wrap; gap: 10px; max-width: 1180px; margin: 26px auto 0; align-items: center; }
.epj .seo__links a {
  font-size: .9rem; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); text-decoration: none; background: #fff; transition: border-color .2s, color .2s;
}
.epj .seo__links a:hover { border-color: var(--accent); color: var(--accent); }
.epj section.faq { padding: clamp(80px, 14vh, 150px) clamp(20px, 5vw, 64px); position: relative; }
.epj .faq__grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; max-width: 1180px; margin: 0 auto; }
.epj .faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.epj .faq details:last-child { border-bottom: 1px solid var(--line); }
.epj .faq summary { cursor: pointer; list-style: none; padding: 18px 4px; font-weight: 600; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 14px; }
.epj .faq summary::after { content: "+"; color: var(--accent); font-weight: 400; flex: none; }
.epj .faq details[open] summary::after { content: "–"; }
.epj .faq details p { padding: 0 28px 18px 4px; color: var(--muted); line-height: 1.7; margin: 0; }
@media (max-width: 880px) { .epj .faq__grid { grid-template-columns: 1fr; gap: 26px; } }
.epj section.ctaband { padding: clamp(80px, 14vh, 150px) clamp(20px, 5vw, 64px) clamp(100px, 16vh, 170px); position: relative; max-width: 1180px; margin: 0 auto; }
.epj .ctaband .h2 { margin: 6px 0 26px; }

/* RTL (Arabic) — text blocks flip, the 3D scene and panel anchoring stay as designed */
html[dir=rtl] .epj { --sans: 'Cairo', 'Ubuntu', system-ui, sans-serif; }
html[dir=rtl] .epj .hero__card, html[dir=rtl] .epj .steps, html[dir=rtl] .epj .brands,
html[dir=rtl] .epj .seo__head, html[dir=rtl] .epj .seo__links, html[dir=rtl] .epj .seo__grid,
html[dir=rtl] .epj .faq, html[dir=rtl] .epj .ctaband { direction: rtl; text-align: right; }
html[dir=rtl] .epj .step__body { border-left: none; border-right: 2px solid rgba(0, 62, 155, .3); padding-left: 0; padding-right: 16px; margin: 10px 16px 6px 0; }
html[dir=rtl] .epj .step.on.close .step__body { border-left: none; border-right: 3px solid var(--accent); padding: 14px 18px; }
html[dir=rtl] .epj .step__acts li { padding-left: 0; padding-right: 18px; }
html[dir=rtl] .epj .step__acts li::before { left: auto; right: 0; }
html[dir=rtl] .epj .faq details p { padding: 0 4px 18px 28px; }
html[dir=rtl] .epj .hero__scroll { left: auto; right: clamp(20px, 6vw, 90px); }

/* loader — EP S-mark sweep while the scene builds (light theme) */
.epj #loader { position: fixed; inset: 0; z-index: 70; background: #eef1f6; display: grid; place-items: center; transition: opacity .6s ease, visibility .6s; }
.epj #loader.done { opacity: 0; visibility: hidden; }
.epj .loader__in { text-align: center; }
.epj .loader__mark {
  width: 92px; height: 92px; margin: 0 auto 22px;
  background: linear-gradient(125deg,
    #c3cdda 0%, #c3cdda 32%,
    var(--accent) 46%, #7fb1ff 50%, var(--accent) 54%,
    #c3cdda 68%, #c3cdda 100%);
  background-size: 320% 320%;
  -webkit-mask: url('logo-mark.png') center / contain no-repeat;
  mask: url('logo-mark.png') center / contain no-repeat;
  animation: epjmarksweep 1.7s linear infinite;
  filter: drop-shadow(0 0 18px rgba(0, 62, 155, .25));
}
@keyframes epjmarksweep { 0% { background-position: 100% 100%; } 100% { background-position: 0% 0%; } }
.epj .loader__word { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .epj .loader__mark { animation: none; } }

/* hide the theme breadcrumb bar on the journey page */
.shopic-breadcrumb { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .epj .rv { opacity: 1; transform: none; transition: none; }
  .epj .hero__scroll::after { animation: none; }
}

/* the EP Group ribbon + site header stay pinned at the top while scrolling the journey.
   (html/body have overflow-x:hidden, which kills position:sticky — so fixed + body padding) */
.epg-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 41; }
#masthead { position: fixed !important; top: 39px; left: 0; right: 0; z-index: 40; background: #fff; }
body.page-id-10357 { padding-top: 120px; }
