:root {
  --page-bg: #edf1f6;
  --text: #31405a;
  --muted: #7f8ba0;
  --line: rgba(49, 64, 90, 0.34);
  --max-width: 1540px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Manrope", Arial, sans-serif;
}

/* ===== Первый экран ===== */

.hero {
  width: min(100%, var(--max-width));
  min-height: 100svh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(420px, 42%) minmax(0, 58%);
  overflow: hidden;
  background: var(--page-bg);
}

.hero__copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 76px 24px 76px clamp(42px, 7vw, 120px);
}

.hero__eyebrow {
  margin: 0 0 34px;
  font-size: clamp(12px, 1.05vw, 16px);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__name {
  position: relative;
  z-index: 4;
  margin: 0;
  width: max-content;
  max-width: calc(100vw - 48px);
  transform: translateX(0);
  font-family: "PT Serif", Georgia, serif;
  font-size: clamp(64px, 6.2vw, 102px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.015em;
  color: var(--text);
}

.hero__name span {
  display: block;
}

.hero__name span:last-child {
  margin-right: -92px;
}

.hero__contact {
  margin-top: 50px;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: border-color 160ms ease, opacity 160ms ease;
}

.hero__contact:hover,
.hero__contact:focus-visible {
  border-color: currentColor;
  opacity: 0.72;
}

.hero__visual {
  position: relative;
  min-width: 0;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 22%;
  display: block;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(18, 28, 42, 0.42) 0%,
    rgba(18, 28, 42, 0.16) 17%,
    rgba(18, 28, 42, 0.00) 38%
  );
  pointer-events: none;
}

.hero__caption {
  position: absolute;
  z-index: 2;
  left: clamp(28px, 3vw, 48px);
  bottom: clamp(28px, 3vw, 48px);
  width: min(470px, calc(100% - 56px));
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 1.55vw, 25px);
  font-weight: 400;
  line-height: 1.42;
  text-wrap: balance;
}

/* ===== Второй блок: с чем можно обратиться ===== */

.cases {
  min-height: auto;
  padding: 46px 0 30px;
  background: var(--page-bg);
}

.cases__heading {
  width: min(1260px, calc(100% - 48px));
  margin: 0 auto 18px;
}

.cases__eyebrow {
  margin-bottom: 4px;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.cases__title {
  margin: 0;
  font-family: "PT Serif", Georgia, serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text);
}

.cases__carousel-shell {
  width: min(980px, calc(100% - 48px));
  height: 400px;
  margin: 0 auto;
  position: relative;
}

.cases__carousel {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y proximity;
  scrollbar-width: none;
  padding: 60px 18px;
}

.cases__carousel::-webkit-scrollbar {
  display: none;
}

.cases__item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 22px;
  align-items: start;
  scroll-snap-align: center;
  padding: 26px 10px 28px;
  border-bottom: 1px solid rgba(49, 64, 90, 0.20);
  opacity: 0.24;
  transform: scale(0.985);
  transform-origin: left center;
  transition: opacity 1.5s ease 0.15s, transform 1.5s ease 0.15s;
}

.cases__item:first-child {
  border-top: 1px solid rgba(49, 64, 90, 0.20);
}

.cases__item.active {
  opacity: 1;
  transform: scale(1);
}

.cases__num {
  padding-top: 7px;
  font-size: 13px;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.cases__copy h3 {
  margin: 0 0 8px;
  font-family: "PT Serif", Georgia, serif;
  font-size: clamp(28px, 2.8vw, 44px);
  font-weight: 400;
  line-height: 1.08;
}

.cases__copy p {
  max-width: 720px;
  margin: 0;
  color: #5b687b;
  font-size: 17px;
  line-height: 1.52;
}

.cases__marker {
  position: absolute;
  z-index: 3;
  left: -8px;
  top: 50%;
  width: 3px;
  height: 74px;
  transform: translateY(-50%);
  background: var(--text);
}

.cases__hint {
  position: absolute;
  right: 8px;
  bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

/* ===== Контакты: временный блок из исходного сайта ===== */

.contact {
  width: min(100% - 48px, 900px);
  margin: 0 auto;
  padding: 72px 0 96px;
  font-size: 17px;
  line-height: 1.6;
}

.contact p {
  margin: 0;
}

/* ===== Адаптация ===== */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__copy {
    padding: 52px 24px 36px;
  }

  .hero__name {
    font-size: clamp(54px, 11vw, 78px);
  }

  .hero__name span:last-child {
    margin-right: 0;
  }

  .hero__contact {
    margin-top: 32px;
    font-size: 16px;
  }

  .hero__visual {
    min-height: min(72svh, 760px);
  }

  .hero__photo {
    object-position: 50% 42%;
  }

  .hero__caption {
    left: 24px;
    bottom: 24px;
    width: min(420px, calc(100% - 48px));
    font-size: clamp(17px, 4.6vw, 22px);
  }
}

@media (max-width: 700px) {
  .cases {
    min-height: auto;
    padding: 38px 0 46px;
  }

  .cases__heading {
    width: calc(100% - 30px);
  }

  .cases__title {
    font-size: clamp(36px, 10vw, 48px);
  }

  .cases__carousel-shell {
    width: calc(100% - 30px);
    height: 420px;
  }

  .cases__carousel {
    padding: 60px 6px;
  }

  .cases__item {
    grid-template-columns: 34px 1fr;
    gap: 12px;
    padding: 20px 0 22px;
  }

  .cases__copy h3 {
    font-size: clamp(25px, 7vw, 34px);
  }

  .cases__copy p {
    font-size: 16px;
  }

  .cases__marker {
    left: -7px;
  }
}

@media (max-width: 560px) {
  .hero__copy {
    padding-top: 40px;
  }

  .hero__eyebrow {
    margin-bottom: 24px;
    font-size: 12px;
  }

  .hero__name {
    font-size: clamp(48px, 15vw, 66px);
    line-height: 0.95;
  }

  .hero__visual {
    min-height: 62svh;
  }

  .hero__caption {
    font-size: 17px;
    line-height: 1.45;
  }

  .cases__eyebrow {
    font-size: 12px;
  }
}


/* ===== Третий блок: как я работаю ===== */

.work {
  min-height: 100svh;
  padding: 28px 24px 40px;
  background: var(--page-bg);
}

.work__inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.work__title {
  margin: 0 0 56px;
  font-family: "PT Serif", Georgia, serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text);
}

