/** @format */

/* ----- Fonts ----- */
@font-face {
	font-family: "Young Serif";
	src: url(../assets/fonts/young-serif/YoungSerif-Regular.ttf)
		format(truetype);
	font-weight: 400;
	font-style: normal;
}

@font-face {
	font-family: "Outfit";
	src: url(../assets/fonts/outfit/Outfit-VariableFont_wght.ttf)
		format(truetype);
	font-weight: 400 700;
	font-style: normal;
}

/* ----- General styles ----- */

:root {
	/* Colors */
	--white: hsl(0, 0%, 100%);
	--stone-100: hsl(30, 54%, 90%);
	--stone-150: hsl(30, 18%, 87%);
	--stone-600: hsl(30, 10%, 34%);
	--stone-900: hsl(24, 5%, 18%);
	--brown-800: hsl(14, 45%, 36%);
	--rose-800: hsl(332, 51%, 32%);
	--rose-50: hsl(330, 100%, 98%);
	/* My colors */
	--stone-50: hsla(30, 75%, 95%, 0.25);
	--rose-300: hsl(331, 84%, 93%);
}

body {
	max-width: 100svw;
	font-family: "Outfit";
	color: var(--stone-600);
}

.h1,
.h2 {
	font-family: "Young Serif";
	color: var(--stone-900);
	line-height: 1;
}

.h1 {
	text-wrap: auto;
	margin-block-end: 1.5rem; /* 24px */
	font-size: 2.15rem; /* 34.56px */
}

.h2 {
	font-size: 1.75rem; /* 28px */
	color: var(--brown-800);
	margin-block-end: 1.5rem; /* 24px */
	font-weight: 400;
}

.section {
	margin: 2rem 0;
}

.ul {
	padding-inline-start: 0;
	list-style: none;
}

.ul .li {
	position: relative;
	display: flex;
	align-items: center;
	margin-inline-start: 2rem; /* 32px */
	margin-inline-end: 0.75rem; /* 12px */
	margin-block-start: 0.375rem; /* 6px */
	margin-block-end: 0.375rem; /* 6px */
}

.ul .li::before {
	content: "•";
	position: absolute;
	left: -1.75rem; /* -28px */
	font-size: 1.5rem; /* 24px */
	color: var(--brown-800);
}

.ol {
	counter-reset: custom-counter;
	list-style: none;
}

.ol .li {
	counter-increment: custom-counter;
	position: relative;
	margin-block-end: 0.375rem; /* 6px */
}

.ol .li::before {
	content: counter(custom-counter) ". ";
	position: absolute;
	left: -2rem; /* -32px */
	color: var(--brown-800);
	font-weight: 700;
}

.hr {
	color: var(--white);
}

.table {
	width: 100%;
}

.td {
	border-bottom: 1px solid var(--stone-150);
	padding: 0.75rem 2rem; /* 12px 32px */
}

.tr:last-child .td {
	border-bottom: none;
}

.td.unit {
	padding-inline-end: 5rem; /* 80px */
	color: var(--brown-800);
	font-weight: 700;
}

.bold {
	font-weight: 700;
}

/* ----- Page parts ----- */

.content-container {
	background-color: var(--white);
	position: relative;
}

.hero-img {
	width: 100%;
}

/* --- Header --- */

/* .recipe-container {
	margin: 2.5rem 2rem; 
} */
/* 40px 32px */

.header-text-area {
	margin: 2.5rem 2rem 0; /* 40px 32px 0 */
}

.description {
	margin: 0 -0.1875rem; /* -1px */
}

/* --- Main --- */

.main-content-area {
	margin: 0 2rem 2.5rem; /* 40px 32px 0 */
}

/* Preparation section */
.prep-section {
	background-color: var(--rose-50);
	padding: 1.25rem; /* 20px */
	border-radius: 0.75rem; /* 12px */
}

.prep-h2 {
	color: var(--rose-800);
	font-size: 1.25rem; /* 20px */
}

.prep-section .ul .li::before {
	color: var(--rose-800);
}

/* Ingredients section */

.ingredients-h2 {
	margin-block-end: 1rem;
}

/* Nutrition-section */

.nutrition-section {
	overflow: hidden;
}

/* ----- Attribution ----- */
.attribution {
	position: absolute;
	width: 100%;
	left: 0;
	bottom: -2rem;
	font-size: 1rem;
	text-align: center;
}
.attribution a {
	color: var(--brown-800);
}

/* ----- Selection and focus ----- */

::selection {
	background-color: var(--brown-800);
	color: var(--white);
}

/* For Firefox support */
::-moz-selection {
	background-color: var(--brown-800);
	color: var(--white);
}

.prep-section > *::selection {
	background-color: var(--rose-800);
	color: var(--white);
}

.prep-section *::-moz-selection {
	background-color: var(--rose-800);
	color: var(--white);
}

:focus {
	outline: none; /* Remove default outline */
	border: 0.1875rem solid var(--brown-800);
	border-radius: 0.75rem;
}

/* :focus:not(.hero-img) {
} */

.header:focus,
.section:focus {
	padding: 1rem;
	background-color: var(--stone-50);
}

.prep-section:focus {
	border-color: var(--rose-800);
	background-image: linear-gradient(var(--rose-300));
}

.attribution:focus,
.attribution *:focus {
	padding: 0.25rem;
}

/* ----- Desktop screens ----- */
@media (min-width: 992px) {
	body {
		background-image: linear-gradient(var(--stone-100));
	}

	.content-container {
		margin: 8rem 25%; /* 128px */
		border-radius: 1.25rem; /* 20px */
		padding: 2.5rem 2rem; /* 40px  32px */
	}

	.header-text-area,
	.main-content-area {
		margin-inline-start: 0;
		margin-inline-end: 0;
	}

	.main-content-area {
		margin-block-end: 0;
	}

	.section:last-child {
		margin-block-end: 0;
	}

	.tr:last-child .td {
		padding-block-end: 0;
	}

	/* --- Adjust sizing for content sections --- */
	.hero-img {
		border-radius: 0.75rem; /* 12px */
	}

	.h1 {
		font-size: 2.375rem; /* 34.56px */
	}

	.prep-section {
		padding-inline-start: 1.75rem; /* 28px */
	}

	.ul {
		padding: 0.5rem; /* 8px */
	}

	.ul .li {
		margin-block-start: 0.375rem; /* 6px */
		margin-block-end: 0.375rem; /* 6px */
	}

	.ul .li::before {
		left: -2rem; /* -32px */
	}

	/* Attribution */

	.attribution {
		bottom: -4rem;
		font-size: 1.5rem;
	}
}
