/* Inquiry modal — opens when the user clicks any [data-kf-open] CTA
   (the "Submit a request" buttons in .section_banner-bottom).
   All classes are .kf- prefixed so nothing collides with Webflow. */

/* ============ CTA button — "Submit a request" ============
   Selector targets the Webflow CTA only when it's wearing data-kf-open, so
   no other usage of .banner-bottom-button-3 is affected. Specificity 0,2,0
   beats the base Webflow rules (0,1,0), no !important needed.

   Fixes vs. base Webflow styling:
     - flex-direction: column → row  (text was wrapping awkwardly in a tall pill)
     - mobile fixed width 8.125rem → auto  (was clipping "Submit a request")
     - flat color → subtle vertical gradient + shadow for depth
     - added hover lift + chevron nudge so it feels tappable
     - white-space: nowrap on the label so it always sits on one line */

.banner-bottom-button-3[data-kf-open] {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: auto;
  gap: 0.5rem;
  padding: 1rem 1.875rem;
  background-color: #7cb436;
  background-image: linear-gradient(180deg, #88c33d 0%, #6fa42d 100%);
  box-shadow:
    0 6px 18px rgba(124, 180, 54, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
  cursor: pointer;
  transition:
    transform 220ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.4, 0, 0.2, 1),
    background-image 220ms ease;
  will-change: transform;
}

.banner-bottom-button-3[data-kf-open]:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 24px rgba(124, 180, 54, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
  background-image: linear-gradient(180deg, #91cc44 0%, #76ab32 100%);
}

.banner-bottom-button-3[data-kf-open]:active {
  transform: translateY(0);
  transition-duration: 80ms;
  box-shadow:
    0 3px 8px rgba(124, 180, 54, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

.banner-bottom-button-3[data-kf-open]:focus-visible {
  outline: 3px solid rgba(124, 180, 54, 0.45);
  outline-offset: 3px;
}

.banner-bottom-button-3[data-kf-open] .container-3 {
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.banner-bottom-button-3[data-kf-open] .text-3 {
  white-space: nowrap;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.banner-bottom-button-3[data-kf-open] .vectors-wrapper-3 {
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-bottom-button-3[data-kf-open]:hover .vectors-wrapper-3 {
  transform: translateX(4px);
}

/* Tablet — keep proportions reasonable */
@media (max-width: 991px) {
  .banner-bottom-button-3[data-kf-open] {
    padding: 0.9375rem 1.625rem;
  }
  .banner-bottom-button-3[data-kf-open] .text-3 {
    font-size: 1rem;
  }
}

/* Mobile — pop! Slightly bigger so it's the obvious next action. */
@media (max-width: 767px) {
  .banner-bottom-button-3[data-kf-open] {
    width: auto;             /* override Webflow's fixed 8.125rem */
    padding: 0.9375rem 1.75rem;
  }
  .banner-bottom-button-3[data-kf-open] .text-3 {
    font-size: 0.9375rem;
    white-space: nowrap;
  }
}

/* ============ Modal shell ============ */
.kf-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: inherit;
}

.kf-modal[hidden] {
  display: none;
}

.kf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  animation: kf-fade-in 200ms ease;
}

.kf-modal__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 3rem);
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  overflow-y: auto;
  box-sizing: border-box;
  animation: kf-slide-up 240ms ease;
  -webkit-overflow-scrolling: touch;
}

.kf-modal__close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: #666;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.kf-modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
}

.kf-modal__title {
  /* Override the global `h2 { font-family: Paybooc Otf }` rule (line 151 of
     kormat.webflow.css). Paybooc Otf isn't actually loaded as a webfont, so
     <h2> falls back to the browser's default serif (Times) — visible as the
     awkward serif heading in the modal. Match the body's Noto Sans SC stack. */
  font-family: var(--noto-sc, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Helvetica Neue", Arial, sans-serif);
  margin: 0 0 0.375rem;
  padding-right: 2rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1a1a1a;
}

.kf-modal__subtitle {
  font-family: var(--noto-sc, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Helvetica Neue", Arial, sans-serif);
  margin: 0 0 1.5rem;
  padding-right: 2rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6c757d;
}

@keyframes kf-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes kf-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* lock background scroll while modal is open */
body.kf-modal-open {
  overflow: hidden;
}

/* ============ Form fields (inside modal) ============ */
.kf-form {
  display: block;
  font-family: inherit;
  color: #1a1a1a;
}

.kf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.875rem;
}

.kf-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  text-align: left;
}

.kf-field-full {
  grid-column: 1 / -1;
}

.kf-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #2a2a2a;
}

.kf-req {
  color: #cc4444;
  margin-left: 2px;
}

.kf-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  font-family: inherit;
  line-height: 1.4;
  color: #1a1a1a;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 0.5rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.kf-input:focus {
  border-color: #7cb436;
  box-shadow: 0 0 0 3px rgba(124, 180, 54, 0.18);
}

.kf-input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.kf-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.625rem auto;
  padding-right: 2rem;
}

.kf-textarea {
  resize: vertical;
  min-height: 6rem;
  font-family: inherit;
}

