@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');

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

body {
  /* neutral */
  --Dark-Grayish-Red: hsl(0, 6%, 24%);

  /* primary */
  --Soft-Red: hsl(0, 93%, 68%);
  --Desaturated-Red: hsl(0, 36%, 70%);

  /* gradient */
  --box-shadow: 0px 10px 30px 0px rgba(238, 140, 140, 0.75);
  --hover: linear-gradient(135deg, hsl(0, 0%, 100%), hsl(0, 100%, 98%));
  --primary: linear-gradient(135deg, hsl(0, 80%, 86%), hsl(0, 74%, 74%));

  /* fw */
  --fw-300: 300;
  --fw-400: 400;
  --fw-600: 600;

  font-family: 'Josefin Sans', sans-serif;
}

picture,
img {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

.d-none {
  display: none !important;
}

main {
  @media (min-width: 55em) {
    min-height: 100vh;
    gap: 1em;
    display: flex;
    justify-content: space-between;
  }
}

header {
  scale: 0;
  animation: appear 500ms ease-in-out forwards 2000ms;

  & > img {
    margin: 2em;
    max-width: 7em;

    @media (min-width: 55em) {
      display: none;
    }
  }

  & > picture {
    @media (min-width: 55em) {
      height: 100%;
      min-width: 30em;
    }
  }

  & > picture > img {
    width: 100%;
    max-height: 15em;
    object-fit: cover;

    @media (min-width: 55em) {
      max-height: none;
      height: 100%;
    }
  }

  @media (min-width: 55em) {
    order: 1;
    max-width: 30em;
  }

  @media (min-width: 85em) {
    max-width: none;
  }
}

.hero {
  padding: 3em 2em;
  text-align: center;

  @media (min-width: 55em) {
    padding: 3em 0;
    text-align: left;
  }

  @media (min-width: 55em) and (orientation: portrait) {
    align-self: center;
  }
}

.hero_brand {
  display: none;
  scale: 0;
  animation: appear 500ms ease-in-out forwards;

  @media (min-width: 55em) {
    display: block;
    max-width: 7em;
    margin: 0 0 0 5rem;
  }
}

.hero_title {
  color: var(--Dark-Grayish-Red);
  font-size: 2.5rem;
  font-weight: var(--fw-600);
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.1;
  margin-inline: auto;
  max-width: min-content;
  scale: 0;
  animation: appear 500ms ease-in-out forwards 500ms;

  & > span {
    color: var(--Desaturated-Red);
    font-weight: var(--fw-300);
  }

  @media (min-width: 55em) {
    font-size: 3rem;
    margin: 2.5em 0 0 5rem;
  }
}

.hero_description {
  color: var(--Desaturated-Red);
  line-height: 1.3;
  font-weight: var(--fw-400);
  margin-top: 1em;
  display: inline-block;
  scale: 0;
  animation: appear 500ms ease-in-out forwards 1000ms;

  @media (min-width: 55em) {
    line-height: 1.5;
    margin: 1em 0 0 5rem;
    max-width: 27em;
  }
}

.hero_form {
  scale: 0;
  animation: appear 500ms ease-in-out forwards 1500ms;

  @media (min-width: 55em) {
    margin: 2em 0 0 5rem;
  }
}

.form-control {
  margin-top: 1.5em;
  position: relative;

  & > input {
    border-radius: 5em;
    border: 1px solid var(--Desaturated-Red);
    font: inherit;
    font-weight: var(--fw-400);
    padding: 1em 1.7em;
    width: 100%;
    display: block;

    &::placeholder {
      color: var(--Desaturated-Red);
    }

    &:focus-visible {
      outline: none;
    }

    &.invalid {
      outline: 1.5px solid var(--Desaturated-Red);
    }
  }

  & > img,
  & > span,
  & > button {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
  }

  & > img {
    top: 50%;
    right: 5em;
    translate: 0 -50%;
    cursor: pointer;

    @media (min-width: 55em) {
      right: 7em;
    }
  }

  & > span {
    color: var(--Desaturated-Red);
    top: 100%;
    left: 0;
    display: inline-block;
    margin: 0.7em 0 0 1.7em;
  }

  & > button {
    background: var(--primary);
    border: none;
    border-radius: 5em;
    padding: 1em 2em;
    cursor: pointer;
    transition: translate 200ms ease-in-out, box-shadow 200ms ease-in-out;

    &:hover {
      box-shadow: var(--box-shadow);
      translate: 5% 0;
    }

    @media (min-width: 55em) {
      padding: 1em 3em;
    }
  }
}

@keyframes appear {
  0% {
    scale: 0;
  }
  50% {
    scale: 1.1;
  }
  100% {
    scale: 1;
  }
}
