/* =============================================================
   Alloca case — exact Figma rebuild (frame 60:112)
   Dark theme, neon-green accent #52FF00 (Main color).
   Scoped under .case-alloca to override shared .case-* rules.
   Source of truth: Figma get_design_context per section.
   ============================================================= */

.case-alloca {
  --alloca-green: #52ff00;
  --alloca-ink: #0e0f13;       /* text on green */
  --alloca-text: #eef0f3;
  --alloca-muted: #9aa0a8;
  --alloca-chip-bg: rgba(44, 51, 55, 0.8);
  --alloca-chip-border: rgba(129, 140, 133, 0.5);
}

/* Page surface (between section bands) */
.case-alloca .case-page { background: #1c2124; }

/* The shared .container caps width at 1280 and pads 56px — matches Figma. */

/* =============================================================
   HERO  (node 60:134) — bg #1c2124, px56 py72, gap 24px
   ============================================================= */
.case-alloca .case-hero {
  position: relative;
  background: #1c2124;
  padding: 72px 0 72px;
  overflow: hidden;
}
/* corner radial glows (Ellipse 65 green-ish / 66 blue-ish) */
.case-alloca .case-hero::before,
.case-alloca .case-hero::after {
  content: "";
  position: absolute;
  width: 465px; height: 465px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .22;
  pointer-events: none;
  z-index: 0;
}
.case-alloca .case-hero::before { background: var(--alloca-green); left: -156px; top: -161px; }
.case-alloca .case-hero::after  { background: #2e5bff; right: -150px; bottom: -120px; }

.case-alloca .case-hero .container { position: relative; z-index: 1; }

/* hero top row: title block (left) + logo (right) */
.case-alloca .case-hero-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 24px;
}
.case-alloca .hero-lead { max-width: 651px; }

.case-alloca .case-hero h1 {
  font-weight: 800;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.04;
  letter-spacing: -.4px;
  color: var(--alloca-text);
  max-width: 651px;
  margin: 0 0 24px;
}

/* hero chips (all grey pills; first is NOT blue) */
.case-alloca .case-hero .chips { gap: 8px; margin-bottom: 24px; }
.case-alloca .chip {
  display: inline-flex; align-items: center;
  background: var(--alloca-chip-bg);
  border: .5px solid var(--alloca-chip-border);
  border-radius: 999px;
  padding: 7px 13px;
  font-weight: 600;
  font-size: 12.5px;
  line-height: normal;
  color: var(--alloca-text);
}
/* neutralize the shared blue-chip styling */
.case-alloca .chip--blue {
  background: var(--alloca-chip-bg);
  border: .5px solid var(--alloca-chip-border);
  color: var(--alloca-text);
}

.case-alloca .case-sub {
  font-weight: 500;
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.45;
  color: var(--alloca-text);
  max-width: 524px;
  margin: 0;
}

/* logo — placed freely, no gradient card (420.87 x 242) */
.case-alloca .case-logo {
  flex: 0 0 auto;
  width: 421px;
  max-width: 40vw;
  height: auto;
}

/* Figma button (shared between hero, screens, end CTA) */
.case-alloca .btn-figma {
  display: inline-flex; align-items: center; gap: 8px;
  background: #293033;
  border: 1px solid var(--alloca-green);
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 15px;
  line-height: normal;
  color: var(--alloca-text);
  white-space: nowrap;
  transition: transform .15s var(--ease), background-color .2s var(--ease);
}
.case-alloca .btn-figma:hover { transform: translateY(-2px); background: #323a3d; }
.case-alloca .btn-figma img { width: 27px; height: 27px; flex: 0 0 auto; }
/* colored inline Figma logo on every "Открыть макет в Figma →" button */
.case-alloca .btn-figma .fig-logo {
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  flex: 0 0 auto;
}

.case-alloca .hero-cta { margin: 0; }

/* meta row (gap 48px, 3 equal columns) */
.case-alloca .case-meta {
  display: flex;
  gap: 48px;
  border-top: none;
  padding: 6px 0;
  margin-top: 24px;
}
.case-alloca .case-meta .mi { flex: 1 1 0; min-width: 0; max-width: none; }
.case-alloca .case-meta .mi .k {
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--alloca-muted);
  margin-bottom: 5px;
}
.case-alloca .case-meta .mi .v {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  color: var(--alloca-text);
}

/* result chip row (under meta) */
.case-alloca .result-chips {
  display: flex;
  gap: 10px;
  padding: 4px 0;
  margin-top: 6px;
}
.case-alloca .result-chips .chip { font-weight: 700; font-size: 13px; }
.case-alloca .result-chips .chip--win {
  background: var(--alloca-green);
  border-color: var(--alloca-green);
  color: var(--alloca-ink);
}

/* =============================================================
   STAT STRIP  (node 60:161) — bg #121319, px56 py44, gap 24px
   ============================================================= */
.case-alloca .statstrip-sec { background: #121319; }
.case-alloca .statstrip {
  display: flex;
  gap: 24px;
  border: none;
  padding: 44px 0;
}
.case-alloca .statstrip .stat {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: none;
}
.case-alloca .statstrip .stat .num,
.case-alloca .statstrip .stat .num.green {
  font-weight: 800;
  font-size: clamp(34px, 4vw, 46px);
  line-height: normal;
  letter-spacing: -.5px;
  color: var(--alloca-green);
}
.case-alloca .statstrip .stat .lab {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  color: var(--alloca-text);
  margin: 0;
}
.case-alloca .statstrip .stat .hint {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.35;
  color: var(--alloca-muted);
  margin: 0;
}

/* =============================================================
   SECTIONS (kicker + h2 + body)  — distinct color bands
   ============================================================= */
.case-alloca .case-section {
  border-top: none;
  padding: 72px 0;
}
.case-alloca .sec--problem { background: #2c3337; }   /* 01 */
.case-alloca .sec--process { background: #1a1d24; }   /* 02 */
.case-alloca .sec--solution { background: #0e0f13; }  /* 03 */
.case-alloca .sec--screens { background: #1a1d24; }   /* 04 */
.case-alloca .sec--outcome { background: #0e0f13; }   /* 05 */

/* kicker: green chip + label */
.case-alloca .kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  letter-spacing: normal;
  text-transform: none;
}
.case-alloca .kicker .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; height: auto;
  background: var(--alloca-green);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 18px;
  line-height: normal;
  color: var(--alloca-ink);
}
.case-alloca .kicker .lab {
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--alloca-muted);
}

.case-alloca .case-section h2 {
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.06;
  letter-spacing: -.4px;
  color: var(--alloca-text);
  max-width: none;
  margin: 0 0 18px;
}
.case-alloca .case-section .sec-text {
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: var(--alloca-text);
  max-width: 900px;
  margin: 0 0 18px;
}

/* pain cards (01) — bg #1a1d24, green 1px border, radius 14, p22 */
.case-alloca .cards-3 {
  display: flex;
  gap: 18px;
  margin-top: 0;
  padding: 14px 0;
}
.case-alloca .dcard {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #1a1d24;
  border: 1px solid var(--alloca-green);
  border-radius: 14px;
  padding: 22px;
}
.case-alloca .dcard h4 {
  font-weight: 600;
  font-size: 19px;
  line-height: normal;
  color: var(--alloca-text);
  margin: 0;
}
.case-alloca .dcard p {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: var(--alloca-text);
  margin: 0;
}

/* method chips (02) */
.case-alloca .method-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0;
  margin-top: 0;
}
.case-alloca .method-row .chip {
  background: var(--alloca-chip-bg);
  border: .5px solid var(--alloca-green);
  border-radius: 999px;
  padding: 7px 13px;
  font-weight: 600;
  font-size: 14px;
  color: var(--alloca-text);
}

/* =============================================================
   SOLUTION comparison chart (03)
   track w896 bg #15171d r8 h30 ; fills 896/768/768/512 ; gap16
   ============================================================= */
.case-alloca .cmp {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 0;
  margin-top: 0;
}
.case-alloca .cmp-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 896px) 90px;
  gap: 16px;
  align-items: center;
}
.case-alloca .cmp-row .name {
  font-weight: 600;
  font-size: 16px;
  color: var(--alloca-text);
}
.case-alloca .cmp-row.is-best .name { color: var(--alloca-text); }
.case-alloca .cmp-row .track {
  height: 30px;
  background: #15171d;
  border-radius: 8px;
  overflow: hidden;
}
.case-alloca .cmp-row .fill {
  display: block;            /* span needs block for width/height to apply */
  height: 30px;
  background: #3a3f4a;
  border-radius: 8px;
}
/* Explicit widths from data-pct so the chart always renders the bars,
   independent of the optional JS width animation in site.js
   (shared styles.css defaults .fill width to 0). */
.case-alloca .cmp-row .fill[data-pct="100"]  { width: 100%; }
.case-alloca .cmp-row .fill[data-pct="85.7"] { width: 85.7%; }
.case-alloca .cmp-row .fill[data-pct="57.1"] { width: 57.1%; }

/* WINNING row (Alloca = 4 шага): neon-green fill + glow + green value */
.case-alloca .cmp-row.is-best .fill {
  background: var(--alloca-green);
  box-shadow: 0 0 14px rgba(82, 255, 0, .45);
}
.case-alloca .cmp-row .val {
  font-weight: 700;
  font-size: 14px;
  color: var(--alloca-muted);
  white-space: nowrap;
}
.case-alloca .cmp-row.is-best .val { color: var(--alloca-green); }
.case-alloca .cmp-note {
  font-weight: 400;
  font-size: 16px;
  line-height: normal;
  color: var(--alloca-text);
  margin: 0;
}

/* =============================================================
   SCREENS (04) — image framed r16, border #2a2e37, h386
   ============================================================= */
.case-alloca .visual {
  margin-top: 0;
  border: 1px solid #2a2e37;
  border-radius: 16px;
  overflow: hidden;
  background: #0f1217;
}
.case-alloca .visual img { width: 100%; display: block; }
.case-alloca .visual-cap {
  font-weight: 400;
  font-size: 16px;
  line-height: normal;
  color: var(--alloca-text);
  margin: 18px 0 0;            /* gap below the screens image */
}
/* button must not stick to the caption — add breathing room (Figma ~18px) */
.case-alloca .screens-cta { margin-top: 18px; }

/* =============================================================
   OUTCOME (05) — disclaimer + end CTA
   ============================================================= */
.case-alloca .disclaimer {
  background: #16181f;
  border: 1px solid #2a2e37;
  border-radius: 12px;
  padding: 16px 18px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: var(--alloca-muted);
  margin: 0;
}

/* End CTA row: figma button (left) + green/outline group (right) */
.case-alloca .case-end-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  margin-top: 0;
}
.case-alloca .end-group { display: flex; align-items: center; gap: 12px; }

