.reset {
  background: #dcebf8;
}

.reset-wordmark {
  z-index: 1;
  margin-top: auto;
  display: flex;
  align-items: baseline;
  letter-spacing: -.08em;
}

.reset-wordmark strong {
  font-size: clamp(50px, 5.5vw, 78px);
  line-height: 1;
}

.reset-wordmark span {
  font: 500 clamp(44px, 4.8vw, 68px)/1 var(--serif);
  font-style: italic;
}

.reset-wordmark b {
  color: var(--blue);
  font-size: 74px;
  line-height: .2;
}

.reset-shape {
  position: absolute;
  right: 9%;
  top: 12%;
  width: 270px;
  height: 310px;
  padding: 92px 34px 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  border-radius: 135px 135px 14px 14px;
  background: linear-gradient(160deg, #0485f7, #4aa8fb 55%, #bcdcfa);
  transform: rotate(7deg);
}

.reset-shape i {
  position: relative;
  display: block;
  height: 14px;
  margin-left: 46px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .85);
}

.reset-shape i::before {
  content: "";
  position: absolute;
  left: -46px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border: 3px solid #fff;
  border-radius: 50%;
}

.reset-shape i:nth-child(1) {
  width: 55%;
  background: rgba(255, 255, 255, .45);
}

.reset-shape i:nth-child(1)::before {
  background: var(--lime);
  border-color: var(--lime);
}

.reset-shape i:nth-child(2) {
  width: 78%;
}

.reset-shape i:nth-child(3) {
  width: 62%;
}

@media (max-width: 800px) {
  .reset-shape {
    width: 215px;
    height: 245px;
    padding: 70px 26px 0;
    gap: 26px;
  }

  .reset-shape i {
    height: 12px;
    margin-left: 38px;
  }

  .reset-shape i::before {
    left: -38px;
    width: 24px;
    height: 24px;
    margin-top: -12px;
  }
}

/* An odd card out spans the whole row instead of leaving a gap beside it. */
.product-list > .product-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.videoura {
  background: #0b0b12;
  color: var(--paper);
}

.videoura-wordmark {
  z-index: 1;
  margin-top: auto;
  display: flex;
  align-items: baseline;
  letter-spacing: -.08em;
}

.videoura-wordmark strong {
  font-size: clamp(50px, 5.5vw, 78px);
  line-height: 1;
}

.videoura-wordmark span {
  font: 500 clamp(44px, 4.8vw, 68px)/1 var(--serif);
  font-style: italic;
}

.videoura-wordmark b {
  color: #ff6aa8;
  font-size: 74px;
  line-height: .2;
}

.videoura-shape {
  position: absolute;
  right: 9%;
  top: 14%;
  width: 380px;
  height: 230px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 22%, rgba(169, 139, 255, .95), transparent 55%),
    radial-gradient(circle at 85% 28%, rgba(255, 106, 168, .9), transparent 55%),
    radial-gradient(circle at 55% 95%, rgba(255, 196, 107, .95), transparent 60%),
    #1a1626;
  box-shadow: 0 30px 80px rgba(255, 106, 168, .18);
  transform: rotate(-6deg);
}

/* Play button */
.videoura-shape::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  margin: -26px 0 0 -16px;
  border-style: solid;
  border-width: 26px 0 26px 44px;
  border-color: transparent transparent transparent #fff;
}

/* Playback progress */
.videoura-shape i {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .3);
}

.videoura-shape i::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 38%;
  border-radius: 3px;
  background: #fff;
}

@media (max-width: 800px) {
  .videoura-shape {
    width: 250px;
    height: 155px;
    border-radius: 16px;
  }

  .videoura-shape::before {
    margin: -18px 0 0 -11px;
    border-width: 18px 0 18px 30px;
  }

  .videoura-shape i {
    left: 16px;
    right: 16px;
    bottom: 14px;
    height: 5px;
  }
}

/* Language switcher */
.header-end {
  display: flex;
  align-items: center;
  gap: 22px;
}

.lang-switch {
  display: flex;
  gap: 14px;
  font: 500 11px/1 var(--mono);
  letter-spacing: .04em;
}

.lang-switch a {
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  opacity: .55;
  transition: opacity .2s;
}

.lang-switch a:hover,
.lang-switch a[aria-current="page"] {
  border-bottom-color: var(--ink);
  opacity: 1;
}

/* Arabic: Noto Kufi Arabic for the text, the Latin brand marks keep their fonts. */
html[lang="ar"] {
  --sans: "Noto Kufi Arabic", sans-serif;
  --mono: "Noto Kufi Arabic", sans-serif;
}

html[lang="ar"] :is(.brand, .portrait-wordmark, .reset-wordmark, .videoura-wordmark) {
  font-family: "Manrope", sans-serif;
  direction: ltr;
}

/* The footer logo fills its grid cell: keep it on the right edge. */
html[dir="rtl"] .brand {
  justify-content: flex-end;
}

