@import url("https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Montserrat&family=Roboto:wght@300;400;700;900&display=swap");
:root {
  --fs-100: 0.5rem;
  --fs-200: 0.8rem;
  --fs-300: 0.9375rem;
  --fs-400: 1.0625rem;
  --fs-500: 1.375rem;
  --fs-600: 1.875rem;
  --fs-700: 2rem;
  --fs-800: 3rem;
  --ff-body: "Roboto", sans-serif;
  --ff-heading: "Montserrat", sans-serif;
  --fw-300: 300;
  --fw-400: 400;
  --fw-700: 700;
  --fw-900: 900;
}

@media (min-width: 35rem) {
  :root {
    --fs-100: 0.7rem;
    --fs-200: 0.9rem;
    --fs-300: 1rem;
    --fs-400: 1.125rem;
    --fs-500: 1.5rem;
    --fs-600: 2.25rem;
    --fs-700: 3rem;
    --fs-800: 5rem;
  }
}
/* typgraphy */
body {
  font-family: var(--ff-body);
  font-size: var(--fs-400);
  color: var(--clr-neutral-900);
}

h1,
h2,
h3 {
  font-family: var(--ff-heading);
  font-weight: var(--fw-900);
  color: var(--clr-primary-500);
  line-height: 1.1;
  padding-bottom: 0.5em;
}

h1, h2 {
  font-size: var(--fs-600);
  text-align: center;
  padding: 1em 0;
}

strong {
  font-weight: var(--fw-700);
}

/* //////////////////////
  RESET - source: https://piccalil.li/blog/a-modern-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:where([role="list"]),
ol:where([role="list"]) {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 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;
  border: none;
}

/* 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
  /////////////////////// */
:root {
  --clr-primary-100: #fcb1b8;
  --clr-primary-200: #e8fcfb;
  --clr-primary-300: #D66974;
  --clr-primary-400: #01a8a8;
  --clr-primary-500: #090809;
  --clr-neutral-100: hsla(0, 0%, 100%, 1);
  --clr-neutral-200: #f9fbfb;
  --clr-neutral-300: hsla(0, 0%, 50%, 1);
  --clr-neutral-400: hsla(0, 0%, 40%, 1);
  --clr-neutral-900: hsla(0, 0%, 10%, 1);
}

