@font-face {
  font-family: "Inter";
  src: url(./assets/fonts/Inter-VariableFont_slntwght.ttf);
  font-weight: 400 800;
}

:root {
  /* Colors neutral */
  --Off-white: hsl(36, 100%, 99%);
  --Grayish-blue: hsl(233, 8%, 79%);
  --Dark-grayish-blue: hsl(236, 13%, 42%);
  --Very-dark-blue: hsl(240, 100%, 5%);

  /* Colors primary */
  --Soft-orange: hsl(35, 77%, 62%);
  --Soft-red: hsl(5, 85%, 63%);

  /* Font */
  --ff-main: "Inter", sans-serif;
  --fw-regular: 400;
  --fw-bold: 700;
  --fw-extra-bold: 800;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 2.2rem;

  /* Layout */
  --footer-img-size: 145px;
  --menu-width: 70%;
  --border-radius: 0.25rem;
}

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

html {
  font-size: 15px;
}

body {
  font-family: var(--ff-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  flex-direction: column;
}

hr {
  border: none;
  border-top: 1px solid var(--Off-white);
}

/* Layout */
.grid-container {
  display: grid;
  grid-template-areas:
    "header"
    "main-image"
    "main-title"
    "paragraph-button"
    "article-section"
    "footer-1"
    "footer-2"
    "footer-3";
  max-width: 1100px;
  gap: var(--spacing-sm);
  margin: var(--spacing-lg) auto;
  width: 100%;
  padding: 0 var(--spacing-sm);
}

/* Header */
header {
  grid-area: header;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding-block: var(--spacing-sm);
  width: 100%;
}

.menu-close-icon {
  display: flex;
  position: absolute;
  top: 0;
  right: 0;
  padding: var(--spacing-sm);
  color: var(--Very-dark-blue);
  opacity: 0; /* Hidden by default */
}

nav .menu {
  display: flex;
  flex-direction: column;
  align-items: start;
  position: absolute;
  top: 0;
  right: 0;
  width: var(--menu-width);
  height: 100vh;
  background-color: var(--Off-white);
  padding-inline: var(--spacing-lg);
  padding-block: 10rem;
  opacity: 0; /* Hidden by default */
}

.menu li {
  list-style-type: none;
}

.menu a {
  text-decoration: none;
  font-size: 1.2rem;
  line-height: 3rem;
  color: var(--Very-dark-blue);
}

/* Main content sections */
.main-image {
  grid-area: main-image;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-title {
  grid-area: main-title;
}

.main-title h1 {
  font-size: 3rem;
  font-weight: var(--fw-extra-bold);
}

.paragraph-button {
  grid-area: paragraph-button;
}

.paragraph-button p {
  color: var(--Dark-grayish-blue);
  line-height: 1.6rem;
  letter-spacing: 0.05rem;
}

.paragraph-button button {
  background-color: var(--Soft-red);
  font-family: inherit;
  padding-block: var(--spacing-sm);
  padding-inline: 1.8rem;
  border: none;
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.3rem;
}

/* Article section */
.article-section {
  grid-area: article-section;
  background-color: var(--Very-dark-blue);
  color: var(--Off-white);
  display: grid;
  gap: var(--spacing-lg);
  padding-inline: 1.2rem;
  padding-block: var(--spacing-md);
  margin-block: var(--spacing-lg);
}

.article-section h2 {
  font-size: 2.3rem;
  color: var(--Soft-orange);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1rem;
}

.article-section article h3 {
  font-size: 1.4rem;
  font-weight: var(--fw-bold);
}

.article-section article p {
  color: var(--Grayish-blue);
  padding-top: var(--spacing-sm);
  line-height: 1.6rem;
  font-size: 1.1rem;
}

/* Footer sections - consolidated styles */
.footer-1,
.footer-2,
.footer-3 {
  display: flex;
  align-items: center;
  margin-block: 0.8rem;
  margin-right: var(--spacing-xs);
}

.footer-1 {
  grid-area: footer-1;
}
.footer-2 {
  grid-area: footer-2;
}
.footer-3 {
  grid-area: footer-3;
}

.footer-img {
  width: var(--footer-img-size);
  height: var(--footer-img-size);
  object-fit: cover;
  margin-right: var(--spacing-sm);
  display: block;
}

.footer-text {
  display: grid;
  gap: var(--spacing-sm);
  padding-left: 0.8rem;
}

.footer-text .article-number {
  font-size: 2.3rem;
  color: var(--Soft-red);
  font-weight: var(--fw-bold);
}

.footer-text h3 {
  color: var(--Very-dark-blue);
  font-size: 1.1rem;
  font-weight: var(--fw-extra-bold);
}

.footer-text p {
  color: var(--Dark-grayish-blue);
  font-size: 1rem;
}

/* Interactive states */
.menu a:hover {
  color: var(--Soft-red);
}

.footer-text h3:hover {
  color: var(--Soft-red);
  cursor: pointer;
}

.paragraph-button button:hover {
  background-color: var(--Very-dark-blue);
  color: var(--Off-white);
  cursor: pointer;
}

.article-section article h3:hover {
  color: var(--Soft-orange);
  cursor: pointer;
}

/* Media queries for large screens */
@media (min-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "header header header"
      "main-image main-image article-section"
      "main-title paragraph-button article-section"
      "footer-1 footer-2 footer-3";
    grid-template-rows: auto;
    gap: var(--spacing-xl);
  }

  .article-section {
    margin-block: 0;
  }

  .article-section article p {
    font-size: 1rem;
  }

  .main-title h1 {
    font-size: 3.5rem;
    line-height: 3.7rem;
  }

  .paragraph-button p {
    letter-spacing: 0;
    padding-right: 0.8rem;
    margin-bottom: var(--spacing-sm);
  }

  .paragraph-button button {
    margin-bottom: auto;
  }

  .menu-icon {
    display: none;
  }

  .menu-close-icon {
    display: none;
  }

  nav .menu {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: static;
    padding: 0;
    height: auto;
    width: auto;
    gap: 2.7rem;
    opacity: 1;
  }

  .menu li {
    list-style-type: none;
  }

  .menu a {
    color: var(--Dark-grayish-blue);
  }
}