/* Arabic letters join up: any tracking pulls the words apart. */
html[lang="ar"] :is(h1, h2, h3, h1 em, h2 em, .section-label, .card-topline, .art-caption, .lang-switch) {
  letter-spacing: 0;
}

html[lang="ar"] :is(h1, h2) {
  line-height: 1.3;
}

html[lang="ar"] :is(h1 em, h2 em) {
  font-family: var(--sans);
  font-style: normal;
}

/* Right-to-left: mirror what styles.css places with physical left/right. */
/* Overflow on the left is scrollable in RTL, so the hidden skip link goes off the right edge. */
html[dir="rtl"] .skip-link {
  left: auto;
  right: -999px;
}

html[dir="rtl"] .skip-link:focus {
  right: 16px;
}

html[dir="rtl"] .nav a::after {
  left: auto;
  right: 0;
  transform-origin: right;
}

html[dir="rtl"] :is(.text-action, .card-link, .scroll-note) span {
  margin-left: 0;
  margin-right: 8px;
}

html[dir="rtl"] .art-caption {
  left: 16px;
  right: auto;
}

html[dir="rtl"] .art-caption span {
  margin-left: 0;
  margin-right: 25px;
}

html[dir="rtl"] .service-grid > div:nth-child(odd) {
  margin-left: 24px;
  margin-right: 0;
}

html[dir="rtl"] :is(.portrait-shape, .reset-shape, .videoura-shape) {
  left: 9%;
  right: auto;
}

/* Wordmarks read left to right but sit on the right edge, like the text around them. */
html[dir="rtl"] :is(.portrait-wordmark, .reset-wordmark, .videoura-wordmark) {
  justify-content: flex-end;
}

@media (max-width: 420px) {
  html[dir="rtl"] .service-grid > div:nth-child(odd) {
    margin-left: 0;
  }
}

/* "More ideas are taking shape" band after the products */
.product-next {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 20px;
  padding: 26px 27px;
  border: 1px dashed rgba(17, 20, 23, .3);
}

.product-next-shape {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%;
  background: var(--lime);
}

.product-next-label {
  margin: 0 0 8px;
  font: 500 10px var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.product-next-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.05em;
}

.product-next-title em {
  font-family: var(--serif);
  font-weight: 500;
}

.product-next-dots i {
  font-style: normal;
}

html[lang="ar"] :is(.product-next-label, .product-next-title) {
  letter-spacing: 0;
}

html[lang="ar"] .product-next-title em {
  font-family: var(--sans);
  font-style: normal;
}

/*
 * Landing animation, "an idea taking shape". Everything below only runs with
 * html.motion, which the inline script in <head> sets unless the visitor asked
 * for reduced motion: without it the page stays exactly as designed, static.
 */

/* Act 1: the logo builds itself, the headline rises word by word and gets
   underlined, and the sculpture opens from an arch. */
.motion .site-header .brand-mark i {
  transform-origin: bottom;
  animation: wi-grow .6s cubic-bezier(.2, .8, .2, 1) both;
}

.motion .site-header .brand-mark i:nth-child(2) {
  animation-delay: .12s;
}

.motion .site-header .brand-mark i:nth-child(3) {
  animation-delay: .24s;
}

.motion .hero h1 .word {
  display: inline-block;
  animation: wi-rise .8s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(.25s + var(--i) * 70ms);
}

.motion .hero h1 em {
  background: linear-gradient(var(--lime), var(--lime)) no-repeat left 0 bottom .06em / 0 .14em;
  animation: wi-underline .9s cubic-bezier(.6, 0, .2, 1) forwards;
  animation-delay: calc(.55s + var(--words, 8) * 70ms);
}

html.motion[dir="rtl"] .hero h1 em {
  background-position: right 0 bottom .06em;
}

