/* FONTS */

@font-face {
  font-style: normal;
  font-weight: 600;
  src: url("./assets/fonts/fraunces/static/Fraunces_144pt-SemiBold.ttf");
  font-family: "Fraunces";
}

@font-face {
  font-style: normal;
  font-weight: 400;
  src: url("./assets/fonts/manrope/static/Manrope-Regular.ttf");
  font-family: "Manrope";
}

@font-face {
  font-style: normal;
  font-weight: 700;
  src: url("./assets/fonts/manrope/static/Manrope-Bold.ttf");
  font-family: "Manrope";
}

/* VARIABLES */

:root {
  --clr-green: 150, 100%, 63%;
  --clr-purple-900: 273, 85%, 13%;
  --clr-purple-600: 271, 12%, 34%;
  --clr-purple-300: 276, 100%, 99%;
  --clr-white: 0, 0%, 100%;

  --text-preset-1-size: 8rem;
  --text-preset-1-height: 1;
  --text-preset-2-size: 5.6rem;
  --text-preset-2-height: 1.2;
  --text-preset-3-size: 3.2rem;
  --text-preset-3-height: 1.2;
  --text-preset-4-size: 1.8rem;
  --text-preset-4-height: 1.8;
  --text-preset-5-size: 1.8rem;
  --text-preset-5-height: 1.5;
}

/* RESET */

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

html {
  position: relative;
  overflow-x: hidden;
  font-size: 62.5%;
}

img {
  max-width: 100%;
}

input,
button,
textarea {
  font: inherit;
}

/* GENERAL */

body {
  position: relative;
  overflow-x: hidden;
  color: hsl(var(--clr-purple-900));
  font-size: var(--text-preset-4-size);
  font-family: "Manrope", sans-serif;
}

/* UTILITY */

.sr-only:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.container {
  margin: 0 auto;
  width: 100%;
  max-width: 1120px;
}

.button {
  display: inline-block;
  transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
  font-weight: 700;
  font-size: var(--text-preset-5-size);
  line-height: var(--text-preset-5-height);
  text-decoration: none;
}

.button--primary {
  display: inline-block;
  border: 2px solid hsl(var(--clr-green));
  background-color: hsl(var(--clr-green));
  padding: 1rem 3rem;
  color: hsl(var(--clr-purple-900));
}

.button--primary:hover {
  background-color: transparent;
  color: hsl(var(--clr-green));
}

.button--secondary {
  position: relative;
  color: hsl(var(--clr-white));
}

.button--secondary::after {
  position: absolute;
  bottom: 0;
  left: 0;
  transform: translateY(100%);
  background-color: hsl(var(--clr-green));
  width: 100%;
  height: 3px;
  content: "";
}

.button--secondary:hover {
  color: hsl(var(--clr-green));
}

/* HEADER */

.header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  padding-top: 5.6rem;
  width: 100%;
}

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

/* HERO */

.hero {
  position: relative;
  background-color: hsl(var(--clr-purple-900));
  padding: 14.7rem 0 calc(29.6rem + 7.2rem) 0;
  text-align: center;
}

.hero::after {
  position: absolute;
  bottom: 0;
  left: 0;
  background-image: url("./assets/images/bg-hero-bottom.svg");
  background-position: center bottom;
  background-size: 100%;
  background-repeat: no-repeat;
  width: 100%;
  height: 72px;
  content: "";
}

.hero__content {
  position: relative;
}

.hero__content::before {
  position: absolute;
  top: -9px;
  left: -101px;
  content: url("./assets/images/bg-pattern-1.svg");
}

.hero__content::after {
  position: absolute;
  top: 195px;
  right: -45px;
  content: url("./assets/images/bg-pattern-2.svg");
}

.hero__title {
  position: relative;
  z-index: 1;
  margin: 0 auto 4rem auto;
  max-width: 635px;
  color: hsl(var(--clr-white));
  font-size: var(--text-preset-1-size);
  line-height: var(--text-preset-1-height);
  font-family: "Fraunces", serif;

  span {
    display: inline-block;
    position: relative;

    &::after {
      position: absolute;
      bottom: 0;
      left: 0;
      background-color: hsl(var(--clr-green));
      width: 100%;
      height: 2px;
      content: "";
    }
  }
}

.hero__image {
  position: absolute;
  bottom: -161px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

/* FEATURES SECTION */

.features-section {
  position: relative;
  background-color: hsl(var(--clr-purple-300));
  padding: calc(16.1rem + 8.8rem) 0 calc(14.4rem + 7.2rem) 0;
}

.features-section::after {
  position: absolute;
  bottom: 0;
  left: 0;
  background-image: url("./assets/images/bg-features-section-bottom.svg");
  background-position: center bottom;
  background-size: 100%;
  background-repeat: no-repeat;
  width: 100%;
  height: 72px;
  content: "";
}

.features-section .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.2rem;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 5.6rem;
  text-align: center;
}

.feature__number {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  border: 1px solid hsl(var(--clr-purple-600));
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 4rem;
  font-family: "Fraunces", serif;
}

