/* Cooperation page «Сотрудничество» — compact editorial layout */

.site-main--cooperation,
.cp-modal,
.contact-chooser {
  --cp-blue: var(--color-primary);
  --cp-navy: var(--color-accent-cooperation);
  --cp-ink: #111111;
  --cp-muted: #5a5a5a;
  --cp-line: #e4e0d8;
}

.site-main--cooperation {
  background: #f6f5f2;
  color: var(--cp-ink);
  overflow-x: clip;
}

.site-main--cooperation a:hover {
  opacity: 1;
}

.cp-wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-main--cooperation .hero__eyebrow {
  color: var(--color-primary);
  opacity: 1;
}

.site-main--cooperation .section__heading {
  margin: 0 0 1.75rem;
}

.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 26px;
  border: 0;
  border-radius: 4px;
  background: var(--cp-blue);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.cp-btn:hover {
  background: var(--color-primary-hover);
  opacity: 1;
}

.cp-btn:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}

.cp-btn--block {
  width: 100%;
}

.cp-mailto {
  margin: 0.85rem 0 0;
  font: var(--font-body-sm);
  color: var(--cp-muted);
  overflow-wrap: anywhere;
}

.cp-mailto a {
  color: var(--cp-blue);
  text-underline-offset: 3px;
}

/* Hero */
.cp-hero {
  position: relative;
  padding: 20px 0 28px;
  overflow: clip;
}

.cp-hero__grid {
  display: grid;
  gap: 24px;
  align-items: start;
}

.cp-hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  max-width: min(100%, 34rem);
}

.cp-hero__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(42px, 4.8vw + 18px, 94px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--cp-ink);
}

.cp-hero__lead {
  margin: 1.1rem 0 1.35rem;
  font: var(--font-body-lg);
  color: #2a2a2a;
}

.cp-hero__media {
  min-width: 0;
}

.cp-hero__figure {
  margin: 0;
  width: min(72%, 300px);
  aspect-ratio: 874 / 850;
  background: none;
  overflow: visible;
  line-height: 0;
}

.cp-hero__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
  filter: none;
  box-shadow: none;
  outline: none;
  border: 0;
}

@media (min-width: 1024px) {
  .cp-hero__grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    column-gap: clamp(16px, 2vw, 36px);
    align-items: stretch;
  }

  .cp-hero__copy {
    align-self: start;
  }

  .cp-hero__media {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    align-self: stretch;
    height: 100%;
    min-height: 100%;
    padding-inline-end: clamp(8px, 1.4vw, 28px);
  }

  .cp-hero__figure {
    width: 91%;
    max-width: 91%;
    height: auto;
    margin-inline-start: auto;
  }
}

@media (min-width: 1440px) {
  .cp-hero .cp-wrap {
    width: min(1240px, calc(100% - 48px));
  }
}

@media (min-width: 900px) and (max-width: 1023px) {
  .cp-hero__grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    column-gap: 20px;
    align-items: stretch;
  }

  .cp-hero__copy {
    align-self: start;
  }

  .cp-hero__media {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    align-self: stretch;
    height: 100%;
    min-height: 100%;
    padding-inline-end: 8px;
  }

  .cp-hero__figure {
    width: 91%;
    max-width: 91%;
    height: auto;
    margin-inline-start: auto;
  }
}

.cp-rule {
  display: block;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--cp-line);
  background: none;
  color: inherit;
}

/* Formats */
.cp-formats {
  width: 100%;
  max-width: none;
  padding: 34px 0;
  background: var(--cp-blue);
  color: #fff;
  overflow-x: clip;
  position: relative;
  z-index: 0;
}

.cp-formats__inner {
  padding: 0;
}

.cp-formats__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-format {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  padding: 23px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 2px;
  box-shadow: none;
  text-align: left;
  cursor: default;
}

.cp-format__n {
  display: block;
  margin: 0 0 10px;
  font-family: var(--font-family);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: var(--color-secondary);
}

