/* ==========================================================================
   Campaign pages („Кампании“): shared layout and components.
   Every colour comes from a --cmp-* custom property. The defaults below are the
   APEM palette; a campaign sets its own scheme in assets/campaigns/<slug>/<slug>.css
   on .cmp-theme--<slug>.
   ========================================================================== */

.cmp,
.cmp-card {
  --cmp-bg: var(--slate-900);
  --cmp-bg-2: var(--slate-950);
  --cmp-bg-3: var(--slate);
  --cmp-on-dark: var(--on-dark);
  --cmp-on-dark-muted: var(--on-dark-muted);
  --cmp-line-dark: rgba(255, 255, 255, 0.12);
  --cmp-paper: var(--blush-light);
  --cmp-paper-2: var(--blush);
  --cmp-ink: var(--ink);
  --cmp-muted: var(--muted);
  --cmp-line: var(--line);
  --cmp-ink-line: var(--line);
  --cmp-accent: var(--magenta);
  --cmp-accent-ink: var(--magenta-ink);
  --cmp-accent-soft: var(--magenta-soft);
  --cmp-cool: var(--amber);
  --cmp-tape: rgba(255, 255, 255, 0.55);
  --cmp-note: var(--amber-soft);
  --cmp-photo-border: #fff;
  --cmp-rule: transparent;
  --cmp-margin-line: transparent;
  --cmp-marquee-ink: #fff;
  --cmp-font-hand: var(--font);
  --cmp-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m13 6 6 6-6 6'/%3E%3C/svg%3E");
  --cmp-torn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 18' preserveAspectRatio='none'%3E%3Cpath d='M0 18V9l14 3 12-6 16 5 13-7 17 6 11-3 18 6 14-5 15 4 13-6 18 6 12-4 16 6 14-7 15 5 12-4 17 5 14-6 13 5 16-3 14 5 12-7 18 5 13-7 15 6 14-4 16 6 12-6 17 4 13-5 15 4 14-7 16 6 13-5 15 6 12-6 15 5 13-4 16 6 14-6 15 4 12-2 8 2v9z'/%3E%3C/svg%3E");
  --cmp-strike: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none' fill='none' stroke='black' stroke-linecap='round'%3E%3Cpath d='M3 13C41 7 88 15 129 9s52-2 68 3' stroke-width='5'/%3E%3Cpath d='M9 18c49-6 112 1 184-5' stroke-width='3.4'/%3E%3C/svg%3E");
  --cmp-underline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 30' preserveAspectRatio='none' fill='none' stroke='black' stroke-linecap='round'%3E%3Cpath d='M4 17C72 7 151 5 296 13' stroke-width='7'/%3E%3Cpath d='M34 25c78-7 151-8 226-4' stroke-width='4'/%3E%3C/svg%3E");
}

main:has(.cmp-page) {
  padding-top: 0;
}

.cmp {
  position: relative;
  overflow-x: clip;
  color: var(--cmp-ink);
}

.cmp h1,
.cmp h2,
.cmp h3 {
  color: inherit;
}

/* ---------- Sections ---------- */

.cmp-dark,
.cmp-paper {
  position: relative;
  isolation: isolate;
  padding: clamp(72px, 9vw, 136px) 0;
}

.cmp-dark {
  z-index: 0;
  background: var(--cmp-bg);
  color: var(--cmp-on-dark);
}

/* Paper sits above its dark neighbours so its torn edges overlap them */
.cmp-paper {
  /* The margin line sits just left of the text column (the .container's left edge, in % of this
     full-width section so a scrollbar does not shift it), never further in than 84px */
  --cmp-margin-x: min(calc(max(24px, (100% - var(--container)) / 2) - 14px), 84px);
  --cmp-rule-gap: 34px;
  z-index: 1;
  background-color: var(--cmp-paper);
  background-image:
    linear-gradient(90deg, transparent calc(var(--cmp-margin-x) - 1px), var(--cmp-margin-line) calc(var(--cmp-margin-x) - 1px) calc(var(--cmp-margin-x) + 1px), transparent calc(var(--cmp-margin-x) + 1px)),
    repeating-linear-gradient(180deg, transparent 0 calc(var(--cmp-rule-gap) - 1px), var(--cmp-rule) calc(var(--cmp-rule-gap) - 1px) var(--cmp-rule-gap));
  color: var(--cmp-ink);
}

