/* =====================================================================
   JobsNext - "First Job Ad FREE" homepage popup
   Everything is scoped to .jfp / .jfp-* so the homepage, navbar and footer
   are never restyled. Base styles are the finished frame of the animation
   (used for reduced motion); JS drives the variables --a --b --c --r --f --h --p.
   ===================================================================== */
.jfp {
  --navy: #052E5A; --ink: #031B36; --orange: #F77A2A; --orange-2: #E2620F; --orange-3: #C7530A; --orange-tint: #FFF3EA;
  --tint: #F5F8FC; --tint-2: #EAF0F8; --line: rgba(5, 46, 90, .1); --line-2: rgba(5, 46, 90, .16); --muted: rgba(5, 46, 90, .7);
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.4, .64, 1);
  position: fixed; inset: 0; z-index: 99990; display: grid; place-items: center; padding: 24px;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.5; color: var(--navy);
  -webkit-font-smoothing: antialiased;
}
.jfp[hidden] { display: none; }
.jfp *, .jfp *::before, .jfp *::after { box-sizing: border-box; }
.jfp svg { max-width: 100%; }
.jfp em { font-style: normal; }
.jfp :focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.jfp__overlay { position: absolute; inset: 0; background: rgba(3, 27, 54, .64); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s ease; }
.jfp__dialog {
  position: relative; display: flex; flex-direction: column; width: min(1180px, 84vw); max-height: min(860px, calc(100vh - 48px)); max-height: min(860px, calc(100dvh - 48px));
  overflow: hidden; border-radius: 28px; background: var(--tint);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 60px 120px -40px rgba(3, 27, 54, .75);
  opacity: 0; transform: translateY(28px) scale(.97); transition: opacity .35s ease, transform .55s var(--ease);
}
.jfp.is-open .jfp__overlay { opacity: 1; }
.jfp.is-open .jfp__dialog { opacity: 1; transform: none; }

