/* =========================================================
   Shared form UX: send button states, flying paper plane,
   animated success view (used by Kontakt, home demo form, chat)
   ========================================================= */

/* ---------- send button ---------- */
.ia-send { position: relative; overflow: hidden; }
.ia-send-label, .ia-send-ico { transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease; }
.ia-send-label { display: inline-flex; align-items: center; gap: 8px; }
.ia-send-ico { width: 17px; height: 17px; background: currentColor; flex: none;
  -webkit-mask: url('/assets/img/icons/send.svg') center / contain no-repeat;
  mask: url('/assets/img/icons/send.svg') center / contain no-repeat; }
.ia-send:hover:not([disabled]) .ia-send-ico { transform: translate(3px, -3px) rotate(-8deg); }
.ia-send.is-sending { pointer-events: none; }
.ia-send.is-sending .ia-send-label { opacity: 0; transform: translateY(-110%); }
.ia-send::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 19px; height: 19px; margin: -9.5px 0 0 -9.5px;
  border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; opacity: 0;
  transform: translateY(14px) scale(0.6); transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.ia-send.is-sending::before { opacity: 0.9; transform: none; animation: iaSpin 0.7s linear infinite; }
@keyframes iaSpin { to { transform: rotate(360deg); } }
.ia-send.is-flying .ia-send-ico { animation: iaFly 0.7s cubic-bezier(0.5, 0, 0.75, 0) forwards; }
.ia-send.is-flying::before { opacity: 0; animation: none; }
.ia-send.is-flying .ia-send-label { opacity: 1; transform: none; }
@keyframes iaFly {
  0% { transform: none; opacity: 1; }
  35% { transform: translate(-3px, 3px) rotate(-12deg); opacity: 1; }
  100% { transform: translate(120px, -90px) rotate(18deg) scale(0.6); opacity: 0; }
}

