/* service-ea: built from the home page (hero, dusk services cards) and the about page (intro, pill, vision, story and call-to-action blocks).
   home.css + about-page.css do the styling; this file only holds what those two pages do not have. Markup: website/service_ea.xml */

/* ---------- hero (home) with a short giant word ---------- */
.hero .ea-giant {
  font-size: 40vw;
  gap: 0;
  direction: ltr;
}

.hero {
  color: #fff;
}

@media (min-width: 992px) {
  .hero .ea-giant {
    font-size: 34vw;
  }
}

.ea-kicker {
  display: block;
  margin-bottom: .8rem;
  color: #00D1B2;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .04em;
}

/* ---------- shared: section sub-title under a framed heading ---------- */
.ea-sub {
  max-width: 42rem;
  margin: 0 auto clamp(1.6rem, 4vw, 2.6rem);
  text-align: center;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ab-text);
}

.ea-sub--dark {
  color: rgba(255,255,255,.78);
}

.ab-vis .ab-values-head,
.ab-story .ab-values-head,
.ab-values .ab-values-head {
  margin-bottom: 1rem;
}

.ab-values-head {
  display: flex;
  justify-content: center;
}

/* ---------- overview: the numbers as story cards ---------- */
.ea-title {
  margin: .6rem 0 1rem;
}

/* ---------- "what we do": small pill cards linking to each service ---------- */
.ea-pill {
  --notch: 0px;
  text-decoration: none;
  color: var(--ab-navy);
}

/* ---------- vision cards without the photo: drop the navy band ---------- */
.ab-vis::before {
  display: none;
}

@media (min-width: 768px) {
  .ab-vis-card {
    min-height: 300px;
  }
}

/* ---------- home "services" cards, no image: tag on the top edge, text inside ---------- */
.ea-services .svc-head {
  margin-bottom: 1.4rem;
}

.ea-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: 2.4rem;
}

.ea-grid .svc-c-body {
  padding: 2.2rem 1.6rem 1.8rem;
}

.ea-grid .svc-c-body h3 {
  font-size: 1.2rem;
}

/* laptop and up: the 7th card sits alone on the last row, centred and a little larger than the others */
@media (min-width: 992px) {
  #s3 .ea-grid .svc-c:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 3.2rem) / 3 * 1.6);
  }
}

@media (max-width: 991.98px) {
  .ea-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .ea-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- call to action: the seven steps ---------- */
.ab-cta .ab-cta-head {
  display: flex;
  justify-content: center;
  margin-bottom: 1.2rem;
}

/* ---------- section headings: the caption on the frame must take the colour of the section behind it ---------- */
.ab-values .sec-head {
  --sec-bg: var(--ab-soft);
}

.ab-vis .sec-head,
.ab-intro .sec-head {
  --sec-bg: #fff;
}

.ab-story .sec-head {
  --sec-bg: #e7f7ef;
}

.ab-values-head .sec-head {
  margin-top: 1rem;
}

/* section caption on the frame: placed with Bootstrap utilities (position-absolute top-0 start-50 translate-middle px-3 text-nowrap fw-normal in the markup).
   Only the leftovers of home.css / about-page.css that fight those utilities are reset here. */
.sec-head .sec-sub,
html[dir="rtl"] .sec-head .sec-sub {
  right: auto;
  translate: none;
}

.sec-head--dark .sec-sub {
  color: #fff;
}

.sec-h {
  overflow-wrap: anywhere;
}

/* four cards in one row (section 6): tighter padding, smaller icon and text so nothing is cramped, equal heights from h-100 */
#s6 .ea-pill {
  padding: 1.4rem 1.3rem;
}

#s6 .ea-pill .ab-pill-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.1rem;
  border-radius: 14px;
}

#s6 .ea-pill .ab-pill-icon svg {
  width: 26px;
  height: 26px;
}

#s6 .ea-pill h3 {
  font-size: 1.05rem;
}

#s6 .ea-pill .ab-pill-line {
  margin: .8rem 0;
}

#s6 .ea-pill p {
  font-size: .88rem;
  line-height: 1.8;
}

@media (min-width: 1200px) {
  #s6 .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
  }
}

/* ---------- hero: giant word + text spacing on every screen (home.css sizes the Arabic giant at 9.5vw / 11vw, which is too small for "EA") ---------- */
html[data-lang] .hero .ea-giant {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  line-height: .86;
  letter-spacing: .02em;
  font-size: 34vw;
}

