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

:root {
  --index: calc(1vw + 1vh);
  --color-header: #f4efec;
  --color-text: #cdc6c3;
  --gallery-gap: calc(var(--index) * 10);
}

@font-face {
  font-family: raleway-c;
  src: url(../fonts/raleway-regular.woff2);
}

@font-face {
  font-family: outfit-c;
  src: url(../fonts/outfit-regular.woff2);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: outfit-c;
}

/* 
 * will-change предупреждает браузер о предстоящих анимациях transform.
 * Браузер создает отдельные слои для этих элементов, что позволяет:
 * - Избежать перекомпоновки страницы (reflow) во время анимации
 * - Использовать GPU-ускорение для плавности
 * 
 * ВАЖНО: Использовать только для элементов, которые анимируются постоянно,
 * чтобы не перегружать память браузера.
 */
.content,
.hero__image,
.hero__header,
.gallery > * {
  will-change: transform;
}

body {
  background-image: url(../img/bg.jpg);
  background-size: 50px;
  color: #fafafa;
  font-family: raleway-c;
  overflow-x: hidden;
}

.hero__image {
  position: absolute;
  left: 37vw;
  top: 8vh;
  z-index: -1;
  width: calc(var(--index) * 36);
}

.hero__header {
  height: 100vh;
}

.container {
  padding: 0 7vh;
}

.hero__title {
  position: absolute;
  bottom: 12vh;
  width: min-content;
  font-size: calc(var(--index) * 8);
  line-height: 0.9;
}

.gallery {
  display: flex;
  padding: calc(var(--index) * 4) 0;
  gap: 2vw;
}

.gallery > * {
  flex: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.gallery__item {
  margin-bottom: var(--gallery-gap);
  max-height: 180vh;
  border-radius: 8px;
  max-width: clamp(200px, calc(var(--index) * 21), 90vw);
  width: 100%;
}

.gallery__column--left {
  margin-top: calc(var(--gallery-gap) * 1.75);
}

.gallery__column--right .gallery__item {
  margin: 0;
  margin-top: var(--gallery-gap);
}

.text-block {
  color: var(--color-text);
  position: relative;
}

.text-block__heading {
  font-size: 2rem;
  line-height: 2.4rem;
  color: var(--color-header);
  margin-bottom: 1.5rem;
}

.text-block__paragraph {
  line-height: 1.75rem;
  font-size: 1.5rem;
}
