/**
 * PurchaseFlow marketing brand layer
 * Matches app typography (Adobe Gotham via Typekit tbg1hzh)
 */

/* ── Typography ─────────────────────────────────────────────── */
html,
body,
.iv-anim,
.hd-anim,
.pi-anim,
.ct-anim,
.jm-anim,
.fs-anim {
  font-family: "gotham", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wordmark,
.logo,
.nav-item > a,
h1, h2, h3, h4, h5,
.hero-h,
h2.sec,
.sol-row h3,
.feat-card h3,
.pain-card h3,
.price-card h3,
.cap h4,
.faq-card h4,
.feature h3,
.ct-form h3,
.check-row h3,
.flow-step h4 {
  font-family: "gotham", system-ui, sans-serif;
}

.hero-h,
h1.hero-h {
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2.sec,
.feature h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kicker,
.eyebrow {
  font-weight: 500;
  letter-spacing: 0.1em;
}

.sec-sub,
.hero-sub,
.price-card .desc,
.feat-card p,
.pain-card p {
  font-weight: 400;
}

.logo-cell .txt {
  font-family: "gotham", sans-serif;
  font-weight: 700;
}

.rotator,
.rotator-track span {
  font-weight: 700;
}

.nav-item > a,
.btn {
  font-weight: 500;
}

/* ── Buttons & radius ─────────────────────────────────────── */
.btn {
  border-radius: 12px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange) 0%, #ff9a4d 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(244, 119, 33, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff9a4d 0%, var(--orange) 100%) !important;
  box-shadow: 0 6px 22px rgba(244, 119, 33, 0.38);
  transform: translateY(-1px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.price-card .pick,
.price-card.featured .pick,
.pill-btn {
  border-radius: 12px;
}

.dropdown-inner,
.scene-card,
.price-card,
.feat-card,
.pain-card,
.cap,
.faq-card,
.sol-visual,
.ct-form,
.hi-card,
.check-row,
.flow-step {
  border-radius: 14px;
}

/* ── Hero atmosphere (tuned — dual orbs) ──────────────────── */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: min(440px, 62vw);
  height: min(440px, 62vw);
  bottom: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(149, 143, 197, 0.28) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: pfOrbLilac 20s ease-in-out infinite;
}

.hero::after {
  content: "";
  position: absolute;
  width: min(580px, 78vw);
  height: min(580px, 78vw);
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(244, 119, 33, 0.26) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: pfOrbOrange 14s ease-in-out infinite;
}

.hero > .wrap,
.hero > .hero-content,
.hero > .hero-demo-wrap,
.hero > .hero-grid {
  position: relative;
  z-index: 1;
}

@keyframes pfOrbOrange {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-42px, 28px) scale(1.08);
    opacity: 1;
  }
}

@keyframes pfOrbLilac {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.55;
  }
  50% {
    transform: translate(32px, -20px) scale(1.05);
    opacity: 0.85;
  }
}

