/* Resets and initialization */

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

:root {
  --transition-speed-fast: 0.3s;
  --transition-speed-normal: 0.5s;
  --transition-speed-slow: 0.8s;
}

html {
  /* font-size: 10px; */
  font-size: 0.52vw;
}

body {
  position: relative;
  font-family: "Playfair Display", serif;
  font-family: "Raleway", sans-serif;
  font-size: 1.6rem;
  background-color: #1d1d1d;
  background-image: url("../img/bg-top.jpg"), url("../img/bg-bottom.jpg");
  background-size: contain;
  background-repeat: no-repeat, repeat-y;
  background-position: 0 0, 0 calc(87.15vw - 20px);
}

button,
input,
textarea {
  font-family: inherit;
  margin: 0;
  padding: 0;
  width: auto;
  line-height: normal;
  text-align: inherit;
  border: none;
  overflow: visible;
  color: inherit;
  background: transparent;
  outline: none;
  -webkit-appearance: none; /* Corrects inability to style clickable `input` types in iOS */
}

/* --------------------------------------------------- */

/* Scrollbar */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
}

::-webkit-scrollbar-thumb {
  background-color: #ad7835;
}

::-webkit-scrollbar-corner {
  display: none;
}

/* --------------------------------------------------- */

/* Fonts */

.heading {
  font-size: 6rem;
  margin-bottom: 0.58em;
  font-family: "Playfair Display", serif;
  line-height: 1em;
  color: #ad7835;
  font-weight: 400;
}

.heading--left {
  align-self: flex-start;
  margin-left: 1.16em;
}

.heading::after {
  font-size: 0.16em;
  display: block;
  content: "";
  margin-top: 1em;
  width: 9em;
  height: 0.3em;
  background-color: #ad7835;
}

.paragraph {
  font-size: 1.6rem;
  line-height: 1.75em;
  margin-bottom: 1.75em;
  font-family: "Raleway", sans-serif;
  color: #fff;
}

/* --------------------------------------------------- */

/* Buttons */

.btn {
  font-size: 1.6rem;
  position: relative;
  align-self: flex-start;
  line-height: 2em;
  text-transform: uppercase;
  color: #ad7835;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-speed-fast);
  overflow: hidden;
}

.btn--center {
  align-self: center;
}

.btn--clear::after {
  display: block;
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30%;
  height: 0.14em;
  background-color: #ad7835;
  transform: translateX(-110%);
}

.btn--clear:hover::after {
  transform: translateX(400%);
  transition: var(--transition-speed-normal);
}

.btn:hover .btn__arrow {
  transform: translateX(0.2em) translateY(-0.1em);
}

.btn:hover {
  color: #d8a562;
}

.btn--framed {
  display: block;
  position: relative;
  border: 0.06em solid #6b4922;
  min-width: 11.25em;
  padding: 0 2.5em;
  line-height: 3.5em;
  text-align: center;
  overflow: hidden;
}

.btn--social {
  font-size: 4rem;
  min-width: 0;
  width: 2em;
  line-height: 2em;
  padding: 0;
  border: 0.025em solid #6b4922;
}

.btn--framed.btn--social::after {
  left: -80%;
  width: 0.8em;
}

.btn--framed.btn--social:hover::after {
  left: 140%;
  transition: var(--transition-speed-normal);
}

.btn--framed::after {
  display: block;
  position: absolute;
  top: -100%;
  left: -30%;
  content: "";
  width: 2em;
  height: 300%;
  transform: rotate(-25deg);
  background-color: #ad7835;
}

.btn--framed:hover::after {
  left: 120%;
  transition: var(--transition-speed-normal);
}

.btn__arrow {
  font-size: 0.8em;
  line-height: 2.5em;
  margin-left: 1em;
  margin: 1em;
  transform: translateY(-0.1em);
  transition: var(--transition-speed-normal);
}

/* --------------------------------------------------- */

/* Menu */

.menu__button {
  position: fixed;
  top: 0;
  right: 0;
  padding: 10px 30px;
  font-size: 40px;
  width: 1em;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ddd;
  cursor: pointer;
  transition: color var(--transition-speed-fast) ease;
  z-index: 1;
}

