:root {
  --design-w: 5400;
  --design-h: 3456;
  --scale-x: calc(100vw / var(--design-w));
  --title-size: clamp(2.55rem, 12.035vw, 40.62rem);
  --links-size: clamp(1.28rem, 4.14vw, 13.97rem);
  --side-pad: clamp(18px, 4.32vw, 233px);
  --bottom-pad: clamp(24px, 7.7vh, 266px);
  --ink: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Sitka Small", Sitka, Georgia, "Times New Roman", serif;
  user-select: none;
  -webkit-user-select: none;
}

#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c1724;
  transition: opacity 0.8s ease-out, visibility 0.8s;
}

#loader span {
  color: rgba(255, 255, 255, 0.2);
  font-family: monospace;
  letter-spacing: 0.2em;
  font-size: 0.875rem;
}

body.is-loaded #loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: #142439;
}

.bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("./background.svg");
  background-size: cover;
  background-position: center;
  opacity: 1;
}

.copy {
  position: absolute;
  z-index: 2;
  left: var(--side-pad);
  right: var(--side-pad);
  bottom: calc(var(--bottom-pad) + 8px);
  color: var(--ink);
  opacity: 1;
}

.brand-title {
  display: block;
  width: 100%;
  margin: 0;
  font-family: "Sitka Display", "Sitka Small", Sitka, Georgia, "Times New Roman", serif;
  font-size: var(--title-size);
  font-weight: 300;
  line-height: 0.86;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 6px 6px 0 rgba(0, 0, 0, 0.1);
  text-rendering: optimizeLegibility;
}

.brand-links {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.04em 0.35em;
  width: min(100%, 72vw);
  margin-top: clamp(4px, 1.15vh, 40px);
  padding-left: calc(25.12 * var(--scale-x));
  font-family: "Sitka Small", Sitka, Georgia, "Times New Roman", serif;
  font-size: var(--links-size);
  font-weight: 400;
  line-height: 1.02;
}

.word-link {
  position: relative;
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  outline-offset: 0.16em;
}

.word-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.12em;
  height: max(2px, 0.055em);
  background: currentColor;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.word-link:hover::after,
.word-link:focus-visible::after {
  transform: scaleX(1);
}



@media (max-aspect-ratio: 1/1) {
  :root {
    --title-size: clamp(2.25rem, 13.5vw, 8rem);
    --links-size: clamp(1.18rem, 6.8vw, 4rem);
    --side-pad: clamp(18px, 5.2vw, 42px);
    --bottom-pad: clamp(34px, 9vh, 92px);
  }

  .brand-links {
    width: min(100%, 26rem);
    gap: 0.1em 0.42em;
    margin-top: clamp(8px, 1.8vh, 18px);
    padding-left: 0;
  }
}

@media (max-width: 520px) {
  :root {
    --title-size: clamp(2rem, 11.4vw, 3.9rem);
    --links-size: clamp(1.06rem, 6.1vw, 2.2rem);
    --bottom-pad: max(22px, env(safe-area-inset-bottom));
  }

  .copy {
    right: 18px;
  }

  .brand-links {
    width: 100%;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  :root {
    --title-size: clamp(2.2rem, 9.6vw, 8.6rem);
    --links-size: clamp(1.1rem, 3.4vw, 3.1rem);
    --bottom-pad: clamp(18px, 5vh, 42px);
  }

  .brand-links {
    width: 86vw;
    margin-top: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
