@font-face {
  font-family: "Gerstner Programm";
  src: url("assets/Gerstner-ProgrammBold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  ascent-override: 100.5%;
  descent-override: 29.5%;
  line-gap-override: 0%;
}

:root {
  --blue: #0000ff;
  --dot-size: 6px;
  --paper: #fcfcfc;
  background: var(--paper);
  color: var(--blue);
  font-family: "Gerstner Programm", Arial, sans-serif;
  font-weight: 700;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

::selection {
  background-color: var(--blue);
  color: var(--paper);
}

body {
  margin: 0;
  position: relative;
  container-type: inline-size;
}

.cover {
  --page-width: 100vw;
  --reference-width: 1080;
  --reference-unit: calc(var(--page-width) / var(--reference-width));
  --margin: calc(30 * var(--reference-unit));
  --mobile-mark-height: calc(36.182 * var(--reference-unit));
  --mobile-mark-scale: 1.05;
  --mobile-mark-gap: calc(19.866 * var(--reference-unit));
  --clearance: max(calc(var(--mobile-mark-height) + var(--mobile-mark-gap)), 2.4em);
  box-sizing: border-box;
  display: grid;
  position: relative;
  grid-template-rows: minmax(var(--clearance), 1fr) auto minmax(var(--clearance), 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--margin);
  font-size: var(--mobile-font-size, calc(33.894 * var(--reference-unit)));
  letter-spacing: 0.02em;
  line-height: 1.27;
}

@supports (width: 1cqw) {
  .cover {
    --page-width: 100cqw;
  }
}

.identity {
  position: relative;
  grid-row: 2;
}

.headline,
.contact {
  margin: 0;
  white-space: nowrap;
}

.headline {
  font: inherit;
}

.mark {
  position: absolute;
  display: block;
  width: auto;
  height: var(--mobile-mark-height);
  left: 0;
  bottom: calc(100% + var(--mobile-mark-gap) - 0.20em);
  transform: scale(var(--mobile-mark-scale));
  transform-origin: left bottom;
}

.contact {
  grid-row: 3;
  align-self: end;
  justify-self: start;
  font-style: normal;
}

.contact a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.contact a:focus-visible {
  outline-color: var(--blue);
}

@media (any-pointer: fine) and (forced-colors: none) {
  :root[data-dot-cursor],
  :root[data-dot-cursor] .contact a,
  :root[data-dot-cursor] .headline [role="button"],
  :root[data-dot-cursor] .gallery-slide {
    cursor: none;
  }

  :root[data-dot-cursor]::after {
    content: "";
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 1;
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background-color: var(--blue);
    transform: translate(var(--cursor-x), var(--cursor-y)) translate(-50%, -50%);
    pointer-events: none;
  }
}

@supports (text-box-trim: trim-both) and (text-box-edge: cap alphabetic) {
  .headline,
  .contact {
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
  }

  .mark {
    bottom: calc(100% + var(--mobile-mark-gap));
  }

  .contact {
    margin-bottom: 0.121em;
  }
}

.gallery-panel {
  position: absolute;
  inset: 15px 15px 15px var(--gallery-left);
}

.gallery-stage {
  width: 100%;
  height: 100%;
  container-type: size;
  display: grid;
  place-items: center;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.is-android-chrome .gallery-stage {
  -webkit-tap-highlight-color: transparent;
}

.gallery-stage:focus {
  outline: none;
}

.gallery-stage:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: -1px;
}

.gallery-slide {
  --slide-aspect: 0.8;
  --gallery-radius: 4px;
  position: relative;
  width: min(100%, calc(100cqh * var(--slide-aspect)));
  aspect-ratio: var(--slide-aspect);
  overflow: hidden;
  border-radius: var(--gallery-radius);
  cursor: pointer;
}

.gallery-slide--video {
  --slide-aspect: calc(16 / 9);
}

.gallery-slide :is(picture, img, video) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.gallery-slide video::-webkit-media-controls {
  display: none;
}

.about-stop,
.gallery-stop {
  display: none;
}

@media (width < 940px) {
  :root {
    --mobile-inset: 2.82vw;
    overflow: hidden;
  }

  body {
    /* Keep the browser viewport still while the two screens scroll inside it. */
    container-type: normal;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: auto;
    overscroll-behavior-y: contain;
    overflow-anchor: none;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
  }

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

  body.has-managed-touch-scroll {
    touch-action: pan-x pinch-zoom;
  }

  body.is-aligning-touch-scroll {
    scroll-snap-type: none;
  }

  .cover {
    --page-width: 100vw;
    --margin: var(--mobile-inset);
    --mobile-mark-gap: 0.56em;
    min-height: 100%;
  }

  .identity {
    --headline-cap-inset: 0px;
    --mobile-logo-stack: calc(var(--mobile-mark-height) * var(--mobile-mark-scale) + var(--mobile-mark-gap) - var(--headline-cap-inset));
    position: fixed;
    top: 0;
    inset-inline: var(--mobile-inset);
    z-index: 1;
    transform: translateY(max(
      var(--mobile-inset),
      calc(50dvh + var(--mobile-center-offset, 0px) - var(--mobile-identity-scroll, 0px)
        - 50% - var(--mobile-logo-stack) / 2 - var(--mobile-identity-hold-offset, 0px))
    ));
  }

  .holds-mobile-identity .identity {
    transform: translateY(var(--mobile-inset));
  }

  .headline {
    text-align: center;
  }

  .mark {
    position: static;
    height: calc(var(--mobile-mark-height) * var(--mobile-mark-scale));
    margin-bottom: calc(var(--mobile-mark-gap) - var(--headline-cap-inset));
    transform: none;
  }

  @supports not ((text-box-trim: trim-both) and (text-box-edge: cap alphabetic)) {
    .identity {
      /* Match the gap to Geist's cap height inside the untrimmed line box. */
      --headline-cap-inset: 0.245em;
    }
  }

  .contact {
    position: fixed;
    bottom: var(--mobile-inset);
    left: var(--mobile-inset);
    z-index: 1;
    margin-bottom: 0;
  }

  .cover,
  .about-stop,
  .gallery-stop {
    flex: none;
    scroll-snap-align: start;
  }

  .about-stop {
    display: block;
    height: 100%;
    scroll-snap-stop: always;
  }

  .skip-about-on-return .about-stop {
    display: none;
  }

  .about-copy {
    position: fixed;
    inset-inline: var(--mobile-inset);
    top: var(--about-mobile-top, 0px);
    z-index: 1;
  }

  .about-line {
    letter-spacing: var(--about-tracking, inherit);
    word-spacing: var(--about-word-spacing, 0px);
  }


  @media (prefers-reduced-motion: no-preference) {
    .about-copy .about-line {
      transition-delay: var(--mobile-hide-delay, var(--hide-delay));
    }
  }

  .about-copy.closes-instantly .about-line {
    transition: none;
  }

  .can-enter-mobile-gallery .gallery-stop {
    display: block;
    height: 100%;
  }

  .gallery-panel {
    /* Pin the media inside the scroll container, independently of its snap stop. */
    --gallery-close-duration: 220ms;
    --gallery-top: calc(2 * var(--mobile-inset) + var(--gallery-identity-height, 0px));
    --gallery-bottom: calc(2 * var(--mobile-inset) + var(--gallery-contact-height, 0px));
    position: sticky;
    inset: 0 auto auto;
    z-index: 1;
    order: -1;
    flex: none;
    height: 0;
  }

  .gallery-stage {
    position: absolute;
    inset-inline: var(--mobile-inset);
    top: var(--gallery-top);
    width: auto;
    height: max(0px, calc(100dvh - var(--gallery-top) - var(--gallery-bottom)));
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s var(--gallery-close-duration);
  }

  .gallery-panel.is-revealed .gallery-stage {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .gallery-slide {
    clip-path: inset(50% 0 round var(--gallery-radius));
    transition: clip-path var(--gallery-close-duration) ease-in-out;
  }

  .gallery-panel.is-revealed .gallery-slide {
    clip-path: inset(0 round var(--gallery-radius));
    transition: clip-path 440ms cubic-bezier(0.25, 0.1, 0.25, 1);
  }

  @media (prefers-reduced-motion: reduce) {
    .gallery-stage,
    .gallery-slide,
    .gallery-panel.is-revealed .gallery-slide {
      transition: none;
    }
  }
}

.about-copy {
  margin: 0;
  font: inherit;
  visibility: hidden;
  pointer-events: none;
}

.about-copy.is-open {
  pointer-events: auto;
}

.about-line {
  display: block;
  white-space: nowrap;
  visibility: hidden;
  transition: visibility 0s linear var(--hide-delay);
}

.about-copy.is-open .about-line {
  visibility: visible;
  transition-delay: var(--reveal-delay);
}

@media (prefers-reduced-motion: reduce) {
  .about-line,
  .about-copy.is-open .about-line {
    transition-delay: 0s;
  }
}

.hover-type {
  position: relative;
}

.hover-type::after {
  content: "";
  position: absolute;
  inset-inline-start: calc(100% + var(--dot-size));
  top: 50%;
  z-index: 2;
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  background-color: var(--blue);
  transform: translateY(-50%);
  visibility: hidden;
  pointer-events: none;
}

:is(.headline [role="button"], .contact a):focus-visible .hover-type::after {
  visibility: visible;
}

@media (any-hover: hover) {
  .hover-type {
    display: inline-grid;
    vertical-align: baseline;
  }

  :is(.headline [role="button"], .contact a):hover .hover-type::after {
    visibility: visible;
  }
}

@media (width >= 940px) {
  .headline [role="button"] {
    cursor: pointer;
  }

  .contact a:focus-visible,
  .headline [role="button"]:focus-visible {
    text-decoration: underline var(--blue);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
    text-decoration-skip-ink: none;
  }

  .about-copy {
    position: absolute;
    width: var(--about-width);
    left: var(--margin);
    top: var(--about-top);
  }

  .cover {
    --reference-width: 3024;
    font-size: calc(30 * var(--reference-unit));
    letter-spacing: -0.009em;
    line-height: 1.266;
    /* The final track starts at the left edge of the centered logo. */
    grid-template-columns: var(--about-width, max-content) minmax(0, 1fr) calc(50% + 3.5336em);
    grid-template-rows: 1lh;
    align-content: center;
  }

  .identity {
    display: contents;
  }

  .mark {
    inset: 50% auto auto 50%;
    height: 1.1262em;
    transform: translate(-50%, -50%);
  }

  .headline {
    grid-area: 1 / 1;
  }

  .contact {
    grid-area: 1 / 2;
    align-self: start;
    justify-self: center;
    margin-bottom: 0;
  }

  .headline,
  .contact {
    text-box-trim: none;
  }

  .gallery-panel {
    /* Keep the gallery at the position established in v3. */
    --gallery-left: 56.024%;
  }
}

[data-touch-selection] :is(.headline, .headline > span, .contact, .contact a, .about-copy) {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

[data-touch-selection] [data-selected] {
  background-color: var(--blue);
  color: var(--paper);
  text-decoration-color: var(--paper);
}

.touch-copy {
  position: fixed;
  z-index: 1;
  padding: 10px 12px;
  border: 1px solid var(--blue);
  background: var(--paper);
  color: var(--blue);
  font: inherit;
  font-size: 13px;
}

.touch-copy-buffer {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
