:root {
  color-scheme: dark;
  font:
    15px/1.4 system-ui,
    -apple-system,
    'Helvetica Neue',
    sans-serif;
  color: #f2f1e9;
  background: #141d25;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  isolation: isolate;
}
header {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(20px, 3.8vw, 60px);
  text-shadow: 0 1px 8px #071117;
}
h1 {
  font:
    550 18px/1.25 system-ui,
    sans-serif;
  letter-spacing: -0.035em;
  margin: 0;
}
header p {
  font-size: 13px;
  margin: 4px 0 0;
  color: #d3d7d7;
}
nav {
  display: flex;
  gap: clamp(14px, 2vw, 32px);
  font-size: 13px;
  padding: 3px 0;
}
a {
  color: inherit;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
nav a {
  text-decoration: none;
}
nav a:hover {
  text-decoration: underline;
}
main {
  position: relative;
  height: 100svh;
  min-height: 455px;
  overflow: hidden;
  background: linear-gradient(#19242b, #839296 60%, #283237 74%, #111920);
}
#landscape,
#sky,
#light {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#light {
  z-index: 2;
}
#lift {
  position: absolute;
  inset: 21% 0 8%;
  width: min(780px, 97vw);
  margin: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: grab;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#lift:active {
  cursor: grabbing;
}
#lift:disabled {
  cursor: default;
}
#relic {
  width: 100%;
  height: calc(100% - 38px);
  display: block;
  touch-action: none;
}
.action {
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #cad6d180;
  padding: 7px 1px;
  text-shadow: 0 1px 8px #000;
}
.action::before {
  content: '↑';
  color: #d0e1dd;
}
#lift:hover .action {
  border-color: currentColor;
}
#lift:focus-visible,
.action:focus-visible,
a:focus-visible,
#sound:focus-visible {
  outline: 2px solid #c3f1ee;
  outline-offset: 5px;
}
#lift:focus-visible {
  outline: none;
}
#lift:focus-visible .action {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}
#result {
  position: absolute;
  z-index: 3;
  inset: auto 12px 3.6%;
  text-align: center;
  color: #f5e9cb;
  text-shadow: 0 2px 9px #000;
  font-size: 15px;
}
#result:empty {
  display: none;
}
body.complete #result {
  bottom: 9%;
  color: #f3f8fb;
}
#result strong {
  display: block;
  font-weight: 500;
  letter-spacing: -0.045em;
  font-size: clamp(24px, 3.8vw, 54px);
  margin-bottom: 6px;
}
#result a {
  font-size: 14px;
}
.complete .action,
.summoning .action {
  visibility: hidden;
}
.ending {
  animation: arrive 0.8s ease-out both;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
#sound {
  position: absolute;
  z-index: 4;
  bottom: 14px;
  right: clamp(12px, 3vw, 46px);
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  background: transparent;
  color: #dce3e3;
  border: 0;
  font: 12px system-ui;
  cursor: pointer;
}
#sound i {
  height: 12px;
  width: 15px;
  background: repeating-linear-gradient(
    to right,
    currentColor 0 2px,
    transparent 2px 4px
  );
  clip-path: polygon(
    0 39%,
    22% 39%,
    22% 14%,
    46% 14%,
    46% 0,
    68% 0,
    68% 23%,
    100% 23%,
    100% 77%,
    68% 77%,
    68% 100%,
    46% 100%,
    46% 86%,
    22% 86%,
    22% 61%,
    0 61%
  );
}
#sound[aria-pressed='true'] i {
  height: 2px;
  clip-path: none;
}
@media (max-width: 600px) {
  header {
    padding: 23px 21px;
  }
  h1 {
    font-size: 17px;
  }
  header p,
  nav {
    font-size: 12px;
  }
  nav {
    gap: 14px;
  }
  #lift {
    inset: 22% 0 11%;
  }
  #result {
    bottom: 5.5%;
  }
  body.complete #result {
    bottom: 12%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
#landscape {
  background: #35444a url('./fjord.webp') center 61% / cover no-repeat;
}
