/* Home page (/), on top of css/online-payments.css, css/crm.css (checklists, links) and css/prices.css (plan cards) */

/* `hidden` would break the sticky CTA on iOS and clip the hero glow */
.op-page.home-page { overflow-x: clip; }

/* Hero */
.home-hero { padding-bottom: 40px; }
.home-hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; }
.home-hero .op-hero-title { font-size: 56px; }
.home-hero .op-actions .op-btn { min-height: 54px; padding: 13px 30px; }
.home-hero .crm-hero-facts { margin-top: 28px !important; }
.home-hero-media {
  position: relative;
  padding: 40px 0 72px 8%;
}
.home-hero-media::before {
  content: '';
  position: absolute;
  inset: 4% -6% 0 4%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(114, 114, 236, 0.28), rgba(114, 114, 236, 0));
  pointer-events: none;
}
.home-hero-laptop {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(44, 44, 98, 0.16));
}
.home-hero-phone {
  position: absolute;
  z-index: 2;
  left: -2%;
  bottom: 0;
  display: block;
  width: 36%;
  height: auto;
  filter: drop-shadow(0 20px 32px rgba(44, 44, 98, 0.22));
}
.home-chips { z-index: 3; }
.home-chips .app-chip-1 { left: 18%; top: 0; }
.home-chips .app-chip-2 { right: -2%; top: 46%; }
.home-chips .app-chip-3 { right: 10%; bottom: 6%; }

