/* Problem slide — Damito density, Návštevio brand */

.slide.cine.problem { overflow: hidden; }

.problem-layout {
  position: relative;
  z-index: 2;
  height: 100%;
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: var(--content-top) var(--pad) calc(148px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.4fr);
  gap: clamp(12px, 2vw, 28px);
  align-items: center;
}

.problem-copy { max-width: 34em; }
.problem-copy .kicker {
  margin: 0 0 12px;
  color: var(--gold-soft);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 800;
}
.problem-copy h2 {
  margin: 0 0 14px;
  max-width: 10.5em;
  font-size: clamp(38px, 5.2vw, 58px);
  line-height: 1.05;
  letter-spacing: -.035em;
  text-shadow: 0 18px 40px rgba(0,0,0,.55);
}
.problem-copy .lede {
  margin: 0;
  max-width: 34em;
  color: rgba(230, 236, 232, .78);
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.55;
  font-weight: 550;
}
.problem-copy .chip-row { margin-top: 18px; }
.problem-copy .chip {
  background: rgba(0,0,0,.35);
  border-color: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
}
.problem-copy .cta-row { margin-top: 16px; }
.problem-copy .btn-solid {
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}

/* --- constellation --- */
.constellation {
  position: relative;
  min-height: min(460px, 58vh);
  user-select: none;
  isolation: isolate;
  overflow: visible;
}
.constellation::before {
  content: "";
  position: absolute;
  inset: 8% 6% 14% 6%;
  border-radius: 28px;
  background:
    radial-gradient(420px 220px at 50% 40%, rgba(47,138,78,.18), transparent 70%),
    radial-gradient(280px 180px at 70% 70%, rgba(232,162,58,.12), transparent 70%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}
.constellation svg.wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.constellation svg.wires path {
  fill: none;
  stroke: rgba(240,195,93,.38);
  stroke-width: 1.4;
  stroke-dasharray: 4 8;
  animation: dashMove 16s linear infinite;
  filter: drop-shadow(0 0 6px rgba(240,195,93,.25));
}
@keyframes dashMove { to { stroke-dashoffset: -220; } }

.viz-card {
  position: absolute;
  z-index: 2;
  width: min(268px, 48%);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.22);
  background:
    linear-gradient(160deg, rgba(28, 52, 40, .94) 0%, rgba(12, 24, 18, .9) 100%);
  box-shadow:
    0 28px 56px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 0 40px rgba(47,138,78,.12);
  backdrop-filter: blur(18px) saturate(1.2);
  padding: 14px 14px 16px;
  cursor: default;
  pointer-events: none;
  transition: box-shadow .25s ease, border-color .25s ease, filter .35s ease, opacity .35s ease;
}
.viz-card:hover {
  border-color: rgba(240,195,93,.55);
  box-shadow:
    0 32px 64px rgba(0,0,0,.58),
    0 0 0 1px rgba(240,195,93,.18),
    0 0 48px rgba(232,162,58,.2);
}
.viz-card .vc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.viz-card .vc-top strong {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(255,255,255,.92);
}
.viz-card .pill {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(248,113,113,.2);
  color: #fecaca;
  border: 1px solid rgba(248,113,113,.35);
  box-shadow: 0 0 12px rgba(248,113,113,.25);
}

.vc-notebook { left: 0; top: 2%; transform: rotate(-6.5deg); }
.vc-excel { right: 0; top: 8%; transform: rotate(5.5deg); width: min(292px, 52%); }
.vc-chat { left: 14%; bottom: 18%; transform: rotate(-2deg); width: min(280px, 50%); }

.viz-card .big {
  display: block;
  margin: 10px 0 2px;
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 36px);
  letter-spacing: -.04em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.viz-card .sub {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  font-weight: 650;
  margin-bottom: 10px;
}

/* notebook */
.note-page {
  border-radius: 14px;
  background:
    repeating-linear-gradient(180deg, transparent 0 20px, rgba(255,255,255,.08) 20px 21px),
    linear-gradient(90deg, rgba(232,162,58,.45) 0 2px, transparent 2px),
    rgba(255,255,255,.05);
  min-height: 96px;
  padding: 12px 10px 10px 18px;
  position: relative;
  overflow: hidden;
}
.note-page em {
  position: absolute;
  font-style: normal;
  font-family: var(--display);
  font-size: 13px;
  color: rgba(255,255,255,.62);
}
.note-page em:nth-child(1) { top: 18px; left: 18px; transform: rotate(-2deg); }
.note-page em:nth-child(2) { top: 38px; left: 22px; transform: rotate(1deg); }
.note-page em:nth-child(3) { top: 58px; left: 16px; transform: rotate(-1deg); color: #fecaca; }
.note-page em:nth-child(4) { top: 76px; left: 28px; opacity: .5; }

/* particle field (excel / catalog chaos) */
.field {
  position: relative;
  height: 92px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  background:
    radial-gradient(circle at 30% 40%, rgba(47,138,78,.25), transparent 45%),
    rgba(0,0,0,.28);
}
.field canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.field .overlay-num {
  position: absolute;
  left: 12px; bottom: 10px;
  z-index: 2;
  pointer-events: none;
}
.field .overlay-num b {
  display: block;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -.04em;
  line-height: 1;
}
.field .overlay-num span {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-weight: 650;
}

/* mini sheet strip under field */
.sheet-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  margin-top: 10px;
}
.sheet-strip i {
  display: block;
  height: 10px;
  border-radius: 3px;
  background: rgba(47,138,78,.35);
}
.sheet-strip i.bad { background: rgba(248,113,113,.55); }
.sheet-strip i.mut { background: rgba(255,255,255,.1); }