.work__flow {
  display: grid;
  gap: 0;
}

.work__item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.work__item + .work__item {
  margin-top: -40px;
}

.work__item:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) 220px;
}

.work__item:nth-child(even) .work__photo-wrap {
  order: 2;
}

.work__item:nth-child(even) .work__copy {
  order: 1;
  text-align: right;
}

.work__item:nth-child(4) .work__copy h3 {
  text-align: left;
  margin-left: 262px;
}

.work__photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.work__photo {
  width: 190px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  box-shadow: 0 0 0 1px rgba(49, 64, 90, 0.08);
}

.work__caption {
  max-width: 190px;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.work__copy {
  padding: 6px 0 8px;
  position: relative;
}

.work__copy::before {
  content: "";
  position: absolute;
  top: -16px;
  width: 72px;
  height: 1px;
  background: #CBD3DC;
}

.work__item:nth-child(odd) .work__copy::before {
  left: 0;
}

.work__item:nth-child(even) .work__copy::before {
  right: 0;
}

.work__copy h3 {
  margin: 0 0 7px;
  font-family: "PT Serif", Georgia, serif;
  font-size: clamp(25px, 2.6vw, 36px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--text);
}

.work__copy p {
  margin: 0;
  max-width: 760px;
  font-size: 16px;
  line-height: 1.4;
  color: #586579;
}

.work__item:nth-child(even) .work__copy p {
  margin-left: auto;
}

@media (max-width: 760px) {
  .work {
    min-height: auto;
    padding: 28px 24px 40px;
  }

  .work__title {
    margin-bottom: 42px;
    font-size: 44px;
  }

  .work__flow {
    gap: 42px;
  }

  .work__item,
  .work__item:nth-child(even) {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }

  .work__item + .work__item {
    margin-top: -40px;
  }

  .work__item:nth-child(even) .work__photo-wrap,
  .work__item:nth-child(even) .work__copy {
    order: initial;
  }

  .work__item:nth-child(even) .work__copy {
    text-align: left;
  }

  .work__item:nth-child(4) .work__copy h3 {
    text-align: left;
    margin-left: 0;
  }

  .work__photo {
    width: 92px;
  }

  .work__caption {
    max-width: 100px;
    font-size: 11px;
  }

  .work__copy::before,
  .work__item:nth-child(even) .work__copy::before {
    left: 0;
    right: auto;
  }

  .work__copy h3 {
    font-size: 29px;
  }

  .work__copy p {
    font-size: 16px;
    line-height: 1.5;
  }
}


/* ===== Обо мне / Условия работы ===== */

.info-pair {
  padding: 54px 24px 66px;
  background: var(--page-bg);
}

.info-pair__inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.info-pair__column {
  min-width: 0;
  padding: 0 58px 4px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.info-pair__column + .info-pair__column {
  border-left: 1px solid var(--line);
  padding-left: 58px;
  padding-right: 0;
}

.info-pair__title {
  margin: 0 0 24px;
  font-family: "PT Serif", Georgia, serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text);
}

.info-pair__text {
  max-width: 470px;
  color: #586579;
  font-size: 17px;
  line-height: 1.5;
}

.info-pair__text p {
  margin: 0 0 10px;
}

.info-pair__text strong {
  color: var(--text);
  font-weight: 500;
}

.info-pair__conditions p {
  margin-bottom: 7px;
}

.info-pair__link {
  margin-top: 24px;
  padding-bottom: 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 160ms ease, opacity 160ms ease;
}

.info-pair__link:hover,
.info-pair__link:focus-visible {
  border-color: currentColor;
  opacity: 0.72;
}

@media (max-width: 760px) {
  .info-pair {
    padding: 40px 18px 48px;
  }

  .info-pair__inner {
    grid-template-columns: 1fr;
  }

  .info-pair__column {
    padding: 0 0 38px;
  }

  .info-pair__column + .info-pair__column {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 38px 0 0;
  }

  .info-pair__title {
    margin-bottom: 18px;
    font-size: 44px;
  }

  .info-pair__text {
    max-width: none;
    font-size: 16px;
  }

  .info-pair__link {
    margin-top: 18px;
    font-size: 16px;
  }
}
