/* ––––––––––––– HERO –––––––––––– */

section.hero {
  padding-top: calc(var(--section-padding) + var(--header-height));
  position: relative;
  isolation: isolate;
}
section.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  left: -2rem;
  background: linear-gradient(to left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);
  z-index: -1;

  pointer-events: none;
  user-select: none;
}
section.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -2rem;
  background: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 70%, rgba(0, 0, 0, 0.1) 100%);
  z-index: -1;

  pointer-events: none;
  user-select: none;
}

section.hero .secondary {
  border-color: var(--btn-bg);
  background-color: transparent;
  color: var(--btn-bg);
}
@media (hover: hover) {
  section.hero .secondary:hover {
    border-color: var(--btn-bg-hover);
    color: var(--btn-bg-hover);
  }
}
section.hero .secondary:active {
  border-color: var(--btn-bg-active);
  color: var(--btn-bg-active);
}

section.hero {
  background-size: cover;
  background-position: center center;
}

section.hero .container {
  display: grid;
  row-gap: 1rem;
}

section.hero .container .avatar {
  display: flex;
  flex-direction: column;
  width: 100%;
}
section.hero .container .avatar img {
  object-fit: cover;
  object-position: center center;
  aspect-ratio: 1/1;
  border-radius: 50%;
}
section.hero .container .avatar > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;

  justify-self: center;
  align-self: end;
  width: 100%;
  background-color: #00000099;
  border-radius: 10px;
  padding: 6px;
  margin-top: -9%;
}
section.hero .container .avatar > span span {
  display: flex;
  align-items: center;
  color: var(--color-primary);
}
section.hero .container .avatar > span p {
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  color: var(--color-white);
}
section.hero .container .avatar > span a {
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--btn-bg);
  line-height: 1;
  white-space: nowrap;

  transition: color 0.3s var(--ease);
  animation: wiggle 2s infinite var(--ease);
}
@keyframes wiggle {
  0%,
  25%,
  100% {
    transform: translateX(0);
  }
  5%,
  15% {
    transform: translateX(3px);
  }
  10%,
  20% {
    transform: translateX(-3px);
  }
}
@media (hover: hover) {
  section.hero .container .avatar > span a:hover {
    color: var(--btn-bg-hover);
  }
}
section.hero .container .avatar > span a:active {
  color: var(--btn-bg-active);
}

section.hero .container .info {
  margin-left: 1rem;
}
section.hero .container .info .hero-title {
  margin: 0 0 1.25rem;
  letter-spacing: 0.01em;
}

section.hero .container .info .hero-title__service {
  display: block;
  margin-bottom: 0.75rem;

  font-weight: 600;
  color: var(--color-white);
  font-size: var(--text-sm);
  line-height: 18px;
  letter-spacing: 0.01em;
}

section.hero .container .info .hero-title__name {
  display: block;

  font-family: var(--font-playfair);
  font-weight: 500;
  font-size: var(--text-xl);
  color: var(--color-white);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

section.hero .container .info .hero-subtitle {
  font-weight: 500;
  font-size: clamp(0.75rem, 0.662rem + 0.2817vw, 1rem);
  line-height: 1;
  color: var(--color-primary);
  letter-spacing: 0.01em;
}

section.hero .container .location {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
section.hero .container .location span {
  font-weight: 400;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--color-white);
}
section.hero .container .location .btn {
  font-size: var(--text-sm);
}

section.hero .container > .primary {
  font-weight: 500;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--color-secondary);
  justify-self: center;
}

section.hero .container > a {
  justify-self: center;
  display: block;
  width: 100%;
}

/* grid-magic */

section.hero .container .socials,
section.hero .container .location,
section.hero .container > .btn {
  grid-column: span 2;
}

