/* Payroll — "One product, four places it shows up" modules + trial CTA. */
.pm-section, .pm-cta {
  --pm-ink: #10172c; --pm-muted: #5a6680; --pm-purple: #5b16f2; --pm-purple-2: #8f5bff;
  --pm-blue: #1f6fe5; --pm-blue-2: #3b8dff; --pm-orange: #f2760a; --pm-orange-2: #ffa143; --pm-green: #12a37a;
  --pm-surface: #fff; --pm-line: #e8e6f2; --pm-bar: #eef0f6;
  --pm-shadow: 0 1px 2px rgb(16 24 40 / .04), 0 10px 28px -18px rgb(16 24 40 / .16);
}
.pm-section { position: relative; overflow: hidden; padding-block: clamp(3.25rem, 5vw, 5rem) clamp(1.5rem, 2.5vw, 2.25rem); background: linear-gradient(180deg, #fbfaff 0%, #f8f7fe 100%); }
.pm-section .wrap, .pm-cta .wrap { position: relative; z-index: 1; width: min(1720px, calc(100% - 48px)); }

/* Header */
.pm-head { max-width: 900px; margin-bottom: clamp(24px, 3vw, 36px); }
.pm-head .kicker { color: var(--pm-purple); letter-spacing: .16em; }
.pm-head h2 { margin-top: 10px; color: var(--pm-ink); font-size: clamp(2.1rem, 2.9vw, 3.1rem); text-wrap: pretty; line-height: 1.06; letter-spacing: -.045em; }
.pm-accent { color: var(--pm-purple); }
.pm-head .lede { max-width: 640px; margin-top: 14px; color: var(--pm-muted); font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.5; }

/* Module cards */
.pm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pm-card {
  --pm-accent: var(--pm-purple); --pm-tint: #f6f3ff; --pm-icon-bg: var(--pm-purple);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr; column-gap: 20px; min-height: 290px; padding: 26px; overflow: hidden;
  border: 1px solid var(--pm-line); border-radius: 20px; color: var(--pm-ink); background: linear-gradient(160deg, #fff 45%, var(--pm-tint)); text-decoration: none;
  box-shadow: var(--pm-shadow); transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}
.pm-card--blue { --pm-accent: var(--pm-blue); --pm-tint: #f1f6fe; --pm-icon-bg: var(--pm-blue); }
.pm-card--orange { --pm-accent: var(--pm-orange); --pm-tint: #fff5ec; --pm-icon-bg: var(--pm-orange); }
.pm-card:hover, .pm-card:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--pm-accent) 22%, var(--pm-line)); box-shadow: 0 1px 2px rgb(16 24 40 / .05), 0 18px 36px -22px rgb(16 24 40 / .24); }
.pm-card:focus-visible { outline: 3px solid #7350ed; outline-offset: 3px; }
.pm-card .pm-icon { grid-column: 1; grid-row: 1; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--pm-icon-bg); }
.pm-card .pm-icon svg { width: 24px; height: 24px; }
.pm-copy { position: relative; z-index: 2; grid-column: 1; grid-row: 2; display: block; min-width: 0; padding-top: 18px; }
.pm-copy h3 { margin: 0 0 8px; font-size: clamp(1.12rem, 1.35vw, 1.35rem); line-height: 1.2; letter-spacing: -.03em; }
.pm-copy p { margin: 0; color: var(--pm-muted); font-size: clamp(.9rem, 1vw, .98rem); line-height: 1.5; }
.pm-more { position: relative; z-index: 2; grid-column: 1; grid-row: 3; align-self: end; justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 8px 16px; border: 1px solid color-mix(in srgb, var(--pm-accent) 24%, white); border-radius: 999px; color: var(--pm-accent); background: #fff; font-size: .92rem; font-weight: 600; transition: background 200ms, gap 200ms; }
.pm-more svg { width: 17px; height: 17px; }
.pm-card:hover .pm-more { gap: 11px; background: color-mix(in srgb, var(--pm-accent) 7%, white); }

/* Card visual: compact UI preview, lower right */
.pm-art { position: relative; z-index: 1; grid-column: 2; grid-row: 2 / 4; align-self: end; width: max-content; max-width: 240px; margin-left: 10px; transition: transform 260ms ease; }
.pm-card:hover .pm-art { transform: translateY(-2px); }
.pm-ui { position: relative; display: grid; gap: 9px; padding: 12px 13px; border: 1px solid #e6e8f0; border-radius: 12px; color: var(--pm-ink); background: var(--pm-surface); font-size: 12px; line-height: 1.2; box-shadow: 0 1px 2px rgb(16 24 40 / .04), 0 8px 20px -14px rgb(16 24 40 / .2); }
.pm-ui-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--pm-bar); font-size: 12px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.pm-ui-row, .pm-ui-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--pm-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-ui-row > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.pm-ui-row svg { width: 13px; height: 13px; color: #8a93a8; }
.pm-ui-val { display: inline-flex; align-items: center; gap: 6px; color: var(--pm-ink); font-weight: 550; }
.pm-ui-val::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22b07d; }
.pm-ui-foot { padding-top: 8px; border-top: 1px solid var(--pm-bar); font-size: 11px; }
.pm-ui-foot b { color: var(--pm-accent); font-size: 14px; font-weight: 700; }
.pm-ui-tag { padding: 2px 8px; border-radius: 999px; color: var(--pm-muted); background: var(--pm-bar); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.pm-ui-tag--green { color: #0e7f58; background: #e3f6ef; }
.pm-ui-tag--blue { color: #1a5fc4; background: #e8f1fd; }
.pm-ui-tag--orange { color: #b85a00; background: #fff0e3; }
.pm-ui-av { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--pm-purple); background: #f0ebff; font-size: 9.5px; font-weight: 700; letter-spacing: .02em; }
.pm-folder-back { position: absolute; left: -10px; right: 12px; top: -14px; bottom: 14px; border-radius: 4px 12px 12px 12px; background: #eee8ff; }
.pm-folder-back::before { content: ""; position: absolute; left: 0; top: -8px; width: 40%; height: 10px; border-radius: 6px 8px 0 0; background: #eee8ff; }

/* Trial CTA */
.pm-cta { padding-block: clamp(1rem, 2vw, 1.5rem) clamp(3rem, 5vw, 4.5rem); background: linear-gradient(180deg, #f6f3ff, #fbfaff); }
.pm-cta-panel { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; gap: 24px; min-height: 300px; padding: clamp(28px, 3.4vw, 44px) clamp(20px, 3vw, 44px); border: 1.5px solid rgb(255 255 255 / .95); border-radius: 26px; background: linear-gradient(120deg, #f1ecff 0%, #faf9ff 40%, #fbfaff 60%, #efe9ff 100%); box-shadow: 0 24px 50px -36px rgb(90 50 220 / .45); }
.pm-cta-panel::before { content: ""; position: absolute; z-index: -1; left: -6%; bottom: -40%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgb(124 82 255 / .16), transparent 66%); }
.pm-cta-panel::after { content: ""; position: absolute; z-index: -1; right: -8%; top: -40%; width: 40%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgb(124 82 255 / .12), transparent 66%); }
.pm-cta-copy { text-align: center; }
.pm-cta-copy .kicker { color: var(--pm-purple); letter-spacing: .16em; }
.pm-cta-copy h2 { margin-top: 12px; color: var(--pm-ink); font-size: clamp(1.9rem, 3vw, 2.8rem); line-height: 1.08; letter-spacing: -.045em; }
.pm-cta-copy .lede { max-width: 54ch; margin: 14px auto 0; color: var(--pm-muted); font-size: clamp(.95rem, 1.15vw, 1.08rem); line-height: 1.55; }
.pm-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 24px; }
.pm-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; padding: 14px 30px; border-radius: 12px; font-weight: 650; font-size: 1.02rem; text-decoration: none; transition: transform 260ms cubic-bezier(.34, 1.56, .64, 1), box-shadow 260ms; }
.pm-btn svg { width: 20px; height: 20px; transition: transform 260ms; }
.pm-btn--primary { color: #fff; background: linear-gradient(135deg, #6a26ff, #4a0fe0); box-shadow: 0 14px 26px -12px #5b16f2; }
.pm-btn--primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .35) 50%, transparent 70%); transform: translateX(-120%); }
.pm-btn--ghost { color: var(--pm-ink); background: #fff; border: 1px solid #dcd8ec; }
.pm-btn:hover { transform: translateY(-3px); }
.pm-btn--primary:hover { box-shadow: 0 20px 32px -12px #5b16f2; }
.pm-btn:hover svg { transform: translateX(4px); }
.pm-btn:focus-visible { outline: 3px solid #7350ed; outline-offset: 3px; }

.pm-cta-art { position: relative; height: 240px; }
.pm-cta-art > * { position: absolute; }
.pm-win-back { left: 4%; top: 6%; width: 46%; height: 86%; padding: 16px 0 0 14px; border-radius: 16px; background: #fff; transform: rotate(-10deg); box-shadow: 0 20px 30px -18px rgb(90 50 220 / .45); }
.pm-win-back span { display: grid; gap: 14px; color: #8b7ad8; }
.pm-win-back svg { width: 20px; height: 20px; }
.pm-win-back svg:first-child { padding: 4px; width: 28px; height: 28px; border-radius: 50%; color: var(--pm-purple); background: #efe9ff; }
.pm-win-front { left: 28%; top: 14%; width: 62%; height: 80%; padding: 18px 16px; border-radius: 18px; background: #fff; transform: rotate(-10deg); box-shadow: 0 26px 36px -20px rgb(90 50 220 / .55); }
.pm-win-front .pm-win-title { display: flex; align-items: center; gap: 8px; color: var(--pm-ink); font-size: 15px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; }
.pm-win-front .pm-win-title .pm-av { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #fff 0 22%, transparent 23%), radial-gradient(ellipse at 50% 100%, #fff 0 38%, transparent 39%), linear-gradient(145deg, var(--pm-blue-2), var(--pm-blue)); }
.pm-win-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.pm-win-row b { flex: none; width: 20px; height: 20px; border-radius: 50%; background: #efeff6; }
.pm-win-row i { flex: 1; height: 7px; border-radius: 6px; background: #ececf6; }
.pm-win-row:nth-of-type(2) i { background: #e3dcff; }
.pm-swoosh { left: -6%; bottom: 8%; width: 60%; height: 50%; }
.pm-swoosh path { fill: none; stroke: #9b84f5; stroke-width: 2; opacity: .55; }

.pm-ticks { position: relative; display: grid; gap: 14px; justify-items: end; padding-left: 50px; }
.pm-tick { display: flex; align-items: center; gap: 12px; width: min(100%, 250px); padding: 12px 16px; border: 1px solid #ece8fb; border-radius: 14px; color: var(--pm-ink); background: #fff; font-size: .98rem; font-weight: 550; white-space: nowrap; box-shadow: 0 14px 24px -18px rgb(90 50 220 / .45); }
.pm-tick:nth-child(1) { rotate: 4deg; } .pm-tick:nth-child(2) { rotate: 3deg; margin-right: 6px; } .pm-tick:nth-child(3) { rotate: 2deg; margin-right: 12px; }
.pm-tick svg { flex: none; width: 24px; height: 24px; color: var(--pm-green); }
.pm-arrow-draw { position: absolute; left: -10px; bottom: -34px; width: 110px; height: 90px; color: #9b84f5; overflow: visible; }
.pm-arrow-draw path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Motion (restrained) ---- */
[data-pm-section]:not([data-pm-visible="true"]) :is(.pm-head > div > *, .pm-card, .pm-cta-copy > *, .pm-cta-art > *, .pm-tick) { opacity: 0; }
[data-pm-visible="true"] .pm-head > div > * { animation: pm-up 700ms cubic-bezier(.22, 1, .36, 1) calc(var(--d, 0) * 90ms) both; }
[data-pm-visible="true"] .pm-card { animation: pm-up 700ms cubic-bezier(.22, 1, .36, 1) calc(250ms + var(--i) * 110ms) both; }
[data-pm-visible="true"] .pm-ui { animation: pm-up 600ms ease calc(550ms + var(--i) * 110ms) both; }
[data-pm-visible="true"] :is(.pm-ui-row, .pm-ui-foot) { animation: pm-fade 450ms ease calc(800ms + var(--r) * 100ms) both; }
[data-pm-visible="true"] .pm-cta-copy > * { animation: pm-up 700ms cubic-bezier(.22, 1, .36, 1) calc(150ms + var(--d, 0) * 100ms) both; }
[data-pm-visible="true"] .pm-win-back { animation: pm-slide-r 800ms cubic-bezier(.22, 1, .36, 1) 200ms both, pm-bob 6s ease-in-out 1.4s infinite; }
[data-pm-visible="true"] .pm-win-front { animation: pm-slide-r 800ms cubic-bezier(.22, 1, .36, 1) 350ms both, pm-bob-alt 5.4s ease-in-out 1.6s infinite; }
[data-pm-visible="true"] .pm-win-row { animation: pm-left 500ms ease calc(900ms + var(--r) * 140ms) both; }
[data-pm-visible="true"] .pm-swoosh { animation: pm-up 900ms ease 300ms both; }
[data-pm-visible="true"] .pm-tick { animation: pm-slide-l 650ms cubic-bezier(.34, 1.3, .64, 1) calc(500ms + var(--r) * 160ms) both; }
[data-pm-visible="true"] .pm-tick svg { animation: pm-pop 450ms cubic-bezier(.34, 1.56, .64, 1) calc(800ms + var(--r) * 160ms) both; }
[data-pm-visible="true"] .pm-arrow-draw path { stroke-dasharray: 220; animation: pm-draw 1.2s ease 1.2s both; }
[data-pm-visible="true"] .pm-btn--primary::after { animation: pm-btn-shine 3.6s ease-in-out 1.6s infinite; }

@keyframes pm-up { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes pm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pm-left { from { opacity: 0; translate: -8px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes pm-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes pm-flow { to { stroke-dashoffset: -16; } }
@keyframes pm-slide-r { from { opacity: 0; translate: -40px 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes pm-slide-l { from { opacity: 0; translate: 40px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes pm-pop { from { opacity: 0; scale: .5; } to { opacity: 1; scale: 1; } }
@keyframes pm-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes pm-bob-alt { 0%, 100% { translate: 0 0; } 50% { translate: 0 5px; } }
@keyframes pm-draw { from { stroke-dashoffset: 220; } to { stroke-dashoffset: 0; } }
@keyframes pm-btn-shine { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* Responsive */
@media (max-width: 1280px) { .pm-cta-panel { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } .pm-cta-art { display: none; } .pm-ticks { padding-left: 0; } .pm-arrow-draw { display: none; } }
@media (min-width: 1101px) and (max-width: 1399px) {
  .pm-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; }
  .pm-art { grid-column: 1; grid-row: 3; align-self: start; justify-self: stretch; width: auto; max-width: 300px; margin: 28px 0 0 10px; }
  .pm-more { grid-row: 4; }
}
@media (max-width: 1100px) {
  .pm-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .pm-card { min-height: 240px; padding: 24px; }
}
@media (max-width: 760px) {
  .pm-cta-panel { grid-template-columns: minmax(0, 1fr); }
  .pm-ticks { justify-items: center; }
  .pm-tick, .pm-tick:nth-child(n) { rotate: 0deg; margin-right: 0; }
  .pm-arrow-draw { display: none; }
}
@media (max-width: 600px) {
  .pm-section .wrap, .pm-cta .wrap { width: min(calc(100% - 32px), 520px); }
  .pm-head { margin-bottom: 20px; }
  .pm-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pm-card { padding: 20px 18px; border-radius: 18px; }
  .pm-card { min-height: 260px; column-gap: 12px; }
  .pm-art { margin-left: 6px; }
  .pm-folder-back { left: -5px; right: 8px; top: -10px; }
  .pm-ui { gap: 7px; padding: 9px 9px; font-size: 10px; } .pm-ui-tag { padding: 2px 5px; font-size: 9px; } .pm-ui-foot b { font-size: 12px; } .pm-ui-head { font-size: 11px; white-space: normal; } .pm-ui-row svg { display: none; }
  .pm-btn { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-section *, .pm-section *::before, .pm-section *::after, .pm-cta *, .pm-cta *::before, .pm-cta *::after { animation: none !important; transition: none !important; }
  [data-pm-section] :is(.pm-head > div > *, .pm-card, .pm-cta-copy > *, .pm-cta-art > *, .pm-tick) { opacity: 1 !important; }
}

/* Dark theme */
:root[data-theme='dark'] :is(.pm-section, .pm-cta) { --pm-ink: #eef1ff; --pm-muted: #a9b2c9; --pm-purple: #a888ff; --pm-surface: #1a1e36; --pm-line: #2b3052; --pm-bar: #282d4c; }
:root[data-theme='dark'] .pm-section { background: #0f1222; }
:root[data-theme='dark'] .pm-cta { background: #0f1222; }
:root[data-theme='dark'] .pm-card { --pm-tint: #1d1c3a; background: linear-gradient(160deg, #161a30 45%, var(--pm-tint)); }
:root[data-theme='dark'] .pm-card--blue { --pm-tint: #17223d; }
:root[data-theme='dark'] .pm-card--orange { --pm-tint: #2a2027; }
:root[data-theme='dark'] :is(.pm-more, .pm-btn--ghost) { background: #22264a; color: var(--pm-ink); border-color: #343a6a; }
:root[data-theme='dark'] .pm-ui { border-color: var(--pm-line); }
:root[data-theme='dark'] .pm-folder-back, :root[data-theme='dark'] .pm-folder-back::before { background: #2a2650; }
:root[data-theme='dark'] .pm-cta-panel { background: linear-gradient(120deg, #1a1838, #161a32 50%, #1d1a40); border-color: rgb(255 255 255 / .07); }
:root[data-theme='dark'] .pm-tick { background: #1c2040; border-color: #2e3260; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) :is(.pm-section, .pm-cta) { --pm-ink: #eef1ff; --pm-muted: #a9b2c9; --pm-purple: #a888ff; --pm-surface: #1a1e36; --pm-line: #2b3052; --pm-bar: #282d4c; }
  :root:not([data-theme]) .pm-section { background: #0f1222; }
  :root:not([data-theme]) .pm-cta { background: #0f1222; }
  :root:not([data-theme]) .pm-card { --pm-tint: #1d1c3a; background: linear-gradient(160deg, #161a30 45%, var(--pm-tint)); }
  :root:not([data-theme]) .pm-card--blue { --pm-tint: #17223d; }
  :root:not([data-theme]) .pm-card--orange { --pm-tint: #2a2027; }
  :root:not([data-theme]) :is(.pm-more, .pm-btn--ghost) { background: #22264a; color: var(--pm-ink); border-color: #343a6a; }
  :root:not([data-theme]) .pm-ui { border-color: var(--pm-line); }
  :root:not([data-theme]) .pm-folder-back, :root:not([data-theme]) .pm-folder-back::before { background: #2a2650; }
  :root:not([data-theme]) .pm-cta-panel { background: linear-gradient(120deg, #1a1838, #161a32 50%, #1d1a40); border-color: rgb(255 255 255 / .07); }
  :root:not([data-theme]) .pm-tick { background: #1c2040; border-color: #2e3260; }
}