.cp-format__t {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.18;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  min-height: 0;
}

.cp-format p {
  margin: 14px 0 0;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.cp-formats__note {
  margin: 26px 0 0;
  max-width: 760px;
  font-family: var(--font-family);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.cp-platforms {
  padding-top: 30px;
}

@media (min-width: 768px) {
  .cp-formats {
    padding: 46px 0;
  }

  .cp-formats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
  }

  .cp-format {
    padding: 28px;
    min-height: 230px;
    height: 100%;
  }

  .cp-format__t {
    min-height: 2.4em;
    font-size: 26px;
  }

  .cp-format p {
    font-size: 17px;
  }

  .cp-platforms {
    padding-top: 40px;
  }
}

@media (min-width: 1024px) {
  .cp-formats {
    padding: 60px 0;
  }

  .cp-formats__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cp-format {
    min-height: 240px;
  }

  .cp-platforms {
    padding-top: 52px;
  }
}

.site-main--cooperation .cp-formats .section__heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.12;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 36px;
  max-width: 18ch;
  text-align: left;
}

.site-main--cooperation .cp-platforms .section__heading {
  font: 800 clamp(33px, 4.7vw, 47px) / 1.12 var(--font-family);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 30px;
}

.site-main--cooperation .cp-partners .section__heading {
  font: var(--font-headline-section);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 40px;
}

/* Content platforms */
.cp-platforms {
  overflow-x: clip;
}

.cp-platforms__inner {
  padding: 0 0 36px;
}

.cp-platforms__lead {
  margin: -14px 0 28px;
  max-width: 62ch;
  font-size: 1.03125rem;
  line-height: 1.6;
  color: #3a3a3a;
}

.cp-platforms__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  container-type: inline-size;
}

.cp-platforms .platform-chip {
  box-sizing: border-box;
  flex: 0 0 calc((100% - 12px) / 2);
  width: calc((100% - 12px) / 2);
  max-width: calc((100% - 12px) / 2);
  min-width: 0;
  gap: 10px;
  padding: 12px 14px;
  font-size: 15px;
}

.cp-platforms .platform-chip--tripcom .platform-chip__icon {
  width: 72px;
  height: 20px;
  flex: 0 0 72px;
}

@media (min-width: 768px) and (max-width: 1279px) {
  .cp-platforms__buttons {
    gap: 14px;
  }

  .cp-platforms .platform-chip {
    flex-basis: calc((100% - 28px) / 3);
    width: calc((100% - 28px) / 3);
    max-width: calc((100% - 28px) / 3);
    font-size: 16px;
    padding: 14px 16px;
  }
}

@media (min-width: 1280px) {
  .cp-platforms__buttons {
    gap: 14px;
  }

  .cp-platforms .platform-chip {
    flex-basis: calc((100% - 56px) / 5);
    width: calc((100% - 56px) / 5);
    max-width: calc((100% - 56px) / 5);
    font-size: 16px;
    padding: 14px 16px;
  }
}

@container (min-width: 1480px) {
  .cp-platforms .platform-chip {
    flex-basis: calc((100% - 112px) / 9);
    width: calc((100% - 112px) / 9);
    max-width: calc((100% - 112px) / 9);
  }
}

/* Partners */
.cp-partners {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--cp-line);
  background: transparent;
}

.cp-partners__grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cp-partners__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-partner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 72px;
  padding: 4px 8px;
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.cp-partners__row--5 .cp-partner {
  max-width: 190px;
}

.cp-partners__row--4 .cp-partner {
  max-width: 210px;
}

.cp-partners__row--3 .cp-partner {
  max-width: 230px;
}

.cp-partner img {
  display: block;
  width: auto;
  height: auto;
  max-width: 150px;
  max-height: 52px;
  object-fit: contain;
  pointer-events: none;
}

.cp-partner--solemate img,
.cp-partner--tbank img,
.cp-partner--street-beat img {
  max-width: 148px;
  max-height: 44px;
}

