/*
 * Elena Doroshenko 4.2 Final — live-photo / inner-page polish.
 * Loaded last. New filenames and .ed-signature-v420 make this cache-safe.
 */

body.ed-signature-v420 .ed-inner-hero {
  padding-bottom: clamp(76px, 8vw, 124px);
}
body.ed-signature-v420 .ed-inner-hero__grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .78fr);
  gap: clamp(38px, 6vw, 88px);
  align-items: center;
}
body.ed-signature-v420 .ed-inner-hero__copy h1 {
  font-size: clamp(3.25rem, 5.45vw, 5.7rem);
  line-height: .94;
  letter-spacing: -.045em;
}
body.ed-signature-v420 .ed-inner-hero__photo {
  width: min(100%, 455px);
  height: clamp(520px, 47vw, 590px);
  margin-left: auto;
  border: 8px solid rgba(255,253,249,.98);
  border-radius: 42% 42% 34px 34px / 20% 20% 34px 34px;
  box-shadow: 0 34px 90px rgba(7,31,60,.2);
}
body.ed-signature-v420 .ed-inner-hero__photo::after {
  right: -28px;
  bottom: -28px;
  width: 72%;
  height: 38%;
  border-radius: 36px 36px 96px 36px;
}
body.ed-signature-v420 .ed-inner-hero__photo img {
  object-position: 50% 28%;
}
body.ed-signature-v420.ed-page-podhod .ed-inner-hero__photo img { object-position: 50% 34%; }
body.ed-signature-v420.ed-page-publikatsii .ed-inner-hero__photo img { object-position: 50% 25%; }
body.ed-signature-v420.ed-page-o-mne .ed-inner-hero__photo img,
body.ed-signature-v420.ed-page-kontakty .ed-inner-hero__photo img,
body.ed-signature-v420.ed-page-formaty-raboty .ed-inner-hero__photo img { object-position: 50% 27%; }

/* About-page living portrait spread. */
body.ed-signature-v420 .ed-live-gallery-section {
  padding-top: clamp(34px, 5vw, 70px);
  padding-bottom: clamp(80px, 9vw, 128px);
  background:
    radial-gradient(circle at 78% 14%, rgba(199,155,87,.18), transparent 26%),
    linear-gradient(180deg, #fffdf9 0%, #f4eee4 100%);
}
body.ed-signature-v420 .ed-live-gallery {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1.3fr) minmax(260px,.7fr);
  gap: clamp(18px, 2.6vw, 34px);
  align-items: stretch;
}
body.ed-signature-v420 .ed-live-gallery::before {
  position: absolute;
  z-index: 0;
  top: -22px;
  right: -22px;
  width: 42%;
  height: 64%;
  content: "";
  border: 1px solid rgba(177,128,61,.25);
  border-radius: 38px 100px 38px 100px;
  transform: rotate(2deg);
}
body.ed-signature-v420 .ed-live-gallery figure {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  background: #efe8dd;
  box-shadow: 0 28px 72px rgba(7,31,60,.13);
}
body.ed-signature-v420 .ed-live-gallery__main {
  min-height: 720px;
  border-radius: 34px 110px 34px 34px;
}
body.ed-signature-v420 .ed-live-gallery__main img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%;
}
body.ed-signature-v420 .ed-live-gallery__stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: clamp(18px, 2.6vw, 34px);
}
body.ed-signature-v420 .ed-live-gallery__stack figure:first-child { border-radius: 90px 28px 28px 28px; }
body.ed-signature-v420 .ed-live-gallery__stack figure:last-child { border-radius: 28px 28px 90px 28px; }
body.ed-signature-v420 .ed-live-gallery__stack img {
  width: 100%; height: 100%; object-fit: cover;
}
body.ed-signature-v420 .ed-live-gallery__stack figure:first-child img { object-position: 50% 34%; }
body.ed-signature-v420 .ed-live-gallery__stack figure:last-child img { object-position: 50% 24%; }