@media (max-width: 991.98px) {
  html[data-lang] .hero .ea-giant {
    font-size: 40vw;
  }
}

.hero .hero-title {
  margin: 0 0 .9rem;
}

.hero .hero-lead {
  margin: 0 0 1.4rem;
}

.hero .ea-kicker {
  margin-bottom: .6rem;
}

.hero .btn {
  white-space: nowrap;
}

/* ---------- section 7: pastel cards (site palette) with a pixel-square corner accent ---------- */
#s7 .ea-tint {
  --sq: clamp(14px, 2.2vw, 26px);
  --sqc: rgba(255,255,255,.8);
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  color: var(--ab-navy);
  --muted: var(--ab-text);
  --ico: var(--ab-navy);
  --chip: transparent;
}

#s7 .ea-tint--sage {
  background: #cdeee6;
}

#s7 .ea-tint--peach {
  background: #cfeefc;
}

#s7 .ea-tint--sky {
  background: #d3e2ff;
}

#s7 .ea-tint--peach .ab-story-icon {
  --ico: var(--ab-teal);
}

#s7 .ea-tint--sky .ab-story-icon {
  --ico: var(--ab-blue);
}

#s7 .ea-tint .ab-story-icon {
  width: 52px;
  height: 52px;
  border-radius: 0;
}

#s7 .ea-tint .ab-story-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

#s7 .ea-tint .ab-story-num {
  opacity: .5;
}

#s7 .ea-tint h3 {
  color: var(--ab-navy);
}

#s7 .ea-tint > * {
  position: relative;
  z-index: 1;
}

/* staircase of squares: ::before = corner square + one diagonal step, ::after = a farther, fainter pair */
#s7 .ea-tint::before,
#s7 .ea-tint::after {
  content: "";
  position: absolute;
  width: var(--sq);
  height: var(--sq);
  background: var(--sqc);
  pointer-events: none;
}

#s7 .ea-tint::before {
  right: 0;
  bottom: 0;
  box-shadow: calc(var(--sq) * -1) calc(var(--sq) * -1) 0 0 rgba(255,255,255,.55);
}

#s7 .ea-tint::after {
  right: calc(var(--sq) * 2);
  bottom: calc(var(--sq) * 2);
  opacity: .45;
  box-shadow: calc(var(--sq) * 1) calc(var(--sq) * -1) 0 0 var(--sqc);
}

#s7 .ea-tint--peach::before {
  right: auto;
  left: 0;
  bottom: auto;
  top: 0;
  box-shadow: var(--sq) var(--sq) 0 0 rgba(255,255,255,.55);
}

#s7 .ea-tint--peach::after {
  right: auto;
  left: calc(var(--sq) * 2);
  bottom: auto;
  top: calc(var(--sq) * 2);
  box-shadow: calc(var(--sq) * -1) var(--sq) 0 0 var(--sqc);
}

html[dir="rtl"] #s7 .ea-tint:not(.ea-tint--peach)::before {
  right: auto;
  left: 0;
  box-shadow: var(--sq) calc(var(--sq) * -1) 0 0 rgba(255,255,255,.55);
}

html[dir="rtl"] #s7 .ea-tint:not(.ea-tint--peach)::after {
  right: auto;
  left: calc(var(--sq) * 2);
  box-shadow: calc(var(--sq) * -1) calc(var(--sq) * -1) 0 0 var(--sqc);
}

@media (max-width: 575.98px) {
  #s7 .ea-tint .ab-story-icon {
    width: 44px;
    height: 44px;
  }
}

/* ---------- #journey: white cards in a centered grid (4 / 3 / 2 / 1 per row), each with a tinted number dot ---------- */
.ea-steps {
  --cols: 1;
  --gap: 1rem;
  list-style: none;
  margin: 2.2rem auto 0;
  padding: 0;
  max-width: 1100px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  text-align: start;
}

.ea-steps li {
  --tint: #00d1b2;
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .9rem;
  padding: 1.1rem 1.2rem 1.3rem;
  border-radius: 12px;
  background: #fff;
  color: var(--ab-navy);
  box-shadow: 0 10px 28px -16px rgba(0,0,0,.5);
  transition: transform .4s var(--ab-ease), box-shadow .3s;
}

.ea-steps li:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px -16px rgba(0,0,0,.55);
}

.ea-dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: .82rem;
  font-weight: 700;
  color: var(--tint);
  background: color-mix(in srgb, var(--tint) 16%, #fff);
}

