@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap");

/* VARIABLES */
:root {
  --fs-primary: 0.875rem;
  --fs-large: 1.5rem;
  --fw-400: 400;
  --fw-600: 600;
  --fw-700: 700;

  --gradient: hsl(6, 100%, 80%), hsl(335, 100%, 65%);

  --blue200: hsl(243, 100%, 93%);
  --grayblue: hsl(229, 7%, 55%);
  --blue850: hsl(228, 56%, 26%);
  --blue950: hsl(229, 57%, 11%);

  --radius-sm: 0.5rem;
  --radius-lg: 8rem;

  --sp-small: 1rem;
  --sp-large: 2.5rem;
  --sp-xlarge: 3rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Raleway", sans-serif;
  font-size: var(--fs-primary);
  font-weight: var(--fw-400);
  background-color: var(--blue950);
  min-height: 100vh;
  color: white;
  background-image: url(/images/bg-mobile.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-inline: var(--sp-large);
}

main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-small);
  width: min(1100px, 100%);
}

.take {
  background-color: var(--blue850);
  padding: var(--sp-large);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--sp-small);
}

.take.left {
  border-top-right-radius: var(--radius-lg);
  gap: var(--sp-large);
}

.take.right {
  position: relative;
  padding-top: var(--sp-xlarge);
}

.icons-row {
  display: flex;
  align-items: center;
  gap: var(--sp-small);
}

.icon-tile {
  background-color: var(--blue950);
  width: clamp(40px, 7vw, 56px);
  height: clamp(40px, 7vw, 56px);
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
}

.icon {
  width: 55%;
  height: auto;
}

.intro {
  margin-inline: auto;
  color: whitesmoke;
}

.bold {
  font-weight: var(--fw-700);
  color: white;
}

.progress-bar {
  background-color: var(--blue950);
  width: 100%;
  height: var(--sp-small);
  display: flex;
  align-items: center;
  border-radius: 9999px;
}

.bar-display {
  background: linear-gradient(to right, var(--gradient));
  width: 81.5%;
  height: calc(var(--sp-small) - 2px);
  border-radius: 9999px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.white-circle {
  background-color: white;
  height: calc(100% - 2px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  margin-right: 2px;
}

.remaining-storage {
  display: flex;
  width: 100%;
  justify-content: space-between;
}

.bubble {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  border-radius: var(--radius-sm);
  padding: var(--sp-small);
  z-index: 1;
  text-align: center;
}

.bubble-text {
  font-size: var(--fs-large);
  font-weight: var(--fw-700);
  color: black;
}

.bubble-grey-txt {
  color: lightgray;
  font-size: var(--fs-primary);
  text-transform: uppercase;
}

@media (min-width: 768px) {
  body {
    background-image: url(/images/bg-desktop.png);
    background-size: 100% auto;
    background-position: center bottom;
  }
  main {
    flex-direction: row;
    align-items: stretch;
  }
  .take.left {
    flex: 1 1 0;
  }
  .take.right {
    flex: 2 1 0;
  }
  .bubble {
    top: -35px; /* nudge up */
    right: var(--sp-small); /* stick to right */
    bottom: auto; /* reset bottom */
    left: auto; /* reset left */
    transform: none;
  }
  .bubble .triangle-shape {
    position: absolute;
    bottom: -10px; /* pushes it below the bubble box */
    right: 0.01rem; /* nudge it inward from the bubble’s right edge */
    width: 0;
    height: 0;
    border-left: 10px solid transparent; /* invisible side */
    border-right: 10px solid white; /* invisible side */
    border-top: 10px solid transparent; /* visible triangle */
    border-bottom: 10px solid transparent;
    z-index: 0;
  }
}