/* WP Masquerade theme v2.2: illustrations, decorative backgrounds, micro-interactions (inc/visuals.php).
   All artwork is inline SVG (assets/illustrations/, decorative, aria-hidden): copies hidden on small
   screens are never downloaded. Motion is subtle and switched off with prefers-reduced-motion. */

/* ------------------------------------------------------------------ 1. Illustrations */
.wpi-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wpm-visual { display: block; pointer-events: none; user-select: none; }
.wpm-visual .wpi { display: block; width: 100%; height: auto; overflow: visible; }
.wpi .m { font-family: var(--mono); font-weight: 600; }
.wpi .s { font-family: var(--font); font-weight: 800; }
.wpi-fl { animation: wpi-float 7s ease-in-out infinite; transform-box: fill-box; }
.wpi-fl2 { animation-duration: 8.5s; animation-delay: -3s; }
.wpi-fl3 { animation-duration: 9.5s; animation-delay: -5s; }
@keyframes wpi-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Hero placement: right column of the sub-hero (pricing, comparison, feature pages). */
.sub-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 48px; align-items: center; }
.sub-hero-text { min-width: 0; }
.sub-hero.has-visual { padding-top: 40px; padding-bottom: 34px; }
.sub-hero-visual { width: 100%; max-width: 420px; justify-self: end; }
@media (max-width: 1180px) {
	.sub-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 32px; }
}
@media (max-width: 960px) {
	.sub-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 250px); gap: 24px; }
}
@media (max-width: 760px) {
	.sub-hero-grid { display: block; }
	.sub-hero-visual { display: none; }
	.sub-hero.has-visual { padding: 36px 0 32px; }
}

/* Keyed page layouts (page.php): reading column on the container's left edge (same edge as the
   sub-hero, no staircase) + right rail using the rest of the width. Under 1180px the rail follows the
   content as a grid of cards (illustration and table of contents hidden). */
.page-lead + .page-split, .page-lead + .container, .stats-strip + * { margin-top: 0; }
.page-split > .entry-content { min-width: 0; }
.page-rail { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 20px; align-items: start; }
.page-rail .rail-art-wrap, .page-rail .rail-toc { display: none; }
.page-rail:not(:has(.rail-item:not(.rail-art-wrap):not(.rail-toc))) { display: none; }
@media (min-width: 1180px) {
	.page-split { display: grid; grid-template-columns: minmax(0, var(--prose)) minmax(0, 1fr); gap: 0 48px; }
	.page-split.no-rail { display: block; }
	.page-rail { display: flex !important; flex-direction: column; gap: 22px; margin-top: 0; align-self: stretch; width: 100%; max-width: 380px; justify-self: end; }
	.page-rail .rail-art-wrap, .page-rail .rail-toc { display: block; }
	.page-rail .rail-item.is-last { position: sticky; top: 104px; }
	.admin-bar .page-rail .rail-item.is-last { top: 136px; }
}
.page-extras { margin-top: 48px; }

/* Float placement (features hub): beside the intro, wide blocks (card grid) clear it. */
.entry-content > .page-visual.is-float { display: none; }
@media (min-width: 1180px) {
	.entry-content > .page-visual.is-float { display: block; float: right; width: min(380px, calc(100% - var(--prose) - 48px)); max-width: none; margin: -8px 0 24px 48px; }
	.page-body.is-float .page-lead .entry-content > .alignwide, .page-body.is-float .page-lead .entry-content > .alignfull { clear: both; }
}

