:root {
  --color-page: #ffffff;
  --color-text: #050505;
  --color-muted: #606060;
  --color-border: #151515;
  --color-line: #d7d7d2;
  --stroke-button: 2px solid var(--color-text);
  --space-page: clamp(12px, calc(3.6vw - 8px), 44px);
  font-family: Helvetica, Arial, sans-serif;
  color: var(--color-text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .experience,
body.modal-open .landing {
  filter: brightness(0.38);
  pointer-events: none;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  min-height: 100vh;
}

.is-hidden {
  display: none !important;
}

.landing {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-page);
  overflow: hidden;
}

.landing::before,
.landing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.landing::before {
  background: radial-gradient(circle at center, #fff 0 28%, rgba(255, 255, 255, 0.92) 38%, rgba(255, 255, 255, 0) 62%);
}

.landing::after {
  border: 0;
}

.landing__inner {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  text-align: center;
}

.landing-thumbnails {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.landing-thumb {
  position: absolute;
  top: var(--thumb-top);
  left: var(--thumb-left);
  width: var(--thumb-size);
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.94);
  animation: thumbDrift 1.8s ease-out var(--thumb-delay) forwards;
}

.landing-thumb img {
  display: block;
  max-width: 100%;
  max-height: 76px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.landing__footer {
  z-index: 3;
}

@keyframes thumbDrift {
  0% {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(0.94);
  }

  100% {
    opacity: var(--thumb-opacity);
    transform: translate3d(var(--thumb-drift-x), var(--thumb-drift-y), 0) scale(1);
  }
}

.landing h1 {
  margin: 0 0 34px;
  font-size: clamp(54px, 9vw, 118px);
  font-weight: 400;
  line-height: 0.9;
}

.landing p {
  margin: 0 auto 14px;
  max-width: 620px;
  color: var(--color-muted);
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.35;
  text-wrap: balance;
}

.landing .button {
  margin-top: 34px;
}

.experience {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(18px, 2.4vw, 34px) var(--space-page) 54px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin-bottom: clamp(12px, 2vw, 22px);
}

.wordmark {
  flex: 1 1 auto;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

.topbar p {
  position: fixed;
  top: clamp(18px, 2.4vw, 34px);
  right: var(--space-page);
  z-index: 3;
  margin: 0;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

.loading-state {
  flex: 1 1 auto;
  min-height: 54vh;
  display: grid;
  place-items: center;
  background: transparent;
}

.loading-state p {
  margin: 0;
  color: var(--color-muted);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.12;
  text-align: center;
}

.study {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(360px, 1fr);
  gap: clamp(34px, 5vw, 76px);
  align-content: center;
  align-items: center;
  justify-items: center;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 10px 0 26px;
}

.art-panel {
  min-width: 0;
}

.art-frame {
  display: grid;
  place-items: center;
  width: min(440px, 38vw);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.art-frame:focus-visible {
  outline: 1px solid var(--color-text);
  outline-offset: 8px;
}

.art-frame img {
  display: block;
  max-width: 100%;
  max-height: min(44vh, 440px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.question-panel {
  width: min(460px, 100%);
  min-width: 0;
  padding-top: 0;
}

.question-panel h2 {
  margin: 0 0 18px;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 400;
  line-height: 1.12;
  text-align: left;
  text-wrap: balance;
  overflow-wrap: normal;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.answers {
  display: grid;
  gap: 6px;
  min-height: 0;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.answers.is-waiting,
.question-panel h2.is-waiting {
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
}

.answer {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 20px;
  border: var(--stroke-button);
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  transition: opacity 180ms ease;
}

.answer:hover:not(:disabled),
.answer:focus-visible {
  border-color: var(--color-text);
  background: var(--color-text);
  color: #fff;
  opacity: 1;
  outline: none;
}

.answer:disabled {
  cursor: default;
}

.answer__main {
  display: block;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.2;
}

.answer__status {
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1;
}

.answer.is-eliminated {
  color: var(--color-muted);
  opacity: 0.46;
  background: transparent;
  border-color: var(--color-line);
}

.answer.is-eliminated .answer__status {
  color: var(--color-text);
}

.answer.is-eliminated:hover,
.answer.is-eliminated:focus-visible {
  color: var(--color-muted);
  background: transparent;
  border-color: var(--color-line);
}

.button {
  min-height: 62px;
  padding: 0 34px;
  border: var(--stroke-button);
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font-size: clamp(20px, 2.2vw, 31px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  transition:
    background 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.button:hover:not(:disabled),
.button:focus-visible {
  background: var(--color-text);
  color: #fff;
  opacity: 1;
  outline: none;
}

.button:disabled {
  cursor: default;
  opacity: 0.36;
}

.button--primary {
  background: transparent;
  color: var(--color-text);
}

.button--primary:hover:not(:disabled),
.button--primary:focus-visible {
  background: var(--color-text);
}

.modal {
  width: min(420px, calc(100vw - 40px));
  padding: 0;
  border: var(--stroke-button);
  border-radius: 0;
  color: var(--color-text);
}

.modal::backdrop,
.artwork-modal::backdrop {
  background: rgba(255, 255, 255, 0.78);
}

.artwork-modal::backdrop {
  background: rgba(255, 255, 255, 0.78);
}

.modal__body {
  display: grid;
  gap: 24px;
  padding: 30px;
}

.modal .button {
  width: 100%;
}

.modal h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
}

.modal__details {
  display: grid;
  gap: 18px;
}

.modal dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.modal dl div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
}

.modal dt {
  color: var(--color-muted);
}

.modal dd {
  margin: 0;
}

.modal p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.45;
}

.modal__progress {
  font-size: 18px;
}

.modal__link {
  width: fit-content;
  border-bottom: 1px solid currentColor;
  line-height: 1.4;
}

.artwork-modal {
  width: min(78vw, 1040px);
  max-width: none;
  height: calc(100vh - 132px);
  max-height: none;
  margin: 66px auto 46px;
  padding: 58px 36px 36px;
  border: var(--stroke-button);
  color: var(--color-text);
  background: #fff;
  overflow: hidden;
}

.artwork-modal img {
  display: block;
  max-width: min(72vw, 820px);
  max-height: min(calc(100vh - 248px), 760px);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.artwork-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
}

.artwork-modal__close:hover,
.artwork-modal__close:focus-visible {
  color: var(--color-text);
  outline: none;
}

.footer {
  position: fixed;
  right: var(--space-page);
  bottom: 14px;
  left: var(--space-page);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.3;
}

.footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--color-text);
  outline: none;
}

@media (max-width: 640px) {
  :root {
    --space-page: clamp(20px, 3.6vw, 52px);
  }

  .experience {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding-top: 88px;
    padding-bottom: 20px;
  }

  .topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 20;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 0;
    padding: 20px var(--space-page) 14px;
    background: #fff;
  }

  .topbar p {
    position: static;
    flex: 0 0 auto;
    font-size: 14px;
    text-align: right;
  }

  .study {
    flex: 0 0 auto;
    grid-template-columns: 1fr;
    gap: clamp(18px, 2.6vh, 28px);
    margin: 0 auto;
    padding: 0;
  }

  .loading-state {
    flex: 0 0 auto;
    min-height: 48vh;
    padding: 0;
  }

  .art-frame {
    width: min(225px, 64vw);
  }

  .art-frame img {
    max-height: 245px;
  }

  .question-panel {
    width: 100%;
  }

  .question-panel h2 {
    width: min(300px, 100%);
    font-size: 25px;
    margin: 0 auto 12px;
    text-align: center;
  }

  .answers {
    min-height: 0;
  }

  .answer {
    min-height: 50px;
    padding: 8px 16px;
  }

  .button {
    min-height: 58px;
    font-size: 20px;
  }

  .modal dl div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .artwork-modal {
    width: calc(100vw - 36px);
    height: calc(100dvh - 124px);
    margin: 84px auto 22px;
    padding: 52px 18px 24px;
  }

  .artwork-modal img {
    max-width: 88vw;
    max-height: calc(100dvh - 200px);
  }

  .footer {
    position: static;
    align-items: center;
    flex-direction: column;
    gap: 8px;
    margin-top: 24px;
    padding: 0 20px 18px;
    background: #fff;
    text-align: center;
    font-size: 12px;
    line-height: 1.25;
  }

  .footer a {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .footer a:first-child {
    max-width: 240px;
  }

  .landing-thumbnails {
    opacity: 0.72;
  }

  .landing-thumb img {
    max-height: 58px;
  }

  .landing__footer {
    position: absolute;
    right: 20px;
    bottom: 16px;
    left: 20px;
    margin-top: 0;
    padding: 0;
  }
}