.cmp-paper--alt {
  background-color: var(--cmp-paper-2);
}

.cmp-dark + .cmp-paper::before,
.cmp-paper:has(+ .cmp-dark)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 18px;
  background-color: inherit;
  -webkit-mask: var(--cmp-torn) 0 0 / 600px 100% repeat-x;
  mask: var(--cmp-torn) 0 0 / 600px 100% repeat-x;
  pointer-events: none;
}

.cmp-dark + .cmp-paper::before {
  top: -17px;
}

.cmp-paper:has(+ .cmp-dark)::after {
  bottom: -17px;
  transform: scaleY(-1);
}

/* ---------- Type ---------- */

.cmp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 8px 16px;
  border: 1px solid var(--cmp-line-dark);
  border-radius: 999px;
  font: 600 12.5px/1.2 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cmp-cool);
}

.cmp-eyebrow--paper {
  border-color: var(--cmp-line);
  color: var(--cmp-accent-ink);
}

.cmp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cmp-accent);
  flex: none;
}

.cmp-hero-title,
.cmp-title,
.cmp-subtitle,
.cmp-statement-line {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.cmp-hero-title {
  margin: 0 0 26px;
  font-size: clamp(36px, 4.8vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
}

.cmp-title {
  margin: 0 0 20px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
}

.cmp-dark .cmp-title {
  color: #fff;
}

.cmp-title--xl {
  font-size: clamp(30px, 3.8vw, 52px);
}

.cmp-subtitle {
  margin: 0 0 22px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.25;
}

.cmp-statement-line {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(28px, 3.8vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.cmp-hero-lead,
.cmp-lead {
  max-width: 58ch;
  margin: 0 0 16px;
  font-size: clamp(17px, 1.3vw, 19.5px);
  line-height: 1.65;
}

.cmp-dark .cmp-lead,
.cmp-hero-lead {
  color: var(--cmp-on-dark);
}

.cmp-paper .cmp-lead {
  color: var(--cmp-muted);
}

.cmp-accent {
  color: var(--cmp-accent);
}

.cmp-paper .cmp-accent {
  color: var(--cmp-accent-ink);
}

.cmp-hand {
  font-family: var(--cmp-font-hand);
  font-weight: 700;
  letter-spacing: 0;
}

/* Red-pen strike-through (~~text~~ in the editor) */
.cmp-strike {
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

.cmp-strike::after {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  top: 52%;
  height: 0.5em;
  translate: 0 -50%;
  background: var(--cmp-accent);
  -webkit-mask: var(--cmp-strike) center / 100% 100% no-repeat;
  mask: var(--cmp-strike) center / 100% 100% no-repeat;
  transform-origin: left center;
  transition: transform 0.7s var(--ease) 0.25s;
  pointer-events: none;
}

.cmp-paper .cmp-strike::after {
  background: var(--cmp-accent-ink);
}

.cmp-head {
  max-width: 780px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.cmp-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  max-width: none;
}

.cmp-head--split .cmp-title {
  margin-bottom: 0;
}

/* ---------- Buttons and links ---------- */

.cmp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.cmp-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 24px 8px 8px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 16px/1.1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), translate 0.25s var(--ease);
}

.cmp-btn:hover {
  translate: 0 -2px;
}

.cmp-btn--primary {
  background: var(--cmp-accent-ink);
  color: #fff;
}

.cmp-btn--primary:hover {
  background: color-mix(in srgb, var(--cmp-accent-ink) 80%, #000);
  color: #fff;
}

.cmp-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.cmp-btn--ghost:hover {
  background: #fff;
  border-color: #fff;
  color: var(--cmp-bg);
}

.cmp-btn-icon,
.cmp-btn-arrow {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  flex: none;
}

.cmp-btn-icon::before,
.cmp-btn-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: var(--cmp-icon, var(--cmp-arrow)) center / contain no-repeat;
  mask: var(--cmp-icon, var(--cmp-arrow)) center / contain no-repeat;
  transition: rotate 0.3s var(--ease);
}

.cmp-btn--ghost:hover .cmp-btn-icon {
  background: rgba(0, 0, 0, 0.08);
}

.cmp-btn-icon--play {
  --cmp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15a1 1 0 0 0 1.5.86l12.4-7.5a1 1 0 0 0 0-1.72L8.5 3.64A1 1 0 0 0 7 4.5z'/%3E%3C/svg%3E");
}

.cmp-btn-icon--share {
  --cmp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.6 13.5 6.8 4M15.4 6.5l-6.8 4'/%3E%3C/svg%3E");
}

/* Arrow after the label */
.cmp-btn:has(.cmp-btn-arrow) {
  padding: 8px 8px 8px 26px;
}

.cmp-btn:hover .cmp-btn-arrow::before {
  rotate: -45deg;
}

.cmp-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--cmp-accent-ink);
  text-decoration: none;
}

/* Solid circle in the link colour with the arrow cut out of it */
.cmp-link::after {
  content: "";
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: currentColor;
  -webkit-mask-image: var(--cmp-arrow), linear-gradient(#000 0 0);
  -webkit-mask-position: center;
  -webkit-mask-size: 15px, auto;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-composite: xor;
  mask-image: var(--cmp-arrow), linear-gradient(#000 0 0);
  mask-position: center;
  mask-size: 15px, auto;
  mask-repeat: no-repeat;
  mask-composite: exclude;
  flex: none;
  transition: rotate 0.3s var(--ease);
}

.cmp-link:hover {
  color: var(--cmp-ink);
}

.cmp-link:hover::after {
  rotate: -45deg;
}

.cmp-link--light {
  color: #fff;
}

.cmp-link--light:hover {
  color: var(--cmp-accent);
}

/* ---------- Tape, photos ---------- */

.cmp-tape {
  position: absolute;
  z-index: 3;
  width: 112px;
  height: 34px;
  background: var(--cmp-tape);
  clip-path: polygon(3% 0, 97% 5%, 100% 24%, 96% 48%, 100% 74%, 97% 100%, 2% 95%, 0 72%, 4% 50%, 0 26%);
  pointer-events: none;
}

.cmp-tape--a {
  top: -14px;
  left: -30px;
  rotate: -34deg;
}

.cmp-tape--b {
  right: -30px;
  bottom: -14px;
  rotate: -30deg;
}

/* ---------- Hero ---------- */

.cmp-hero {
  display: flex;
  align-items: center;
  min-height: min(100svh, 980px);
  padding: clamp(132px, 13vw, 176px) 0 clamp(96px, 10vw, 140px);
  overflow: hidden;
}

.cmp-hero > .container {
  position: relative;
  z-index: 2;
}

.cmp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.cmp-hero-title .cmp-accent {
  position: relative;
  white-space: nowrap;
}

.cmp-hero-title .cmp-accent::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -4%;
  bottom: -0.14em;
  height: 0.26em;
  background: currentColor;
  -webkit-mask: var(--cmp-underline) center / 100% 100% no-repeat;
  mask: var(--cmp-underline) center / 100% 100% no-repeat;
  transform-origin: left center;
  animation: cmp-draw 0.9s var(--ease) 0.5s both;
}

@keyframes cmp-draw {
  from { transform: scaleX(0); }
  to { transform: none; }
}

/* ---------- Video ---------- */

.cmp-video {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 540px;
  margin: 0;
  rotate: 2deg;
}

.cmp-video-frame {
  position: relative;
  overflow: hidden;
  padding: clamp(9px, 1.1vw, 14px);
  border-radius: 4px;
  background: var(--cmp-photo-border);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.5);
}

.cmp-video-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  background: #000;
}

