:root {
  color-scheme: dark;
  --background: #000;
  --foreground: #fff;
  --accent-purple: #a66cff;
  --font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --page-gutter: clamp(24px, 5.1vw, 76px);
  --brand-size: clamp(19px, 1.75vw, 25px);
  --body-size: clamp(19px, 2.9vw, 36px);
  --body-leading: 1.2;
  --footer-size: clamp(13px, 1.2vw, 17px);
  --regular: 400;
  --bold: 700;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-family);
  font-weight: var(--regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.home-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 var(--page-gutter) 96px;
  overflow: hidden;
}

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding-top: 9vh;
}

.brand-link {
  position: relative;
  display: inline-block;
  color: var(--foreground);
  font-size: var(--brand-size);
  font-weight: var(--bold);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand-name {
  display: block;
}

.brand-portrait {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(96px, 16.5vw, 128px);
  height: auto;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 140ms ease;
  pointer-events: none;
}

.brand-link:hover .brand-portrait,
.brand-link:focus-visible .brand-portrait {
  opacity: 1;
}

.home-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  min-height: 70svh;
  margin: 6vh calc(-1 * var(--page-gutter)) 0;
}

.copy-column {
  position: relative;
  z-index: 2;
  width: min(52vw, 820px);
  margin: 0;
  font-size: var(--body-size);
  font-weight: var(--bold);
  line-height: var(--body-leading);
  text-align: justify;
  text-justify: inter-word;
  text-align-last: start;
  text-wrap: wrap;
}

.copy-column p {
  margin: 0;
}

.copy-column .second-paragraph {
  margin-top: 0.85em;
}

.project-link {
  color: inherit;
  text-decoration: none;
  cursor: none;
  outline-offset: 3px;
}

.project-link:hover,
.project-link:focus-visible {
  color: var(--accent-purple);
  text-decoration: none;
}

.visual-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.visual-slot {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc((100vw - min(52vw, 820px)) / 2 - var(--page-gutter));
  height: 62svh;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 180ms ease;
}

.visual-left {
  left: var(--page-gutter);
}

.visual-right {
  right: var(--page-gutter);
}

.visual-slot.is-visible {
  opacity: 1;
}

.visual-slot.is-raised {
  top: 22%;
  justify-content: flex-start;
}

.visual-slot.is-bottom-aligned {
  top: var(--copy-bottom);
  height: auto;
  transform: translateY(-100%);
}

.visual-slot.is-top-aligned {
  top: var(--copy-top);
  height: auto;
  transform: none;
}

/* Hyperraar right image: keep it slightly above the text. */
.visual-slot.is-hyperraar-right {
  top: calc(var(--copy-top) - 8vh);
  height: auto;
  transform: none;
}

.hover-asset {
  display: block;
  width: 100%;
  max-height: 58svh;
  object-fit: contain;
}

.hover-asset.is-figure-image {
  width: 78%;
  max-height: 48svh;
}

.hover-asset.is-hyperraar-image {
  width: 72%;
  max-height: 48svh;
}

.hover-asset.is-hyperraar-image {
  transform: translateX(-3.5vw);
}

.hover-asset.is-hyperraar-left-image {
  width: 66%;
  max-height: 48svh;
}

.hover-asset.is-drug-image {
  position: relative;
  left: 1vw;
  width: 88%;
  max-height: 48svh;
}

.hover-asset.is-rotated {
  transform: rotate(7deg);
  transform-origin: center;
}

.visual-slot.is-bottom-aligned .hover-asset,
.visual-slot.is-top-aligned .hover-asset {
  max-height: none;
}

.visual-backdrop {
  position: absolute;
  top: calc(var(--copy-bottom) + 2vh);
  left: 50%;
  z-index: 1;
  width: min(43vw, 680px);
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity 180ms ease;
}

.visual-backdrop.is-visible {
  opacity: 1;
}

.visual-backdrop img {
  display: block;
  width: 100%;
  height: auto;
}

.site-footer {
  position: absolute;
  right: var(--page-gutter);
  bottom: 5.1vh;
  left: var(--page-gutter);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--footer-size);
  font-weight: var(--regular);
  line-height: 1.2;
}

.site-footer a {
  color: var(--foreground);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-cursor-label {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: none;
  max-width: 220px;
  padding: 3px 5px;
  background: var(--foreground);
  color: #000;
  font-size: 11px;
  font-weight: var(--regular);
  line-height: 1.1;
  white-space: nowrap;
  pointer-events: none;
}

.project-cursor-label.is-visible {
  display: block;
}

@media (max-width: 900px) {
  .home-page {
    padding-right: 6vw;
    padding-left: 6vw;
    padding-bottom: 84px;
  }

  .home-stage {
    min-height: 68svh;
    margin-right: -6vw;
    margin-left: -6vw;
  }

  .copy-column {
    width: 76vw;
    text-align: left;
    text-align-last: left;
    font-size: clamp(19px, 3.3vw, 27px);
  }

  .visual-layer {
    display: none;
  }

  .project-link {
    cursor: pointer;
  }

  .project-cursor-label {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .home-page {
    overflow: visible;
    padding-right: 22px;
    padding-left: 22px;
  }

  .site-header {
    padding-top: 10vh;
  }

  .home-stage {
    min-height: auto;
    margin: 12vh 0 0;
  }

  .copy-column {
    width: 100%;
    font-size: clamp(19px, 5vw, 24px);
  }

  .copy-column .second-paragraph {
    margin-top: 1.3em;
  }

  .site-footer {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    margin-top: 12vh;
    padding-bottom: 24px;
  }
}

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