@media screen and (min-width: 640px) {
  section.hero .container {
    row-gap: unset;
    column-gap: 1rem;
    grid-template-rows: repeat(15, 47px);
  }

  section.hero .container .avatar {
    grid-row: 1 / span 8;
    align-items: center;
  }
  section.hero .container .info {
    margin-left: unset;
    grid-row: span 5;
  }
  section.hero .container .info .hero-title {
    position: relative;
    margin-bottom: 2.25rem;
  }

  section.hero .container .info .hero-title::after {
    content: "";
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--btn-bg);
  }

  section.hero .container .info .hero-title__service {
    font-size: var(--text-lg);
  }

  section.hero .container .location {
    grid-column: 2;
  }
  section.hero .container .location span {
    font-size: 14px;
  }

  section.hero .container .socials {
    grid-row: span 2;
  }
}

@media screen and (min-width: 768px) {
  section.hero .container {
    row-gap: unset;
    column-gap: 1rem;
    grid-template-rows: repeat(15, 34px);
  }

  section.hero .container .avatar {
    grid-row: 1 / span 11;
  }

  section.hero .container > .btn {
    --btn-gap: 28px;

    grid-column: 2;
    grid-row: 9;
    width: calc(50% - var(--btn-gap) / 2);
    font-size: 14px;
    padding: 8px;
  }
  section.hero .container > .secondary {
    justify-self: start;
  }
  section.hero .container > .primary {
    justify-self: end;
  }

  section.hero .container .socials {
    grid-column: 1;
    grid-row: unset;
  }
}
@media screen and (min-width: 1024px) {
  section.hero .container .location {
    gap: 2.2rem;
  }
}

@media screen and (min-width: 1280px) {
  section.hero .container {
    column-gap: 12rem;
  }

  section.hero .container .avatar {
    grid-row: 1 / span 12;
  }
  section.hero .container .avatar > span {
    gap: 1rem;
  }
  section.hero .container .avatar > span p {
    font-size: 1rem;
  }
  section.hero .container .avatar > span a {
    font-size: 14px;
  }
  section.hero .container .avatar > span span svg {
    width: 30px;
    height: 30px;
  }

  section.hero .container .info {
    grid-row: span 7;
  }
  section.hero .container .info .hero-title__name {
    font-size: var(--text-2xl);
  }

  section.hero .container > .btn {
    grid-row: 11;
  }
}

/* ––––––––––––– ABOUT –––––––––––– */

section.about {
  background-size: cover;
  background-position: center center;
  position: relative;
  isolation: isolate;
}
section.about::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0) 0%, #02192d 120%);
  z-index: -1;
}
section.about::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0.1) 100%);
  z-index: -1;
}

section.about .container {
  display: grid;
  gap: 3rem;
  justify-items: center;
}
section.about .container > img {
  object-fit: cover;
  object-position: center center;
  width: 50%;
  min-width: 184px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  border: 5px solid var(--color-primary);
}

section.about .container > div .title {
  font-weight: 400;
  font-size: clamp(2.25rem, 1.7692rem + 1.5385vw, 3rem);
  color: var(--color-white);
  line-height: 1;
  letter-spacing: unset;
}
section.about .container > div > p {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1;
  max-width: 80%;
  letter-spacing: 0;
  color: var(--color-white);
}
section.about .container > div > p span {
  color: var(--color-primary);
}
section.about .container > div ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  color: var(--color-white);
  margin-block: 35px;
}
section.about .container > div ul li {
  display: flex;
  align-items: center;
  gap: 7px;
}
section.about .container > div ul li p {
  font-weight: 400;
  font-size: clamp(0.75rem, 0.5897rem + 0.5128vw, 1.4rem);
  line-height: 1.2;
}
section.about .container > div .btn {
  display: block;
  width: 100%;
}

@media screen and (min-width: 768px) {
  section.about .container {
    grid-template-columns: 1fr 0.6fr;
  }
  section.about .container > img {
    width: 100%;
    grid-column: 2;
  }
  section.about .container > * {
    grid-row: 1;
  }

  section.about .container > div > p {
    margin-top: 3rem;
  }
}

@media screen and (min-width: 1280px) {
  section.about .container > div .btn {
    width: fit-content;
  }
}

/* –––––––––––––– STATS –––––––––––– */

