/* 
  Fonts
*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap");

/* 
  Reset some properties 
*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
  text-decoration-skip-ink: none;
}

button {
  border: none;
  font: inherit;
  cursor: pointer;
}

ul {
  list-style-type: none;
}

img {
  max-width: 100%;
}

address {
  font-style: normal;
}

/* 
  General 
  Mobile-first approach
*/
html {
  font-size: 10px;
  font-family: "Open Sans", sans-serif;
}

body {
  min-width: 375px;
  min-height: 100vh;
}

/* Buttons */
button {
  font-weight: bold;
  border-radius: 5rem;
}

button:hover {
  opacity: 80%;
}

/* Text */
h1,
h2 {
  font-family: "Poppins", sans-serif;
  line-height: 1.25;
}

h1 {
  font-size: clamp(2.6rem, 2.037rem + 1.5vw, 4.2rem);
  margin-bottom: clamp(2.4rem, 1.978rem + 1.13vw, 3.6rem);
}

h2 {
  font-size: clamp(2rem, 1.507rem + 1.31vw, 3.4rem);
  margin-bottom: clamp(1.8rem, 1.483rem + 0.85vw, 2.2rem);
}

h6 {
  text-align: center;
  font-weight: lighter;
  font-size: clamp(1.2rem, 1.13rem + 0.19vw, 1.4rem);
}

.text {
  text-align: center;
}

.text__body {
  color: hsl(208, 11%, 55%);
  margin-bottom: 3.2rem;
  line-height: 1.55;
}

/* Images */
.illustration {
  text-align: center;
}

/* 
  Header  
*/
header {
  background: hsl(193, 100%, 96%) url("./images/bg-hero-mobile.svg");
  background-size: contain;
  padding-inline: clamp(1.6rem, -0.653rem + 6.01vw, 8rem);
  padding-block: clamp(2.4rem, 1.555rem + 2.25vw, 4.8rem);
  height: 90vh;
}

header .wrapper {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

header .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .top img {
  width: clamp(10.4rem, 7.019rem + 9.01vw, 20rem);
  height: clamp(1.8rem, 1.307rem + 1.31vw, 3.2rem);
}

header .top button {
  background-color: white;
  font-size: clamp(1rem, 0.859rem + 0.38vw, 1.4rem);
  width: clamp(9.6rem, 5.9376rem + 9.77vw, 20rem);
  height: clamp(2.4rem, 1.555rem + 2.25vw, 4.8rem);
  box-shadow: 0 1rem 1rem -1rem hsla(0, 0%, 20%, 0.25);
}

header .intro {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 5.4rem;
  padding: 0 2rem 1.2rem;
}

header .text {
  max-width: 51.2rem;
}

header .hero {
  max-width: 32.5rem;
}

header .text__body {
  color: unset;
  font-size: clamp(1.6rem, 1.53rem + 0.19vw, 1.8rem);
}

/* Pink button */
button.start {
  color: white;
  background-color: hsl(322, 100%, 66%);
  font-size: clamp(1.4rem, 1.33rem + 0.19vw, 1.6rem);
  width: clamp(24rem, 22.592rem + 3.76vw, 28rem);
  height: clamp(4rem, 3.437rem + 1.5vw, 5.6rem);
  box-shadow: 0 1rem 1rem -1rem hsl(322, 100%, 66%, 0.5);
}

/* 
  Main cards 
*/
main {
  position: relative;
  padding: clamp(6rem, 2.478rem + 9.39vw, 16rem)
    clamp(2rem, -0.958rem + 7.89vw, 10.4rem)
    clamp(22.8rem, 18.715rem + 10.89vw, 34.4rem);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.2rem;
  height: 49rem;
  border-radius: 1.5rem;
  margin-bottom: 4rem;
  padding-inline: clamp(4rem, 3.507rem + 1.31vw, 5.4rem);
  box-shadow: 1rem 1rem 1rem -1rem hsla(208, 11%, 55%, 0.15),
    -1rem 1rem 1rem -1rem hsla(208, 11%, 55%, 0.15),
    -1rem -1rem 1rem -1rem hsla(208, 11%, 55%, 0.15),
    1rem -1rem 1rem -1rem hsla(208, 11%, 55%, 0.15);
  background-color: white;
}

.card .text {
  max-width: 482px;
}

.card .text__body {
  font-size: clamp(1.4rem, 1.259rem + 0.38vw, 1.8rem);
}

.card .illustration {
  padding: 1rem;
}

.card .illustration img {
  /* width: clamp(25rem, 21.478rem + 9.39vw, 35rem); */
  width: 25rem;
}

/* Button card */
.card:last-of-type {
  height: clamp(17.5rem, 13.803rem + 9.86vw, 28rem);
  padding-inline: clamp(2.4rem, -1.403rem + 10.14vw, 13.2rem);
  width: calc(100% - clamp(4rem, -1.915rem + 15.77vw, 20.8rem));
  max-width: 80rem;
  position: absolute;
  bottom: -4rem;
  left: 50%;
  transform: translate(-50%, clamp(6.4rem, 4.992rem + 3.76vw, 10.4rem));
}

.card:last-of-type h2 {
  font-size: clamp(1.6rem, 1.178rem + 1.13vw, 2.8rem);
}

.card:last-of-type .text {
  text-align: center;
}

/* 
  Footer
*/
footer {
  color: white;
  background-color: hsl(192, 100%, 9%);
  padding-block: clamp(14rem, 12.17rem + 4.88vw, 19.2rem)
    clamp(4.8rem, 4.237rem + 1.5vw, 6.4rem);
  padding-inline: clamp(1.8rem, -1.792rem + 9.58vw, 12rem);
}

.logo img {
  /* width: clamp(16.800rem, 14.264rem + 6.76vw, 24.000rem); */
  height: clamp(2.8rem, 2.378rem + 1.13vw, 4rem);
  margin-bottom: clamp(2.8rem, 2.237rem + 1.5vw, 4.4rem);
}

.contact {
  font-size: clamp(1.6rem, 1.53rem + 0.19vw, 1.8rem);
  margin-bottom: 6rem;
}

.contact li {
  padding-left: 4.2rem;
}

.contact li:nth-child(1) {
  background: url("./images/icon-location.svg") no-repeat 0 10px;
}

.contact li:nth-child(2) {
  background: url("./images/icon-phone.svg") no-repeat 0 4px;
}

.contact li:nth-child(3) {
  background: url("./images/icon-email.svg") no-repeat 0 5px;
}

.contact li:not(:last-of-type) {
  margin-bottom: 3rem;
}

.links {
  font-size: clamp(1.8rem, 1.73rem + 0.19vw, 2rem);
  margin-bottom: 5.6rem;
}

.links ul:not(:last-of-type),
.links li:not(:last-of-type) {
  margin-bottom: 2.4rem;
}

.contact a:hover,
.links a:hover {
  text-decoration-line: underline;
}

.icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.4rem;
}

