@font-face {
  font-family: Sansation;
  src: url('/fonts/sansation-regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
* { box-sizing: border-box; }
html { font-family: Sansation, Arial, sans-serif; }
body {
  margin: 0;
  overflow-x: clip;
  background: #f4f2ed;
  --layout-height: min(100svh, calc(100vw * 0.6230212181790147));
}
.grid {
  display: grid;
  position: relative;
  width: 100%;
  /* Fill the viewport width while keeping the four image columns proportional. */
  grid-template-columns: 0.5625817706061927fr 0.5625fr 0.24fr 0.24fr;
  grid-template-rows: calc(var(--layout-height) * 0.36) calc(var(--layout-height) * 0.64);
  height: var(--layout-height);
}
.grid-title-frame {
  --title-border-width: 3cm;
  --outer-border-width: 3cm;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: max-content;
  outline: var(--outer-border-width) solid #000;
  outline-offset: var(--title-border-width);
  font-size: min(8.19cm, 22.23vw);
}
.title-border {
  position: absolute;
  pointer-events: none;
  -webkit-backdrop-filter: hue-rotate(180deg) saturate(4) contrast(1.35);
  backdrop-filter: hue-rotate(180deg) saturate(4) contrast(1.35);
}
.title-border-top,
.title-border-bottom {
  right: calc(0px - var(--title-border-width));
  left: calc(0px - var(--title-border-width));
  height: var(--title-border-width);
}
.title-border-top { bottom: 100%; }
.title-border-bottom { top: 100%; }
.title-border-left,
.title-border-right {
  top: 0;
  bottom: 0;
  width: var(--title-border-width);
}
.title-border-left { right: 100%; }
.title-border-right { left: 100%; }
.grid-title {
  margin: 0;
  padding: 0.04em 0.12em;
  font-size: inherit;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  -webkit-backdrop-filter: invert(1);
  backdrop-filter: invert(1);
}
.grid-title span {
  color: transparent;
  background: url('/images/9.webp') center / cover no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.grid-title::selection,
.grid-title span::selection {
  background: #ff00ff;
  color: white;
}
.grid-balls {
  display: none;
  position: absolute;
  z-index: 3;
  pointer-events: none;
}
.grid-balls.is-active { display: block; }
@media (prefers-reduced-motion: reduce) {
  .grid-balls { display: none !important; }
}
.cell:nth-child(1), .cell:nth-child(8) { background: #214fc5; }
.cell:nth-child(1) {
  grid-row: 1 / 3;
  grid-column: 1;
  z-index: 1;
  background-image: url('/images/1.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.cell:nth-child(5) { grid-row: 2; grid-column: 1; }
.cell:nth-child(6) { grid-row: 2; grid-column: 2; }
.cell:nth-child(7) { grid-row: 2; grid-column: 3; }
.cell:nth-child(4) { grid-row: 1; grid-column: 4; }
.cell:nth-child(2), .cell:nth-child(7) { background: #f5a66f; }
.cell:nth-child(3), .cell:nth-child(6) { background: #dce7fb; }
.cell:nth-child(4), .cell:nth-child(5) { background: #f7e1cf; }
.cell:nth-child(3) {
  grid-row: 1;
  grid-column: 3 / 5;
  z-index: 1;
  background-image: url('/images/4.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.cell:nth-child(2) {
  grid-row: 1 / 3;
  grid-column: 2;
  z-index: 1;
  background-image: url('/images/2.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.cell:nth-child(8) {
  grid-row: 2;
  grid-column: 3 / 5;
  z-index: 1;
  background-image: url('/images/3.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.full-image {
  width: 100%;
  height: 100svh;
  background: #000;
}
.image-five {
  height: calc(200svh - var(--layout-height));
}

@media (max-width: 700px), (pointer: coarse) {
  html, body { background: #000; }
  body { --layout-height: 100svh; }
  .grid {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    padding-top: 3.5cm;
    background: #000;
    --mobile-aperture: 0px;
  }
  .cell:nth-child(4),
  .cell:nth-child(5),
  .cell:nth-child(6),
  .cell:nth-child(7) { display: none; }
  .cell:nth-child(1),
  .cell:nth-child(2),
  .cell:nth-child(3),
  .cell:nth-child(8) {
    position: relative;
    flex: none;
    width: 100%;
    overflow: hidden;
    background: #000;
  }
  .cell:nth-child(1) { order: 1; aspect-ratio: 1290 / 2293; --mobile-image: url('/images/1.webp'); }
  .cell:nth-child(2) { order: 2; aspect-ratio: 1350 / 2400; --mobile-image: url('/images/2.webp'); }
  .cell:nth-child(8) { order: 3; aspect-ratio: 1200 / 1600; --mobile-image: url('/images/3.webp'); }
  .cell:nth-child(3) { order: 4; aspect-ratio: 1600 / 1200; --mobile-image: url('/images/4.webp'); }
  .cell:nth-child(1)::before,
  .cell:nth-child(1)::after,
  .cell:nth-child(2)::before,
  .cell:nth-child(2)::after,
  .cell:nth-child(3)::before,
  .cell:nth-child(3)::after,
  .cell:nth-child(8)::before,
  .cell:nth-child(8)::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background-image: var(--mobile-image);
    background-size: 200% 100%;
    background-repeat: no-repeat;
  }
  .cell:nth-child(1)::before,
  .cell:nth-child(2)::before,
  .cell:nth-child(3)::before,
  .cell:nth-child(8)::before {
    left: 0;
    background-position: left top;
    transform: translateX(calc(var(--mobile-aperture) * -0.5));
  }
  .cell:nth-child(1)::after,
  .cell:nth-child(2)::after,
  .cell:nth-child(3)::after,
  .cell:nth-child(8)::after {
    right: 0;
    background-position: right top;
    transform: translateX(calc(var(--mobile-aperture) * 0.5));
  }
  .grid-title-frame {
    --title-border-width: 0px;
    --outer-border-width: 0px;
    top: 0;
    left: 0;
    transform: none;
    display: grid;
    place-items: center;
    width: 100%;
    height: 3.5cm;
    background: #000;
    outline: none;
    font-size: clamp(2rem, 9vw, 4.5rem);
  }
  .title-border { display: none; }
  .grid-title {
    position: relative;
    z-index: 4;
    max-width: 100%;
    padding: 0.04em 0.12em;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .grid-title span {
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
  }
  .grid-balls { z-index: 3; }
}
@media (max-width: 260px) {
  .grid { padding-top: 76px; }
  .grid-title-frame { height: 76px; font-size: clamp(1.45rem, 11vw, 2rem); }
}
