/* demo.css — Eligibility-Style Demo Form */

/* ========================
   Global Reset
   ======================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f1f5f9;
}

svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ========================
   Root Variables
   ======================== */
:root {
    --navy-800: #1e293b;
    --navy-900: #0f172a;
    --brand-500: #0ea5e9;
    --brand-600: #0284c7;
    --brand-700: #0369a1;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
}

/* ========================
   Page Wrapper
   ======================== */
.demo-page-wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 2rem;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

/* ========================
   Left Info Panel
   ======================== */
.demo-info-panel {
    display: flex;
    flex-direction: column;
    max-width: 480px;
    animation: fadeSlideIn 0.6s ease both;
}

/* Back link desktop */
.back-link-desktop {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--slate-400);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.back-link-desktop:hover {
    color: var(--brand-600);
    transform: translateX(-2px);
}

/* Badge pill */
.info-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(14, 165, 233, 0.08);
    border: 1.5px solid rgba(14, 165, 233, 0.2);
    border-radius: 2rem;
    color: var(--brand-600);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    width: fit-content;
}

.info-badge-pill svg {
    color: var(--brand-500);
}

/* Title */
.info-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

/* Subtitle */
.info-subtitle {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--slate-500);
    margin-bottom: 2.5rem;
    max-width: 420px;
}

/* Trust cards */
.trust-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trust-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.trust-card:hover {
    border-color: var(--slate-300);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.trust-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate-50);
    border: 1px solid var(--slate-100);
    border-radius: 0.75rem;
    color: var(--slate-600);
    flex-shrink: 0;
}

.trust-card-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 0.125rem;
}

.trust-card-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--slate-400);
    font-weight: 400;
}

/* ========================
   Right Form Panel
   ======================== */
.demo-form-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Mobile back link */
.back-link-mobile {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--slate-400);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 20;
}

.back-link-mobile:hover {
    color: var(--brand-600);
}

@media (min-width: 1024px) {
    .back-link-mobile {
        display: none;
    }
}

/* ========================
   Form Card
   ======================== */
.demo-card {
    width: 100%;
    max-width: 460px;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 10px 30px rgba(0, 0, 0, 0.08);
    animation: cardEntrance 0.5s 0.15s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@media (min-width: 1024px) {
    .demo-card {
        max-width: 50vw;
    }
}

/* Dark header */
.card-header {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
    padding: 1.75rem 2rem;
    border-radius: 1.25rem 1.25rem 0 0;
}

.card-header-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}

.card-header-subtitle {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
}

/* Form body */
.card-body {
    background: #fff;
    padding: 1.75rem 2rem 1.25rem;
    border-radius: 0 0 1.25rem 1.25rem;
}

@media (min-width: 1024px) {
    .card-header {
        padding: 2.25rem 3rem;
    }

    .card-header-title {
        font-size: 1.625rem;
    }

    .card-body {
        padding: 2.25rem 3rem 1.75rem;
    }
}

/* ========================
   Form Fields
   ======================== */
.field-group {
    margin-bottom: 1.25rem;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 0.5rem;
}

.field-label svg {
    color: var(--slate-400);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 0.8125rem 3.5rem 0.8125rem 1rem;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--slate-800);
    background: #fff;
    border: 1.5px solid var(--slate-200);
    border-radius: 0.625rem;
    outline: none;
    transition: all 0.25s ease;
}

.input-wrapper input::placeholder {
    color: var(--slate-300);
}

.input-wrapper input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.input-wrapper input.input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

/* Character counter */
.char-counter {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6875rem;
    color: var(--slate-300);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

/* Error messages */
.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.375rem;
    padding-left: 0.25rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.error-message.visible {
    opacity: 1;
    max-height: 2rem;
}

/* ========================
   Captcha Box
   ======================== */
.captcha-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--slate-200);
    border-radius: 0.625rem;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    margin-bottom: 1.25rem;
}

.captcha-box:hover {
    border-color: var(--slate-300);
}

.captcha-box.checked {
    border-color: var(--brand-500);
    background: rgba(14, 165, 233, 0.02);
}

