/* Gen Core: decorations, icons and motion used by the section library. Only design tokens (theme.json presets and
   custom properties) are used, so every style variation re-skins them. No Tailwind. */

:root {
	--gen-tint: color-mix(in oklab, var(--wp--preset--color--primary) 9%, var(--wp--preset--color--base));
	--gen-tint-strong: color-mix(in oklab, var(--wp--preset--color--primary) 18%, var(--wp--preset--color--base));
	--gen-shadow-lg: 0 1px 2px hsl(220 10% 10% / 6%), 0 12px 32px -8px hsl(220 10% 10% / 18%);
	--gen-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Motion: elements start hidden only when JS runs and motion is allowed. */
.gen-js:not(.gen-motion-ready) .gen-reveal,
.gen-js:not(.gen-motion-ready) .gen-stagger > * { opacity: 0; }
.gen-motion-none .gen-reveal, .gen-motion-none .gen-stagger > * { opacity: 1 !important; }

/* Hover: cards lift, images zoom inside their frame. */
.gen-hover-lift { transition: transform .35s var(--gen-ease), box-shadow .35s var(--gen-ease); }
.gen-hover-lift:hover { transform: translateY(-4px); box-shadow: var(--gen-shadow-lg); }
.gen-hover-zoom { overflow: hidden; }
.gen-hover-zoom img { transition: transform .6s var(--gen-ease); }
.gen-hover-zoom:hover img { transform: scale(1.05); }
.wp-block-button__link { transition: transform .2s var(--gen-ease), box-shadow .2s, background-color .2s, color .2s; }
.wp-block-button__link:hover { transform: translateY(-1px); }

/* Pulsing ring around the main call button (emergency niches). */
.gen-pulse .wp-block-button__link { position: relative; }
.gen-pulse .wp-block-button__link::after {
	content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
	box-shadow: 0 0 0 0 color-mix(in oklab, var(--wp--preset--color--primary) 55%, transparent);
	animation: gen-pulse 2.2s infinite;
}
@keyframes gen-pulse { 70% { box-shadow: 0 0 0 14px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Marquee (logos, badges). */
.gen-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.gen-marquee__track { display: flex; gap: var(--wp--preset--spacing--large); width: max-content; animation: gen-marquee 40s linear infinite; align-items: center; }
.gen-marquee:hover .gen-marquee__track { animation-play-state: paused; }
.gen-marquee.is-static .gen-marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
.gen-marquee__track > * { margin: 0 !important; flex: none; }
@keyframes gen-marquee { to { transform: translateX(-50%); } }

/* Slider (Embla). Before JS: a horizontal scroll strip, so content stays reachable. */
.gen-slider:not(.is-ready) { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--wp--preset--spacing--medium); }
.gen-slider:not(.is-ready) > * { flex: 0 0 min(85%, 26rem); scroll-snap-align: start; margin: 0 !important; }
.gen-slider.is-ready { display: block !important; }
.gen-slider__viewport { overflow: hidden; }
.gen-slider__track { display: flex; gap: var(--wp--preset--spacing--medium); }
.gen-slider__slide { flex: 0 0 100%; min-width: 0; margin: 0 !important; }
@media (min-width: 700px) { .gen-slider.gen-slider-2 .gen-slider__slide { flex-basis: calc(50% - var(--wp--preset--spacing--medium) / 2); } }
@media (min-width: 1000px) { .gen-slider.gen-slider-3 .gen-slider__slide { flex-basis: calc(33.333% - var(--wp--preset--spacing--medium) * 2 / 3); } }
.gen-slider__nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: var(--wp--preset--spacing--medium); }
.gen-slider__prev, .gen-slider__next {
	width: 2.75rem; height: 2.75rem; border-radius: 999px; border: 1px solid var(--wp--preset--color--border-light);
	background: var(--wp--preset--color--base); color: var(--wp--preset--color--main); cursor: pointer; font-size: 1.1rem;
}
.gen-slider__prev::before { content: "←"; } .gen-slider__next::before { content: "→"; }
.gen-slider__prev:hover, .gen-slider__next:hover { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); border-color: transparent; }
.gen-slider__dots { display: flex; gap: .4rem; }
.gen-slider__dot { width: .55rem; height: .55rem; padding: 0; border: 0; border-radius: 999px; background: var(--wp--preset--color--border-dark); cursor: pointer; transition: width .3s var(--gen-ease); }
.gen-slider__dot.is-active { width: 1.6rem; background: var(--wp--preset--color--primary); }