.kf-submit {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: -0.01em;
  color: #ffffff;
  background-color: #7cb436;
  border: none;
  border-radius: 5.625rem;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.kf-submit:hover {
  background-color: #6a9b2d;
}

.kf-submit:active {
  transform: translateY(1px);
}

.kf-submit:disabled {
  background-color: #b5cc92;
  cursor: not-allowed;
}

.kf-status {
  margin-top: 0.75rem;
  min-height: 1.2em;
  font-size: 0.875rem;
  line-height: 1.4;
}

.kf-status.kf-success { color: #2d7d2d; }
.kf-status.kf-error   { color: #cc4444; }

.kf-noscript {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #cc4444;
  background: #fff3f3;
  border-radius: 0.5rem;
}

/* ============ Mobile — bottom sheet style ============ */
@media (max-width: 640px) {
  .kf-modal {
    padding: 0;
    align-items: flex-end;
  }
  .kf-modal__panel {
    border-radius: 1rem 1rem 0 0;
    max-height: 92vh;
    padding: 1.5rem 1.25rem;
  }
  .kf-grid {
    grid-template-columns: 1fr;
  }
  .kf-submit {
    width: 100%;
  }
}

/* ============ Views inside the modal (form / success) ============ */
.kf-view {
  transition: opacity 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.kf-view[hidden] {
  display: none;
}

/* fade-out tween used when swapping the form view out before showing success */
.kf-view--leaving {
  opacity: 0;
  pointer-events: none;
}

/* ============ Success view ============ */
.kf-view--success {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

.kf-success__check {
  display: block;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
}

.kf-success__circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  transform-origin: center;
  transform: rotate(-90deg);
  animation: kf-draw-circle 520ms cubic-bezier(0.4, 0, 0.2, 1) 80ms forwards;
}

.kf-success__path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: kf-draw-check 360ms cubic-bezier(0.4, 0, 0.2, 1) 480ms forwards;
}

@keyframes kf-draw-circle {
  to { stroke-dashoffset: 0; }
}

@keyframes kf-draw-check {
  to { stroke-dashoffset: 0; }
}

.kf-success__title {
  font-family: var(--noto-sc, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Helvetica Neue", Arial, sans-serif);
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  opacity: 0;
  animation: kf-fade-up 420ms cubic-bezier(0.4, 0, 0.2, 1) 620ms forwards;
}

.kf-success__subtitle {
  font-family: var(--noto-sc, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Helvetica Neue", Arial, sans-serif);
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #6c757d;
  opacity: 0;
  animation: kf-fade-up 420ms cubic-bezier(0.4, 0, 0.2, 1) 760ms forwards;
}

@keyframes kf-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ Modal exit animation ============ */
.kf-modal--leaving .kf-modal__backdrop {
  animation: kf-fade-out 320ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.kf-modal--leaving .kf-modal__panel {
  animation: kf-slide-down 320ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes kf-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes kf-slide-down {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(32px); }
}

/* ============ Floating Contact CTA — fixed top-right ============
   Lives outside the original Webflow layout (appended to <body>) so it
   never disrupts the nav or page composition. Top-right placement keeps
   the bottom-right corner free for a future chatbot widget. Hidden while
   the modal is open to avoid duplicate CTAs.

   Hover lift is positive translateY here too — moves DOWN slightly toward
   the page (looks like the button is reaching toward you). */
.kf-fab {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9000; /* below modal (9999), above page content */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: var(--noto-sc, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Helvetica Neue", Arial, sans-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  background-color: #7cb436;
  background-image: linear-gradient(180deg, #88c33d 0%, #6fa42d 100%);
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 10px 24px rgba(124, 180, 54, 0.32),
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
  cursor: pointer;
  transition:
    transform 220ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.4, 0, 0.2, 1),
    background-image 220ms ease,
    opacity 200ms ease;
  /* drop-down entrance after page settles */
  animation: kf-fab-enter 520ms cubic-bezier(0.34, 1.4, 0.64, 1) 600ms backwards;
}

@keyframes kf-fab-enter {
  from { transform: translateY(-24px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.kf-fab:hover {
  transform: translateY(3px);
  box-shadow:
    0 16px 32px rgba(124, 180, 54, 0.42),
    0 4px 10px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
  background-image: linear-gradient(180deg, #91cc44 0%, #76ab32 100%);
}

.kf-fab:active {
  transform: translateY(1px);
  transition-duration: 80ms;
}

.kf-fab:focus-visible {
  outline: 3px solid rgba(124, 180, 54, 0.45);
  outline-offset: 3px;
}

/* Hide while modal is open — modal already has its own CTAs (submit/close).
   Slight upward motion mirrors the entrance direction. */
body.kf-modal-open .kf-fab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

/* Mobile/tablet (≤991px) — the horizontal nav is clean / minimal, so a heavy
   floating pill looks out of place. Switch to a ghost-button style: brand
   green outline + green text, transparent fill, no shadow. Still clearly a
   button, but it sits flush with the nav aesthetic. */
@media (max-width: 991px) {
  .kf-fab {
    top: 0.625rem;
    right: 0.875rem;
    padding: 0.4375rem 0.9375rem;
    font-size: 0.8125rem;
    color: #7cb436;
    background-color: transparent;
    background-image: none;
    border: 1.5px solid #7cb436;
    box-shadow: none;
  }
  .kf-fab:hover {
    transform: none;
    color: #6a9b2d;
    background-color: rgba(124, 180, 54, 0.08);
    background-image: none;
    border-color: #6a9b2d;
    box-shadow: none;
  }
  .kf-fab:active {
    transform: none;
    background-color: rgba(124, 180, 54, 0.16);
  }
  /* Modal-open hide stays the same (opacity fade + slight up motion) */
}

/* Very narrow phones — tighter spacing so it doesn't reach into nav links */
@media (max-width: 480px) {
  .kf-fab {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Honor reduced motion — skip the bouncy entrance */
@media (prefers-reduced-motion: reduce) {
  .kf-fab {
    animation: none;
  }
}
