/* Контент Завод 2.0 and Ведение ВКонтакте: page layout on top of /site.css and /service-detail.css.
   Reused from the shared files: header, footer, --service-* tokens and .primary-action.
   Everything else is page-scoped: one centred container, headings above content, capped type scale.
   /vk-content/ loads this file too and adds blue accents in vk-content.css. */

.cf-page {
  --cf-max: 1140px;
  --cf-gap: 24px;
  --vk-blue: #0077ff;
  --vk-blue-text: #6aaeff;
  --vk-blue-deep: #003f9e;
  --vk-blue-mid: #0058cc;
  font-size: 17px;
  line-height: 1.6;
}

.cf-page [hidden] { display: none !important; }
.cf-page figure { margin: 0; }
.cf-page a.primary-action { margin-top: 0; color: var(--service-bg); }
.cf-nowrap { white-space: nowrap; }

.cf-plain {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Container: header, content and footer share one width on these pages. */
.cf-wrap,
.cf-page .service-head .shell,
.cf-page .service-footer .shell {
  width: min(calc(100% - 48px), var(--cf-max));
  margin-inline: auto;
}

/* Type scale */
.cf-page h1,
.cf-page h2,
.cf-page h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.cf-page h1 {
  max-width: 18ch;
  font-size: clamp(38px, 1.6rem + 3vw, 64px);
  line-height: 1.06;
  letter-spacing: -.025em;
}

.cf-page h2 {
  max-width: 32ch;
  font-size: clamp(28px, 1.2rem + 1.5vw, 36px);
  line-height: 1.15;
}

.cf-page h3 {
  font-size: clamp(19px, 1rem + .4vw, 22px);
  line-height: 1.25;
}

/* Sections */
.cf-section { padding-block: clamp(36px, 4.5vw, 60px); background: var(--service-bg); }
.cf-section--alt { background: var(--service-surface); }

.cf-head { max-width: 760px; margin-bottom: var(--cf-gap); }
.cf-head p { margin: 12px 0 0; color: rgba(243, 246, 241, .74); font-size: 17px; line-height: 1.6; }

.cf-sub { margin: 0 0 16px; }
.cf-sub--gap { margin-top: 40px; }

.cf-text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--service-text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(71, 255, 104, .65);
  text-underline-offset: 5px;
  transition: color .2s ease;
}

.cf-text-link:hover { color: var(--service-acid); }

/* Hero */
.cf-hero {
  padding-block: clamp(40px, 5.5vw, 72px) clamp(36px, 4.5vw, 60px);
  border-bottom: 1px solid var(--service-line);
  background:
    radial-gradient(circle at 88% 0%, rgba(71, 255, 104, .1), transparent 42%),
    var(--service-bg);
}

.cf-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.cf-product {
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--service-acid);
  font-size: 15px;
  font-weight: 700;
}

.cf-page .cf-product img { width: 24px; height: 24px; flex: none; }

.cf-hero h1 em { color: var(--service-acid); font-style: normal; }

.cf-lead {
  max-width: 60ch;
  margin: 18px 0 0;
  color: rgba(243, 246, 241, .8);
  font-size: 18px;
  line-height: 1.6;
}

.cf-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

/* The one business-result summary on each page */
.cf-result {
  padding: clamp(22px, 2.4vw, 32px);
  border: 1px solid rgba(71, 255, 104, .3);
  border-radius: 18px;
  background: var(--service-surface-strong);
}

.cf-result-tag {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(243, 246, 241, .8);
  font-size: 15px;
  font-weight: 600;
}

.cf-page .cf-result-tag img { width: 24px; height: 24px; flex: none; }

.cf-result-figure { margin: 16px 0 0; }