.cp-partner--dubldom img,
.cp-partner--shanuar img,
.cp-partner--novikov-wrf img {
  max-width: 92px;
  max-height: 64px;
}

.cp-partner--priem img {
  max-width: 72px;
  max-height: 60px;
}

.cp-partner--pochta-rossii img,
.cp-partner--skolkovo img {
  max-width: 128px;
  max-height: 48px;
}

.cp-partner--britanika img,
.cp-partner--paleo-hunters img,
.cp-partner--aeroexpress img {
  max-width: 168px;
  max-height: 40px;
}

.cp-partner--vorobyovy-gory img,
.cp-partner--st-friday-socks img {
  max-width: 118px;
  max-height: 52px;
}

.cp-partner--moscow-transport img {
  max-width: 58px;
  max-height: 58px;
}

.cp-partner--tripster img {
  max-width: 148px;
  max-height: 38px;
}

@media (max-width: 768px) {
  .cp-hero {
    padding-bottom: 0;
  }

  .cp-platforms__inner {
    padding: 0 0 32px;
  }

  .site-main--cooperation .cp-formats .section__heading {
    margin-bottom: 28px;
  }

  .site-main--cooperation .cp-platforms .section__heading {
    margin-bottom: 24px;
  }

  .cp-partners {
    padding: 26px 0 24px;
  }

  .site-main--cooperation .cp-partners .section__heading {
    margin-bottom: 30px;
  }

  .cp-partners__grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 0;
  }

  .cp-partners__row {
    display: contents;
  }

  .cp-partner {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    min-height: 64px;
    padding: 8px 10px;
  }

  .cp-partners__row--5 .cp-partner,
  .cp-partners__row--4 .cp-partner,
  .cp-partners__row--3 .cp-partner {
    max-width: 33.333%;
  }

  .cp-partner img {
    max-width: min(140px, 100%);
    max-height: 44px;
  }

  .cp-partner--moscow-transport img,
  .cp-partner--priem img,
  .cp-partner--dubldom img {
    max-width: 56px;
    max-height: 52px;
  }

  .cp-partner--tripster img {
    max-width: min(132px, 100%);
    max-height: 34px;
  }
}

@media (max-width: 599px) {
  .cp-partner {
    flex: 0 0 50%;
    max-width: 50%;
    min-height: 60px;
    padding: 6px 8px;
  }

  .cp-partners__row--5 .cp-partner,
  .cp-partners__row--4 .cp-partner,
  .cp-partners__row--3 .cp-partner {
    max-width: 50%;
  }
}

.cp-btn--on-blue {
  background: var(--color-secondary);
  color: var(--color-on-secondary);
}

.cp-btn--on-blue:hover {
  background: var(--color-secondary-hover);
}

/* Final — navy from tokens so it works on About (where --cp-blue is undefined). */
.cp-final {
  --cp-blue: var(--color-hero-dark);
  background: var(--color-hero-dark);
  color: #fff;
  padding: 56px 0;
}

.cp-final__grid {
  display: grid;
  gap: 28px;
}

.cp-final__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 16px;
}

.cp-final__eyebrow {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.cp-final__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: var(--color-secondary);
  color: var(--color-on-secondary);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

@media (min-width: 1100px) {
  .cp-final__kicker {
    flex-wrap: nowrap;
    gap: 8px 10px;
  }
}

.cp-final__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.cp-final__title-line {
  display: block;
}

.cp-final__copy p {
  margin: 0;
  font: var(--font-body-lg);
  color: #fff;
}

.cp-final__more {
  margin-top: 20px !important;
  color: rgba(255, 255, 255, 0.82) !important;
}

.cp-final__cta {
  margin-top: 28px;
}

@media (min-width: 769px) {
  .cp-final {
    padding: 64px 0;
  }

  .cp-final__grid {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
    align-items: start;
    gap: clamp(48px, 5vw, 72px);
  }
}

@media (max-width: 768px) {
  .cp-final {
    padding: 48px 0;
  }

  .cp-final__cta {
    width: 100%;
  }
}

/* Modal */
.cp-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: auto;
}

