/* Provaniq website v3.7 — hero "life of a promise" story, refreshed vision, form choices. */

/* ================= HERO STORY ================= */
.story { position: relative; height: 560px; }
.story-bg { position: absolute; inset: -20px -10px 40px; border-radius: 40px; background:
  radial-gradient(circle at 70% 30%, rgba(255,237,231,.9), transparent 60%),
  radial-gradient(circle at 20% 80%, rgba(233,228,243,.8), transparent 55%); z-index: 0; }
.story svg.traces { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: visible; pointer-events: none; }
.trace { fill: none; stroke: var(--coral); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s var(--ease); }
.trace.on { stroke-dashoffset: 0; }
.trace-ants { fill: none; stroke: rgba(242,96,74,.35); stroke-width: 2.4; stroke-dasharray: 2 10; stroke-linecap: round; opacity: 0; transition: opacity .4s; animation: ants 1s linear infinite; }
.trace.on + .trace-ants { opacity: 1; }
.trace.on { opacity: .9; }

.sc { position: absolute; z-index: 2; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; box-shadow: 0 2px 4px rgba(46,34,56,.05), 0 24px 50px -28px rgba(46,34,56,.45);
  opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .55s var(--ease), transform .55s var(--ease), box-shadow .4s; }
.sc.on { opacity: 1; transform: none; }
.sc.focus { box-shadow: 0 0 0 2px var(--coral), 0 24px 50px -24px rgba(46,34,56,.5); }
.sc-head { display: flex; align-items: center; gap: 8px; font: 600 12px var(--f-ui); color: var(--text-2); margin-bottom: 8px; }
.sc-head img { width: 18px; height: 18px; }
.sc-head .ft { width: 20px; height: 24px; padding-top: 7px; font-size: 6px; }
.sc-head .stp { margin-left: auto; font: 700 11px var(--f-ui); color: var(--evidence); background: var(--peach); border-radius: 99px; padding: 2px 8px; }
.sc-title { font: 700 16px/1.35 var(--f-display); letter-spacing: -.01em; }
.sc-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.sc .quote { font: 600 16px/1.35 var(--f-display); background: var(--lilac-soft); border-radius: 14px 14px 14px 4px; padding: 10px 12px; min-height: 2.7em; }
.sc .quote .cur { display: inline-block; width: 2px; height: 1em; background: var(--coral); vertical-align: -2px; margin-left: 2px; animation: caret 1s steps(1) infinite; }
.sc .money { font: 800 22px/1 var(--f-display); letter-spacing: -.02em; }
.sc .money small { font: 600 12px var(--f-ui); color: var(--text-2); letter-spacing: 0; margin-left: 6px; }
.sc .chip { transition: background .3s, color .3s; }
.sc .chip.popin { animation: chip-pop .55s cubic-bezier(.3,1.6,.5,1); }
@keyframes chip-pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }

.sc-req { left: 0; top: 8px; }
.sc-prom { right: 0; top: 140px; }
.sc-check { left: 22px; top: 318px; width: 320px; }

.story-p { position: absolute; z-index: 3; left: 52%; top: 262px; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-lift); display: grid; place-items: center; transition: transform .4s var(--ease); }
.story-p svg { width: 58px; height: 58px; }
.story-p .ring { position: absolute; inset: -10px; border-radius: 32px; border: 2.5px solid transparent; border-top-color: var(--coral); opacity: 0; }
.story-p.p-scan .ring { opacity: 1; animation: spin 1s linear infinite; }
.story-p .say { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%) scale(.9); transform-origin: 0 50%; white-space: nowrap; background: var(--aub); color: #fff; font: 600 13px var(--f-ui); padding: 8px 12px; border-radius: 14px 14px 14px 4px; opacity: 0; transition: opacity .3s, transform .3s var(--ease); box-shadow: var(--sh-lift); }
.story-p .say.on { opacity: 1; transform: translateY(-50%) scale(1); }