.cf-result-figure strong {
  display: block;
  color: var(--service-acid);
  font-size: clamp(44px, 2rem + 1.6vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  white-space: nowrap;
}

.cf-result-figure span { display: block; margin-top: 8px; font-size: 18px; font-weight: 600; line-height: 1.35; }

.cf-result p { margin: 14px 0 0; color: rgba(243, 246, 241, .8); font-size: 16px; line-height: 1.55; }
.cf-result small { display: block; margin-top: 10px; color: var(--service-muted); font-size: 14px; line-height: 1.5; }
.cf-result .cf-text-link { margin-top: 6px; }

/* Illustrations: concept art next to the real case, never in place of proof. 3:2, opaque, modest size. */
.cf-hero-side { min-width: 0; display: grid; gap: 16px; }

.cf-art {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--service-line);
  border-radius: 14px;
  background: var(--service-surface-strong);
}

.cf-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Screenshot evidence: image, one caption, open button. The numbers live on the screenshots. */
.cf-shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--cf-gap);
}

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

.cf-shot { min-width: 0; }

.cf-shot-open {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--service-line);
  border-radius: 14px;
  background: #0b0e0c;
  transition: border-color .2s ease;
}

.cf-shot-open img { width: 100%; height: 100%; object-fit: contain; }
.cf-shot-open:hover { border-color: rgba(71, 255, 104, .7); }

.cf-shot-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 12px;
  border: 1px solid rgba(243, 246, 241, .22);
  border-radius: 999px;
  background: rgba(5, 7, 6, .9);
  color: var(--service-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  transition: color .2s ease;
}

.cf-shot-open:hover .cf-shot-zoom { color: var(--service-acid); }

.cf-shot figcaption { margin-top: 10px; color: rgba(243, 246, 241, .84); font-size: 15px; line-height: 1.45; }

.cf-shots-fallback { grid-column: 1 / -1; margin: 0; color: var(--service-muted); font-size: 15px; }
.cf-shots-fallback a { text-decoration: underline; }

/* Two-column block: list plus side box */
.cf-split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--cf-gap);
  align-items: start;
}

.cf-split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cf-cards + .cf-split { margin-top: var(--cf-gap); }

/* Split with an illustration: text blocks stacked on the left, art on the right */
.cf-split--art { align-items: center; }
.cf-stack { min-width: 0; display: grid; gap: var(--cf-gap); }

.cf-checks { display: grid; gap: 10px; }

.cf-checks li {
  position: relative;
  padding-left: 22px;
  color: rgba(243, 246, 241, .86);
  font-size: 16px;
  line-height: 1.5;
}

.cf-checks li::before {
  content: "";
  position: absolute;
  top: .55em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--service-acid);
}

.cf-box {
  padding: clamp(20px, 2.2vw, 28px);
  border: 1px solid var(--service-line);
  border-radius: 16px;
  background: var(--service-surface-strong);
}

.cf-box p { margin: 10px 0 0; color: rgba(243, 246, 241, .8); font-size: 16px; line-height: 1.55; }

/* Media: videos and carousels at a practical preview size */
.cf-media {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px var(--cf-gap);
  align-items: start;
}

.cf-media--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cf-media > li { min-width: 0; }
.cf-media figure { max-width: 300px; margin-inline: auto; }
.cf-media .cf-carousel { max-width: 360px; }

.cf-video { scroll-margin-top: 96px; }

.cf-video-frame {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--service-line);
  border-radius: 14px;
  background: #050706;
}

.cf-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050706;
}

.cf-caption { margin-top: 12px; display: grid; gap: 4px; }
.cf-caption strong { font-size: 17px; font-weight: 600; line-height: 1.3; }
.cf-caption span { color: var(--service-muted); font-size: 14px; line-height: 1.45; }

/* Carousels: native scroll-snap track; proposal.js adds buttons, counter and arrow keys. */
.cf-carousel { min-width: 0; }
.cf-carousel--4x5 { --cf-slide: 4 / 5; }

.cf-carousel-viewport {
  overflow: hidden;
  border: 1px solid var(--service-line);
  border-radius: 14px;
  background: #050706;
}

