/* ===================== FUNNEL HOME ===================== */
/* Loaded only on the "Funnel Home" page template.
   Each industry owns one colour: sky = real estate, violet = finance,
   mint = clinics, coral = stores. Sun is kept for the final push. */

:root {
  --fn-ink: #15172E;
  --fn-text: #474B66;
  --fn-muted: #7C809A;
  --fn-paper: #FFFFFF;
  --fn-mist: #F3F5FA;
  --fn-line: #E3E6EF;
  --fn-brand: #1B4FD8;
  --fn-brand-dark: #1340B0;
  --fn-sky: #1597DB;
  --fn-sky-soft: #DCF1FC;
  --fn-violet: #6A4CF0;
  --fn-violet-soft: #ECE8FF;
  --fn-mint: #0E9F6E;
  --fn-mint-soft: #D8F5E9;
  --fn-coral: #F2603C;
  --fn-coral-soft: #FFE5DD;
  --fn-sun: #FFCB3D;
  --fn-grey: #9A9EB2;
  --fn-grey-soft: #EEEFF3;
  --fn-pop-bg: #FFFFFF;
  --fn-display: 'Bricolage Grotesque', 'Inter', sans-serif;
}

[data-theme="dark"] {
  --fn-ink: #F3F4F8;
  --fn-text: #B3B7CB;
  --fn-muted: #7E8299;
  --fn-paper: #000000;
  --fn-mist: #0E0F14;
  --fn-line: #24262F;
  --fn-brand: #4F7EFF;
  --fn-brand-dark: #3B6EF8;
  --fn-sky: #4CB8F0;
  --fn-sky-soft: rgba(76, 184, 240, .14);
  --fn-violet: #9B85FF;
  --fn-violet-soft: rgba(155, 133, 255, .14);
  --fn-mint: #34D399;
  --fn-mint-soft: rgba(52, 211, 153, .13);
  --fn-coral: #FF8A6B;
  --fn-coral-soft: rgba(255, 138, 107, .14);
  --fn-grey-soft: #16171D;
  --fn-pop-bg: #17181F;
}

/* Tone helpers: every coloured element reads --tone / --tone-soft */
.fn-tone-sky    { --tone: var(--fn-sky);    --tone-soft: var(--fn-sky-soft); }
.fn-tone-violet { --tone: var(--fn-violet); --tone-soft: var(--fn-violet-soft); }
.fn-tone-mint   { --tone: var(--fn-mint);   --tone-soft: var(--fn-mint-soft); }
.fn-tone-coral  { --tone: var(--fn-coral);  --tone-soft: var(--fn-coral-soft); }
.fn-tone-grey   { --tone: var(--fn-grey);   --tone-soft: var(--fn-grey-soft); }

.page-template-page-funnel {
  background: var(--fn-paper);
}

.page-template-page-funnel a:focus-visible,
.page-template-page-funnel summary:focus-visible,
.page-template-page-funnel button:focus-visible {
  outline: 3px solid var(--fn-sky);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- Shared type ---- */
.fn-title {
  font-family: var(--fn-display);
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.06;
  letter-spacing: -.03em;
  color: var(--fn-ink);
  max-width: 20ch;
  margin-bottom: 16px;
}

.fn-title-narrow {
  max-width: 18ch;
}

.fn-lede {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--fn-text);
  max-width: 60ch;
  margin-bottom: 48px;
}

.fn-section {
  padding: 104px 0;
}

/* ---- Buttons ---- */
.fn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 28px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color .2s, transform .2s;
}

.fn-btn-primary {
  background: var(--fn-brand);
  color: #fff;
}

.fn-btn-primary:hover {
  background: var(--fn-brand-dark);
  transform: translateY(-1px);
}

.fn-btn-ink {
  background: #15172E;
  color: #fff;
}

.fn-btn-ink:hover {
  background: #262A4D;
  transform: translateY(-1px);
}

