:root {
  /* Colors: */
  --clr-grey950: #131518;
  --clr-grey900: #262e38;
  --clr-grey500: #969fad;
  --clr-orange500: #fc7614;
  --clr-gradient: linear-gradient(180deg, #232a34 0%, #181e27 100%);
  --clr-attribution: #3e52a3;

  /* Font sizes (in rem) */
  --fs-xs: 0.75rem; /* 12px */
  --fs-sm: 0.875rem; /* 14px */
  --fs-md: 0.9375rem; /* 15px body text */
  --fs-lg: 1rem; /* 16px buttons */
  --fs-xl: 1.75rem; /* 28px titles */

  /* Spacing scale (rem) */
  --space-xs: 0.25rem; /* 4px */
  --space-sm: 0.5rem; /* 8px */
  --space-md: 0.75rem; /* 12px */
  --space-lg: 1rem; /* 16px */
  --space-xl: 1.5rem; /* 24px */
  --space-xxl: 2rem; /* 32px */
  --space-xxxl: 2.5rem; /* 40px */
  --space-xxxxl: 3rem; /* 48px */

  /* Border-radius scale */
  --radius-sm: 1.40625rem; /* 22.5px */
  --radius-md: 1.875rem; /* 30px */
  --radius-circle: 50%; /* circular elements */

  /* Line heights */
  --lh-base: 1.6; /* 24px for body text at 15px */
  --lh-heading: 1.25; /* 35px for headings at 28px */
}

/* 
********************************
SELF-HOSTING FONT:
********************************
*/

/* VARIABLE FONT: */
@font-face {
  font-family: "Overpass";
  src: url("/assets/fonts/Overpass-VariableFont_wght.woff2")
      format("woff2-variations"),
    url("/assets/fonts/Overpass-VariableFont_wght.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 
********************************
GLOBAL CSS VALUES:
********************************
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  font-family: inherit;
}

body {
  font-family: "Overpass", sans-serif;
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: var(--lh-base);
  letter-spacing: 0;

  color: var(--clr-grey500);

  background-color: var(--clr-grey950);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button:hover {
  cursor: pointer;
}

/* 
********************************
MAIN:
********************************
*/
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
}

.card {
  display: flex;
  flex-direction: column;

  width: 100%;
  max-width: 25.75rem; /* 412px */
  height: 26rem; /* 416px */
  border-radius: var(--radius-md);

  background: var(--clr-gradient);
}

/* 
***********
RATING CARD 
***********
*/
.rating-card {
  position: relative;
  padding: var(--space-xxl) var(--space-xl);
}

.rating-card__icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;

  width: var(--space-xxxxl);
  height: var(--space-xxxxl);
  margin-bottom: var(--space-xxl);
  border-radius: var(--radius-circle);

  background-color: var(--clr-grey900);
}

.rating-card__icon {
  width: 1.03125rem /* 16.5px */;
  height: var(--space-lg);
}

.rating-card__title,
.feedback-card__title {
  margin-bottom: var(--space-lg);

  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: var(--lh-heading);

  color: white;
}

.rating-card__description {
  margin-bottom: var(--space-lg);
}

.rating-card__btn-group {
  display: flex;
  gap: var(--space-xl);

  width: 100%;
  max-width: 21.9375rem; /* 351px */
  margin-bottom: var(--space-xxl);
}

.rating-card__btn {
  --btn-size: 3.1875rem; /* 51px */

  width: var(--btn-size);
  height: var(--btn-size);
  border: none;
  border-radius: var(--radius-circle);

  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: var(--lh-base);
  letter-spacing: 0.2px;
  color: var(--clr-grey500);

  background-color: var(--clr-grey900);

  transition: 0.1s;
}

.rating-card__btn:hover {
  color: var(--clr-grey900);
  background-color: var(--clr-orange500);
}

.rating-card__btn.rating-card__btn--selected {
  color: var(--clr-grey900);
  background-color: white;
}

.rating-card__btn--submit {
  width: 100%;
  max-width: 21.9375rem; /* 351px */
  height: 2.8125rem; /* 45px */
  border: none;
  border-radius: var(--radius-sm);

  font-size: var(--fs-lg);
  font-weight: 600;
  text-transform: uppercase;
  line-height: var(--lh-base);
  letter-spacing: 0.17px;
  color: var(--clr-grey950);

  background-color: var(--clr-orange500);

  transition: 0.3s;
}

.rating-card__btn--submit:hover {
  color: var(--clr-grey900);
  background-color: white;
}

/* Center texts on buttons */
.rating-card__btn span,
.rating-card__btn--submit span {
  display: inline-block;
  transform: translateY(2px);
}

/* Hint if no score given */
.rating-card .hint {
  position: absolute;
  bottom: -3rem;
  left: 109.5px;
  margin: 0;
}
/* 
***********
FEEDBACK CARD 
***********
*/
.feedback-card {
  align-items: center;
  padding: var(--space-xxxl) var(--space-xl);
  text-align: center;
}

.feedback-card__icon {
  width: 10.125rem; /* 162px */
  height: 6.75rem; /* 108px */
}

.feedback-card__final-score,
.hint {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 12.0625rem; /* 193px */
  height: var(--space-xxl);
  margin: var(--space-xxl) 0;
  border-radius: var(--radius-sm);

  color: var(--clr-orange500);

  background-color: var(--clr-grey900);
}

.feedback-card__description {
  width: 21.25rem; /* 340px */
}

/* 
********************************
FOOTER:
********************************
*/
.attribution {
  text-align: center;
  margin-bottom: var(--space-xl);

  font-size: var(--fs-xs);
  color: var(--clr-attribution);
}

/* LINKS */
/* Default State */
.attribution a:link {
  color: var(--clr-attribution);
  text-decoration: none;
}

/* Visited State */
.attribution a:visited {
  color: var(--clr-attribution);
}

/* State On Hover / Whilst being clicked */
.attribution a:hover,
.attribution a:active {
  opacity: 75%;
}

/* 
********************************
UTILITY CLASSES:
********************************
*/
.is-inactive {
  /* This needs to be uncommented in order to work */
  display: none;
}

button:focus-visible {
  outline: 2px solid var(--clr-orange500);
  outline-offset: 4px;
}