/* ---- limited-time band (always moving, always readable) ---- */
.jfp__band { position: relative; z-index: 3; flex: none; display: flex; align-items: center; height: 46px; overflow: hidden; background: var(--navy); }
.jfp__ticker { display: flex; width: max-content; white-space: nowrap; animation: jfpTicker 26s linear infinite; }
.jfp__ticker > * { display: inline-flex; align-items: center; margin-right: 26px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.jfp__ticker > *::after { content: ""; width: 7px; height: 7px; margin-left: 26px; background: var(--orange); transform: rotate(45deg); }
.jfp__ticker span { color: #FFB27F; }
.jfp__ticker b { color: #fff; font-weight: 700; }
@keyframes jfpTicker { to { transform: translateX(-50%); } }

.jfp__close {
  position: absolute; z-index: 6; top: 60px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: #fff; color: var(--navy); cursor: pointer;
  box-shadow: 0 0 0 1px var(--line), 0 10px 24px -12px rgba(5, 46, 90, .55); transition: transform .3s var(--spring), background-color .2s ease;
}
.jfp__close:hover { transform: rotate(90deg); background: var(--orange-tint); }

/* ---- body: copy + animated example ---- */
.jfp__body {
  position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 36px; align-items: center;
  padding: 40px 64px 44px 56px;
}
.jfp__x { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.jfp-fx { fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.jfp-fx--n { stroke: rgba(5, 46, 90, .06); stroke-width: 170; }
.jfp-fx--o { stroke: rgba(247, 122, 42, .15); stroke-width: 170; }
.jfp-fx--t { stroke: rgba(5, 46, 90, .18); stroke-width: 1.5; }
.jfp-fx--to { stroke: rgba(247, 122, 42, .5); }
.jfp-js .jfp-fx { stroke-dashoffset: 1; }
.jfp-js .jfp.is-open .jfp-fx { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(.65, 0, .35, 1) .15s; }
.jfp-js .jfp.is-open .jfp-fx--o, .jfp-js .jfp.is-open .jfp-fx--to { transition-delay: .4s; }

.jfp__copy, .jfp__scene { position: relative; z-index: 2; zoom: var(--jfp-z, 1); }

.jfp__offer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 14px; font-weight: 600; color: var(--muted); }
.jfp__offer span {
  position: relative; padding: 7px 14px 6px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff;
  background: var(--orange-2); clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); padding-right: 22px;
}
.jfp__title { margin: 0; color: var(--navy); }
.jfp__title-top { display: block; font-size: clamp(30px, 3.1vw, 44px); font-weight: 800; line-height: 1.02; letter-spacing: -.04em; }
.jfp__free {
  position: relative; display: flex; width: max-content; margin: 2px 0 0 -.04em; padding: 0 .04em .06em; overflow: hidden;
  font-size: clamp(92px, 10.6vw, 156px); font-weight: 800; line-height: .9; letter-spacing: -.07em;
}
.jfp__free > span { display: inline-block; background: linear-gradient(180deg, #FB8D46 0%, #F77A2A 40%, #E2620F 100%); -webkit-background-clip: text; background-clip: text; color: transparent; transform-origin: 50% 100%; }
.jfp__free::after { content: ""; position: absolute; left: .04em; bottom: .02em; width: 86%; height: .05em; border-radius: 99px; background: var(--navy); transform-origin: 0 50%; }
.jfp-js .jfp__free > span { transform: translateY(105%) rotateX(-70deg); }
.jfp-js .jfp__free::after { transform: scaleX(0); }
.jfp-js .jfp.is-open .jfp__free > span { transform: none; transition: transform .9s var(--ease); transition-delay: calc(.25s + var(--k) * .07s); }
.jfp-js .jfp.is-open .jfp__free::after { transform: none; transition: transform .7s var(--ease) .75s; }

.jfp__lede { max-width: 30em; margin: 16px 0 0; font-size: 16.5px; line-height: 1.6; color: var(--muted); }
.jfp__lede b { color: var(--navy); }
.jfp__benefit { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; font-size: 15px; font-weight: 700; color: var(--navy); }
.jfp__benefit svg { flex: none; color: var(--orange-2); }
.jfp__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 24px; }
.jfp__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 30px; border-radius: 999px;
  font-size: 17px; font-weight: 700; color: #fff !important; text-decoration: none !important; background: linear-gradient(135deg, #FB8D46, #E2620F);
  box-shadow: 0 18px 34px -16px rgba(226, 98, 15, .85); transition: transform .3s var(--spring), box-shadow .3s ease;
}
.jfp__cta:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -16px rgba(226, 98, 15, .95); }
.jfp__cta svg { transition: transform .3s var(--ease); }
.jfp__cta:hover svg { transform: translateX(4px); }
.jfp__later { padding: 6px 2px; border: 0; background: none; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.jfp__later:hover { color: var(--navy); }
.jfp__fine { margin: 14px 0 0; font-size: 12.5px; color: rgba(5, 46, 90, .58); }

/* ---- the animated example ad ---- */
.jfp__scene { display: flex; flex-direction: column; align-items: center; perspective: 1700px; }
.jfp__sample { margin: 0 0 12px; font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(5, 46, 90, .42); }
.jfp__rig {
  --enter: var(--a, 1);
  position: relative; display: flex; flex-direction: column; width: min(440px, 100%); transform-style: preserve-3d;
  transform: translate3d(0, calc((1 - var(--enter)) * 110px), calc((1 - var(--enter)) * -420px)) rotateY(calc((1 - var(--h, 1)) * -18deg)) rotateX(calc((1 - var(--h, 1)) * 10deg));
  opacity: clamp(0, calc(var(--enter) * 1.6), 1); transition: filter .4s ease;
}
.jfp__scene.is-swap .jfp__rig { opacity: 0; transition: opacity .4s ease; }
.jfp-ad {
  position: relative; overflow: hidden; padding: 22px 24px 20px; border-radius: 26px; background: #fff;
  box-shadow: 0 0 0 1px rgba(5, 46, 90, .08), 0 60px 100px -55px rgba(5, 46, 90, .65), 0 20px 40px -28px rgba(5, 46, 90, .35);
}
.jfp-ad__sheen { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .7) 48%, transparent 62%); transform: translateX(calc(-110% + var(--h, 1) * 220%)); opacity: calc(1 - var(--h, 1) * var(--h, 1)); }
.jfp-ad__head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.jfp-ad__logo { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; color: var(--navy); background: var(--tint-2); }
.jfp-ad__co { display: grid; line-height: 1.25; }
.jfp-ad__co b { font-size: 14px; font-weight: 700; }
.jfp-ad__co small { font-size: 12px; color: var(--muted); }
.jfp-ad__status { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--tint); transition: background-color .5s ease, color .5s ease, transform .5s var(--spring); }
.jfp-ad__status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.jfp-ad__status[data-state="ready"] { background: var(--orange-tint); color: var(--orange-3); }
.jfp-ad__status[data-state="live"] { background: var(--navy); color: #fff; transform: scale(1.06); }
.jfp-ad__status[data-state="live"] i { background: #FFB27F; box-shadow: 0 0 0 3px rgba(255, 178, 127, .3); }
.jfp-ad__title { display: flex; align-items: center; min-height: 46px; margin: 14px 0 10px; font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -.04em; color: var(--navy); white-space: nowrap; }
.jfp-caret { display: inline-block; flex: none; width: 3px; height: 32px; margin-left: 4px; border-radius: 2px; background: var(--orange); animation: jfpBlink 1s steps(1) infinite; }
.jfp-ad.is-typed .jfp-caret, .jfp-ad:not([data-js]) .jfp-caret { opacity: 0; animation: none; }
@keyframes jfpBlink { 50% { opacity: 0; } }
.jfp-ad__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.jfp-ad__meta > span {
  --cv: clamp(0, calc(var(--c, 1) * 3 - var(--ci, 0)), 1);
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--tint);
  opacity: var(--cv); transform: translateY(calc((1 - var(--cv)) * 14px)) scale(calc(.9 + var(--cv) * .1));
}
.jfp-ad__meta > span:nth-child(2) { --ci: 1; } .jfp-ad__meta > span:nth-child(3) { --ci: 2; }
.jfp-ad__meta svg { flex: none; color: var(--orange); }
.jfp-ad__label { margin: 0 0 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(5, 46, 90, .5); }
.jfp-ad__reqs { display: grid; gap: 9px; margin: 0 0 16px; padding: 0; list-style: none; }
.jfp-ad__reqs li {
  --rv: clamp(0, calc(var(--r, 1) * 3 - var(--ri, 0)), 1);
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500;
  opacity: calc(.15 + var(--rv) * .85); transform: translateX(calc((1 - var(--rv)) * 18px));
}
.jfp-ad__reqs li:nth-child(2) { --ri: 1; } .jfp-ad__reqs li:nth-child(3) { --ri: 2; }
.jfp-ad__reqs i { position: relative; flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-2); }
.jfp-ad__reqs i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; transform: scale(var(--rv));
  background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.jfp-ad__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.jfp-ad__assess { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.jfp-switch { position: relative; flex: none; width: 40px; height: 24px; border-radius: 99px; background: var(--tint-2); transition: background-color .4s ease; }
.jfp-switch i { position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(5, 46, 90, .25); transition: transform .45s var(--spring); }
.jfp-ad.is-assess .jfp-switch, .jfp-ad:not([data-js]) .jfp-switch { background: var(--navy); }
.jfp-ad.is-assess .jfp-switch i, .jfp-ad:not([data-js]) .jfp-switch i { transform: translateX(16px); }
.jfp-ad__publish { position: relative; display: grid; place-items: center; min-width: 146px; height: 46px; padding: 0 20px; overflow: hidden; border-radius: 999px; font-size: 15px; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.jfp-ad__fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, #FB8D46, #E2620F); transform: scaleX(var(--h, 1)); transform-origin: 0 50%; }
.jfp-ad__publish > span:not(.jfp-ad__fill) { position: relative; grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; transition: opacity .35s ease, transform .45s var(--ease); }
.jfp-ad__pd { color: #fff; }
.jfp-ad:not([data-js]) .jfp-ad__pl { opacity: 0; }
.jfp-ad[data-js]:not(.is-live) .jfp-ad__pd { opacity: 0; transform: translateY(12px); }
.jfp-ad.is-live .jfp-ad__pl { opacity: 0; transform: translateY(-12px); }

/* price card: hangs off the ad's lower-right corner */
.jfp-price {
  --pv: clamp(0, calc(var(--b, 1) * 2), 1);
  --fv: clamp(0, calc(var(--f, 1) * 1.6 - .6), 1);
  --st: clamp(0, calc(var(--f, 1) * 3 - 2), 1);
  position: relative; z-index: 4; align-self: flex-end; display: grid; grid-template-columns: auto auto; column-gap: 16px; align-items: end;
  margin: -10px -16px 0 0; padding: 12px 16px 13px; border-radius: 18px; background: #fff;
  box-shadow: 0 0 0 1px rgba(5, 46, 90, .08), 0 30px 50px -26px rgba(5, 46, 90, .6);
  opacity: var(--pv); transform: translateY(calc((1 - var(--pv)) * 18px));
}
.jfp-price small { grid-column: 1; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(5, 46, 90, .5); }
.jfp-price__amt { grid-column: 1; position: relative; display: grid; overflow: hidden; font-size: 34px; font-weight: 800; line-height: 1.05; letter-spacing: -.04em; }
.jfp-price__amt > span { grid-area: 1 / 1; white-space: nowrap; }
.jfp-price__was { position: relative; color: rgba(5, 46, 90, .42); transform: translateY(calc(var(--fv) * -112%)); }
.jfp-price__was sup { margin-left: 3px; font-size: .32em; letter-spacing: 0; vertical-align: 1em; }
.jfp-price__was::after { content: ""; position: absolute; left: -3%; width: 72%; top: 52%; height: 4px; border-radius: 4px; background: var(--orange); transform: scaleX(clamp(0, calc(var(--f, 1) * 2.5), 1)); transform-origin: 0 50%; }
.jfp-price__now { color: var(--navy); transform: translateY(calc((1 - var(--fv)) * 112%)); }
.jfp-price__stamp {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: 6px 11px 5px; border-radius: 5px;
  font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; line-height: 1; color: var(--orange-3);
  box-shadow: inset 0 0 0 2px var(--orange-3), inset 0 0 0 4px #fff, inset 0 0 0 5px var(--orange-3);
  opacity: var(--st); transform: rotate(-6deg) scale(calc(1.9 - var(--st) * .9)); transform-origin: 30% 50%;
}

.jfp-steps { position: relative; display: flex; justify-content: space-between; width: min(360px, 92%); margin: 30px 0 0; padding: 0; list-style: none; }
.jfp-steps::before, .jfp-steps__fill { content: ""; position: absolute; left: 6px; right: 6px; top: 5px; height: 2px; border-radius: 2px; background: var(--line-2); }
.jfp-steps__fill { background: var(--orange); transform: scaleX(var(--p, 1)); transform-origin: 0 50%; }
.jfp-steps li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: rgba(5, 46, 90, .45); transition: color .4s ease; }
.jfp-steps li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--line-2); transition: background-color .4s ease, box-shadow .4s ease, transform .5s var(--spring); }
.jfp-steps li.is-on, .jfp:not(.jfp--js) .jfp-steps li { color: var(--navy); }
.jfp-steps li.is-on::before, .jfp:not(.jfp--js) .jfp-steps li::before { background: var(--orange); box-shadow: 0 0 0 4px rgba(247, 122, 42, .2); transform: scale(1.15); }