/* "Связаться" green-filled */
.case-alloca .btn--contact {
  display: inline-flex; align-items: center;
  background: var(--alloca-green);
  border: 1px solid var(--alloca-green);
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 15px;
  line-height: normal;
  color: var(--alloca-ink);
  white-space: nowrap;
  transition: transform .15s var(--ease), opacity .2s;
}
.case-alloca .btn--contact:hover { transform: translateY(-2px); opacity: .9; }

/* "Все кейсы" green-outline */
.case-alloca .btn--cases {
  display: inline-flex; align-items: center;
  background: transparent;
  border: 1px solid var(--alloca-green);
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
  line-height: normal;
  color: var(--alloca-text);
  white-space: nowrap;
  transition: transform .15s var(--ease), background-color .2s var(--ease);
}
.case-alloca .btn--cases:hover { transform: translateY(-2px); background: rgba(82, 255, 0, .1); }

/* =============================================================
   HEADER override (node 60:288) — DARK header on this dark page.
   Shared .site-header uses light --bg/--text and reads wrong here.
   Figma: bg #1c1f26, border-bottom #363b45, white logo/nav,
   "Кейсы" blue #2e5bff, lang pill white w/ black active chip,
   "Резюме" black button with white text.
   ============================================================= */
body.case-alloca .site-header {
  background: color-mix(in srgb, #1c1f26 90%, transparent);
  border-bottom: 1px solid #363b45;
}
body.case-alloca .site-header .brand { color: #fbfbfb; }
body.case-alloca .site-header .brand .dot { background: var(--accent-blue); }

body.case-alloca .site-header .nav-links a { color: #fbfbfb; }
body.case-alloca .site-header .nav-links a:hover,
body.case-alloca .site-header .nav-links a.is-active { color: var(--accent-blue); }
/* current page = Cases section, keep "Кейсы" highlighted blue */
body.case-alloca .site-header .nav-links [data-nav="cases"] { color: var(--accent-blue); }

/* language pill: white shell, dark active chip (matches macet) */
body.case-alloca .site-header .lang {
  background: #ffffff;
  border-color: #ffffff;
}
body.case-alloca .site-header .lang button { color: #6e747c; }
body.case-alloca .site-header .lang button.is-active { background: #181a1f; color: #ffffff; }

/* "Резюме" solid button: black fill, white text */
body.case-alloca .site-header .btn--solid {
  background: #181a1f;
  color: #ffffff;
}
body.case-alloca .site-header .btn--solid:hover { opacity: .9; }

/* burger: dark-translucent button + white lines so it reads on the dark header
   (was a white button with white lines → invisible / "merged") */
body.case-alloca .site-header .burger { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); }
body.case-alloca .site-header .burger span { background: #fbfbfb; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 980px) {
  .case-alloca .case-hero-grid { flex-direction: column; align-items: flex-start; }
  .case-alloca .case-logo { order: -1; width: 280px; max-width: 70%; }
  .case-alloca .statstrip { flex-wrap: wrap; }
  .case-alloca .statstrip .stat { flex: 1 1 40%; }
  .case-alloca .case-meta { flex-wrap: wrap; gap: 28px; }
  .case-alloca .case-meta .mi { flex: 1 1 40%; }
  .case-alloca .cards-3 { flex-direction: column; }
  .case-alloca .cmp-row { grid-template-columns: 110px 1fr 70px; gap: 10px; }
}

@media (max-width: 560px) {
  .case-alloca .case-hero { padding: 48px 0; }
  .case-alloca .case-section { padding: 48px 0; }
  .case-alloca .statstrip .stat { flex: 1 1 100%; }
  .case-alloca .case-meta .mi { flex: 1 1 100%; }
  .case-alloca .case-end-actions { flex-direction: column; align-items: stretch; }
  .case-alloca .end-group { width: 100%; }
  .case-alloca .end-group .btn--contact,
  .case-alloca .end-group .btn--cases { flex: 1 1 0; justify-content: center; }
  .case-alloca .btn-figma { justify-content: center; }
  .case-alloca .cmp-row {
    grid-template-columns: 90px 1fr;
  }
  .case-alloca .cmp-row .val { grid-column: 2; justify-self: end; }
}
