/* Этап 4 — визуальная концепция
   Открытая шрифтовая пара: Prata (display) + Manrope (interface/body). */

:root {
  --ink: #121a2a;
  --paper: #f5f2eb;
  --muted: #eae6dc;
  --line: rgb(18 26 42 / 16%);
  --soft-ink: #626775;
  --accent: #2855ff;
  --accent-deep: #1739bd;
  --night: #101827;
  --warm-white: #fffdf7;
  --max: 1340px;
  --radius: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow: 0 30px 90px rgb(20 27 42 / 14%);
}

::selection { color: #fff; background: var(--accent); }

html, body { overflow-x: clip; }

body {
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), rgb(18 26 42 / 4%) 50%, transparent calc(50% + .5px)),
    var(--paper);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

h1, h2 {
  font-family: "Prata", Georgia, serif;
  font-weight: 400;
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 {
  max-width: 1040px;
  margin-bottom: 32px;
  font-size: clamp(4.4rem, 7.15vw, 8.4rem);
  line-height: .91;
  letter-spacing: -.055em;
}

h2 {
  font-size: clamp(2.8rem, 4.9vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}

h3 { font-weight: 600; letter-spacing: -.035em; }

.container { width: min(calc(100% - 72px), var(--max)); }
.section { padding: clamp(96px, 11vw, 176px) 0; }
.section-muted { background-color: var(--muted); }
.section-dark { background: var(--night); }

.section-dark,
.site-footer {
  background-image:
    radial-gradient(circle at 78% 8%, rgb(40 85 255 / 18%), transparent 28%),
    linear-gradient(90deg, transparent 49.9%, rgb(255 255 255 / 4%) 50%, transparent 50.1%);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  color: var(--soft-ink);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  background: var(--accent);
  content: "";
}

.lead { max-width: 720px; color: #3f4654; font-size: clamp(1.13rem, 1.5vw, 1.4rem); line-height: 1.55; }
.lead-small { line-height: 1.7; }
.data-note { opacity: .7; }

.prototype-banner {
  position: relative;
  z-index: 40;
  padding: 8px 20px;
  color: #fff;
  background: var(--accent);
  font-size: .66rem;
  letter-spacing: .05em;
}
.prototype-banner span { color: rgb(255 255 255 / 76%); }

.site-header {
  border-bottom-color: rgb(18 26 42 / 10%);
  background: rgb(245 242 235 / 88%);
  backdrop-filter: blur(20px) saturate(120%);
  transition: box-shadow .35s ease, background .35s ease;
}
.site-header.is-scrolled { background: rgb(245 242 235 / 97%); box-shadow: 0 12px 40px rgb(18 26 42 / 8%); }
.header-row { min-height: 88px; }
.brand { font-size: .72rem; letter-spacing: .14em; }
.brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  overflow: hidden;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}
.brand-mark::after {
  position: absolute;
  width: 16px;
  height: 50px;
  background: var(--accent);
  content: "";
  rotate: 35deg;
  translate: 18px -7px;
  opacity: .95;
}
.brand-mark { isolation: isolate; }
.brand-mark::after { z-index: -1; }
.main-nav a { color: #414754; font-size: .76rem; font-weight: 600; }
.main-nav a::after { height: 2px; background: var(--accent); }

.button {
  position: relative;
  min-height: 56px;
  overflow: hidden;
  padding: 15px 26px;
  border-color: var(--ink);
  font-size: .76rem;
  letter-spacing: .035em;
  transition: color .3s ease, background-color .3s ease, border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.button:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgb(20 28 44 / 13%); }
.button-dark { border-color: var(--accent); background: var(--accent); }
.button-dark:hover { color: #fff; border-color: var(--accent-deep); background: var(--accent-deep); }
.button-light { border-color: rgb(18 26 42 / 32%); }
.button-light:hover { border-color: var(--ink); background: var(--ink); }
.button-invert { color: var(--night); }
.text-link { border-bottom-color: rgb(18 26 42 / 30%); transition: gap .25s ease, color .25s ease, border-color .25s ease; }
.text-link:hover { gap: 22px; color: var(--accent); border-bottom-color: var(--accent); }

.hero { position: relative; padding-top: clamp(90px, 9vw, 140px); overflow: clip; }
.hero::before {
  position: absolute;
  top: 18%;
  left: -9vw;
  width: 34vw;
  height: 34vw;
  border: 1px solid rgb(40 85 255 / 18%);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.hero-grid { grid-template-columns: minmax(0, 1.04fr) minmax(440px, .96fr); gap: clamp(38px, 6vw, 96px); }
.hero-copy { position: relative; z-index: 2; }
.candidate-shortcut { color: var(--accent); font-size: .82rem; }

.hero-visual {
  position: relative;
  min-height: 650px;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--night);
  box-shadow: var(--shadow);
}
.hero-visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgb(8 15 28 / 66%));
  content: "";
  pointer-events: none;
}
.hero-visual img { width: 100%; height: 100%; min-height: 650px; object-fit: cover; object-position: 54% center; scale: 1.025; transition: scale 1.2s cubic-bezier(.2,.7,.2,1); }
.hero-visual:hover img { scale: 1.06; }
.hero-caption { position: absolute; z-index: 2; right: 28px; bottom: 28px; left: 28px; display: flex; justify-content: space-between; color: #fff; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.hero-status { position: absolute; z-index: 2; top: 28px; right: 28px; display: flex; align-items: center; gap: 10px; padding: 10px 13px; color: #fff; background: rgb(10 18 31 / 70%); backdrop-filter: blur(10px); font-size: .65rem; }
.hero-status i { width: 7px; height: 7px; border-radius: 50%; background: #5ff2ae; box-shadow: 0 0 0 5px rgb(95 242 174 / 12%); animation: statusPulse 2.3s ease infinite; }

.proof-strip { border-color: var(--line); background: var(--warm-white); }
.proof-grid div { min-height: 110px; border-color: var(--line); }
.proof-grid,
.service-proof { overflow: hidden; border-radius: var(--radius-md); }
.proof-grid strong { color: var(--accent); font-family: "Prata", Georgia, serif; font-size: 2.7rem; }
.service-proof span { color: #4f5664; border-color: var(--line); }

.section-heading { gap: 90px; }
.section-heading > *, .hero-grid > *, .service-hero-grid > *, .request-grid > *, .two-column > * { min-width: 0; }
.section-heading > p { max-width: 430px; line-height: 1.8; }

.solution-grid, .case-grid { gap: 14px; }
.card, .case-card { border-color: transparent; border-radius: var(--radius-md); background: var(--warm-white); box-shadow: inset 0 0 0 1px var(--line); }
.solution-card { min-height: 480px; transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease, background .45s ease; }
.solution-card:hover { z-index: 2; transform: translateY(-10px); background: #fff; box-shadow: 0 30px 70px rgb(20 28 44 / 13%); }
.solution-card:first-child { color: #fff; background: var(--night); box-shadow: none; }
.solution-card:first-child > p, .solution-card:first-child .card-number { color: rgb(255 255 255 / 60%); }
.solution-card:first-child .text-link { color: #fff; border-color: rgb(255 255 255 / 50%); }
.card-number { color: var(--accent); letter-spacing: .16em; }

.choice-list button { position: relative; padding: 23px 42px 23px 0; border-color: var(--line); font-size: 1rem; transition: color .25s ease, padding-left .25s ease; }
.choice-list button:hover { color: var(--accent); padding-left: 10px; }
.choice-list button[aria-selected="true"] { color: var(--accent); }
.choice-list button[aria-selected="true"]::before { content: "→"; font-size: .9rem; }
.choice-result { top: 128px; min-height: 440px; overflow: hidden; padding: 52px; border-radius: var(--radius-lg); background: var(--night); box-shadow: var(--shadow); }
.choice-result::before { position: absolute; right: -80px; bottom: -120px; width: 340px; height: 340px; border: 1px solid rgb(255 255 255 / 20%); border-radius: 50%; content: ""; }
.choice-result h3 { position: relative; margin-top: 106px; font-family: "Prata", Georgia, serif; font-weight: 400; }

.staff-grid { gap: 12px; border: 0; }
.staff-tile { position: relative; min-height: 240px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgb(255 253 247 / 32%); }
.staff-tile::after { position: absolute; right: -40px; bottom: -70px; width: 130px; height: 130px; border: 1px solid rgb(40 85 255 / 26%); border-radius: 50%; content: ""; transition: scale .45s ease, background .45s ease; }
.staff-tile:hover { color: #fff; background: var(--accent); }
.staff-tile:hover::after { scale: 1.8; background: rgb(255 255 255 / 7%); }

.process-grid { gap: 10px; border: 0; }
.process-grid li { position: relative; min-height: 280px; overflow: hidden; border: 1px solid rgb(255 255 255 / 14%); border-radius: var(--radius-md); transition: background .3s ease; }
.process-grid li:hover { background: rgb(40 85 255 / 16%); }
.process-grid li span { color: #7090ff; }
.process-grid li strong { font-size: 1.05rem; }

.responsibility-table [role="row"], .responsibility-table [role="cell"] { border-color: var(--line); }
.responsibility-table { border-top: 0; }
.responsibility-table [role="row"] { overflow: hidden; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.responsibility-table [role="row"]:first-child { color: #fff; border-color: var(--night); background: var(--night); }
.responsibility-table span:not(:first-child) { color: var(--accent); font-size: 1.15rem; }

.case-card { min-height: 470px; transition: transform .4s ease, box-shadow .4s ease; }
.case-card:hover { transform: translateY(-7px); box-shadow: 0 26px 66px rgb(20 28 44 / 11%); }
.case-card:nth-child(2) { color: #fff; background: var(--accent); }
.case-card:nth-child(2) .wire-label, .case-card:nth-child(2) dt { color: rgb(255 255 255 / 70%); }
.case-card:nth-child(2) dl div { border-color: rgb(255 255 255 / 24%); }
.case-card:nth-child(2) .text-link { color: #fff; border-color: rgb(255 255 255 / 60%); }

.portrait-placeholder { position: relative; min-height: 310px; overflow: hidden; color: transparent; border: 0; background: var(--night); }
.portrait-placeholder::before { position: absolute; inset: 12% 14% -20%; border: 1px solid rgb(255 255 255 / 16%); border-radius: 48% 48% 10% 10%; background: linear-gradient(135deg, rgb(40 85 255 / 80%), rgb(40 85 255 / 8%)); content: ""; }
.team-grid div:nth-child(2) .portrait-placeholder { background: #c9c4b8; }
.team-grid div:nth-child(2) .portrait-placeholder::before { background: linear-gradient(145deg, #fff, #777f91); }
.team-grid div:nth-child(3) .portrait-placeholder::before { background: linear-gradient(145deg, #3c4559, #2855ff); }

.accordion { border-top: 0; }
.accordion details { overflow: hidden; margin-bottom: 10px; padding-inline: 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.accordion summary { padding-block: 24px; font-size: 1.05rem; transition: color .25s ease; }
.accordion summary:hover { color: var(--accent); }
.accordion summary::after { color: var(--accent); }
.accordion details[open] { border-bottom-color: var(--accent); }

.candidate-section { color: #fff; border: 0; background: var(--accent); }
.candidate-section .eyebrow, .candidate-section p { color: rgb(255 255 255 / 78%); }
.candidate-section .eyebrow::before { background: #fff; }
.candidate-section .button-dark { color: var(--ink); border-color: #fff; background: #fff; }

.prototype-form { gap: 22px 26px; padding: 42px; border: 0; border-radius: var(--radius-lg); background: var(--warm-white); box-shadow: var(--shadow); }
.prototype-form label { color: #5d6471; font-size: .67rem; letter-spacing: .06em; text-transform: uppercase; }
.prototype-form input, .prototype-form textarea, .prototype-form select { border-color: rgb(18 26 42 / 28%); transition: border-color .25s ease; }
.prototype-form input:focus, .prototype-form textarea:focus, .prototype-form select:focus { border-color: var(--accent); outline: 0; }
.prototype-form-dark { background: rgb(255 255 255 / 5%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%); }
.prototype-form-dark input, .prototype-form-dark textarea { border-color: rgb(255 255 255 / 28%); }
.form-status { border: 0; color: #fff; background: var(--accent); }

.site-footer { padding-top: 88px; background-color: var(--night); }
.site-footer .brand-mark { background: #fff; color: var(--night); }
.footer-grid a { transition: color .2s ease; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-color: rgb(255 255 255 / 13%); }

.request-dialog { padding: 48px; border: 0; border-radius: var(--radius-lg); background: var(--paper); box-shadow: 0 40px 120px rgb(4 9 18 / 45%); }
.request-dialog::backdrop { background: rgb(10 16 28 / 75%); backdrop-filter: blur(10px); }
.request-dialog[open] { animation: dialogEnter .35s cubic-bezier(.2,.8,.2,1); }

.breadcrumbs { letter-spacing: .04em; }
.breadcrumbs a:hover { color: var(--accent); }
.service-hero { overflow: clip; }
.service-hero-grid { grid-template-columns: 1.12fr .88fr; align-items: stretch; }
.service-hero h1 { max-width: 980px; font-size: clamp(4.6rem, 8vw, 9.4rem); }
.service-summary { position: relative; overflow: hidden; padding: 0 34px 30px; color: #fff; border: 0; border-radius: var(--radius-lg); background: var(--night); box-shadow: var(--shadow); }
.service-summary .wire-label { margin-top: 28px; }
.service-summary dt { color: rgb(255 255 255 / 55%); }
.service-summary dl div { border-color: rgb(255 255 255 / 16%); }
.service-image { height: 260px; margin: 0 -34px; background: linear-gradient(180deg, transparent 55%, var(--night)), url("assets/agent-service-hero.png") center 38% / cover; }

.check-grid, .model-diagram article, .feature-grid .card, .document-list, .case-feature dl { border-color: var(--line); }
.check-grid { gap: 12px; border: 0; }
.check-grid p { border: 1px solid var(--line); border-radius: var(--radius-md); background: rgb(255 253 247 / 55%); }
.check-grid p::before { color: var(--accent); font-size: 1.2rem; }
.model-diagram article { border: 0; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--line); }
.model-primary { background: var(--accent) !important; }
.model-primary p { color: rgb(255 255 255 / 72%) !important; }
.diagram-arrow { color: var(--accent); }
.feature-grid .card { min-height: 290px; transition: background .3s ease, color .3s ease, transform .3s ease; }
.feature-grid .card:hover { color: #fff; background: var(--night); transform: translateY(-5px); }
.feature-grid .card:hover p { color: rgb(255 255 255 / 62%); }
.feature-grid .card > span { color: var(--accent); }
.document-list div { padding: 24px 0; border-color: var(--line); }
.document-list div > span { color: var(--accent); border-color: var(--accent); }
.case-feature dd { color: var(--accent); font-family: "Prata", Georgia, serif; }
.case-feature dl { overflow: hidden; border-radius: var(--radius-md); }
.case-feature dl > div { min-width: 0; }
.case-feature dd { overflow-wrap: anywhere; }
.document-list { overflow: hidden; padding-inline: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.wire-label { border-radius: 999px; }
.nav-toggle { border-radius: var(--radius); }

.reveal-ready { opacity: 0; transform: translateY(32px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal-ready.is-visible { opacity: 1; transform: none; }
.reveal-ready:nth-child(2) { transition-delay: .08s; }
.reveal-ready:nth-child(3) { transition-delay: .16s; }

@keyframes statusPulse { 50% { box-shadow: 0 0 0 9px rgb(95 242 174 / 2%); } }
@keyframes dialogEnter { from { opacity: 0; transform: translateY(20px) scale(.98); } }

@media (max-width: 1050px) {
  .hero-grid, .service-hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 580px; }
  .hero-visual img { min-height: 580px; object-position: center 38%; }
  .service-summary { max-width: 720px; }
}

@media (max-width: 780px) {
  .container { width: min(calc(100% - 32px), var(--max)); }
  .prototype-banner span { display: none; }
  .header-row { min-height: 72px; }
  .main-nav { background: var(--paper); }
  .main-nav[data-open="true"] { overflow: hidden; border-radius: 0 0 var(--radius-md) var(--radius-md); box-shadow: 0 18px 45px rgb(18 26 42 / 12%); }
  h1, .service-hero h1 { font-size: clamp(3.25rem, 15vw, 5.3rem); }
  h2 { font-size: clamp(2.45rem, 11vw, 4rem); }
  .hero { padding-top: 72px; }
  .hero::before { width: 70vw; height: 70vw; }
  .hero-visual, .hero-visual img { min-height: 520px; }
  .hero-visual img { object-position: 57% center; }
  .section-heading { gap: 32px; }
  .solution-card { min-height: 420px; }
  .choice-result { padding: 34px; }
  .team-grid { grid-template-columns: 1fr; overflow: visible; }
  .portrait-placeholder { min-height: 380px; }
  .prototype-form { padding: 26px; }
  .service-image { height: 220px; }
}

@media (max-width: 500px) {
  body { background-image: none; }
  .brand > span:last-child { display: inline; max-width: 90px; line-height: 1.2; }
  .brand-mark { width: 40px; height: 40px; }
  .hero-visual, .hero-visual img { min-height: 440px; }
  .hero-caption { right: 18px; bottom: 18px; left: 18px; }
  .hero-status { top: 18px; right: 18px; }
  .proof-grid div { padding-inline: 20px; }
  .request-dialog { padding: 38px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-status i { animation: none; }
  .reveal-ready { opacity: 1; transform: none; }
}

/* Этап 5.1 — коррекция после пользовательского дизайн-аудита. */

body {
  font-size: 16px;
  line-height: 1.58;
}

h1,
h2 {
  hyphens: none;
  overflow-wrap: normal;
}

h1 {
  max-width: 920px;
  margin-bottom: 26px;
  font-size: clamp(3.8rem, 5.6vw, 6.15rem);
  line-height: .98;
  letter-spacing: -.045em;
}

h2 {
  font-size: clamp(2.5rem, 3.9vw, 4.35rem);
  line-height: 1.06;
  letter-spacing: -.035em;
}

h3 { line-height: 1.22; }

.container { width: min(calc(100% - 48px), var(--max)); }
.section { padding: clamp(76px, 7.6vw, 118px) 0; }
.section-heading { gap: 56px; margin-bottom: 46px; }
.section-heading > p { line-height: 1.65; }
.eyebrow { margin-bottom: 22px; }
.lead { margin-bottom: 30px; }

.header-row { min-height: 78px; }
.brand-mark { width: 42px; height: 42px; }
.button { min-height: 52px; padding: 13px 22px; }

.hero { padding-top: clamp(58px, 6vw, 84px); }
.hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr); gap: clamp(34px, 5vw, 72px); }
.hero-visual,
.hero-visual img { min-height: 520px; }
.hero-copy { padding-block: 14px; }

.proof-strip { padding: 30px 0; }
.proof-grid div { min-height: 88px; }
.proof-grid strong { font-size: 2.25rem; }

.solution-card { min-height: 390px; }
.card-number { margin-bottom: 48px; }
.card,
.case-card { padding: 26px; }

.chooser-grid { gap: 56px; }
.choice-result { min-height: 360px; padding: 40px; }
.choice-result h3 { margin-top: 58px; font-size: clamp(2rem, 3.2vw, 3.15rem); }

.staff-tile { min-height: 200px; }
.process-grid li { min-height: 220px; padding: 20px; }
.process-grid li span { margin-bottom: 52px; }
.case-card { min-height: 390px; }
.case-card h3 { margin-top: 38px; }
.portrait-placeholder { min-height: 260px; }

.candidate-section { padding: 50px 0; }
.prototype-form { gap: 20px 24px; padding: 32px; }
.site-footer { padding-top: 68px; }
.footer-bottom { margin-top: 48px; }

.breadcrumbs { margin-bottom: 42px; }
.service-hero-grid { grid-template-columns: 1.08fr .92fr; gap: 54px; }
.service-hero h1 { max-width: 880px; font-size: clamp(3.9rem, 5.9vw, 6.65rem); }
.service-summary { padding: 0 28px 24px; }
.service-image { height: 220px; margin-inline: -28px; }
.service-summary .wire-label { margin-top: 22px; }
.service-summary dl { margin-top: 30px; }
.service-summary dl div { padding: 12px 0; }

.check-grid p { min-height: 130px; padding: 22px; }
.check-grid p::before { margin-bottom: 20px; }
.model-diagram article { min-height: 270px; padding: 24px; }
.feature-grid .card { min-height: 230px; }
.feature-grid .card > span { margin-bottom: 46px; }
.case-feature h2 { margin-top: 32px; }
.case-feature dl div { min-height: 112px; }

@media (max-width: 1050px) {
  .hero-grid,
  .service-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual,
  .hero-visual img { min-height: 470px; }
  .service-summary { max-width: none; }
}

@media (max-width: 780px) {
  body { font-size: 15px; }
  .container { width: min(calc(100% - 30px), var(--max)); }
  .section { padding: 64px 0; }
  .header-row { min-height: 66px; }
  .brand { gap: 10px; }
  .brand-mark { width: 38px; height: 38px; }
  .nav-toggle { width: 42px; height: 42px; }
  h1,
  .service-hero h1 {
    font-size: clamp(2.7rem, 11.5vw, 3.65rem);
    line-height: 1.02;
    letter-spacing: -.04em;
  }
  h2 {
    font-size: clamp(2.15rem, 9vw, 3rem);
    line-height: 1.08;
  }
  .eyebrow { margin-bottom: 18px; letter-spacing: .14em; }
  .lead { margin-bottom: 26px; font-size: 1.08rem; }
  .button-row { align-items: stretch; }
  .button-row .button { flex: 1 1 180px; }
  .hero { padding-top: 48px; }
  .hero-grid,
  .service-hero-grid { gap: 34px; }
  .hero-visual,
  .hero-visual img { min-height: 320px; }
  .hero-visual { border-radius: var(--radius-md); }
  .hero-caption { font-size: .6rem; }
  .proof-strip { padding: 24px 0; }
  .proof-grid { gap: 18px 0; }
  .proof-grid div { min-height: 72px; padding-inline: 18px; }
  .proof-grid strong { font-size: 1.85rem; }
  .service-proof span { padding: 14px 10px; }
  .section-heading { gap: 22px; margin-bottom: 32px; }
  .solution-card,
  .case-card { min-height: 0; }
  .solution-card { padding-block: 26px; }
  .card-number { margin-bottom: 36px; }
  .choice-list { margin-top: 26px; }
  .choice-result { min-height: 300px; padding: 28px; }
  .choice-result h3 { margin-top: 44px; }
  .staff-tile { min-height: 170px; }
  .process-grid li { min-height: 155px; }
  .process-grid li span { margin-bottom: 34px; }
  .portrait-placeholder { min-height: 280px; }
  .prototype-form { padding: 22px; }
  .footer-grid { gap: 34px 24px; }
  .breadcrumbs { gap: 7px; margin-bottom: 28px; }
  .service-summary { padding: 0 22px 20px; }
  .service-image { height: 170px; margin-inline: -22px; }
  .service-summary dl { margin-top: 24px; }
  .service-summary dl div { grid-template-columns: .82fr 1.18fr; gap: 14px; padding: 10px 0; }
  .check-grid p { min-height: 0; }
  .model-diagram article,
  .feature-grid .card { min-height: 0; }
  .feature-grid .card > span { margin-bottom: 32px; }
}

@media (max-width: 500px) {
  .brand > span:last-child { max-width: none; }
  .button-row { display: grid; grid-template-columns: 1fr; }
  .button-row .button { width: 100%; }
  .hero-visual,
  .hero-visual img { min-height: 290px; }
  .proof-grid,
  .service-proof { grid-template-columns: 1fr 1fr; }
  .process-grid,
  .process-five { grid-template-columns: 1fr; }
  .process-grid li { min-height: 0; }
  .process-grid li span { margin-bottom: 24px; }
  .candidate-section { padding: 42px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .case-feature dl { grid-template-columns: 1fr; }
}

/* Этап 5.2 — AI-фотографии и предоставленный логотип. */

.brand {
  width: 200px;
  height: 48px;
  gap: 0;
  overflow: hidden;
  border-radius: 0;
  background: #fff url("assets/agent-service-logo.jpg") center / 125% auto no-repeat;
  box-shadow: none;
}

.brand > span { opacity: 0; }
.brand-footer {
  width: 210px;
  height: 50px;
  border-radius: var(--radius);
  background-color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%);
}

.page-outstaffing .service-image {
  background-image: linear-gradient(180deg, transparent 48%, var(--night)), url("assets/ai-outstaffing.jpg");
  background-position: center, center 42%;
}

.page-mass-recruitment .service-image {
  background-image: linear-gradient(180deg, transparent 48%, var(--night)), url("assets/ai-mass-recruitment.jpg");
  background-position: center, center 42%;
}

.page-targeted-recruitment .service-image {
  background-image: linear-gradient(180deg, transparent 48%, var(--night)), url("assets/ai-targeted-recruitment.jpg");
  background-position: center, center 40%;
}

.page-candidates .service-image {
  background-image: linear-gradient(180deg, transparent 48%, var(--night)), url("assets/ai-candidates.jpg");
  background-position: center, center 38%;
}

.service-image { background-size: cover; }

.staff-tile {
  isolation: isolate;
  color: #fff;
  background-position: center;
  background-size: cover;
}

.staff-tile::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(180deg, rgb(8 16 28 / 25%), rgb(8 16 28 / 88%));
  content: "";
  transition: background .35s ease;
}

.staff-tile::after { z-index: 1; }
.staff-tile > * { position: relative; z-index: 2; }
.staff-tile span,
.staff-tile small { color: rgb(255 255 255 / 74%); }
.staff-tile:hover::before { background: linear-gradient(180deg, rgb(40 85 255 / 34%), rgb(11 23 52 / 92%)); }
.staff-tile:hover span,
.staff-tile:hover small { color: rgb(255 255 255 / 82%); }
.staff-tile:nth-child(1) { background-image: url("assets/ai-hero-main.jpg"); background-position: center 38%; }
.staff-tile:nth-child(2) { background-image: url("assets/ai-mass-recruitment.jpg"); }
.staff-tile:nth-child(3) { background-image: url("assets/ai-candidates.jpg"); }
.staff-tile:nth-child(4) { background-image: url("assets/ai-outstaffing.jpg"); }
.staff-tile:nth-child(5) { background-image: url("assets/ai-team.jpg"); }
.staff-tile:nth-child(6) { background-image: url("assets/ai-targeted-recruitment.jpg"); }

.case-card { overflow: hidden; }
.case-image {
  display: block;
  width: calc(100% + 52px);
  max-width: none;
  height: 190px;
  margin: -26px -26px 24px;
  object-fit: cover;
}

.case-card:nth-child(1) .case-image { object-position: center 42%; }
.case-card:nth-child(2) .case-image { object-position: center 38%; }
.case-card:nth-child(3) .case-image { object-position: center 36%; }

.portrait-image {
  display: block;
  width: 100%;
  height: 270px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: inset 0 0 0 1px var(--line);
}

.team-grid > div:nth-child(1) .portrait-image { object-position: center 42%; }
.team-grid > div:nth-child(2) .portrait-image { object-position: 62% center; }
.team-grid > div:nth-child(3) .portrait-image { object-position: 36% center; }

@media (max-width: 1050px) {
  .brand { width: 184px; height: 46px; }
}

@media (max-width: 780px) {
  .brand,
  .brand-footer { width: 170px; height: 42px; }
  .hero-visual,
  .hero-visual img { height: 360px; min-height: 360px; }
  .case-image { height: 210px; }
  .portrait-image { height: 300px; }
}

@media (max-width: 390px) {
  .brand { width: 156px; height: 40px; }
}

/* Этап 5.3 — стабилизация адаптива после добавления фотографий. */

.hero-visual {
  height: clamp(540px, 47vw, 650px);
  min-height: 0;
}

.hero-visual img {
  display: block;
  height: 100%;
  min-height: 0;
}

@media (max-width: 1050px) and (min-width: 781px) {
  .hero-visual {
    height: clamp(470px, 54vw, 560px);
  }

  .solution-grid > :last-child:nth-child(odd),
  .case-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .solution-grid > :last-child:nth-child(odd) {
    min-height: 320px;
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .portrait-image {
    height: 250px;
  }

  .team-grid > :last-child:nth-child(odd) .portrait-image {
    height: 230px;
  }
}

@media (max-width: 980px) {
  .header-row { min-height: 72px; }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--paper);
    box-shadow: 0 18px 45px rgb(18 26 42 / 12%);
  }

  .main-nav[data-open="true"] { display: flex; }
  .main-nav a { padding: 15px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .main-nav a::after { display: none; }
}

@media (max-width: 780px) {
  .hero-visual {
    height: clamp(320px, 60vw, 360px);
  }

  .hero-visual img {
    height: 100%;
    min-height: 0;
  }

  .team-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }
}
