@import url('./reset.css');

:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
    'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
  --font-serif: 'Source Serif 4', serif;
  --color-black: #000000;
  --color-dark: #3e494c;
  --color-light: #a0a0a0;
  --color-white: #ffffff;
  --color-accent: #a29a8d;
  --color-gray: #bebebe;
}

[x-cloak] {
  display: none;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--color-white);
  background-color: var(--color-accent);

  &.no-scroll {
    overflow: hidden;
  }

  &.is-offset {
    .layout {
      transform: translateX(-50%);
    }
  }
}

.layout {
  transition: .2s;
}

.container {
  width: 100%;
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 20px;
}

.field,
.textarea {
  display: block;
  width: 100%;
  background-color: transparent;
  border: 2px solid var(--color-gray);
  min-height: 3rem;
  color: var(--color-white);
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  border-radius: 1rem;
  outline: none;

  &::placeholder {
    color: var(--color-gray);
  }

  &:active,
  &:focus {
    background-color: var(--color-gray);
  }
}

.field__message {
  font-size: 0.75rem;
  color: var(--color-dark);
}

/* Button */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent);
  border: 2px solid transparent;
  color: var(--color-white);
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  border-radius: 2rem;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
  min-height: 3rem;
  line-height: 1;

  &:hover {
    background-color: var(--color-black);
  }

  &.outline {
    background-color: transparent;
    border: 2px solid var(--color-white);

    &:hover {
      color: var(--color-black);
      background-color: var(--color-white);
    }
  }

  &.small {
    font-size: 1rem;
    min-height: 2.5rem;
  }

  &.text {
    background-color: transparent;
    border: 2px solid transparent;
  }

  &.block {
    width: 100%;
  }
}

.headline {
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-dark);
}

/* Hero */
.hero {
  display: flex;
  height: 100%;
  min-height: 75vh;
  background-color: var(--color-black);
  position: relative;
  overflow: hidden;

  @media (max-width: 48rem) {
    min-height: 100vh;
  }
}

.hero-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero__header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  align-items: end;
  gap: 2rem;
  padding: 2rem 0;
}

.hero__header-logo {
  min-width: 12rem;
}

.hero__header-action {
  display: flex;
  gap: 0.5rem;

  @media (min-width: 36rem) {
    justify-self: end;
  }
}

.hero__title {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  padding: 2rem 0;

  @media (max-width: 36rem) {
    display: flex;
    flex-direction: column;
    align-items: start;
  }
}

.hero__title-text {
  font-size: clamp(2rem, 5vw, 5rem);
  color: var(--color-white);
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1;
}

.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  animation: scroll-hero linear;
  animation-timeline: scroll(root);
  animation-range: 0 100vh;

  video {
    display: block;
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

@keyframes scroll-hero {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 0;
  }
}

/* Plan */
.plan {
  padding-top: 4rem;
}

.plan__quote {
  font-size: clamp(1rem, 5vw, 2rem);
  font-weight: 500;
  font-family: var(--font-serif);
  border-left: 4px solid var(--color-gray);
  padding: 0 2rem;
  max-width: 70%;
  margin-bottom: 4rem;

  @media (max-width: 36rem) {
    max-width: 100%;
  }
}

.plan__card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr auto;
  gap: 1rem;
  row-gap: 6rem;
  border: 4px solid var(--color-gray);
  border-radius: 1rem;
  padding: 2rem;
  transition: 0.2s;

  &:hover {
    background-color: var(--color-gray);
    transform: rotate(-1deg);
  }

  @media (max-width: 36rem) {
    display: flex;
    flex-direction: column;
    align-items: start;
    row-gap: 2rem;
  }
}

.plan__card-title {
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 1;
  font-weight: 600;
}

.plan__card-price {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: end;

  @media (max-width: 36rem) {
    align-items: start;
  }
}

.plan__card-value {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

/* Services */
.services {
  padding: 4rem 0;
  overflow: hidden;
}

.services-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.services__title {
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-dark);
  margin-bottom: 4rem;
}

.services-carousel {
  overflow: visible !important;
}


.services__card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 4px solid var(--color-gray);
  border-radius: 1rem;
  padding: 2rem;
  min-height: 40rem;
  transition: 0.2s;
  cursor: pointer;

  &:hover {
    background-color: var(--color-dark);
    border: 4px solid var(--color-dark);

    .services__card-text {
      color: var(--color-gray);
    }
  }

  @media (max-width: 36rem) {
    min-height: 20rem;
  }
}

.services__card-item {
  width: 30.33% !important;

  @media (max-width: 64rem) {
    width: 40% !important;
  }

  @media (max-width: 48rem) {
    width: 50% !important;
  }

  @media (max-width: 36rem) {
    width: 85% !important;
  }

  &:nth-child(even) {
    .services__card {
      &:hover {
        transform: scale(1.05) rotate(-1deg);
      }
    }
  }

  &:nth-child(odd) {
    .services__card {
      &:hover {
        transform: scale(1.05) rotate(1deg);
      }
    }
  }
}

.services__card-title {
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 1;
  font-weight: 600;
  word-wrap: break-word;
}

.services__card-text {
  color: var(--color-dark);
  font-size: 1.25rem;
}

.services__card-price {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: auto;
}

.services__card-value {
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 1;
}

.services__modal-inner {
  padding: 2rem 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  height: 100%;
  overflow: auto;
}

.services__modal-title {
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 1.2;
  font-weight: 600;
}

