/* Основные стили проекта. Это стили для темы, которую вы верстаете первой. */

.page {
  background-image: var(--back-img);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  block-size: 100vh;
  background-color: var(--back-color);
  /* сохраните в разметке и стилях класс page. На его основе работает скрипт. */
}

.header {
  padding: 20px;
  min-block-size: 768px;
  min-inline-size: 768px;
  block-size: 100vh;
  display: grid;
  grid-template-rows: 1fr min-content 1fr;
  grid-template-columns: repeat(1, 1fr);
  align-items: center;
  margin-bottom: 60px;
}

.decorated-zone {
  position: relative;
}

.decorated-zone::before {
  content: "";
  position: absolute;
  top: 20px;
  right: 20px;
  block-size: 25px;
  inline-size: 25px;
  border-right: 1px solid var(--button-corner-main-section-title-color);
  border-top: 1px solid var(--button-corner-main-section-title-color);
}

.decorated-zone::after {
  content: "";
  position: absolute;
  bottom: 20px;
  left: 20px;
  block-size: 25px;
  inline-size: 25px;
  border-bottom: 1px solid var(--button-corner-main-section-title-color);
  border-left: 1px solid var(--button-corner-main-section-title-color);
}

.header__rec {
  display: var(--rec-visibility);
  position: absolute;
  top: 20px;
  right: 48px;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.38889;
  text-transform: uppercase;
  color: var(--accent-color);
}

.header__rec::after {
  content: "";
  position: absolute;
  margin-block-start: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 4px 2px var(--accent-color);
  background-color: var(--accent-color);
  margin-inline-start: 10px;
  font-family: var(--font-family);
}

.header__theme-menu {
  align-self: flex-start;
}

.header__theme-menu-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.header__theme-menu-button {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
  color: var(--button-corner-main-section-title-color);
  background-color: transparent;
  border: none;
  min-block-size: 26px;
  min-inline-size: 70px;
  cursor: pointer;
  text-transform: lowercase;
}

.header__theme-menu-button_active {
  pointer-events: none;
  outline: 1px solid var(--button-corner-main-section-title-color);
}

.header__theme-menu-button:hover {
  outline: 1px solid var(--button-hover-color);
}

.header__theme-menu-button:focus {
  outline: none;
}

.header__theme-menu-button:focus-visible {
  border-bottom: 1px solid var(--button-corner-main-section-title-color);
}

.header__title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 157px;
  line-height: 0.825;
  color: var(--main-title-color);
  text-shadow: 4px 4px 0 var(--header-title-shadow-color);
  white-space: wrap;
}

.header__text_wrapper {
  justify-self: flex-end;
}

.header__text {
  font-family: "IBM Plex Mono", sans-serif;
  text-align: left;
  background: var(--accent-color);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--default-color-text);
}

.main__content {
  padding: 0 20px;
}

.reasons {
  display: grid;
  grid-template-columns: min-content 2fr;
  grid-template-rows: 1fr;
  gap: 20px;
  margin-bottom: 80px;
}

.reasons__title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--button-corner-main-section-title-color);
}

.reasons__content {
  display: grid;
  gap: 20px;
}

.card-title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--default-color-text);
  background-color: var(--accent-color);
  margin-block-end: 10px;
}

.card-text {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.3;
  color: var(--main-text-color);
}

.text-link {
  text-decoration: none;
  text-shadow: 2px 2px var(--accent-color);
}

.text-link:hover {
  border-block-end: 1px solid var(--main-text-color);
}

.text-link:focus {
  outline: none;
}

.text-link:focus-visible {
  outline: 1px solid var(--main-text-color);
}

.factors {
  margin-block-end: 80px;
}

.factors__title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--button-corner-main-section-title-color);
  margin-block-end: 20px;
}

.factors__content {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr 1fr;
}

.advices {
  margin-bottom: 80px;
  display: grid;
  grid-template-columns: min-content 2fr;
  grid-template-rows: 1fr;
  gap: 20px;
}

.advices__title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--button-corner-main-section-title-color);
}

.advices__content {
  display: grid;
  gap: 20px;
}

.advices__content-title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--default-color-text);
  background-color: var(--accent-color);
}

.advices__card-title {
  font-family: var(--font-family);
  font-size: 18px;
  line-height: 1.3;
  color: var(--default-color-text);
  background-color: var(--accent-color);
  margin-block-end: 10px;
  font-weight: 400;
}

.pictures {
  margin-bottom: 60px;
}

.pictures__title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--default-color-text);
  background-color: var(--accent-color);
  margin-block-end: 20px;
}

