/* ==========================================================================
   Footer v2 (Phase 2 Rebrand)
   Figma: file cwxEZbhw0xAPkTtvQloQA6 — background 6025:8902, CTA band 6025:9128,
   body 6025:8908. Enqueued only on pages opted in via stampli_footer_v2_enabled().
   Single dark design (no variants). Aeonik @font-face ships with header-v2.css;
   duplicated here because the two opt-ins are independent (browser dedupes by URL).
   ========================================================================== */

@font-face {
  font-family: 'Aeonik';
  src: url('../fonts/aeonik-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aeonik';
  src: url('../fonts/aeonik-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Surface: vertical gradient #1c325b -> #3871da over CTA band + footer body
   -------------------------------------------------------------------------- */
footer.footer.footer-v2 {
  background-image: linear-gradient(180deg, #1c325b 0%, #3871da 100%) !important;
  padding: 0 !important;
  font-family: 'Aeonik', 'Lato', sans-serif;
  /* clips the side rails / guide-line overhangs on narrow viewports */
  overflow: hidden;
  /* horizontal guide-line overhang: exactly content-edge -> rail (32px at
     >=1440 where content sits at 104 and rails at 72; 24px below that) */
  --fv2-overhang: calc(max(96px, 50vw - 616px) - max(72px, 50vw - 648px));
}
footer.footer-v2 > .container {
  /* fluid gutter tracking the rails: 104px at 1440 (Figma), never under 96px
     so the content always stays 24px inside the rails (rails floor is 72px) */
  max-width: 100% !important;
  padding: 0 max(96px, calc(50% - 616px)) !important;
}
/* triple-class selectors: the Customizer "Additional CSS" (printed last) has
   a tablet rule `footer.footer .container { padding ... 24px !important }` */
@media (max-width: 1024px) {
  footer.footer.footer-v2 > .container {
    /* Figma 768 frame: content at 32px margins (rails at 16) */
    padding: 0 32px !important;
  }
}
@media (max-width: 767px) {
  footer.footer.footer-v2 > .container {
    /* Figma 375 frame: content at 16px margins */
    padding: 0 16px !important;
  }
}
/* Vertical side rails (Figma 6025:9129 / 6025:9130): 1px baby-blue lines on the
   page grid (calc(50% - 648px), same anchor as the body rails), spanning the
   whole footer surface. Clamped so they never leave the viewport; hidden on
   tablet/mobile (official breakpoints: <=1024). */
footer.footer.footer-v2::before,
footer.footer.footer-v2::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(192, 220, 251, 0.3);
  pointer-events: none;
  z-index: 1;
}
footer.footer.footer-v2::before {
  left: max(72px, calc(50% - 648px));
}
footer.footer.footer-v2::after {
  right: max(72px, calc(50% - 648px));
}
@media (max-width: 1024px) {
  footer.footer.footer-v2::before {
    left: 16px;
  }
  footer.footer.footer-v2::after {
    right: 16px;
  }
}
@media (max-width: 767px) {
  footer.footer.footer-v2::before,
  footer.footer.footer-v2::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   CTA band (headline + email + Get a demo)
   -------------------------------------------------------------------------- */
.footer-v2__cta {
  position: relative;
  padding: 120px 0 108px;
}
/* Decorative spine tick (Figma Vector 5215, in-footer portion): continues the
   vertical drop drawn by .p2-section:has(.p2-erp)::after in the section above
   (same centerline at 50% - 495px, same 2px #C0DCFB line), ending in a dot. */
.footer-v2__cta::before {
  content: '';
  position: absolute;
  top: 0;
  /* clamped so the line never crosses the left rail on narrow desktops:
     pins at the content edge (96px viewport-x) below ~1182px, in sync with
     the .p2-section:has(.p2-erp)::after clamp in phase2.css */
  left: max(-4.5px, calc(50% - 499.5px));
  width: 9px;
  height: 82px;
  background:
    linear-gradient(#c0dcfb, #c0dcfb) 50% 0 / 2px calc(100% - 9px) no-repeat,
    radial-gradient(circle, #c0dcfb 4px, rgba(192, 220, 251, 0) 5px) 50% 100% / 9px 9px no-repeat;
  pointer-events: none;
  z-index: 0;
}
.footer-v2__cta-title,
.footer-v2__cta-form {
  position: relative;
  z-index: 1;
}
@media (max-width: 767px) {
  /* mobile Vector 5215: continues the small in-section connector */
  .footer-v2__cta::before {
    left: calc(50% - 100px);
    height: 45px;
  }
}
.footer-v2__cta-title {
  margin: 0 0 48px;
  max-width: 922px;
  color: #fff;
  font-family: 'Aeonik', 'Lato', sans-serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 42px;
  letter-spacing: -0.5px;
}
.footer-v2__cta-accent {
  color: #66a5f1;
}
.footer-v2__cta-form {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  padding: 16px 16px 16px 24px;
  border-radius: 8px;
  background: #fff;
}
/* the input's native outline is removed — the card carries the focus ring */
.footer-v2__cta-form:focus-within {
  box-shadow: 0 0 0 2px #0088f7;
}
.footer-v2__cta-input {
  width: 331px;
  flex: 0 0 331px;
  height: 28px;
  /* the theme's global input[type=email] rule adds 12px 8px padding + line-height */
  padding: 0 !important;
  border: none !important;
  outline: none;
  box-shadow: none !important;
  background: transparent !important;
  font-family: 'Aeonik', 'Lato', sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 28px !important;
  color: #1e3c74;
}
/* epic.min.css ships `input[type=email]::placeholder { #a7b9cf !important }` (0,1,2) —
   the extra class + element here out-specifies it */
.footer-v2__cta-form input.footer-v2__cta-input::placeholder {
  color: #7c9ec5 !important;
  opacity: 1 !important;
  font-family: 'Aeonik', 'Lato', sans-serif !important;
  font-weight: 500 !important;
}
.footer-v2__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 6px;
  background: #0088f7;
  color: #fff !important;
  font-family: 'Aeonik', 'Lato', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.footer-v2__cta-btn:hover {
  background: #006fd6;
}

/* --------------------------------------------------------------------------
   Footer body
   -------------------------------------------------------------------------- */
.footer-v2__body {
  position: relative;
  padding: 96px 0;
}
/* 1px top edge line (Figma node 6025:9133): spans 32px past the content on each
   side, meeting the vertical rails; solid rgba instead of mix-blend-mode
   (overlay renders inconsistently). */
.footer-v2__body::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(-1 * var(--fv2-overhang, 32px));
  right: calc(-1 * var(--fv2-overhang, 32px));
  height: 1px;
  background: rgba(192, 220, 251, 0.3);
}
.footer-v2__logo {
  display: block;
  width: 107px;
  height: 21px;
  margin-bottom: 48px;
}

/* Columns: 6 x ~181px, gap 32. Overrides the theme's .footer__widgets widths. */
.footer-v2 .footer__widgets.footer-v2__columns {
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
  padding: 0 !important;
}
.footer-v2 .footer-v2__columns .sidebar-footer {
  width: 181px !important;
  flex: 1 1 150px;
  margin: 0 !important;
}
.footer-v2 .footer-v2__columns .sidebar-footer h3 {
  margin: 0 0 24px !important;
  color: #fff;
  font-family: 'Aeonik', 'Lato', sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 24px !important;
}
.footer-v2 .footer-v2__columns .sidebar-footer div ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-v2 .footer-v2__columns .sidebar-footer div ul li {
  margin-bottom: 12px !important;
  font-size: 14px !important;
  line-height: 20px;
}
.footer-v2 .footer-v2__columns .sidebar-footer div ul li a,
.footer-v2 .footer-v2__columns .footer__details,
.footer-v2 .footer-v2__columns .footer__details a {
  color: #fff !important;
  font-family: 'Aeonik', 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-decoration: none;
}
.footer-v2 .footer-v2__columns .sidebar-footer div ul li a:hover,
.footer-v2 .footer-v2__columns .footer__details a:hover {
  text-decoration: underline;
}
.footer-v2 .footer-v2__columns .footer__email {
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   Badges row
   -------------------------------------------------------------------------- */
.footer-v2__badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 114px;
}
.footer-v2__badges-certs {
  display: flex;
  align-items: center;
  gap: 42px;
  flex-wrap: wrap;
}
.footer-v2__badges-stores {
  display: flex;
  align-items: center;
  gap: 15px;
}
.footer-v2__badge {
  display: inline-flex;
  transition: opacity 0.2s ease;
}
.footer-v2__badge:hover {
  opacity: 0.8;
}
.footer-v2__badge--aicpa img { width: 65px; height: 65px; }
.footer-v2__badge--nacha { width: 83px; height: 23px; }
.footer-v2__badge--gdpr img { width: 58px; height: 65px; }
.footer-v2__badge--capterra img { width: 109px; height: 34px; }
.footer-v2__badge--g2 img { width: 123px; height: 34px; }
.footer-v2__badge--appstore img { width: 117px; height: 35px; }
.footer-v2__badge--googleplay img { width: 118px; height: 35px; }

/* --------------------------------------------------------------------------
   Divider + bottom bar
   -------------------------------------------------------------------------- */
.footer-v2__divider {
  border: none;
  height: 1px;
  width: calc(100% + 2 * var(--fv2-overhang, 32px));
  margin: 48px calc(-1 * var(--fv2-overhang, 32px));
  background: rgba(192, 220, 251, 0.3);
}
.footer-v2__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-v2__bottom-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-v2__copyright {
  color: #fff;
  font-family: 'Aeonik', 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.footer-v2__ccpa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  font-family: 'Aeonik', 'Lato', sans-serif;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}
.footer-v2__ccpa img {
  width: 30px;
  height: 14px;
}
.footer-v2__bottom-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}
/* Social icons: exact Figma assets (node 6025:9111), 30px, gap 25px */
.footer-v2__social {
  display: flex;
  align-items: center;
  gap: 25px;
}
.footer-v2__social-btn {
  display: inline-flex;
  transition: opacity 0.2s ease;
}
.footer-v2__social-btn:hover {
  opacity: 0.8;
}
.footer-v2__social-btn img {
  width: 30px;
  height: 30px;
}
/* fallback (shared component) for platforms without a v2 asset */
.footer-v2__social .social-icon-tablet {
  display: none !important;
}
.footer-v2__legal {
  display: flex;
  align-items: center;
  color: #fff;
  font-family: 'Aeonik', 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.footer-v2__legal a {
  color: #fff !important;
  text-decoration: none;
}
.footer-v2__legal a:hover {
  text-decoration: underline;
}
.footer-v2__legal-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.footer-v2__legal-sep {
  width: 1px;
  height: 14px;
  margin: 0 15px;
  background: #fff;
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Tablet <=1024 (Figma 6025-9139): content at 32px margins, guide lines meet
   the 16px rails (overhang 16); CTA title 32/33; columns in a 3-up grid;
   store badges centered at 42px.
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-v2__cta {
    padding: 96px 0 64px;
  }
  /* scoped to tablet only: the mobile tick rule lives earlier in the file
     and would otherwise lose to this one at <768px */
  @media (min-width: 768px) {
    .footer-v2__cta::before {
      /* tablet Vector 5215: same drop as the in-section connector piece */
      left: calc(50% - 295.5px);
      height: 70px;
    }
  }
  .footer-v2__cta-title {
    font-size: 32px;
    line-height: 33px;
  }
  .footer-v2__body::before {
    left: -16px;
    right: -16px;
    /* tablet/mobile frames draw Line 442 as #C0DCFB in overlay blend, which
       reads as a vivid royal blue over the gradient (blend itself renders
       inconsistently, so the resulting color is hardcoded) */
    background: #2e6be8;
  }
  .footer-v2__divider {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
  }
  .footer-v2 .footer__widgets.footer-v2__columns {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 24px;
  }
  .footer-v2 .footer-v2__columns .sidebar-footer {
    width: auto !important;
  }
  .footer-v2__badges {
    flex-direction: column;
    align-items: stretch;
    /* Figma 768: columns -> 96 -> certs -> 48 -> line -> 48 -> stores */
    gap: 48px;
    margin-top: 96px;
  }
  .footer-v2__badges-certs {
    justify-content: space-between;
    gap: 16px;
  }
  /* certs step up on tablet (Figma: aicpa 83x83, GDPR 74x83) */
  .footer-v2__badge--aicpa img {
    width: 83px;
    height: 83px;
  }
  .footer-v2__badge--gdpr img {
    width: 74px;
    height: 83px;
  }
  .footer-v2__badges-stores {
    position: relative;
    justify-content: center;
    gap: 24px;
    padding-top: 48px;
  }
  /* rail-to-rail separator between certs and stores (Figma Line 439):
     content sits at 32, rails at 16 -> 16px overhang each side. Tablet only:
     the mobile block draws its own border-top instead. */
  @media (min-width: 768px) {
    .footer-v2__badges-stores::before {
      content: '';
      position: absolute;
      top: 0;
      left: -16px;
      right: -16px;
      height: 1px;
      background: rgba(192, 220, 251, 0.3);
    }
  }
  /* explicit sizes: the badge SVGs carry width="100%" attributes, so the
     browser can't derive a width from height alone (defaults to 300px) */
  .footer-v2__badge--appstore img {
    width: 143px;
    height: 42px;
  }
  .footer-v2__badge--googleplay img {
    width: 144px;
    height: 42px;
  }
}

/* --------------------------------------------------------------------------
   Mobile <=768 (Figma 6045-14150): CTA = white input card + standalone
   full-width solid-blue button; accordion columns with chevrons; badges in
   separated rows; bottom block left-aligned with the copyright last.
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .footer-v2__cta {
    /* Figma 375 frame: 96 above the headline, 48 below the button */
    padding: 96px 0 48px;
  }
  .footer-v2__cta-title {
    margin-bottom: 32px;
    font-size: 24px;
    line-height: 28px;
    letter-spacing: -0.5px;
  }
  .footer-v2__cta-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    width: 100%;
  }
  .footer-v2__cta-input {
    width: 100% !important;
    flex: none;
    height: auto;
    padding: 16px 24px !important;
    background: #fff !important;
    border-radius: 8px;
    font-size: 16px !important;
    line-height: 24px !important;
  }
  .footer-v2__cta-btn {
    width: 100%;
    background: #0088f7;
    color: #fff !important;
  }
  .footer-v2__cta-btn:hover {
    background: #006fd6;
  }
  .footer-v2__body {
    /* 40 + the first row's own 8px padding = 48 to the row, 56 to the label,
       matching the Figma 375 rhythm */
    padding: 40px 0 32px;
  }
  /* Figma 375 frame: no logo in the footer body */
  .footer-v2__logo {
    display: none;
  }
  /* accordion rows: 56px pitch (8 + 40 + 8), hairline separators, chevron
     points right when closed / down when open (per the Figma render) */
  .footer-v2 .footer__widgets.footer-v2__columns {
    display: flex !important;
    flex-direction: column;
    gap: 0;
  }
  .footer-v2 .footer-v2__columns .sidebar-footer {
    width: 100% !important;
    /* the desktop flex-basis (150px) would become HEIGHT in column direction */
    flex: none;
    border: none !important;
    border-top: 1px solid rgba(192, 220, 251, 0.3) !important;
    padding: 8px 0;
  }
  /* direct children only: a nested widget (Role inside Industries) would
     otherwise match :last-child and draw a doubled line */
  .footer-v2 .footer-v2__columns > .sidebar-footer:last-child {
    border-bottom: 1px solid rgba(192, 220, 251, 0.3) !important;
  }
  /* the first row has no separator of its own (Line 442 sits above it) */
  .footer-v2 .footer-v2__columns > .sidebar-footer:first-child {
    border-top: none !important;
  }
  /* Figma 375: the bottom divider spans the content only, and the bottom-bar
     elements sit 16px further in (x=32 on the frame) */
  .footer-v2__divider {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .footer-v2__bottom {
    padding: 0 16px;
  }
  .footer-v2 .footer-v2__columns .sidebar-footer h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    margin: 0 !important;
    /* an old theme rule adds 16/24 vertical padding to these h3s */
    padding: 0 !important;
    cursor: pointer;
  }
  .footer-v2 .footer-v2__columns .sidebar-footer h3::after {
    content: '';
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    /* !important: an old theme caret rule rotates widget-title arrows */
    transform: rotate(-45deg) !important;
    transition: transform 0.2s ease;
  }
  .footer-v2 .footer-v2__columns .sidebar-footer.is-open h3::after {
    transform: rotate(45deg) !important;
    margin-top: -4px;
  }
  .footer-v2 .footer-v2__columns .sidebar-footer > div,
  .footer-v2 .footer-v2__columns .footer__details {
    display: none;
    padding: 8px 0 16px;
  }
  .footer-v2 .footer-v2__columns .sidebar-footer.is-open > div,
  .footer-v2 .footer-v2__columns .sidebar-footer.is-open .footer__details {
    display: block;
  }
  /* badges: certs wrap into rows; stores separated by a guide line.
     Figma 375 rhythm: certs -> 48 -> line -> 48 -> stores -> 48 -> divider */
  .footer-v2__badges {
    /* 48 + the last row's own 8px padding = 56 from the last label */
    margin-top: 48px;
    gap: 48px;
  }
  .footer-v2__badges-certs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
  }
  .footer-v2__badge--aicpa img {
    width: 60px;
    height: 60px;
  }
  .footer-v2__badge--gdpr img {
    width: 53px;
    height: 60px;
  }
  .footer-v2__badge--capterra img {
    width: 77px;
    height: 24px;
  }
  .footer-v2__badge--g2 img {
    width: 89px;
    height: 24px;
  }
  .footer-v2__badges-stores {
    width: 100%;
    padding-top: 48px;
    border-top: 1px solid rgba(192, 220, 251, 0.3);
  }
  /* bottom: social + legal first, copyright last, all left-aligned */
  .footer-v2__bottom {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 24px;
  }
  .footer-v2__bottom-right {
    align-items: flex-start;
  }
  .footer-v2__social > div {
    text-align: left;
  }
  .footer-v2__legal {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 8px;
  }
}