html {
  height: 100vh;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

main {
  background-color: var(--clr-neutral-200);
  margin-top: 5.7em !important;
  flex-grow: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

section {
  padding-top: 2em;
  padding-bottom: 3em;
}

svg {
  fill: var(--clr-neutral-900);
  margin-right: 0.2em;
}

/* buttons & links*/
a {
  text-decoration: none;
  cursor: pointer;
}

.btn {
  display: inline-block;
  border-radius: 0.25em;
  padding: 0.75em 0.85em;
  line-height: 1;
  align-self: start;
  justify-self: start;
}

.btn--primary {
  background: var(--clr-primary-400);
  color: var(--clr-neutral-100);
  font-weight: var(--fw-700);
}

.btn--primary:hover,
.btn--primary:focus {
  background: var(--clr-primary-500);
  border-color: var(--clr-primary-500);
}

.btn--neutral {
  background-color: var(--clr-neutral-100);
  color: var(--clr-neutral-900);
  font-weight: var(--fw-700);
}

.btn--neutral:hover,
.btn--neutral:focus {
  color: var(--clr-neutral-100);
  background-color: var(--clr-neutral-900);
}

/* //////////////////////
  Utility Classes
  /////////////////////// */
/* select all direct childen of .flow
   and add margin to the top for proper
   spacing */
.flow > *:where(:not(:first-child)) {
  margin-top: var(--flow-spacer, 1em);
}

.container {
  margin-inline: auto;
  padding-inline: 1.5em;
  max-width: 72rem;
}

.container--narrow {
  max-width: 65rem;
}

.flex-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.text-center {
  text-align: center;
}

/* //////////////////////
  Header
  /////////////////////// */
.page-header {
  padding: 1em 0;
  position: fixed;
  top: 0;
  background-color: var(--clr-neutral-100);
  width: calc(100vw - (100vw - 100%));
  transition: 0.5s;
  z-index: 1;
}

.page-header__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.active {
  border-bottom: 3px solid var(--clr-primary-300);
}

.nav-list a {
  color: var(--clr-neutral-900);
  text-decoration: none;
  padding: 0.3em 0;
}

.nav-list a:hover {
  color: var(--clr-primary-400);
  border-bottom: 3px solid var(--clr-primary-400);
}

.logo {
  height: 3.5em;
  transition: height 0.3s;
}

.header--small .logo {
  height: 2.5em;
}

/* //////////////////////
  Mobile Nav
  /////////////////////// */
.hamburger {
  display: none;
  position: relative;
  top: 0;
  right: 0;
  z-index: 1;
}
.hamburger input {
  height: 100%;
  width: 100%;
  cursor: pointer;
  opacity: 0;
  /* hide this */
  position: absolute;
  top: -7px;
  left: -5px;
  z-index: 2;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 4px;
  margin-bottom: 4px;
  position: relative;
  background: var(--clr-neutral-400);
  border-radius: 3px;
  z-index: 1;
  transform-origin: right center;
  transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease;
}
.hamburger input:checked ~ span {
  transform: rotate(-45deg) translate(1px, -1px);
}
.hamburger input:checked ~ span:nth-last-child(1) {
  transform: rotate(45deg) translate(1px, 1px);
}
.hamburger input:checked ~ span:nth-last-child(2) {
  opacity: 0;
  transform: rotate(0deg) scale(0.2, 0.2);
}

@media (max-width: 45em) {
  .hamburger {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    position: absolute;
    right: 0;
    align-items: flex-end;
    background-color: var(--clr-neutral-100);
    width: 100vw;
    padding: 1em 1.5em;
    transform-origin: 0% 0%;
    transform: translate(200%, 0);
    z-index: -1;
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.9s ease-in-out;
  }

  .menu--open, .menu--open li {
    transform: translate(0, 0);
    opacity: 1;
  }
}
.category {
  font-size: var(--fs-200);
  border-radius: 0.5em;
  padding: 0.3em 0.8em;
  color: var(--clr-neutral-900);
  font-weight: var(--fw-700);
  text-decoration: none;
}

.category__container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* //////////////////////
  Footer
  /////////////////////// */
.site-footer {
  padding: 2em 0 0 0;
  color: var(--clr-neutral-100);
  background-color: var(--clr-primary-500);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  margin-top: auto;
}
.site-footer p {
  font-size: var(--fs-100);
  padding: 2em 0 1em 0;
  color: var(--clr-neutral-300);
}
.site-footer .logo {
  width: 10rem;
}

/* //////////////////////
  Homepage
  /////////////////////// */
.hero-section > div {
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: 1fr 1fr 2fr;
  align-items: center;
  gap: 1rem;
  padding-top: 2em;
  padding-bottom: 2em;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-title {
  color: var(--clr-primary-200);
  font-size: var(--fs-700);
  font-family: "Architects Daughter", cursive;
  letter-spacing: 0.2em;
}

.hero-text {
  color: var(--clr-primary-200);
  font-style: italic;
  margin: 0;
}

/* //////////////////////
  Features recipes
  /////////////////////// */
.home__recipe {
  display: grid;
  gap: 1rem;
  padding: 1em 0;
  grid-template-areas: "image" "title" "body" "meta" "button";
}

.home__recipe__image {
  grid-area: image;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.home__recipe__title {
  grid-area: title;
}

.home__recipe__meta {
  grid-area: meta;
  color: var(--clr-neutral-300);
  display: flex;
}

.home__recipe__meta span {
  color: var(--clr-neutral-900);
}

.home__recipe .btn {
  grid-area: button;
}

.home__recipe__title {
  color: var(--clr-neutral-900);
  font-size: var(--fs-500);
}

.home__recipe__title a {
  color: inherit;
  text-decoration: none;
}

@media (min-width: 45rem) {
  .home__recipe {
    grid-template-areas: "title image" "body image" "meta image" "button image";
    grid-column-gap: 4rem;
    grid-template-columns: 1fr 40%;
    grid-template-rows: min-content min-content min-content 1fr;
  }

  .home__recipe:nth-child(even) {
    grid-template-areas: "image title" "image body" "image meta" "image button";
    grid-template-columns: 40% 1fr;
  }
}
/* //////////////////////
  Recipes page
  /////////////////////// */
.recipes-section {
  background-color: var(--clr-neutral-200);
}

.card-container {
  display: grid;
  grid-auto-flow: row;
  grid-gap: 2rem;
  padding-top: 2em;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  position: relative;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.18);
  background-color: var(--clr-neutral-100);
  display: flex;
  flex-direction: column;
  z-index: 0;
  border-radius: 0.5em;
  max-width: 600px;
  margin: 0 auto;
}

.card__image {
  border-radius: 0.5em 0.5em 0 0;
  height: auto;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.card__link, .card__description, .card__meta {
  padding: 0.5em 1.5em;
}

.card__description {
  padding-bottom: 1em;
}

.card__title {
  color: var(--clr-neutral-900);
  font-size: var(--fs-500);
  padding-top: 1em;
}

.card__link {
  color: inherit;
  text-decoration: none;
}

.card__link:hover,
.card__link:focus {
  color: var(--clr-primary-300);
}

.card__link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.card__meta {
  color: var(--clr-neutral-900);
  background-color: var(--clr-neutral-200);
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-300);
  padding: 0.8em;
}

.card__meta .category {
  margin: 0;
}

.recipe-time-span {
  display: flex;
  align-items: center;
}

/* //////////////////////
  Individual recipe page
  /////////////////////// */
.recipe__container {
  display: grid;
  gap: 2rem;
  grid-template-areas: "title" "description" "servings" "ingredients" "time" "instruction" "categories";
}

@media (min-width: 45rem) {
  .recipe__container {
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto auto auto auto auto 1fr;
    grid-template-areas: "title title" "description description" "servings instruction" "ingredients instruction" "ingredients instruction" "time categories";
  }
}
/* Use general class? TODO*/
.recipe-section {
  padding-top: 0;
}

.recipe__image {
  max-width: 100%;
  height: 50vh;
  min-height: 300px;
  object-fit: cover;
  margin: 0 auto;
}

.recipe__title {
  grid-area: title;
  padding-bottom: 0;
}

.recipe__description {
  grid-area: description;
  color: var(--clr-neutral-300);
}

.recipe__time {
  grid-area: time;
}

.recipe__servings {
  grid-area: servings;
}

.recipe__instruction {
  grid-area: instruction;
}

.recipe__categories {
  grid-area: categories;
  justify-content: start;
}

.recipe__ingredients ul {
  list-style-type: "- ";
  list-style-position: inside;
  grid-area: ingredients;
}

.recipe__ingredients li {
  font-style: italic;
  color: var(--clr-neutral-400);
  font-size: var(--fs-200);
  padding: 0.25em;
}

/* //////////////////////
  About page
  /////////////////////// */
.about-section h1 {
  text-align: left;
}

.about-container {
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: 1fr 2fr;
  align-items: center;
  gap: 4rem;
}

.about__image {
  /* width: 80%; */
  max-height: max(20rem, 40vh);
  margin: auto;
}

.about__content {
  align-self: end;
}

@media (min-width: 45rem) {
  .about-container {
    grid-auto-flow: column;
  }
}
.contact-form-section {
  background-color: var(--clr-primary-200);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "title" "text" "comment-label" "comment-input" "email-label" "email-input" "file-label" "file-input" "recpatcha" "submit";
  max-width: 700px;
  margin: 0 auto;
  gap: 2rem;
}

@media (min-width: 45rem) {
  .contact-form {
    grid-template-columns: auto 1fr;
    grid-template-areas: "title title" "text text" "comment-label comment-input" "email-label email-input" "file-label file-input" ". recpatcha" ". submit";
  }
}
.form-title {
  grid-area: title;
}

.form-text {
  grid-area: text;
}

.contact-form label {
  font-weight: var(--fw-700);
}

.comment-label {
  grid-area: comment-label;
}

.comment-input {
  grid-area: comment-input;
}

.required {
  color: var(--clr-primary-300);
}

.email-label {
  grid-area: email-label;
}

.email-input {
  grid-area: email-input;
}

.file-label {
  grid-area: file-label;
}

.file-input {
  grid-area: file-input;
}

.recpatcha {
  grid-area: recpatcha;
}

.hidden {
  display: none;
}

.contact-form input[type=submit] {
  grid-area: submit;
}

/* //////////////////////
  404 page
  /////////////////////// */
.error-section {
  height: 100%;
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.error-section > div {
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: 1fr 2fr;
  align-items: center;
  gap: 1rem;
}

.error__content {
  color: var(--clr-neutral-100);
  background-color: rgba(0, 0, 0, 0.6);
  padding: 2em;
  flex-direction: column;
  align-items: center;
}
.error__content h1 {
  color: inherit;
}

@media (min-width: 45rem) {
  .error-section > div {
    grid-auto-flow: column;
  }
}

/*# sourceMappingURL=style.css.map */
