/* FRSite – contact form (builds on trial.css field styles). */
.frs-cbox { position: relative; }
.frs-cform { margin: 0; }
.frs-cform[hidden], .frs-csuccess[hidden] { display: none; }

/* Progress line */
.frs-cform__progress { height: 3px; margin: 0 0 1.5rem; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.frs-cform__progress span { display: block; height: 100%; background: linear-gradient(90deg, #a855f7, #3b82f6, #22d3ee); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }

/* Fieldsets */
.frs-cfield { margin: 0 0 1.4rem; padding: 0; border: 0; min-width: 0; }
.frs-cfield legend { margin: 0 0 .7rem; padding: 0; color: #e5e7eb; font-size: .875rem; font-weight: 600; }
.frs-cfield .req { color: #fbbf24; }
.frs-cfield.is-invalid .frs-tfield__error { display: block; margin-top: .5rem; }

/* Subject chips */
.frs-topics { display: flex; flex-wrap: wrap; gap: .55rem; }
.frs-topic { position: relative; cursor: pointer; }
.frs-topic input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.frs-topic__in { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem .95rem; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; background: rgba(255, 255, 255, .04); color: #cbd5e1; font-size: .875rem; font-weight: 500; transition: transform .25s cubic-bezier(.2, .8, .2, 1), background-color .25s, border-color .25s, color .25s, box-shadow .25s; }
.frs-topic__in svg { width: 16px; height: 16px; flex: none; color: #8b93a7; transition: color .25s, transform .35s; }
.frs-topic:hover .frs-topic__in { border-color: rgba(255, 255, 255, .25); color: #fff; transform: translateY(-1px); }
.frs-topic input:focus-visible + .frs-topic__in { outline: 2px solid #c084fc; outline-offset: 2px; }
.frs-topic input:checked + .frs-topic__in { border-color: transparent; color: #fff; background: linear-gradient(#17121f, #17121f) padding-box, linear-gradient(90deg, #a855f7, #3b82f6) border-box; border: 1px solid transparent; box-shadow: 0 8px 24px -8px rgba(168, 85, 247, .55); }
.frs-topic input:checked + .frs-topic__in svg { color: #c084fc; transform: scale(1.12) rotate(-6deg); }
.frs-cfield.is-invalid .frs-topic__in { border-color: rgba(248, 113, 113, .5); }

/* Floating labels */
.frs-float .frs-tfield__control { display: block; }
.frs-float label { position: absolute; left: 2.7rem; top: 50%; z-index: 1; margin: 0; padding: 0 .3rem; transform: translateY(-50%); color: #8b93a7; font-size: .95rem; font-weight: 500; pointer-events: none; transition: top .2s, transform .2s, font-size .2s, color .2s, background-color .2s; border-radius: 6px; }
.frs-float input { padding-top: 1.15rem; padding-bottom: .35rem; min-height: 56px; }
.frs-float input:focus + label, .frs-float input:not(:placeholder-shown) + label { top: .5rem; transform: translateY(0); font-size: .7rem; font-weight: 600; letter-spacing: .02em; color: #c4b5fd; }
.frs-float--area label { left: .7rem; top: 1rem; transform: none; }
.frs-float--area textarea { min-height: 150px; padding: 1.6rem 1rem .8rem; }
.frs-float--area textarea:focus + label, .frs-float--area textarea:not(:placeholder-shown) + label { top: .45rem; font-size: .7rem; font-weight: 600; letter-spacing: .02em; color: #c4b5fd; }
.frs-float.is-invalid label { color: #fca5a5; }

/* Brand focus ring for this form */
.frs-cform .frs-tfield input:focus, .frs-cform .frs-tfield select:focus, .frs-cform .frs-tfield textarea:focus { border-color: rgba(168, 85, 247, .75); box-shadow: 0 0 0 4px rgba(168, 85, 247, .16); }
.frs-cform .frs-tfield__control:focus-within .frs-tfield__icon { stroke: #c084fc; }
.frs-cform .frs-phone:focus-within, .frs-cform .frs-phone.is-open { border-color: rgba(168, 85, 247, .75); box-shadow: 0 0 0 4px rgba(168, 85, 247, .16); }
.frs-cform .frs-tfield > label .opt[hidden], .frs-cform .req[hidden] { display: none; }

.frs-cform__meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; min-height: 1.2rem; }
.frs-cform__count { margin-left: auto; color: #6b7280; font-size: .75rem; font-variant-numeric: tabular-nums; transition: color .2s; }
.frs-cform__count.is-warn { color: #fbbf24; }

/* Reply channel segmented control */
.frs-reply { margin: 1.4rem 0 0; }
.frs-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; background: rgba(255, 255, 255, .03); isolation: isolate; }
.frs-seg label { position: relative; z-index: 1; cursor: pointer; }
.frs-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.frs-seg span { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; border-radius: 10px; color: #9ca3af; font-size: .9rem; font-weight: 600; transition: color .3s; }
.frs-seg svg { width: 17px; height: 17px; }
.frs-seg input:checked + span { color: #fff; }
.frs-seg input:focus-visible + span { outline: 2px solid #c084fc; outline-offset: -2px; }
.frs-seg__thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: linear-gradient(90deg, #9333ea, #3b82f6); box-shadow: 0 8px 22px -8px rgba(147, 51, 234, .7); transition: transform .45s cubic-bezier(.2, .9, .25, 1.15), background .45s, box-shadow .45s; }
.frs-seg.is-wa .frs-seg__thumb { transform: translateX(100%); background: linear-gradient(90deg, #16a34a, #22c55e); box-shadow: 0 8px 22px -8px rgba(34, 197, 94, .7); }

/* Footer + submit */
.frs-cform__foot { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 720px) { .frs-cform__foot { grid-template-columns: 1fr auto; align-items: center; gap: 1.5rem; } }
.frs-cform__legal { margin: 0; color: #6b7280; font-size: .78rem; line-height: 1.5; }
.frs-cform__legal a { color: #a5b4fc; }
.frs-cform__submit { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .7rem; min-height: 56px; padding: .9rem 1.8rem; border: 0; border-radius: 14px; cursor: pointer; overflow: hidden; isolation: isolate; color: #fff; font: inherit; font-size: 1rem; font-weight: 700; background: linear-gradient(90deg, #9333ea, #3b82f6); box-shadow: 0 14px 34px -12px rgba(147, 51, 234, .7); transition: transform .25s, box-shadow .3s, filter .3s; }
.frs-cform__submit::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s; }
.frs-cform__submit:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -12px rgba(147, 51, 234, .8); }
.frs-cform__submit:hover::before { transform: translateX(120%); }
.frs-cform__submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.frs-cform.is-ready .frs-cform__submit { animation: frsReady 2.4s ease-in-out infinite; }
@keyframes frsReady { 50% { box-shadow: 0 14px 34px -10px rgba(59, 130, 246, .85), 0 0 0 6px rgba(168, 85, 247, .12); } }
.frs-cform__plane { display: inline-flex; transition: transform .35s; }
.frs-cform__plane svg { width: 19px; height: 19px; }
.frs-cform__submit:hover .frs-cform__plane { transform: translate(3px, -3px) rotate(-8deg); }
.frs-cform__spin { position: absolute; width: 22px; height: 22px; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; opacity: 0; animation: frsSpin .8s linear infinite; }
@keyframes frsSpin { to { transform: rotate(360deg); } }
.frs-cform.is-busy .frs-cform__label, .frs-cform.is-busy .frs-cform__plane { opacity: 0; }
.frs-cform.is-busy .frs-cform__spin { opacity: 1; }
.frs-cform.is-sent .frs-cform__plane { opacity: 1; animation: frsFly .7s cubic-bezier(.5, -.4, .7, .2) forwards; }
.frs-cform.is-sent .frs-cform__label { opacity: 1; }
.frs-cform.is-sent { animation: frsOut .45s .25s ease forwards; }
@keyframes frsFly { to { transform: translate(140px, -90px) rotate(-20deg) scale(.6); opacity: 0; } }
@keyframes frsOut { to { opacity: 0; transform: translateY(-8px) scale(.99); } }
.frs-cform.is-shake { animation: frsShake .45s; }
@keyframes frsShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Success */
.frs-csuccess { padding: 2.5rem 1rem; text-align: center; outline: none; }
.frs-csuccess.is-in > * { animation: frsRise .6s cubic-bezier(.2, .8, .2, 1) both; }
.frs-csuccess.is-in > :nth-child(2) { animation-delay: .25s; }
.frs-csuccess.is-in > :nth-child(3) { animation-delay: .35s; }
.frs-csuccess.is-in > :nth-child(4) { animation-delay: .45s; }
@keyframes frsRise { from { opacity: 0; transform: translateY(14px); } }
.frs-csuccess__badge { width: 92px; height: 92px; margin: 0 auto 1.3rem; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(34, 197, 94, .25), rgba(34, 197, 94, 0) 70%); }
.frs-csuccess__badge svg { width: 72px; height: 72px; fill: none; stroke: #22c55e; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.frs-csuccess__badge circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: frsDraw .7s .1s ease-out forwards; }
.frs-csuccess__badge path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: frsDraw .45s .7s ease-out forwards; }
@keyframes frsDraw { to { stroke-dashoffset: 0; } }
.frs-csuccess__title { margin: 0 0 .5rem; color: #fff; font-size: 1.6rem; font-weight: 800; }
.frs-csuccess__text { max-width: 30rem; margin: 0 auto 1.6rem; color: #9ca3af; }
.frs-csuccess__text strong { color: #fff; }
.frs-csuccess__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.frs-csuccess__wa, .frs-csuccess__again { display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; padding: .7rem 1.3rem; border-radius: 12px; font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; transition: transform .2s, background-color .2s; }
.frs-csuccess__wa { background: #16a34a; color: #fff !important; }
.frs-csuccess__wa:hover { background: #22c55e; transform: translateY(-2px); }
.frs-csuccess__wa svg { width: 18px; height: 18px; }
.frs-csuccess__wa[hidden] { display: none; }
.frs-csuccess__again { border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .05); color: #e5e7eb; }
.frs-csuccess__again:hover { background: rgba(255, 255, 255, .1); }

@media (prefers-reduced-motion: reduce) {
	.frs-cform *, .frs-csuccess * { animation: none !important; transition: none !important; }
	.frs-csuccess__badge circle, .frs-csuccess__badge path { stroke-dashoffset: 0; }
}