/* fake login / pult form */
.mini-form {
  display: grid;
  gap: 8px;
}
.mini-form .row {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.28);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  color: rgba(255,255,255,.45);
  font-weight: 650;
}
.mini-form .row.filled { color: rgba(255,255,255,.8); }
.mini-form .btn {
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #1a1408;
  background: linear-gradient(125deg, #f0c35d, #e8a23a);
}

/* chat */
.thread { display: grid; gap: 8px; }
.bubble {
  max-width: 94%;
  padding: 9px 11px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.08);
}
.bubble.me {
  margin-left: auto;
  background: rgba(47,138,78,.32);
  border-color: rgba(47,138,78,.28);
}
.bubble .who {
  display: block;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: 3px;
  font-weight: 800;
}

/* CTA under constellation — Damito placement */
.stage-cta-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 12px;
}
.stage-cta {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #1a1408;
  font-weight: 800;
  font-size: 13.5px;
  white-space: nowrap;
  max-width: none;
  overflow: visible;
  flex-shrink: 0;
  background: linear-gradient(125deg, #fff1c2 0%, #f6d56a 22%, #e8a23a 50%, #c96f12 78%, #f0c35d 100%);
  box-shadow:
    0 0 0 1px rgba(240,195,93,.4),
    0 0 36px rgba(232,162,58,.55),
    0 0 64px rgba(232,162,58,.25),
    0 14px 36px rgba(0,0,0,.4);
  transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}
.stage-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(240,195,93,.55),
    0 0 48px rgba(232,162,58,.65),
    0 18px 42px rgba(0,0,0,.45);
}
.stage-cta .ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 20, 20, .2);
  flex-shrink: 0;
}
.stage-cta .ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.problem-layout.is-after .stage-cta {
  background: linear-gradient(125deg, #3d9a62, #2f8a4e 40%, #1f6a3a 75%, #143d24);
  color: #f3fff6;
  box-shadow:
    0 0 0 1px rgba(47,138,78,.45),
    0 0 36px rgba(47,138,78,.5),
    0 14px 36px rgba(0,0,0,.4);
}
.problem-layout.is-after .stage-cta .ico {
  background: rgba(0, 0, 0, .28);
}

/* AFTER unified panel */
.unify {
  position: absolute;
  inset: 2% 4% 20% 4%;
  z-index: 3;
  border-radius: 26px;
  border: 1px solid rgba(240,195,93,.4);
  background:
    radial-gradient(520px 240px at 85% 0%, rgba(240,195,93,.2), transparent 55%),
    linear-gradient(165deg, rgba(24, 56, 38, .96), rgba(8, 20, 14, .95));
  box-shadow:
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 36px 72px rgba(0,0,0,.55),
    0 0 50px rgba(47,138,78,.22);
  padding: 20px 22px 18px;
  opacity: 0;
  pointer-events: none;
  transform: scale(.9) translateY(28px);
  filter: blur(8px);
  transition: opacity .45s ease, transform .65s cubic-bezier(.16,1,.3,1), filter .45s ease;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}
.unify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.unify-head strong {
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -.03em;
}
.unify-head span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f0c35d;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(240,195,93,.14);
  border: 1px solid rgba(240,195,93,.3);
}
.unify-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 12px;
  min-height: 0;
}
.unify-panel {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.unify-panel h4 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  flex-shrink: 0;
}
.unify-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.unify-kpis div {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
}
.unify-kpis b {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -.03em;
}
.unify-kpis span { font-size: 11px; color: rgba(255,255,255,.55); }
.unify-spark {
  flex: 1;
  min-height: 84px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  overflow: hidden;
}
.unify-spark i {
  flex: 1;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, #f0c35d 0%, #7dcea0 42%, #2f8a4e 100%);
  height: var(--h, 40%);
  transform: translateY(110%) scale(.55);
  transform-origin: bottom center;
  opacity: 0;
  box-shadow: 0 0 12px rgba(240,195,93,.28);
  transition:
    transform 0.85s cubic-bezier(.34, 1.45, .64, 1),
    opacity 0.35s ease,
    height 0.7s cubic-bezier(.16, 1, .3, 1);
  will-change: transform, height, opacity;
}
.unify-spark.is-grown i {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.unify-spark i:nth-child(1) { transition-delay: .02s, .02s, 0s; }
.unify-spark i:nth-child(2) { transition-delay: .08s, .08s, 0s; }
.unify-spark i:nth-child(3) { transition-delay: .14s, .14s, 0s; }
.unify-spark i:nth-child(4) { transition-delay: .2s, .2s, 0s; }
.unify-spark i:nth-child(5) { transition-delay: .26s, .26s, 0s; }
.unify-spark i:nth-child(6) { transition-delay: .32s, .32s, 0s; }
.unify-spark i:nth-child(7) { transition-delay: .38s, .38s, 0s; }
.unify-spark i:nth-child(8) { transition-delay: .44s, .44s, 0s; }
.unify-spark i:nth-child(9) { transition-delay: .5s, .5s, 0s; }
.unify-spark i:nth-child(10) { transition-delay: .56s, .56s, 0s; }
.unify-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.unify-foot span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(47,138,78,.22);
  border: 1px solid rgba(47,138,78,.35);
  font-size: 12px;
  font-weight: 750;
}