/* Facts band */
.home-facts-section { padding: 16px 0 24px; }
.home-page .home-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--bgdark, #2c2c62);
  border-radius: 32px;
  padding: 32px 12px;
  color: #fff;
}
.home-fact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}
.home-fact:first-child { border-left: none; }
.home-fact-value {
  font-family: var(--h2-font-family, "Nunito", sans-serif);
  font-size: 40px;
  line-height: 1;
  font-weight: 700;
  color: var(--light-purple, #cfd5f6);
  white-space: nowrap;
}
.home-fact-label { font-size: 15px; line-height: 1.4; opacity: 0.9; }

/* Before / after */
.home-compare-head,
.home-compare-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.home-compare-head { max-width: 1040px; margin: 40px auto 0; }
.home-compare-label {
  justify-self: start;
  padding: 6px 14px;
  border-radius: 40px;
  font-family: var(--button-font-family, "Nunito", sans-serif);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.home-compare-label-before { background: rgba(255, 255, 255, 0.6); color: var(--dark-purple, #4a4a8d); }
.home-compare-label-after { grid-column: 3; background: var(--purple-accent, #7272ec); color: #fff; }
.home-compare {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1040px;
  margin: 14px auto 0 !important;
}
.home-page .home-compare-before,
.home-page .home-compare-after {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  box-sizing: border-box;
  padding: 18px 22px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.45;
}
.home-compare-before { background: rgba(255, 255, 255, 0.5); color: var(--dark-purple, #4a4a8d); }
.home-compare-after {
  background: #fff;
  color: var(--extra-dark-purple, #2c2c62);
  font-family: var(--h5-font-family, "Nunito", sans-serif);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(44, 44, 98, 0.06);
}
.home-compare-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 50%;
  stroke-width: 2.6;
}
.home-compare-before .home-compare-icon { background: rgba(255, 62, 62, 0.12); color: #d42f2f; }
.home-compare-after .home-compare-icon { background: var(--purple-accent, #7272ec); color: #fff; }
.home-compare-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  justify-self: center;
  border-radius: 50%;
  background: var(--light-purple, #cfd5f6);
  color: var(--purple-accent, #7272ec);
}
.home-compare-arrow-icon { width: 20px; height: 20px; stroke-width: 2.2; }

/* Platform bento */
.home-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.home-bento-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 24px;
  overflow: hidden;
  background: #fff;
  border-radius: 32px;
  padding: 36px;
}
.home-bento-crm {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
  padding: 44px;
  background: linear-gradient(135deg, #fff 0%, #fff 45%, var(--light-purple, #cfd5f6) 100%);
}
.home-bento-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 40px;
  background: var(--extra-light-purple, #ebe9fe);
  color: var(--purple-accent, #7272ec);
  font-family: var(--button-font-family, "Nunito", sans-serif);
  font-size: 13px;
  font-weight: 700;
}
.home-bento-tag-icon {
  width: 24px;
  height: 24px;
  padding: 4px;
  border-radius: 50%;
  background: var(--purple-accent, #7272ec);
  color: #fff;
}
.home-bento-title {
  margin-top: 16px !important;
  font-family: var(--h4-font-family, "Nunito", sans-serif);
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--extra-dark-purple, #2c2c62);
}
.home-bento-crm .home-bento-title { font-size: 36px; }
.home-bento-text .crm-checklist { margin-top: 20px !important; }
.home-bento-text .crm-checklist li { font-size: 15px; }
.home-bento-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 20px; }
.home-bento-logos img { display: block; width: auto; height: 20px; }
.home-bento-media { display: flex; justify-content: center; align-self: stretch; align-items: center; }
.home-bento-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 380px;
  filter: drop-shadow(0 20px 32px rgba(44, 44, 98, 0.16));
}
.home-bento-crm .home-bento-media img { width: 100%; max-height: none; }

/* How it works */
.home-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px !important;
}
.home-flow-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.home-flow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(50% + 52px);
  width: calc(100% - 104px + 24px);
  border-top: 2px dashed rgba(114, 114, 236, 0.45);
}
.home-flow-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 24px;
  background: var(--purple-accent, #7272ec);
  color: #fff;
  box-shadow: 0 12px 24px rgba(114, 114, 236, 0.3);
}
.home-flow-badge .op-icon { width: 30px; height: 30px; }
.home-flow-num {
  position: absolute;
  top: -8px;
  right: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: var(--purple-accent, #7272ec);
  font-family: var(--h5-font-family, "Nunito", sans-serif);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(44, 44, 98, 0.12);
}
.home-flow-step .op-card-text { max-width: 260px; }

/* Who it is for */
.home-audiences { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-audiences li { display: flex; }
.home-page .home-audience {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 2px solid transparent;
  text-decoration: none;
  transition: border-color var(--duration-ui, 200ms) ease, transform var(--duration-press, 160ms) var(--ease-out, ease);
}
.home-page .home-audience:hover { border-color: var(--purple-accent, #7272ec); }
.home-page .home-audience:active { transform: scale(0.98); }
.home-page .home-audience:focus-visible { outline: 2px solid var(--purple-accent, #7272ec); outline-offset: 3px; }
.home-audience .op-card-title { font-size: 19px; }
.home-audience .op-card-text { font-size: 15px; }
.home-audience-more {
  margin-top: auto;
  padding-top: 16px;
  color: var(--purple-accent, #7272ec);
  font-family: var(--h5-font-family, "Nunito", sans-serif);
  font-size: 15px;
  font-weight: 700;
}
.home-page .home-clients-note {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 24px auto 0 !important;
  padding: 14px 22px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  line-height: 1.45;
  color: var(--dark-purple, #4a4a8d);
}
.home-clients-icon { flex-shrink: 0; width: 22px; height: 22px; color: var(--purple-accent, #7272ec); }

/* Prices teaser */
.home-plans .pp-plan .op-icon-badge { margin-bottom: 16px; }
.home-plans .pp-plan:first-child {
  border-color: var(--purple-accent, #7272ec);
  box-shadow: 0 16px 40px rgba(114, 114, 236, 0.18);
}
.home-plans .op-stores { margin-top: auto; gap: 10px; }
.home-plans .op-store { flex: 1 1 auto; justify-content: center; }

/* Join */
.home-join .op-join-form { order: 0; }
.home-join-title {
  margin-top: 32px !important;
  font-family: var(--h5-font-family, "Nunito", sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--light-purple, #cfd5f6);
}
.home-join-steps { display: flex; flex-direction: column; gap: 20px; margin-top: 20px !important; }
.home-join-steps li { display: flex; align-items: flex-start; gap: 16px; }
.home-join-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple-accent, #7272ec);
  font-family: var(--h5-font-family, "Nunito", sans-serif);
  font-size: 18px;
  font-weight: 700;
}
.home-join-step { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.home-join-step-title { font-family: var(--h5-font-family, "Nunito", sans-serif); font-size: 18px; font-weight: 700; }
.home-join-step-text { font-size: 15px; line-height: 1.5; opacity: 0.85; }

/* Sticky mobile CTA (shown by js/home.js) */
.home-sticky-cta { display: none; }

/* Responsive */
@media screen and (max-width: 1165px) {
  .home-hero .op-hero-title { font-size: 46px; }
  .home-page .home-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .home-fact:nth-child(4) { border-left: none; }
  .home-audiences { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-bento-card { grid-template-columns: 1fr; }
  .home-bento-crm { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .home-bento-phone .home-bento-media img { max-height: 340px; }
}
@media screen and (max-width: 960px) {
  .home-hero-inner { grid-template-columns: 1fr; }
  .home-hero .op-hero-title { font-size: 42px; }
  .home-hero-media { max-width: 640px; width: 100%; margin: 0 auto; }
  .home-bento { grid-template-columns: 1fr; }
  .home-bento-card, .home-bento-crm { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); padding: 36px; }
  .home-bento-crm { grid-template-columns: 1fr; }
  .home-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .home-flow-step:nth-child(2)::after { display: none; }
}
@media screen and (max-width: 767px) {
  .home-hero .op-hero-title { font-size: 34px; }
  .home-hero-media { padding: 24px 0 48px 6%; }
  .home-chips .app-chip-1 { left: 6%; }
  .home-chips .app-chip-2 { right: 0; top: 40%; }
  .home-chips .app-chip-3 { right: 4%; bottom: 2%; }
  .home-page .home-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 24px 8px; border-radius: 28px; }
  .home-fact { padding: 0 14px; }
  .home-fact:nth-child(4) { border-left: 1px solid rgba(255, 255, 255, 0.14); }
  .home-fact:nth-child(odd) { border-left: none; }
  .home-fact:last-child { grid-column: 1 / -1; }
  .home-fact-value { font-size: 32px; }
  .home-fact-label { font-size: 14px; }
  .home-compare-head { display: none; }
  .home-compare { margin-top: 28px !important; gap: 16px; }
  .home-compare-row { grid-template-columns: 1fr; gap: 0; }
  .home-compare-arrow { display: none; }
  .home-page .home-compare-before { border-radius: 20px 20px 0 0; padding: 14px 18px; font-size: 15px; }
  .home-page .home-compare-after { border-radius: 0 0 20px 20px; padding: 16px 18px; font-size: 15px; }
  .home-bento { margin-top: 28px; gap: 12px; }
  .home-bento-card, .home-bento-crm { grid-template-columns: 1fr; padding: 24px 20px; border-radius: 24px; gap: 20px; }
  .home-bento-title, .home-bento-crm .home-bento-title { font-size: 24px; }
  .home-bento-phone .home-bento-media img { max-height: 280px; }
  .home-flow { grid-template-columns: 1fr; gap: 0; margin-top: 28px !important; }
  .home-flow-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 18px;
    align-items: start;
    padding-bottom: 24px;
    text-align: left;
  }
  .home-flow-step:not(:last-child)::after,
  .home-flow-step:nth-child(2)::after {
    display: block;
    top: 64px;
    bottom: 4px;
    left: 27px;
    width: 0;
    border-top: none;
    border-left: 2px dashed rgba(114, 114, 236, 0.45);
  }
  .home-flow-badge { grid-row: span 2; width: 56px; height: 56px; margin-bottom: 0; border-radius: 18px; }
  .home-flow-badge .op-icon { width: 24px; height: 24px; }
  .home-flow-num { width: 24px; height: 24px; font-size: 12px; }
  .home-page .home-flow-step .op-card-title { padding-top: 4px; font-size: 18px; }
  .home-flow-step .op-card-text { max-width: none; margin-top: 4px !important; font-size: 15px; }
  .home-audiences { grid-template-columns: 1fr; gap: 12px; }
  .home-page .home-clients-note { align-items: flex-start; border-radius: 20px; padding: 14px 18px; }
  .home-join-title { margin-top: 24px !important; }
  .home-join-step-title { font-size: 17px; }

  .home-sticky-cta {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 20px;
    border-radius: 20px;
    background: var(--purple-accent, #7272ec);
    box-shadow: 0 12px 32px rgba(44, 44, 98, 0.3);
    color: #fff !important;
    text-align: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition:
      opacity var(--duration-ui, 200ms) ease,
      transform var(--duration-modal, 280ms) var(--ease-out, ease),
      visibility var(--duration-modal, 280ms);
  }
  .home-sticky-cta.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
  body:has(.cookie-consent-open) .home-sticky-cta { opacity: 0; visibility: hidden; }
  .home-sticky-cta:active { transform: scale(0.98); }
  .home-sticky-text { font-family: var(--button-font-family, "Nunito", sans-serif); font-size: 17px; font-weight: 700; line-height: 1.3; }
  .home-sticky-note { font-size: 12px; line-height: 1.3; opacity: 0.85; }
}
@media screen and (max-width: 610px) {
  .home-hero .op-hero-title { font-size: 30px; }
  .home-hero-media { padding-left: 4%; }
  .home-hero-phone { width: 38%; }
  .home-chips .app-chip-1 { left: 0; top: 0; }
  .home-chips .app-chip-3 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .home-page .home-audience:active,
  .home-sticky-cta:active { transform: none; }
  .home-sticky-cta { transition: opacity var(--duration-ui, 200ms) ease, visibility var(--duration-ui, 200ms); transform: none; }
}
