/* ═══════════════════════════════════════════════════════════
   ROIA · Soluções com rolagem presa (assets/solutions.js)
   ═══════════════════════════════════════════════════════════ */
#solucoes .section-head { margin-bottom: clamp(28px, 4vw, 56px); }
.sol {
  position: relative;
  /* altura do palco: cabe na tela e não passa de 640px, pra não sobrar vão em volta */
  --sol-h: clamp(460px, calc(100vh - var(--header-h) - 120px), 640px);
  --sol-h: clamp(460px, calc(100svh - var(--header-h) - 120px), 640px);
}
.sol-pin {
  /* preso no centro da área visível (abaixo do header), com a altura do conteúdo */
  position: sticky;
  top: calc(var(--header-h) + (100vh - var(--header-h) - var(--sol-h)) / 2);
  top: calc(var(--header-h) + (100svh - var(--header-h) - var(--sol-h)) / 2);
  height: var(--sol-h);
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 4vw, 64px); align-items: center;
}

/* trilha das etapas */
.sol-list { position: relative; display: grid; gap: clamp(10px, 2vh, 22px); padding-left: 44px; }
.sol-list::before, .sol-list::after {
  content: ''; position: absolute; left: 8px; top: 0.6em; bottom: 0.6em; width: 2px; border-radius: 2px;
}
.sol-list::before { background: var(--on-night-border-strong); }
.sol-list::after {
  background: linear-gradient(var(--teal-3), var(--teal));
  box-shadow: 0 0 12px rgba(63, 169, 200, 0.6);
  transform-origin: top; transform: scaleY(var(--sp, 0));
}
.sol-step { position: relative; }
.sol-step::before {
  content: ''; position: absolute; left: -43px; top: calc(clamp(44px, 5.2vw, 84px) * 0.5); width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; z-index: 1;
  background: var(--night); border: 2px solid var(--on-night-border-strong);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.sol-step.is-done::before { border-color: var(--teal-3); background: var(--teal); }
.sol-step.is-active::before { border-color: var(--teal-3); background: var(--teal-3); box-shadow: 0 0 0 6px rgba(63, 169, 200, 0.16), 0 0 18px rgba(63, 169, 200, 0.7); }
.sol-h { margin: 0; }
.sol-head { display: flex; align-items: flex-start; gap: 16px; width: 100%; text-align: left; cursor: pointer; }
.sol-num {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--on-night-faint);
  padding-top: 0.9em; transition: color 0.4s var(--ease);
}
.sol-title {
  font-size: clamp(44px, 5.2vw, 84px); font-weight: 800; line-height: 1; letter-spacing: -0.05em;
  color: rgba(245, 244, 240, 0.16); transition: color 0.5s var(--ease);
}
.sol-head:hover .sol-title { color: rgba(245, 244, 240, 0.32); }
.sol-step.is-active .sol-title { color: var(--mist); }
.sol-step--accent.is-active .sol-title { color: var(--teal-3); }
.sol-step.is-active .sol-num { color: var(--teal-3); }
.sol-body { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.65s var(--ease-out), opacity 0.45s var(--ease); }
.sol-step.is-active .sol-body { grid-template-rows: 1fr; opacity: 1; }
.sol-body-in { overflow: hidden; min-height: 0; }
.sol-body-in > p { padding-top: 16px; font-size: clamp(16px, 1.3vw, 18px); color: var(--on-night-muted); max-width: 40ch; }
.sol-body-in .card-links { display: flex; flex-wrap: wrap; gap: 4px 24px; padding-top: 14px; }
.sol-mslot { display: none; }