.story-count { position: absolute; z-index: 3; right: 6px; top: 0; background: var(--aub); color: #fff; border-radius: 18px; padding: 12px 16px; box-shadow: var(--sh-lift); min-width: 170px; }
.story-count small { display: block; font: 600 11.5px var(--f-ui); color: #CFC6DA; }
.story-count b { display: inline-block; font: 800 30px/1 var(--f-display); letter-spacing: -.03em; margin-top: 4px; transition: transform .3s var(--ease); }
.story-count b.tick { animation: count-tick .6s cubic-bezier(.3,1.6,.5,1); color: #9BE3BF; }
@keyframes count-tick { 0% { transform: translateY(-14px); opacity: 0; } 100% { transform: none; opacity: 1; } }

.story-done { position: absolute; z-index: 4; right: 30px; top: 420px; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; box-shadow: var(--sh-lift); font: 600 13.5px var(--f-ui); opacity: 0; transform: translateY(14px) scale(.9); transition: opacity .4s, transform .5s cubic-bezier(.3,1.6,.5,1); }
.story-done.on { opacity: 1; transform: none; }
.story-done .ai { width: 24px; height: 24px; }

.story-steps { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: var(--sh-card); }
.story-steps button { position: relative; overflow: hidden; border: 0; background: transparent; border-radius: 12px; padding: 9px 8px; font: 600 13px var(--f-ui); color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .3s, color .3s; }
.story-steps button i { width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; font: 700 11px var(--f-ui); font-style: normal; border: 1.5px solid var(--line-2); background: #fff; transition: background .3s, border-color .3s, color .3s; }
.story-steps button.on { background: var(--peach-soft); color: var(--text); }
.story-steps button.on i { border-color: var(--coral); color: var(--evidence); }
.story-steps button.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.story-steps button .pf { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--coral); }
.story-steps button.on .pf { animation: sbar var(--beat, 2.6s) linear forwards; }
.story.paused .story-steps button.on .pf { animation-play-state: paused; }
.story-tag { position: absolute; z-index: 3; left: 0; bottom: 64px; font: 500 11.5px var(--f-ui); color: var(--text-2); border: 1px dashed var(--line-2); border-radius: 99px; padding: 3px 10px; background: rgba(255,255,255,.7); }
.story.fade .sc, .story.fade .story-done { opacity: 0 !important; transform: translateY(-10px) !important; }

@media (max-width: 1080px) {
  .story { max-width: 600px; margin: 10px auto 0; }
}
@media (max-width: 860px) {
  .story { height: 640px; }
  .sc { width: calc(100% - 20px); left: 0; right: auto; }
  .sc-req { top: 64px; }
  .sc-prom { top: 214px; left: 20px; }
  .sc-check { top: 388px; left: 0; width: calc(100% - 20px); }
  .story-p { left: auto; right: 0; top: 0; transform: none; width: 62px; height: 62px; border-radius: 20px; }
  .story-p svg { width: 42px; height: 42px; }
  .story-p .say { left: auto; right: calc(100% + 10px); border-radius: 14px 14px 4px 14px; transform-origin: 100% 50%; }
  .story-count { left: 0; right: auto; top: 0; min-width: 0; padding: 8px 12px; }
  .story-count b { font-size: 22px; }
  .story-done { right: 0; top: 548px; }
  .story-steps button { font-size: 11px; padding: 8px 4px; gap: 4px; }
  .story-steps button span { display: none; }
  .story svg.traces { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sc, .story-done { transition: none; }
  .trace { transition: none; }
}

/* ================= VISION ================= */
.vgraph { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.vcol { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--sh-card); }
.vcol.now { border-color: #F3B9AC; background: linear-gradient(180deg, var(--peach-soft), #fff 60%); }
.vcol:not(:last-child)::after { content: ""; position: absolute; right: -14px; top: 50%; width: 12px; height: 12px; border-top: 2.5px solid var(--coral); border-right: 2.5px solid var(--coral); transform: translateY(-50%) rotate(45deg); }
.vcol h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.vcol h3 .ai { width: 22px; height: 22px; }
.vcol .vchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.vcol .gnode { opacity: 1; font-size: 13px; padding: 6px 12px; }
.vcol .gnode.now { background: #fff; }
.vcol .lab { display: inline-block; margin-top: 12px; }
.agents { grid-template-columns: repeat(5, 1fr); }
.agent { border-style: solid; background: #fff; box-shadow: var(--sh-card); display: grid; gap: 10px; align-content: start; }
.agent h4 { margin: 4px 0 0; }
.agent p { font-style: normal; background: var(--lilac-soft); border-radius: 14px 14px 14px 4px; padding: 10px 12px; color: var(--text); font: 600 14px/1.4 var(--f-display); }
@media (max-width: 1080px) { .vgraph { grid-template-columns: 1fr 1fr; } .vcol:nth-child(2)::after { display: none; } }
@media (max-width: 600px) { .vgraph { grid-template-columns: 1fr; } .vcol::after { display: none; } }

/* ================= FORM CHOICES ================= */
.cards-choice.roles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cards-choice .ic { width: 30px; height: 30px; border-radius: 10px; background: var(--lilac-soft); display: grid; place-items: center; flex: none; }
.cards-choice .ic .ai { width: 18px; height: 18px; }
.cards-choice .ic img { width: 18px; height: 18px; }
.cards-choice .ic img.wide { width: 24px; height: auto; }
.cards-choice.four { grid-template-columns: repeat(4, 1fr); }
.cards-choice.four label { justify-content: center; text-align: center; padding: 12px 8px; }
.cards-choice.four .tick { display: none; }
.cards-choice.tools { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.cards-choice .tick.sq { border-radius: 6px; }
.cards-choice .tick.sq::after { width: 10px; height: 6px; border-radius: 0; background: transparent; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -2px; }
.cards-choice label:has(input:checked) .tick.sq::after { transform: rotate(-45deg) scale(1); }
.cards-choice label { min-height: 52px; }
.field legend { font: 600 14px var(--f-ui); padding: 0; margin-bottom: 8px; }
@media (max-width: 600px) { .cards-choice.four { grid-template-columns: 1fr 1fr; } .cards-choice.roles { grid-template-columns: 1fr; } }

/* v3.7 fixes: one-line card headers, character between the cards, done toast clear of cards */
.sc-head .h-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-head .stp { flex: none; }
.story-p { left: 64px; top: 230px; }
.story-done { right: 0; top: 380px; }
@media (max-width: 860px) { .story-p { left: auto; top: 0; } .story-done { top: 548px; } }

@media (max-width: 1080px) { .story { width: 100%; } }
@media (max-width: 860px) { .story-p .say { max-width: 52vw; white-space: normal; } }
@media (max-width: 860px) {
  .story-p .say { left: auto; right: 0; top: calc(100% + 8px); transform: scale(.9); transform-origin: 100% 0; border-radius: 14px 4px 14px 14px; white-space: nowrap; max-width: none; }
  .story-p .say.on { transform: scale(1); }
  .sc-req { top: 120px; } .sc-prom { top: 262px; } .sc-check { top: 420px; }
  .story { height: 680px; }
  .story-steps button span:not(.pf) { display: inline; }
}
@media (max-width: 520px) { .story-steps button span:not(.pf) { display: none; } }