/* Rail components */
.rail-card, .flow { background: #fff; border: 1px solid var(--edge); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-sm); margin: 0; }
.rail-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #1559d6; margin: 0 0 6px; }
.rail-card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.rail-card-head .rail-kicker { margin-bottom: 5px; }
.rail-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #eaf2ff; color: var(--blue); flex: none; }
.rail-icon svg { width: 22px; height: 22px; }
.rail-icon.is-sm { width: 32px; height: 32px; border-radius: 9px; }
.rail-icon.is-sm svg { width: 17px; height: 17px; }
.rail-text { font-size: .92rem; color: #3a4d6e; line-height: 1.6; margin: 0 0 18px; }
.rail-actions { display: grid; gap: 10px; }
.rail-actions .text-link { justify-self: start; font-size: .9rem; margin-top: 4px; }
.rail-links ul { list-style: none; margin: 4px 0 14px; padding: 0; }
.rail-links li a { display: flex; gap: 12px; align-items: center; padding: 9px 0; color: var(--ink); text-decoration: none; font-weight: 650; font-size: .89rem; line-height: 1.35; border-bottom: 1px solid var(--line); }
.rail-links li a:hover { color: var(--blue); }
.rail-links li a:hover .rail-icon { background: #dce8ff; }
.rail-links .text-link { font-size: .9rem; }
.rail-card-dark { position: relative; overflow: hidden; background: radial-gradient(260px 160px at 100% 0%, rgba(64, 127, 253, .35), transparent 70%), linear-gradient(150deg, #1d3a72, #102449); border: 0; color: #fff; }
.rail-title { color: #fff; font-weight: 800; font-size: 1.08rem; line-height: 1.35; margin: 12px 0 18px; letter-spacing: -.01em; }
.rail-card-dark .btn-ghost { background: transparent; border-color: #8fb1f5; color: #fff; box-shadow: none; }
.rail-card-dark .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.rail-mask { display: block; line-height: 0; }
.rail-toc .toc { margin: 0; }
.rail-item, .rail-item > * { width: 100%; box-sizing: border-box; }

/* Diagrams (ordered steps with icon nodes and a dashed connector). */
.flow figcaption { margin-bottom: 14px; }
.flow ol { list-style: none; margin: 0; padding: 0; }
.flow li { position: relative; display: flex; gap: 14px; padding: 0 0 18px; }
.flow li:last-child { padding-bottom: 0; }
.flow li:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: repeating-linear-gradient(#bcd0f7 0 5px, transparent 5px 9px); }
.flow-node { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #eaf2ff; color: var(--blue); flex: none; }
.flow-node svg { width: 20px; height: 20px; }
.flow li.is-brand .flow-node { background: linear-gradient(135deg, #407ffd, #1765f4); color: #fff; box-shadow: 0 6px 14px rgba(23, 101, 244, .25); }
.flow li.is-muted .flow-node { background: #eef1f6; color: #5e6e88; }
.flow li.is-ok .flow-node { background: #dff6eb; color: var(--green-text); }
.flow-text { padding-top: 2px; min-width: 0; }
.flow-text strong { display: block; font-size: .92rem; color: var(--ink); line-height: 1.35; }
.flow-text span { display: block; font-size: .84rem; color: var(--muted); line-height: 1.5; margin-top: 3px; }

/* Proof strip (features hub): real figures only. */
.stats-strip { list-style: none; margin: 28px 0 52px; padding: 22px 26px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 22px;
	background: radial-gradient(400px 160px at 100% 0%, rgba(64, 127, 253, .12), transparent 70%), linear-gradient(120deg, #f4f8ff, #eef4ff); border: 1px solid var(--edge); border-radius: 18px; }
.stats-strip li { display: flex; gap: 13px; align-items: center; font-size: .88rem; color: #3a4d6e; line-height: 1.35; }
.stats-strip strong { display: block; font-size: 1.65rem; color: var(--ink); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stats-strip .rail-icon { background: #fff; box-shadow: var(--shadow-sm); }
@media (max-width: 960px) { .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stats-strip { grid-template-columns: 1fr; } }

/* Features hub: illustrated thumbnail on each card (replaces the icon tile). */
.wpm-card.has-thumb::before { display: none; }
.wpm-card.has-thumb { padding-top: 0; overflow: hidden; }
.card-thumb { margin: 0 -24px 18px; padding: 10px 8px 0; background: linear-gradient(165deg, #f6f9ff, #edf3ff); border-bottom: 1px solid var(--edge); }
.card-thumb .wpi-fl { animation: none; }
.wpm-grid > .wpm-card.has-thumb:hover .card-thumb .wpi { transform: scale(1.03); }
.card-thumb .wpi { transition: transform .3s ease; transform-origin: 50% 70%; }

/* Empty states (404, search without result, blog without article). */
.empty-art { width: 240px; max-width: 70%; margin: 0 auto 18px; }
.notfound .empty-art { width: 300px; margin-bottom: 8px; }

/* ------------------------------------------------------------------ 2. Decorative backgrounds */
/* Inner pages: soft glow + dotted field + mask pixels on the right of the sub-hero. */
.sub-hero { position: relative; isolation: isolate; overflow: hidden;
	background: radial-gradient(600px 260px at 88% -10%, rgba(64, 127, 253, .11), transparent 70%), linear-gradient(135deg, #f5f9ff, #fff); }
.sub-hero:not(.has-visual)::after {
	content: ""; position: absolute; z-index: -1; top: 26px; right: max(24px, calc(50% - 595px)); width: 230px; height: 150px;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Crect x='50' y='0' width='26' height='26' rx='4' fill='%23407ffd' opacity='.8'/%3E%3Crect x='16' y='24' width='20' height='20' rx='3.5' fill='%231765f4' opacity='.4'/%3E%3Crect x='46' y='46' width='16' height='16' rx='3' fill='%23407ffd' opacity='.6'/%3E%3Crect x='24' y='62' width='10' height='10' rx='2' fill='%231765f4' opacity='.3'/%3E%3C/svg%3E") right top / 80px 80px no-repeat,
		radial-gradient(#c5d6f3 1.3px, transparent 1.7px) 0 0 / 14px 14px;
	-webkit-mask: linear-gradient(90deg, transparent, #000 45%); mask: linear-gradient(90deg, transparent, #000 45%);
}
@media (max-width: 760px) { .sub-hero:not(.has-visual)::after { width: 120px; height: 90px; top: 14px; opacity: .6; } }

/* Home hero: glow and dotted field behind the dashboard mockup, mask pixels in the corner. */
.hero { position: relative; isolation: isolate; }
.hero::before {
	content: ""; position: absolute; z-index: -1; top: 34px; right: max(16px, calc(50% - 640px)); width: 300px; height: 200px;
	background: radial-gradient(#c5d6f3 1.3px, transparent 1.7px) 0 0 / 14px 14px;
	-webkit-mask: radial-gradient(closest-side, #000 40%, transparent); mask: radial-gradient(closest-side, #000 40%, transparent);
}
.hero::after {
	content: ""; position: absolute; z-index: -1; left: max(10px, calc(50% - 712px)); bottom: 40px; width: 64px; height: 64px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Crect x='50' y='0' width='26' height='26' rx='4' fill='%23407ffd' opacity='.55'/%3E%3Crect x='16' y='24' width='20' height='20' rx='3.5' fill='%231765f4' opacity='.3'/%3E%3Crect x='46' y='46' width='16' height='16' rx='3' fill='%23407ffd' opacity='.45'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hero-dashboard { isolation: isolate; }
.hero-dashboard::before {
	content: ""; position: absolute; z-index: -1; inset: -12% -8% -14% -10%;
	background: radial-gradient(closest-side, rgba(64, 127, 253, .2), rgba(64, 127, 253, .06) 60%, transparent);
	border-radius: 50%;
}

/* Tinted sections: two soft corner glows. */
.section-tint { background: radial-gradient(700px 320px at 0% 0%, rgba(64, 127, 253, .07), transparent 70%), radial-gradient(600px 300px at 100% 100%, rgba(23, 101, 244, .06), transparent 70%), #f7faff; }
.section-soft { background: radial-gradient(700px 320px at 100% 0%, rgba(255, 255, 255, .7), transparent 70%), linear-gradient(130deg, #f4f8ff, #eaf2ff); }

/* ------------------------------------------------------------------ 3. Icons in section labels */
.eyebrow::before {
	content: ""; flex: none; width: 13px; height: 13px; margin-right: 7px; background: currentColor;
	-webkit-mask: var(--eb) center / contain no-repeat; mask: var(--eb) center / contain no-repeat;
}
.eyebrow { --eb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='13' y='1' width='10' height='10' rx='2'/%3E%3Crect x='2' y='8' width='8' height='8' rx='1.6'/%3E%3Crect x='12' y='14' width='6' height='6' rx='1.2'/%3E%3Crect x='4' y='19' width='4' height='4' rx='1'/%3E%3C/svg%3E"); }
[aria-labelledby="hero-title"] .eyebrow { --eb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11z'/%3E%3C/svg%3E"); }
[aria-labelledby="features-title"] .eyebrow { --eb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9.5C2 5.5 6.5 4 9.5 5.3c1 .4 1.5.9 2.5.9s1.5-.5 2.5-.9C17.5 4 22 5.5 22 9.5c0 4.6-3.3 7.5-6.3 7.5-2.2 0-2.7-2-3.7-2s-1.5 2-3.7 2C5.3 17 2 14.1 2 9.5zM6 10.5c1.2-1.4 3-1.4 4 0M14 10.5c1.2-1.4 3-1.4 4 0'/%3E%3C/svg%3E"); }
[aria-labelledby="arch-title"] .eyebrow, [aria-labelledby="faq-title"] .eyebrow { --eb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 11a7 7 0 1 1-14 0 7 7 0 0 1 14 0zm3 10-4.3-4.3'/%3E%3C/svg%3E"); }
[aria-labelledby="steps-title"] .eyebrow, [aria-labelledby="soon-title"] .eyebrow { --eb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m13 2-9 12h7l-1 8 10-12h-7l0-8z'/%3E%3C/svg%3E"); }
[aria-labelledby="plans-title"] .eyebrow { --eb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4v16M3 8l4-4 4 4M17 20V4M13 16l4 4 4-4'/%3E%3C/svg%3E"); }
[aria-labelledby="pricing-title"] .eyebrow { --eb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15a4 4 0 1 1-8 0 4 4 0 0 1 8 0zM11 12l9-9M16 7l3 3M14 9l2 2'/%3E%3C/svg%3E"); }
[aria-labelledby="account-title"] .eyebrow { --eb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 8a4 4 0 1 1-8 0 4 4 0 0 1 8 0zM4 22c0-5 3-8 8-8s8 3 8 8'/%3E%3C/svg%3E"); }
[aria-labelledby="blog-title"] .eyebrow { --eb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20V3H6.5A2.5 2.5 0 0 0 4 5.5zM4 19.5A2.5 2.5 0 0 0 6.5 22H20'/%3E%3C/svg%3E"); }

/* ------------------------------------------------------------------ 4. Closing band and footer */
.closing-cta {
	position: relative; isolation: isolate; overflow: hidden; padding: 46px 0;
	background: radial-gradient(520px 260px at 8% -30%, rgba(255, 255, 255, .14), transparent 70%), linear-gradient(105deg, #0a4fd0, #1765f4);
}
/* Mask watermark on the darkest (left) side and white pixels on the top edge: text and buttons keep AA contrast. */
.cta-art { position: absolute; z-index: -1; left: -70px; top: 50%; width: 290px; height: auto; transform: translateY(-50%) rotate(-10deg); opacity: .07; }
.closing-cta::after {
	content: ""; position: absolute; z-index: -1; top: 0; right: max(20px, calc(50% - 640px)); width: 120px; height: 34px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 34' fill='%23fff'%3E%3Crect x='90' y='-6' width='22' height='22' rx='4' opacity='.22'/%3E%3Crect x='62' y='12' width='14' height='14' rx='3' opacity='.16'/%3E%3Crect x='30' y='2' width='9' height='9' rx='2' opacity='.14'/%3E%3C/svg%3E") center / contain no-repeat;
}
.site-footer { background: linear-gradient(180deg, #f7faff, #fff 160px); }
.footer-bottom { align-items: baseline; }
.footer-bottom .wpm-formats { flex: 1 1 100%; order: 3; margin: 2px 0 0; font-size: .76rem; line-height: 1.6; color: #5e6e88; }
.footer-bottom .wpm-formats span { font-weight: 650; margin-right: 4px; }
.footer-bottom .wpm-formats a { color: #4d5f7c; text-decoration: underline; text-decoration-color: #b8c6dc; text-underline-offset: 2px; white-space: nowrap; }
.footer-bottom .wpm-formats a:hover { color: var(--blue); text-decoration-color: currentColor; }

/* ------------------------------------------------------------------ 5. Micro-interactions */
.wpm-grid > .wpm-card { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.wpm-grid > .wpm-card:hover { border-color: #bfd2ff; box-shadow: var(--shadow); }
.wpm-ico::before, .feature-card .icon-tile { transition: transform .2s ease, background-color .2s ease; }
.wpm-grid > .wpm-card:hover.wpm-ico::before, .feature-card:hover .icon-tile { transform: translateY(-2px) scale(1.06); background-color: #dce8ff; }
.btn .icon-arrow, .text-link .icon-arrow { transition: transform .18s ease; }
.btn:hover .icon-arrow, .text-link:hover .icon-arrow { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
	.wpi-fl { animation: none !important; }
	.wpm-grid > .wpm-card:hover, .wpm-grid > .wpm-card:hover.wpm-ico::before, .feature-card:hover .icon-tile, .btn:hover .icon-arrow, .text-link:hover .icon-arrow { transform: none; }
}
@media (max-width: 1399px) { .hero::after { display: none; } }
@media print {
	.wpm-visual, .page-rail, .cta-art { display: none !important; }
}

/* Phones: lighter decoration, shorter card thumbnails. */
@media (max-width: 650px) {
	.sub-hero:not(.has-visual)::after { display: none; }
	.card-thumb .wpi { max-height: 170px; width: auto; max-width: 100%; margin: 0 auto; }
}
