@font-face {
  font-family: "Montserrat ARfi";
  src:
    url("Medias/Montserrat-Light.ttf") format("truetype"),
    url("Medias/montserrat-light.ttf") format("truetype"),
    url("Medias/font.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --arfi-green: #c2ff51;
  --arfi-black: #101010;

  --hero-progress: 0;

  --ease-main: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.25, 1, 0.5, 1);

  --logo-x: 0px;
  --logo-y: -8px;

  --album-a-y: 12vh;
  --album-b-y: 34vh;
  --album-c-y: 58vh;
  --album-d-y: 78vh;

  --album-a-x: 0px;
  --album-b-x: 0px;
  --album-c-x: 0px;
  --album-d-x: 0px;

  --float-a-x: 0px;
  --float-a-y: 0px;
  --float-b-x: 0px;
  --float-b-y: 0px;
  --float-c-x: 0px;
  --float-c-y: 0px;
  --float-d-x: 0px;
  --float-d-y: 0px;
  --float-e-x: 0px;
  --float-e-y: 0px;
  --float-f-x: 0px;
  --float-f-y: 0px;

  --album-tilt: 0deg;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;

  overflow-x: hidden;
  overflow-y: auto;

  background: var(--arfi-green);
  color: var(--arfi-black);

  font-family: "Montserrat ARfi", Montserrat, Arial, sans-serif;
  font-weight: 300;

  cursor: url("Medias/cursor.png") 8 4, auto;
}

/* Optimized moving album background:
   - One pseudo layer only.
   - No blur.
   - No drop-shadow.
   - 6 background images total instead of 12.
   - JS animation runs at 24 FPS.
*/

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;

  pointer-events: none;
  user-select: none;

  background-image:
    url("Medias/A.png"),
    url("Medias/B.png"),
    url("Medias/C.png"),
    url("Medias/D.png"),
    url("Medias/A.png"),
    url("Medias/C.png");

  background-repeat: no-repeat;

  background-size:
    clamp(210px, 23vw, 470px) auto,
    clamp(160px, 17vw, 350px) auto,
    clamp(165px, 18vw, 360px) auto,
    clamp(175px, 19vw, 390px) auto,
    clamp(120px, 13vw, 270px) auto,
    clamp(130px, 14vw, 290px) auto;

  background-position:
    left calc(var(--album-a-x) + var(--float-a-x)) top calc(var(--album-a-y) + var(--float-a-y)),
    right calc(var(--album-b-x) + var(--float-b-x)) top calc(var(--album-b-y) + var(--float-b-y)),
    left calc(var(--album-c-x) + var(--float-c-x)) top calc(var(--album-c-y) + var(--float-c-y)),
    right calc(var(--album-d-x) + var(--float-d-x)) top calc(var(--album-d-y) + var(--float-d-y)),
    left calc(42vw + var(--float-e-x)) top calc(22vh + var(--float-e-y)),
    right calc(34vw + var(--float-f-x)) top calc(63vh + var(--float-f-y));

  opacity: 0.26;

  filter:
    saturate(0.9)
    contrast(1.03);

  transform: rotate(var(--album-tilt));
  transform-origin: center;

  will-change: background-position, transform;
}

a,
button {
  font-family: inherit;
  cursor: url("Medias/cursor.png") 8 4, pointer;
}

/* Cursor */

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;

  width: clamp(54px, 5vw, 90px);
  height: auto;

  pointer-events: none;
  user-select: none;

  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(1);

  transition:
    opacity 90ms ease,
    transform 120ms ease;
}

.custom-cursor.is-visible {
  opacity: 1;
}

.custom-cursor.is-clicking {
  transform: translate3d(-50%, -50%, 0) scale(0.9);
}

.custom-cursor.is-hovering {
  transform: translate3d(-50%, -50%, 0) scale(1.08);
}

html.js-cursor-ready body,
html.js-cursor-ready a,
html.js-cursor-ready button {
  cursor: none;
}

