/* MrWeb — one scene, one object. Light only. */

@font-face {
  font-family: "Estedad";
  src: url("../fonts/Estedad-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Estedad";
  src: url("../fonts/Estedad-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/InterTight-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026;
}

:root {
  --paper: #f5f5f2;
  --ink: #15171c;
  --mut: #666a74;
  --line: rgba(21, 23, 28, .13);
  --fa: "Estedad", Tahoma, sans-serif;
  --en: "Inter Tight", "Estedad", Tahoma, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --snaps: 6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--paper);
}
body {
  font-family: var(--fa);
  font-weight: 400;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
b { font-weight: inherit; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
/* read out, not shown */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- scroll: snap points over one pinned stage ---------- */

.scroller {
  position: fixed;
  inset: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  overscroll-behavior: none;
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.track { position: relative; height: calc(var(--snaps) * 100%); }
.snaps { position: absolute; inset: 0; pointer-events: none; }
.snaps i { display: block; height: calc(100% / var(--snaps)); scroll-snap-align: start; scroll-snap-stop: always; }

.stage {
  position: sticky;
  top: 0;
  height: calc(100% / var(--snaps));
  overflow: hidden;
  container-type: size;
  background:
    radial-gradient(120% 90% at 50% 40%, #fbfbf9 0%, var(--paper) 55%, #ecece8 100%);
}
/* fine paper grain, keeps the gradients from banding */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .5;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- colour of each platform, spread behind the object ---------- */

.wash { position: absolute; inset: -12%; z-index: 0; pointer-events: none; animation: drift 16s ease-in-out infinite alternate; }
.wash i {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity;
  background:
    radial-gradient(40% 44% at 44% 50%, var(--c1), transparent 72%),
    radial-gradient(30% 36% at 63% 62%, var(--c2), transparent 72%);
}
.wash i[data-p="itahlil"]   { --c1: rgba(19, 37, 75, .22);  --c2: rgba(121, 1, 55, .17); }
.wash i[data-p="acavest"]   { --c1: rgba(237, 194, 0, .46); --c2: rgba(255, 222, 96, .36); }
.wash i[data-p="forexpand"] { --c1: rgba(0, 91, 135, .24);  --c2: rgba(38, 176, 186, .22); }
@keyframes drift {
  from { transform: translate3d(-1.5%, -1%, 0); }
  to   { transform: translate3d(1.5%, 1.2%, 0); }
}

/* ---------- the big name that passes behind the object ---------- */

.names { position: absolute; inset: 0; z-index: 2; pointer-events: none; direction: ltr; }
.name {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  font-family: var(--en);
  font-weight: 250;
  letter-spacing: -.055em;
  line-height: 1;
  opacity: 0;
  will-change: transform, opacity;
  transform-origin: 0 0;
}
.name[data-p="itahlil"]   { color: rgba(19, 37, 75, .2); }
.name[data-p="acavest"]   { color: rgba(214, 170, 0, .85); }
.name[data-p="forexpand"] { color: rgba(0, 91, 135, .22); }

/* ---------- the object ---------- */

.shadow {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  background: radial-gradient(closest-side, rgba(16, 18, 26, .34), rgba(16, 18, 26, .12) 52%, rgba(16, 18, 26, 0));
}

.rig {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  perspective: 2400px;
  perspective-origin: 50% 46%;
}
/* no opacity in will-change here: it would flatten the box and mirror its back face */
.obj {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  --t: 5px;
  --r: 12px;
  --edge: #dfe0e4;
}
.obj--p { --r: 24px; }
[data-mode="tall"] .obj--s { --r: 24px; }

.face {
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(21, 23, 28, .09), 0 26px 54px -20px rgba(21, 23, 28, .26);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(calc(var(--t) / 2));
}
.face--b { transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); }

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  container-type: size;
  border-radius: var(--r);
  background: #fff;
}
.screen video, .screen .still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}
.screen video { display: none; }
.screen video.is-on { display: block; }

/* a tall, sharp picture of the page that scrolls by itself */
.screen .pan {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  display: none;
  will-change: transform;
  animation: pan 46s linear infinite paused;
}
.screen .pan.is-on { display: block; }
.screen .pan.is-playing { animation-play-state: running; }
@keyframes pan {
  0%, 4%    { transform: translate3d(0, 0, 0); animation-timing-function: cubic-bezier(.3, 0, .7, 1); }
  88%, 91%  { transform: translate3d(0, calc(100cqh - 100%), 0); animation-timing-function: cubic-bezier(.6, 0, .2, 1); }
  100%      { transform: translate3d(0, 0, 0); }
}

/* a soft sheen that slides as the object turns */
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .16) 48%, transparent 60%);
  background-size: 260% 100%;
  background-position: var(--sheen, 50%) 0;
  mix-blend-mode: soft-light;
}

