/* Metanor page CSS: the brand tile, the language switcher, the six approach tiles, the hero film, RTL */
.brand-tile { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 6px; background: #1f4e8a; color: #f4f4f4; }
.brand-tile svg { display: block; height: 20px; width: auto; }
.closing .brand-tile svg { height: 24px; }

/* Video preview and player share the same frame. */
main > section.hero.hero--film {
  height: auto;
  min-height: 0;
  padding-block: calc(var(--nav) + clamp(24px, 5vw, 72px)) clamp(28px, 5vw, 76px);
}
.hero--film > .film-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  grid-template-rows: auto;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  height: auto;
}
.film-hero__copy h1 { font-size: clamp(34px, 4.1vw, 66px); }
.hero--film .hero__media {
  position: relative;
  display: block;
  min-height: 0;
  aspect-ratio: 16 / 9;
  background: #060c18;
}
.hero--film .hero__media > video { object-fit: contain; }
.hero--film .hero__media > .ly-play {
  position: absolute;
  inset: 0;
  width: 100%;
  display: grid;
  place-items: center;
}
.hero--film .ly-play__disc {
  width: clamp(72px, 8vw, 116px);
  height: clamp(72px, 8vw, 116px);
  background: #c9a84c;
  color: #070c14;
  box-shadow: 0 0 0 6px rgba(7, 12, 20, .45), 0 10px 30px rgba(0, 0, 0, .45);
}
.hero--film .ly-play__disc svg { width: 38%; height: 38%; }
.hero--film .ly-play:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.film-hero__caption { margin: 10px 0 0; color: var(--muted); font-size: var(--t-small); }

.hero.hero--film:has(> :is(.film-hero--stacked, .film-hero--video-first)) {
  padding-block-start: calc(var(--nav) + clamp(20px, 3vw, 40px));
}
main > section.hero.hero--film > .wrap:is(.film-hero--stacked, .film-hero--video-first) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: clamp(18px, 2.5vw, 32px);
}
.film-hero--stacked .film-hero__video {
  width: min(100%, 960px);
  margin: 0;
  scroll-margin-block-start: calc(var(--nav) + 16px);
}
.film-hero__intro {
  margin: 10px auto 0;
  max-width: 64ch;
  text-align: center;
  color: var(--muted);
  font-size: .875rem;
}
.film-hero__play-label {
  position: absolute;
  inset-block-start: clamp(10px, 1.7vw, 20px);
  inset-inline-start: clamp(10px, 1.7vw, 20px);
  padding: 4px 9px;
  border-radius: var(--r-btn);
  background: #070c14;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 500;
}
.film-hero__details {
  display: block;
  margin-block-start: 2px;
  font-size: inherit;
}
.film-hero--stacked .film-hero__copy {
  width: min(100%, 900px);
  text-align: center;
}
.film-hero--stacked .hero__lead { margin-inline: auto; }
.film-hero--stacked .btn-row { justify-content: center; }
.film-hero--video-first .film-hero__video { width: min(100%, 1100px); }
.film-hero--video-first .film-hero__copy { width: min(100%, 900px); text-align: center; }
.film-hero--video-first .hero__lead { margin-inline: auto; }
.film-hero--video-first .btn-row { justify-content: center; }
.film-hero--video-first .film-hero__caption { text-align: center; }
.film-hero--stacked .film-hero__actions--desktop { display: none; }