.menu__button:hover {
  color: #fff;
}

.menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  background-color: #c0a584;
  z-index: 2;
}

.menu--is-open {
  display: flex;
}

.menu__list {
  list-style: none;
}

.menu__list-item {
  position: relative;
  display: flex;
  justify-content: center;
  font-size: 12em;
  font-family: "Playfair Display", serif;
  line-height: 1.5em;
  letter-spacing: 0.055em;
  font-weight: 400;
  text-decoration: none;
  color: #a16c27;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition-speed-fast);
}

.menu__list-item:hover {
  color: #ddd;
}

.menu__list-item::after {
  display: block;
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30%;
  height: 0.1em;
  background-color: #ad7835;
  transform: translateX(-100%);
}

.menu__list-item:hover::after {
  transform: translateX(400%);
  transition: var(--transition-speed-slow);
}

/* --------------------------------------------------- */

/* Header */

.welcome {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* Maskowanie przez png */
  /* czarny-widoczny, przezroczysty-ucięty */
  width: 100%; /* 100% szerokości obrazka by się pokrywał z maską */
  /* height: 60vw; obojętne */
  /* -webkit-mask-image: url("../img/bg-clip-path.png"); */
  -webkit-mask-image: url("../img/bg-clip-path.svg"); /* svg for faster loading */
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100%;
  mask-image: url("../img/bg-clip-path.svg");
  mask-repeat: no-repeat;
  mask-size: 100%;
  /* -------------------- */
}

.header {
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 17em;
  margin-bottom: 7em;
  padding: 7em 14em 10em;
  text-align: center;
  border: 1em solid #ad7835;
  color: #fff;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 2s 0.8s, opacity 2s 0.8s;
}

.header__title {
  font-size: 18em;
  margin-bottom: 0.166em;
  font-family: "Playfair Display", serif;
  line-height: 1em;
  letter-spacing: 0.055em;
}

.header__quote {
  font-size: 2.4em;
  color: #ad7835;
  text-transform: uppercase;
  font-weight: bold;
}

.header__subtitle {
  font-size: 2.4em;
  display: flex;
  flex-direction: column;
  align-items: center;
  order: -1;
  position: relative;
  line-height: 1em;
  text-transform: uppercase;
  font-weight: bold;
}

.header__subtitle::after {
  font-size: 0.416em;
  display: block;
  content: "";
  margin-top: 1em;
  width: 9em;
  height: 0.3em;
  background-color: #fff;
}

/* --------------------------------------------------- */

/* Info */

.info {
  font-size: 1rem;
  display: flex;
  position: relative;
  margin: 28em auto;
  width: 130em;
  max-height: 56em;
  background-color: #373737;
  box-shadow: 0px 0px 80px 0px rgba(0, 0, 0, 0.3);
  transition: var(--transition-speed-normal);
}

.info__container {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  width: 50%;
  padding: 6em 7em;
}

.info__paragraph {
  flex: 1;
  margin-bottom: 3.5em;
  overflow: hidden;
}

.info__container--image {
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: -5em;
  margin-bottom: -5em;
}

.info__container--left {
  padding-left: 0;
}

.info__container--right {
  padding-right: 0;
}

.info__image {
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0px 0px 80px 0px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------- */

/* articles section */

.articles {
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 28em auto 30em;
  width: 130em;
}

.articles__container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.articles__article {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 29%;
  transition: var(--transition-speed-fast);
}

.articles__article:nth-child(2) {
  transform: translateY(8em);
}

.articles__article:hover {
  transform: translateY(0.5em);
}

.articles__article:hover:nth-child(2) {
  transform: translateY(8.5em);
}

.articles__img-container {
  position: relative;
  align-self: flex-end;
  margin-top: 8em;
  margin-bottom: 3em;
  width: 92%;
  height: 23.5em;
}

.articles__img-container::after,
.articles__img-container::before {
  position: absolute;
  display: block;
  content: "";
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #373737;
  box-shadow: 0px 0px 8em 0px rgba(0, 0, 0, 0.3);
  z-index: -1;
  transform: translate(-3em, -3em);
}

.articles__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0px 0px 8em 0px rgba(0, 0, 0, 0.3);
}

