@font-face {
  font-family: "Helvetica Now Display";
  src: url("fonts/HelveticaNowDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Now Display";
  src: url("fonts/HelveticaNowText-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "FreigeistNeue";
  src: url("fonts/RBFreigeistNeue-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "FreigeistNeue";
  src: url("fonts/RBFreigeistNeue-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --edge-pad: clamp(20px, 6vw, 48px);
}

.site-header {
  display: flex;
  align-items: center;
  gap: clamp(16px, 6vw, 48px);
  padding: 8px var(--edge-pad);
  min-height: 48px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #f0f0ee;
  margin-bottom: 2px;
  box-shadow: 0 60px 0 0 #f0f0ee;
  pointer-events: none;
}

.site-header__main {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-header__aside {
  flex: 1 0 0;
  min-width: 0;
}

.header__back,
.header__next {
  color: rgba(26, 26, 26, 0.35);
  font-size: 0.6rem;
  font-family: "FreigeistNeue", sans-serif;
  line-height: 1;
}

.header__back {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__next {
  display: block;
  text-align: right;
  white-space: normal;
}

html, body {
  overflow-x: hidden;
  font-size: clamp(1rem, 1.5vw, 1.5rem);
  scrollbar-width: none;
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
  display: none;
}

body {
  background: #f0f0ee;
  font-family: "Helvetica Now Display", "Helvetica Neue", Arial, sans-serif;

  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.invert-stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #f0f0ee;
}

.stage-trigger {
  height: 100vh;
}

.title-screen {
  position: fixed;
  left: var(--edge-pad);
  top: 50%;
  transform: translateY(-50%);
  width: calc(100vw - 2 * var(--edge-pad));
  max-width: 720px;
  text-align: left;
  color: #f0f0ee;
  mix-blend-mode: difference;
  z-index: 3;
  pointer-events: none;
}

.title-heading {
  font-weight: 700;
  font-size: clamp(32px, calc(24px + 3vw), 104px);
  line-height: 1.1;
}

.circle {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  will-change: transform, width, height, filter, opacity, background-color;
}

.circle--secondary {
  z-index: 1;
}

.study-circle {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  will-change: transform, width, height, filter, opacity;
}

.study-circle--hoverable {
  pointer-events: auto;
}

.ripple-ring {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 12px solid #000000;
  pointer-events: none;
  z-index: 1;
}

.ripple-ring--light {
  border-color: #f0f0ee;
}

.study-name {
  position: fixed;
  top: 0;
  left: 0;
  color: #f0f0ee;
  mix-blend-mode: difference;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
  will-change: transform, opacity;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .study-name {
    font-size: 10px;
  }
}

.circle--clickable {
  pointer-events: auto;
}

.progress-bar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  z-index: 20;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.progress-bar-fill {
  height: 100%;
  width: 100%;
  background: #000000;
  transform: scaleY(0);
  transform-origin: top center;
}

.click-hint {
  position: fixed;
  left: 50%;
  bottom: calc(48px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  font-family: "FreigeistNeue", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-align: left;
  line-height: 1.6;
  color: #999999;
  mix-blend-mode: difference;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
}

.scene-texts {
  pointer-events: none;
}

.slide-text {
  position: fixed;
  top: 0;
  left: 0;
  width: min(21.7em, calc(100vw - 2 * var(--edge-pad)));
  color: #f0f0ee;
  mix-blend-mode: difference;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  font-size: clamp(40px, calc(20px + 2vw), 88px);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  will-change: transform, opacity;
}

.slide-text--plain-color {
  mix-blend-mode: normal;
  color: #000;
}

@media (max-width: 600px) {
  .slide-text {
    font-size: clamp(22px, 6.5vw, 32px);
  }
}

.source-reveal-text {
  left: var(--edge-pad);
  top: 5vh;
}

.slide-text--final {
  width: calc(100vw - 2 * var(--edge-pad));
  max-width: 720px;
  text-align: left;
  text-transform: uppercase;
  font-size: clamp(32px, calc(24px + 3vw), 104px);
  line-height: 1.1;
}

.impressum {
  position: fixed;
  left: var(--edge-pad);
  bottom: max(6vh, env(safe-area-inset-bottom));
  width: calc(100vw - 2 * var(--edge-pad));
  max-width: 380px;
  color: #f0f0ee;
  mix-blend-mode: difference;
  text-align: left;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
}

.impressum p {
  font-family: "FreigeistNeue", sans-serif;
  font-size: 0.6rem;
  line-height: clamp(1.35em, 2.5vw, 1.45em);
  margin-bottom: 1em;
}

.impressum-copyright {
  opacity: 0.7;
}

.scroll-hint {
  position: fixed;
  left: 50%;
  bottom: calc(48px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4em;
  font-family: "FreigeistNeue", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: #999999;
  mix-blend-mode: difference;
  z-index: 3;
  pointer-events: none;
}

.restart-hint {
  opacity: 0;
  cursor: pointer;
}

.ripple-legend {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-size: 0.6rem;
  letter-spacing: 0.03em;
  color: #f0f0ee;
  mix-blend-mode: difference;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
}

.ripple-legend-ring {
  font-size: 1.3em;
  line-height: 1;
  flex: none;
}

.scroll-arrow {
  order: -1;
  font-size: 0.45rem;
  letter-spacing: 0;
}

.hint-blink {
  animation: hint-blink 1.2s ease-in-out infinite;
}

.circle--clickable,
.study-circle--hoverable {
  touch-action: manipulation;
}

@keyframes hint-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.header__next-break {
  display: none;
}

@media (max-width: 600px) {
  .header__back,
  .header__next,
  .scroll-hint,
  .impressum p {
    font-size: 0.8rem;
  }

  .header__next-break {
    display: block;
  }

  .desktop-only-break {
    display: none;
  }
}