/* ── Scroll reveal ────────────────────────────────────────── */
.pf-reveal,
.pf-reveal-head,
.pf-reveal-item {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.pf-reveal.is-visible,
.pf-reveal-head.is-visible,
.pf-reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pf-reveal-head {
  transform: translateY(16px);
}

.pf-reveal-item {
  transform: translateY(18px);
}

/* Stacked industry cards centre with translateX(-50%) — reveal must not override */
.ind-card.pf-reveal-item {
  transform: translateX(-50%) translateY(calc(var(--stack-offset, 0) * 14px))
    scale(calc(1 - var(--stack-offset, 0) * 0.04))
    rotate(calc(var(--stack-offset, 0) * 1.4deg));
}

.ind-card.pf-reveal-item.is-visible {
  transform: translateX(-50%) translateY(calc(var(--stack-offset, 0) * 14px))
    scale(calc(1 - var(--stack-offset, 0) * 0.04))
    rotate(calc(var(--stack-offset, 0) * 1.4deg));
  opacity: calc(1 - var(--stack-offset, 0) * 0.18);
}

.pf-reveal-delay-1 { transition-delay: 0.07s; }
.pf-reveal-delay-2 { transition-delay: 0.14s; }
.pf-reveal-delay-3 { transition-delay: 0.21s; }

/* Stagger children in grids when parent batch reveals */
.pf-reveal-stagger .pf-reveal-item:nth-child(1) { transition-delay: 0.04s; }
.pf-reveal-stagger .pf-reveal-item:nth-child(2) { transition-delay: 0.1s; }
.pf-reveal-stagger .pf-reveal-item:nth-child(3) { transition-delay: 0.16s; }
.pf-reveal-stagger .pf-reveal-item:nth-child(4) { transition-delay: 0.22s; }
.pf-reveal-stagger .pf-reveal-item:nth-child(5) { transition-delay: 0.28s; }
.pf-reveal-stagger .pf-reveal-item:nth-child(6) { transition-delay: 0.34s; }
.pf-reveal-stagger .pf-reveal-item:nth-child(7) { transition-delay: 0.4s; }
.pf-reveal-stagger .pf-reveal-item:nth-child(8) { transition-delay: 0.46s; }

/* Card hover lift */
.feat-card,
.pain-card,
.cap,
.cap-card,
.role-card,
.faq-card,
.flow-step,
.check-row,
.price-card:not(.featured),
.feature,
.ct-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.65s ease;
}

.feat-card:hover,
.pain-card:hover,
.cap:hover,
.cap-card:hover,
.role-card:hover,
.faq-card:hover,
.flow-step:hover,
.price-card:not(.featured):hover,
.ct-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -24px rgba(50, 30, 68, 0.2);
}

.pf-reveal-item.is-visible.feat-card:hover,
.pf-reveal-item.is-visible.pain-card:hover,
.pf-reveal-item.is-visible.cap:hover,
.pf-reveal-item.is-visible.cap-card:hover,
.pf-reveal-item.is-visible.role-card:hover,
.pf-reveal-item.is-visible.faq-card:hover,
.pf-reveal-item.is-visible.flow-step:hover,
.pf-reveal-item.is-visible.price-card:hover,
.pf-reveal-item.is-visible.ct-card:hover {
  transform: translateY(-4px);
}

/* ── WPForms (contact page) ───────────────────────────────── */
.pf-wpforms-wrap.pf-reveal-item,
.pf-wpforms-wrap.pf-reveal-item.is-visible {
  transform: none !important;
}

.pf-wpforms-wrap .wpforms-container,
.pf-wpforms-wrap .wpforms-container-full,
.pf-wpforms-wrap .wpforms-render-modern,
.pf-wpforms-wrap #wpforms-665 {
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.pf-wpforms-wrap .wpforms-form,
.pf-wpforms-wrap .wpforms-field-container {
  display: block !important;
  width: 100% !important;
}

.pf-wpforms-wrap .wpforms-field,
.pf-wpforms-wrap #wpforms-665 .wpforms-field {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 18px 0 !important;
  padding: 0 !important;
  float: none !important;
  flex: none !important;
  position: static !important;
}

.pf-wpforms-wrap .wpforms-field-label,
.pf-wpforms-wrap #wpforms-665 label.wpforms-field-label {
  display: block !important;
  width: 100% !important;
  margin: 0 0 6px 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  color: var(--purple) !important;
  font-weight: 600 !important;
  float: none !important;
  line-height: 1.4 !important;
}

.pf-wpforms-wrap .wpforms-field-medium,
.pf-wpforms-wrap .wpforms-field-large,
.pf-wpforms-wrap .wpforms-field-small,
.pf-wpforms-wrap textarea.wpforms-field-medium,
.pf-wpforms-wrap select.wpforms-field-medium,
.pf-wpforms-wrap #wpforms-665 .wpforms-field-medium,
.pf-wpforms-wrap #wpforms-665 textarea.wpforms-field-medium,
.pf-wpforms-wrap #wpforms-665 input.wpforms-field-medium {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  padding: 11px 13px !important;
  border: 1px solid var(--line-d) !important;
  border-bottom: 1px solid var(--line-d) !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  height: auto !important;
  min-height: 44px !important;
}

