* {
  box-sizing: border-box;
}

:root {
  --background: #ffffff;
  --text: #111111;
  --inactive: #a4a4a4;

  --artwork-size: min(78vw, 750px);
  --panel-width: 280px;
  --panel-gap: 38px;
}

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

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;

  background: var(--background);
  color: var(--text);

  font-family:
    "Neue Haas Grotesk Text Pro",
    "Neue Haas Grotesk",
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;

  font-weight: 300;
}

button {
  font-family: inherit;
}


/* FIXED SITE INDEX */

.site-navigation {
  position: fixed;
  top: 23px;
  left: 27px;
  z-index: 30;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  text-align: left;
}

.site-name {
  margin-bottom: 16px;

  color: #666666;

  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.3;

  text-decoration: none;
}

.site-name:hover,
.site-name:focus-visible {
  color: #111111;
  outline: none;
}

.project-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  gap: 10px;
}

.project-link {
  color: #777777;

  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.25;

  text-decoration: none;

  transition: color 180ms ease;
}

a.project-link:hover,
a.project-link:focus-visible {
  color: #111111;
  outline: none;
}

.project-link.unavailable {
  color: #b7b7b7;

  cursor: default;
  pointer-events: none;
}

.mobile-site-navigation {
  display: none;
}


/* MAIN INTERFACE */

.main-interface {
  width: 100%;
  min-height: calc(100vh + 80px);

  padding:
    6px
    24px
    42px;

  text-align: center;

  transform: translateY(-38px);
}

.section-title {
  margin: 0 0 24px;

  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.25;
}

.section-stage {
  position: relative;

  width: 100%;
  min-height: var(--artwork-size);
}

@media (min-width: 1181px) {
  .section-stage {
    transform: translateY(40px);
  }
}

.artwork-frame {
  position: relative;

  width: var(--artwork-size);
  height: var(--artwork-size);

  margin: 0 auto;
}

.artwork-image {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;

  opacity: 1;
}

.mobile-navigation {
  display: none;
}


/* SPECIAL II → II-2 CROSSFADE */

.face-transition-image {
  z-index: 2;

  opacity: 0;
  pointer-events: none;

  transition: opacity 950ms ease;
}

.face-transition-image.visible {
  opacity: 1;
}

.face-transition-image.no-transition {
  transition: none;
}


/* SHARED TEXT PANEL */

.information-panel {
  position: absolute;

  top: 50%;
  left: calc(
    50% +
    (var(--artwork-size) / 2) +
    var(--panel-gap)
  );

  width: var(--panel-width);
  max-height: min(
    calc(var(--artwork-size) - 40px),
    590px
  );

  overflow-y: auto;
  transform: translateY(-50%);

  padding: 5px 10px 20px 0;

  color: #222222;
  text-align: left;

  scrollbar-width: thin;
  scrollbar-color: #c7c7c7 transparent;
}

.information-panel::-webkit-scrollbar {
  width: 4px;
}

.information-panel::-webkit-scrollbar-thumb {
  background: #c7c7c7;
}

.information-panel.empty {
  visibility: hidden;
}

