@import "https://www.nerdfonts.com/assets/css/webfont.css";

:root {
  --spring-easing: linear(
    0,
    0.06,
    0.193,
    0.361,
    0.545,
    0.707,
    0.844,
    0.955,
    1.03,
    1.077,
    1.101,
    1.107,
    1.099,
    1.085,
    1.066,
    1.047,
    1.03,
    1.015,
    1.004,
    0.996,
    0.992,
    0.989,
    0.989,
    0.989,
    0.991,
    0.993,
    0.995,
    0.997,
    0.998,
    1,
    1,
    1.001,
    1.001,
    1.001,
    1.001,
    1.001,
    1.001,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1
  );
}

@font-face {
  font-family: "SF Pro Text Regular";
  src: url("/otf/SF-Pro-Text-Regular.otf") format("opentype");
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  color: #cdd6f4;
  background: #1e1e2e;
  font-family: "SF Pro Text Regular", serif;
  font-size: 16px;
}

main {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem;
}

button {
  font-family: "SF Pro Text Regular", serif;
  font-size: 16px;
}

button {
  position: relative;
  min-width: 4rem;
  border: none;
  border-radius: 64px;
  padding: 8px 16px;
  color: #cdd6f4;
  background: #313244;
  transition: all var(--spring-easing) 1s;
}

button:active {
  transform: scale(95%);
  filter: brightness(95%);
  transition-duration: 0.5s;
}

button > .icon {
  content: "";
  position: absolute;
  inset: 12px;
  height: 16px;
  aspect-ratio: 1 / 1;
  opacity: 0;
  transform: scale(50%);
  transition: all var(--spring-easing) 1s;
}

a {
  color: #313244;
}

button.status {
  padding-left: 38px;
}

button.status > .icon {
  transform: scale(100%);
  opacity: 1;
}

.toggle-pair {
  width: 16rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-block: 4px;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 64px;
  height: 24px;
}

.toggle > input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle > .slider {
  position: absolute;
  inset: 0;
  border: none;
  border-radius: 64px;
  background: #313244;
  transition: all var(--spring-easing) 1s;
}

.toggle > input:active + .slider {
  transform: scale(95%);
  filter: brightness(95%);
  transition-duration: 0.5s;
}

.toggle > input:checked + .slider {
  background: #cba6f7;
}

.toggle > .slider::before {
  content: "";
  position: absolute;
  inset: 2px;
  left: 2px;
  right: 33%;
  border-radius: inherit;
  background: #cdd6f4;
  transition: all var(--spring-easing) 1s;
}

.toggle > input:checked + .slider::before {
  left: 33%;
  right: 2px;
}

#c {
  width: 100%;
  max-width: 480px;
  image-rendering: pixelated;
  touch-action: none;
}

#braille {
  font-family: monospace;
  font-size: 2rem;
  line-height: 1;
  white-space: pre;
  color: #000;
  background: #fff;
}

#braille.dark {
  color: #fff;
  background: #000;
}

#c,
#braille {
  border-radius: 16px;
  border: 1px solid #313244;
}