/* More breathing room in dense cards seen on About. */
body.ed-signature-v420 .ed-compare-grid {
  gap: 18px;
}
body.ed-signature-v420 .ed-compare-grid article {
  min-height: 0;
  padding: clamp(26px, 3vw, 38px);
}
body.ed-signature-v420 .ed-compare-grid article h3 {
  font-size: clamp(1.65rem, 2.15vw, 2.2rem);
  line-height: 1.06;
}
body.ed-signature-v420 .ed-compare-grid article p {
  font-size: 1rem;
  line-height: 1.62;
}

/* Long link-card text in 4.0 no longer looks squeezed/overlapping. */
body.ed-signature-v420 .ed-link-deck {
  gap: 18px;
  align-items: stretch;
}
body.ed-signature-v420 .ed-link-deck a {
  min-height: 220px;
  padding: clamp(26px,3vw,38px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
body.ed-signature-v420 .ed-link-deck a strong {
  max-width: 17ch;
  font-size: clamp(1.45rem, 1.75vw, 1.92rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  overflow-wrap: normal;
  hyphens: auto;
}

/* Make the approved live photos unmistakable on home, not tiny thumbnails. */
body.ed-signature-v420 .ed-hero--conversion .ed-hero__portrait img { object-position: 50% 29%; }
body.ed-signature-v420 .ed-about--conversion .ed-about__photo img { object-position: 50% 27%; }
body.ed-signature-v420 .ed-approach--conversion .ed-approach__photo img { object-position: 50% 34%; }

@media (max-width: 980px) {
  body.ed-signature-v420 .ed-inner-hero__grid { grid-template-columns: minmax(0,1fr) 330px; gap: 34px; }
  body.ed-signature-v420 .ed-inner-hero__photo { height: 485px; }
  body.ed-signature-v420 .ed-live-gallery__main { min-height: 610px; }
}
@media (max-width: 760px) {
  body.ed-signature-v420 .ed-inner-hero__grid { grid-template-columns: 1fr; }
  body.ed-signature-v420 .ed-inner-hero__copy h1 { font-size: clamp(2.85rem, 13vw, 4.25rem); }
  body.ed-signature-v420 .ed-inner-hero__photo {
    width: min(92vw, 430px);
    height: min(128vw, 545px);
    margin: 8px auto 0;
  }
  body.ed-signature-v420 .ed-live-gallery { grid-template-columns: 1fr; }
  body.ed-signature-v420 .ed-live-gallery__main { min-height: min(132vw, 690px); }
  body.ed-signature-v420 .ed-live-gallery__stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
  }
  body.ed-signature-v420 .ed-live-gallery__stack figure { min-height: 330px; }
  body.ed-signature-v420 .ed-link-deck { grid-template-columns: 1fr; }
  body.ed-signature-v420 .ed-link-deck a { min-height: 0; }
  body.ed-signature-v420 .ed-link-deck a strong { max-width: none; font-size: 1.55rem; }
}
@media (max-width: 520px) {
  body.ed-signature-v420 .ed-live-gallery__stack { grid-template-columns: 1fr; }
  body.ed-signature-v420 .ed-live-gallery__stack figure { min-height: 440px; }
}

/* Normalized degree previews: both scans now sit on the same visual canvas. */
body.ed-signature-v420 .ed-document-grid--degrees .ed-document-card__image {
  height: clamp(220px, 24vw, 300px);
  background: #f7f4ee;
}
body.ed-signature-v420 .ed-document-grid--degrees .ed-document-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}


/* 4.2.1 photo corrections: open-eye portrait replacements and crop tuning. */
body.ed-signature-v421 .ed-hero--conversion .ed-hero__portrait img { object-position: 50% 27%; }
body.ed-signature-v421 .ed-approach--conversion .ed-approach__photo img { object-position: 50% 24%; }
body.ed-signature-v421.ed-page-podhod .ed-inner-hero__photo img,
body.ed-signature-v421.ed-page-obrazovanie .ed-inner-hero__photo img,
body.ed-signature-v421.ed-page-finansovaya-terapiya .ed-inner-hero__photo img,
body.ed-signature-v421.ed-page-kursy .ed-inner-hero__photo img { object-position: 50% 24%; }
body.ed-signature-v421 .ed-live-gallery__main img { object-position: 50% 27%; }