.cmp-video-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(76px, 8vw, 96px);
  height: clamp(76px, 8vw, 96px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cmp-accent-ink);
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: scale 0.3s var(--ease), opacity 0.3s var(--ease);
}

.cmp-video-play span {
  width: 34%;
  height: 34%;
  margin-left: 6%;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3.8v16.4a1 1 0 0 0 1.5.86l13.7-8.2a1 1 0 0 0 0-1.72L7.5 2.94A1 1 0 0 0 6 3.8z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3.8v16.4a1 1 0 0 0 1.5.86l13.7-8.2a1 1 0 0 0 0-1.72L7.5 2.94A1 1 0 0 0 6 3.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cmp-video-play:hover {
  scale: 1.07;
}

.cmp-video.is-sound .cmp-video-play,
.cmp-video.is-error .cmp-video-play {
  opacity: 0;
  pointer-events: none;
}

.cmp-video-replay {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--cmp-accent-ink);
  color: #fff;
  font: 600 16px/1 var(--font);
  translate: -50% -50%;
  cursor: pointer;
}

.cmp-video-replay[hidden] {
  display: none;
}

.cmp-video-error {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  display: none;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.cmp-video.is-error .cmp-video-error {
  display: block;
}

.cmp-video-note {
  position: absolute;
  left: -36px;
  bottom: -62px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin: 0;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1;
  color: var(--cmp-accent);
  rotate: -7deg;
}

.cmp-video-note svg,
.cmp-margin-note svg {
  width: 56px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.cmp-video-note svg {
  order: -1;
  scale: -1 1;
}

/* ---------- Marquee ---------- */

.cmp-marquee {
  position: relative;
  z-index: 4;
  overflow: hidden;
  margin: -34px -3vw -12px;
  padding: 18px 0;
  background: var(--cmp-accent);
  color: var(--cmp-marquee-ink);
  rotate: -1.6deg;
}

.cmp-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: cmp-marquee 60s linear infinite;
}

.cmp-marquee-track span,
.cmp-marquee-track i {
  margin-right: 28px;
}

.cmp-marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.6vw, 22px);
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.cmp-marquee-track i {
  font-style: normal;
  font-size: clamp(14px, 1.3vw, 18px);
  opacity: 0.75;
}

