@font-face {
  font-family: "Neon Glow";
  src: url("/fonts/neon-glow.woff") format("woff");
}

@font-face {
  font-family: "Inter var";
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
  font-named-instance: "Regular";
  src: url("/fonts/Inter-roman.var.woff2?v=3.13") format("woff2");
}

@font-face {
  font-family: "Inter var";
  font-weight: 100 900;
  font-display: swap;
  font-style: italic;
  font-named-instance: "Italic";
  src: url("/fonts/Inter-italic.var.woff2?v=3.13") format("woff2");
}

html,
body {
  background-color: #d0eef0;
  color: var(--fg);
  padding: 0;
  margin: 0;
  font-size: 16px;
  font-family: "Inter var", sans-serif;
}

a {
  color: inherit;
  font-weight: bold;
  text-decoration: underline;
}

* {
  box-sizing: border-box;
}

:root {
  --fg: hsl(240, 2%, 27%);
  --fg-15: hsl(240, 2%, 15%);
  --accent: hsl(266, 82%, 85%);
  --accent-68: hsl(266, 82%, 68%);
  --accent-88: hsl(266, 82%, 88%);
  --highlight: rgb(174, 231, 231);
  --focus-color: rgb(142, 109, 194);
  --cherry-blossom-70: hsla(350, 100%, 70%, 1);
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

button:focus,
input:focus,
a:focus,
select:focus {
  outline: none;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
select:focus-visible {
  box-shadow: 0px 0px 2px 3px var(--focus-color);
}

/* LAYOUT */
.container {
  min-height: 100vh;
  max-height: 100vh;
  padding: 0 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

h1 {
  font-size: 3em;
  font-family: "Neon Glow", cursive;
  color: hsl(350, 100%, 80%);
  margin: 0;
}

main {
  max-width: 80%;
  border-radius: 25px;
  padding: 2rem 5rem;
  background: hsl(43, 100%, 99%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.select-wrapper select {
  width: 100%;
  appearance: none;
  border-radius: 6px;
  border: 2px solid var(--accent);
  padding: 0.5rem;
  padding-right: 1.5rem;
  background-image: url("/arrow.svg");
  background-position: right;
  background-size: auto, 34px 100%, 1px 100%;
  background-repeat: no-repeat;
}

.select-wrapper label {
  display: inline-block;
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.selectors {
  display: flex;
  align-items: center;
}

footer {
  color: hsl(180, 1%, 34%);
  text-align: center;
}

/* PIANO */

.black-note {
  cursor: pointer;
  grid-row: 1 / span 1;
  grid-column-end: span 2;
  justify-self: center;
  background-color: #222;
  border: 1px solid #222;
  border-radius: 0 0 3px 3px;
  z-index: 2;
  padding: 0;
  width: 30%;
  height: 60%;
}

.white-note {
  cursor: pointer;
  grid-column-end: span 1;
  grid-row: 1 / span 1;
  background-color: #fff;
  border: 1px solid #222;
  border-radius: 0 0 5px 5px;
  border-right-width: 0px;
  box-sizing: content-box;
  padding: 0;
  height: 100%;
}

.note-pressed {
  background-color: #aee7e7;
}

.white-note:last-of-type {
  border-right-width: 1px;
}

.keyboard {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: 1fr;
  flex: 1;
}

.frame {
  background-color: var(--accent);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  padding-inline: clamp(0.5rem, 5%, 1rem);
  padding-block-start: 0.25rem;
  padding-block-end: clamp(0.5rem, 15%, 1rem);
  width: 100%;
  min-width: 40vw;
  aspect-ratio: 16/5;
}

.controls > * + * {
  margin-inline-start: 1rem;
}

.controls button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  appearance: none;
  padding: 0.5rem;
  border: 0;
  background: var(--accent);
}

.controls button:hover {
  background: var(--highlight);
}

.hidden {
  display: none !important;
}

.mode {
  border: 0;
  text-align: center;
}

.flow > * + * {
  margin-block-start: 1.5rem;
}
#notes-playing {
  height: 1rem;
}
