@import url("https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap");

/* Theming variables */
:root {
  --padding-0: 4px;
  --padding-1: 8px;
  --padding-2: 16px;
  --padding-3: 24px;
  --padding-4: 32px;
  --padding-5: 48px;
  --padding-6: 64px;
  --padding-7: 80px;

  /* The text color should be off-black and the same as a part of the color 
    scheme to develop a brand identity without adding clutter to the site */
  --text-dark: var(--color-9);
  --text-light: #fff;

  /* CSS HSL */
  --color-0: hsla(228, 24%, 84%, 1);
  --color-1: hsla(228, 17%, 76%, 1);
  --color-2: hsla(229, 13%, 69%, 1);
  --color-3: hsla(228, 10%, 62%, 1);
  --color-4: hsla(229, 9%, 55%, 1);
  --color-5: hsla(229, 9%, 47%, 1);
  --color-6: hsla(229, 11%, 40%, 1);
  --color-7: hsla(229, 13%, 33%, 1);
  --color-8: hsla(229, 17%, 25%, 1);
  --color-9: hsla(229, 24%, 18%, 1);

  --color-main: var(--color-1);
  --bg: white;

  --font-family: "Jost", sans-serif;

  /* By default cards shouldn't have a background. */
  --card-bg: none;
}

html,
body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--text-dark);
}

h1,
h2 {
  margin: var(--padding-0) 0;
}

/* ========================================================================== */
/* Nav bar */

nav {
  display: flex;
  align-items: center;
}

nav {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  padding: var(--padding-1);
}

/* We don't want to give padding to the branding for reasons */
nav .item {
  padding: var(--padding-1) var(--padding-2);
}

/* We also don't want the branding to have a hover effect */
nav .item:hover {
  background: var(--color-0);
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  text-align: center;
}

/* ========================================================================== */
/* Main content */

main {
  max-width: 978px;
  padding: 0 var(--padding-2);
  margin: 0 auto;
}

/* ========================================================================== */
/* Footer */

footer {
  background: var(--color-main);
  display: flex;
  padding: var(--padding-7);
  gap: var(--padding-5);
  justify-content: center;
}

footer a {
  color: var(--text-dark);
  display: block;
}

footer h2 a {
  text-decoration: none;
}

footer h2 {
  /* Headings in the footer should align with the Auko logo */
  margin-top: 0;
}

footer .social {
  display: flex;
  gap: var(--padding-1);
}

/* ========================================================================== */
/* Buttons */

button {
  background: var(--color-9);
  color: var(--text-light);
  border: none;
  padding: var(--padding-2) var(--padding-3);
  cursor: pointer;
}

button.white {
  background: white;
  color: var(--text-dark);
}

/* ========================================================================== */
/* Shoutouts */

.shoutout-container {
  display: flex;
  align-items: center;
  margin-bottom: var(--padding-4);
}

.shoutout-container img {
  width: 80%;
}

.shoutout {
  margin: 0 calc(var(--padding-7) * -1);
  background: var(--color-main);
  padding: var(--padding-5);
  width: 480px;
  box-sizing: border-box;
}

.shoutout-container.reverse {
  flex-direction: row-reverse;
}

@media (max-width: 1140px) {
  .shoutout {
    margin: 0;
    width: 100%;
  }

  .shoutout-container {
    display: block;
  }

  .shoutout-container img {
    width: 100%;
  }
}

/* ========================================================================== */
/* Cards */

.card {
  background: var(--color-main);
  margin: var(--padding-1);
  display: inline-block;
}

a.card {
  color: var(--text-dark);
  text-decoration: none;
}

.card .content {
  padding: var(--padding-2);
}

.card h2,
.card p {
  margin: 0;
  font-size: 14px;
}

.card h2 {
  font-style: normal;
  font-weight: bold;
  font-size: 18px;
  width: 210px;
}

/* Provide the option to place an image above the text. The programer only needs
 to provide the variable --card-bg and add the .bgHeader class to get this header 
 to appear. ::before is an amazing element */
.card.bgHeader::before {
  content: "";
  display: block;
  background-image: var(--card-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 152px;
}

.productPurchase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--padding-1);
}

/* ========================================================================== */
/* General utility styles */

.price::before {
  content: "$";
}

/* ========================================================================== */
/* Branding */

.brandName {
  font-style: normal;
  font-weight: bold;
  font-size: 36px;
  line-height: 52px;
  color: var(--text-dark);
  text-decoration: none;
}