section.stats {
  padding-bottom: 0;
}
section.stats ul {
  display: grid;
  justify-items: center;
  gap: 1rem;

  background-color: var(--color-secondary);
  border-radius: 6px;
  transform: translateY(2rem);
  color: var(--color-white);
  padding: 18px 10px;
}
section.stats ul li {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: span 2;
  align-items: center;
  gap: 0.5rem;
  padding-block: 18px;

  position: relative;
}
section.stats ul li::after {
  content: "";
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;

  display: block;
  width: 100%;
  height: 1px;

  background-color: var(--color-white);
}
section.stats ul li:last-child::after {
  content: none;
}
section.stats ul li > span {
  justify-self: end;
  display: flex;
  color: var(--color-primary);
  font-size: 4rem;
  font-weight: 300;
}
section.stats ul li p {
  font-size: 1.2rem;
}
section.stats ul li p span {
  display: block;
  font-size: 2.25rem;
  text-transform: uppercase;
}

@media screen and (min-width: 768px) {
  section.stats ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-items: unset;
  }
  section.stats ul li::after {
    top: 0;
    left: unset;
    right: -0.5rem;
    width: 1px;
    height: 100%;
  }
  section.stats ul li {
    grid-template-columns: auto 1fr;
    grid-column: unset;
  }

  section.stats ul li > span {
    justify-self: unset;
    font-size: 3rem;
  }
  section.stats ul li p {
    font-size: 0.8125rem;
  }
  section.stats ul li p span {
    font-size: 1.5625rem;
  }
}
@media screen and (min-width: 1280px) {
  section.stats ul li > span {
    font-size: 5.6rem;
  }
  section.stats ul li p {
    font-size: 1.2rem;
  }
  section.stats ul li p span {
    font-size: 2.25rem;
  }
}

/* –––––––––––––– REVIEWS –––––––––––– */

section.reviews {
  padding-top: calc(var(--section-padding) + 2rem);
  background-color: #f5f5f5;
}

section.reviews .container .swiper-container {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 2rem;
  width: 100%;
}
section.reviews .container .swiper-container .swiper-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  grid-row: -1;
}
section.reviews .container .swiper-container .swiper-navigation svg {
  width: 40px;
  height: 40px;
}
section.reviews .container .swiper-container .swiper {
  width: 100%;
  margin-top: 2rem;
}

section.reviews .container .swiper-slide {
  cursor: pointer;
  padding: 12px;
  border-radius: 15px;
  background-color: var(--color-white);
}
section.reviews .container .swiper-slide > span {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 20px;
}
section.reviews .container .swiper-slide span svg {
  width: 35px;
  height: 35px;
  color: var(--color-primary);
}
section.reviews .container .swiper-slide > p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
  text-overflow: ellipsis;

  font-weight: 400;
  font-size: var(--text-base);
  color: var(--color-secondary);
  line-height: 1.4;
  letter-spacing: 0.01em;
}
section.reviews .container .swiper-slide .author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
section.reviews .container .swiper-slide .author img {
  border-radius: 50%;
  aspect-ratio: 1/1;
  width: 40px;
  height: 40px;
  object-fit: cover;
  object-position: center;
}
section.reviews .container .swiper-slide .author span {
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--color-secondary);
}
section.reviews .container .swiper-slide .author p {
  font-weight: 400;
  font-size: clamp(0.59375rem, 0.4936rem + 0.3205vw, 0.75rem);
  line-height: 1.4;
  color: var(--color-secondary);
}

@media screen and (min-width: 768px) {
  section.reviews .container .swiper-container .swiper-navigation {
    grid-row: unset;
    justify-content: end;
  }
}

/* –––––––––––––– BLOG –––––––––––– */

section.blog ul {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}
section.blog ul li {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  row-gap: 1rem;
}

section.blog ul li:nth-child(n + 4) {
  display: none;
}

section.blog .btn {
  margin-top: 3rem;
  width: 100%;
}