@keyframes cmp-marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Manifesto ---------- */

.cmp-manifesto {
  padding-top: clamp(112px, 12vw, 176px);
}

.cmp-manifesto-inner {
  position: relative;
  max-width: 980px;
}

.cmp-manifesto-text {
  margin: 0;
  font-size: clamp(22px, 2.35vw, 33px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--cmp-ink);
}

.cmp-margin-note {
  position: absolute;
  right: -24px;
  bottom: -70px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1;
  color: var(--cmp-accent-ink);
  rotate: -6deg;
}

/* ---------- Undo ---------- */

.cmp-undo-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(48px, 7vw, 112px);
  align-items: center;
}

.cmp-undo-visual {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 400px;
}

.cmp-photo {
  position: relative;
  padding: 12px 12px 54px;
  background: var(--cmp-photo-border);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  rotate: -3deg;
}

.cmp-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 480 / 656;
  object-fit: cover;
}

.cmp-photo .cmp-photo-before {
  position: absolute;
  top: 12px;
  left: 12px;
  width: calc(100% - 24px);
  opacity: 0;
}

.cmp-photo-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 2;
  margin: 0;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1;
  text-align: center;
  color: var(--cmp-ink);
  rotate: -3deg;
}

.cmp-photo-label-before {
  display: none;
}

