/* =============================================================================
   HOMEPAGE VALIDATION CARD (illustrative record)
   Loaded only by the homepage.
   ============================================================================= */

.hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.vc-wrapper {
    width: 100%;
    max-width: 440px;
}
.vc-example {
    margin: 0 0 var(--space-2);
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    text-align: right;
}

.vc-card {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(27, 42, 74, 0.08), 0 4px 12px rgba(27, 42, 74, 0.04);
    opacity: 0;
    transform: translateY(12px);
    animation: vcAppear 0.6s ease 0.2s forwards;
}
.vc-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
}
.vc-card__dot {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    background: var(--emerald);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    animation: vcDotPulse 2s ease 4.4s infinite;
}
.vc-card__name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--navy);
}
.vc-card__address {
    margin-top: 0.15rem;
    font-size: var(--font-size-xs);
    color: var(--gray-500);
}

/* Source cross-check row */
.vc-sources {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(104px, 1.7fr);
    align-items: center;
    gap: 0.2rem;
    padding: 0.8rem 0.75rem 0.75rem;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--border-color);
}
.vc-source {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.5625rem;
    line-height: 1.1;
    color: var(--gray-500);
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(3px);
    animation: vcSource 0.35s ease forwards;
    animation-delay: var(--source-delay);
}
.vc-source__icon::after {
    content: "\2713";
    position: absolute;
    top: -3px;
    right: -6px;
    z-index: 2;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ECFDF5;
    color: var(--emerald-dark);
    font-size: 0.45rem;
    font-weight: 800;
    line-height: 12px;
    text-align: center;
}
.vc-source__icon {
    position: relative;
    display: flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-300);
    border-radius: 50%;
    background: var(--white);
    color: var(--navy);
    box-shadow: 0 1px 3px rgba(27, 42, 74, 0.06);
}
.vc-source__icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}
.vc-sources__result {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.4rem 0.5rem;
    border-radius: 999px;
    background: #ECFDF5;
    color: var(--emerald-dark);
    font-size: 0.5625rem;
    font-weight: 700;
    line-height: 1.1;
    opacity: 0;
    transform: scale(0.95);
    animation: vcResult 0.4s ease 1.95s forwards;
}
.vc-sources__result svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: var(--emerald);
    stroke: var(--white);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

/* Field rows */
.vc-card__rows { padding: var(--space-2) 0; }
.vc-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 0.45rem var(--space-6);
    opacity: 0;
    transform: translateX(-8px);
    animation: vcSlide 0.45s ease forwards;
}
.vc-row__check {
    display: flex;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--emerald-100);
    color: var(--emerald-dark);
    font-size: 0.625rem;
    font-weight: 700;
}
.vc-row__label {
    min-width: 58px;
    font-size: var(--font-size-xs);
    color: var(--gray-500);
}
.vc-row__value {
    min-width: 0;
    overflow: hidden;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--navy);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vc-row__validator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--emerald-dark);
    white-space: nowrap;
    opacity: 0;
    animation: vcFade 0.3s ease forwards;
}
.vc-row__validator-mark {
    display: grid;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    place-items: center;
    border-radius: 50%;
    background: var(--emerald-dark);
    color: var(--white);
    font-size: 0.5rem;
    font-weight: 800;
}

.vc-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 0.65rem var(--space-6);
    border-top: 1px solid var(--border-color);
    background: var(--gray-50);
    font-size: 0.6875rem;
    color: var(--gray-500);
    opacity: 0;
    animation: vcFade 0.4s ease 3.6s forwards;
}
.vc-card__operating {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--gray-600);
}
.vc-card__operating-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Removed record */
.vc-card--flagged {
    max-width: 360px;
    margin: var(--space-3) auto 0;
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(8px) scale(0.97);
    animation: vcFlagged 0.5s ease 4s forwards;
}
.vc-card--flagged .vc-card__header { padding: 0.75rem 1.25rem; }
.vc-card__dot--flagged {
    background: var(--error);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
    animation: none;
}
.vc-card__name--flagged {
    font-size: 0.8125rem;
    color: var(--gray-500);
    text-decoration: line-through;
}
.vc-card__address--flagged {
    font-size: 0.6875rem;
    color: #B91C1C;
}

@keyframes vcAppear { to { opacity: 1; transform: translateY(0); } }
@keyframes vcSlide { to { opacity: 1; transform: translateX(0); } }
@keyframes vcFade { to { opacity: 1; } }
@keyframes vcSource { to { opacity: 1; transform: translateY(0); } }
@keyframes vcResult { to { opacity: 1; transform: scale(1); } }
@keyframes vcFlagged { to { opacity: 0.8; transform: translateY(0) scale(0.97); } }
@keyframes vcDotPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 16px rgba(16, 185, 129, 0.8); }
}

@media (max-width: 1024px) and (min-width: 640px) {
    .vc-wrapper { margin: 0 auto; }
}

@media (max-width: 639px) {
    .hero .hero__visual { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .vc-card,
    .vc-row,
    .vc-source,
    .vc-sources__result,
    .vc-row__validator,
    .vc-card__footer { opacity: 1; transform: none; animation: none; }
    .vc-card--flagged { opacity: 0.8; transform: scale(0.97); animation: none; }
    .vc-card__dot { animation: none; }
}

/* Hero stats: number, name, detail (homepage only) */
.hero__stat { display: block; min-width: 0; color: inherit; text-decoration: none; }
.hero .hero__stat-value { color: var(--emerald-dark); }
.hero .hero__stat-label {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--navy);
}
.hero__stat-detail {
    display: block;
    margin-top: 0.15rem;
    font-size: var(--font-size-xs);
    color: var(--gray-500);
}
.hero__stat--link { border-radius: var(--border-radius-sm); }
.hero__stat--link:hover .hero__stat-label { color: var(--emerald-dark); text-decoration: underline; text-underline-offset: 2px; }
.hero__stat--link:focus-visible { outline: 3px solid var(--emerald-100); outline-offset: 4px; }

