:root {
  --bg-color: #000814;
  --highlight: #FFFF00;
  --blob-bg: rgba(141, 85, 0, 0.96);
  --img-size-mobile: calc(25vw - 1rem);
  --img-size-desktop: calc(17vw - 1.5rem);
  --blob-size-desktop: 12vw;
  --blob-size-mobile: 30vw;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-color);
  overscroll-behavior: none;
  touch-action: none;
}

body {
  -webkit-font-smoothing: antialiased;
}

svg { 
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none; 
}

nav { display: none; }

.gallery_wrapper_wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100dvh;
  margin: 0 auto;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.gallery_wrapper {
  display: grid;
  gap: 1.5rem;
  opacity: 0;
  transition: opacity 300ms ease-in;
}

.gallery_wrapper.is-ready {
  opacity: 1;
}

/* images */
.gallery_wrapper img {
  display: block;      
  width: 100%;
  height: auto; 
  aspect-ratio: 1 / 1;
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
  min-width: 0;
  min-height: 0; 
  object-fit: cover;
  grid-column: span 2;
  border-radius: 0.5rem;
  clip-path: url(#clip-path-1);
  position: relative;
  z-index: 1;
  transition: filter 300ms; 
  user-select: none;
  -webkit-user-drag: none;
}

.gallery_wrapper img:hover {
  z-index: 2000;
  clip-path: url(#clip-path-2);
  filter: brightness(1) saturate(1.5);
  transition: filter 300ms, clip-path 300ms; 
}

img:not(:hover) {
  filter: brightness(0.6) saturate(0.6);
}

.banner-container {
  font-family: 'Montserrat', sans-serif;
  font-weight: bold;
  position: fixed;
  width: 200%;
  left: -50%;
  top: 50%;
  background-color: var(--highlight);
  color: black;
  border-top: 5px solid black;
  border-bottom: 5px solid black;
  padding: 10px 0;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: none;
  z-index: 1000;
  font-size: 18px;
  line-height: 1;
}

.scrolling-text { display: flex; }

.scrolling-text span {
  display: inline-block;
  white-space: nowrap;
  animation: scroll var(--duration, 10s) linear infinite;
  will-change: transform;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-33.333%); }
}

.fast-scroll { --duration: 7s; }
.slow-scroll { --duration: 15s; }
.slowest-scroll { --duration: 25s; }

.instruction-blob {
  position: fixed;
  z-index: 1500;
  width: var(--blob-size-desktop);
  height: var(--blob-size-desktop);
  background-color: var(--blob-bg);
  border-radius: 6.5rem;
  box-shadow: 0 0 15px rgba(0,0,0,0.5), 0 0 30px 15px rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.blob-text-wrapper {
  transform: rotate(-45deg);
  width: 140%;
  text-align: center;
}

.blob-text-wrapper p {
  margin: 0;
  line-height: 1.1;
  font-weight: bold;
  font-family: 'Ranade', sans-serif;
  color: white;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
  font-size: clamp(0.75rem, 1.0vw, 1.5rem);
}

.blob-left { top: 50%; left: 0; transform: translate(-50%, -50%) rotate(45deg); }
.blob-left .blob-text-wrapper { padding-left: 50%; }

.blob-right { top: 50%; right: 0; transform: translate(50%, -50%) rotate(45deg); }
.blob-right .blob-text-wrapper { padding-right: 50%; }

.blob-bottom { bottom: 0; left: 50%; transform: translate(-50%, 50%) rotate(45deg); }
.blob-bottom .blob-text-wrapper { padding-bottom: 50%; }

#main-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

@media only screen and (max-width: 768px) {
  .gallery_wrapper {
    --img-size: var(--img-size-mobile);
    grid-template-columns: repeat(6, var(--img-size));
    grid-template-rows: repeat(8, var(--img-size));
    margin: calc(var(--img-size) * -1.2) 0 calc(var(--img-size) * 0.5 + 2rem) 0;
  }

  .gallery_wrapper img:nth-of-type(4),
  .gallery_wrapper img:nth-of-type(9),
  .gallery_wrapper img:nth-of-type(14),
  .gallery_wrapper img:nth-of-type(19) {
    grid-column: 2 / span 2;
  }
  .instruction-blob {
    width: var(--blob-size-mobile);
    height: var(--blob-size-mobile);
    border-radius: 2rem;
  }
  .blob-bottom {
    transform: translate(-50%, 50%) rotate(45deg);
  }
  .blob-text-wrapper p { font-size: clamp(0.5rem, 3.2vw, 1.0rem); }
  .mobile-msg, .mobiletext { display: block; }
  .desktop-msg, .computertext { display: none; }
}

@media only screen and (min-width: 889px) {
  .gallery_wrapper {
    --img-size: var(--img-size-desktop);
    grid-template-columns: repeat(10, var(--img-size));
    grid-template-rows: repeat(10, var(--img-size));
    margin: calc(var(--img-size) * -1) calc(var(--img-size) * 0.5 - 8rem) calc(var(--img-size) * -1.2) 0;
  }
  
  .gallery_wrapper img:nth-of-type(6), .gallery_wrapper img:nth-of-type(15),
  .gallery_wrapper img:nth-of-type(24), .gallery_wrapper img:nth-of-type(33)
  { grid-column: 2 / span 2; }

  .mobile-msg, .mobiletext { display: none; }
  .desktop-msg, .computertext { display: block; }
}

@keyframes slideOutLeft { to { transform: translate3d(-100%, 0, 0); opacity: 0; } }
@keyframes slideOutRight { to { transform: translate3d(100%, 0, 0); opacity: 0; } }
@keyframes slideOutUp { to { transform: translate3d(0, -100%, 0); opacity: 0; } }

.animate-next { animation: slideOutLeft 450ms cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards; }
.animate-prev { animation: slideOutRight 450ms cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards; }
.animate-down { animation: slideOutUp 450ms cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