.ea-steps b {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.ea-steps li:nth-child(7n+1) {
  --tint: #00b89c;
}

.ea-steps li:nth-child(7n+2) {
  --tint: #0066ff;
}

.ea-steps li:nth-child(7n+3) {
  --tint: #00a6dc;
}

.ea-steps li:nth-child(7n+4) {
  --tint: #7a5cff;
}

.ea-steps li:nth-child(7n+5) {
  --tint: #f08a24;
}

.ea-steps li:nth-child(7n+6) {
  --tint: #e6457a;
}

.ea-steps li:nth-child(7n+7) {
  --tint: #0a2540;
}

@media (min-width: 576px) {
  .ea-steps {
    --cols: 2;
  }
}

@media (min-width: 768px) {
  .ea-steps {
    --cols: 3;
  }
}

@media (min-width: 1100px) {
  .ea-steps {
    --cols: 4;
  }
}

.ea-steps li {
  position: relative;
}

.ea-dot {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--tint) 14%, #fff);
}

.ea-dot svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ea-num {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1.1rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ab-navy);
  opacity: .4;
}

.ea-steps .ea-sub-t {
  margin: -.35rem 0 0;
  max-width: none;
  font-size: .86rem;
  line-height: 1.7;
  color: var(--ab-text);
  opacity: 1;
}

/* ---------- #overview: stacked accordion-style cards (white, bordered, round chevron at the end) ---------- */
.ea-acc {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  padding: 1.15rem 1.3rem;
  border: 1px solid #e3e8ee;
  border-radius: 14px;
  background: #fff;
  color: var(--ab-navy);
  box-shadow: 0 8px 22px -18px rgba(10,37,64,.35);
  transition: transform .35s var(--ab-ease), box-shadow .3s, border-color .3s;
}

.ea-acc:hover {
  transform: translateY(-2px);
  border-color: rgba(0,209,178,.6);
  box-shadow: 0 14px 28px -18px rgba(10,37,64,.45);
}

.ea-acc h3 {
  flex: none;
  margin: 0;
  min-width: 2.2ch;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1;
  color: var(--ab-teal);
}

.ab-intro .ea-acc p {
  flex: 1;
  margin: 0;
  max-width: none;
  padding: 0;
  border: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ab-navy);
}

#overview .row.g-3 > .col-12 {
  display: flex;
}

#overview .row.g-3 > .col-12 > .ea-acc {
  width: 100%;
}

/* ---------- hero background: full-scene image replaces the sky photo and the skyline strip ---------- */
.pg-ea .hero2 {
  display: none;
}

.pg-ea .hero__sky {
  background: #0a2540;
  animation: none;
  filter: none;
}

/* no breathing veil on the service pages (that is the home hero only) */
.pg-ea .hero__sky::after {
  display: none;
}

.pg-ea .hero__sky::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('/askwebsite/static/site/assets/src/opt/ea-hero-bg.webp') 72% center / cover no-repeat;
}

/* Arabic reads right-to-left: mirror the scene so the artwork sits opposite the text */
html[dir="rtl"] .pg-ea .hero__sky::before {
  transform: scaleX(-1);
}

