/*
 * Small, non-visual UX hardening pass.
 * Keeps the existing design while making errors and controls understandable.
 */

.form-field-error {
  display: none;
  margin: 7px 2px 0;
  color: #fca5a5;
  font-size: .72rem;
  line-height: 1.45;
  font-weight: 550;
}

.form-field-error.visible {
  display: block;
}

.fg input[aria-invalid="true"],
.fg textarea[aria-invalid="true"],
.fg select[aria-invalid="true"] {
  border-color: #f87171 !important;
  background: rgba(239, 68, 68, .045) !important;
  box-shadow:
    0 0 0 3px rgba(248, 113, 113, .11),
    0 0 22px rgba(239, 68, 68, .055) !important;
}

.fg input[aria-invalid="true"]:focus,
.fg textarea[aria-invalid="true"]:focus,
.fg select[aria-invalid="true"]:focus {
  border-color: #fca5a5 !important;
  box-shadow:
    0 0 0 3px rgba(248, 113, 113, .16),
    0 0 24px rgba(239, 68, 68, .07) !important;
}

/* Status messages remain readable and receive keyboard focus only if needed. */
#msgOk:focus-visible,
#msgErr:focus-visible,
#ctMsg:focus-visible,
#ctErr:focus-visible {
  outline: 3px solid #3dffc2;
  outline-offset: 4px;
}

/* Footer and research links meet the WCAG 2.2 minimum target size. */
.flinks a,
footer a,
.sources a,
.source-list a,
.research-sources a {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}

/* Semantics are added in JS; appearance of the existing demo tabs is intact. */
.demoCard-tabs[role="tablist"] .demoTab:focus-visible {
  outline: 3px solid #3dffc2 !important;
  outline-offset: -1px !important;
  position: relative;
  z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
  .form-field-error,
  .fg input,
  .fg textarea,
  .fg select {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/*
 * Premium finish.
 * This layer deliberately changes presentation only. It does not alter page
 * structure, copy, forms, analytics, webhooks, or navigation destinations.
 */
:root {
  --versa-luxe-ease: cubic-bezier(.16, 1, .3, 1);
  --versa-luxe-soft: cubic-bezier(.22, 1, .36, 1);
}

/* Keep the desktop navigation composed instead of making labels jump. */
@media (hover: hover) and (pointer: fine) {
  .nr a,
  .nr a:hover,
  .nr a:focus-visible,
  .nr a:active {
    transform: none !important;
  }

  .nr a {
    transition:
      color .38s var(--versa-luxe-soft),
      opacity .38s var(--versa-luxe-soft),
      text-shadow .48s var(--versa-luxe-soft) !important;
  }

  .nr a:not(.cta):hover {
    color: #fff !important;
    text-shadow:
      0 0 16px rgba(255, 255, 255, .14),
      0 0 28px rgba(61, 255, 194, .05);
  }

  .nr .cta:hover {
    transform: none !important;
    box-shadow:
      0 10px 30px rgba(61, 255, 194, .2),
      0 0 0 1px rgba(255, 255, 255, .09) inset !important;
  }

  .nr .nav-pill {
    transform: translateY(-50%) !important;
    transition:
      left .58s var(--versa-luxe-ease),
      width .58s var(--versa-luxe-ease),
      height .58s var(--versa-luxe-ease),
      opacity .34s ease,
      background-color .45s ease,
      box-shadow .45s ease !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .078), rgba(255, 255, 255, .038)) !important;
    border: 1px solid rgba(255, 255, 255, .035);
    box-shadow:
      0 8px 24px rgba(0, 0, 0, .2),
      0 1px 0 rgba(255, 255, 255, .04) inset;
    will-change: left, width;
  }
}

/* Homepage system map: soft cursor light and a controlled edge bloom. */
.fn {
  --node-accent: 61, 255, 194;
  isolation: isolate;
  overflow: hidden;
  transition:
    border-color .65s var(--versa-luxe-soft),
    background-color .65s var(--versa-luxe-soft),
    box-shadow .7s var(--versa-luxe-ease),
    filter .65s var(--versa-luxe-soft) !important;
}