.cmp-undo.is-undoing .cmp-photo-label-before {
  display: inline;
  color: var(--cmp-accent-ink);
}

.cmp-undo.is-undoing .cmp-photo-label-after {
  display: none;
}

.cmp-undo-key {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 26px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.cmp-keys {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cmp-keys kbd {
  display: inline-grid;
  place-items: center;
  min-width: 66px;
  height: 62px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--cmp-bg-3), var(--cmp-bg-2));
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 600 19px/1 var(--font-display);
  transition: translate 0.12s ease, box-shadow 0.12s ease, border-color 0.2s ease;
}

.cmp-keys > span {
  font-size: 22px;
  color: var(--cmp-on-dark-muted);
}

.cmp-undo-key:hover kbd,
.cmp-undo-key:focus-visible kbd {
  border-color: var(--cmp-accent);
}

.cmp-undo-key:active kbd,
.cmp-undo.is-undoing kbd {
  translate: 0 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
}

.cmp-undo-key-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--cmp-on-dark-muted);
}

.cmp-undo-reply {
  min-height: 1.2em;
  margin: 22px 0 0;
  font-family: var(--cmp-font-hand);
  font-size: clamp(28px, 2.8vw, 38px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--cmp-accent);
  opacity: 0;
  translate: 0 8px;
  transition: opacity 0.3s var(--ease), translate 0.3s var(--ease);
}

.cmp-undo-reply.is-visible {
  opacity: 1;
  translate: 0 0;
}

.cmp-undo.is-undoing .cmp-photo-before {
  animation: cmp-undo-flash 1s linear both;
}

.cmp-undo.is-undoing .cmp-photo {
  animation: cmp-shake 0.5s var(--ease) 0.62s;
}

@keyframes cmp-undo-flash {
  0% { opacity: 0; }
  6% { opacity: 1; transform: translateX(-6px); }
  12% { transform: translateX(5px); }
  18% { transform: none; }
  50% { opacity: 1; }
  56% { opacity: 0.15; transform: translateX(4px); }
  60% { opacity: 1; transform: none; }
  68%,
  100% { opacity: 0; }
}

@keyframes cmp-shake {
  0%,
  100% { transform: none; }
  20% { transform: translateX(-8px) rotate(-1.2deg); }
  40% { transform: translateX(7px) rotate(1deg); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

/* ---------- Risks ---------- */

.cmp-risk-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 14px;
  margin: 0 0 clamp(44px, 5vw, 72px);
  padding: 0;
  list-style: none;
}

.cmp-risk {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 168px;
  padding: 22px 22px 24px;
  border: 1.5px solid var(--cmp-ink-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
}

.cmp-risk-num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cmp-muted);
}

.cmp-risk-label {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.45vw, 20px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.cmp-risk-mark {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--cmp-accent-ink);
  stroke-width: 4;
  stroke-linecap: round;
}

.cmp-risk-mark path {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.45s var(--ease) 0.2s;
}

.cmp-risk-mark path + path {
  transition-delay: 0.5s;
}

.cmp-warning {
  position: relative;
  max-width: 780px;
  margin: 0 0 clamp(52px, 6vw, 88px);
  padding: 28px 32px 28px 86px;
  border-radius: 6px;
  background: var(--cmp-note);
  color: var(--cmp-ink);
  box-shadow: 0 18px 40px rgba(20, 27, 34, 0.1);
  rotate: -0.6deg;
}

.cmp-warning .cmp-tape--a {
  top: -16px;
  left: 50%;
  width: 96px;
  height: 30px;
  translate: -50% 0;
  rotate: 3deg;
}

.cmp-warning-icon {
  position: absolute;
  top: 26px;
  left: 28px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cmp-accent-ink);
  color: #fff;
  font: 700 19px/1 var(--font-display);
}