/* palco 3D */
.sol-stage { position: relative; height: 100%; }
.sol-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sol-scene { position: absolute; left: 0; right: 0; top: 44px; bottom: 0; perspective: 1600px; perspective-origin: 50% 40%; }
.sol-scene::after {
  content: ''; position: absolute; left: 6%; right: 6%; bottom: -4%; height: 34%; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(11, 134, 168, 0.26), transparent 70%);
  filter: blur(6px);
}
.sol-rig { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--prx, 0deg)) rotateY(var(--pry, 0deg)); }
.sol-comp { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.sol-card {
  position: absolute; left: var(--x); top: var(--y); height: var(--h); width: auto; display: block;
  transform: translate(-50%, -50%) translateZ(var(--z)) rotateY(var(--r)) rotateX(var(--t, 0deg));
  opacity: 1;
  transition: transform 1.15s var(--ease-out), opacity 0.6s var(--ease);
  transition-delay: var(--dl, 0s);
}
.sol-comp:not(.is-active) .sol-card {
  opacity: 0; transition-delay: 0s;
  transform: translate(-50%, -50%) translate3d(90px, 30px, calc(var(--z) - 320px)) rotateY(calc(var(--r) - 22deg)) rotateX(var(--t, 0deg));
}
.sol-comp.is-past .sol-card {
  transform: translate(-50%, -50%) translate3d(-90px, -50px, calc(var(--z) - 320px)) rotateY(calc(var(--r) + 22deg)) rotateX(var(--t, 0deg));
}
.sol-comp.is-active .sol-card { animation: sol-float 7s ease-in-out infinite; }
.sol-comp.is-active .sol-card:nth-of-type(2) { animation-delay: -3.5s; }
@keyframes sol-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* composições */
.sol-comp--1 .sol-card--land { --x: 64%; --y: 41%; --h: 58%; --z: -70px; --r: -16deg; --t: 4deg; }
.sol-comp--1 .sol-card--ad { --x: 17%; --y: 55%; --h: 86%; --z: 90px; --r: 15deg; --dl: 0.12s; }
.sol-comp--2 .sol-card--crm { --x: 70%; --y: 47%; --h: 92%; --z: -60px; --r: -14deg; }
.sol-comp--2 .sol-card--chat { --x: 29%; --y: 52%; --h: 92%; --z: 70px; --r: 13deg; --dl: 0.12s; }
.sol-comp--3 .sol-card--metrics { --x: 70%; --y: 47%; --h: 92%; --z: -60px; --r: -14deg; }
.sol-comp--3 .sol-card--flow { --x: 29%; --y: 52%; --h: 92%; --z: 70px; --r: 13deg; --dl: 0.12s; }

/* fio de dados entre as duas telas */
.sol-link {
  position: absolute; left: 36%; width: 26%; top: 54%; height: 2px; transform: translateZ(10px);
  background: linear-gradient(90deg, rgba(63, 169, 200, 0.1), rgba(63, 169, 200, 0.75), rgba(63, 169, 200, 0.1));
  opacity: 0; transition: opacity 0.6s var(--ease);
}
.sol-link::after {
  content: ''; position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: #E6FAFF; box-shadow: 0 0 14px 3px rgba(63, 169, 200, 0.9);
  animation: sol-packet 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.sol-comp.is-active .sol-link { opacity: 1; transition-delay: 0.6s; }
.sol-comp--1 .sol-link { left: 26%; width: 18%; top: 60%; }
@keyframes sol-packet { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.sol.is-paused .sol-card, .sol.is-paused .sol-link::after { animation-play-state: paused; }

.sol-note { margin-top: clamp(24px, 4vw, 48px); }

/* ─── celular / movimento reduzido: etapas empilhadas ─── */
.sol.is-stacked { height: auto !important; }
.sol.is-stacked .sol-pin { position: static; height: auto; min-height: 0; display: flex; flex-direction: column-reverse; gap: 18px; }
.sol.is-stacked .sol-scene { display: none; }
.sol.is-stacked .sol-stage { height: auto; }
.sol.is-stacked .sol-bar { position: static; justify-content: flex-end; }
.sol.is-stacked .sol-bar .demo-label { display: none; }
.sol.is-stacked .sol-list { gap: 56px; }
.sol.is-stacked .sol-list::after { transform: none; }
.sol.is-stacked .sol-step::before { border-color: var(--teal-3); background: var(--teal-3); }
.sol.is-stacked .sol-title { color: var(--mist); }
.sol.is-stacked .sol-step--accent .sol-title { color: var(--teal-3); }
.sol.is-stacked .sol-mslot { display: block; position: relative; margin-top: 22px; height: clamp(320px, 96vw, 460px); perspective: 1200px; }
.sol.is-stacked .sol-mslot > .demo-label { position: absolute; left: 0; top: 0; z-index: 2; }
.sol.is-stacked .sol-comp { top: 30px; }
.sol.is-stacked .sol-comp--1 .sol-card--land { --x: 62%; --y: 40%; --h: 48%; }
.sol.is-stacked .sol-comp--1 .sol-card--ad { --x: 24%; --y: 54%; --h: 86%; }

@media (max-width: 1100px) and (min-width: 901px) {
  .sol-title { font-size: clamp(40px, 5vw, 64px); }
}
@media (prefers-reduced-motion: reduce) {
  .sol-card, .sol-body, .sol-title, .sol-link { transition: none !important; }
  .sol-card, .sol-link::after { animation: none !important; }
}