/* =====================================================================
   Stacked layout: tablets, phones and short landscape screens.
   The example sits right under FREE., the CTA stays pinned to the bottom.
   ===================================================================== */
@media (max-width: 1023px), (max-height: 559px) {
  .jfp { padding: 16px; }
  .jfp__dialog { width: min(720px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); border-radius: 24px; }
  .jfp__body { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; padding: 30px 36px 0; }
  .jfp__copy { display: contents; }
  .jfp__offer { order: 1; margin-right: 52px; }
  .jfp__title { order: 2; }
  .jfp__scene { order: 3; margin: 26px 0 6px; }
  .jfp__lede { order: 4; max-width: none; }
  .jfp__benefit { order: 5; }
  .jfp__fine { order: 6; margin-bottom: 4px; }
  .jfp__actions {
    order: 7; position: sticky; bottom: 0; z-index: 5; margin: 10px -36px 0; padding: 16px 36px 18px;
    background: linear-gradient(180deg, rgba(245, 248, 252, 0), var(--tint) 26%); flex-wrap: nowrap;
  }
  .jfp__cta { flex: 1 1 auto; }
  .jfp__x { height: 900px; bottom: auto; }
  .jfp__free { font-size: min(21vw, 150px); }
}
@media (max-width: 600px) {
  .jfp { padding: 10px; }
  .jfp__dialog { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); border-radius: 22px; }
  .jfp__band { height: 40px; }
  .jfp__ticker > * { font-size: 11.5px; margin-right: 20px; }
  .jfp__ticker > *::after { margin-left: 20px; width: 6px; height: 6px; }
  .jfp__close { top: 50px; right: 10px; width: 40px; height: 40px; }
  .jfp__body { padding: 22px 20px 0; }
  .jfp__offer { gap: 8px; margin-bottom: 14px; font-size: 12.5px; }
  .jfp__offer span { font-size: 11.5px; padding: 6px 18px 5px 11px; }
  .jfp__title-top { font-size: clamp(26px, 8vw, 34px); }
  .jfp__free { font-size: min(27vw, 128px); }
  .jfp__scene { margin-top: 20px; }
  .jfp-ad { padding: 16px 16px 14px; border-radius: 20px; }
  .jfp-ad__logo { width: 36px; height: 36px; }
  .jfp-ad__title { min-height: 38px; margin: 12px 0 8px; font-size: 24px; }
  .jfp-caret { height: 24px; }
  .jfp-ad__meta { gap: 6px; margin-bottom: 12px; }
  .jfp-ad__meta > span { padding: 6px 10px; font-size: 12px; }
  .jfp-ad__reqs { gap: 7px; margin-bottom: 12px; }
  .jfp-ad__reqs li { font-size: 13px; }
  .jfp-ad__publish { min-width: 124px; height: 40px; font-size: 14px; }
  .jfp-price { margin-right: -6px; padding: 10px 14px 11px; column-gap: 12px; }
  .jfp-price__amt { font-size: 28px; }
  .jfp-steps { width: 100%; margin-top: 24px; }
  .jfp__lede { margin-top: 18px; font-size: 15px; }
  .jfp__benefit { font-size: 13.5px; align-items: flex-start; }
  .jfp__actions { margin-inline: -20px; padding: 14px 20px 16px; gap: 14px; }
  .jfp__cta { min-height: 52px; padding: 0 18px; font-size: 15.5px; }
  .jfp__later { font-size: 13.5px; white-space: nowrap; }
}
@media (max-width: 600px) {
  /* phones: keep the whole example (typing, $0, stamp, publish) above the pinned button */
  .jfp-ad__label, .jfp-ad__reqs { display: none; }
  .jfp__later { display: none; }
  .jfp__cta { width: 100%; }
}
@media (max-width: 359px) { .jfp-ad__title { font-size: 22px; } }

/* reduced motion: the finished frame, no movement */
@media (prefers-reduced-motion: reduce) {
  .jfp *, .jfp *::before, .jfp *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .jfp-js .jfp .jfp__free > span, .jfp-js .jfp .jfp__free::after { transform: none !important; }
  .jfp-js .jfp .jfp-fx { stroke-dashoffset: 0 !important; }
}
@media (max-width: 600px) and (max-height: 760px) {
  .jfp__free { font-size: min(23vw, 100px); }
  .jfp__scene { margin-top: 14px; }
}
