/* Global styling */

@font-face {
  font-family: "branding-font";
  src: url("/font/PlusJakartaSans-VariableFont_wght") format("ttf");
}

:root {
  --main-font: "branding-font", sans-serif;

  --h1-font-size: 2.3rem;
  /* https://utopia.fyi/clamp/calculator */
  --h2-font-size: clamp(1.5rem, 1.3571rem + 0.7143vw, 2rem);
  --h3-font-size: 1.3rem;
  --p-font-size: clamp(1rem, 0.8571rem + 0.7143vw, 1.35rem);
  --button-font-size: clamp(1rem, 0.9rem + 0.5vw, 1.35rem);
  --choice-font-size: clamp(0.8rem, 0.6429rem + 0.7857vw, 1.35rem);

  /* Dynamic background colors */
  --detail-bg-normal: #93d7c0;
  --detail-bg-dark: #2bb687;
  --detail-bg-light: #d0d0d0;
}

main {
  padding-top: 2rem;
}

body {
  font-family: var(--main-font);
}

h1 {
  font-size: var(--h1-font-size);
}

h2 {
  font-size: var(--h2-font-size);
  text-align: center;
}

h3 {
  font-size: var(--h3-font-size);
}

p {
  font-size: var(--p-font-size);
}

.link-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;

  width: fit-content;
  width: clamp(150px, 121.4286px + 8.9286vw, 250px);
  padding: 0.85rem;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  background: #111827;
  color: white;
  transition: all 0.2s ease;
  font-size: var(--button-font-size);
}

.dialogue {
  border-radius: 1rem;
  padding: 1rem;
  max-width: 90%;
  width: 35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;

  .speaker-image {
    width: 7rem;
    height: auto;
    border-radius: 0.5rem;
    margin-right: 1rem;
    margin-bottom: -2rem;
    align-self: flex-end;

    @media (min-width: 768px) {
      width: 8rem;
    }
  }

  .dialogue-box {
    position: relative;
    padding: 0 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f4f5ff 100%);

    border: 2px solid rgba(205, 45, 58, 0.571);
    box-shadow: 0 3px 0 rgba(180, 70, 80, 0.15);

    border-radius: 14px;
    width: 30rem;
    width: 100%;
    z-index: 1;

    .speaker-name {
      position: absolute;
      top: -73px;
      /* top: -4rem; */
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0.5rem 1.5rem;
      border-radius: 0.3rem 0.3rem 0 0;
      font-size: 1.5rem;

      background: var(--detail-bg-light);
      border: 2px solid rgba(205, 45, 58, 0.571);
      border-bottom: none;

      @media (min-width: 425px) {
        top: -71px;
      }
    }

    .dialogue-text {
      width: 100%;
      line-height: 1.5;
    }
  }
}

.choice-button {
  font-size: var(--choice-font-size);
  background: linear-gradient(180deg, #ffffff 0%, #f4f5ff 100%);
  border: 2px solid rgba(70, 80, 180, 0.5);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  text-align: left;
  color: #1a1a1a;
  box-shadow: 0 3px 0 rgba(70, 80, 180, 0.15);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    background 0.08s ease;
  cursor: pointer;
  width: 100%;
}
