@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/CormorantGaramond-Italic.ttf") format("truetype");
}

/* Изолированные стили блока цитаты. */
.test-block { padding: clamp(24px, 3vw, 48px) 0; scroll-margin-top: 115px; }
.test-block ~ #projects-activities { padding-top: 0; }
.test-block__card {
  --quote-card-padding: 18px;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: clamp(24px, 4vw, 72px);
  margin: 0;
  padding: var(--quote-card-padding);
  min-height: 460px;
  overflow: hidden;
  background: #103b50;
  border-radius: 45px;
}
.test-block__visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
}
.test-block__background {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.test-block__background--mobile { display: none; }
.test-block__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/eurasia-ornament-tile.svg") 0 0 / 193.5px 193.5px repeat;
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, .8) 36%, rgba(0, 0, 0, .48) 41%, rgba(0, 0, 0, .8) 47%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, .8) 36%, rgba(0, 0, 0, .48) 41%, rgba(0, 0, 0, .8) 47%);
}
.test-block__copy {
  position: relative;
  z-index: 4;
  container-type: inline-size;
  display: grid;
  grid-template-rows: 21px auto minmax(60px, 1fr);
  align-self: stretch;
  margin: 0;
  min-width: 0;
  padding: 32px 0 32px clamp(20px, 3.2vw, 56px);
}
.test-block__quote {
  position: relative;
  grid-row: 2;
  margin: 0 0 0 26px;
  width: calc(100% + clamp(20px, 3.8vw, 64px) - 26px);
  max-width: 1014px;
  color: #f8f3e5;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(24px, 4.1cqw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
  word-spacing: normal;
  font-variant-ligatures: normal;
  font-synthesis: none;
  text-wrap: wrap;
}
.test-block__quote p { margin: 0; padding-right: 16px; text-wrap: wrap; text-align: justify; }
.test-block__quote-line { display: inline; white-space: normal; }
.test-block__quote-frame {
  position: absolute;
  inset: -30px -10px -22px -26px;
  color: #d8c18c;
  pointer-events: none;
}
.test-block__frame-line { position: absolute; display: block; background: currentColor; opacity: .8; }
.test-block__frame-line--top { top: 0; left: 94px; right: -12px; height: 1px; }
.test-block__frame-line--right { top: -12px; right: 0; bottom: 50px; width: 1px; }
.test-block__frame-line--bottom { bottom: 0; left: -12px; right: 94px; height: 1px; }
.test-block__frame-line--left { top: 50px; left: 0; bottom: -12px; width: 1px; }
.test-block__frame-mark { position: absolute; display: block; width: 38px; height: 31px; }
.test-block__frame-mark--open { left: 0; top: -7px; }
.test-block__frame-mark--close { right: 0; bottom: -7px; transform: rotate(180deg); }
.test-block__author {
  grid-row: 3;
  align-self: end;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  color: #bfd1d8;
  font-family: "Montserrat", Tahoma, Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}
.test-block__author-info { display: grid; gap: 6px; transform: translateY(4px); }
.test-block__author-name { color: #f8f3e5; font-size: 22px; font-weight: 600; line-height: 1.25; }
.test-block__author-role { font-size: 16px; font-weight: 500; }
.test-block__author-line {
  flex: 0 0 32px;
  margin-top: 17px;
  height: 2px;
  border-radius: 2px;
  background: #d0b77e;
}
.test-block__photo {
  position: relative;
  z-index: 2;
  container-type: inline-size;
  min-height: 365px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.test-block__photo img {
  position: absolute;
  left: calc(50% - 21px);
  bottom: calc(-1 * var(--quote-card-padding) - 8px);
  display: block;
  width: auto;
  height: 119%;
  max-width: none;
  max-height: 143cqw;
  /* Centre the seated portrait and keep its lower edge clipped to the card. */
  transform: translate(-35.5%, 3.1%);
  filter: contrast(1.025) saturate(.97) drop-shadow(-10px 5px 14px rgba(25, 49, 70, .1));
  clip-path: inset(-60px -60px 3.1% -60px);
}
@media (max-width: 799px) {
  .test-block { scroll-margin-top: 90px; }
  .test-block__card {
    --quote-card-padding: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(210px, .7fr);
    gap: 20px;
    min-height: 400px;
    border-radius: 30px;
  }
  .test-block__copy { padding: 28px 0 28px 14px; grid-template-rows: 27px auto minmax(60px, 1fr); }
  .test-block__quote { margin-left: 12px; width: calc(100% - 12px); font-size: 30px; line-height: 1.4; transform: none; }
  .test-block__quote-frame { inset: -28px -8px -22px -12px; }
  .test-block__quote p { padding-right: 4px; }
  .test-block__author { margin-top: 42px; }
  .test-block__quote-line { display: inline; white-space: normal; }
  .test-block__desktop-break { display: none; }
  .test-block__author-name { font-size: 20px; }
  .test-block__author-role { font-size: 15px; }
  .test-block__author-line { margin-top: 16px; }
  .test-block__photo { min-height: 310px; }
}
@media (max-width: 599px) {
  .test-block__card { --quote-card-padding: 12px; grid-template-columns: 1fr; gap: 14px; }
  .test-block__copy { position: static; container-type: normal; min-height: 0; padding: 28px 14px 10px; grid-template-rows: 29px auto; }
  .test-block__quote { z-index: 4; margin-left: 1px; width: calc(100% - 1px); font-size: clamp(23px, 6.24vw, 24.5px); line-height: 1.3; }
  .test-block__quote-frame { inset: -28px -8px -22px -8px; }
  .test-block__quote p { padding-right: 0; }
  .test-block__author-name { font-size: 18px; }
  .test-block__author-role { font-size: 14px; }
  .test-block__author-line { margin-top: 11px; }
  .test-block__photo { min-height: 338px; margin-top: 0; }
  .test-block__photo img { height: 110%; }
  .test-block__background { display: none; }
  .test-block__background--mobile { display: block; }
  .test-block__card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: 3;
    height: 115px;
    background: linear-gradient(transparent, rgba(7, 27, 44, .88) 60%, #071b2c);
    pointer-events: none;
  }
  .test-block__author { position: absolute; z-index: 5; left: 26px; right: 24px; bottom: 20px; margin: 0; }
  .test-block__author-info { transform: none; }
}
