@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./vendor/be-vietnam-pro/BeVietnamPro-Regular.woff2) format("woff2");
}

@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./vendor/be-vietnam-pro/BeVietnamPro-Medium.woff2) format("woff2");
}

@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./vendor/be-vietnam-pro/BeVietnamPro-SemiBold.woff2) format("woff2");
}

@font-face {
  font-family: "Be Vietnam Pro";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(./vendor/be-vietnam-pro/BeVietnamPro-Italic.woff2) format("woff2");
}

html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

* {
  box-sizing: border-box;
}
html {
  background: #ece6ef;
  color: #302537;
}
body {
  margin: 0;
  font:
    16px "Be Vietnam Pro",
    "Segoe UI",
    Arial,
    sans-serif;
}
.screen {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 84px 1fr 74px;
  background: radial-gradient(
    ellipse at 72% 48%,
    #fcf7ee 0%,
    #f1eaf2 36%,
    #e9e1ec 80%
  );
  overflow: hidden;
}
header,
footer {
  margin: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
header {
  border-bottom: 1px solid #493c4e32;
}
a,
button {
  color: inherit;
}
button {
  font: inherit;
  cursor: pointer;
}
.brand {
  text-decoration: none;
  font:
    600 28px "Be Vietnam Pro",
    sans-serif;
  letter-spacing: normal;
  display: flex;
  align-items: center;
  gap: 9px;
}
.mark {
  font: 36px Georgia;
  color: #735581;
}
nav {
  display: flex;
  gap: 35px;
  align-items: center;
}
nav a,
nav button {
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: 0;
  text-decoration: none;
}
.catalog span {
  margin-left: 7px;
}
main {
  position: relative;
  min-height: 0;
}
canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.copy {
  position: absolute;
  top: 50%;
  left: 7vw;
  transform: translateY(-50%);
  width: 38%;
  pointer-events: none;
}
.copy button {
  pointer-events: auto;
}
.eyebrow,
small,
.hint,
#counter {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
}
.eyebrow {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #674e70;
}
.eyebrow i {
  height: 1px;
  width: 30px;
  background: currentColor;
}
h1 {
  font:
    500 clamp(48px, 5.65vw, 98px)/1.17 "Be Vietnam Pro",
    "Segoe UI",
    sans-serif;
  letter-spacing: normal;
  margin: 24px 0 20px;
}
h1 em {
  color: #805a87;
  font-weight: normal;
}
.copy p {
  max-width: 320px;
  color: #584e5c;
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 26px;
}
#go {
  background: #392d40;
  color: #fff;
  border: 0;
  border-radius: 100px;
  padding: 14px 21px;
  font-weight: 500;
  font-size: 14px;
}
#go span {
  margin-left: 18px;
}
aside {
  position: absolute;
  right: 2.5%;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
}
aside button {
  background: none;
  border: 0;
  width: 26px;
  height: 28px;
  display: grid;
  place-items: center;
}
aside button:after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a69ba9;
}
aside [aria-current="true"]:after {
  background: #75527d;
  outline: 1px solid #75527d;
  outline-offset: 4px;
}
footer {
  gap: 25px;
  border-top: 1px solid #493c4e32;
}
.hint b {
  font-size: 19px;
  margin-right: 10px;
}
.track {
  flex: 1;
  height: 1px;
  background: #493c4e24;
  position: relative;
}
.track:after {
  content: "";
  display: block;
  width: var(--progress, 0%);
  background: #765a7c;
  height: 1px;
}
.distance {
  height: 780vh;
}
dialog {
  background: #f9f5f8;
  color: inherit;
  border: 1px solid #a593a8;
  border-radius: 18px;
  max-width: min(490px, 90vw);
  padding: 40px;
}
dialog::backdrop {
  background: #28202e80;
}
dialog h2 {
  font:
    500 36px "Be Vietnam Pro",
    sans-serif;
  margin: 18px 0;
}
dialog dt {
  font-weight: 600;
  margin: 16px 0 4px;
}
dialog dd {
  margin: 0;
  line-height: 1.5;
}
#close {
  float: right;
  background: none;
  border: 0;
  font-size: 24px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #72517f;
  outline-offset: 4px;
}
@media (max-width: 720px) {
  .screen {
    grid-template-rows: 60px 1fr 48px;
  }
  .copy {
    top: 4%;
    transform: none;
    width: 82%;
  }
  h1 {
    font-size: clamp(32px, 6.25vh, 54px);
    margin: 9px 0;
  }
  .copy p {
    font-size: 14px;
    margin: 8px 0;
  }
  .brand {
    font-size: 24px;
  }
  nav {
    gap: 12px;
  }
  nav a {
    display: none;
  }
  #go {
    padding: 10px 16px;
  }
  .hint,
  #counter {
    font-size: 9px;
  }
  aside {
    right: 2%;
  }
  footer {
    gap: 12px;
  }
}
.screen {
  background: #533731;
  color: #fff8eb;
}
main {
  position: static;
}
canvas {
  height: 100%;
  width: 100%;
  z-index: 0;
}
.screen:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, #251b1be3, #261b1e91 29%, transparent 62%),
    linear-gradient(
      0deg,
      #211a214d,
      transparent 15%,
      transparent 88%,
      #22191e55
    );
}
header,
footer,
.copy,
aside {
  z-index: 2;
}
.copy {
  left: 6vw;
}
.brand,
.mark,
h1 em,
.eyebrow,
.copy p {
  color: #fff4df;
}
h1 em {
  color: #f6c1a9;
}
.copy p {
  max-width: 350px;
  text-shadow: 0 1px 6px #271a1c;
}
header,
footer {
  border-color: #fff4df55;
}
#go {
  background: #f6e6cb;
  color: #392d2d;
}
.track {
  background: #fff4df55;
}
.track:after {
  background: #fbe9cc;
}
aside button:after {
  background: #fff6e5ad;
}
aside [aria-current="true"]:after {
  background: #fff4df;
  outline-color: #fff4df;
}
dialog {
  color: #332a31;
}
.hint {
  letter-spacing: 0.15em;
}
@media (max-width: 720px) {
  .copy {
    top: auto;
    bottom: 9%;
    transform: none;
  }
  .screen:after {
    background: linear-gradient(0deg, #201819db, transparent 74%);
  }
}

nav .sound {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #fff4df7a;
  border-radius: 999px;
  white-space: nowrap;
}
.sound-icon {
  position: relative;
  font-size: 17px;
  line-height: 1;
}
.sound[aria-pressed="false"] .sound-icon::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 1px;
  background: currentColor;
  top: 7px;
  left: -2px;
  transform: rotate(-45deg);
}
nav .sound[aria-pressed="true"] {
  background: #f6e6cb;
  color: #392d2d;
  border-color: #f6e6cb;
}
nav .sound:disabled {
  opacity: 0.5;
  cursor: default;
}
@media (max-width: 420px) {
  nav .sound {
    padding-inline: 8px;
    gap: 4px;
  }
  nav button {
    font-size: 13px;
  }
  header {
    margin-inline: 4vw;
  }
}
.audio-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}
.audio-controls input {
  width: 76px;
  margin: 0;
  accent-color: #f6e6cb;
  cursor: pointer;
}
.audio-controls input:focus-visible {
  outline: 2px solid #fff4df;
  outline-offset: 3px;
}
.audio-controls output {
  min-width: 32px;
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 520px) {
  .audio-controls {
    gap: 6px;
  }
  .audio-controls input {
    width: 54px;
  }
  .audio-controls output,
  .sound-label {
    display: none;
  }
  nav .sound {
    width: 31px;
    height: 31px;
    justify-content: center;
    padding: 0;
  }
}