.core {
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  background: var(--edge);
}
.core:nth-child(1) { transform: translateZ(calc(var(--t) / -4)); }
.core:nth-child(3) { transform: translateZ(calc(var(--t) / 4)); }

.side { position: absolute; background: var(--edge); }
.side--l, .side--r { top: var(--r); bottom: var(--r); width: var(--t); transform: rotateY(90deg); }
.side--l { left: calc(var(--t) / -2); }
.side--r { right: calc(var(--t) / -2); }
.side--t, .side--u { left: var(--r); right: var(--r); height: var(--t); transform: rotateX(90deg); }
.side--t { top: calc(var(--t) / -2); }
.side--u { bottom: calc(var(--t) / -2); }

/* ---------- slogan: one line above the three platforms ---------- */

.slogan {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--st, 24%);
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: .32em;
  pointer-events: none;
  white-space: nowrap;
  font-weight: 500;
  font-size: clamp(20px, 2.3cqw, 40px);
  line-height: 1.7;
  opacity: 0;
  will-change: transform, opacity;
}
[data-mode="tall"] .slogan { font-size: clamp(19px, 5.8cqw, 30px); }

/* ---------- words about each platform ---------- */

.info { position: absolute; z-index: 6; pointer-events: none; }
.info article { position: absolute; inset: 0 0 auto 0; }
.info article > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .25s linear, transform .25s linear;
}
.info article.is-on > * {
  opacity: 1;
  transform: none;
  transition: opacity .8s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms + 180ms);
}
.info article > :nth-child(2) { --i: 1; }
.info article > :nth-child(3) { --i: 2; }

.i-name {
  font-family: var(--en);
  font-weight: 500;
  font-size: clamp(24px, 2.1cqw, 34px);
  line-height: 1.15;
  letter-spacing: -.03em;
  text-align: right;
}
.i-line { margin-top: 10px; font-size: clamp(15px, 1.15cqw, 17px); line-height: 1.9; }
.i-facts { list-style: none; margin-top: 20px; border-bottom: 1px solid var(--line); }
.i-facts li { padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.8; color: var(--mut); }

[data-mode="mid"] .info article, [data-mode="tall"] .info article { text-align: center; }
[data-mode="mid"] .i-name, [data-mode="tall"] .i-name { text-align: center; }
[data-mode="mid"] .i-facts, [data-mode="tall"] .i-facts { display: none; }
[data-mode="mid"] .i-line, [data-mode="tall"] .i-line { margin-top: 6px; }
[data-mode="tall"] .i-name { font-size: clamp(22px, 6.6cqw, 30px); }
[data-mode="tall"] .i-line { font-size: 15px; }

/* ---------- contact: the last scene, just a title and the address ---------- */

.end { position: absolute; left: 0; right: 0; top: 50%; z-index: 6; pointer-events: none; text-align: center; transform: translateY(-58%); }
.end > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .25s linear, transform .25s linear;
}
.end.is-on > * {
  opacity: 1;
  transform: none;
  transition: opacity .8s var(--ease), transform .9s var(--ease);
  transition-delay: 180ms;
}
.end.is-on > .end-b { transition-delay: 280ms; pointer-events: auto; }
.end-a { display: block; font-weight: 500; font-size: clamp(20px, 1.9cqw, 28px); line-height: 1.7; }
.end-b {
  display: inline-block;
  margin-top: 10px;
  padding-bottom: 2px;
  font-family: var(--en);
  font-weight: 400;
  font-size: clamp(22px, 2.5cqw, 38px);
  line-height: 1.5;
  letter-spacing: -.02em;
  background: linear-gradient(currentColor, currentColor) 50% 100% / 0 1px no-repeat;
}
.end-b:hover { background-size: 100% 1px; }
[data-mode="tall"] .end-b { font-size: clamp(22px, 6.6cqw, 30px); }
.end-c { margin-top: clamp(30px, 7cqh, 64px); font-size: 13px; line-height: 1.8; color: var(--mut); }
.end.is-on > .end-c { transition-delay: 400ms; }