.captcha-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.3125rem;
    border: 2px solid var(--slate-300);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.captcha-box.checked .captcha-checkbox {
    background: var(--brand-500);
    border-color: var(--brand-500);
}

.captcha-checkmark {
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.captcha-box.checked .captcha-checkmark {
    opacity: 1;
    transform: scale(1);
}

.captcha-text {
    font-size: 0.8125rem;
    color: var(--slate-600);
    font-weight: 500;
    flex: 1;
}

.captcha-secure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    color: var(--slate-300);
    transition: color 0.3s ease;
}

.captcha-box.checked .captcha-secure {
    color: var(--brand-500);
}

.captcha-secure span {
    font-size: 0.5625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================
   Submit Button
   ======================== */
.btn-demo-submit {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
    border: none;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
    letter-spacing: 0.01em;
}

.btn-demo-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
}

.btn-demo-submit:active {
    transform: translateY(0) scale(0.98);
}

/* Light sweep on hover */
.btn-demo-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.btn-demo-submit:hover::before {
    animation: lightSweep 0.6s ease-out forwards;
}

/* Ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}

/* ========================
   Animations
   ======================== */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes lightSweep {
    0% {
        left: -100%;
    }

    100% {
        left: 150%;
    }
}

@keyframes fadeSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.page-exit .demo-card {
    animation: fadeSlideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 1023px) {
    .demo-page-wrapper {
        height: auto;
        min-height: 100vh;
        flex-direction: column;
        align-items: center;
        padding: 2rem 1.25rem;
        gap: 2rem;
    }

    .demo-info-panel {
        max-width: 100%;
        text-align: center;
        align-items: center;
    }

    .info-badge-pill {
        margin-left: auto;
        margin-right: auto;
    }

    .info-title {
        font-size: 1.75rem;
    }

    .info-subtitle {
        text-align: center;
    }

    .trust-cards {
        width: 100%;
    }

    .demo-card {
        max-width: 100%;
    }

    .card-header {
        padding: 1.5rem 1.5rem;
    }

    .card-body {
        padding: 1.5rem 1.5rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .demo-page-wrapper {
        padding: 4rem 1rem 2rem;
    }

    .card-header-title {
        font-size: 1.2rem;
    }

    .info-title {
        font-size: 1.75rem;
    }
}

/* ========================
   CTA Glow on index.html
   ======================== */
.cta-demo-btn {
    position: relative;
    overflow: hidden;
}

.cta-demo-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.cta-demo-btn:hover::before {
    animation: lightSweep 0.6s ease-out forwards;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(14, 165, 233, 0.65), 0 0 40px rgba(14, 165, 233, 0.15);
    }
}

.cta-demo-btn {
    animation: glowPulse 3s ease-in-out infinite;
}

.cta-icon-animated {
    display: inline-block;
    animation: rocketBounce 2s ease-in-out infinite;
}

@keyframes rocketBounce {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-3px) rotate(0deg);
    }
}

/* ========================
   Checkmark (Thank You)
   ======================== */
@keyframes checkDraw {
    0% {
        stroke-dashoffset: 100;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes circleDraw {
    0% {
        stroke-dashoffset: 314;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scaleBounce {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.checkmark-container {
    animation: scaleBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.checkmark-circle {
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    animation: circleDraw 0.8s 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.checkmark-check {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkDraw 0.5s 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ========================
   Confetti & Thank You
   ======================== */
@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 1;
    animation: confettiFall linear forwards;
    border-radius: 2px;
}

@keyframes textFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.merci-bg {
    background: linear-gradient(-45deg, #075985, #0ea5e9, #38bdf8, #0284c7, #0c4a6e);
    background-size: 400% 400%;
    animation: gradientShift 18s ease infinite;
    min-height: 100vh;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    border-radius: 1.5rem;
}

.merci-title {
    animation: textFadeUp 0.7s 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.merci-message {
    animation: textFadeUp 0.7s 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.merci-btn {
    animation: textFadeUp 0.7s 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}