@font-face {
  font-family: "Mika Gothic";
  src: url("fonts/century-gothic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #ebf6f6;
  --veil: rgb(0 0 0 / 0.4);
  --font: "Mika Gothic", sans-serif;
  --gutter: clamp(20px, 5.16vw, 78px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overscroll-behavior: none;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #1c1814;
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: none;
  display: block;
}

.skip {
  position: absolute;
  left: 16px;
  top: 0;
  z-index: 20;
  transform: translateY(-120%);
  padding: 8px 16px;
  background: var(--ink);
  color: #1c1814;
  text-decoration: none;
}

.skip:focus {
  transform: translateY(16px);
}

.stage {
  height: 100svh;
}

.pin {
  position: relative;
  height: 100svh;
  overflow: hidden;
}

.veil,
.copy-layer,
.viewport {
  position: absolute;
  inset: 0;
}

.veil {
  z-index: 1;
  background: var(--veil);
  pointer-events: none;
}

.copy-layer {
  z-index: 2;
  pointer-events: none;
}

.copy-layer a {
  pointer-events: auto;
}

.wordmark {
  position: absolute;
  top: 18.53%;
  left: var(--gutter);
  margin: 0;
  width: min(1152px, calc(100% - var(--gutter) * 2));
  font-size: clamp(3.75rem, 11.236vw, 10.618rem);
  font-weight: 400;
  line-height: 0.697;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.wordmark span {
  display: block;
}

.copy {
  position: absolute;
  top: 59%;
  right: var(--gutter);
  margin: 0;
  width: min(434px, calc(100% - var(--gutter) * 2));
  font-size: 1rem;
  line-height: 1.2125;
  letter-spacing: 0.01em;
  text-align: right;
  text-shadow: 0 4px 4px rgb(0 0 0 / 0.25);
}

.status {
  position: absolute;
  left: 50%;
  top: 86.56%;
  margin: 0;
  font-size: 1rem;
  line-height: 1.2125;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.viewport {
  z-index: 0;
  overflow: hidden;
}

.track {
  position: relative;
  display: flex;
  height: 100%;
  width: max-content;
  will-change: transform;
}

.panel {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  width: auto;
}

.panel img {
  display: block;
  height: 100%;
  width: auto;
}

@media (max-width: 799px) {
  html {
    overscroll-behavior: auto;
  }

  html,
  body {
    height: auto;
    overflow: auto;
  }

  .stage,
  .pin {
    height: auto;
    overflow: visible;
  }

  .veil,
  .copy-layer {
    position: fixed;
    inset: 0;
    margin: 0;
    height: auto;
  }

  .veil {
    /* lvh covers the screen after iOS Safari hides its chrome */
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    height: 100lvh;
    min-height: 100dvh;
  }

  .copy-layer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    padding: 0 var(--gutter);
  }

  .wordmark,
  .copy,
  .status {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    width: auto;
    max-width: 100%;
    transform: none;
    text-align: left;
    animation: none;
  }

  .wordmark {
    font-size: clamp(3.5rem, 15vw, 4.75rem);
  }

  .copy {
    margin-top: 28px;
    max-width: 32ch;
    text-shadow: none;
  }

  .status {
    margin-top: 32px;
    white-space: normal;
  }

  .viewport {
    position: relative;
    inset: auto;
    overflow: visible;
  }

  .track {
    flex-direction: column;
    width: 100%;
    height: auto;
    transform: none !important;
  }

  .track > .panel:nth-child(n + 4) {
    display: none;
  }

  .panel {
    width: 100%;
    height: 100svh;
    overflow: hidden;
  }

  .panel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
  }
}

@media (min-width: 800px) {
  .wordmark {
    left: 5.16%;
    width: min(76.19vw, 1152px);
  }

  .copy {
    right: 12%;
    width: min(434px, 32vw);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .wordmark,
  .copy,
  .status {
    animation: rise 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .copy {
    animation-delay: 90ms;
  }

  .status {
    animation-delay: 160ms;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 800px) {
  .status {
    animation-name: rise-center;
  }
}

@keyframes rise-center {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    overscroll-behavior: auto;
  }

  .wordmark,
  .copy,
  .status {
    animation: none;
  }
}