/* Problem section: small diagram per card (homepage only) */
.pain-card:hover { border-color: rgba(16, 185, 129, 0.45); }
.pain-viz {
    display: flex;
    min-height: 92px;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--border-radius);
}
.pain-viz__cap {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.pain-viz__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--white);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--gray-500);
}
.pv-chip--on {
    border-color: rgba(16, 185, 129, 0.35);
    background: var(--emerald-50);
    font-weight: 600;
    color: var(--emerald-dark);
}
.pv-chip--fade { opacity: 0.6; }
.pv-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }
.pv-ring { width: 6px; height: 6px; border: 1.5px solid var(--gray-400); border-radius: 50%; }
.pain-viz__checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pv-check {
    padding: 6px 8px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    font-size: 0.6875rem;
}
.pv-check strong { display: block; font-size: var(--font-size-xs); color: var(--navy); }
.pv-ok { font-weight: 700; color: var(--emerald-dark); }
.pv-unk { font-weight: 600; color: var(--gray-500); }
.pain-viz__compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.pv-box {
    padding: 8px 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    font-size: var(--font-size-xs);
    line-height: 1.5;
    color: var(--gray-600);
}
.pv-box strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.6875rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.pv-box--good { border-color: rgba(16, 185, 129, 0.35); }
.pv-box--good strong { color: var(--emerald-dark); }
.pv-arrow { color: var(--gray-400); }

@media (max-width: 480px) {
    .pain-viz__checks { grid-template-columns: 1fr; }
    .pain-viz__compare { grid-template-columns: 1fr; }
    .pv-arrow { justify-self: center; transform: rotate(90deg); }
}

/* Pay After Approval section (homepage only) */
.pay-after__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-10); align-items: start; }
@media (min-width: 900px) { .pay-after__grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-12); } }
.pay-after__grid > * { min-width: 0; }
.pay-after__points { display: grid; gap: var(--space-5); }
.pay-after__contrast { margin: var(--space-2) 0 0; padding: 0 var(--space-2); color: var(--gray-500); line-height: 1.65; }
.pay-after__visual { width: 100%; max-width: 440px; margin: 0 auto; }
.vt {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px rgba(27, 42, 74, 0.08), 0 4px 12px rgba(27, 42, 74, 0.04);
    padding: var(--space-6);
    opacity: 0;
    transform: translateY(12px);
    animation: vcAppear 0.6s ease 0.1s forwards;
}
.vt__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-4); }
.vt__name { font-size: 0.9375rem; font-weight: 700; color: var(--navy); }
.vt__sub { margin-top: 0.15rem; font-size: var(--font-size-xs); color: var(--gray-500); }
.vt__step {
    position: relative;
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: var(--space-3);
    align-items: center;
    padding: 0.55rem 0;
    opacity: 0;
    transform: translateX(-8px);
    animation: vcSlide 0.45s ease forwards;
}
.vt__step::before { content: ""; position: absolute; left: 13px; top: 34px; bottom: -6px; width: 2px; background: var(--gray-200); }
.vt__step:last-child::before { display: none; }
.vt__step:nth-child(1) { animation-delay: 0.4s; }
.vt__step:nth-child(2) { animation-delay: 0.8s; }
.vt__step:nth-child(3) { animation-delay: 1.2s; }
.vt__step:nth-child(4) { animation-delay: 1.6s; }
.vt__step:nth-child(5) { animation-delay: 2.4s; }
.vt__dot { width: 28px; height: 28px; border-radius: 50%; background: var(--emerald-100); color: var(--emerald-dark); display: grid; place-items: center; font-size: 0.7rem; font-weight: 800; }
.vt__label { min-width: 0; font-size: var(--font-size-sm); font-weight: 600; color: var(--navy); }
.vt__detail { display: block; margin-top: 0.1rem; font-size: var(--font-size-xs); font-weight: 400; color: var(--gray-500); }
.vt__due { padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--gray-100); color: var(--gray-500); font-size: 0.6875rem; font-weight: 700; white-space: nowrap; }
.vt__step--pay .vt__dot { background: var(--emerald-dark); color: var(--white); }
.vt__step--pay .vt__due { background: #D1FAE5; color: #065F46; }
.vt__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.35rem 1rem; margin-top: 0.9rem; padding-top: 0.85rem; border-top: 1px solid var(--border-color); font-size: var(--font-size-xs); color: var(--gray-500); }
.vt__foot strong { color: var(--navy); }
/* Visible by default; main.js arms the pause only when it can also release it on scroll. */
.pay-after__visual.is-armed:not(.is-visible) .vt,
.pay-after__visual.is-armed:not(.is-visible) .vt__step { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    .vt, .vt__step { opacity: 1; transform: none; animation: none; }
}
.pay-after__card {
    padding: var(--space-6);
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    text-align: left;
}
.pay-after__card .pricing-point__icon { margin: 0 0 var(--space-4); }
.pay-after__card .pricing-point__text { margin-bottom: 0; }