.pf-wpforms-wrap textarea.wpforms-field-medium,
.pf-wpforms-wrap #wpforms-665 textarea.wpforms-field-medium {
  min-height: 96px !important;
  resize: vertical !important;
}

.pf-wpforms-wrap .wpforms-field-medium:focus,
.pf-wpforms-wrap textarea.wpforms-field-medium:focus,
.pf-wpforms-wrap #wpforms-665 .wpforms-field-medium:focus,
.pf-wpforms-wrap #wpforms-665 textarea.wpforms-field-medium:focus {
  border-color: var(--purple) !important;
  box-shadow: 0 0 0 3px rgba(149, 143, 197, 0.25) !important;
  outline: none !important;
}

.pf-wpforms-wrap #wpforms-665 button#wpforms-submit-665,
.pf-wpforms-wrap .wpforms-submit {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 48px !important;
  padding: 14px 19px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
  border: 0 !important;
  background: linear-gradient(135deg, var(--orange) 0%, #ff9a4d 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(244, 119, 33, 0.28) !important;
  cursor: pointer !important;
}

.pf-wpforms-wrap #wpforms-665 button#wpforms-submit-665:hover,
.pf-wpforms-wrap .wpforms-submit:hover {
  background: linear-gradient(135deg, #ff9a4d 0%, var(--orange) 100%) !important;
  transform: translateY(-1px);
}

.pf-wpforms-wrap .wpforms-submit-container {
  margin-top: 8px !important;
  padding: 0 !important;
  width: 100% !important;
}

.pf-wpforms-wrap .wpforms-form.inline-fields .wpforms-field-container,
.pf-wpforms-wrap .wpforms-form.inline-fields .wpforms-field {
  display: block !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

.pf-form-fallback {
  padding: 16px;
  border-radius: 9px;
  background: #fff7f0;
  border: 1px solid rgba(244, 119, 33, 0.25);
  font-size: 14px;
}

.pf-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: center;
  padding: 0 0 20px;
  font-size: 12.5px;
}

.pf-legal-links a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
}

.pf-legal-links a:hover {
  color: #fff;
}

.pf-legal-sep {
  color: rgba(255, 255, 255, 0.35);
}

/* ── Mobile navigation ─────────────────────────────────────── */
.pf-nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pf-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
}

.pf-nav-toggle:focus-visible {
  outline: 2px solid var(--orange, #f47721);
  outline-offset: 2px;
}

.pf-nav-toggle-icon {
  position: relative;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: background 0.2s ease;
}

.pf-nav-toggle-icon::before,
.pf-nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              top 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.pf-nav-toggle-icon::before {
  top: -6px;
}

.pf-nav-toggle-icon::after {
  top: 6px;
}

.pf-nav-toggle[aria-expanded="true"] .pf-nav-toggle-icon {
  background: transparent;
}

.pf-nav-toggle[aria-expanded="true"] .pf-nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.pf-nav-toggle[aria-expanded="true"] .pf-nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.pf-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}

.pf-mobile-nav.is-open {
  pointer-events: auto;
  visibility: visible;
}

.pf-mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 17, 48, 0.55);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.pf-mobile-nav.is-open .pf-mobile-nav-backdrop {
  opacity: 1;
}