/* ---------- smooth swap (form → success) ---------- */
.ia-swap { transition: height 0.55s cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden; }
.ia-swap > .ia-swap-inner { transition: opacity 0.3s ease, transform 0.35s ease; }
.ia-swap.is-out > .ia-swap-inner { opacity: 0; transform: translateY(-8px) scale(0.99); }
.ia-swap.is-in > .ia-swap-inner { animation: iaIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes iaIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- success view ---------- */
.ia-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 6px 8px; --ia-fg: #282624; --ia-muted: #77736f; --ia-line: #e7e3dd; --ia-soft: #fff1ed; --ia-card: #f8f7f4; }
.ia-done.is-dark { --ia-fg: #ffffff; --ia-muted: rgba(255, 255, 255, 0.66); --ia-line: rgba(255, 255, 255, 0.18); --ia-soft: rgba(255, 107, 82, 0.16); --ia-card: rgba(255, 255, 255, 0.06); }
.ia-done.is-compact { padding: 6px 2px 2px; gap: 7px; }

.ia-check { position: relative; width: 76px; height: 76px; margin-bottom: 6px; }
.ia-done.is-compact .ia-check { width: 56px; height: 56px; }
.ia-check svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.ia-check .ring { fill: var(--ia-soft); stroke: #ff6b52; stroke-width: 2.5; stroke-dasharray: 151; stroke-dashoffset: 151; animation: iaDraw 0.7s 0.1s cubic-bezier(0.16, 1, 0.3, 1) forwards; transform-origin: center; }
.ia-check .tick { fill: none; stroke: #ff6b52; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: iaDraw 0.5s 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.ia-check::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #ff6b52; opacity: 0; animation: iaPulse 1.1s 0.7s ease-out forwards; }
@keyframes iaDraw { to { stroke-dashoffset: 0; } }
@keyframes iaPulse { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }
.ia-spark { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #ff6b52; opacity: 0;
  animation: iaSpark 0.9s calc(0.7s + var(--d, 0s)) cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.ia-spark:nth-child(odd) { background: #ffb09f; width: 5px; height: 5px; }
@keyframes iaSpark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-58px) scale(0.3); } }

.ia-done h3 { font-size: 1.45rem; line-height: 1.15; letter-spacing: -0.025em; color: var(--ia-fg); margin: 0; animation: iaIn 0.6s 0.45s both cubic-bezier(0.16, 1, 0.3, 1); }
.ia-done.is-compact h3 { font-size: 1.1rem; }
.ia-lead { font-size: 15px; line-height: 1.5; color: var(--ia-muted); max-width: 380px; margin: 0; animation: iaIn 0.6s 0.55s both cubic-bezier(0.16, 1, 0.3, 1); }
.ia-lead strong { color: var(--ia-fg); }
.ia-done.is-compact .ia-lead { font-size: 13px; }

/* progress: step 1 already done (endowed progress) */
.ia-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; max-width: 380px; margin: 10px 0 2px; position: relative; }
.ia-steps::before { content: ""; position: absolute; left: 16.6%; right: 16.6%; top: 14px; height: 2px; background: var(--ia-line); }
.ia-steps::after { content: ""; position: absolute; left: 16.6%; top: 14px; height: 2px; width: 0; background: linear-gradient(90deg, #ff6b52, #ff9a86); animation: iaLine 1s 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes iaLine { to { width: 33.3%; } }
.ia-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; line-height: 1.3; color: var(--ia-muted); font-weight: 500; animation: iaIn 0.55s calc(0.7s + var(--n) * 0.12s) both cubic-bezier(0.16, 1, 0.3, 1); }
.ia-step i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12.5px; font-weight: 700; border: 2px solid var(--ia-line); background: var(--ia-card); color: var(--ia-muted); }
.ia-step.is-done { color: var(--ia-fg); font-weight: 650; }
.ia-step.is-done i { background: #ff6b52; border-color: #ff6b52; color: #fff; }
.ia-step.is-now { color: var(--ia-fg); font-weight: 650; }
.ia-step.is-now i { border-color: #ff6b52; background: var(--ia-soft); color: #ff6b52; animation: iaNow 2s 1.6s ease-in-out infinite; }
@keyframes iaNow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 82, 0.45); } 60% { box-shadow: 0 0 0 9px rgba(255, 107, 82, 0); } }
.ia-done.is-compact .ia-steps { margin-top: 4px; }
.ia-done.is-compact .ia-step { font-size: 11px; }
.ia-done.is-compact .ia-step i { width: 26px; height: 26px; }
.ia-done.is-compact .ia-steps::before, .ia-done.is-compact .ia-steps::after { top: 12px; }

.ia-mail { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 14px; border-radius: 99px; background: var(--ia-card); border: 1px solid var(--ia-line); font-size: 13px; color: var(--ia-muted); max-width: 100%; animation: iaIn 0.6s 1.2s both cubic-bezier(0.16, 1, 0.3, 1); }
.ia-mail b { color: var(--ia-fg); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ia-mail::before { content: ""; width: 15px; height: 15px; flex: none; background: #ff6b52; -webkit-mask: url('/assets/img/icons/mail-check.svg') center / contain no-repeat; mask: url('/assets/img/icons/mail-check.svg') center / contain no-repeat; }
.ia-done.is-compact .ia-mail { font-size: 12px; padding: 6px 11px; }

@media (prefers-reduced-motion: reduce) {
  .ia-send *, .ia-send, .ia-swap, .ia-swap *, .ia-done *, .ia-done, .ia-check::before, .ia-spark { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .ia-spark { display: none; }
}

/* honeypot: invisible to people, tempting to bots */
.iac-hp, .ia-hp { position: absolute !important; left: -9999px !important; top: auto !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

.df-consent-note a { color: rgba(255,255,255,0.8); text-decoration: underline; text-underline-offset: 2px; }
.cf-consent a, .iac-consent a { color: var(--text-strong); text-decoration: underline; text-decoration-color: rgba(255,107,82,0.6); text-underline-offset: 2px; }

/* Homepage demo form: consent checkbox (dark section) */
.df-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 12.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.62); cursor: pointer; text-align: left; }
.df-consent input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--accent, #ff6b52); flex: none; }
.df-consent a { color: rgba(255, 255, 255, 0.85); text-decoration: underline; text-underline-offset: 2px; }