/* ---------- Icons (Lucide, inlined on the front end in the brand colour). */
.is-style-gen-icon { margin: 0 !important; display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--wp--custom--radius--box, 8px); background: var(--gen-tint); color: var(--wp--preset--color--primary); flex: none; }
.is-style-gen-icon img, .is-style-gen-icon .gen-icon-svg { width: 1.5rem !important; height: 1.5rem !important; }
.is-style-gen-icon.gen-icon-round { border-radius: 999px; }
.is-style-gen-icon.gen-icon-lg { width: 4rem; height: 4rem; } .is-style-gen-icon.gen-icon-lg .gen-icon-svg, .is-style-gen-icon.gen-icon-lg img { width: 2rem !important; height: 2rem !important; }
.is-style-gen-icon.gen-icon-solid { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); }
.is-style-gen-icon.gen-icon-plain { background: none; width: auto; height: auto; }
.has-main-background-color .is-style-gen-icon:not(.gen-icon-solid), .has-primary-background-color .is-style-gen-icon:not(.gen-icon-solid) { background: color-mix(in oklab, currentColor 14%, transparent); color: inherit; }

/* ---------- Badges, eyebrows, chips, stars. */
.gen-badge { display: inline-flex !important; width: fit-content; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; background: var(--gen-tint); color: var(--wp--preset--color--primary); font-size: var(--wp--preset--font-size--x-small); font-weight: 600; }
.gen-badge.has-text-align-center, .has-text-align-center > .gen-badge { margin-inline: auto; }
.gen-badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 999px; background: currentColor; }
.gen-badge-live::before { animation: gen-blink 1.6s infinite; }
@keyframes gen-blink { 50% { opacity: .25; } }
.has-main-background-color .gen-badge, .wp-block-cover .gen-badge, .has-primary-background-color .gen-badge { background: color-mix(in oklab, currentColor 14%, transparent); color: inherit; }
.gen-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--wp--preset--color--border-light); background: var(--wp--preset--color--base); font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.gen-chip-check::before { content: "✓"; color: var(--wp--preset--color--primary); font-weight: 800; }
.gen-stars { color: #f5a524; letter-spacing: .12em; font-size: 1.05em; line-height: 1; }
.gen-stars::before { content: "★★★★★"; }
.gen-kicker-line { display: flex; align-items: center; gap: .75rem; }
.gen-kicker-line::before { content: ""; width: 2rem; height: 2px; background: currentColor; }
.gen-text-gradient { background: linear-gradient(100deg, var(--wp--preset--color--primary), var(--wp--preset--color--primary-alt)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gen-balance { text-wrap: balance; }

/* ---------- Backgrounds. */
.gen-bg-tint { background: var(--gen-tint); }
.gen-bg-glow { background:
	radial-gradient(60% 50% at 85% 0%, color-mix(in oklab, var(--wp--preset--color--primary) 16%, transparent), transparent 70%),
	radial-gradient(50% 40% at 0% 100%, color-mix(in oklab, var(--wp--preset--color--primary-alt) 14%, transparent), transparent 70%),
	var(--wp--preset--color--base); }
.gen-bg-dots { background-image: radial-gradient(color-mix(in oklab, var(--wp--preset--color--main) 14%, transparent) 1px, transparent 1px); background-size: 22px 22px; }
.gen-bg-grid { background-image: linear-gradient(color-mix(in oklab, var(--wp--preset--color--main) 7%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in oklab, var(--wp--preset--color--main) 7%, transparent) 1px, transparent 1px); background-size: 48px 48px; }
.gen-bg-gradient { background: linear-gradient(135deg, var(--wp--preset--color--primary), color-mix(in oklab, var(--wp--preset--color--primary) 55%, var(--wp--preset--color--main))); }
.gen-bg-split { background: linear-gradient(180deg, var(--wp--preset--color--tertiary) 55%, var(--wp--preset--color--base) 55%); }
.gen-bg-mesh { background:
	radial-gradient(40% 60% at 20% 20%, color-mix(in oklab, var(--wp--preset--color--primary) 35%, transparent), transparent 70%),
	radial-gradient(40% 60% at 80% 80%, color-mix(in oklab, var(--wp--preset--color--primary-alt) 30%, transparent), transparent 70%),
	var(--wp--preset--color--main); }

/* ---------- Media frames and stacks. */
.gen-frame { position: relative; isolation: isolate; }
.gen-frame::before { content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem; z-index: -1; border-radius: var(--wp--custom--radius--media, 8px); background: var(--gen-tint-strong); }
.gen-frame-dots::after { content: ""; position: absolute; width: 7rem; height: 7rem; left: -1.5rem; top: -1.5rem; z-index: -1; background-image: radial-gradient(var(--wp--preset--color--primary) 1.5px, transparent 1.5px); background-size: 14px 14px; opacity: .45; }
.gen-media-tall img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.gen-media-wide img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.gen-media-square img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.gen-media-fill, .gen-media-fill img { height: 100%; } .gen-media-fill img { object-fit: cover; width: 100%; }
.gen-shadow { box-shadow: var(--gen-shadow-lg); }
.gen-shadow img { box-shadow: var(--gen-shadow-lg); }

/* Stack: children overlap in one grid cell; .gen-float-* cards sit on the corners of the image. */
.gen-stack { display: grid !important; }
.gen-stack > * { grid-area: 1 / 1; margin: 0 !important; }
.gen-float { z-index: 2; width: fit-content; max-width: 80%; box-shadow: var(--gen-shadow-lg); }
.gen-float-bl { align-self: end; justify-self: start; margin: 0 0 -1.5rem -1rem !important; }
.gen-float-tr { align-self: start; justify-self: end; margin: -1.25rem -1rem 0 0 !important; }
.gen-float-br { align-self: end; justify-self: end; margin: 0 -1rem -1.5rem 0 !important; }
@media (max-width: 600px) { .gen-float-bl, .gen-float-tr, .gen-float-br { margin: 0 .75rem .75rem !important; } }

/* Overlap the previous section (stats bar under a hero, etc.). */
.gen-pull-up { margin-top: calc(var(--wp--preset--spacing--xx-large) * -1) !important; position: relative; z-index: 3; }

/* Avatars and initials. */
.gen-avatar img { width: 3rem !important; height: 3rem !important; border-radius: 999px; object-fit: cover; }
.gen-avatars { display: flex !important; }
.gen-avatars > * + * { margin-left: -.75rem !important; }
.gen-avatars img { border: 3px solid var(--wp--preset--color--base); }
.gen-initial { display: inline-grid !important; place-items: center; width: 3rem; height: 3rem; border-radius: 999px; background: var(--gen-tint-strong); color: var(--wp--preset--color--primary); font-weight: 700; margin: 0 !important; flex: none; }

/* Numbered steps: number in a circle, dashed connector on wide screens. */
.gen-step-num { display: inline-grid !important; place-items: center; width: 3rem; height: 3rem; border-radius: 999px; background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); font-weight: 700; margin: 0 !important; }
@media (min-width: 900px) {
	.gen-steps-line > * { position: relative; }
	.gen-steps-line > *:not(:last-child)::after { content: ""; position: absolute; top: 1.5rem; left: 4rem; right: -1rem; border-top: 2px dashed var(--wp--preset--color--border-dark); }
}
.gen-timeline > * { position: relative; padding-left: 4.25rem !important; }
.gen-timeline > * .gen-step-num { position: absolute; left: 0; top: 0; }
.gen-timeline > *:not(:last-child)::before { content: ""; position: absolute; left: 1.5rem; top: 3.25rem; bottom: -1.25rem; border-left: 2px dashed var(--wp--preset--color--border-dark); }

/* Big quote mark. */
.gen-quote-mark::before { content: "“"; display: block; font-size: 5rem; line-height: .7; color: var(--wp--preset--color--primary); font-family: Georgia, serif; }

/* Featured card (pricing, plans): brand border, ribbon. */
.gen-featured { outline: 2px solid var(--wp--preset--color--primary); outline-offset: -2px; position: relative; }
@media (min-width: 900px) { .gen-featured { transform: scale(1.04); z-index: 1; box-shadow: var(--gen-shadow-lg); } }
.gen-ribbon { position: absolute; top: 0; right: 1.25rem; transform: translateY(-50%); margin: 0 !important; }
.gen-ribbon { padding: .25rem .75rem; border-radius: 999px; background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); font-size: var(--wp--preset--font-size--x-small); font-weight: 700; }

/* Price list: name …… dotted leader …… price. */
.gen-price-row { display: flex !important; align-items: baseline; gap: .75rem; }
.gen-price-row > :first-child { flex: none; max-width: 70%; }
.gen-price-row::after { content: none; }
.gen-price-row > .gen-leader { flex: 1; border-bottom: 2px dotted var(--wp--preset--color--border-dark); min-width: 1rem; height: 0; margin: 0 !important; align-self: center; }
.gen-price-row > :last-child { flex: none; font-weight: 700; }

/* Before / after labels on photos. */
.gen-label { position: relative; }
.gen-label figcaption, .gen-label .wp-element-caption { position: absolute; top: .75rem; left: .75rem; margin: 0; padding: .2rem .6rem; border-radius: 999px; background: var(--wp--preset--color--main); color: var(--wp--preset--color--base); font-size: var(--wp--preset--font-size--x-small); font-weight: 700; }

/* Bento grid: first item spans two rows/cols on wide screens. */
@media (min-width: 900px) {
	.gen-bento { grid-template-columns: repeat(3, 1fr) !important; }
	.gen-bento > :first-child { grid-column: span 2; grid-row: span 2; }
}
.gen-mosaic { grid-template-columns: repeat(2, 1fr) !important; }
@media (min-width: 900px) {
	.gen-mosaic { grid-template-columns: repeat(4, 1fr) !important; grid-auto-rows: 14rem; }
	.gen-mosaic > :first-child { grid-column: span 2; grid-row: span 2; }
	.gen-mosaic > * img { height: 100%; object-fit: cover; width: 100%; }
}
.gen-mosaic > * { margin: 0 !important; }

/* Logos: grey until hovered. */
.gen-logos img { max-height: 2.5rem; width: auto !important; filter: grayscale(1); opacity: .6; transition: filter .3s, opacity .3s; }
.gen-logos img:hover { filter: none; opacity: 1; }

/* Map frame. */
.gen-map-frame iframe { display: block; width: 100%; min-height: 360px; height: 100%; border: 0; border-radius: var(--wp--custom--radius--media, 8px); }

/* Sticky aside (title column next to a long FAQ). */
@media (min-width: 900px) { .gen-sticky { position: sticky; top: 6rem; align-self: start; } }

/* Mobile call bar. */
.gen-callbar { display: none; }
@media (max-width: 781px) {
	.gen-callbar { display: flex !important; position: fixed; z-index: 50; left: .75rem; right: .75rem; bottom: .75rem; margin: 0 !important; box-shadow: var(--gen-shadow-lg); border-radius: 999px; }
	.gen-callbar .wp-block-button { flex: 1; } .gen-callbar .wp-block-button__link { width: 100%; }
}

/* Wireframe preview (gallery only): neutral greys, structure first. */
.gen-wireframe { --wp--preset--color--primary: #555; --wp--preset--color--primary-alt: #777; --wp--preset--color--primary-accent: #ddd; --wp--preset--color--main: #2a2a2a; --wp--preset--color--tertiary: #f1f1f1; --wp--preset--color--secondary: #6b6b6b; }
.gen-wireframe img:not(.gen-icon-svg) { filter: grayscale(1) contrast(.85); }

/* Lead form. */
.gen-lead-form { display: grid; gap: .9rem; }
.gen-lead-form p { margin: 0; }
.gen-lead-form label { display: grid; gap: .35rem; font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.gen-lead-form input, .gen-lead-form textarea { width: 100%; padding: .75rem .9rem; border: 1px solid var(--wp--preset--color--border-dark); border-radius: var(--wp--custom--radius--field, 6px); background: var(--wp--preset--color--base); color: var(--wp--preset--color--main); font: inherit; }
.gen-lead-form input:focus, .gen-lead-form textarea:focus { outline: 2px solid var(--wp--preset--color--primary); outline-offset: 1px; }
.gen-lead-form .wp-block-button__link { width: 100%; border: 0; cursor: pointer; }
.gen-hp { position: absolute !important; left: -9999px; }
.gen-lead-ok { padding: 1rem; border-radius: var(--wp--custom--radius--box, 8px); background: var(--gen-tint); font-weight: 600; }

/* Text colour set on a section (dark / brand backgrounds) wins over the global heading colour. */
.has-text-color :is(h1, h2, h3, h4, h5, h6, .wp-block-site-title) { color: inherit; }
.has-base-color a:not(.wp-element-button) { color: inherit; }
.has-base-color .wp-block-button.is-style-outline .wp-block-button__link { color: inherit; border-color: currentColor; }
:is(.has-base-color, .wp-block-cover) .gen-chip { background: color-mix(in oklab, currentColor 12%, transparent); border-color: color-mix(in oklab, currentColor 30%, transparent); color: inherit; }
.gen-shadow { box-shadow: var(--gen-shadow-lg) !important; }
.gen-nowrap { white-space: nowrap; }
.gen-text-gradient a { color: inherit; text-decoration: none; }
.gen-pulse .wp-block-button:not(:first-child) .wp-block-button__link::after { content: none; }
.gen-motion-none .gen-pulse .wp-block-button__link::after, .gen-motion-none .gen-marquee__track, .gen-motion-none .gen-badge-live::before { animation: none; }
@media (prefers-reduced-motion: reduce) { .gen-pulse .wp-block-button__link::after, .gen-marquee__track, .gen-badge-live::before { animation: none; } .gen-hover-lift:hover, .wp-block-button__link:hover { transform: none; } }
:is(.has-base-color, .wp-block-cover) .has-secondary-color { color: color-mix(in oklab, currentColor 72%, transparent) !important; }
@media (min-width: 782px) { .gen-zigzag > :nth-child(even) > .wp-block-columns, .gen-zigzag > .wp-block-columns:nth-child(even) { flex-direction: row-reverse; } }
.gen-bento > :first-child { justify-content: flex-end !important; }
@media (min-width: 900px) { .gen-bento > :first-child h3 { font-size: var(--wp--preset--font-size--x-large) !important; } }
.gen-marquee.is-static .gen-marquee__track > [aria-hidden="true"] { display: none; }
