@import url("./assets/fonts/fonts.css");

:root {
  color-scheme: dark;
  --bg: #231f20;
  --paper: #fff;
  --ink: #231f20;
  --text: #fff;
  --red: #db1f26;
  --cream: #f3dbb3;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  font-family: Montserrat, Arial, sans-serif;
}

.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--paper);
}

#world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: auto;
  opacity: 1;
  transform: translateY(var(--home-y, 0px));
  transition: opacity 520ms ease;
}

#cursor-trail {
  position: fixed;
  inset: 0;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

#world.is-block-hovered {
  cursor: grab;
}

#world.is-block-dragging,
#world.is-block-dragging:active {
  cursor: grabbing;
}

.site-header {
  position: absolute;
  left: clamp(24px, 4.2vw, 82px);
  right: clamp(24px, 4.2vw, 82px);
  top: clamp(6px, 1.55vw, 20px);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  opacity: var(--intro-progress, 0);
  pointer-events: none;
  transform: translateY(var(--header-y, -16px));
  transition:
    opacity 1500ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.site-logo {
  display: block;
  width: clamp(108px, 14.5vw, 165px);
  line-height: 0;
}

.site-logo img,
.contact-link img {
  display: block;
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3.4vw, 58px);
  font-family: "PT Sans", Arial, sans-serif;
  font-size: clamp(14px, 1.05vw, 20px);
  line-height: 1;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: color 420ms ease;
}

@media (min-width: 761px) {
  .site-nav > a:not(.contact-link) {
    color: #fff;
    mix-blend-mode: difference;
    text-shadow:
      0 0 5px rgba(0, 0, 0, 0.22),
      0 0 7px rgba(255, 255, 255, 0.2);
  }
}

.menu-toggle {
  display: none;
}

.contact-link {
  position: relative;
  display: inline-grid;
  width: clamp(104px, 7.8vw, 130px);
  min-width: 104px;
  place-items: center;
}

.contact-link img,
.contact-link span {
  grid-area: 1 / 1;
}

.contact-link span {
  padding: 0 13px 1px 7px;
  font-size: clamp(12px, 1.02vw, 19px);
}

