.page {
  background: fixed var(--background-image) no-repeat center / cover;
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 18px;
  padding-inline: 10px;
}

.header {
  block-size: 100vh;
  min-block-size: 668px;
  min-height: 100%;
  display: grid;
  grid-template-rows: 0% 37% 26% 37%;
  align-items: center;
  position: relative;
}

.rec::after {
  content: '';
  position: absolute;
  inset-block-start: 18px;
  inset-inline-end: 10px;
  inline-size: 9px;
  block-size: 9px;
  border-radius: 100%;
  filter: drop-shadow(0px 0px 4px var(--accent-color));
  background-color: var(--accent-color);
}

.rec::before {
  content: 'REC';
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 28px;
  color: var(--accent-color);
  font-size: 18px;
  line-height: 1.4;
}

.mini-border::before {
  content: '';
  position: absolute;
  inset-block-end: 10px;
  inset-inline-start: 0;
  inline-size: 25px;
  block-size: 25px;
  border-block-end: 1px solid var(--button-color);
  border-inline-start: 1px solid var(--button-color);
}

.mini-border::after {
  content: '';
  position: absolute;
  align-self: end;
  inline-size: 25px;
  block-size: 25px;
  border-block-start: 1px solid var(--button-color);
  border-inline-end: 1px solid var(--button-color);
  inset-block-start: 10px;
  inset-inline-end: 0;
}

.header__theme-menu {
  justify-self: end;
}

.header__theme-menu-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.header__theme-menu-button {
  background-color: transparent;
  color: var(--button-color);
  border: none;
  text-transform: lowercase;
  position: relative;
  padding: 0 13px;
  transition: border 0.6s;
  cursor: pointer;
}

.header__theme-menu-button:focus-visible {
  outline: none;
  border-block-end: 1px solid var(--button-color);
}

.header__theme-menu-button:hover {
  border: 1px solid var(--button-hover);
}

.header__theme-menu-button_active {
  outline: 1px solid var(--button-color);
  pointer-events: none;
}

.header_title {
  font-size: clamp(7.25rem, 7.0115rem + 1.0178vw, 7.5rem);
  line-height: 95.7px;
  color: var(--main-text);
  text-shadow: 4px 4px 0px #FF0070;
}

.header_description {
  align-self: center;
}

main {
  display: flex;
  flex-direction: column;
  gap: 50px;
  margin-block-start: 40px;
}

.margin-default {
  margin-block-start: 20px;
}

.margin-title {
  margin-block-start: 22px;
}

.text {
  line-height: 23.4px;
  margin-block-start: 10px;
}

.bg-text {
  background-color: var(--bg-text);
  color: #000028;
  font-size: 18px;
  font-weight: 700;
}

h4 {
font-weight: 400;
}

h2 {
  font-size: 18px;
  line-height: 23.4px;
  color: var(--button-color);
}

p a {
  text-decoration: none;
  color: inherit;
  text-shadow: 1px 1px var(--accent-color);
  &:focus {
    outline:  none;
    border: 1px solid var(--text-color);
  }
  &:hover {
    border-block-end: 1px solid var(--text-color);
  }
}

.section-images {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-block-start: 11px;
  margin-block-end: 41px;
}

.section-images img {
  width: 100%;
  height: auto;
}

.footer {
  block-size: 100vh;
  min-block-size: 668px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-title {
font-size: clamp(7.25rem, 7.0115rem + 1.0178vw, 7.5rem);
color: var(--main-text);
text-shadow: 2px 2px 0 var(--accent-color);
}

@media(min-width: 768px) {
  .page {
    padding-inline: 20px;
  }

  .rec::after {
    inset-block-start: 29px;
    inset-inline-end: 9px;
  }
  
  .rec::before {
    inset-block-start: 20px;
    inset-inline-end: 28px;
  }

  .mini-border::before {
    inset-block-end: 20px;
    inset-inline-start: 0;
  }
  
  .mini-border::after {
    inset-block-start: 20px;
    inset-inline-end: 0;
  }

  .header {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr min-content 1fr;
    align-content: space-around;
  }
  
  .header__theme-menu {
    margin-block-start: 16px;
  }

  .header_title {
    position: relative;
    margin-inline-start: -20px;
    font-size: clamp(7.5rem, 0.5625rem + 14.4531vw, 9.8125rem);
    grid-column: 1 / 3;
  }

  .header_description {
    grid-column: 2 / 3;
    margin-block-end: 20px;
  }
  
  p a {
    text-shadow: 2px 2px var(--accent-color);
  }

  .two-columns {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 20px;
  }

  .margin-column {
    margin-block-start: 10px;
  } 
  
  .margin-title-default {
    margin-block-start: 20px;
  }

  .margin-title-large {
    margin-block-start: 30px;
  }

  .margin-section {
    margin-block-start: 30px;
  }

  .grid {
    display: grid;
    margin-block-start: 30px;
  }

  .section-name {
    max-width: 236px;
  }

  .section-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 20px;
    margin-block-start: 20px;
    margin-block-end: 60px;
  }

  .section-images img {
    align-self: stretch;
    object-fit: cover;
  }

  .section-images img:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
  }

  .section-images img:nth-child(2) {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
  }

  .section-images img:nth-child(3) {
    grid-column: 1 / 2;
    grid-row: 2 / 4;
  }

  .section-images img:nth-child(4) {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
  }

  .section-images img:nth-child(5) {
    grid-column: 2 / 4;
    grid-row: 3 / 4;
  }
}

@media(min-width: 1024px) {
  .header {
    grid-template-rows: 0% 1fr min-content 1fr;
  }

  .header__theme-menu {
    grid-column: 1 / 3;
    justify-self: center;
    align-self: start;
    padding-block-start: 5px;
  }

  .header__theme-menu-list {
    flex-direction: row;
    gap: 1vw;
  }

  .header_description {
    margin-block-end: 0;
  }

  .two-columns {
    column-gap: 12px;
  }

  .section-name {
    max-width: 315px;
  }

  .columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .footer-title {
    font-size: 157px;
  }
}