@media screen and (min-width: 640px) {
  section.blog ul {
    grid-template-columns: repeat(auto-fill, minmax(min(275px, 100%), 1fr));
  }
  section.blog ul li:nth-child(n + 4) {
    display: grid;
  }
}
@media screen and (min-width: 1024px) {
  section.blog ul {
    grid-template-columns: repeat(3, minmax(min(375px, 100%), 1fr));
  }
}

/* –––––––––––– CONTACTS –––––––––––– */

section.contacts {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

section.contacts .container .title {
  color: var(--color-white);
}

section.contacts .container > div {
  display: grid;
  gap: 3rem;
}
section.contacts .container > div .info {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
section.contacts .container > div .info > div {
  display: flex;
  gap: 20px;
  align-items: center;
}
section.contacts .container > div .info > div div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
section.contacts .container > div .info > div div span {
  font-weight: 600;
  font-size: clamp(1.25rem, 1.0897rem + 0.5128vw, 1.5rem);
  line-height: 1;
  margin-bottom: 20px;
}
section.contacts .container > div .info > div div ul {
  display: grid;
  gap: 8px;
}
section.contacts .container > div .info > div div ul li {
  font-size: var(--text-base);
}
section.contacts .container > div .info > div div ul li span {
  font-size: var(--text-base);
  font-weight: 700;
}

section.contacts .container > div .info > div div a {
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1;
  color: var(--color-white);
  transition: color 0.3s var(--ease);
}
@media (hover: hover) {
  section.contacts .container > div .info > div div a:hover {
    color: var(--btn-bg-hover);
  }
}
section.contacts .container > div .info > div div a:active {
  color: var(--btn-bg-active);
}

section.contacts .container > div .info .socials-container {
  display: grid;
  gap: 1rem;
}
section.contacts .container > div .info .socials-container > span {
  font-weight: 600;
  font-size: clamp(1.25rem, 1.0897rem + 0.5128vw, 1.5rem);
  line-height: 1;
}
section.contacts .container > div .info .socials-container .socials {
  justify-content: start;
}

section.contacts .container > div .form {
  display: flex;
  gap: 20px;
  flex-direction: column;
  align-self: center;
}
section.contacts .container > div .form h3 {
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  color: var(--color-white);
}
section.contacts .container > div .form p {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.2;
  color: var(--color-white);
}

section.contacts .container > div .form form {
  display: grid;
  gap: 20px;
}
section.contacts .container > div .form form input,
section.contacts .container > div .form form textarea {
  font-weight: 500;
  font-size: var(--text-base);
  line-height: 1;
  color: var(--color-white);

  border: 1px solid var(--color-white);
  border-radius: 10px;
  background-color: transparent;
  padding: 12px 8px;

  transition: 0.3s var(--ease);
}
section.contacts .container > div .form form .checkbox-consent label {
  line-height: 1;
  align-items: unset;
}
section.contacts .container > div .form form .checkbox-consent .checkbox {
  width: 20px;
  height: 20px;
  background-color: var(--btn-bg);
  border: 1px solid var(--btn-bg);
}
section.contacts .container > div .form form .checkbox-consent .checkbox::before,
section.contacts .container > div .form form .checkbox-consent .checkbox::after {
  background-color: var(--color-secondary);
}

section.contacts .container > div .form form .btn {
  width: 100%;
}

@media screen and (min-width: 768px) {
  section.contacts .container > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* –––––––––––– LOCATION –––––––––––– */

section.location > div a {
  display: none;
  font-size: var(--text-lg);
  font-weight: 600;
  text-align: end;
  width: fit-content;
  text-wrap: balance;
  transition: color 0.3s var(--ease);
}
@media (hover: hover) {
  section.location > div a:hover {
    color: var(--hover-primary);
  }
}
section.location > div a:active {
  color: var(--active-primary);
}
section.location .title {
  text-align: center;
}
section.location .title::before,
section.location .title::after {
  content: none;
}

section.location picture {
  margin-top: 2rem;
}
section.location picture img {
  width: 100%;
}

@media screen and (min-width: 640px) {
  section.location > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  section.location > div a {
    display: block;
  }
}