.hero__copy {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: min(850px, calc(100vw - 40px));
  transform: translate(
    -50%,
    calc(-50% + var(--home-y, 0px) + var(--copy-shift, 0px))
  );
  pointer-events: none;
  text-align: center;
  opacity: 1;
  transition: transform 1700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__copy h1 {
  margin: 0;
  color: var(--text);
  font-family: "Alumni Sans", "AlumniSansRoman-Medium", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(28px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0;
}

.hero__copy p {
  max-width: 780px;
  margin: 22px auto 0;
  color: var(--text);
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(15px, 1.55vw, 24px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
  opacity: var(--intro-progress, 0);
  transform: translateY(var(--subcopy-y, 12px));
  transition:
    opacity 1700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__copy h1,
.hero__copy p,
.expertise-panel__text,
.expertise-panel__text h2,
.expertise-panel__text p,
.expertise-panel__text a,
.expertise-panel__blocks,
.portfolio-panel__text,
.portfolio-panel h2,
.portfolio-panel h3,
.portfolio-panel p,
.portfolio-panel a,
.portfolio-panel__blocks,
.philosophy-panel__text,
.philosophy-panel h2,
.philosophy-panel p,
.philosophy-panel__shape,
.footer-panel__brand,
.footer-panel__contact,
.footer-panel__legal {
  will-change: opacity, transform;
}

.hero.is-home .site-header {
  pointer-events: auto;
}

.expertise-panel {
  position: absolute;
  inset: -2px 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 34vw);
  align-items: end;
  gap: clamp(28px, 5vw, 86px);
  padding: clamp(96px, 12vw, 150px) clamp(28px, 7.6vw, 146px) clamp(52px, 7vw, 96px);
  background: var(--paper);
  color: var(--ink);
  pointer-events: none;
  transform: translateY(var(--expertise-y, 100%));
}

.portfolio-panel {
  position: absolute;
  inset: -2px 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(360px, 50vw) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(30px, 5vw, 92px);
  padding: clamp(96px, 11vw, 150px) clamp(38px, 6.5vw, 118px) clamp(56px, 7vw, 92px);
  background: var(--paper);
  color: var(--ink);
  pointer-events: none;
  transform: translateY(var(--portfolio-y, 100%));
}

.philosophy-panel {
  position: absolute;
  inset: -2px 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(420px, 46vw) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(42px, 7vw, 130px);
  padding: clamp(96px, 10vw, 150px) clamp(40px, 8.6vw, 166px) clamp(70px, 9vw, 120px);
  overflow: hidden;
  background: #f3dbb3;
  color: var(--ink);
  pointer-events: none;
  transform: translateY(var(--philosophy-y, 100%));
}

.footer-panel {
  position: absolute;
  inset: -2px 0;
  z-index: 3;
  overflow: hidden;
  background: var(--paper);
  color: var(--text);
  pointer-events: none;
  transform: translateY(var(--footer-y, 100%));
}

#footer-world {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  width: 100%;
  height: 46%;
  display: block;
  pointer-events: auto;
  opacity: calc(0.32 + var(--footer-reveal, 0) * 0.68);
}

.footer-panel__top {
  position: relative;
  z-index: 2;
  height: 46%;
  pointer-events: none;
  opacity: var(--footer-reveal, 0);
  transform: translateY(calc(var(--footer-contact-y, 170px) * -0.38));
}

.footer-panel__badge {
  position: absolute;
  left: clamp(210px, 19.5vw, 375px);
  top: clamp(210px, 24vw, 360px);
  width: clamp(260px, 30vw, 520px);
  aspect-ratio: 1.78;
  display: grid;
  place-items: center;
  background: #f3dbb3;
  transform: rotate(19.96deg);
}

.footer-panel__badge span {
  color: var(--ink);
  font-family: Commissioner, Arial Black, Impact, sans-serif;
  font-size: clamp(36px, 3.8vw, 72px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0;
}

.footer-panel__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  min-height: 54%;
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(340px, 1fr);
  grid-template-rows: 1fr auto;
  gap: clamp(30px, 4vw, 72px);
  padding: clamp(54px, 6vw, 96px) clamp(42px, 5.2vw, 98px) clamp(30px, 4vw, 64px);
  background: var(--ink);
}

.footer-panel__brand img {
  display: block;
  width: clamp(150px, 14vw, 250px);
  height: auto;
}

.footer-panel__brand {
  opacity: var(--footer-reveal, 0);
  transform: translateY(var(--footer-contact-y, 18px));
}

.footer-panel__contact {
  position: absolute;
  left: clamp(42px, 5.12vw, 98px);
  top: clamp(122px, 11.2vw, 215px);
  max-width: 760px;
  opacity: var(--footer-reveal, 0);
  transform: translateY(var(--footer-contact-y, 18px));
}

.footer-panel__contact p {
  max-width: 700px;
  margin: 0 0 clamp(74px, 8.74vw, 168px);
  color: var(--text);
  font-family: "Alumni Sans", "AlumniSansRoman-Medium", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(18px, 2.1vw, 40px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
}

.footer-panel__contact a {
  color: #f3dbb3;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: clamp(18px, 2.1vw, 40px);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.footer-panel__legal {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: var(--text);
  font-family: "PT Sans", Arial, sans-serif;
  font-size: clamp(15px, 1.25vw, 28px);
  line-height: 1.1;
  opacity: var(--footer-body-reveal, 0);
  transform: translateY(var(--footer-legal-y, 12px));
}

.footer-panel__legal p {
  margin: 0;
}

.footer-panel__legal nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.6vw, 72px);
}

.footer-panel__legal a {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.philosophy-panel__text {
  align-self: end;
  max-width: 760px;
  padding-bottom: clamp(70px, 10vw, 150px);
  opacity: var(--philosophy-reveal, 0);
  transform: translateY(var(--philosophy-text-y, 22px)) scale(var(--philosophy-scale, 0.95));
  transform-origin: left bottom;
}

.philosophy-panel h2 {
  max-width: 760px;
  margin: 0 0 34px;
  color: var(--ink);
  font-family: "Alumni Sans", "AlumniSansRoman-Medium", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(34px, 3.25vw, 58px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
}

.philosophy-panel p {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(15px, 1.05vw, 21px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
  opacity: var(--philosophy-body-reveal, 0);
  transform: translateY(var(--philosophy-body-y, 16px));
}

.philosophy-panel__shape {
  justify-self: center;
  align-self: center;
  width: min(36vw, 620px);
  aspect-ratio: 0.76;
  background: #db1f26;
  clip-path: polygon(43% 0%, 100% 15%, 72% 100%, 0% 78%);
  transform-origin: 62% 100%;
  opacity: var(--philosophy-reveal, 0);
  transform:
    translateY(calc(var(--philosophy-shape-y, 150px) - 54px))
    scale(var(--philosophy-shape-scale, 0.86))
    rotate(2deg)
    translate3d(0, 0, 0);
  cursor: pointer;
}

.philosophy-panel__shape.is-swaying {
  animation: philosophy-shape-sway 2.35s cubic-bezier(0.24, 0.68, 0.22, 1) 1;
}

@keyframes philosophy-shape-sway {
  0%,
  100% {
    transform:
      translateY(calc(var(--philosophy-shape-y, 150px) - 54px))
      scale(var(--philosophy-shape-scale, 0.86))
      rotate(2deg)
      translate3d(0, 0, 0);
  }

  16% {
    transform:
      translateY(calc(var(--philosophy-shape-y, 150px) - 54px))
      scale(var(--philosophy-shape-scale, 0.86))
      rotate(2.25deg)
      translate3d(0, 0, 0);
  }

  31% {
    transform:
      translateY(calc(var(--philosophy-shape-y, 150px) - 54px))
      scale(var(--philosophy-shape-scale, 0.86))
      rotate(5.8deg)
      translate3d(2px, -1px, 0);
  }

  42% {
    transform:
      translateY(calc(var(--philosophy-shape-y, 150px) - 54px))
      scale(var(--philosophy-shape-scale, 0.86))
      rotate(3.6deg)
      translate3d(0, 0, 0);
  }

  57% {
    transform:
      translateY(calc(var(--philosophy-shape-y, 150px) - 54px))
      scale(var(--philosophy-shape-scale, 0.86))
      rotate(5.15deg)
      translate3d(1px, -1px, 0);
  }

  70% {
    transform:
      translateY(calc(var(--philosophy-shape-y, 150px) - 54px))
      scale(var(--philosophy-shape-scale, 0.86))
      rotate(1.65deg)
      translate3d(-1px, 0, 0);
  }

  84% {
    transform:
      translateY(calc(var(--philosophy-shape-y, 150px) - 54px))
      scale(var(--philosophy-shape-scale, 0.86))
      rotate(2.35deg)
      translate3d(0, 0, 0);
  }
}

.portfolio-panel__blocks {
  position: relative;
  min-height: min(620px, 68vh);
  z-index: 2;
  opacity: var(--portfolio-reveal, 0);
}

.portfolio-block {
  position: absolute;
  display: block;
  width: var(--block-size, 120px);
  height: calc(var(--block-size, 120px) * var(--block-ratio, 0.95));
  border: 0;
  padding: 0;
  overflow: hidden;
  background: var(--block-color, #f3dbb3);
  cursor: pointer;
  transform:
    translate3d(
      var(--block-x, 0px),
      calc(var(--block-y, 0px) + var(--portfolio-blocks-y, 0px)),
      0
    )
    scale(var(--portfolio-blocks-scale, 1))
    rotate(var(--block-rotation, 0deg));
  transition:
    opacity 260ms ease,
    width 680ms cubic-bezier(0.22, 1, 0.36, 1),
    height 680ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 680ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 420ms ease;
}

.portfolio-block img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 240ms ease;
}

.portfolio-block:hover img,
.portfolio-block:focus-visible img {
  opacity: 1;
}

.portfolio-block.is-hidden-queue {
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.portfolio-block:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 6px;
}

.portfolio-panel__text {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding-top: clamp(84px, 10vw, 150px);
}

.portfolio-panel h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: Commissioner, Arial Black, Impact, sans-serif;
  font-size: clamp(72px, 8.2vw, 160px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: 0;
  opacity: var(--portfolio-reveal, 0);
  transform: translateY(var(--portfolio-text-y, 24px)) scale(var(--portfolio-scale, 0.94));
  transform-origin: left bottom;
}

.portfolio-panel h3 {
  margin: 0 0 48px;
  color: var(--ink);
  font-family: "Alumni Sans", "AlumniSansRoman-Medium", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(28px, 2.5vw, 48px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0;
  opacity: var(--portfolio-body-reveal, 0);
  transform: translateY(var(--portfolio-body-y, 18px));
}

.portfolio-panel p,
.portfolio-panel a {
  color: var(--ink);
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(15px, 1.05vw, 21px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
}

.portfolio-panel p {
  margin: 0;
  max-width: 620px;
  opacity: var(--portfolio-body-reveal, 0);
  transform: translateY(var(--portfolio-body-y, 18px));
}

.portfolio-panel a {
  display: inline-block;
  text-decoration: none;
  opacity: var(--portfolio-body-reveal, 0);
  transform: translateY(var(--portfolio-body-y, 18px));
}

.expertise-panel__text {
  max-width: 800px;
}

.expertise-panel h2 {
  margin: 0 0 28px;
  color: var(--ink);
  font-family: Commissioner, Arial Black, Impact, sans-serif;
  font-size: clamp(64px, 8.4vw, 160px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: 0;
  opacity: var(--expertise-reveal, 0);
  transform: translateY(var(--expertise-text-y, 24px)) scale(var(--expertise-scale, 0.94));
  transform-origin: left bottom;
}

.expertise-panel p,
.expertise-panel a {
  color: var(--ink);
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(16px, 1.25vw, 24px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
}

.expertise-panel p {
  max-width: 790px;
  margin: 0 0 20px;
  opacity: var(--expertise-body-reveal, 0);
  transform: translateY(var(--expertise-body-y, 18px));
}

.expertise-panel a {
  text-decoration: none;
  display: inline-block;
  opacity: var(--expertise-body-reveal, 0);
  transform: translateY(var(--expertise-body-y, 18px));
}

.expertise-panel__blocks {
  justify-self: end;
  align-self: end;
  width: min(34vw, 529px);
  height: auto;
  max-height: 78vh;
  opacity: var(--expertise-reveal, 0);
  transform: translateY(var(--expertise-blocks-y, -18px)) scale(var(--expertise-blocks-scale, 0.86));
  transform-origin: right bottom;
  overflow: visible;
  cursor: pointer;
}

.expertise-block-stack {
  transform-box: fill-box;
  transform-origin: 52% 58%;
}

.expertise-block {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.expertise-block--cream {
  fill: var(--cream);
}

.expertise-block--red {
  fill: var(--red);
}

.expertise-block--one {
  --fall-x: 8px;
  --fall-y: 10px;
  --fall-rotate: 3.4deg;
}

.expertise-block--two {
  --fall-x: 20px;
  --fall-y: 9px;
  --fall-rotate: 8deg;
}

.expertise-block--three {
  --fall-x: 10px;
  --fall-y: 11px;
  --fall-rotate: 4.4deg;
}

.expertise-block--four {
  --fall-x: -15px;
  --fall-y: 2px;
  --fall-rotate: -9deg;
}

.expertise-block--five {
  --fall-x: 10px;
  --fall-y: 17px;
  --fall-rotate: 5deg;
}

.expertise-block--six {
  --fall-x: -7px;
  --fall-y: 8px;
  --fall-rotate: -2.8deg;
}

.expertise-block--seven {
  --fall-x: -18px;
  --fall-y: 16px;
  --fall-rotate: -6deg;
}

.expertise-block--eight {
  --fall-x: -21px;
  --fall-y: -1px;
  --fall-rotate: -8deg;
}

.expertise-block--one {
  transform-origin: 56% 100%;
}

.expertise-block--three {
  transform-origin: 12% 12%;
}

.expertise-block--six {
  transform-origin: 70% 100%;
}

.expertise-panel__blocks:hover .expertise-block--three,
.expertise-panel__blocks:focus-visible .expertise-block--three {
  animation: expertise-block-bearing-slip 1280ms linear 1 both;
}

.expertise-panel__blocks:hover .expertise-block--one,
.expertise-panel__blocks:focus-visible .expertise-block--one {
  animation: expertise-block-load-shift 1320ms linear 18ms 1 both;
}

.expertise-panel__blocks:hover .expertise-block--six,
.expertise-panel__blocks:focus-visible .expertise-block--six {
  animation: expertise-block-top-settle 1380ms linear 38ms 1 both;
}

@keyframes expertise-block-bearing-slip {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  9% {
    transform: translate(calc(var(--fall-x) * 0.04), calc(var(--fall-y) * 0.02)) rotate(calc(var(--fall-rotate) * 0.05));
  }

  13% {
    transform: translate(calc(var(--fall-x) * 0.82), calc(var(--fall-y) * 0.74)) rotate(calc(var(--fall-rotate) * 0.96));
  }

  17% {
    transform: translate(calc(var(--fall-x) * 1.1), calc(var(--fall-y) * 1.06)) rotate(calc(var(--fall-rotate) * 1.16));
  }

  28% {
    transform: translate(calc(var(--fall-x) * 0.68), calc(var(--fall-y) * 0.64)) rotate(calc(var(--fall-rotate) * 0.55));
  }

  36% {
    transform: translate(calc(var(--fall-x) * 0.76), calc(var(--fall-y) * 0.7)) rotate(calc(var(--fall-rotate) * 0.72));
  }

  49% {
    transform: translate(calc(var(--fall-x) * 0.54), calc(var(--fall-y) * 0.46)) rotate(calc(var(--fall-rotate) * 0.38));
  }

  64% {
    transform: translate(calc(var(--fall-x) * 0.18), calc(var(--fall-y) * 0.12)) rotate(calc(var(--fall-rotate) * 0.1));
  }

  78% {
    transform: translate(calc(var(--fall-x) * -0.05), calc(var(--fall-y) * -0.03)) rotate(calc(var(--fall-rotate) * -0.08));
  }

  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes expertise-block-load-shift {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  15% {
    transform: translate(0, 0) rotate(0deg);
  }

  23% {
    transform: translate(calc(var(--fall-x) * 0.32), calc(var(--fall-y) * 0.24)) rotate(calc(var(--fall-rotate) * 0.28));
  }

  29% {
    transform: translate(calc(var(--fall-x) * 0.74), calc(var(--fall-y) * 0.68)) rotate(calc(var(--fall-rotate) * 0.8));
  }

  41% {
    transform: translate(calc(var(--fall-x) * 0.48), calc(var(--fall-y) * 0.4)) rotate(calc(var(--fall-rotate) * 0.34));
  }

  52% {
    transform: translate(calc(var(--fall-x) * 0.61), calc(var(--fall-y) * 0.5)) rotate(calc(var(--fall-rotate) * 0.5));
  }

  67% {
    transform: translate(calc(var(--fall-x) * 0.2), calc(var(--fall-y) * 0.16)) rotate(calc(var(--fall-rotate) * 0.12));
  }

  83% {
    transform: translate(calc(var(--fall-x) * -0.06), calc(var(--fall-y) * -0.03)) rotate(calc(var(--fall-rotate) * -0.09));
  }

  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes expertise-block-top-settle {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  31% {
    transform: translate(0, 0) rotate(0deg);
  }

  39% {
    transform: translate(calc(var(--fall-x) * 0.18), calc(var(--fall-y) * 0.14)) rotate(calc(var(--fall-rotate) * 0.18));
  }

  46% {
    transform: translate(calc(var(--fall-x) * 0.58), calc(var(--fall-y) * 0.45)) rotate(calc(var(--fall-rotate) * 0.62));
  }

  58% {
    transform: translate(calc(var(--fall-x) * 0.36), calc(var(--fall-y) * 0.28)) rotate(calc(var(--fall-rotate) * 0.24));
  }

  69% {
    transform: translate(calc(var(--fall-x) * 0.43), calc(var(--fall-y) * 0.34)) rotate(calc(var(--fall-rotate) * 0.34));
  }

  87% {
    transform: translate(calc(var(--fall-x) * -0.04), calc(var(--fall-y) * -0.02)) rotate(calc(var(--fall-rotate) * -0.06));
  }

  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .expertise-panel__blocks:hover .expertise-block--one,
  .expertise-panel__blocks:focus-visible .expertise-block--one,
  .expertise-panel__blocks:hover .expertise-block--three,
  .expertise-panel__blocks:focus-visible .expertise-block--three,
  .expertise-panel__blocks:hover .expertise-block--six,
  .expertise-panel__blocks:focus-visible .expertise-block--six {
    animation: none;
    transform: translate(calc(var(--fall-x) * 0.5), calc(var(--fall-y) * 0.45)) rotate(calc(var(--fall-rotate) * 0.55));
  }
}

.expertise-panel__mobile-blocks {
  display: none;
}

.philosophy-panel__mobile-art {
  display: none;
}

.hero.is-expertise .site-header {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hero.is-expertise .site-nav a {
  color: var(--ink);
}

.hero.is-expertise .contact-link span {
  color: var(--text);
}

.hero.is-expertise .expertise-panel {
  pointer-events: auto;
}

.hero.is-portfolio .expertise-panel {
  pointer-events: none;
}

.hero.is-portfolio .portfolio-panel {
  pointer-events: auto;
}

.hero.is-philosophy .portfolio-panel {
  pointer-events: none;
}

.hero.is-philosophy .philosophy-panel {
  pointer-events: auto;
}

.hero.is-footer .philosophy-panel {
  pointer-events: none;
}

.hero.is-footer .footer-panel {
  pointer-events: auto;
}

.is-missing-engine .hero::after {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  width: min(520px, calc(100vw - 40px));
  transform: translateX(-50%);
  color: var(--text);
  content: "Matter.js did not load. Connect to the internet or replace the CDN script with a local Matter.js file.";
  font: 14px/1.4 Arial, sans-serif;
  text-align: center;
  opacity: 0.72;
}

@media (min-width: 761px) and (max-width: 1100px) {
  .expertise-panel {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 30vw);
    gap: clamp(20px, 3vw, 36px);
    padding: clamp(72px, 8vw, 96px) clamp(30px, 5vw, 58px) clamp(42px, 5vw, 64px);
  }

  .expertise-panel h2 {
    font-size: clamp(58px, 7.2vw, 82px);
  }

  .expertise-panel p,
  .expertise-panel a {
    font-size: clamp(15px, 1.7vw, 18px);
  }

  .portfolio-panel {
    grid-template-columns: minmax(280px, 43vw) minmax(0, 1fr);
    gap: clamp(22px, 3.5vw, 42px);
    padding: clamp(72px, 8vw, 96px) clamp(30px, 5vw, 58px) clamp(42px, 5vw, 64px);
  }

  .portfolio-panel__blocks {
    min-height: min(520px, 58vh);
  }

  .portfolio-panel__text {
    max-width: 100%;
    padding-top: clamp(52px, 7vw, 78px);
  }

  .portfolio-panel h2 {
    font-size: clamp(58px, 7.6vw, 86px);
  }

  .portfolio-panel h3 {
    margin-bottom: clamp(22px, 3vw, 34px);
    font-size: clamp(26px, 3vw, 34px);
  }

  .portfolio-panel p,
  .portfolio-panel a {
    font-size: clamp(14px, 1.7vw, 17px);
  }

  .portfolio-panel p {
    max-width: 100%;
  }

  .philosophy-panel {
    grid-template-columns: minmax(300px, 42vw) minmax(0, 1fr);
    gap: clamp(26px, 4vw, 48px);
    padding: clamp(72px, 8vw, 96px) clamp(30px, 5vw, 58px) clamp(48px, 5vw, 68px);
  }
}

@media (max-width: 760px) {
  .hero__copy {
    z-index: 5;
    opacity: 1;
  }

  .site-header {
    left: 10px;
    right: 19px;
    top: 12px;
    align-items: flex-start;
    gap: 18px;
    transition:
      opacity 180ms ease,
      transform 180ms ease,
      visibility 180ms ease;
  }

  .mobile-header-hidden .site-header {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-18px);
  }

  .site-logo {
    width: 116px;
  }

  .site-nav {
    position: relative;
    display: block;
    width: 44px;
    max-width: none;
    margin-top: 4px;
    color: var(--text);
    font-size: 16px;
  }

  .menu-toggle {
    position: relative;
    z-index: 2;
    display: block;
    width: 44px;
    height: 38px;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    position: absolute;
    left: 0;
    width: 43px;
    height: 8px;
    background: currentColor;
    transform-origin: center;
    transition:
      transform 280ms cubic-bezier(0.65, 0, 0.35, 1),
      opacity 180ms ease,
      clip-path 280ms cubic-bezier(0.65, 0, 0.35, 1);
  }

  .menu-toggle::before,
  .menu-toggle::after {
    position: absolute;
    left: 4px;
    top: 0;
    width: 36px;
    height: 36px;
    background: currentColor;
    content: "";
    opacity: 0;
    transform: scale(0.82);
    transition:
      opacity 180ms ease,
      transform 280ms cubic-bezier(0.65, 0, 0.35, 1);
  }

  .menu-toggle::before {
    clip-path: polygon(100% 16.1%, 85.6% 1.9%, 0 86.9%, 11.3% 98.1%);
  }

  .menu-toggle::after {
    clip-path: polygon(87.1% 100%, 1.5% 15%, 16.6% 0, 98.5% 88.7%);
  }

  .menu-toggle span:nth-child(1) {
    top: 0;
    clip-path: polygon(0 5%, 100% 25%, 100% 100%, 0 100%);
  }

  .menu-toggle span:nth-child(2) {
    top: 15px;
    clip-path: polygon(0 25%, 100% 0, 100% 100%, 0 100%);
  }

  .menu-toggle span:nth-child(3) {
    top: 30px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 75%);
  }

  .site-nav.is-open .menu-toggle span:nth-child(1) {
    opacity: 0;
    transform: translateX(-8px) scaleX(0.65);
  }

  .site-nav.is-open .menu-toggle span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.25);
  }

  .site-nav.is-open .menu-toggle span:nth-child(3) {
    opacity: 0;
    transform: translateX(8px) scaleX(0.65);
  }

  .site-nav.is-open .menu-toggle::before,
  .site-nav.is-open .menu-toggle::after {
    opacity: 1;
    transform: scale(1);
  }

  .site-nav a {
    position: absolute;
    right: 0;
    display: block;
    min-width: 126px;
    color: inherit;
    text-align: right;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 220ms ease,
      transform 260ms cubic-bezier(0.65, 0, 0.35, 1),
      color 420ms ease;
  }

  .site-nav a:nth-of-type(1) {
    top: 58px;
    transition-delay: 0ms;
  }

  .site-nav a:nth-of-type(2) {
    top: 88px;
    transition-delay: 28ms;
  }

  .site-nav a:nth-of-type(3) {
    top: 118px;
    transition-delay: 56ms;
  }

  .site-nav .contact-link {
    top: 150px;
    display: inline-grid;
    place-items: center;
    transition-delay: 84ms;
  }

  .site-nav .contact-link span {
    position: static;
    grid-area: 1 / 1;
    color: var(--text);
    text-align: center;
    transform: none;
  }

  .site-nav .contact-link img {
    grid-area: 1 / 1;
  }

  .site-nav.is-open a {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hero.is-expertise .site-nav,
  .hero.is-portfolio .site-nav,
  .hero.is-philosophy .site-nav {
    color: var(--ink);
  }

  .hero.is-expertise-mobile-art .expertise-panel {
    pointer-events: auto;
  }

  .contact-link {
    width: 132px;
    min-width: 132px;
  }

  .contact-link span {
    font-size: 15px;
  }

  .expertise-panel {
    position: relative;
    display: block;
    min-height: 100svh;
    padding: 0;
    overflow: hidden;
    background: var(--paper) url("./assets/expertise-mobile.svg") top center / 100% auto no-repeat;
  }

  .expertise-panel__blocks,
  .expertise-panel__mobile-blocks {
    display: none;
  }

  .expertise-panel__text {
    position: absolute;
    left: 49px;
    top: 136px;
    z-index: 2;
    display: block;
    width: min(68vw, 260px);
    color: var(--ink);
    opacity: var(--expertise-body-reveal, 0);
    transform: translateY(var(--expertise-body-y, 18px));
  }

  .expertise-panel h2 {
    margin: 0 0 144px;
    font-size: clamp(43px, 13.6vw, 56px);
    line-height: 0.9;
    opacity: var(--expertise-reveal, 0);
    transform: translateY(var(--expertise-text-y, 24px)) scale(var(--expertise-scale, 0.94));
  }

  .expertise-panel p,
  .expertise-panel a {
    font-size: clamp(12px, 3.75vw, 14px);
    line-height: 1.15;
  }

  .expertise-panel p {
    max-width: 100%;
    margin: 0 0 8px;
  }

  .expertise-panel a {
    position: relative;
    z-index: 3;
    display: inline-block;
    pointer-events: auto;
  }

  .portfolio-panel {
    --portfolio-text-left: clamp(112px, 34vw, 148px);
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100svh;
    padding: 0 21px 34px;
    overflow: hidden;
    background: var(--paper);
  }

  .portfolio-panel__text {
    position: absolute;
    left: var(--portfolio-text-left);
    right: 18px;
    top: 388px;
    z-index: 2;
    display: block;
    max-width: calc(100vw - var(--portfolio-text-left) - 18px);
    padding-top: 0;
    opacity: var(--portfolio-body-reveal, 0);
    transform: translateY(var(--portfolio-body-y, 18px));
  }

  .portfolio-panel__blocks {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: block;
    overflow: hidden;
    padding: 0;
    opacity: var(--portfolio-reveal, 0);
  }

  .portfolio-block {
    position: absolute;
    width: var(--block-size, 72px);
    height: calc(var(--block-size, 72px) * var(--block-ratio, 0.95));
    transform:
      translate3d(
        var(--block-x, 0px),
        calc(var(--block-y, 0px) + var(--portfolio-blocks-y, 0px)),
        0
      )
      scale(var(--portfolio-blocks-scale, 1))
      rotate(var(--block-rotation, 0deg));
    background: var(--block-color, #f3dbb3);
    clip-path: none;
    transition:
      opacity 260ms ease,
      width 680ms cubic-bezier(0.22, 1, 0.36, 1),
      height 680ms cubic-bezier(0.22, 1, 0.36, 1),
      transform 680ms cubic-bezier(0.22, 1, 0.36, 1),
      background-color 420ms ease;
  }

  .portfolio-block img {
    opacity: 0;
  }

  .portfolio-block:hover img,
  .portfolio-block:focus-visible img {
    opacity: 0;
  }

  .portfolio-block.is-hidden-queue {
    opacity: 0;
    pointer-events: none;
  }

  .portfolio-block.is-photo-visible img {
    opacity: 1;
  }

  .portfolio-panel h2 {
    margin: 34px 0 14px;
    font-size: clamp(43px, 13.6vw, 56px);
    line-height: 0.9;
    opacity: var(--portfolio-reveal, 0);
    transform: translateY(var(--portfolio-text-y, 24px)) scale(var(--portfolio-scale, 0.94));
  }

  .portfolio-panel h3 {
    display: block;
    margin: 0 0 14px;
    font-size: clamp(21px, 6.4vw, 24px);
    line-height: 0.95;
    opacity: var(--portfolio-body-reveal, 0);
    transform: none;
  }

  .portfolio-panel p,
  .portfolio-panel a {
    font-size: clamp(12px, 3.75vw, 14px);
    line-height: 1.15;
  }

  .portfolio-panel p {
    max-width: 100%;
    margin: 0 0 8px;
  }

  .philosophy-panel {
    position: absolute;
    inset: -2px 0;
    display: block;
    min-height: 100svh;
    padding: 0;
    overflow: hidden;
    background: #f3dbb3;
  }

  .philosophy-panel__mobile-art {
    position: absolute;
    left: 50%;
    top: -2px;
    display: block;
    width: 100%;
    height: calc(100% + 4px);
    object-fit: fill;
    transform: translateX(-50%);
  }

  .philosophy-panel__shape {
    display: none;
  }

  .philosophy-panel__text {
    position: absolute;
    left: 53px;
    top: 138px;
    z-index: 2;
    display: block;
    width: min(72vw, 278px);
    padding: 0;
    opacity: var(--philosophy-body-reveal, 0);
    transform: translateY(var(--philosophy-body-y, 16px));
  }

  .philosophy-panel h2 {
    margin: 0 0 82px;
    font-size: clamp(21px, 6.4vw, 24px);
    line-height: 0.95;
    opacity: var(--philosophy-reveal, 0);
    transform: translateY(var(--philosophy-text-y, 24px)) scale(var(--philosophy-scale, 0.94));
  }

  .philosophy-panel p {
    max-width: 100%;
    font-size: clamp(12px, 3.75vw, 14px);
    line-height: 1.15;
  }

  #footer-world {
    height: 51%;
  }

  .footer-panel__top {
    height: 51%;
  }

  .footer-panel__badge {
    left: 24px;
    top: 170px;
    width: min(72vw, 280px);
  }

  .footer-panel__bottom {
    height: 49%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 34px 18px 22px;
  }

  .footer-panel__brand img {
    width: 132px;
  }

  .footer-panel__brand {
    order: 1;
    transform: translateY(var(--footer-contact-y, 18px));
  }

  .footer-panel__contact {
    position: static;
    display: contents;
    max-width: none;
    opacity: var(--footer-reveal, 0);
    transform: none;
  }

  .footer-panel__contact p {
    order: 2;
    max-width: 320px;
    margin: 4px 0 0;
    font-size: 23px;
    line-height: 0.95;
  }

  .footer-panel__contact a {
    order: 3;
    font-size: 26px;
    line-height: 1;
  }

  .footer-panel__legal {
    display: contents;
    opacity: var(--footer-body-reveal, 0);
    transform: none;
  }

  .footer-panel__legal p {
    order: 5;
    max-width: 310px;
    margin-top: auto;
    font-size: 13px;
    line-height: 1.15;
  }

  .footer-panel__legal nav {
    order: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    font-size: 21px;
    line-height: 1;
  }
}