.fn2 { --node-accent: 77, 138, 255; }
.fn3 { --node-accent: 155, 109, 255; }
.fn5 { --node-accent: 255, 178, 55; }

.fn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(
      118deg,
      rgba(var(--node-accent), .105),
      rgba(var(--node-accent), .025) 42%,
      transparent 72%
    );
  transition: opacity .7s var(--versa-luxe-soft);
}

.fn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 13%;
  right: 13%;
  height: 1px;
  z-index: 2;
  pointer-events: none;
  opacity: .18;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--node-accent), .9),
    transparent
  );
  transform: scaleX(.35);
  transition:
    opacity .65s var(--versa-luxe-soft),
    transform .75s var(--versa-luxe-ease);
}

.fn > :not(.premium-card-light) {
  position: relative;
  z-index: 2;
}

.fn .premium-card-light {
  z-index: 1 !important;
  background:
    radial-gradient(
      230px circle at var(--premium-x, 50%) var(--premium-y, 50%),
      rgba(var(--node-accent), .17),
      rgba(var(--node-accent), .045) 42%,
      transparent 72%
    ) !important;
  transition: opacity .68s var(--versa-luxe-soft) !important;
}

.fn .fi {
  transition:
    border-color .6s var(--versa-luxe-soft),
    background-color .6s var(--versa-luxe-soft),
    box-shadow .7s var(--versa-luxe-ease),
    filter .6s var(--versa-luxe-soft) !important;
}

.fn .ft,
.fn .fs2 {
  transition:
    color .48s var(--versa-luxe-soft),
    opacity .48s var(--versa-luxe-soft) !important;
}

@media (hover: hover) and (pointer: fine) {
  .fn:hover {
    border-color: rgba(var(--node-accent), .66) !important;
    background-color: rgba(var(--node-accent), .028) !important;
    box-shadow:
      0 22px 62px rgba(0, 0, 0, .42),
      0 0 0 1px rgba(var(--node-accent), .11) inset,
      0 0 38px rgba(var(--node-accent), .13) !important;
    filter: brightness(1.055) saturate(1.06);
  }

  .fn:hover::before {
    opacity: 1;
  }

  .fn:hover::after {
    opacity: .9;
    transform: scaleX(1);
  }

  .fn:hover .fi {
    border-color: rgba(var(--node-accent), .5) !important;
    background-color: rgba(var(--node-accent), .13) !important;
    box-shadow:
      0 0 0 1px rgba(var(--node-accent), .08) inset,
      0 0 24px rgba(var(--node-accent), .16);
  }

  .fn:hover .ft {
    color: #fff;
  }

  .fn:hover .fs2 {
    color: #aeb3c4;
  }
}

/* Pricing: preserve the information hierarchy while adding depth and finish. */
.pr-wrap {
  overflow: clip;
}

.pr-wrap::before,
.pr-wrap::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
}

.pr-wrap::before {
  width: min(72vw, 980px);
  height: min(72vw, 980px);
  top: -410px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(61, 255, 194, .075),
    rgba(77, 138, 255, .025) 38%,
    transparent 70%
  );
}

.pr-wrap::after {
  width: 620px;
  height: 620px;
  top: 410px;
  right: -330px;
  background: radial-gradient(circle, rgba(155, 109, 255, .045), transparent 69%);
}

.pr-wrap > .pr-in > .sh {
  text-wrap: balance;
  text-shadow: 0 18px 54px rgba(0, 0, 0, .45);
}

.pr-wrap > .pr-in > .sd {
  position: relative;
}

.pr-wrap > .pr-in > .sd::after {
  content: "";
  display: block;
  width: 118px;
  height: 1px;
  margin: 26px auto -8px;
  background: linear-gradient(90deg, transparent, rgba(61, 255, 194, .55), transparent);
  box-shadow: 0 0 16px rgba(61, 255, 194, .2);
}