@media (min-width: 700px) {
  main > section.hero.hero--film > .wrap.film-hero--stacked {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: clamp(28px, 4vw, 56px);
  }
  .film-hero--stacked .film-hero__copy {
    grid-area: 1 / 1;
    text-align: start;
  }
  .film-hero--stacked .film-hero__video { grid-area: 1 / 2; }
  .film-hero--stacked .hero__lead { margin-inline: 0; }
  .film-hero--stacked .btn-row { justify-content: flex-start; }
  .film-hero--stacked .film-hero__actions--desktop { display: flex; }
  .film-hero--stacked .film-hero__actions--mobile { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .is-scroll-image-revealed[data-scroll-image="icon"] {
    animation: scroll-icon-in 250ms var(--m-ease-enter);
  }
}

@keyframes scroll-icon-in {
  from { opacity: .5; transform: translateY(3px) scale(.95); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  circle:has(> [data-art-pulse]) { display: none; }
}

.language-switch {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  margin-inline-start: auto;
}
.language-switch a {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding-inline: 9px;
  border-radius: inherit;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}
.language-switch a:hover,
.language-switch a[aria-current="page"] { background: var(--p-accent); color: var(--p-accent-ink); }
.language-switch a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.nav__bar > .nav__toggle { margin-inline: 0; }
@media (min-width: 1024px) {
  .nav--centre .nav__bar {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: clamp(10px, 1.6vw, 24px);
  }
  .nav--centre .language-switch { grid-column: 3; grid-row: 1; }
  .nav--centre .nav__actions { grid-column: 4; }
}
@media (max-width: 767px) {
  .hero--film > .film-hero { grid-template-columns: minmax(0, 1fr); }
}

[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--font-text); }

/* service and client cards: one panel height a row; the generated covers fill the panel */
#services .panel, #clients .panel { --p-h: 320px; }
#clients .panel .frame__img { object-fit: cover; }
.card--link { color: inherit; text-decoration: none; }
.card--link .link { margin-top: var(--s-4); display: inline-flex; gap: var(--s-2); align-items: center; color: var(--accent); }
@media (max-width: 639px) { #services .panel, #clients .panel { --p-h: 200px; } }

/* the approach: six rows beside one illustration */
.diff { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; }
.diff li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.diff li:first-child { padding-top: 0; }
.diff img { width: 24px; height: 24px; margin-top: 2px; filter: invert(76%) sepia(32%) saturate(640%) hue-rotate(2deg) brightness(92%); }
.diff strong { display: block; font: 500 var(--t-body)/1.4 var(--font-text); color: var(--ink); }
.diff p { color: var(--muted); }
.approach-art { margin: 0; border-radius: var(--r-lg); overflow: hidden; height: min(660px, var(--ly-fit, 660px)); }
.approach-art > :is(img, svg) { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 1023px) { .approach-art { height: auto; aspect-ratio: 16 / 9; margin-top: var(--s-6); } }

/* Arabic pages */
html[dir="rtl"] body { font-family: "IBM Plex Sans Arabic", var(--font-text); }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] .mo-wh__text { font-family: "IBM Plex Sans Arabic", var(--font-display); letter-spacing: 0; }
html[dir="rtl"] .m-arrow { transform: scaleX(-1); }

/* the tablet and the phone: whole screens */
@media (max-width: 639px) {
}

/* the Wahat page: the four steps at rest on the tablet and the phone, on whole screens */
@media (min-width: 640px) and (max-width: 1023px) {
  main > #steps[data-moment]:not(.is-live) { height: calc(2 * 100svh); min-height: 0; }
  #steps[data-moment]:not(.is-live) .mo-pc__step { grid-template-columns: minmax(0, 1fr); }
  #steps[data-moment]:not(.is-live) .mo-pc__step .mo-pc__visual { grid-column: 1; grid-row: auto; margin-top: var(--s-3); }
  #steps[data-moment]:not(.is-live) .mo-pc__visual > img { aspect-ratio: 5 / 2; max-height: none; }
}
@media (max-width: 639px) {
  main > #steps[data-moment]:not(.is-live) { height: auto; min-height: calc(2 * 100lvh); }
}
@media (max-width: 639px) {
  #services .panel { --p-h: 300px; }
  .diff li { grid-template-columns: minmax(0, 1fr); }
  .diff img { display: none; }
}

/* ---- Content-height sections (the client asked for no empty screens): every section is as tall as
   what it holds, with one even rhythm of padding; the pinned Wahat steps keep their own height. */
main > :is(section, .section):not(.hero):not([data-moment="pinned-chapters"]),
footer.closing {
  height: auto !important; min-height: 0 !important;
  padding: 112px 0 112px;
}
main > :is(section, .section):not(.hero) > .wrap, footer.closing > .wrap { height: auto; }
main > section.section + section.section { padding-top: 32px; }
#principle { padding-block: 64px 96px !important; }
@media (min-width: 1024px) {
  #principle { padding-block: 96px 120px !important; }
  #principle .t-label { font-size: 1rem; }
  #principle .mo-wh__text {
    margin-block-start: var(--s-4);
    max-width: 31ch;
    font-family: var(--font-display, inherit);
    font-size: clamp(2.25rem, 3.6vw, 3.75rem);
    line-height: 1.16;
    text-wrap: balance;
  }
}
footer.closing { padding: 64px 0 calc(48px + var(--bar, 0px)); border-top: 1px solid rgba(255,255,255,.08); }
footer.closing > .wrap { display: block; }
#book { background: var(--p-surface); padding-top: 112px !important; }
.approach-art { height: auto; aspect-ratio: 1 / 1; max-height: 620px; }
#difference .grid--top { align-items: center; }
#clients .panel, #services .panel { --p-h: 300px; }

/* the booking section */
.book__steps { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: grid; gap: var(--s-6); }
.book__steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.book__n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--p-accent); color: var(--p-accent); font-weight: 500; }
.book__steps strong { display: block; font-weight: 500; margin-bottom: var(--s-1); }
.book__steps p { color: var(--muted); }
.book__form { padding: var(--s-7); border-radius: var(--r-lg); background: var(--p-bg); border: 1px solid rgba(255,255,255,.10); }
.book__form .field :is(input, select, textarea) { background: #0a1220; color: var(--p-ink); border: 1px solid rgba(255,255,255,.16); }
.book__form .field :is(input, select, textarea):focus { border-color: var(--p-accent); }
.book__form .btn { width: 100%; justify-content: center; }

/* tablet */
@media (min-width: 640px) and (max-width: 1023px) {
  main > :is(section, .section):not(.hero):not([data-moment="pinned-chapters"]) { padding-block: 96px; }
  #book .grid > * , #difference .grid > * { grid-column: 1 / -1; }
  .book__form { margin-top: var(--s-7); }
  .approach-art { max-width: 520px; }
}
/* phone */
@media (max-width: 639px) {
  main > :is(section, .section):not(.hero):not([data-moment="pinned-chapters"]) { padding-block: 72px; }
  main > section.section + section.section { padding-top: 24px; }
  #principle { padding-block: 64px 80px !important; }
  #book { padding-top: 72px !important; }
  .book__form { padding: var(--s-5); margin-top: var(--s-6); }
  #services .panel, #clients .panel { --p-h: 200px; }
  .approach-art { margin-top: var(--s-6); max-height: 360px; aspect-ratio: 4 / 3; }
  .mo-wh__text { font-size: 28px; }
  .footer__legal { flex-wrap: wrap; gap: var(--s-3); }
}

/* Phone footer */
@media (max-width: 639px) {
  .closing__links > .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6) var(--s-4); }
  .closing__links > .grid > :first-child { grid-column: 1 / -1; }
  .closing__links > .grid > * { grid-column: auto; }
  .footer__col h3 { margin-bottom: var(--s-2); }
  .footer__col li a { display: inline-flex; min-height: 44px; align-items: center; }
}
