html:has(.yd-page) { scroll-behavior: smooth; }
.yd-page { background: var(--page-bg); color: var(--page-text); }
.yd-main { overflow: hidden; }
.yd-main * { box-sizing: border-box; }
.yd-kicker { margin: 0; color: var(--accent-ink); font-size: 11px; font-weight: 600; letter-spacing: .13em; }
.yd-main h1, .yd-main h2, .yd-main h3 { font-family: Arial, Helvetica, sans-serif; }

.yd-hero { display: grid; grid-template-columns: 52% 48%; min-height: 100svh; border-bottom: 1px solid var(--border); }
.yd-hero__copy { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; padding: clamp(116px, 13vh, 160px) clamp(28px, 5vw, 80px) 60px; }
.yd-back { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.yd-back:hover { color: var(--accent-ink); }
.yd-hero .yd-kicker { margin-top: clamp(56px, 9vh, 100px); }
.yd-hero h1 { margin: 22px 0 0; font-size: clamp(54px, 6.2vw, 104px); font-weight: 600; line-height: .9; letter-spacing: -.06em; }
.yd-hero h1 span { display: block; }
.yd-hero__intro { max-width: 510px; margin: 38px 0 0; color: var(--muted); font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; }
.yd-hero__cta { display: inline-flex; min-width: 250px; min-height: 56px; margin-top: 36px; padding: 0 26px; border: 1px solid color-mix(in srgb, var(--accent) 72.00%, transparent); background: transparent; align-items: center; justify-content: center; color: var(--page-text); font: 600 12px/1 Arial, Helvetica, sans-serif; letter-spacing: .1em; cursor: pointer; transition: background-color 280ms ease, border-color 280ms ease, color 280ms ease; }
.yd-hero__cta:hover, .yd-hero__cta:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10.0%, transparent); color: var(--accent-ink); }
.yd-hero__view { display: flex; width: min(220px, 100%); min-height: 56px; align-items: center; justify-content: space-between; gap: 20px; margin: auto 0 0 auto; padding: 0 18px; border: 1px solid var(--page-text); color: var(--page-text); font-size: 12px; font-weight: 600; letter-spacing: .12em; transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease; }
.yd-hero__view span { font-size: 18px; font-weight: 400; }
.yd-hero__view:hover, .yd-hero__view:focus-visible { border-color: var(--accent-hover); background: var(--accent-hover); color: var(--accent-contrast); }
.yd-hero__visual { position: relative; min-height: 100svh; overflow: hidden; }
.yd-hero__visual img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% center; }