.cmp-warning p {
  margin: 0;
  font-size: clamp(16.5px, 1.3vw, 18.5px);
  font-weight: 500;
  line-height: 1.6;
}

/* ---------- Statement with the poster ---------- */

.cmp-statement-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(44px, 6vw, 96px);
  align-items: center;
}

.cmp-poster {
  position: relative;
  margin: 0;
  rotate: 2.4deg;
}

.cmp-poster img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.5);
}

/* ---------- About ---------- */

.cmp-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.cmp-note {
  margin-top: 28px;
  padding: 22px 24px;
  border-left: 4px solid var(--cmp-accent-ink);
  border-radius: 0 16px 16px 0;
  background: rgba(255, 255, 255, 0.65);
}

.cmp-note h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.cmp-note p {
  margin: 0;
  color: var(--cmp-muted);
  font-size: 16px;
}

.cmp-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.cmp-stat {
  padding: 24px 22px;
  border-radius: 20px;
  background: var(--cmp-bg);
  color: var(--cmp-on-dark);
}

.cmp-stat dt {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--cmp-accent);
}

.cmp-stat dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--cmp-on-dark-muted);
}

.cmp-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(48px, 6vw, 80px);
}

.cmp-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(24px, 2.6vw, 34px);
  border: 1.5px solid var(--cmp-ink-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.65);
}

.cmp-panel-num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cmp-accent-ink);
}

.cmp-panel h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.7vw, 23px);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.cmp-panel p {
  margin: 0 0 10px;
  color: var(--cmp-muted);
}

.cmp-panel .cmp-link {
  margin-top: auto;
}

.cmp-support {
  max-width: 880px;
  margin-top: 34px;
  color: var(--cmp-muted);
  font-size: 15px;
  line-height: 1.6;
}

.cmp-support p {
  margin: 0;
}

/* ---------- Experts ---------- */

.cmp-experts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 2.6vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cmp-expert {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmp-polaroid {
  position: relative;
  margin: 0 0 16px;
  padding: 10px 10px 34px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(20, 27, 34, 0.14);
  rotate: -1.8deg;
}

.cmp-expert:nth-child(even) .cmp-polaroid {
  rotate: 1.6deg;
}

.cmp-polaroid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
}

.cmp-polaroid .cmp-tape--a {
  top: -13px;
  left: 50%;
  width: 92px;
  height: 28px;
  translate: -50% 0;
  rotate: -4deg;
}

.cmp-expert h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.cmp-expert p {
  margin: 0 0 6px;
  color: var(--cmp-muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.cmp-expert .cmp-link {
  margin-top: auto;
  font-size: 15px;
}

/* ---------- Posts ---------- */

.cmp-posts-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
}

.cmp-post {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--cmp-on-dark);
  text-decoration: none;
}

.cmp-post-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: var(--cmp-bg-3);
}

.cmp-post-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.5s var(--ease);
}

.cmp-post:hover .cmp-post-thumb img {
  scale: 1.05;
}

.cmp-post time {
  font-size: 13.5px;
  color: var(--cmp-on-dark-muted);
}

.cmp-post-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  transition: color 0.2s var(--ease);
}

.cmp-post:hover .cmp-post-title {
  color: var(--cmp-accent);
}

/* ---------- Partners ---------- */

.cmp-posts + .cmp-partners {
  padding-top: 0;
}

.cmp-partners-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
}

.cmp-posts + .cmp-partners .cmp-partners-grid {
  padding-top: clamp(56px, 6vw, 88px);
  border-top: 1px solid var(--cmp-line-dark);
}

.cmp-partners .cmp-subtitle {
  color: #fff;
}

.cmp-partner-list {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cmp-partner-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--cmp-on-dark);
  text-decoration: none;
}

.cmp-partner-logo {
  width: 84px;
  height: auto;
  flex: none;
}

.cmp-partner-text strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16.5px;
  font-weight: 700;
  color: #fff;
}

