@font-face {
  font-family: "MATCHBOX Local";
  src: url("../assets/fonts/MATCHBOX.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.profile-page {
  overflow-x: hidden;
}

.profile-main {
  background: var(--page-bg);
  color: var(--page-text);
}

.profile-hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 88px);
  overflow: hidden;
  color: #F2EFE7;
}

.profile-hero__media {
  position: absolute;
  z-index: -2;
  inset: 0;
}

.profile-hero__media img,
.profile-hero__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

.profile-hero__media img {
  --profile-photo-blur: 0px;
  filter: blur(var(--profile-photo-blur));
  transform: scale(1.01);
  transform-origin: center;
  will-change: filter;
}

.profile-hero__line {
  position: absolute;
  z-index: -1;
  background: rgba(242, 239, 231, 0.2);
  pointer-events: none;
}

.profile-hero__line--vertical {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.profile-hero__line--horizontal {
  right: 0;
  bottom: 25%;
  left: 0;
  height: 1px;
}

.profile-hero__name,
.profile-hero__discipline,
.profile-hero__intro {
  position: absolute;
  z-index: 1;
  margin: 0;
}

.profile-hero__name,
.profile-hero__discipline {
  top: clamp(28px, 4vw, 62px);
  font-size: clamp(9px, 0.8vw, 12px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.profile-hero__name {
  left: clamp(24px, 4vw, 64px);
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  color: #160909;
}

.profile-hero__discipline {
  right: clamp(24px, 4vw, 64px);
  text-align: right;
  white-space: nowrap;
}

.profile-hero__discipline span {
  display: inline-block;
  margin-inline: .25em;
  line-height: 1;
  transform: translateY(1px);
}

.profile-hero__intro {
  top: 34%;
  left: clamp(24px, 7vw, 108px);
  width: min(31vw, 440px);
  min-height: 4.05em;
  color: #160909;
  font-family: "MATCHBOX Local";
  font-size: clamp(19px, 1.86vw, 28px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.profile-typewriter__static,
.profile-typewriter__line {
  display: block;
}

.profile-typewriter__static {
  font-size: 1.125em;
  font-weight: 700;
}

.profile-typewriter__line {
  display: flex;
  width: 16ch;
  align-items: baseline;
  margin-top: 0.18em;
  white-space: nowrap;
}

.profile-typewriter__word {
  display: inline-block;
  font-size: 1.54em;
  font-weight: 400;
  line-height: 0.98;
}

.profile-typewriter__cursor {
  display: inline-block;
  margin-left: 0.08em;
  color: var(--accent-ink);
  font-weight: 300;
  animation: profile-cursor-blink 1200ms steps(1, end) infinite;
}

@keyframes profile-cursor-blink {
  0%, 46% { opacity: 1; }
  47%, 100% { opacity: 0; }
}

.profile-hero__title {
  position: absolute;
  z-index: 1;
  bottom: clamp(22px, 4vw, 64px);
  left: clamp(20px, 3.5vw, 54px);
  margin: 0;
  color: #F2EFE7;
  font-size: clamp(88px, 16vw, 250px);
  font-weight: 700;
  line-height: 0.72;
  letter-spacing: -0.075em;
  white-space: nowrap;
}

.profile-estimate-link {
  width: 100%;
  margin: 22px 0 0;
  font-family: inherit;
  cursor: pointer;
  border-color: #080505;
  border-radius: 0;
  background: #1F1414;
  color: #F2EFE7;
  box-shadow: 0 3px 0 rgba(8, 5, 5, 0.28), 0 8px 18px rgba(8, 5, 5, 0.12);
}

html[data-theme="dark"] .profile-estimate-link {
  border-color: #050303;
  background: #171111;
}

.profile-estimate-link:hover,
.profile-estimate-link:focus-visible,
html[data-theme="dark"] .profile-estimate-link:hover,
html[data-theme="dark"] .profile-estimate-link:focus-visible {
  border-color: #050303;
  background: #211717;
  color: #F2EFE7;
  transform: translateY(-1px);
}

.profile-estimate-link .estimate-link__marker {
  width: 14px;
  height: 14px;
  color: transparent;
  font-size: 0;
  opacity: 0.72;
}

.profile-estimate-link .estimate-link__marker--tl {
  border-top: 1px solid #F2EFE7;
  border-left: 1px solid #F2EFE7;
}

.profile-estimate-link .estimate-link__marker--tr {
  border-top: 1px solid #F2EFE7;
  border-right: 1px solid #F2EFE7;
}

.profile-estimate-link .estimate-link__marker--bl {
  border-bottom: 1px solid #F2EFE7;
  border-left: 1px solid #F2EFE7;
}

.profile-estimate-link .estimate-link__marker--br {
  border-right: 1px solid #F2EFE7;
  border-bottom: 1px solid #F2EFE7;
}

.profile-narrative {
  position: relative;
  min-height: 94svh;
  overflow: hidden;
  background: #F2EFE7;
  color: #0E0B0B;
}

.profile-narrative__item {
  --profile-narrative-column: min(25vw, 350px);
  --profile-narrative-x: 0vw;
  position: absolute;
  width: var(--profile-narrative-column);
  translate: var(--profile-narrative-x) 0;
  will-change: translate, opacity;
}

.profile-narrative__item--history {
  --profile-narrative-label-width: calc(var(--profile-narrative-column) + 7vw);
  top: 12%;
  right: 7%;
}

.profile-narrative__item--mission {
  --profile-narrative-label-width: calc(50vw + min(12.5vw, 175px));
  top: 43%;
  left: 50%;
  transform: translateX(-50%);
}

.profile-narrative__item--task {
  --profile-narrative-label-width: 93vw;
  top: 73%;
  left: 7%;
}

.profile-narrative__label {
  position: relative;
  display: inline-flex;
  width: var(--profile-narrative-label-width);
  height: 38px;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 18px;
  padding: 8px 16px;
  border: 1px solid #0E0B0B;
  background: #0E0B0B;
  color: #F2EFE7;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
}

.profile-narrative__label > span {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: var(--profile-narrative-column);
  height: 100%;
  align-items: center;
  justify-content: center;
}

.profile-narrative__item p {
  margin: 0;
  color: #0E0B0B;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.005em;
}

.profile-narrative__corner {
  position: absolute;
  width: 8px;
  height: 8px;
  opacity: 0.72;
}

.profile-narrative__corner--tl {
  top: 4px;
  left: 4px;
  border-top: 1px solid #F2EFE7;
  border-left: 1px solid #F2EFE7;
}

.profile-narrative__corner--tr {
  top: 4px;
  right: 4px;
  border-top: 1px solid #F2EFE7;
  border-right: 1px solid #F2EFE7;
}

.profile-narrative__corner--bl {
  bottom: 4px;
  left: 4px;
  border-bottom: 1px solid #F2EFE7;
  border-left: 1px solid #F2EFE7;
}

.profile-narrative__corner--br {
  right: 4px;
  bottom: 4px;
  border-right: 1px solid #F2EFE7;
  border-bottom: 1px solid #F2EFE7;
}

.profile-services {
  position: relative;
  height: 400svh;
  background: #0E0B0B;
}

.profile-services__pin {
  width: 100%;
  height: 100svh;
  overflow: hidden;
}

.profile-services__stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0E0B0B;
}

.profile-service-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0E0B0B;
  color: #F2EFE7;
  transform-origin: 50% 0%;
  will-change: transform, border-radius;
}

.profile-service-card::after {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(to top, rgba(14, 11, 11, 0.62), transparent);
  content: "";
  pointer-events: none;
}

.profile-service-card picture {
  position: absolute;
  inset: 0;
  display: block;
}

.profile-service-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-service-card__link {
  position: absolute;
  z-index: 3;
  right: clamp(24px, 4vw, 64px);
  bottom: clamp(190px, 27vh, 260px);
  display: inline-flex;
  min-width: 140px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid rgba(242, 239, 231, .8);
  background: rgba(14, 11, 11, .28);
  color: #F2EFE7;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 220ms ease, background-color 220ms ease;
}
.profile-service-card__link:hover,
.profile-service-card__link:focus-visible { border-color: #F2EFE7; background: rgba(14, 11, 11, .68); }
.profile-service-card__link:focus-visible { outline: 2px solid #F2EFE7; outline-offset: 3px; }

.profile-service-card__link--request {
  bottom: clamp(32px, 5vw, 76px);
}

.profile-service-card__link--primary {
  position: static;
  min-width: clamp(240px, 21vw, 360px);
  min-height: clamp(70px, 6vw, 88px);
  padding-inline: clamp(28px, 3vw, 46px);
  border-radius: 0;
  background: rgba(14, 11, 11, .38);
  font-size: clamp(14px, 1.2vw, 18px);
}

.profile-service-card__link--primary:hover,
.profile-service-card__link--primary:focus-visible {
  background: #F2EFE7;
  color: #0E0B0B;
}

@media (min-width: 769px) {
  .profile-service-card__meta--cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(24px, 4vw, 64px);
    align-items: center;
  }

  .profile-service-card__meta--cta > span {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  #yandex-direct .profile-service-card__link {
    bottom: calc(clamp(190px, 27vh, 260px) - 80px);
    min-width: 260px;
    min-height: 66px;
    padding-inline: 32px;
    font-size: 16px;
  }
}

.profile-service-card__meta {
  position: absolute;
  z-index: 2;
  right: clamp(24px, 4vw, 64px);
  bottom: clamp(32px, 5vw, 76px);
  left: clamp(24px, 4vw, 64px);
  color: #F2EFE7;
}

.profile-service-card__meta span {
  display: block;
  margin-bottom: clamp(14px, 1.8vw, 26px);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.14em;
}

.profile-service-card__meta h2 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(48px, 7vw, 112px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.065em;
}

.profile-service-card__description {
  position: absolute;
  z-index: 2;
  width: min(32vw, 460px);
  margin: 0;
  color: #F2EFE7;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 12px rgba(14, 11, 11, 0.48);
}

.profile-service-card:nth-child(-n + 2) .profile-service-card__description {
  top: 50%;
  left: clamp(24px, 4vw, 64px);
  translate: 0 -50%;
}

.profile-service-card:nth-child(n + 3) .profile-service-card__description {
  top: clamp(92px, 13vh, 142px);
  right: clamp(28px, 5vw, 76px);
}

@media (max-width: 767px) {
  .profile-hero {
    min-height: calc(100svh - 88px);
  }

  .profile-hero__media img,
  .profile-hero__media video {
    object-position: 53% center;
  }

  .profile-hero__name,
  .profile-hero__discipline {
    top: 24px;
    font-size: 8px;
  }

  .profile-hero__name {
    left: 18px;
  }

  .profile-hero__discipline {
    top: 54px;
    right: 18px;
  }

  .profile-hero__intro {
    top: auto;
    bottom: 30%;
    left: 18px;
    width: calc(100% - 36px);
    color: #F2EFE7;
    font-size: 18px;
  }

  .profile-hero__title {
    bottom: 24px;
    left: 14px;
    font-size: clamp(68px, 23vw, 96px);
  }

  .profile-hero__line--vertical {
    left: 50%;
  }

  .profile-narrative {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 56px;
    padding: 88px 20px 104px;
  }

  .profile-narrative__item {
    --profile-narrative-column: min(78vw, 330px);
    --profile-narrative-label-width: var(--profile-narrative-column);
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: var(--profile-narrative-column);
    transform: none;
  }

  .profile-narrative__item--history {
    align-self: flex-end;
  }

  .profile-narrative__item--mission {
    align-self: center;
  }

  .profile-narrative__item--task {
    align-self: flex-start;
  }

  .profile-narrative__label {
    display: flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .profile-narrative__label > span {
    position: static;
    width: auto;
    height: auto;
  }

  .profile-narrative__item p {
    font-size: 11px;
  }

  .profile-services {
    height: auto;
    background: var(--page-bg);
  }

  .profile-services__pin,
  .profile-services__stage {
    height: auto;
    overflow: visible;
  }

  .profile-services__stage {
    display: grid;
    gap: 10px;
  }

  .profile-service-card {
    position: relative;
    inset: auto;
    height: 72svh;
    min-height: 490px;
    border-radius: 18px;
    transform: none !important;
  }

  .profile-service-card::after {
    inset: 0;
    height: auto;
    background: linear-gradient(to bottom, rgba(14, 11, 11, .35) 0%, rgba(14, 11, 11, .05) 30%, rgba(14, 11, 11, .05) 65%, rgba(14, 11, 11, .55) 100%);
  }

  .profile-service-card__meta > span {
    display: none;
  }

  .profile-service-card__meta h2 {
    font-size: clamp(30.4px, 9.44vw, 49.6px);
  }

  #yandex-direct .profile-service-card__meta {
    bottom: 98px;
  }

  #yandex-direct .profile-service-card__meta h2 {
    max-width: none;
  }

  #yandex-direct .profile-service-card__link {
    right: 20px;
    bottom: 20px;
    width: calc(100% - 40px);
    min-width: 0;
    min-height: 56px;
    padding-inline: 18px;
    border-radius: 0;
    font-size: 12px;
  }

  #yandex-direct .profile-service-card__link span {
    display: none;
  }

  .profile-service-card__meta--cta {
    display: grid;
    bottom: 20px;
    gap: 16px;
  }

  .profile-service-card__link--primary {
    width: 100%;
    min-width: 0;
    min-height: 56px;
    padding-inline: 18px;
    font-size: 12px;
  }

  .profile-service-card__description,
  .profile-service-card:nth-child(-n + 2) .profile-service-card__description,
  .profile-service-card:nth-child(n + 3) .profile-service-card__description {
    top: 60px;
    right: 24px;
    left: 24px;
    width: auto;
    translate: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .profile-typewriter__cursor {
    animation: none;
  }

  .profile-services {
    height: auto;
  }

  .profile-services__pin,
  .profile-services__stage {
    height: auto;
    overflow: visible;
  }

  .profile-services__stage {
    display: grid;
    gap: 10px;
  }

  .profile-service-card {
    position: relative;
    inset: auto;
    height: 88svh;
    transform: none !important;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .profile-service-card {
    height: 72svh;
    min-height: 490px;
  }
}