.pf-mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 92vw);
  height: 100%;
  background: linear-gradient(180deg, #321e44 0%, #241433 100%);
  color: #fff;
  box-shadow: -12px 0 40px rgba(26, 17, 48, 0.35);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pf-mobile-nav.is-open .pf-mobile-nav-panel {
  transform: translateX(0);
}

.pf-mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.pf-mobile-nav-head .wordmark {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.pf-mobile-nav-close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pf-mobile-nav-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.pf-mobile-nav-close:focus-visible {
  outline: 2px solid var(--orange, #f47721);
  outline-offset: 2px;
}

.pf-mobile-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 24px;
}

.pf-mobile-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-mobile-nav-link,
.pf-mobile-nav-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.pf-mobile-nav-link:hover,
.pf-mobile-nav-trigger:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.pf-mobile-nav-trigger .pf-mobile-nav-caret {
  width: 10px;
  height: 10px;
  opacity: 0.55;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.pf-mobile-nav-section.is-open .pf-mobile-nav-caret {
  transform: rotate(180deg);
}

.pf-mobile-nav-sub {
  display: none;
  padding: 0 0 8px 8px;
}

.pf-mobile-nav-section.is-open .pf-mobile-nav-sub {
  display: block;
}

.pf-mobile-nav-sub a {
  display: block;
  padding: 10px 12px 10px 16px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  border-left: 2px solid rgba(244, 119, 33, 0.35);
  transition: background 0.15s ease, color 0.15s ease;
}

.pf-mobile-nav-sub a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.pf-mobile-nav-sub a strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.pf-mobile-nav-sub a span {
  display: block;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.pf-mobile-nav-cta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
}

.pf-mobile-nav-cta .btn {
  width: 100%;
  justify-content: center;
}

.pf-mobile-nav-cta .btn-primary {
  background: linear-gradient(135deg, var(--orange, #f47721) 0%, #ff9a4d 100%) !important;
  box-shadow: 0 4px 14px rgba(244, 119, 33, 0.28);
}

html.pf-nav-open,
html.pf-nav-open body {
  overflow: hidden;
}

@media (max-width: 960px) {
  header .nav-cta {
    display: none !important;
  }

  .pf-nav-toggle {
    display: inline-flex;
  }

  header .nav {
    gap: 16px;
  }
}

/* ── Mobile overflow fixes ─────────────────────────────────── */
/* Page-level media blocks only reset some grids; these shared
   grids (some with inline column styles) spill on small screens. */
@media (max-width: 920px) {
  .hub-grid,
  .vals-grid,
  .about-cols,
  .ct-grid {
    grid-template-columns: 1fr !important;
  }

  /* Safety net against any remaining decorative overflow */
  html,
  body {
    overflow-x: hidden;
  }
}

/* ── Mobile video / animated frame fixes ───────────────────── */
/* At phone widths the 16:10 / 21:9 frames become too short for the
   cqw-scaled scene cards inside, which get clipped ("squished").
   Give animated frames a taller ratio so content fits; frames with a
   real <video> keep the video's native ratio instead. */
@media (max-width: 760px) {
  .video-frame,
  .video-ph,
  .hero-demo,
  .bp {
    aspect-ratio: 4 / 5 !important;
  }

  .video-frame:has(video.product-video) {
    aspect-ratio: 16 / 10 !important;
  }

  .video-frame video.product-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Scene cards: stop hugging the frame edges so shadows/rounding show */
  .jm-upload, .jm-recipe, .fs-temps,
  .pi-classify, .ct-attr, .ct-scope, .hd-basket {
    width: 92% !important;
  }
  .fs-probe-wrap {
    width: 92% !important;
    grid-template-columns: 1fr !important;
  }
  .hd-grn-phone {
    width: 60% !important;
  }

  /* Absolutely-positioned cards in the invoice scene need more width */
  .iv-invoice {
    width: 78% !important;
  }
  .iv-callout,
  .iv-credit,
  .hd-agent-insight {
    width: 44% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-reveal,
  .pf-reveal-head,
  .pf-reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero::before,
  .hero::after {
    animation: none;
  }

  .btn-primary:hover,
  .feat-card:hover,
  .pain-card:hover,
  .cap:hover,
  .faq-card:hover,
  .flow-step:hover,
  .price-card:hover {
    transform: none;
  }

  .pf-mobile-nav-panel,
  .pf-mobile-nav-backdrop,
  .pf-nav-toggle-icon,
  .pf-nav-toggle-icon::before,
  .pf-nav-toggle-icon::after,
  .pf-mobile-nav-caret {
    transition: none;
  }
}
