/* Custom Properties and Utility Classes */
:root {
  --clr-primary-400: linear-gradient(
    to bottom right,
    hsl(236, 72%, 79%),
    hsl(237, 63%, 64%)
  );
  --clr-button: linear-gradient(
    to right,
    hsl(236, 72%, 79%),
    hsl(237, 63%, 64%)
  );

  --clr-neutral-100: hsl(240, 78%, 98%);
  --clr-neutral-200: hsl(234, 14%, 74%);
  --clr-neutral-300: hsl(233, 13%, 49%);
  --clr-neutral-400: hsl(232, 13%, 33%);

  --fs-300: 0.9275rem; /* 15px*/
  --fs-400: 1rem; /* 16px*/
  --fs-450: 1.125rem; /* 18px*/
  --fs-500: 1.25rem; /* 20px*/
  --fs-600: 1.5rem; /* 24px*/
  --fs-700: 1.75rem; /* 28px*/
  --fs-800: 2rem; /* 32px*/
  --fs-900: 3.5rem; /* 40px*/

  --ff-primary: "Montserrat", sans-serif;

  --fw-400: 400;
  --fw-600: 600;
  --fw-700: 700;
}
/* Utility Classes  */
.liner-bg {
  background: var(--clr-primary-400);
}
.text-white {
  color: var(--clr-neutral-100);
}
.text-neutral-300 {
  color: var(--clr-neutral-300);
}
.border-bottom {
  border-bottom: 2px solid var(--clr-neutral-200);
}
.center {
  text-align: center;
}

.none {
  display: none;
  opacity: 0;
  transition: all 0.4s ease;
}
.visible {
  display: block;
  opacity: 1;
  transition: all 0.4s ease;
}
.purple {
  color: hsl(237, 63%, 64%);
}
/* CSS Reset  */
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* General Styling  */
body {
  font-family: var(--ff-primary);
  font-weight: var(--fw-700);
  margin-inline: 2rem;
  background: url(images/bg-top.svg), url(images/bg-bottom.svg);
  background-repeat: no-repeat;
  background-position: top -35px right -220px, bottom left;
  background-color: var(--clr-neutral-100);
}
/* Only for background-image  */
@media (max-width: 50em) {
  body {
    background: url(images/bg-top.svg);
    background-repeat: no-repeat;
    background-position: top -35px right -220px;
    background-color: var(--clr-neutral-100);
  }
}

/* Container  */
.container {
  max-width: 70rem;
  margin: 2rem auto;
}

/* Toggle Button  */
.btn-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: var(--fs-300);
  margin-block: 1rem;
  color: var(--clr-neutral-200);
}
.btn-bg {
  border: none;
  border-radius: 100vmax;
  width: 3.2rem;
  height: 1.75rem;
  position: relative;
  transition: all 1s ease;
  background: var(--clr-button);
  box-shadow: 0 15px 45px hsl(0, 0%, 9%, 0.15);
}
.btn-circle {
  position: absolute;
  top: 12%;
  left: 51%;
  width: 1.3rem;
  height: 1.3rem;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  background-color: white;
  transition: all 0.5s ease;
}
.btn-toggle {
  left: 9%;
}
.bg-change {
  background: linear-gradient(to right, hsl(236, 72%, 59%), hsl(237, 63%, 55%));
}


/* Main-grid  */
.box-grid {
  display: grid;
  gap: 2rem;
}

/* Main-content  */
.box-content {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 2rem;
  border: none;
  border-radius: 0.5rem;
  background-color: white;
  box-shadow: 0 15px 30px hsl(0, 0%, 9%, 0.1);
}
.box-content h1 {
  font-size: var(--fs-900);
  padding-block: 1rem;
  color: var(--clr-neutral-400);
  transition: all 0.4s ease;
}
h1[data-white] {
  color: white;
}
.offer-title h3 {
  font-size: var(--fs-400);
  color: var(--clr-neutral-300);
  padding-block: 1rem;
  border-top: 2px solid var(--clr-neutral-200);
}
.offer-title h3[data-white] {
  color: white;
}
/* Button  */
.btn {
  width: 100%;
  padding: 1rem;
  font-size: var(--fs-450);
  margin: 2.5rem auto 0rem;
  cursor: pointer;
  color: white;
  letter-spacing: 2px;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  background: var(--clr-button);
  transition: all 0.5s ease;
}
.btn:is(:hover, :focus-within) {
  border: 2px solid hsl(237, 63%, 64%);
  transform: translateY(-5px);
  color: hsl(237, 63%, 64%);
  background: transparent;
  box-shadow: 0 15px 45px hsl(0, 0%, 9%, 0.1);
}
.btn[data-bg] {
  color: hsl(237, 63%, 64%);
  background: white;
}
.btn[data-bg]:is(:hover, :focus-within) {
  color: white;
  box-shadow: none;
  border: 2px solid white;
  background: transparent;
}

/* Attribution  */
.attribution {
  font-size: 11px;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--clr-neutral-400);
}
.attribution a {
  text-decoration: none;
  transition: all 0.4s ease;
  color: var(--clr-neutral-400);
}
.attribution a:is(:hover, :focus-within) {
  color: hsl(237, 63%, 64%);
}

/* Media Quries  */
@media (min-width: 50em) {
  :root {
    --fs-900: 4rem;
  }
  body {
    margin-inline: 0rem;
  }
  .container {
    margin-block: 1rem;
  }
  .btn-bg:hover {
    background: linear-gradient(to right, hsl(236, 72%, 79%), hsl(237, 63%, 84%));
  }
  .box-grid {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: center;
    gap: 0;
  }
  .box-content:nth-child(1) {
    width: min(100%, 30em);
    margin-inline: auto;
    height: fit-content;
    border-radius: 0.5rem 0 0 0.5rem;
  }
  .box-content:nth-child(3) {
    width: min(100%, 30em);
    margin-inline: auto;
    height: fit-content;
    border-radius: 0 0.5rem 0.5rem 0;
  }
  .large {
    padding: 3rem 2rem 3.4rem;
    width: min(100%, 30em);
    margin-inline: auto;
    height: fit-content;
  }
  .attribution {
    margin-top: 2rem;
  }
}