@media (hover: none), (pointer: coarse) {
  .custom-cursor {
    display: none;
  }

  body,
  a,
  button,
  html.js-cursor-ready body,
  html.js-cursor-ready a,
  html.js-cursor-ready button {
    cursor: auto;
  }
}

/* Loader */

.loader {
  position: fixed;
  inset: 0;
  z-index: 9998;

  background: var(--arfi-green);

  opacity: 1;
  visibility: visible;

  animation: loaderExit 420ms var(--ease-main) 780ms forwards;
}

.loader-logo {
  position: absolute;
  left: 50%;
  top: 50%;

  width: clamp(220px, 30vw, 500px);
  max-width: 82vw;
  height: auto;

  user-select: none;
  pointer-events: none;

  transform:
    translate(
      calc(-50% + var(--logo-x)),
      calc(-50% + var(--logo-y))
    );

  animation: logoPulse 560ms var(--ease-main) infinite alternate;
}

.loading-bar {
  position: absolute;
  left: 50%;
  top: calc(50% + clamp(96px, 10.5vw, 158px));
  transform: translateX(-50%);

  width: clamp(190px, 24vw, 410px);
  height: clamp(5px, 0.55vw, 8px);

  border: 2px solid var(--arfi-black);
  border-radius: 999px;
  overflow: hidden;
}

.loading-fill {
  height: 100%;
  width: 0%;
  background: var(--arfi-black);
  border-radius: inherit;

  animation: loadingFill 700ms var(--ease-main) forwards;
}

@keyframes logoPulse {
  from {
    transform:
      translate(
        calc(-50% + var(--logo-x)),
        calc(-50% + var(--logo-y) + 2px)
      )
      scale(0.994);
  }

  to {
    transform:
      translate(
        calc(-50% + var(--logo-x)),
        calc(-50% + var(--logo-y) - 2px)
      )
      scale(1.006);
  }
}

@keyframes loadingFill {
  0% {
    width: 0%;
  }

  58% {
    width: 78%;
  }

  100% {
    width: 100%;
  }
}

@keyframes loaderExit {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.025);
  }
}

/* Kill old image album layers if they still exist in HTML */

.hero-albums,
.story-albums,
.hero-album,
.story-album,
.cinema-album {
  display: none !important;
}

/* Hero */

.hero {
  position: relative;
  z-index: 1;

  height: 155vh;
  background: transparent !important;
}

.hero-sticky {
  position: sticky;
  top: 0;
  z-index: 1;

  width: 100%;
  height: 100vh;

  background: transparent !important;
  overflow: hidden;
  isolation: isolate;
}

/* Buttons */

.pill-nav {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  width: min(88vw, 1680px);

  opacity: calc(1 - var(--hero-progress));

  transform:
    translate(
      -50%,
      calc(-50% - (var(--hero-progress) * 56vh))
    )
    scale(calc(1 - (var(--hero-progress) * 0.06)));
}

.pill {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: clamp(94px, 10vw, 180px);
  width: 50%;

  border: clamp(3px, 0.26vw, 5px) solid var(--arfi-black);
  border-radius: 999px;

  color: var(--arfi-black);
  background: transparent;
  text-decoration: none;

  font-size: clamp(58px, 8vw, 155px);
  line-height: 1;
  letter-spacing: -0.065em;
  font-weight: 300;

  transition:
    transform 260ms var(--ease-snap),
    letter-spacing 260ms var(--ease-snap),
    box-shadow 260ms var(--ease-snap);
}

.pill-left {
  padding: 0 clamp(48px, 7vw, 140px) 0 clamp(56px, 8vw, 160px);
}

.pill-right {
  margin-left: clamp(-58px, -3vw, -32px);
  padding: 0 clamp(56px, 8vw, 160px) 0 clamp(72px, 8vw, 170px);
}

.pill:hover {
  transform: translateY(-7px) scale(1.018);
  letter-spacing: -0.072em;
  box-shadow: 0 18px 0 rgba(16, 16, 16, 0.12);
}

