@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap');

* {
  xoutline: 1px solid red;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  margin: 0;
  background-color: #111;
  color: #aaa;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: 300;
  --inner-aspect: 685/966;
}

body {
  height: 100dvh;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

#title {
  text-align: center;
  font-size: 22px;
  letter-spacing: 2px;
  width: 200px;
}

#header {
  left: 0;
  top: 0;
  width: 100vw;
  height: 85px;
  position: relative;
}

#viz {
  left: 0;
  bottom: 0;
  width: 100vw;
  height: 100px;
  border-top: 1px solid #333;
  z-index: 1;
}

.container {
  container-type: size; /* defines the element as a container */
}

.main-outer-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  width: 100vw;
}

.main-wrapper {
  max-height: 800px;
  height: auto;
  width: 100cqmin;
  aspect-ratio: var(--inner-aspect);
  background-size: 100% 100%;
}

@media (min-aspect-ratio: 685/966) {
  .main-wrapper {
    height: 100cqh;
    width: auto;
  }
}

.stepper-wrapper {
  width: 100%;
  height: 20%;
  z-index: 1;
}
.bpm-wrapper {
  height: 100cqh;
  height: 60%;
  z-index: -2;
}
.conf-wrapper {
  width: 100%;
  height: 20%;
  z-index: 1;
}

.bpm-circ {
  border-radius: 50%;
  border: 4px solid #999;
  aspect-ratio: 1;
  height: 100cqh;
  margin: auto;
  background-color: #111;
  position: absolute;
}

#pulser {
  position: absolute;
  opacity: 0;
  background-image: url('../res/pulser.svg');
  background-size: 100% 100%;
  z-index: -1;
  border: none;
}

#sine-wave,
#sweeper {
  aspect-ratio: 1;
  height: 100cqh;
}

#sweeper {
  background-image: url('../res/sweeper.png');
  background-size: 100% 100%;
  opacity: 90%;
}

#bpm-text {
  font-size: 32cqw;
  font-weight: 800;
  align-items: center;
  letter-spacing: 0.07em;
  color: #fff;
  user-select: none;
  text-align: center;
  z-index: 2;
  width: 100%;
}

.center-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

.v-center-content {
  display: flex;
  align-items: center;
}

.centered {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
}
#content {
  display: none;
}

.pointer-none {
  pointer-events: none;
}

.stepper {
  width: auto;
  aspect-ratio: 1;
  height: 45%;
  border-radius: 50%;
  background-color: #555;
  margin: 0 15px;
  z-index: 1;
}

.stepper.on {
  background-color: #fff;
}

.conf-meter {
  width: auto;
  aspect-ratio: 9/1;
  height: 17%;
  background-color: #555;
  border-radius: 8px;
  overflow: hidden;
  z-index: 1;
}

#conf-meter-inner {
  width: 0%;
  height: 100%;
  background-color: #fff;
  transition: width 0.2s ease-out;
}

.btn {
  background-size: 100% 100%;
  cursor: pointer;
  opacity: 0.7;
  z-index: 4;
}

#start-btn {
  background-image: url('../res/start.svg');
  height: 180px;
  width: 180px;
  margin-left: 15px; /* optical center */
  opacity: 1;
}

#info-btn {
  background-image: url('../res/info.svg');
  position: absolute;
  top: 0;
  right: 0;
  height: 45px;
  width: 45px;
  margin: 20px;
  z-index: 5;
}

#info-btn.open {
  background-image: url('../res/close.svg');
}

#reset-btn {
  background-image: url('../res/reset.svg');
  height: 45px;
  width: 45px;
  position: absolute;
  top: 0;
  left: 0;
  margin: 20px;
}

.absolute {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
}

.hidden,
.hidden-at-start {
  visibility: hidden;
}

#aa-viz-holder {
  position: absolute;
  left: 0;
  width: 50vw;
  height: 100px;
  border-right: 1px solid #333;
}

#aa-viz-holder canvas {
  width: 100%;
  height: 100%;
}

#bpm-viz-holder {
  position: absolute;
  width: 50vw;
  height: 100px;
  z-index: -1;
  right: 0;
}

#bpm-viz-holder canvas {
  width: 100%;
  height: 100%;
}

#info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background-color: #111;
  visibility: hidden;
  z-index: 5;
  padding: 20px;
}

#info-title {
  color: #eee;
  font-size: 30px;
  text-align: center;
  font-weight: 500;
  height: 45px;
  letter-spacing: 3px;
}
#info-content {
  padding: 30px;
  width: 100%;
  max-width: 600px;
  overflow: auto;
  font-size: 20px;
  letter-spacing: 1px;
  line-height: 125%;
}

a {
  color: #eee;
}