.articles__title {
  position: relative;
  font-size: 2em;
  font-weight: 400;
  line-height: 2.5em;
  letter-spacing: 0.04em;
  margin-bottom: 1.25em;
  font-family: "Playfair Display", serif;
  color: #ad7835;
  border-bottom: 0.05em solid #ad7835;
}

.articles__paragraph {
  max-height: 8em;
  overflow: hidden;
  flex: 1;
  transition: var(--transition-speed-normal);
}

.articles__paragraph .paragraph:last-child {
  margin-bottom: 0;
}

.articles__article .btn {
  margin-top: 1em;
}

/* --------------------------------------------------- */

/* contact */

#contact {
  max-height: none;
  min-height: 56em;
}

.contact__container {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
  justify-content: space-between;
  align-content: flex-start;
  width: 100%;
}

.contact__container-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.contact__input {
  position: relative;
  width: 45%;
  margin-bottom: 5em;
}

.contact__input--full-width {
  width: 100%;
}

.contact__text,
.contact__textarea {
  position: relative;
  font-size: 1.6em;
  line-height: 3.5em;
  padding: 0 0.5em;
  width: 100%;
  font-family: "Raleway", sans-serif;
  color: #fff;
  border-bottom: 0.06em solid #999;
  border-radius: 0;
  resize: none;
  overflow: hidden;
  z-index: 1;
}

.contact__info {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 1.6em;
  line-height: 3.5em;
  padding-left: 0.5em;
  font-family: "Raleway", sans-serif;
  color: #fff;
  transition: var(--transition-speed-fast);
}

.contact__text:focus + .contact__info,
.contact__text:valid + .contact__info,
.contact__textarea:focus + .contact__info,
.contact__textarea:valid + .contact__info {
  font-size: 1.4em;
  transform: translateY(-70%);
}

.contact__warning {
  font-size: 1.8em;
  width: 50%;
  margin-left: 2em;
  font-family: "Raleway", sans-serif;
  color: rgb(197, 0, 0);
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity var(--transition-speed-fast);
}

.contact__warning--success {
  color: #d8a562;
}

.contact__warning--on {
  opacity: 1;
}

/* --------------------------------------------------- */

/* gallery */

.gallery {
  font-size: 1rem;
  margin: 28em auto;
  width: 130em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.6em;
}

.gallery__three-column {
  width: 100%;
  display: grid;
  grid-template-columns: 37em 37em 37em;
  grid-template-columns: 1fr 37em 1fr;
  grid-auto-rows: 0.1em;
  column-gap: 3em;
}

.gallery--short .gallery__three-column {
  max-height: 110em;
  overflow: hidden;
}

.gallery--short .gallery__two-column {
  max-height: 220em;
  overflow: hidden;
}

.gallery__img {
  position: relative;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  background: none;
  box-shadow: 0px 0px 80px 0px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: color var(--transition-speed-fast),
    opacity var(--transition-speed-fast);
}

.gallery--short .gallery__three-column .gallery__img:nth-child(n + 8),
.gallery--short .gallery__two-column .gallery__img:nth-child(n + 4) {
  opacity: 0;
}

.gallery__img::before,
.gallery__img::after {
  box-sizing: inherit;
  content: "";
  position: absolute;
  border: 10px solid transparent;
  width: 0;
  height: 0;
  z-index: 1;
}

.gallery__img::before {
  top: 10px;
  left: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  color: transparent;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f00e";
}

.gallery__img::after {
  bottom: 10px;
  right: 10px;
}

.gallery__img:hover {
  color: #60daaa;
}

.gallery__img:hover::before,
.gallery__img:hover::after {
  width: calc(100% - 20px);
  height: calc(100% - 20px);
}
.gallery__img:hover::before {
  border-top-color: #ad7835;
  border-right-color: #ad7835;
  color: #ad7835;
  background-color: rgba(0, 0, 0, 0.5);
  transition: width 0.1s ease-out, height 0.1s ease-out 0.1s,
    color 0.2s ease-out 0.3s, background-color 0.2s ease-out 0.3s;
}
.gallery__img:hover::after {
  border-bottom-color: #ad7835;
  border-left-color: #ad7835;
  transition: border-color 0s ease-out 0.2s, width 0.1s ease-out 0.2s,
    height 0.1s ease-out 0.3s;
}

