/* =============================================================
   Case — WOW Platform
   Page-scoped overrides to match Figma (light theme, blue brand)
   Frame: ppMhxLpkjU8DT8grVOigNF / 62:438 (width 1280, side pad 56)
   Source of truth: Figma get_design_context / get_metadata.
   All rules are prefixed with .case-wow so they only affect this page
   and reliably override the shared dark .case-* rules in styles.css.
   ============================================================= */

/* ---- Page base: flip to light ---- */
.case-wow.case-wow { background: #ffffff; }
.case-wow .case-page { background: #ffffff; color: #181a1f; }

/* Figma brand blue used across the page */
.case-wow {
  --wow-blue: #2e5bff;
  --wow-ink: #181a1f;
  --wow-muted: #6e747c;
  --wow-band: #15171d;
  --wow-soft: #f3f4f6;
  --wow-line: #e6e8ec;
}

/* =============================================================
   HERO  (62:460)  gradient 180deg #5a9ef1 -> #085ce5, white text
   ============================================================= */
.case-wow .case-hero--full {
  background: linear-gradient(180deg, #5a9ef1 0%, #085ce5 100%);
  color: #fff;
  padding-block: 72px;
}
.case-wow .case-hero--full .case-hero-grid > .reveal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

/* Hero chips = white outline pills, transparent bg */
.case-wow .case-hero--full .chips { gap: 8px; }
.case-wow .case-hero--full .chip {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 13px;
  line-height: normal;
}

/* Hero H1 — 58px ExtraBold, lh 1.04, tracking -1.16px */
.case-wow .case-hero--full h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -1.16px;
  max-width: none;
  margin: 0;
}

/* Hero sub — 18px Regular, lh 1.5 */
.case-wow .case-hero--full .case-sub {
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  max-width: none;
  margin: 0;
}

/* Hero CTA group */
.case-wow .case-hero--full .hero-cta { margin: 0; gap: 12px; }

/* Hero "Открыть макет в Figma" — white bg, blue border + text */
.case-wow .btn--figma {
  background: #fff;
  border: 1px solid var(--wow-blue);
  color: var(--wow-blue);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 999px;
  gap: 8px;
}
.case-wow .btn--figma:hover { background: #fff; opacity: .92; }
.case-wow .btn--figma .fig-ico { width: 18px; height: 27px; }

/* Hero meta — white labels/values, gap 48px */
.case-wow .case-hero--full .case-meta {
  border-top: none;
  padding-top: 6px;
  margin-top: 0;
  gap: 48px;
  width: 100%;
}
.case-wow .case-hero--full .case-meta .mi { max-width: none; flex: 1 1 0; min-width: 0; }
.case-wow .case-hero--full .case-meta .mi .k {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.case-wow .case-hero--full .case-meta .mi .v {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

/* Result-chip row after meta */
.case-wow .result-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-block: 4px;
}
.case-wow .result-chips .rchip {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid #fff;
  color: var(--wow-blue);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
}

/* =============================================================
   STAT STRIP  (62:487)  dark band #15171d, blue numbers
   ============================================================= */
.case-wow .statstrip-band {
  background: var(--wow-band);
}
.case-wow .statstrip-band .container { padding-block: 0; }
.case-wow .statstrip {
  display: flex;
  gap: 24px;
  border-top: none;
  border-bottom: none;
  padding-block: 44px;
}
.case-wow .statstrip .stat {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  border-right: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-wow .statstrip .stat .num,
.case-wow .statstrip .stat .num.green {
  color: #6f8bff;
  font-size: clamp(38px, 4.2vw, 52px);
  font-weight: 800;
  letter-spacing: 0;
}
.case-wow .statstrip .stat .lab {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-top: 0;
}
.case-wow .statstrip .stat .hint {
  color: #9aa0a8;
  font-size: 16px;
  font-weight: 400;
  margin-top: 0;
}

/* =============================================================
   SECTIONS — alternating white / #f3f4f6
   ============================================================= */
.case-wow .case-section {
  border-top: none;
  padding-block: 72px;
  background: #ffffff;
}
.case-wow .sec--soft { background: var(--wow-soft); }

/* Kicker: blue chip + grey label */
.case-wow .kicker {
  gap: 10px;
  color: var(--wow-muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  margin-bottom: 0;
  align-items: center;
}
.case-wow .kicker .n {
  width: auto;
  height: auto;
  background: var(--wow-blue);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 14px;
}

/* Headings + body */
.case-wow .case-section h2 {
  color: var(--wow-ink);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.4px;
  max-width: none;
  margin-top: 18px;
}
.case-wow .case-section .sec-text {
  color: var(--wow-muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  max-width: none;
  margin-top: 18px;
}

/* =============================================================
   PAIN CARDS  (62:511)  soft bg, blue border, no red label
   ============================================================= */
.case-wow .cards-3 { gap: 18px; margin-top: 28px; }
.case-wow .dcard {
  background: var(--wow-soft);
  border: 1px solid var(--wow-blue);
  border-radius: 14px;
  padding: 22px;
}
.case-wow .dcard h4 {
  color: var(--wow-ink);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
}
.case-wow .dcard p {
  color: var(--wow-muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}

/* =============================================================
   METHOD CHIPS  (62:528)  white pills, soft border
   ============================================================= */
.case-wow .method-row { gap: 10px; margin-top: 28px; }
.case-wow .method-row .chip {
  background: #fff;
  border: 1px solid var(--wow-line);
  color: var(--wow-ink);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
}

/* =============================================================
   COMPARISON CHART  (62:545)
   track #eef0f3, fills #c7ccd3, WOW fill #2e5bff
   ============================================================= */
.case-wow .cmp { gap: 14px; margin-top: 28px; }
.case-wow .cmp-row {
  grid-template-columns: 150px 1fr 210px;
  gap: 16px;
  align-items: center;
}
.case-wow .cmp-row .name {
  color: var(--wow-muted);
  font-size: 16px;
  font-weight: 600;
}
.case-wow .cmp-row.is-best .name { color: var(--wow-ink); }
.case-wow .cmp-row .track {
  height: 30px;
  background: #eef0f3;
  border-radius: 8px;
}
.case-wow .cmp-row .fill {
  display: block;
  height: 100%;
  background: #c7ccd3;
  border-radius: 8px;
  box-shadow: none;
}
/* Explicit static widths (Figma 62:545, track width 776px) so bars are
   visible without the shared scroll-triggered JS. */
.case-wow .cmp-row .fill[data-pct="100"] { width: 100%; }   /* MenuCalc 776/776 */
.case-wow .cmp-row .fill[data-pct="86"]  { width: 85.7%; }  /* LivePlan 665/776 */
.case-wow .cmp-row .fill[data-pct="57"]  { width: 57.1%; }  /* Capsim  443/776 */
.case-wow .cmp-row .fill[data-pct="71"]  { width: 71.4%; }  /* WOW     554/776 */
.case-wow .cmp-row.is-best .fill {
  background: var(--wow-blue);
  box-shadow: none;
}
/* value cell: number + sub-label */
.case-wow .cmp-row .val {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}
.case-wow .cmp-row .val .vnum {
  color: var(--wow-ink);
  font-size: 14px;
  font-weight: 700;
}
.case-wow .cmp-row .val .vsub {
  color: var(--wow-muted);
  font-size: 11.5px;
  font-weight: 500;
}
.case-wow .cmp-row.is-best .val .vnum,
.case-wow .cmp-row.is-best .val .vsub { color: var(--wow-blue); }
.case-wow .cmp-note {
  color: var(--wow-muted);
  font-size: 16px;
  font-weight: 400;
  margin-top: 18px;
}

/* =============================================================
   SCREENS  (62:578)  framed image + Figma button
   ============================================================= */
.case-wow .visual {
  border: 1px solid var(--wow-line);
  background: #fff;
  border-radius: 16px;
  margin-top: 28px;
}
.case-wow .visual img { border-radius: 16px; }
.case-wow .visual-cap {
  color: var(--wow-muted);
  font-size: 16px;
  font-weight: 400;
  margin-top: 18px;
}
.case-wow .screens-actions { margin-top: 8px; }

/* Filled blue Figma button (screens + outcome) */
.case-wow .btn--figma-fill {
  background: var(--wow-blue);
  border: 1px solid var(--wow-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 999px;
  gap: 8px;
}
.case-wow .btn--figma-fill:hover { opacity: .92; }
.case-wow .btn--figma-fill .fig-ico { width: 18px; height: 27px; }

/* =============================================================
   OUTCOME  (62:586)
   ============================================================= */
.case-wow .disclaimer {
  background: var(--wow-soft);
  border: none;
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--wow-muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  margin-top: 26px;
}
/* Outcome CTA row (Figma 62:595): Figma button left, contact + cases right */
.case-wow .outcome-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 26px;
}
.case-wow .outcome-cta .cta-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* "Связаться" — dark ink bg, white text */
.case-wow .outcome-cta .btn--solid {
  background: var(--wow-ink);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 24px;
  border: 1px solid var(--wow-ink);
  border-radius: 999px;
}
.case-wow .outcome-cta .btn--solid:hover { opacity: .9; }
/* "Все кейсы" — white bg, soft border */
.case-wow .outcome-cta .btn--outline {
  background: #fff;
  border: 1px solid var(--wow-line);
  color: var(--wow-ink);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 999px;
}
.case-wow .outcome-cta .btn--outline:hover { background: var(--wow-ink); color: #fff; }

/* =============================================================
   COLORED FIGMA LOGO ICON — all "Открыть макет в Figma" buttons
   ============================================================= */
.case-wow .fig-logo {
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  flex: 0 0 auto;
}

/* =============================================================
   END CTA  (62:595)  space-between row
   ============================================================= */
.case-wow .case-end { padding-block: 56px 80px; background: #ffffff; }
.case-wow .case-end h2 { color: var(--wow-ink); }
.case-wow .case-end .case-end-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.case-wow .case-end .cta-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* "Связаться" — dark ink bg, white text */
.case-wow .case-end .btn--solid {
  background: var(--wow-ink);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 24px;
  border: 1px solid var(--wow-ink);
  border-radius: 999px;
}
.case-wow .case-end .btn--solid:hover { opacity: .9; }
/* "Все кейсы" — white bg, soft border */
.case-wow .case-end .btn--outline {
  background: #fff;
  border: 1px solid var(--wow-line);
  color: var(--wow-ink);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 999px;
}
.case-wow .case-end .btn--outline:hover { background: var(--wow-ink); color: #fff; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  .case-wow .statstrip { flex-wrap: wrap; }
  .case-wow .statstrip .stat { flex: 1 1 40%; }
  .case-wow .case-hero--full .case-meta { flex-wrap: wrap; }
  .case-wow .case-hero--full .case-meta .mi { flex: 1 1 40%; }
}
@media (max-width: 860px) {
  .case-wow .cards-3 { grid-template-columns: 1fr; }
  .case-wow .cmp-row { grid-template-columns: 110px 1fr 130px; gap: 12px; }
}
@media (max-width: 640px) {
  .case-wow .statstrip .stat { flex: 1 1 100%; }
  .case-wow .case-hero--full .case-meta .mi { flex: 1 1 100%; }
  .case-wow .case-end .case-end-actions { flex-direction: column; align-items: stretch; }
  .case-wow .case-end .cta-right { flex-direction: column; }
  .case-wow .case-end .btn { justify-content: center; }
  .case-wow .outcome-cta { flex-direction: column; align-items: stretch; }
  .case-wow .outcome-cta .cta-right { flex-direction: column; }
  .case-wow .outcome-cta .btn { justify-content: center; }
  .case-wow .cmp-row { grid-template-columns: 84px 1fr; }
  .case-wow .cmp-row .val { grid-column: 2; justify-self: end; }
}

/* =============================================================
   MOBILE / TABLET HARDENING (page-specific elements)
   Native fixed-width graphics → fluid; multi-col grids → stack;
   guarantee no horizontal overflow / clipping at 768 & 390.
   (Shared base in styles.css handles header burger, container pad,
    hero/cards generic stacking — not duplicated here.)
   ============================================================= */

/* Universal safety: nothing on this page may exceed its column box. */
.case-wow .visual,
.case-wow .visual img,
.case-wow .cmp,
.case-wow .cmp-row .track { max-width: 100%; }
/* Grid/flex children must be allowed to shrink below content size. */
.case-wow .cmp-row,
.case-wow .cmp-row .name,
.case-wow .cmp-row .track,
.case-wow .cmp-row .val,
.case-wow .statstrip .stat,
.case-wow .case-meta .mi { min-width: 0; }

@media (max-width: 768px) {
  /* Tighter section rhythm on tablet */
  .case-wow .case-hero--full { padding-block: 56px; }
  .case-wow .case-section { padding-block: 56px; }
  .case-wow .statstrip { padding-block: 36px; gap: 28px 24px; }

  /* Comparison chart: keep the fixed 776px track fluid (1fr) and
     trim label/value columns so the bar + value never get clipped. */
  .case-wow .cmp-row { grid-template-columns: 96px 1fr 120px; gap: 12px; }
  .case-wow .cmp-row .track { height: 26px; }
  .case-wow .cmp-row .name { font-size: 15px; }

  /* Long compound name in the highlighted row may wrap on two lines;
     keep it aligned with the (taller) row. */
  .case-wow .cmp-row.is-best .name { line-height: 1.15; }
}

@media (max-width: 480px) {
  .case-wow .case-hero--full { padding-block: 44px; }
  .case-wow .case-section { padding-block: 44px; }

  /* Comparison chart reflow: label + bar on one line, value beneath,
     right-aligned. (Base 640 rule already does this; reinforce + tune.) */
  .case-wow .cmp { gap: 18px; }
  .case-wow .cmp-row { grid-template-columns: 80px 1fr; gap: 10px; row-gap: 4px; }
  .case-wow .cmp-row .track { height: 24px; }
  .case-wow .cmp-row .val {
    grid-column: 2;
    justify-self: end;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    text-align: right;
  }
  .case-wow .cmp-row .name { font-size: 14px; }

  /* CTA rows: full-width stacked buttons (base 640 rule stacks them;
     make each button block-level + centered for tap targets). */
  .case-wow .outcome-cta .btn,
  .case-wow .outcome-cta .cta-right .btn { width: 100%; justify-content: center; }

  /* Stat numbers a touch smaller so they never crowd the label. */
  .case-wow .statstrip .stat .num,
  .case-wow .statstrip .stat .num.green { font-size: 40px; }
}