.icons__facebook,
.icons__twitter,
.icons__instagram {
  width: 3.2rem;
  height: 3.2rem;
  border: 1px solid white;
  border-radius: 50%;
  position: relative;
}

.icons__facebook svg,
.icons__twitter svg,
.icons__instagram svg {
  position: absolute;
  width: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.icons__facebook svg {
  width: 35%;
}

.icons__facebook:hover path,
.icons__twitter:hover path,
.icons__instagram:hover path {
  fill: hsl(322, 100%, 66%);
}

.icons__twitter:hover,
.icons__instagram:hover,
.icons__facebook:hover {
  border-color: hsl(322, 100%, 66%);
}

/* 
  Desktop layout
*/
@media all and (min-width: 64em) {
  .text {
    text-align: start;
  }

  /* 
    Header
  */
  header {
    height: min(50vmax, 72rem);
    background: hsl(193, 100%, 96%) url("./images/bg-hero-desktop.svg");
    background-size: contain;
  }

  header .wrapper {
    gap: clamp(1.6rem, -7.754rem + 9.13vw, 5.4rem);
    max-width: 1440px;
    margin: 0 auto;
  }

  header .intro {
    flex-direction: row;
    justify-content: space-between;
    padding: 0;
  }

  header .hero {
    max-width: 692px;
  }

  /* 
    Main (cards)
  */
  main {
    max-width: 1440px;
    margin: 0 auto;
  }

  .card {
    height: clamp(27.2rem, -14.154rem + 40.38vw, 44rem);
    flex-direction: row;
    padding-left: clamp(4.8rem, -12.923rem + 17.31vw, 12rem);
    padding-right: 3.2rem;
  }

  .card:nth-child(1) .text,
  .card:nth-child(3) .text {
    order: -1;
    margin-right: auto;
  }

  .card:nth-child(2) .illustration {
    margin-right: auto;
  }

  .card .text__body {
    margin-bottom: 0;
  }

  .card .illustration img {
    width: clamp(25rem, -24.23rem + 48.08vw, 45rem);
  }
}

/* Footer becomes 3 column tablet layout*/
@media all and (min-width: 35em) {
  footer .wrapper {
    display: grid;
    grid-template-areas: "top" "mid" "bot";
    max-width: 1440px;
    margin: 0 auto;
  }

  .logo {
    grid-area: top;
  }

  .info {
    grid-area: mid;
    display: grid;
    grid-template-columns: 4fr 4fr 1fr;
  }

  .links {
    justify-self: center;
  }

  .icons {
    flex-direction: column;
    justify-content: start;
  }

  h6 {
    grid-area: bot;
    text-align: end;
  }
}

/* Footer desktop layout */
@media all and (min-width: 50em) {
  .info {
    grid-template-columns: 5fr 8fr 3fr;
    gap: 5px;
  }

  .links {
    display: flex;
    gap: clamp(2.5rem, -10rem + 15.63vw, 12.5rem);
  }

  .icons {
    flex-direction: row;
    align-items: flex-start;
  }
}