/* portrait screens: crop on the artwork (right side) and keep the text area dark */
@media (max-width: 991.98px) {
  .pg-ea .hero__sky::before {
    background-position: 78% bottom;
    background-size: auto 62%;
  }

  .pg-ea .hero__sky {
    background: linear-gradient(180deg, #0a2540 0%, #0d3358 55%, #123f6b 100%);
  }
}

@media (max-width: 575.98px) {
  .pg-ea .hero__sky::before {
    background-size: auto 52%;
    background-position: 80% bottom;
  }
}

@media (max-width: 991.98px) {
  html[dir="rtl"] .pg-ea .hero__sky::before {
    background-position: 78% bottom;
  }
}

/* ---------- hero layout: "EA" and the text share one left edge (right edge in Arabic), artwork fills the whole hero ---------- */
.pg-ea .hero__sky::before {
  background-position: center 80%;
}

.pg-ea .hero__giant {
  justify-content: flex-start;
  padding-inline: 6vw;
}

.pg-ea .hero__content > .container {
  max-width: none;
  padding-inline: 6vw;
}

html[data-lang] .pg-ea .hero .ea-giant {
  font-size: 29vw;
}

@media (max-width: 991.98px) {
  html[data-lang] .pg-ea .hero .ea-giant {
    font-size: 40vw;
  }

  .pg-ea .hero__giant,
  .pg-ea .hero__content > .container {
    padding-inline: 1.25rem;
  }
}

/* ---------- portrait screens: the artwork covers the whole hero (no strip at the bottom) ---------- */
@media (max-width: 991.98px) {
  .pg-ea .hero__sky::before {
    background-size: cover;
    background-position: 68% 100%;
  }

  html[dir="rtl"] .pg-ea .hero__sky::before {
    background-position: 68% 100%;
  }

  html .pg-ea .hero__shade {
    background: linear-gradient(180deg, rgba(10,37,64,.78) 0%, rgba(10,37,64,.55) 45%, rgba(10,37,64,.25) 100%);
  }
}

/* ---------- AI page extras: linked service pills (#what) and the journey kicker ---------- */
.ea-jk {
  display: block;
  margin: 0 auto .6rem;
  text-align: center;
  color: #6df2cc;
  font-size: .95rem;
  letter-spacing: .04em;
}

/* hero image: 960px version on tablets and phones (22 KB instead of 50 KB) */
@media (max-width: 991.98px) {
  .pg-ea .hero__sky::before {
    background-image: url('/askwebsite/static/site/assets/src/opt/ea-hero-bg-sm.webp');
  }
}

/* hero height identical to the Training and Our Clients pages */
@media (min-width: 992px) {
  .pg-ea .hero {
    min-height: clamp(520px, 41vw, 760px);
  }

  .pg-ea .hero__content {
    min-height: calc(clamp(520px, 41vw, 760px) - 81px);
  }
}

@media (min-width: 2200px) {
  .pg-ea .hero {
    min-height: 760px;
  }

  .pg-ea .hero__content {
    min-height: 679px;
  }
}

/* desktop: the giant "EA" is sized to fit above the title in the shorter hero */
@media (min-width: 992px) {
  html[data-lang] .pg-ea .hero .ea-giant {
    font-size: 15vw;
  }
}

/* desktop: the artwork is wider than the hero, so show its top (the layered icons) and crop the water at the bottom */
@media (min-width: 992px) {
  .pg-ea .hero__sky::before {
    background-position: 72% 8%;
  }
}

/* hero "Contact us" button: space above it, natural width (not full-width on phones) */
.hero .hero-lead + .d-flex {
  margin-top: 1.5rem;
  align-items: flex-start;
}

.hero .hero-lead + .d-flex .btn {
  width: auto;
  min-width: 11rem;
  padding: .6rem 2rem;
  text-align: center;
}

/* sections 2 and 6: icon and title side by side, rule and text below */
#s2 .ea-pill ,
#s6 .ea-pill {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  align-items: center;
  align-content: start;
}

#s2 .ea-pill .ab-pill-icon ,
#s6 .ea-pill .ab-pill-icon {
  margin-bottom: 0;
}

#s2 .ea-pill h3 ,
#s6 .ea-pill h3 {
  margin: 0;
}

#s2 .ea-pill .ab-pill-line,
#s6 .ea-pill .ab-pill-line,
#s2 .ea-pill p ,
#s6 .ea-pill p {
  grid-column: 1 / -1;
}

/* section 7: title sits in the top row between the icon and the number */
#s4 .ab-story-top h3,
#s7 .ab-story-top h3 {
  flex: 1;
  margin: 0 .9rem;
  font-size: 1.1rem;
}

/* #journey on the dark band (DMO, AI and research pages): translucent cards instead of plain white */
:is(.pg-dmo, .pg-ai, .pg-rs) .ea-steps li {
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  border: 1px solid rgba(109,242,204,.22);
  color: #fff;
  box-shadow: 0 14px 30px -20px rgba(0,0,0,.6);
}

:is(.pg-dmo, .pg-ai, .pg-rs) .ea-steps li:hover {
  border-color: rgba(109,242,204,.55);
  background: linear-gradient(160deg, rgba(109,242,204,.18), rgba(255,255,255,.06));
}

:is(.pg-dmo, .pg-ai, .pg-rs) .ea-steps li:nth-child(7n+7) {
  --tint: #6df2cc;   /* the navy tint would vanish on the dark card */
}

:is(.pg-dmo, .pg-ai, .pg-rs) .ea-steps .ea-dot {
  background: color-mix(in srgb, var(--tint) 22%, transparent);
  color: color-mix(in srgb, var(--tint) 70%, #fff);
}

:is(.pg-dmo, .pg-ai, .pg-rs) .ea-steps .ea-num {
  color: #fff;
  opacity: .5;
}

:is(.pg-dmo, .pg-ai, .pg-rs) .ea-steps .ea-sub-t {
  color: rgba(255,255,255,.8);
}