.fn-btn-plain {
  color: var(--fn-ink);
  padding-left: 8px;
  padding-right: 8px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--fn-line);
}

.fn-btn-plain:hover {
  text-decoration-color: currentColor;
}

/* ---- Popup (mirrors the plugin's notification) ---- */
.fn-pop {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--fn-pop-bg);
  border-radius: 16px;
  padding: 14px 18px 14px 14px;
  box-shadow: 0 1px 2px rgba(21, 23, 46, .06), 0 12px 32px -8px rgba(21, 23, 46, .18);
  max-width: 340px;
  text-align: left;
}

.fn-pop-avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tone);
  color: #fff;
  font-weight: 700;
  font-size: .875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Customer photo in place of initials; a ring in the popup's colour ties it to the industry */
.fn-pop img.fn-pop-photo {
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--fn-pop-bg), 0 0 0 5px var(--tone);
}

.fn-pop-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fn-pop-name {
  font-size: .9375rem;
  color: var(--fn-ink);
}

.fn-pop-msg {
  font-size: .875rem;
  color: var(--fn-text);
  line-height: 1.4;
}

.fn-pop-ts {
  margin-top: 2px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--tone);
}

/* ===================== HERO ===================== */
.fn-hero {
  padding: 72px 0 96px;
  overflow: hidden;
}

.fn-hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.fn-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: .9375rem;
  color: var(--fn-mint);
  margin-bottom: 24px;
}

.fn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fn-mint);
  box-shadow: 0 0 0 5px var(--fn-mint-soft);
}

.fn-hero-title {
  font-family: var(--fn-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--fn-ink);
  max-width: 13ch;
  margin-bottom: 24px;
}

.fn-hero-sub {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--fn-text);
  max-width: 48ch;
  margin-bottom: 32px;
}

.fn-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.fn-hero-points {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 32px;
  font-size: .9375rem;
  color: var(--fn-text);
}

.fn-hero-points li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fn-hero-points li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--fn-brand);
}

/* Stage: colour blocks with popups stacked over them */
.fn-hero-stage {
  position: relative;
  height: 520px;
}

.fn-block {
  position: absolute;
  display: block;
}

.fn-block-sky    { background: var(--fn-sky-soft);    border-radius: 40px; top: 0;     left: 8%;  width: 62%; height: 46%; }
.fn-block-violet { background: var(--fn-violet-soft); border-radius: 50%;  top: 18%;   right: 0;  width: 36%; aspect-ratio: 1; }
.fn-block-mint   { background: var(--fn-mint-soft);   border-radius: 28px; bottom: 6%; left: 0;   width: 44%; height: 38%; }
.fn-block-coral  { background: var(--fn-coral-soft);  border-radius: 60px 60px 60px 12px; bottom: 0; right: 6%; width: 46%; height: 30%; }

.fn-hero-pop {
  position: absolute;
  width: 320px;
  animation: fn-drop .6s cubic-bezier(.2, .8, .2, 1.1) both;
}

.fn-hero-pop-1 { top: 7%;    left: 16%; animation-delay: .15s; }
.fn-hero-pop-2 { top: 30%;   right: 2%; animation-delay: .55s; }
.fn-hero-pop-3 { top: 53%;   left: 4%;  animation-delay: .95s; }
.fn-hero-pop-4 { bottom: 4%; right: 10%; animation-delay: 1.35s; }