/* LEARN MORE */

.learn-more {
  position: absolute;
  left: 50%;
  top: 79%;
  z-index: 5;

  width: 100vw;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  background: transparent;

  color: var(--arfi-black);
  text-decoration: none;
  text-transform: uppercase;

  font-size: clamp(96px, 16.4vw, 330px);
  line-height: 0.78;
  letter-spacing: -0.108em;
  font-weight: 300;
  white-space: nowrap;

  opacity: calc(1 - var(--hero-progress));

  transform:
    translate(
      -50%,
      calc(-50% - (var(--hero-progress) * 78vh))
    )
    scale(calc(1 - (var(--hero-progress) * 0.05)));

  transition:
    letter-spacing 260ms var(--ease-snap),
    transform 80ms linear,
    opacity 80ms linear;
}

.learn-more::after {
  content: "";
  position: absolute;
  left: 1vw;
  right: 1vw;
  bottom: -0.12em;

  height: clamp(7px, 0.75vw, 15px);

  background: var(--arfi-black);
  border-radius: 999px;

  transform: scaleX(0);
  transform-origin: center;

  transition: transform 260ms var(--ease-snap);
}

.learn-more:hover {
  letter-spacing: -0.118em;
}

.learn-more:hover::after {
  transform: scaleX(1);
}

/* Story */

.story {
  position: relative;
  z-index: 1;

  background: transparent !important;
  overflow: hidden;
  isolation: isolate;

  padding: 44vh 0 18vh 0;
}

.story-line {
  position: relative;
  z-index: 2;

  width: 100vw;
  padding: 0 1.1vw;
  margin: 0;

  background: transparent !important;
}

.story-line h2 {
  width: 100%;
  margin: 0 0 -0.095em 0;

  color: var(--arfi-black);
  text-transform: uppercase;
  text-align: left;

  font-size: clamp(82px, 15.8vw, 320px);
  line-height: 0.76;
  letter-spacing: -0.112em;
  font-weight: 300;
  font-style: normal;
}

.story-line:nth-of-type(odd) h2 {
  font-style: normal;
}

.story-line:nth-of-type(even) h2 {
  font-style: italic;
  letter-spacing: -0.125em;
}

/* Words generated by JS */

.word {
  display: inline-block;
  white-space: nowrap;

  --word-opacity: 0;
  --word-y: 52px;
  --word-scale-x: 0.72;
  --word-scale-y: 1.14;

  opacity: var(--word-opacity);

  transform:
    translateY(var(--word-y))
    scaleX(var(--word-scale-x))
    scaleY(var(--word-scale-y));

  transform-origin: center center;
  will-change: opacity, transform, letter-spacing;
}

.word:hover {
  letter-spacing: -0.055em;

  transform:
    translateY(var(--word-y))
    scaleX(calc(var(--word-scale-x) * 0.88))
    scaleY(calc(var(--word-scale-y) * 1.08));
}

/* Legal footer */

.legal-footer {
  position: relative;
  z-index: 1;

  width: 100%;
  min-height: 180px;

  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.45em;

  padding: 0 0 34px 0;

  background: transparent !important;
  color: var(--arfi-black);

  font-size: clamp(15px, 1.15vw, 24px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 300;

  opacity: 0.72;
}

.legal-footer:hover {
  opacity: 1;
}

.legal-footer a {
  color: var(--arfi-black);
  text-decoration: none;
  position: relative;
}

.legal-footer a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.18em;

  height: 2px;
  background: var(--arfi-black);
  border-radius: 999px;

  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms var(--ease-snap);
}

.legal-footer a:hover::after {
  transform: scaleX(1);
}

/* Legal pages */

.legal-page {
  min-height: 100vh;
  background: var(--arfi-green);
  color: var(--arfi-black);

  font-family: "Montserrat ARfi", Montserrat, Arial, sans-serif;
  font-weight: 300;

  padding: clamp(28px, 5vw, 84px);
}