.services__modal-price {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.services__modal-label {
  color: var(--color-light);
}

.services__modal-value {
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 1;
}

.services__modal-content {
  color: var(--color-light);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 5vw, 1.5rem);
}

.services__modal-action {
  padding: 2rem 0;
  position: sticky;
  bottom: 0;
  margin-top: auto;
}


.about-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about__images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2rem;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

.about__images-item {
  border-radius: 1rem;
  overflow: hidden;
}

.about__text {
  font-size: clamp(1rem, 5vw, 2rem);
  font-weight: 500;
  font-family: var(--font-serif);
}

.about__content {
  font-size: clamp(1rem, 5vw, 2rem);
  font-weight: 500;
  font-family: var(--font-serif);

  img {
    display: block;
    border-radius: 1rem;
    max-width: 100%;
    height: auto;
  }
}

.about__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 2rem;
}

.about__cards-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 4px solid var(--color-gray);
  color: var(--color-dark);
  border-radius: 1rem;
  padding: 2rem;
}

.about__cards-title {
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 1.1;
  font-weight: 600;
  word-wrap: break-word;
}

.about__cards-text {
  font-size: 1.25rem;
}

.about__gallery {
  width: 100%;
  position: relative;
}

.about__gallery-item {
  width: 100%;
  overflow: hidden;

  @media (min-width: 48rem) {
    padding: 0 6rem;
  }

  img {
    border-radius: 1rem;
  }
}

.about__gallery-button {
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto;
  width: 4rem;
  height: 4rem;
  z-index: 2;
  cursor: pointer;

  @media (max-width: 48rem) {
    width: 3rem;
    height: 3rem;
  }

  &[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
  }

  &[data-button-prev] {
    left: 0;
    transform: rotate(180deg);

    @media (max-width: 48rem) {
      left: 0.5rem;
    }
  }

  &[data-button-next] {
    right: 0;

    @media (max-width: 48rem) {
      right: 0.5rem;
    }
  }
}

.about__gallery-item {
  width: 100%;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-height: calc(100vh - 10rem);
  }
}

.contacts-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contacts__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100%;
  gap: 1rem;
  border: 4px solid var(--color-gray);
  color: var(--color-dark);
  border-radius: 1rem;
  padding: 2rem;

  @media (max-width: 48rem) {
    display: flex;
    flex-direction: column;
  }
}

.contacts__content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  color: var(--color-white);
  flex-grow: 1;
}

.contacts__content-title {
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 1.1;
  font-weight: 600;
}

.contacts__content-text {
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.contacts__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.marquee {
  display: flex;
  overflow: hidden;
  padding: 2rem 0;
  border-top: 4px solid var(--color-dark);
  border-bottom: 4px solid var(--color-dark);
  margin: 4rem 0;
  transform: rotate(2deg);
}

.marquee__item {
  position: relative;
  font-size: clamp(0.75rem, 5vw, 2rem);
  white-space: nowrap;
  color: var(--color-dark);
  font-weight: 500;
  font-family: var(--font-serif);
  padding-right: 4rem;

  &::after {
    content: '';
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    right: 2rem;
    border-radius: 50%;
    top: 50%;
    background-color: var(--color-dark);
  }
}

.marquee__inner {
  display: flex;
  animation: scroll-marquee linear;
  animation-timeline: scroll(root);
  animation-range: 0 250%;
}

@keyframes scroll-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

/* Hero */
.footer {
  display: flex;
  height: 100%;
  min-height: 75vh;
  background-color: var(--color-black);
  position: relative;
  overflow: hidden;
  margin-top: 6rem;

  @media (max-width: 48rem) {
    min-height: 100vh;
  }
}

.footer-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  width: 100%;
  position: relative;
  z-index: 2;
}

.footer__header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  align-items: end;
  gap: 2rem;
  padding: 2rem 0;
}

.footer__header-logo {
  min-width: 12rem;
}

.footer__header-action {
  display: flex;
  gap: 0.5rem;

  @media (min-width: 36rem) {
    justify-self: end;
  }
}

.footer__title {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  padding: 2rem 0;

  @media (max-width: 36rem) {
    display: flex;
    flex-direction: column;
    align-items: start;
  }
}

.footer__title-text {
  font-size: clamp(2rem, 5vw, 5rem);
  color: var(--color-white);
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1;
}

.footer__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
  animation: scroll-footer linear;
  animation-timeline: scroll(root);
  animation-range: 75% 100%;

  video {
    display: block;
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

@keyframes scroll-footer {
  from {
    opacity: 0;
  }

  to {
    opacity: 0.5;
  }
}

/* Modal */
.modal {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.2);
  color: var(--color-dark);
  top: 0;
  left: 0;
  z-index: 2;
  height: 100%;
  width: 100%;

  &.is-enter {
    background-color: rgba(0, 0, 0, 0);

    .modal-wrapper {
      transform: translateX(100%);
    }
  }


  &.is-leave {
    background-color: rgba(0, 0, 0, 0.2);
    transition: .2s;

    .modal-wrapper {
      transform: translateX(100%);
    }
  }
}

.modal-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  z-index: 1;
  background-color: var(--color-white);
  transform: translateX(0);
  transition: .2s;

  @media (max-width: 48rem) {
    width: 100%;
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--color-white);
  background-color: var(--color-dark);
  width: 4rem;
  height: 4rem;
  padding: 0.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 300;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
}