@keyframes fn-drop {
  from { opacity: 0; transform: translateY(-16px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.fn-stage-note {
  position: absolute;
  bottom: -36px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: .8125rem;
  color: var(--fn-muted);
}

/* ===================== PROBLEM ===================== */
.fn-problem {
  background: var(--fn-mist);
}

.fn-problem-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 48px;
}

.fn-problem-item {
  border-top: 6px solid var(--tone);
  padding-top: 24px;
}

.fn-problem-item h3,
.fn-step h3,
.fn-usecase h3,
.fn-compare-side h3 {
  font-family: var(--fn-display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -.02em;
  color: var(--fn-ink);
  margin-bottom: 10px;
}

.fn-problem-item p,
.fn-step p {
  color: var(--fn-text);
  line-height: 1.65;
}

/* ===================== HOW IT WORKS ===================== */
.fn-steps {
  list-style: none;
  counter-reset: fn-step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 56px;
  position: relative;
}

/* line joining the three numbers on wide screens */
.fn-steps::before {
  content: "";
  position: absolute;
  top: 32px;
  left: 64px;
  right: 18%;
  border-top: 2px dashed var(--fn-line);
}

.fn-step {
  position: relative;
  counter-increment: fn-step;
}

.fn-step::before {
  content: counter(fn-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  margin-bottom: 24px;
  font-family: var(--fn-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: #fff;
  background: var(--fn-brand);
  position: relative;
}

.fn-step:nth-child(2)::before { background: var(--fn-violet); }
.fn-step:nth-child(3)::before { background: var(--fn-mint); }

/* ===================== USE CASES ===================== */
.fn-usecases {
  background: var(--fn-mist);
}

.fn-usecase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.fn-usecase {
  background: var(--tone-soft);
  border-radius: 28px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Full-width popup so it reads on two lines, like the real one */
.fn-usecase .fn-pop {
  max-width: none;
  padding: 18px 22px 18px 18px;
  gap: 16px;
}

.fn-usecase .fn-pop-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 1rem;
}

.fn-usecase .fn-pop-name {
  font-size: 1.0625rem;
}

.fn-usecase .fn-pop-msg {
  font-size: .9375rem;
}

.fn-usecase h3 {
  color: var(--tone);
  margin-bottom: 0;
}

.fn-checks,
.fn-crosses {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fn-checks li,
.fn-crosses li {
  position: relative;
  padding-left: 26px;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--fn-text);
}

.fn-checks li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--tone, var(--fn-mint));
  border-bottom: 2.5px solid var(--tone, var(--fn-mint));
  transform: rotate(-45deg);
}

.fn-crosses li::before,
.fn-crosses li::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 14px;
  border-top: 2.5px solid var(--fn-grey);
  transform: rotate(45deg);
}

.fn-crosses li::after {
  transform: rotate(-45deg);
}

/* ===================== REAL VS FAKE ===================== */
.fn-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.fn-compare-side {
  border-radius: 28px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fn-compare-fake {
  background: var(--fn-grey-soft);
}

.fn-compare-fake h3 {
  color: var(--fn-muted);
}

.fn-compare-fake .fn-pop {
  transform: rotate(-2deg);
  opacity: .6;
  filter: grayscale(1);
}

.fn-compare-real {
  --tone: var(--fn-mint);
  background: var(--fn-mint-soft);
}

.fn-compare-real .fn-pop {
  transform: rotate(1.5deg);
}

.fn-compare-side h3 {
  margin-bottom: 0;
}

/* ===================== SHARED SECTIONS ON THIS PAGE ===================== */
/* Pricing and contact are shared with the old homepage; restyle them here only. */
.page-template-page-funnel .pricing-section {
  background: var(--fn-paper);
  padding: 104px 0;
}

.page-template-page-funnel .pricing-section .section-label,
.page-template-page-funnel .contact-section .section-label {
  display: none;
}

.page-template-page-funnel .pricing-section .section-title,
.page-template-page-funnel .contact-info h2 {
  font-family: var(--fn-display);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--fn-ink);
}

/* ===================== FAQ ===================== */
.fn-faq {
  background: var(--fn-mist);
}

.fn-faq-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.fn-faq-intro {
  position: sticky;
  top: 110px;
}

.fn-faq-intro p {
  color: var(--fn-text);
  line-height: 1.65;
}

.fn-faq-intro a {
  color: var(--fn-brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fn-faq-item {
  border-bottom: 1.5px solid var(--fn-line);
}

.fn-faq-item:first-child {
  border-top: 1.5px solid var(--fn-line);
}

.fn-faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 44px 22px 0;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--fn-ink);
  position: relative;
}

.fn-faq-item summary::-webkit-details-marker {
  display: none;
}

.fn-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--fn-paper);
  color: var(--fn-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

.fn-faq-item[open] summary::after {
  content: "\2212";
  background: var(--fn-brand);
  color: #fff;
}

.fn-faq-item p {
  padding: 0 44px 24px 0;
  color: var(--fn-text);
  line-height: 1.7;
}

/* ===================== FINAL CTA ===================== */
.fn-final {
  background: var(--fn-sun);
  padding: 96px 0;
  overflow: hidden;
}

.fn-final-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}

.fn-final h2 {
  font-family: var(--fn-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  color: #15172E;
  max-width: 16ch;
  margin-bottom: 16px;
}

.fn-final p {
  font-size: 1.125rem;
  color: #3A3420;
  margin-bottom: 32px;
  max-width: 46ch;
}

.fn-final .fn-btn-plain {
  color: #15172E;
  text-decoration-color: rgba(21, 23, 46, .35);
}

.fn-final-pop {
  --fn-pop-bg: #FFFFFF;
  --fn-ink: #15172E;
  --fn-text: #474B66;
  transform: rotate(3deg);
  justify-self: center;
  width: 100%;
}

/* ===================== EXPLAINER VIDEO ===================== */
.fn-play {
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 10px;
  border-left: 11px solid currentColor;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  transform-origin: 35% 50%;
  animation: fn-heartbeat 1.6s ease-in-out infinite;
}

/* Double "lub-dub" beat, then a rest, to draw the eye to the video */
@keyframes fn-heartbeat {
  0%, 40%, 100% { transform: scale(1); }
  10% { transform: scale(1.35); }
  20% { transform: scale(1); }
  30% { transform: scale(1.25); }
}

.fn-video-open:hover .fn-play {
  animation-play-state: paused;
}

.fn-video-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(1100px, 92vw);
  max-width: none;
  margin: auto;
  overflow: visible;
}

.fn-video-dialog::backdrop {
  background: rgba(21, 23, 46, .82);
}

.fn-video-dialog video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #15172E;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

.fn-video-close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #15172E;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .fn-hero-inner { grid-template-columns: 1fr; gap: 64px; }
  .fn-hero-stage { max-width: 560px; width: 100%; margin: 0 auto; }
}