.legal-back {
  display: inline-block;

  color: var(--arfi-black);
  text-decoration: none;

  font-size: clamp(22px, 2.5vw, 44px);
  line-height: 1;
  letter-spacing: -0.06em;

  margin-bottom: clamp(48px, 8vw, 120px);
}

.legal-back:hover {
  font-style: italic;
}

.legal-document {
  max-width: 1180px;
}

.legal-document h1 {
  margin: 0 0 clamp(24px, 4vw, 58px) 0;

  font-size: clamp(58px, 11vw, 190px);
  line-height: 0.82;
  letter-spacing: -0.105em;
  font-weight: 300;
  text-transform: uppercase;
}

.legal-date {
  margin: 0 0 clamp(42px, 6vw, 92px) 0;

  font-size: clamp(18px, 2vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  opacity: 0.72;
}

.legal-document section {
  margin: 0 0 clamp(36px, 5vw, 72px) 0;
}

.legal-document h2 {
  margin: 0 0 0.55em 0;

  font-size: clamp(30px, 4vw, 70px);
  line-height: 0.92;
  letter-spacing: -0.075em;
  font-weight: 300;
  text-transform: uppercase;
}

.legal-document p,
.legal-document li {
  font-size: clamp(18px, 2vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.legal-document p {
  margin: 0 0 0.9em 0;
}

.legal-document ul {
  margin: 0;
  padding-left: 1.1em;
}

.legal-document strong {
  font-weight: 300;
  font-style: italic;
}

/* Mobile */

@media (max-width: 760px) {
  :root {
    --album-a-y: 10vh;
    --album-b-y: 32vh;
    --album-c-y: 57vh;
    --album-d-y: 78vh;
  }

  body::before {
    background-size:
      clamp(140px, 43vw, 280px) auto,
      clamp(120px, 36vw, 240px) auto,
      clamp(125px, 38vw, 250px) auto,
      clamp(130px, 40vw, 260px) auto,
      clamp(95px, 29vw, 190px) auto,
      clamp(100px, 31vw, 205px) auto;

    opacity: 0.25;
  }

  .hero {
    height: 150vh;
  }

  .pill-nav {
    top: 39%;
    width: min(88vw, 520px);
    flex-direction: column;
  }

  .pill {
    width: 100%;
    min-height: 96px;
    font-size: clamp(54px, 16vw, 94px);
    letter-spacing: -0.07em;
  }

  .pill-left,
  .pill-right {
    padding: 0 42px;
  }

  .pill-right {
    margin-left: 0;
    margin-top: -18px;
    font-size: clamp(50px, 15vw, 90px);
  }

  .learn-more {
    top: 77%;
    width: 104vw;
    font-size: clamp(76px, 24vw, 150px);
    letter-spacing: -0.12em;
  }

  .story {
    padding: 34vh 0 12vh 0;
  }

  .story-line {
    padding: 0 2.4vw;
  }

  .story-line h2 {
    font-size: clamp(74px, 24vw, 165px);
    line-height: 0.8;
    letter-spacing: -0.115em;
    margin-bottom: -0.075em;
  }

  .story-line:nth-of-type(even) h2 {
    letter-spacing: -0.13em;
  }

  .loading-bar {
    top: calc(50% + 100px);
    width: 210px;
  }

  .legal-footer {
    font-size: 15px;
  }

  .legal-page {
    padding: 26px 18px 64px 18px;
  }

  .legal-document h1 {
    font-size: clamp(54px, 18vw, 108px);
  }

  .legal-document h2 {
    font-size: clamp(32px, 10vw, 58px);
  }

  .legal-document p,
  .legal-document li {
    font-size: 18px;
    line-height: 1.22;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .loader {
    display: none;
  }

  .word {
    opacity: 1 !important;
    transform: none !important;
  }

  body::before {
    transform: none !important;
  }
}