.gallery__img--left {
  grid-column-start: 1;
  justify-self: flex-end;
}

.gallery__img--middle {
  grid-column-start: 2;
}

.gallery__img--right {
  grid-column-start: 3;
}

.gallery__img > img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(54%);
  transition: var(--transition-speed-fast);
}

.gallery__img:hover > img {
  filter: sepia(0);
}

.gallery__img--type-1 {
  width: 37em;
  grid-column-end: span 1;
  grid-row-end: span 374;
}

.gallery__img--type-2 {
  width: 37em;
  grid-column-end: span 1;
  grid-row-end: span 349;
}

.gallery__img--type-3 {
  width: 37em;
  grid-column-end: span 1;
  grid-row-end: span 329;
}

.gallery__img--type-4 {
  width: 37em;
  grid-column-end: span 1;
  grid-row-end: span 304;
}

.gallery__img--type-5 {
  width: 37em;
  grid-column-end: span 1;
  grid-row-end: span 204;
}

.gallery__img--type-6 {
  grid-column-end: span 2;
  grid-row-end: span 349;
}

.gallery__img--type-7 {
  grid-column-end: span 1;
  grid-row-end: span 558;
}

.gallery__img--type-8 {
  width: 37em;
  grid-column-end: span 1;
  grid-row-end: span 508;
}

.gallery__img--type-9 {
  width: 37em;
  grid-column-end: span 1;
  grid-row-end: span 466;
}

.gallery__generator {
  width: 100%;
  font-size: 1em;
}

.gallery__two-column {
  width: 100%;
  display: none;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5em;
}

.gallery__two-column__column {
  width: calc(50% - 2.5em);
  display: flex;
  flex-direction: column;
  gap: 5em;
}

.gallery__two-column__column--left {
  align-items: flex-end;
}

.gallery__two-column__column--right {
  margin-top: 30em;
}

.gallery__two-column__column > .gallery__img {
  width: 50em;
  height: 50em;
  margin: 0;
}

.gallery__two-column__column > .gallery__img:nth-child(even) {
  width: 100%;
  height: 80em;
}

.gallery__two-column > .gallery__img > img {
  width: 100%;
  height: 100%;
}

.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #c0a584;
  z-index: 1;
}

.gallery-modal--is-closed {
  display: none;
}

.gallery-modal__close {
  position: absolute;
  right: 0;
  padding: 10px 30px;
  font-size: 40px;
  width: 1em;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ddd;
  cursor: pointer;
  z-index: 1;
}

.gallery-modal__close:hover {
  color: #fff;
}

.gallery-modal__content {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 60px 30px;
  width: calc(100%);
  max-height: calc(100%);
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
}

.gallery-modal img {
  max-width: 100%;
  object-fit: cover;
}

@media (max-width: 700px) {
  .gallery__two-column {
    display: flex;
  }

  .gallery__three-column {
    display: none;
  }
}

/* --------------------------------------------------- */

/* footer */

.footer {
  font-size: 1rem;
  display: flex;
  justify-content: center;
  margin-bottom: 14em;
}

.footer__item {
  text-decoration: none;
  margin: 0 1.5em;
}

/* --------------------------------------------------- */

/* loader */

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #c0a584;
  z-index: 9;
  transition: opacity var(--transition-speed-slow) ease;
}

.loader--hidden {
  opacity: 0;
}

.spinner {
  border: 16px solid #d8a562;
  border-radius: 50%;
  border-top: 16px solid #ad7835;
  width: 120px;
  height: 120px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------- */

/* welcome section for js */

.header--changed {
  transform: translateY(0);
  opacity: 1;
}

/* about section for js*/

.info.about--changed {
  max-height: 96em;
}

/* articles section for js */

.articles__paragraph--changed {
  max-height: 32em;
}