@media (max-width: 768px) {
  .fn-section,
  .page-template-page-funnel .pricing-section { padding: 72px 0; }
  .fn-hero { padding: 40px 0 80px; }
  .fn-hero-stage { height: 440px; }
  .fn-hero-pop { width: 270px; }
  .fn-hero-pop-1 { left: 4%; }
  .fn-hero-pop-3 { left: 0; }
  .fn-hero-pop-4 { right: 0; }
  .fn-problem-row,
  .fn-steps,
  .fn-compare-grid,
  .fn-faq-inner,
  .fn-final-inner { grid-template-columns: 1fr; }
  .fn-problem-row,
  .fn-steps { gap: 36px; }
  .fn-steps::before { display: none; }
  .fn-compare-side { padding: 28px 22px; }
  .fn-faq-inner { gap: 32px; }
  .fn-faq-intro { position: static; }
  .fn-final { padding: 72px 0; }
  .fn-final-pop { transform: rotate(2deg); }
}

@media (max-width: 760px) {
  .fn-usecase-grid { grid-template-columns: 1fr; }
  .fn-usecase { padding: 28px 22px; }
}

@media (max-width: 560px) {
  .fn-hero-pop { width: 250px; }
  .fn-pop { padding: 12px 14px 12px 12px; gap: 12px; }
  .fn-pop-avatar { width: 38px; height: 38px; border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .fn-hero-pop,
  .fn-play { animation: none; }
  .fn-btn { transition: none; }
}