.feature__title {
  margin-bottom: 2.8rem;
  color: hsl(var(--clr-purple-900));
  font-weight: 600;
  font-size: var(--text-preset-3-size);
  line-height: var(--text-preset-3-height);
  font-family: "Fraunces", serif;
}

.feature__text {
  line-height: var(--text-preset-4-height);
}

/* FOUNDER SECTION */

.founder-section {
  padding-top: 11.2rem;
}

.founder-section .container {
  position: relative;
}

.founder-section__image {
  margin-bottom: 10.2rem;
}

.founder {
  display: flex;
  position: absolute;
  right: 0;
  bottom: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 3.2rem;
  background-color: hsl(var(--clr-purple-900));
  padding: 6.4rem;
  max-width: 730px;
  color: hsl(var(--clr-white));
}

.founder::after {
  position: absolute;
  right: 107px;
  bottom: -65px;
  content: url("./assets/images/bg-pattern-3.svg");
}

.founder__title {
  font-size: var(--text-preset-2-size);
  line-height: var(--text-preset-2-height);
  font-family: "Fraunces", serif;
}

.founder__text {
  line-height: var(--text-preset-4-height);
}

/* FOOTER */

.footer {
  display: flex;
  flex-direction: column;
  gap: 5.6rem;
  padding: 11.2rem 0;
  text-align: center;
}

.footer__list {
  display: flex;
  justify-content: center;
  gap: 2.8rem;
  list-style-type: none;
}

.footer__icon:hover {
  filter: brightness(0) saturate(100%) invert(13%) sepia(7%) saturate(6145%)
    hue-rotate(229deg) brightness(98%) contrast(110%);
}

/* ATTRIBUTION */

.attribution {
  position: absolute;
  bottom: 0;
  left: 0;
  border-top-right-radius: 1rem;
  background-color: hsl(var(--clr-white));
  padding: 0.8rem;
  font-size: 1rem;
}

.attribution__link {
  color: hsl(var(--clr-purple-900));
  font-weight: 700;
  text-decoration: none;
}

.attribution__link:hover {
  text-decoration: underline;
}

/* MEDIA QUREIES */
@media screen and (max-width: 1120px) {
  .container {
    padding: 0 4.4rem;
  }

  .founder {
    right: 4.4rem;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --text-preset-1-size: 6rem;
    --text-preset-2-size: 4.8rem;
    --text-preset-3-size: 2.8rem;
    --text-preset-4-size: 1.6rem;
  }

  .header {
    padding-top: 3.2rem;
  }

  .hero {
    padding: 12.3rem 0 calc(14.4rem + 5.6rem) 0;
  }

  .hero__title {
    max-width: 400px;
  }

  .hero__image {
    bottom: -136px;
    max-width: 514px;
    height: auto;
  }

  .hero::after {
    height: 56px;
  }

  .hero__content::before {
    top: -65px;
    left: -224px;
  }

  .hero__content::after {
    top: 139px;
    right: -93px;
  }

  .features-section {
    padding: calc(5.6rem + 13.6rem) 0 calc(4.4rem + 7.2rem) 0;
  }

  .features-section .container {
    grid-template-columns: 1fr;
  }

  .feature {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }

  .feature__number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    font-size: 2rem;
  }

  .founder-section__image {
    margin-bottom: 278px;
    width: 280px;
    height: 280px;
  }

  .founder {
    padding: 4.8rem;
    max-width: 504px;
  }

  .founder::after {
    right: 13px;
    bottom: -113px;
  }

  .footer {
    padding: 8rem 0;
  }
}

@media screen and (max-width: 588px) {
  .founder-section__image {
    display: block;
    margin: 0 auto 0 auto;
  }
  .founder {
    position: relative;
    right: unset;
    bottom: unset;
    align-items: center;
    z-index: 1;
    margin-top: -50px;
    text-align: center;
  }
  .founder::after {
    display: none;
  }
}

@media screen and (max-width: 425px) {
  :root {
    --text-preset-1-size: 4.8rem;
    --text-preset-2-size: 3.2rem;
    --text-preset-3-size: 2.4rem;
    --text-preset-4-size: 1.6rem;
  }

  .container {
    padding: 0 2rem;
  }

  .hero {
    padding: 12.3rem 0 calc(14.4rem + 2.4rem) 0;
  }

  .hero::after {
    height: 24px;
  }

  .hero__title {
    padding: 0 2rem;
  }

  .hero__image {
    bottom: -80px;
    max-width: 320px;
  }

  .hero__content::before,
  .hero__content::after {
    display: none;
  }

  .features-section {
    padding: calc(6.4rem + 8rem) 0 calc(6.4rem + 2.4rem) 0;
  }

  .features-section::after {
    height: 24px;
  }

  .feature {
    flex-direction: column;
    gap: 2.4rem;
    text-align: center;
  }

  .feature__title {
    margin-bottom: 1.6rem;
  }

  .attribution {
    width: 100%;
    text-align: center;
  }
}