.problem-layout.is-after .viz-card {
  opacity: 0;
  filter: blur(10px);
  transform: scale(.84) translateY(36px) !important;
  pointer-events: none;
}
.problem-layout.is-after .constellation svg.wires,
.problem-layout.is-after .constellation::before {
  opacity: 0;
  transition: opacity .3s ease;
}
.problem-layout.is-after .unify {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  filter: blur(0);
}

/* --- bottom KPI rail (Damito-style icons on top) --- */
.stat-rail {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;
  align-items: stretch;
  gap: 0;
  padding: 18px max(var(--pad), calc((100% - 1380px) / 2 + var(--pad))) 20px;
  background:
    linear-gradient(180deg, transparent, rgba(3,10,7,.72) 18%, rgba(3,10,7,.94));
  border-top: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
}
.stat-rail article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 2px 18px;
  border-right: 1px solid rgba(255,255,255,.12);
}
.stat-rail article:nth-child(5) { border-right: 0; }
.stat-rail .si {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  position: relative;
  box-shadow: 0 0 16px rgba(47,138,78,.12);
}
.stat-rail .si svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: rgba(255,255,255,.85);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stat-rail .si .dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #f87171;
  box-shadow: 0 0 10px rgba(248,113,113,.8);
}
.problem-layout.is-after ~ .stat-rail .si .dot,
.slide.problem.is-after-mode .stat-rail .si .dot {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74,222,128,.75);
}
.stat-rail b {
  display: block;
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -.045em;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-rail span {
  display: block;
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(255,255,255,.58);
  font-weight: 650;
  max-width: 16em;
}
.rail-next {
  width: 52px;
  height: 52px;
  margin: auto 0 auto 12px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  color: #1a1408;
  background: linear-gradient(125deg, #fff1c2, #e8a23a 55%, #c96f12);
  box-shadow:
    0 0 0 1px rgba(240,195,93,.35),
    0 0 28px rgba(232,162,58,.55);
  display: grid;
  place-items: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.rail-next:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(232,162,58,.7);
}
.rail-next svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

@media (max-width: 900px) {
  .slide.cine.problem { overflow: visible; }
  .problem-layout {
    grid-template-columns: 1fr;
    align-content: start;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: var(--content-top) var(--pad) 24px;
  }
  .problem-copy h2 { font-size: clamp(28px, 7vw, 36px); }
  .constellation {
    min-height: 0;
    margin-top: 12px;
    display: grid;
    gap: 12px;
  }
  .constellation svg.wires,
  .constellation::before { display: none; }
  .viz-card {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
  }
  .stage-cta-wrap {
    position: relative;
    margin-top: 8px;
    bottom: auto;
  }
  .stage-cta {
    font-size: 12px;
    padding-right: 16px;
    white-space: normal;
    text-align: left;
    max-width: 100%;
  }
  .unify {
    position: relative;
    inset: auto;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    transform: none;
    filter: none;
  }
  .problem-layout.is-after .unify {
    opacity: 1;
    max-height: none;
    padding: 16px;
    border: 1px solid rgba(240,195,93,.4);
    margin-top: 4px;
  }
  .problem-layout.is-after .viz-card,
  .problem-layout.is-after .stage-cta-wrap {
    display: none;
  }
  .stat-rail {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    grid-template-columns: 1fr 1fr;
    padding: 16px var(--pad) calc(20px + env(safe-area-inset-bottom));
    margin-top: 8px;
  }
  .stat-rail article {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 10px 4px;
  }
  .stat-rail b { font-size: 22px; }
  .rail-next { display: none; }
}