.prose-stage-number {
  display: block;

  margin-bottom: 26px;

  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.prose-text {
  margin: 0;

  white-space: pre-line;

  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
}

.caption-title {
  margin: 0 0 22px;

  white-space: nowrap;

  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.065em;
  line-height: 1.45;
}

.caption-lines {
  margin: 0;

  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
}


/* CONTROL ROWS */

.all-controls {
  width: min(96vw, 1040px);
  margin: 32px auto 0;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  gap: 8px 25px;

  margin: 0;
}

.control-row + .control-row {
  margin-top: 12px;
}

.control-button {
  appearance: none;

  padding: 4px 0;

  border: 0;
  border-bottom: 1px solid transparent;

  background: transparent;
  color: var(--inactive);

  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.1em;

  cursor: pointer;

  transition:
    color 180ms ease,
    border-color 180ms ease;
}

.control-button:hover,
.control-button:focus-visible {
  color: #111111;
  outline: none;
}

.control-button.active {
  color: #111111;
  border-bottom-color: #111111;
}

.roman-controls {
  gap: 8px 34px;
}

.life-form-controls {
  gap: 8px 15px;
}

.life-form-hint {
  width: 100%;
  min-height: 16px;
  margin: 2px auto 3px;

  color: #a8a8a8;

  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-align: center;

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.life-form-hint.visible {
  opacity: 1;
  visibility: visible;
}

.convergence-controls {
  gap: 8px 30px;
}


/* MEDIUM SCREENS */

@media (max-width: 1320px) {
  :root {
    --artwork-size: min(75vw, 750px);
    --panel-width: 265px;
    --panel-gap: 26px;
  }
}

@media (max-width: 1180px) {
  :root {
    --artwork-size: min(82vw, 760px);
  }

  .main-interface {
    padding-top: 76px;
  }

  .section-stage {
    min-height: auto;
  }

  .information-panel {
    position: relative;

    top: auto;
    left: auto;

    width: min(86vw, 360px);
    max-height: none;

    margin: 35px auto 0;
    padding: 0;

    overflow: visible;
    transform: none;
  }

  .information-panel.empty {
    display: none;
  }

  .caption-title {
    white-space: normal;
  }
}

.desktop-project-signature {
  margin:
    150px
    auto
    18px;

  color: #8f8f8f;
  text-align: center;
}

.desktop-project-contact-label {
    color: #999999;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-align: center;
    margin-bottom: 4px;
}

.desktop-project-name {
  margin-bottom: 8px;

  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.15em;
  line-height: 1.3;
}

.desktop-project-contact {
  color: #9a9a9a;

  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.mobile-project-signature {
  display: none;
}


/* MOBILE */

@media (max-width: 700px) {
  :root {
    --artwork-size: min(calc(100vw - 4px), 650px);
  }

  /* Hide the original desktop navigation on phones only. */

  .site-navigation {
    display: none;
  }

  /* Mobile-only project menu. */

.mobile-site-navigation {
  position: absolute;

  top: 11px;
  left: 14px;
  z-index: 30;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  padding: 0;
}

  .mobile-project-menu-toggle {
    appearance: none;

    display: flex;
    align-items: center;

    gap: 8px;

    min-height: 28px;
    padding: 0;

    border: 0;

    background: transparent;
    color: #666666;

    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.1em;
    line-height: 1.2;

    text-align: left;
    cursor: pointer;
  }

  .mobile-project-menu-arrow {
    display: inline-block;

    font-size: 11px;
    line-height: 1;

    transition: transform 180ms ease;
  }

  .mobile-site-navigation.open
  .mobile-project-menu-arrow {
    transform: rotate(180deg);
  }

  .mobile-project-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;

    gap: 8px;

    margin-top: 5px;
  }

  .mobile-site-navigation.open
  .mobile-project-links {
    display: flex;
  }

  .mobile-project-link {
    color: #777777;

    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.11em;
    line-height: 1.25;

    text-decoration: none;
  }

  .mobile-project-link.unavailable {
    color: #b7b7b7;

    cursor: default;
    pointer-events: none;
  }

  .main-interface {
    min-height: auto;

    padding:
      36px
      6px
      40px;

      transform: none;
  }

.section-title {
  display: none;
}

.artwork-frame {
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

  .artwork-image {
    user-select: none;
    -webkit-user-drag: none;
  }

  .mobile-navigation {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;

    width: min(88vw, 360px);
    margin: 2px auto 0;
  }

  .mobile-nav-button {
    appearance: none;

    width: 44px;
    height: 44px;
    padding: 0;

    border: 0;

    background: transparent;
    color: #777777;

    font-size: 18px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transition:
      color 180ms ease,
      opacity 180ms ease;
  }

  .mobile-nav-button:focus-visible {
    color: #111111;
    outline: none;
  }

  .mobile-nav-button:disabled {
    opacity: 0.2;
    cursor: default;
  }

.mobile-current-label {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;

  color: #777777;

  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.2;

  text-align: center;

  cursor: default;
  user-select: none;
  touch-action: manipulation;
}

.information-panel {
  width: min(88vw, 330px);
  min-height: 500px;

  margin-top: 18px;
}

.information-panel.empty {
  display: block;
  visibility: hidden;
}

  .prose-stage-number {
    margin-bottom: 16px;

    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.12em;
  }

  .prose-text {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.55;
  }

  .caption-title {
    margin-bottom: 16px;
    font-size: 13px;
  }

  .caption-lines {
    font-size: 13px;
    line-height: 1.55;
  }

  .all-controls {
    display: none;
  }

  .desktop-project-signature {
    display: none;
  }

.mobile-project-signature {
  display: block;

  margin: 60px 0 24px;

  color: #999999;
  text-align: center;
}

.mobile-project-contact-label {
    color: #999999;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-align: center;
    margin-bottom: 4px;
}

  .mobile-project-name {
    margin-bottom: 6px;

    font-size: 6px;
    font-weight: 300;
    letter-spacing: 0.16em;
    line-height: 1.3;
  }

  .mobile-project-contact {
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.03em;
    line-height: 1.3;
  }
}