.pictures__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, min-content);
  gap: 20px;
}

.gallery__img {
  block-size: 100%;
  inline-size: 100%;
  object-fit: cover;
  object-position: center;
}

.sunset {
  grid-column: span 2;
}

.ice-cream {
  grid-row: span 2;
}

.tape {
  grid-row: span 2;
}

.street {
  grid-column: span 2;
}

.footer {
  min-block-size: 668px;
  min-inline-size: 375px;
  block-size: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer__title {
  font-family: var(--font-family);
  font-size: 157px;
  line-height: 0.825;
  color: var(--main-title-color);
  text-shadow: 2px 2px 0 var(--header-title-shadow-color);
}

@media (min-width: 768px) {
  .header__title {
    font-size: clamp(7.5rem, 0.5625rem + 14.4531vw, 9.8125rem);
    margin-inline-start: -20px;
  }
  .header__text_wrapper {
    inline-size: clamp(22.75rem, -1.0625rem + 49.6094vw, 30.6875rem);
  }
  .reasons__title {
    inline-size: clamp(14.75rem, 0.125rem + 30.4688vw, 19.625rem);
  }
  .factors__title {
    inline-size: clamp(14.75rem, -0.0625rem + 30.8594vw, 19.6875rem);
  }
  .advices__title {
    inline-size: clamp(14.75rem, -0.0625rem + 30.8594vw, 19.6875rem);
  }
  .footer__title {
    font-size: clamp(7.5rem, 0.5625rem + 14.4531vw, 9.8125rem);
  }
}

@media (max-width: 768px) {
  .header {
    min-block-size: 668px;
    min-inline-size: 375px;
    padding: clamp(0.625rem, 0.0286rem + 2.5445vw, 1.25rem);
    margin-block-end: clamp(2.5rem, 1.3073rem + 5.0891vw, 3.75rem);
  }
  .header__theme-menu {
    align-self: center;
    justify-self: flex-end;
  }
  .header__theme-menu-list {
    flex-direction: column;
  }
  .decorated-zone::before {
    right: clamp(0.625rem, 0.0286rem + 2.5445vw, 1.25rem);
    top: clamp(0.625rem, 0.0286rem + 2.5445vw, 1.25rem);
  }
  .decorated-zone::after {
    left: clamp(0.625rem, 0.0286rem + 2.5445vw, 1.25rem);
    bottom: clamp(0.625rem, 0.0286rem + 2.5445vw, 1.25rem);
  }
  .header__rec {
    top: clamp(0.625rem, 0.0286rem + 2.5445vw, 1.25rem);
    right: clamp(2.375rem, 1.7786rem + 2.5445vw, 3rem);
  }
  .header__title {
    font-size: clamp(7.25rem, 7.0115rem + 1.0178vw, 7.5rem);
  }
  .header__text_wrapper {
    inline-size: clamp(22.1875rem, 21.6508rem + 2.2901vw, 22.75rem);
  }
  .main__content {
    padding: 0 clamp(0.625rem, 0.0286rem + 2.5445vw, 1.25rem);
  }
  .reasons {
    margin-block-end: clamp(3.125rem, 1.3359rem + 7.6336vw, 5rem);
  }
  .factors {
    margin-block-end: clamp(3.125rem, 1.3359rem + 7.6336vw, 5rem);
  }
  .factors__content {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, min-content);
  }
  .advices {
    margin-block-end: clamp(3.125rem, 1.3359rem + 7.6336vw, 5rem);
  }
  .pictures {
    margin-block-end: clamp(2.5rem, 1.3073rem + 5.0891vw, 3.75rem);
  }
  .pictures__title {
    margin-block-end: clamp(0.625rem, 0.0286rem + 2.5445vw, 1.25rem);
  }
  .pictures__gallery {
    gap: clamp(0.625rem, 0.0286rem + 2.5445vw, 1.25rem);
  }
  .footer__title {
    font-size: clamp(7.25rem, 7.0115rem + 1.0178vw, 7.5rem);
  }
}

@media (max-width: 767px) {
  .header {
    padding: clamp(0.625rem, 0.0271rem + 2.551vw, 1.25rem);
  }
  .reasons {
    grid-template-columns: 1fr;
    grid-template-rows: min-content 1fr;
  }
  .advices {
    grid-template-columns: 1fr;
    grid-template-rows: min-content 1fr;
  }
  .pictures__gallery {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, min-content);
  }
  .sunset {
    grid-column: auto;
  }
  .ice-cream {
    grid-row: auto;
  }
  .tape {
    grid-row: auto;
  }
  .street {
    grid-column: auto;
  }
}