.cf-carousel-track {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.cf-js .cf-carousel-track { scrollbar-width: none; }
.cf-js .cf-carousel-track::-webkit-scrollbar { display: none; }
.cf-carousel-track:focus-visible { outline: 2px solid var(--service-acid); outline-offset: -2px; }

.cf-carousel-track li {
  flex: 0 0 100%;
  aspect-ratio: var(--cf-slide, 3 / 4);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.cf-carousel-track img { width: 100%; height: 100%; object-fit: contain; }

.cf-carousel-controls {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cf-carousel-btn,
.cf-lightbox-btn {
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(243, 246, 241, .22);
  border-radius: 50%;
  background: transparent;
  color: var(--service-text);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, opacity .2s ease;
}

.cf-carousel-btn svg,
.cf-lightbox-btn svg { width: 18px; height: 18px; }

.cf-carousel-btn:hover:not(:disabled),
.cf-lightbox-btn:hover:not(:disabled) { border-color: var(--service-acid); color: var(--service-acid); }

.cf-carousel-btn:disabled { opacity: .3; cursor: default; }

.cf-carousel-count {
  margin: 0;
  color: var(--service-muted);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cf-carousel-current { color: var(--service-text); }

/* Cards: work models and plans */
.cf-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--cf-gap);
  align-items: stretch;
}

.cf-card {
  min-width: 0;
  padding: clamp(22px, 2.4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--service-line);
  border-radius: 18px;
  background: var(--service-surface-strong);
}

.cf-card--main { border-color: rgba(71, 255, 104, .35); }

.cf-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.cf-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(71, 255, 104, .12);
  color: var(--service-acid);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.cf-card > p { margin: 0; color: rgba(243, 246, 241, .8); font-size: 16px; line-height: 1.55; }

.cf-page .cf-price {
  margin: 0;
  font-size: clamp(28px, 1.2rem + 1.5vw, 36px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.cf-price span { color: var(--service-muted); font-size: 16px; font-weight: 600; letter-spacing: 0; }

.cf-fact {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(71, 255, 104, .07);
  font-size: 15px;
  line-height: 1.5;
}

.cf-fact strong { display: block; color: var(--service-acid); font-size: 24px; font-weight: 700; line-height: 1.15; }
.cf-fact span { display: block; margin-top: 4px; color: rgba(243, 246, 241, .8); }

.cf-after { max-width: 68ch; margin: 20px 0 0; color: rgba(243, 246, 241, .78); font-size: 16px; line-height: 1.6; }
.cf-after a { color: var(--service-text); text-decoration: underline; text-decoration-color: rgba(71, 255, 104, .65); text-underline-offset: 4px; }

/* Related offer: a small card, not a section */
.cf-related {
  margin-top: 32px;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  border: 1px solid rgba(0, 119, 255, .45);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 119, 255, .14), transparent 55%),
    var(--service-surface-strong);
}

.cf-related-main { display: flex; align-items: flex-start; gap: 14px; min-width: 0; flex: 1 1 420px; }
.cf-page .cf-related-main img { width: 32px; height: 32px; flex: none; }
.cf-related-main strong { display: block; font-size: 18px; font-weight: 600; line-height: 1.35; }
.cf-related-main p { margin: 4px 0 0; color: rgba(243, 246, 241, .78); font-size: 16px; line-height: 1.5; }
.cf-related .cf-text-link { text-decoration-color: var(--vk-blue-text); white-space: nowrap; }
.cf-related .cf-text-link:hover { color: var(--vk-blue-text); }

/* FAQ */
.cf-faq { max-width: 820px; border-top: 1px solid var(--service-line); }
.cf-faq details { border-bottom: 1px solid var(--service-line); }

.cf-faq summary {
  position: relative;
  padding: 16px 40px 16px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.cf-faq summary::-webkit-details-marker { display: none; }
.cf-faq summary::after { content: "+"; position: absolute; top: 12px; right: 4px; color: var(--service-acid); font-size: 24px; font-weight: 400; }
.cf-faq details[open] summary::after { content: "−"; }
.cf-faq p { max-width: 64ch; margin: 0 0 18px; color: rgba(243, 246, 241, .8); font-size: 16px; line-height: 1.6; }
.cf-faq p a { color: var(--service-text); text-decoration: underline; text-decoration-color: rgba(71, 255, 104, .65); text-underline-offset: 4px; }

/* Reading links */
.cf-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cf-link-card {
  min-height: 100%;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--service-line);
  border-radius: 14px;
  background: var(--service-surface-strong);
  transition: border-color .2s ease;
}

.cf-link-card small { display: block; color: var(--service-acid); font-size: 13px; font-weight: 700; }
.cf-link-card strong { display: block; margin-top: 4px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.cf-link-card > span { color: var(--service-muted); font-size: 18px; line-height: 1; }
.cf-link-card:hover { border-color: rgba(71, 255, 104, .5); }
.cf-link-card:hover > span { color: var(--service-acid); }

/* Final CTA */
.cf-final-box {
  padding: clamp(24px, 3vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 32px;
  align-items: center;
  border: 1px solid rgba(71, 255, 104, .3);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 50%, rgba(71, 255, 104, .12), transparent 45%),
    var(--service-surface-strong);
}

.cf-final-box p { max-width: 60ch; margin: 12px 0 0; color: rgba(243, 246, 241, .8); font-size: 17px; line-height: 1.6; }

/* Lightbox for screenshots */
.cf-lightbox {
  width: min(calc(100vw - 24px), 1100px);
  max-width: none;
  max-height: calc(100svh - 24px);
  padding: 12px 12px 16px;
  overflow: auto;
  border: 1px solid var(--service-line);
  border-radius: 18px;
  background: #050706;
  color: var(--service-text);
}

.cf-lightbox::backdrop { background: rgba(3, 4, 3, .88); }

.cf-lightbox-bar,
.cf-lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cf-lightbox-nav { margin-top: 12px; }
.cf-lightbox-count { margin: 0 0 0 6px; color: var(--service-muted); font-size: 14px; font-weight: 600; }
.cf-lightbox-figure { margin-top: 10px; }

.cf-lightbox-media img {
  width: 100%;
  max-height: calc(100svh - 190px);
  object-fit: contain;
  border-radius: 10px;
  background: #0b0e0c;
}

.cf-lightbox-figure figcaption { margin-top: 12px; color: rgba(243, 246, 241, .84); font-size: 15px; line-height: 1.5; }

html.cf-lock { overflow: hidden; }

.cf-page video:focus-visible,
.cf-page .cf-shot-open:focus-visible { outline: 2px solid var(--service-acid); outline-offset: 3px; }

/* Responsive */
@media (max-width: 960px) {
  .cf-hero-grid,
  .cf-split,
  .cf-cards { grid-template-columns: minmax(0, 1fr); }
  .cf-result,
  .cf-hero-side,
  .cf-split--art .cf-art { max-width: 560px; }
  .cf-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-media,
  .cf-media--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .cf-wrap,
  .cf-page .service-head .shell,
  .cf-page .service-footer .shell { width: min(calc(100% - 32px), var(--cf-max)); }
  .cf-lead { font-size: 17px; }
  .cf-links { grid-template-columns: minmax(0, 1fr); }
  .cf-final-box { grid-template-columns: minmax(0, 1fr); }
  .cf-lightbox { width: calc(100vw - 16px); max-height: calc(100svh - 16px); padding: 8px 8px 12px; }
  .cf-lightbox-media img { max-height: calc(100svh - 170px); }
}

@media (max-width: 560px) {
  .cf-shots,
  .cf-shots--2,
  .cf-media,
  .cf-media--3 { grid-template-columns: minmax(0, 1fr); }
  .cf-media figure { max-width: 280px; }
  .cf-media .cf-carousel { max-width: 340px; }
  .cf-faq summary { font-size: 17px; }
  .cf-related { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .cf-carousel-track { scroll-behavior: auto; }
  .cf-carousel-btn,
  .cf-lightbox-btn,
  .cf-shot-open,
  .cf-shot-zoom,
  .cf-link-card,
  .cf-text-link { transition: none; }
}