.cp-modal[hidden] {
  display: none;
}

.cp-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, 0.48);
}

.cp-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  margin: 0 auto;
  padding: 20px 24px 12px;
  background: #fff;
  color: var(--cp-ink);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.cp-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
  margin: 0 0 0.5rem;
}

.cp-modal__head-text {
  min-width: 0;
  flex: 1 1 auto;
}

.cp-modal__close {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid #222;
  border-radius: 4px;
  background: #fff;
  color: #111;
  cursor: pointer;
  line-height: 0;
}

.cp-modal__close svg {
  display: block;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.cp-modal__close:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

.cp-modal__close:active {
  background: #2a2a2a;
  color: #fff;
  border-color: #2a2a2a;
}

.cp-modal__close:focus-visible {
  outline: 2px solid var(--cp-blue);
  outline-offset: 3px;
}

.cp-field input:focus-visible,
.cp-field textarea:focus-visible,
.cp-field--check input:focus-visible {
  outline: 2px solid var(--cp-blue);
  outline-offset: 2px;
}

.cp-modal__kicker {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cp-blue);
}

.cp-modal__title {
  margin: 0;
  padding-right: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.cp-modal__title[hidden],
.cp-modal__text[hidden] {
  display: none !important;
}

.cp-modal__success .cp-modal__title {
  margin: 0 0 0.5rem;
}

.cp-modal__text {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #444;
}

.cp-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.cp-form__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 2px;
}

.cp-form__foot {
  flex-shrink: 0;
  padding-top: 8px;
  padding-bottom: 0;
  background: #fff;
}

.cp-form__foot .cp-btn {
  margin: 0;
}

.cp-field {
  margin: 0 0 0.7rem;
}

.cp-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.cp-req {
  color: var(--cp-blue);
}

.cp-field input[type="text"],
.cp-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cfcbc4;
  border-radius: 2px;
  background: #fff;
  font: var(--font-body-md);
  font-family: inherit;
}

.cp-field textarea {
  min-height: 56px;
  resize: vertical;
}

.cp-field__hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #6a6a6a;
}

.cp-field__error,
.cp-form__error {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--color-error);
}

.cp-field.is-invalid input,
.cp-field.is-invalid textarea {
  border-color: var(--color-error);
}

.cp-field--honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.cp-field--check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px 10px;
  align-items: start;
}

.cp-field--check input {
  margin-top: 3px;
}

.cp-field--check label {
  margin: 0;
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.cp-field--check a {
  color: var(--cp-blue);
}

.cp-field--check .cp-field__error {
  grid-column: 1 / -1;
}

.cp-modal__success[hidden],
.cp-form[hidden] {
  display: none;
}

body.cp-modal-open {
  overflow: hidden;
}

@media (max-width: 699px) {
  .cp-wrap {
    width: min(1180px, calc(100% - 32px));
  }

  .cp-hero {
    padding-top: 24px;
    padding-bottom: 0;
    overflow: hidden;
    z-index: 1;
  }

  .cp-hero__grid {
    gap: 20px;
  }

  .cp-hero__copy {
    width: 100%;
    max-width: none;
  }

  .cp-hero__title .hero__title-line {
    white-space: nowrap;
  }

  .cp-hero__media {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: -1px;
    line-height: 0;
  }

  .cp-hero__figure {
    width: min(72%, 280px);
    margin-inline: auto;
    margin-bottom: 0;
    overflow: hidden;
    line-height: 0;
  }

  .cp-hero__photo {
    display: block;
    margin-bottom: -18px;
  }

  .cp-btn {
    width: 100%;
  }

  .cp-modal__dialog {
    margin-top: 12px;
    padding: 20px 16px 16px;
  }

  .cp-modal__close {
    width: 44px;
    height: 44px;
  }

  .cp-modal__close svg {
    width: 18px;
    height: 18px;
  }
}