.yd-section { padding: clamp(88px, 9vw, 150px) clamp(28px, 5vw, 80px); }
.yd-section__head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: end; gap: 22px 7vw; margin-bottom: clamp(40px, 5vw, 76px); }
.yd-section__head .yd-kicker { grid-column: 1 / -1; }
.yd-section__head h2, .yd-case h2 { margin: 0; font-size: clamp(42px, 5vw, 78px); font-weight: 600; line-height: .95; letter-spacing: -.055em; }
.yd-section__head > p:last-child { max-width: 440px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.yd-overview { --accent-ink: color-mix(in srgb, var(--accent) 85%, #F2EFE7); background: #0E0B0B; color: #F2EFE7; }
.yd-overview .yd-section__head > p:last-child { color: rgba(242, 239, 231, .68); }
.yd-overview__body { display: grid; grid-template-columns: minmax(0, 36fr) minmax(0, 64fr); gap: clamp(36px, 5vw, 72px); align-items: stretch; }
.yd-overview__image { position: relative; min-height: 560px; overflow: hidden; }
.yd-overview__image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.yd-overview__stages { margin: 0; padding: 0; border-top: 1px solid rgba(242, 239, 231, .22); list-style: none; }
.yd-overview__stages > li { display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(220px, .95fr); gap: 18px; align-items: start; padding: 26px 0; border-bottom: 1px solid rgba(242, 239, 231, .22); }
.yd-overview__stages > li > span { color: var(--accent-ink); font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.yd-overview__stages h3 { margin: 0; font-size: clamp(18px, 1.55vw, 24px); font-weight: 600; line-height: 1.16; letter-spacing: -.035em; }
.yd-overview__stages ul { margin: 0; padding-left: 18px; color: rgba(242, 239, 231, .74); font-size: 14px; line-height: 1.45; }
.yd-overview__stages ul li + li { margin-top: 5px; }

.yd-benefits { position: relative; isolation: isolate; padding-block: clamp(52px, 4.5vw, 64px) clamp(40px, 3vw, 52px); background: #1559df url("../assets/images/services/yandex-direct/problems-desktop.webp") center top / auto 110% no-repeat; color: #F2EFE7; }
.yd-benefits .yd-kicker { color: #F2EFE7; }
.yd-benefits__heading { position: relative; z-index: 1; }
.yd-benefits__heading h2 { max-width: 1050px; margin: 22px 0 0; font-size: clamp(46px, 6.5vw, 96px); font-weight: 600; line-height: .92; letter-spacing: -.055em; }
.yd-problems__circles { position: relative; z-index: 1; display: grid; width: min(100%, 900px); grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: calc(min(30vw, 300px) - 10px); margin: clamp(30px, 3vw, 44px) auto 0; padding: 0; list-style: none; }
.yd-problems__circles li { --offset-y: 0px; display: grid; width: calc(100% + 32px); aspect-ratio: 1; place-items: center; margin-left: -16px; border: 1px solid rgba(242, 239, 231, .88); border-radius: 50%; background: rgba(14, 11, 11, .2); transform: translateY(var(--offset-y)) scale(1); transition: transform 300ms ease, border-color 300ms ease, background-color 300ms ease; }
.yd-problems__circles li:nth-child(2) { --offset-y: 16px; }
.yd-problems__circles li:nth-child(3) { --offset-y: -10px; }
.yd-problems__circles li:nth-child(4) { --offset-y: -22px; }
.yd-problems__circles li:nth-child(5) { --offset-y: -7px; }
.yd-problems__circles li:nth-child(6) { --offset-y: -25px; }
.yd-problems__circles h3 { max-width: 86%; margin: 0; color: #F2EFE7; font-size: clamp(15px, 1.5vw, 22px); font-weight: 600; line-height: 1.14; letter-spacing: -.025em; text-align: center; }
@media (hover: hover) { .yd-problems__circles li:hover { border-color: var(--accent); background: rgba(14, 11, 11, .3); transform: translateY(var(--offset-y)) scale(1.03); } }
.yd-results { padding-block: clamp(74px, 7vw, 100px) clamp(65px, 6vw, 90px); background: #0E0B0B; color: #F2EFE7; }
.yd-results .yd-section__head { margin-bottom: 34px; }
.yd-results__list { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.yd-results__list::before { position: absolute; top: 4px; right: 0; left: 4px; height: 1px; background: rgba(242, 239, 231, .18); content: ""; }
.yd-results__list > li { position: relative; min-width: 0; padding: 32px 14px 0 0; }
.yd-results__list > li::before { position: absolute; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); content: ""; transition: transform 250ms ease; }
@media (hover: hover) { .yd-results__list > li:hover::before { transform: scale(1.3); } }
.yd-results__list h3 { margin: 0; font-size: clamp(18px, 1.45vw, 22px); font-weight: 600; line-height: 1.16; letter-spacing: -.035em; }
.yd-results[data-reveal] .yd-results__list > li { opacity: 0; transform: translateY(18px); transition: opacity 650ms ease, transform 650ms cubic-bezier(.22, .75, .18, 1); }
.yd-results[data-reveal].is-visible .yd-results__list > li { opacity: 1; transform: translateY(0); }
.yd-consult { display: none; }
@media (min-width: 769px) {
  .yd-consult { --accent-ink: color-mix(in srgb, var(--accent) 85%, #F2EFE7); display: block; padding-inline: clamp(28px, 5vw, 80px); background: #0E0B0B; }
  .yd-consult__cta { position: relative; display: flex; width: 100%; min-height: 88px; align-items: center; justify-content: center; border: 1px solid rgba(242, 239, 231, .72); background: #171110; box-shadow: 0 8px 24px rgba(0, 0, 0, .24), inset 0 0 0 1px color-mix(in srgb, var(--accent) 8.00%, transparent); color: #F2EFE7; font: 600 clamp(15px, 1.5vw, 20px) Arial, Helvetica, sans-serif; letter-spacing: .075em; cursor: pointer; transition: border-color 280ms ease, color 280ms ease, box-shadow 280ms ease, transform 280ms ease; }
  .yd-consult__content { display: inline-flex; align-items: center; gap: 12px; transition: transform 280ms ease; }
  .yd-consult__content > span { color: var(--accent-ink); font-size: 1.2em; line-height: 1; }
  .yd-consult__cta:hover, .yd-consult__cta:focus-visible { border-color: var(--accent); box-shadow: 0 11px 28px rgba(0, 0, 0, .3), inset 0 0 0 1px color-mix(in srgb, var(--accent) 16.00%, transparent); transform: translateY(-2px); }
  .yd-consult__cta:hover .yd-consult__content, .yd-consult__cta:focus-visible .yd-consult__content { transform: translateX(4px); }
  .yd-consult__corner { position: absolute; width: 14px; height: 14px; border-color: #F2EFE7; border-style: solid; border-width: 0; pointer-events: none; transition: border-color 280ms ease; }
  .yd-consult__cta:hover .yd-consult__corner, .yd-consult__cta:focus-visible .yd-consult__corner { border-color: var(--accent); }
  .yd-consult__corner--tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
  .yd-consult__corner--tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
  .yd-consult__corner--bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
  .yd-consult__corner--br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
  .yd-page .site-request-modal { width: min(500px, calc(100vw - 48px)); max-height: calc(100dvh - 48px); padding: 32px; overflow-y: auto; --page-bg: #0E0B0B; --page-text: #F2EFE7; --muted: rgba(242, 239, 231, .68); --border: rgba(242, 239, 231, .24); --accent: var(--terracotta); --accent-ink: color-mix(in srgb, var(--accent) 85%, #F2EFE7); }
}
.yd-case { display: grid; grid-template-columns: 1fr 2fr; gap: 7vw; border-bottom: 1px solid var(--border); }
.yd-case > div { min-height: 310px; padding: 36px; border: 1px solid var(--border); }
.yd-case h2 { font-size: clamp(36px, 4.2vw, 64px); }
.yd-case p { max-width: 540px; margin: 44px 0 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.yd-case small { display: block; margin-top: 30px; color: var(--accent-ink); font-size: 10px; letter-spacing: .1em; }

.yd-more__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.yd-more__grid a { position: relative; display: flex; min-height: 420px; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 28px; color: #F2EFE7; }
.yd-more__grid a::after { position: absolute; inset: 30% 0 0; background: linear-gradient(to top, rgba(14, 11, 11, .82), transparent); content: ""; pointer-events: none; }
.yd-more__grid img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 350ms ease; }
.yd-more__grid a:hover img { transform: scale(1.03); }
.yd-more__grid a > span, .yd-more__grid a > div, .yd-more__grid b { position: relative; z-index: 1; }
.yd-more__grid a > span { font-size: 11px; letter-spacing: .12em; }
.yd-more__grid a > div { max-width: 510px; }
.yd-more__grid h3 { margin: 0 0 16px; font-size: clamp(30px, 3vw, 48px); font-weight: 600; line-height: 1; letter-spacing: -.045em; }
.yd-more__grid p { max-width: 380px; margin: 0; font-size: 14px; line-height: 1.5; }
.yd-more__grid b { position: absolute; top: 24px; right: 28px; font-size: 26px; font-weight: 400; }

#overview { scroll-margin-top: 68px; }

@media (max-width: 1100px) {
  .yd-hero { grid-template-columns: 56% 44%; }
  .yd-hero h1 { font-size: clamp(52px, 6vw, 74px); }
  .yd-overview__body { gap: 36px; }
  .yd-overview__stages > li { grid-template-columns: 30px minmax(0, 1fr) minmax(175px, .95fr); gap: 12px; }
}

@media (max-width: 768px) {
  .yd-hero { grid-template-columns: 1fr; }
  .yd-hero__copy { min-height: 72svh; padding: 106px 20px 36px; }
  .yd-hero .yd-kicker { margin-top: 54px; }
  .yd-hero h1 { font-size: clamp(48px, 12vw, 72px); }
  .yd-hero__intro { margin-top: 26px; font-size: 15px; }
  .yd-hero__cta { width: 100%; min-height: 54px; margin-top: 34px; }
  .yd-hero__view { width: 190px; min-height: 52px; margin-top: 34px; }
  .yd-hero__visual { height: 46svh; min-height: 260px; }
  .yd-hero__visual img { object-position: 57% center; }
  .yd-section { padding: 80px 20px; }
  .yd-benefits { padding-block: 52px 42px; background-image: url("../assets/images/services/yandex-direct/problems-mobile.webp"); background-position: center 18%; background-size: auto 112%; }
  .yd-benefits__heading h2 { max-width: 560px; font-size: clamp(38px, 8.8vw, 66px); }
  .yd-problems__circles { width: min(100%, clamp(270px, 70vw, 500px)); grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(135px, 35vw, 250px); margin-top: 28px; }
  .yd-problems__circles li { width: calc(100% + 22px); margin-left: -11px; }
  .yd-problems__circles li:nth-child(2) { --offset-y: -10px; }
  .yd-problems__circles li:nth-child(3) { --offset-y: -16px; }
  .yd-problems__circles li:nth-child(4) { --offset-y: -5px; }
  .yd-problems__circles li:nth-child(5) { --offset-y: -10px; }
  .yd-problems__circles li:nth-child(6) { --offset-y: -20px; }
  .yd-problems__circles h3 { font-size: clamp(11px, 2.8vw, 14px); line-height: 1.1; }
  .yd-section__head { grid-template-columns: 1fr; gap: 20px; }
  .yd-section__head .yd-kicker { grid-column: auto; }
  .yd-section__head h2 { font-size: clamp(38px, 10vw, 58px); }
  .yd-overview__body { grid-template-columns: 1fr; gap: 28px; }
  .yd-overview__image { height: clamp(280px, 70vw, 440px); min-height: 0; }
  .yd-overview__stages > li { display: block; padding: 24px 0; }
  .yd-overview__stages h3 { margin-top: 10px; }
  .yd-overview__stages ul { margin-top: 16px; }
  .yd-results { padding-block: 72px; }
  .yd-results .yd-section__head { margin-bottom: 30px; }
  .yd-results__track { overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .yd-results__list { width: max-content; grid-template-columns: repeat(6, 190px); }
  .yd-results__list > li { scroll-snap-align: start; padding-right: 20px; }
  .yd-results__list h3 { font-size: 18px; }
  .yd-case { grid-template-columns: 1fr; gap: 24px; }
  .yd-more__grid { grid-template-columns: 1fr; }
  .yd-more__grid a { min-height: 350px; }
}

@media (max-width: 520px) {
  .yd-hero h1 { font-size: clamp(44px, 11.5vw, 58px); }
  .yd-case > div { min-height: 0; padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.yd-page) { scroll-behavior: auto; }
  .yd-more__grid img { transition: none; }
  .yd-problems__circles li { transition: none; }
}