/* ---------- the little that stays on screen ---------- */

.brand {
  position: absolute;
  z-index: 7;
  top: clamp(16px, 3.4cqh, 34px);
  right: clamp(18px, 3.4cqw, 52px);
  font-family: var(--en);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -.03em;
  opacity: 0;
  transition: opacity 1.2s linear .9s;
}

.rail {
  position: absolute;
  z-index: 7;
  left: clamp(12px, 2.6cqw, 40px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  direction: ltr;
  opacity: 0;
  transition: opacity 1.2s linear 1.1s;
}
.rail button {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 22px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.rail i { display: block; width: 14px; height: 1px; background: currentColor; opacity: .3; transition: width .6s var(--ease), opacity .6s linear; }
.rail button.is-on i { width: 34px; opacity: 1; }
.rail span { font-family: var(--en); font-size: 12px; letter-spacing: .02em; opacity: 0; transform: translateX(-6px); transition: opacity .35s linear, transform .5s var(--ease); }
.rail span.fa { font-family: var(--fa); letter-spacing: 0; }
.rail:hover span { opacity: .75; transform: none; }
.rail button:hover i { opacity: 1; }
/* on phones the rail only gets in the way */
[data-mode="tall"] .rail { display: none; }

.hint {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: clamp(14px, 3.4cqh, 34px);
  width: 1px;
  height: clamp(30px, 6cqh, 54px);
  overflow: hidden;
  background: var(--line);
  opacity: 0;
  transition: opacity .8s linear 1.6s;
}
.hint i { position: absolute; left: 0; top: 0; width: 1px; height: 46%; background: var(--ink); animation: hint 2.2s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes hint { from { transform: translateY(-110%); } to { transform: translateY(240%); } }

.is-in .brand, .is-in .rail { opacity: 1; }
.is-in .hint { opacity: 1; }
.is-in .hint.is-off { opacity: 0; transition-delay: 0s; transition-duration: .3s; }

@media (prefers-reduced-motion: reduce) {
  .wash, .hint i, .screen .pan { animation: none; }
  .end > *, .info article > * { transition-duration: .01s !important; transition-delay: 0s !important; }
}

/* ---------- without scripts: the same words as a plain page ---------- */

.no-js, .no-js body { height: auto; overflow: auto; }
.no-js .scroller { position: static; overflow: visible; scroll-snap-type: none; }
.no-js .track { height: auto; }
.no-js .stage { position: static; height: auto; overflow: visible; container-type: normal; padding: 110px 24px 80px; text-align: center; }
.no-js .wash, .no-js .names, .no-js .shadow, .no-js .rig, .no-js .rail, .no-js .hint, .no-js .snaps { display: none; }
.no-js .slogan, .no-js .info, .no-js .end, .no-js .info article { position: static; opacity: 1; transform: none; }
.no-js .slogan { flex-wrap: wrap; font-size: clamp(22px, 5vw, 40px); white-space: normal; }
.no-js .info article { margin-top: 64px; }
.no-js .info article > *, .no-js .end > * { opacity: 1; transform: none; }
.no-js .i-name { text-align: center; font-size: 30px; }
.no-js .i-line { font-size: 16px; }
.no-js .i-facts { max-width: 420px; margin-inline: auto; }
.no-js .end { margin-top: 88px; }
.no-js .end-a { font-size: 22px; }
.no-js .end-b { font-size: 26px; pointer-events: auto; }
.no-js .brand { opacity: 1; }