.founding-offer {
  max-width: 780px !important;
  margin-top: 42px !important;
  margin-bottom: 54px !important;
  padding: 34px 36px 32px !important;
  border-radius: 24px !important;
  border-color: rgba(78, 225, 192, .34) !important;
  background:
    radial-gradient(circle at 88% 4%, rgba(77, 138, 255, .09), transparent 34%),
    linear-gradient(145deg, rgba(78, 225, 192, .105), rgba(13, 19, 20, .9) 44%, rgba(8, 8, 12, .97)) !important;
  box-shadow:
    0 34px 100px rgba(0, 0, 0, .38),
    0 0 0 1px rgba(255, 255, 255, .025) inset,
    0 0 52px rgba(61, 255, 194, .055);
  isolation: isolate;
}

.founding-offer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .055), transparent 21%),
    repeating-linear-gradient(
      135deg,
      transparent 0 24px,
      rgba(255, 255, 255, .008) 24px 25px
    );
}

.founding-offer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #4ee1c0, #4d8aff, transparent);
  box-shadow: 0 0 22px rgba(61, 255, 194, .34);
}

.founding-offer > :not(.premium-card-light) {
  position: relative;
  z-index: 2;
}

.founding-offer > div:first-child {
  padding: 6px 12px !important;
  margin-bottom: 15px !important;
  letter-spacing: 1.15px !important;
  background: linear-gradient(135deg, rgba(78, 225, 192, .17), rgba(77, 138, 255, .08)) !important;
  box-shadow: 0 8px 28px rgba(61, 255, 194, .08);
}

.founding-offer > h2 {
  font-size: clamp(1.25rem, 2vw, 1.48rem) !important;
  color: #ecfff9 !important;
  letter-spacing: -.5px !important;
  text-shadow: 0 0 28px rgba(61, 255, 194, .12);
}

.founding-offer > div:last-of-type > div {
  min-height: 46px;
  border-color: rgba(78, 225, 192, .23) !important;
  border-radius: 12px !important;
  background:
    linear-gradient(180deg, rgba(78, 225, 192, .075), rgba(78, 225, 192, .025)) !important;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, .15),
    0 1px 0 rgba(255, 255, 255, .025) inset;
  transition:
    border-color .5s var(--versa-luxe-soft),
    background-color .5s var(--versa-luxe-soft),
    box-shadow .55s var(--versa-luxe-ease) !important;
}

.pr-grid {
  gap: 22px !important;
  perspective: 1400px;
}

.pr-card {
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 84% 2%, rgba(77, 138, 255, .035), transparent 32%),
    linear-gradient(180deg, rgba(14, 14, 22, .98), rgba(7, 7, 11, .99)) !important;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, .25),
    0 1px 0 rgba(255, 255, 255, .025) inset;
  transition:
    transform .65s var(--versa-luxe-ease),
    border-color .58s var(--versa-luxe-soft),
    box-shadow .7s var(--versa-luxe-ease),
    filter .58s var(--versa-luxe-soft) !important;
}

