@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400&display=swap');
@import url('https://fonts.googleapis.com/css?family=Lora&display=swap');

:root {
  --transition-box-color: #0a0a0a;
  --transition-box-color-home: #171717;
  --home-hover-text-size: clamp(18px, 1.5vw, 52px);
  --noise-opacity: 0.34;
  --noise-dissolve-ms: 1000ms;
}

@keyframes fadeBackground {
  from { background-color: black; }
  to { background-color: black; }
}

html,
body {
  animation: fadeBackground 2s ease-out forwards;
  height: 100%;
  margin: 0;
  background-color: black;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Dark overlay-style scrollbars shown only while scrolling (+ 1s) */
* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

html.is-scrolling * {
  scrollbar-color: rgba(132, 132, 132, 0.55) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  background: transparent;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: rgba(132, 132, 132, 0);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  transition: background-color 0.2s ease;
}

html.is-scrolling *::-webkit-scrollbar-thumb {
  background-color: rgba(132, 132, 132, 0.55);
}

html.is-scrolling *::-webkit-scrollbar-thumb:hover {
  background-color: rgba(164, 164, 164, 0.72);
}

#noiseCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 4;
  transition: opacity var(--noise-dissolve-ms) ease-in-out;
}

html.noise-ready #noiseCanvas {
  opacity: var(--noise-opacity);
}

html.is-transitioning #noiseCanvas {
  opacity: 0;
}

#page {
  color: transparent;
  position: relative;
  z-index: 2;
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--transition-box-color);
  transform: translateX(-100%);
  transition: transform 0.62s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 20;
  pointer-events: none;
}

html.transition-back-home .loader {
  background-color: var(--transition-box-color-home);
  transform: translateX(0);
  animation: homeRevealToLeft 0.62s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes homeRevealToLeft {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.shapes-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  color: transparent;
}

.shape-item {
  display: block;
}

.shape-item-media {
  margin-left: 6px;
}

#textbox {
  text-align: center;
  margin-top: clamp(18px, 1.2vw, 28px);
  font-family: 'Montserrat', sans-serif;
  font-size: var(--home-hover-text-size);
  line-height: 1.14;
  color: white;
  height: calc(var(--home-hover-text-size) * 1.62);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#textbox span {
  display: block;
  opacity: 0;
  transform: translateY(12px);
}

#textbox span.float-in {
  animation: textFloatIn 0.18s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

#textbox span.float-out {
  animation: textFloatOut 0.14s ease forwards;
}

@keyframes textFloatIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes textFloatOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-9px);
  }
}

.shape {
  width: 10vw;
  height: 10vw;
  margin: 1vw;
  position: relative;
  overflow: hidden;
  background-color: #1b1b1b;
  display: block;
}

.shape:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hexagon {
  width: 11vw;
  height: 10vw;
  clip-path: polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%);
}

.triangle {
  clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
}

.rectangle {
  clip-path: inset(0);
}

.circle {
  clip-path: circle(49%);
}

.shape::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.shape-label {
  display: none;
}

.shape::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background-color: white;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.78s cubic-bezier(0.18, 0.9, 0.3, 1);
  border-radius: 100%;
  transform-origin: var(--transform-origin-x, 50%) var(--transform-origin-y, 50%);
  z-index: -1;
}

.shape:hover::after {
  transform: translate(-50%, -50%) scale(1);
}

footer {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  background-color: #000;
  color: #444;
  text-align: center;
  padding: 10px 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 1vw;
}

footer a {
  color: #555;
  text-decoration: none;
}

footer a:hover {
  color: #7a7a7a;
}

.home-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 16px calc(24px + env(safe-area-inset-right, 0px)) 16px calc(24px + env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.78rem, 0.42vw, 0.92rem);
  color: #777;
  pointer-events: none;
}

.home-topbar a {
  color: #8a8a8a;
  text-decoration: none;
  pointer-events: auto;
}

.home-topbar a:hover {
  color: #b0b0b0;
}

.home-topbar-contact,
.home-topbar-copy {
  max-width: min(92vw, 820px);
  text-align: center;
  overflow-wrap: anywhere;
  line-height: 1.3;
  pointer-events: auto;
}

.home-bottom-copy {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 14px calc(24px + env(safe-area-inset-right, 0px)) 14px calc(24px + env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.74rem, 0.38vw, 0.88rem);
  color: #6f6f6f;
  pointer-events: none;
}

@media (max-width: 900px) {
  .home-topbar {
    padding: 14px calc(24px + env(safe-area-inset-right, 0px)) 14px calc(24px + env(safe-area-inset-left, 0px));
    font-size: 0.8rem;
  }

  .home-bottom-copy {
    padding: 12px calc(24px + env(safe-area-inset-right, 0px)) 12px calc(24px + env(safe-area-inset-left, 0px));
    font-size: 0.78rem;
  }
}

@media (max-width: 900px) {
  .shape {
    width: 18vw;
    height: 18vw;
  }

  .hexagon {
    width: 19vw;
    height: 18vw;
  }

  #textbox {
    font-size: clamp(16px, 4vw, 30px);
    line-height: 1.16;
    height: clamp(28px, 6vw, 46px);
  }
}

@media (max-width: 600px) {
  .loader {
    transition-duration: 0.46s;
  }

  html.transition-back-home .loader {
    animation-duration: 0.46s;
  }

  .shapes-container {
    flex-wrap: nowrap;
    width: min(94vw, 460px);
    margin: 0 auto;
    gap: 1.6vw;
    align-items: flex-start;
  }

  .shape-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .shape {
    width: 20vw;
    height: 20vw;
    margin: 0;
  }

  .shape::after {
    transition-duration: 0.38s;
  }

  .hexagon {
    width: 22vw;
    height: 20vw;
  }

  .shape-label {
    display: block;
    margin-top: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(9px, 2.4vw, 11px);
    font-weight: 600;
    color: #d6d6d6;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.05;
    max-width: 92%;
    word-break: break-word;
    pointer-events: none;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
    z-index: 1;
  }

  #textbox {
    display: none;
  }

  footer {
    font-size: 3.8vw;
  }
}