.motion .hero-art img {
  animation: wi-arch 1.4s cubic-bezier(.6, 0, .2, 1) .15s both;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

.motion .art-caption {
  animation: wi-fade .6s ease 1.3s both;
}

/* Act 2: the caption ticker swaps its text with a short fade. */
.art-ticker {
  display: inline-block;
  transition: opacity .35s ease, transform .35s ease;
}

.art-ticker.is-out {
  opacity: 0;
  transform: translateY(6px);
}

/* Act 3: each product card plays what the product does once it scrolls in. */
.motion .portrait.visible .portrait-shape {
  animation: wi-portrait-in 1.1s cubic-bezier(.2, .8, .2, 1) .1s both;
}

.motion .portrait.visible .portrait-shape :is(span, i) {
  animation: wi-develop 1s ease-out .7s both;
}

.motion .portrait.visible .portrait-shape i {
  animation-delay: .9s;
}

.motion .reset.visible .reset-shape {
  animation: wi-reset-in .9s cubic-bezier(.2, .8, .2, 1) both;
}

.motion .reset.visible .reset-shape i {
  animation: wi-bar .6s ease-out both, wi-done .35s ease-out both;
}

.motion .reset.visible .reset-shape i::before {
  animation: wi-check .4s ease-out both;
}

.motion .reset.visible .reset-shape i:nth-child(1) {
  animation-delay: .35s, 1s;
}

.motion .reset.visible .reset-shape i:nth-child(1)::before {
  animation-delay: 1s;
}

.motion .reset.visible .reset-shape i:nth-child(2) {
  animation-delay: .5s, 1.5s;
}

.motion .reset.visible .reset-shape i:nth-child(2)::before {
  animation-delay: 1.5s;
}

.motion .reset.visible .reset-shape i:nth-child(3) {
  animation-delay: .65s, 2s;
}

.motion .reset.visible .reset-shape i:nth-child(3)::before {
  animation-delay: 2s;
}

.motion .videoura .videoura-shape {
  background-size: 160% 160%;
}

.motion .videoura.visible .videoura-shape {
  animation: wi-videoura-in 1s cubic-bezier(.2, .8, .2, 1) both, wi-aurora 9s ease-in-out 1s infinite alternate;
}

.motion .videoura.visible .videoura-shape::before {
  animation: wi-pulse .9s ease-in-out 1s 2;
}

.motion .videoura.visible .videoura-shape i::before {
  animation: wi-progress 2.4s cubic-bezier(.3, .6, .3, 1) 1.1s both;
}

/* After Videoura: the shape keeps morphing through the products' colours,
   ending on lime for what comes next, while the dots keep typing. */
.motion .product-next.visible .product-next-shape {
  animation: wi-morph 8s ease-in-out infinite;
}

.motion .product-next.visible .product-next-dots i {
  animation: wi-dot 1.4s ease-in-out infinite both;
}

.motion .product-next.visible .product-next-dots i:nth-child(2) {
  animation-delay: .2s;
}

.motion .product-next.visible .product-next-dots i:nth-child(3) {
  animation-delay: .4s;
}

/* Act 4: the approach points arrive one after the other (their numbers spin in script.js). */
.motion .service-grid > div {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}

.motion .consulting-content.visible .service-grid > div {
  opacity: 1;
  transform: none;
}

.motion .consulting-content.visible .service-grid > div:nth-child(2) { transition-delay: .1s; }
.motion .consulting-content.visible .service-grid > div:nth-child(3) { transition-delay: .2s; }
.motion .consulting-content.visible .service-grid > div:nth-child(4) { transition-delay: .3s; }
.motion .consulting-content.visible .service-grid > div:nth-child(5) { transition-delay: .4s; }
.motion .consulting-content.visible .service-grid > div:nth-child(6) { transition-delay: .5s; }

@keyframes wi-grow {
  from { transform: scaleY(0); }
}

@keyframes wi-rise {
  from { opacity: 0; transform: translateY(.45em); }
}

@keyframes wi-underline {
  to { background-size: 100% .14em; }
}

@keyframes wi-arch {
  from { clip-path: inset(22% 30% 0 30% round 50% 50% 0 0); }
  to { clip-path: inset(0 0 0 0 round 0); }
}

@keyframes wi-fade {
  from { opacity: 0; }
}

@keyframes wi-portrait-in {
  from { opacity: 0; transform: rotate(-45deg) scale(.8); }
}

@keyframes wi-develop {
  from { opacity: 0; filter: blur(10px); transform: scale(.9); }
}

@keyframes wi-reset-in {
  from { opacity: 0; transform: translateY(30px) rotate(14deg); }
}

@keyframes wi-bar {
  from { width: 0; }
}

@keyframes wi-done {
  from { background: rgba(255, 255, 255, .85); }
  to { background: rgba(255, 255, 255, .45); }
}

@keyframes wi-check {
  0% { background: transparent; border-color: #fff; transform: scale(1); }
  60% { transform: scale(1.25); }
  100% { background: var(--lime); border-color: var(--lime); transform: scale(1); }
}

@keyframes wi-videoura-in {
  from { opacity: 0; transform: rotate(-14deg) scale(.85); }
}

@keyframes wi-aurora {
  from { background-position: 0 0; }
  to { background-position: 100% 100%; }
}

@keyframes wi-pulse {
  50% { transform: scale(1.3); }
}

@keyframes wi-progress {
  from { width: 0; }
}

@keyframes wi-morph {
  0%, 100% { border-radius: 50%; background: #ff6c4d; transform: rotate(0); }
  25% { border-radius: 50% 50% 12% 12%; background: #0485f7; transform: rotate(90deg); }
  50% { border-radius: 22%; background: #ff6aa8; transform: rotate(180deg); }
  75% { border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%; background: var(--lime); transform: rotate(270deg); }
}

@keyframes wi-dot {
  0%, 80%, 100% { opacity: .15; }
  40% { opacity: 1; }
}