.pr-card.feat {
  background:
    radial-gradient(circle at 80% 0%, rgba(77, 138, 255, .09), transparent 35%),
    linear-gradient(180deg, rgba(61, 255, 194, .075), rgba(11, 15, 17, .98) 34%, #07070b 100%) !important;
  box-shadow:
    0 30px 90px -14px rgba(61, 255, 194, .16),
    0 0 0 1px rgba(61, 255, 194, .075) inset !important;
}

.pr-card .pr-div {
  background: linear-gradient(90deg, transparent, var(--brd2), transparent);
}

.pr-card .pr-amt {
  background: linear-gradient(135deg, #fff 10%, #d8def0 62%, #8f97ad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.pr-card.feat .pr-amt {
  background: linear-gradient(135deg, #fff, #73ffd3 58%, #4d8aff);
  -webkit-background-clip: text;
  background-clip: text;
}

.pr-tag,
.pr-pop,
.coming-soon-pop {
  backdrop-filter: blur(12px);
}

.pr-card > .pr-pop,
.pr-card > .coming-soon-pop {
  position: absolute !important;
  left: auto !important;
  width: max-content;
  max-width: calc(100% - 36px);
  white-space: nowrap;
  z-index: 5;
}

.pr-card > .pr-pop {
  top: 18px !important;
  right: 18px !important;
}

.pr-card > .coming-soon-pop {
  top: 20px !important;
  right: 20px !important;
}

.pr-guar:not(.pr-guar-plain),
.cta-strip-box,
.faq-item,
.comp-table {
  box-shadow:
    0 20px 64px rgba(0, 0, 0, .22),
    0 1px 0 rgba(255, 255, 255, .02) inset;
}

.implementation-overview,
.integration-overview,
.pr-guar.pr-guar-plain {
  position: relative;
}

.implementation-overview::before,
.integration-overview::before,
.pr-guar.pr-guar-plain::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(180px, 28%);
  height: 1px;
  background: linear-gradient(90deg, rgba(61, 255, 194, .65), transparent);
  box-shadow: 0 0 14px rgba(61, 255, 194, .15);
}

@media (hover: hover) and (pointer: fine) {
  .founding-offer:hover {
    border-color: rgba(78, 225, 192, .48) !important;
    box-shadow:
      0 40px 118px rgba(0, 0, 0, .42),
      0 0 0 1px rgba(255, 255, 255, .035) inset,
      0 0 66px rgba(61, 255, 194, .085);
  }

  .founding-offer > div:last-of-type > div:hover {
    border-color: rgba(78, 225, 192, .48) !important;
    box-shadow:
      0 14px 34px rgba(0, 0, 0, .22),
      0 0 24px rgba(61, 255, 194, .07);
  }

  .pr-card:hover {
    transform: translate3d(0, -3px, 0) scale(1.004) !important;
    border-color: rgba(255, 255, 255, .14) !important;
    filter: brightness(1.025);
    box-shadow:
      0 34px 92px rgba(0, 0, 0, .4),
      0 0 0 1px rgba(255, 255, 255, .025) inset !important;
  }

  .pr-card.feat:hover {
    transform: translate3d(0, -10px, 0) scale(1.006) !important;
    border-color: rgba(61, 255, 194, .54) !important;
    box-shadow:
      0 38px 104px -12px rgba(61, 255, 194, .21),
      0 0 0 1px rgba(61, 255, 194, .09) inset !important;
  }
}

@media (max-width: 640px) {
  .founding-offer {
    padding: 27px 22px 24px !important;
    border-radius: 20px !important;
    margin-top: 34px !important;
    margin-bottom: 42px !important;
  }

  .founding-offer > div:last-of-type {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .founding-offer > div:last-of-type > div {
    width: 100%;
  }

  .pr-grid {
    perspective: none;
  }

  .pr-card > .pr-pop,
  .pr-card > .coming-soon-pop {
    top: 14px !important;
    right: 14px !important;
    max-width: calc(100% - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nr .nav-pill,
  .fn,
  .fn::before,
  .fn::after,
  .fn .fi,
  .founding-offer,
  .founding-offer > div:last-child > div,
  .pr-card {
    transition: none !important;
  }
}

/* Homepage hero signature: keep the "Same Ad Budget." shimmer visible.
   This is intentionally last so earlier polish rules cannot cancel it. */
@keyframes versaBudgetShimmer {
  0% {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 0 rgba(61, 255, 194, 0));
  }
  50% {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 12px rgba(61, 255, 194, .16));
  }
  100% {
    background-position: 200% 50%;
    filter: drop-shadow(0 0 0 rgba(61, 255, 194, 0));
  }
}

body .hero .hl h1 em {
  background-image: linear-gradient(
    100deg,
    #3dffc2 0%,
    #88ffe3 20%,
    #4d8aff 46%,
    #c49cff 68%,
    #3dffc2 100%
  ) !important;
  background-size: 260% 100% !important;
  background-position: 0% 50%;
  color: transparent !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: versaBudgetShimmer 3.8s ease-in-out infinite !important;
  will-change: background-position, filter;
}

@media (prefers-reduced-motion: reduce) {
  body .hero .hl h1 em {
    animation: none !important;
    background-position: 50% 50% !important;
    filter: none !important;
  }
}