.cmp-partner-text span {
  display: block;
  color: var(--cmp-on-dark-muted);
  font-size: 14.5px;
  line-height: 1.5;
}

a.cmp-partner-inner:hover strong {
  color: var(--cmp-accent);
}

.cmp-logo-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 56px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cmp-logo-list a {
  display: block;
  opacity: 0.88;
  transition: opacity 0.2s var(--ease);
}

.cmp-logo-list a:hover {
  opacity: 1;
}

.cmp-logo-list img {
  display: block;
  width: auto;
  height: auto;
  max-width: 200px;
  max-height: 56px;
}

/* ---------- Outro: APEM, share, contacts ---------- */

.cmp-outro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.cmp-outro-logo {
  display: block;
  width: 96px;
  height: 96px;
  margin-bottom: 22px;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.75);
}

.cmp-outro-apem .cmp-btn {
  margin-top: 16px;
}

.cmp-outro-side {
  display: grid;
  gap: 18px;
}

.cmp-card-note {
  padding: 26px 26px 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(20, 27, 34, 0.08);
}

.cmp-card-note .cmp-subtitle {
  margin-bottom: 16px;
}

.cmp-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cmp-share a,
.cmp-share button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--cmp-ink-line);
  border-radius: 999px;
  background: transparent;
  color: var(--cmp-ink);
  font: 600 15px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cmp-share a:hover,
.cmp-share button:hover {
  border-color: var(--cmp-ink);
  background: var(--cmp-ink);
  color: #fff;
}

.cmp-contacts a {
  display: block;
  width: fit-content;
  padding: 3px 0;
  color: var(--cmp-ink);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

.cmp-contacts a:hover {
  color: var(--cmp-accent-ink);
}

.cmp-footnote {
  width: min(var(--container), calc(100% - 48px));
  margin: clamp(48px, 6vw, 80px) auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--cmp-ink-line);
  color: var(--cmp-muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- Toast ---------- */

.cmp-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 300;
  max-width: calc(100vw - 32px);
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--cmp-ink);
  color: #fff;
  font: 600 15px/1.3 var(--font);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  translate: -50% 16px;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), translate 0.25s var(--ease);
}

.cmp-toast.is-visible {
  opacity: 1;
  translate: -50% 0;
}

/* ---------- Hub („Кампании“) ---------- */

.cmp-hub {
  display: grid;
  gap: 28px;
}

.cmp-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--cmp-bg);
  color: var(--cmp-on-dark);
  text-decoration: none;
  transition: translate 0.35s var(--ease);
}

.cmp-card:hover {
  translate: 0 -4px;
  color: var(--cmp-on-dark);
}

/* The key visual keeps its own proportions (no crop: posters carry text), centred on the dark
   card when the text column is taller */
.cmp-card-media {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--cmp-bg-2);
}

.cmp-card-media img {
  display: block;
  width: 100%;
  height: auto;
  transition: scale 0.6s var(--ease);
}

.cmp-card:hover .cmp-card-media img {
  scale: 1.04;
}

.cmp-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: clamp(28px, 3.4vw, 52px);
}

.cmp-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 12.5px/1.2 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cmp-cool);
}

.cmp-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cmp-accent);
}

.cmp-card-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
}

.cmp-card-text {
  color: var(--cmp-on-dark-muted);
  font-size: 16.5px;
  line-height: 1.6;
}

.cmp-card-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-weight: 700;
  color: #fff;
}

.cmp-card-link::after {
  content: "";
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--cmp-accent-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m13 6 6 6-6 6'/%3E%3C/svg%3E");
  background-position: center;
  background-size: 17px;
  background-repeat: no-repeat;
  transition: rotate 0.3s var(--ease);
}

.cmp-card:hover .cmp-card-link::after {
  rotate: -45deg;
}

.cmp-hub-intro p {
  margin: 0;
}

