@font-face {
  font-family: "Hanken Grotesk";
  src: url("./assets/fonts/static/HankenGrotesk-Medium.ttf") format("truetype"); /* Specify the path to your TTF file */
  font-weight: 500;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("./assets/fonts/static/HankenGrotesk-Bold.ttf") format("truetype"); /* Specify the path to your TTF file */
  font-weight: 700;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("./assets/fonts/static/HankenGrotesk-ExtraBold.ttf")
    format("truetype"); /* Specify the path to your TTF file */
  font-weight: 800;
}

/* - Mobile: 375px
- Desktop: 1440px */

:root {
  /* Primary */
  --clr-light-red: 0, 100%, 67%;
  --clr-orange-yellow: 39, 100%, 56%;
  --clr-green-teal: 166, 100%, 37%;
  --clr-cobalt-blue: 234, 85%, 45%;

  /* Gradient Background */
  --clr-light-slate-blue: 252, 100%, 67%;
  --clr-light-royal-blue: 241, 81%, 54%;

  /* Gradient Circle */
  --clr-violet-blue: 256, 72%, 46%, 1;
  --clr-persian-blue: 241, 72%, 46%, 0;

  /* Neutral */
  --clr-white: 0, 0%, 100%;
  --clr-pale-blue: 221, 100%, 96%;
  --clr-light-lavender: 241, 100%, 89%;
  --clr-dark-gray-blue: 224, 30%, 27%;

  /* Font */
  --fs-regular: 1.125rem;
  --ff-sans: Hanken Grotesk, sans-serif;
  --fw-500: 500;
  --fw-700: 700;
  --fw-800: 800;
}

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

body {
  font-family: var(--ff-sans);
  font-weight: var(--fw-500);
  font-size: var(--fs-regular);
  color: hsl(var(--clr-dark-gray-blue));
}

@keyframes countAnimation {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.result-box {
  width: 100%;
  color: hsl(var(--clr-white));
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
  border-bottom: 1px solid black;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  background: linear-gradient(to bottom, hsl(0, 0%, 100%), hsla(0, 0%, 0%, 0));
  background-color: hsl(var(--clr-light-royal-blue));
  background-blend-mode: overlay;
}

.result-box .heading {
  text-transform: capitalize;
  color: hsl(var(--clr-light-lavender));
}

.result-box .title {
  font-size: 1.5rem;
}

.result-box .message {
  font-size: 1rem;
  max-width: 280px;
  margin-inline: auto;
  color: hsl(var(--clr-light-lavender));
}

.score-box {
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-width: 150px;
  min-height: 150px;
  border-radius: 9999px;
  background: linear-gradient(
    to bottom,
    hsl(var(--clr-violet-blue)),
    hsla(0, 0%, 0%, 0)
  );
}

.score-box .value {
  display: block;
  font-size: 4rem;
  font-weight: var(--fw-800);
  color: hsl(var(--clr-white));

  animation: countAnimation 2s ease-in-out;
}

.score-box > p {
  color: hsl(var(--clr-light-lavender));
}

.summary-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
}

.summary-box .heading {
  font-size: 1.25rem;
  font-weight: var(--fw-700);
}

.summary-box .section {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 12px;
  font-weight: var(--fw-700);
}

.summary-box .section .left {
  display: flex;
  gap: 0.75rem;
}

.summary-box .section .right {
  color: hsla(var(--clr-dark-gray-blue), 50%);
}

.summary-box .section .right .value {
  color: hsla(var(--clr-dark-gray-blue), 100%);
  animation: countAnimation 1s ease-in-out;
}

.summary-box .reaction {
  background-color: hsla(var(--clr-light-red), 8%);
  color: hsl(var(--clr-light-red));
}

.summary-box .memory {
  background-color: hsla(var(--clr-orange-yellow), 8%);
  color: hsl(var(--clr-orange-yellow));
}

.summary-box .verbal {
  background-color: hsla(var(--clr-green-teal), 8%);
  color: hsl(var(--clr-green-teal));
}

.summary-box .visual {
  background-color: hsla(var(--clr-cobalt-blue), 8%);
  color: hsl(var(--clr-cobalt-blue));
}

.button {
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.15rem;
  border-radius: 9999px;
  font: inherit;
  background-color: hsl(var(--clr-dark-gray-blue));
  color: hsl(var(--clr-white));
  transition: background-color 0.2s;
  cursor: pointer;
}

.button:focus-visible {
  outline: 4px dashed hsl(var(--clr-cobalt-blue));
  outline-offset: 4px;
}

.button:hover {
  background: linear-gradient(to bottom, hsl(0, 0%, 100%), hsla(0, 0%, 0%, 0));
  background-color: hsl(var(--clr-light-royal-blue));
  background-blend-mode: overlay;
}

@media (min-width: 700px) {
  html {
    height: 100vh;
  }

  body {
    padding-inline: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  main {
    width: 100%;
    max-width: 800px;
    display: flex;
    overflow: hidden;
    margin: auto;
    border-radius: 28px;
    box-shadow: hsla(var(--clr-dark-gray-blue), 16%) 0px 10px 36px 0px;
  }

  .result-box {
    padding: 3rem;
    justify-content: space-between;
  }

  .result-box .heading {
    font-size: 1.4rem;
  }

  .result-box .title {
    font-size: 2rem;
  }

  .result-box .message {
    font-size: 1.2rem;
  }

  .score-box {
    min-width: 200px;
    min-height: 200px;
  }

  .score-box .value {
    font-size: 5rem;
  }

  .summary-box {
    padding: 3rem;
  }

  .summary-box .heading {
    font-size: 1.4rem;
  }
}