.cmp-hub-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(40px, 5vw, 72px);
  padding: clamp(28px, 3.4vw, 48px);
  border-radius: var(--r-lg);
  background: var(--blush-light);
}

.cmp-hub-cta h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.2vw, 30px);
}

.cmp-hub-cta p {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
}

/* ---------- Reveal (progressive enhancement: .cmp-js is set by campaigns.js) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .cmp-js [data-cmp-reveal] {
    transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
  }

  .cmp-js [data-cmp-reveal]:not(.is-in) {
    opacity: 0;
    translate: 0 32px;
  }

  .cmp-js [data-cmp-reveal]:not(.is-in) .cmp-strike::after {
    transform: scaleX(0);
  }

  .cmp-js .cmp-risk:not(.is-in) .cmp-risk-mark path {
    stroke-dashoffset: 100;
  }

  @supports (animation-timeline: view()) {
    .cmp-manifesto-text .cmp-sentence {
      animation: cmp-ink linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 42%;
    }
  }
}

@keyframes cmp-ink {
  from { opacity: 0.2; }
  to { opacity: 1; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .cmp-hero {
    min-height: 0;
  }

  .cmp-hero-grid,
  .cmp-undo-grid,
  .cmp-statement-grid,
  .cmp-about-grid,
  .cmp-partners-grid,
  .cmp-outro-grid,
  .cmp-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .cmp-video {
    max-width: 500px;
    margin-top: 8px;
  }

  .cmp-undo-visual {
    max-width: 340px;
  }

  .cmp-margin-note {
    position: static;
    justify-content: flex-end;
    margin-top: 22px;
  }

  .cmp-experts-grid,
  .cmp-posts-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cmp-tape {
    width: 92px;
    height: 28px;
  }
}

@media (max-width: 760px) {
  .cmp-hero {
    padding-top: 118px;
  }

  .cmp-video {
    margin-bottom: 44px;
  }

  .cmp-video-note {
    left: auto;
    right: 4px;
    bottom: -52px;
  }

  .cmp-video-note svg {
    order: 0;
    scale: 1 1;
  }

  .cmp-marquee {
    padding: 14px 0;
  }

  .cmp-risk-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cmp-risk {
    min-height: 132px;
    padding: 18px 16px 18px;
  }

  .cmp-risk-mark {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
  }

  .cmp-warning {
    padding: 64px 22px 24px;
  }

  .cmp-warning-icon {
    top: 18px;
    left: 22px;
  }

  .cmp-panels {
    grid-template-columns: minmax(0, 1fr);
  }

  .cmp-experts-grid {
    gap: 26px 16px;
  }

  .cmp-expert h3 {
    font-size: 15px;
  }

  .cmp-expert p {
    font-size: 13.5px;
  }

  /* Phones: the text column starts 16px in, the margin line just before it */
  .cmp-paper {
    --cmp-margin-x: 7px;
  }

  /* Posts slide sideways on phones instead of a long column; scroll-padding keeps the snapped
     card on the 16px gutter instead of the screen edge */
  .cmp-posts-row {
    display: flex;
    gap: 14px;
    margin: 0 -16px;
    padding: 0 16px 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }

  .cmp-posts-row::-webkit-scrollbar {
    display: none;
  }

  .cmp-post {
    flex: 0 0 80%;
    scroll-snap-align: start;
  }

  .cmp-partner-inner {
    align-items: flex-start;
  }

  .cmp-partner-logo {
    width: 64px;
  }

  .cmp-card-note {
    padding: 22px 20px 24px;
  }

  .cmp-footnote {
    width: calc(100% - 32px);
  }
}

@media (max-width: 420px) {
  .cmp-actions .cmp-btn {
    width: 100%;
  }

  .cmp-stats {
    gap: 10px;
  }

  .cmp-stat {
    padding: 20px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cmp-marquee-track {
    animation: none;
  }
}
