/**
 * SEO Master Agency — motion and effects.
 *
 * Front-end only: this file is never loaded into the editor, so nothing is
 * ever hidden from an author mid-edit.
 *
 * Everything here is opt-in through a class, and everything switches itself
 * off under prefers-reduced-motion. Animation that a visitor cannot turn off
 * is an accessibility failure, not a feature.
 *
 *   1.  Scroll reveal
 *   2.  Animated backgrounds (aurora, mesh, grid, noise, spotlight)
 *   3.  Text effects
 *   4.  Card and button interaction
 *   5.  Marquee
 *   6.  Counters
 *   7.  Carousel
 *   8.  Tabs
 *   9.  Timeline
 *  10.  SERP preview
 *  11.  ROI calculator
 *  12.  Compare slider
 *  13.  Filter grid
 *  14.  Reading progress + scroll-top
 *  15.  Theme toggle
 */

/* ------------------------------------------------------- 1. Scroll reveal */

/*
 * Reveal-on-scroll hides content until it is observed. That is only safe if it
 * cannot get stuck: if the observer never fires — a script error, an old
 * browser, an aggressive optimiser — the animation below reveals everything
 * after 2.5s regardless. Content must never be permanently invisible because
 * of a decorative effect.
 */
.smseo-js :where(.smseo-reveal, .smseo-stagger > *) {
	opacity: 0;
	transform: translate3d(0, 18px, 0);
	will-change: opacity, transform;
	animation: smseo-reveal-failsafe .01s linear 2.5s forwards;
}

@keyframes smseo-reveal-failsafe {
	to { opacity: 1; transform: none; filter: none; }
}

.smseo-js :where(.smseo-reveal, .smseo-stagger > *).is-revealed {
	opacity: 1;
	transform: none;
	transition:
		opacity .6s cubic-bezier(.22, 1, .36, 1),
		transform .7s cubic-bezier(.22, 1, .36, 1);
	transition-delay: var(--smseo-delay, 0ms);
}

/* Directional variants. */
.smseo-js .smseo-reveal--left { transform: translate3d(-24px, 0, 0); }
.smseo-js .smseo-reveal--right { transform: translate3d(24px, 0, 0); }
.smseo-js .smseo-reveal--scale { transform: scale(.96); }
.smseo-js .smseo-reveal--blur { filter: blur(6px); }
.smseo-js .smseo-reveal--blur.is-revealed { filter: none; transition: opacity .6s, transform .7s, filter .7s; }

/* ------------------------------------------- 2. Animated backgrounds */

/* Aurora: two slow-drifting radial fields. Cheap, GPU-friendly, no JS. */
.smseo-aurora { position: relative; isolation: isolate; overflow: hidden; }
.smseo-aurora > * { position: relative; z-index: 1; }
.smseo-aurora::before,
.smseo-aurora::after {
	content: "";
	position: absolute;
	z-index: 0;
	width: 70vw;
	height: 70vw;
	max-width: 900px;
	max-height: 900px;
	border-radius: 50%;
	filter: blur(60px);
	opacity: .85;
	pointer-events: none;
}
.smseo-aurora::before {
	top: -22%;
	right: -14%;
	background: radial-gradient(circle at 50% 50%, rgba(91, 139, 255, .85), rgba(91, 139, 255, .25) 42%, transparent 68%);
	animation: smseo-drift-a 22s ease-in-out infinite alternate;
}
.smseo-aurora::after {
	bottom: -30%;
	left: -16%;
	background: radial-gradient(circle at 50% 50%, rgba(0, 214, 155, .6), rgba(0, 214, 155, .18) 44%, transparent 70%);
	animation: smseo-drift-b 28s ease-in-out infinite alternate;
}

@keyframes smseo-drift-a {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(-8%, 8%, 0) scale(1.14); }
}
@keyframes smseo-drift-b {
	from { transform: translate3d(0, 0, 0) scale(1.06); }
	to   { transform: translate3d(9%, -7%, 0) scale(.94); }
}

/* Engineering grid. */
.smseo-grid-bg { position: relative; isolation: isolate; }
.smseo-grid-bg > * { position: relative; z-index: 1; }
.smseo-grid-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image:
		linear-gradient(to right, rgba(255, 255, 255, .09) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, .09) 1px, transparent 1px);
	background-size: 58px 58px;
	mask-image: radial-gradient(ellipse 75% 60% at 50% 40%, #000 55%, transparent 100%);
	pointer-events: none;
}
.smseo-grid-bg--light::before {
	background-image:
		linear-gradient(to right, rgba(10, 16, 32, .06) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(10, 16, 32, .06) 1px, transparent 1px);
}

/* Fine noise, to stop large gradients banding. */
.smseo-noise { position: relative; isolation: isolate; }
.smseo-noise > * { position: relative; z-index: 1; }
.smseo-noise::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	opacity: .5;
	pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

/* Pointer spotlight — a subtle glow that follows the cursor over a section. */
.smseo-spotlight { position: relative; isolation: isolate; }
.smseo-spotlight > * { position: relative; z-index: 1; }
.smseo-spotlight::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	opacity: 0;
	transition: opacity .35s ease;
	pointer-events: none;
	background: radial-gradient(
		420px circle at var(--smseo-mx, 50%) var(--smseo-my, 50%),
		rgba(91, 139, 255, .16),
		transparent 70%
	);
}
.smseo-spotlight:hover::before { opacity: 1; }

/* ------------------------------------------------------- 3. Text effects */

.smseo-gradient-text {
	background: linear-gradient(96deg, #ffffff 8%, #a9c2ff 52%, #25d69b 96%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}
.smseo-gradient-text--ink {
	background: linear-gradient(96deg, var(--wp--preset--color--contrast) 10%, var(--wp--preset--color--primary) 60%, var(--wp--preset--color--accent) 100%);
}

/* A pill that reads as a live status chip. */
.smseo-chip {
	display: inline-flex;
	align-items: center;
	gap: .55em;
	padding: .45em .95em;
	border-radius: var(--wp--custom--radius--pill);
	background: rgba(255, 255, 255, .07);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
	font-family: var(--wp--preset--font-family--display);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .01em;
	backdrop-filter: blur(6px);
}
.smseo-chip--light {
	background: var(--wp--preset--color--primary-3);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--primary) 22%, transparent);
	color: var(--wp--preset--color--primary-2);
}
.smseo-chip__dot {
	width: .5em;
	height: .5em;
	border-radius: 50%;
	background: #25d69b;
	box-shadow: 0 0 0 0 rgba(37, 214, 155, .7);
	animation: smseo-pulse 2.4s ease-out infinite;
}
@keyframes smseo-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(37, 214, 155, .6); }
	70%  { box-shadow: 0 0 0 .55em rgba(37, 214, 155, 0); }
	100% { box-shadow: 0 0 0 0 rgba(37, 214, 155, 0); }
}

/* --------------------------------------------- 4. Cards and buttons */

/* Gradient hairline border that lights up on hover. */
.smseo-glass {
	position: relative;
	border-radius: var(--wp--custom--radius--lg);
	background: rgba(255, 255, 255, .045);
	backdrop-filter: blur(10px);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
	transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease, background .3s ease;
}
.smseo-glass:hover {
	transform: translateY(-3px);
	background: rgba(255, 255, 255, .07);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 18px 40px rgba(0, 0, 0, .28);
}

.smseo-lift { transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease, border-color .3s ease; }
.smseo-lift:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--xl);
	border-color: color-mix(in srgb, var(--wp--preset--color--primary) 35%, var(--wp--preset--color--contrast-3)) !important;
}

/* Gradient ring card. */
.smseo-ring {
	position: relative;
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--base);
}
.smseo-ring::before {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(140deg, color-mix(in srgb, var(--wp--preset--color--primary) 55%, transparent), transparent 42%, color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: .55;
	transition: opacity .3s ease;
	pointer-events: none;
}
.smseo-ring:hover::before { opacity: 1; }

/* Sheen sweep across a primary button. */
.wp-block-button__link {
	position: relative;
	overflow: hidden;
	transition: transform .18s ease, background-color .18s ease, box-shadow .25s ease;
}
.wp-block-button__link::before {
	content: "";
	position: absolute;
	top: 0;
	left: -120%;
	width: 70%;
	height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
	transform: skewX(-18deg);
	pointer-events: none;
}
.wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button__link:hover::before { animation: smseo-sheen .75s ease; }
@keyframes smseo-sheen {
	to { left: 140%; }
}

/* ------------------------------------------------------------ 5. Marquee */

.smseo-marquee {
	position: relative;
	overflow: hidden;
	mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
	-webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.smseo-marquee__track {
	display: flex;
	align-items: center;
	gap: clamp(2rem, 5vw, 4.5rem);
	width: max-content;
	animation: smseo-marquee var(--smseo-marquee-duration, 34s) linear infinite;
}
.smseo-marquee:hover .smseo-marquee__track { animation-play-state: paused; }
.smseo-marquee--reverse .smseo-marquee__track { animation-direction: reverse; }
.smseo-marquee__item { flex: 0 0 auto; display: flex; align-items: center; }
.smseo-marquee__item img { max-height: 34px; width: auto; opacity: .6; transition: opacity .25s ease, filter .25s ease; filter: grayscale(1); }
.smseo-marquee__item:hover img { opacity: 1; filter: none; }
@keyframes smseo-marquee {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); }
}

/* ----------------------------------------------------------- 6. Counters */

.smseo-counter { display: grid; gap: .35rem; }
.smseo-counter__value {
	display: flex;
	align-items: baseline;
	gap: .06em;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.035em;
	font-variant-numeric: tabular-nums;
	margin: 0;
}
.smseo-counter__label { font-size: var(--wp--preset--font-size--small); font-weight: 600; margin: 0; line-height: 1.4; }
.smseo-counter__note { font-size: var(--wp--preset--font-size--x-small); opacity: .72; margin: 0; }
.smseo-counter--accent .smseo-counter__value { color: var(--wp--preset--color--primary); }
.smseo-counter--gradient .smseo-counter__value {
	background: linear-gradient(96deg, var(--wp--preset--color--primary), var(--wp--preset--color--accent));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* ---------------------------------------------------------- 7. Carousel */

.smseo-carousel { position: relative; }
.smseo-carousel__viewport {
	display: flex;
	gap: var(--wp--preset--spacing--40);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 4px;
}
.smseo-carousel__viewport::-webkit-scrollbar { display: none; }
.smseo-carousel__viewport > * {
	flex: 0 0 min(var(--smseo-slide, 380px), 86%);
	scroll-snap-align: start;
}
.smseo-carousel__nav {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: flex-end;
	margin-top: var(--wp--preset--spacing--40);
}
.smseo-carousel__btn {
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--wp--preset--color--contrast-3);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	font-size: 1.1rem;
	line-height: 1;
	transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.smseo-carousel__btn:hover:not(:disabled) { background: var(--wp--preset--color--surface); transform: translateY(-1px); }
.smseo-carousel__btn:disabled { opacity: .35; cursor: default; }
.smseo-carousel__dots { display: flex; gap: 7px; margin-right: auto; }
.smseo-carousel__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--contrast-3);
	cursor: pointer;
	transition: background .2s ease, width .2s ease;
}
.smseo-carousel__dot.is-active { background: var(--wp--preset--color--primary); width: 22px; border-radius: 4px; }

/* -------------------------------------------------------------- 8. Tabs */

.smseo-tabs__list {
	display: inline-flex;
	gap: 4px;
	padding: 5px;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--surface);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--contrast-3);
	margin-bottom: var(--wp--preset--spacing--50);
	flex-wrap: wrap;
}
.smseo-tabs__tab {
	appearance: none;
	border: 0;
	cursor: pointer;
	background: transparent;
	color: var(--wp--preset--color--contrast-2);
	padding: .6rem 1.2rem;
	border-radius: var(--wp--custom--radius--pill);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.smseo-tabs__tab[aria-selected="true"] {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	box-shadow: var(--wp--preset--shadow--sm);
}
.smseo-tabs__panel[hidden] { display: none; }
.smseo-tabs__panel { animation: smseo-fade-in .35s ease; }
@keyframes smseo-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- 9. Timeline */

.smseo-timeline { position: relative; display: grid; gap: var(--wp--preset--spacing--50); }
.smseo-timeline::before {
	content: "";
	position: absolute;
	left: 19px;
	top: 8px;
	bottom: 8px;
	width: 2px;
	background: var(--wp--preset--color--contrast-3);
}
.smseo-timeline__progress {
	position: absolute;
	left: 19px;
	top: 8px;
	width: 2px;
	height: 0;
	background: linear-gradient(to bottom, var(--wp--preset--color--primary), var(--wp--preset--color--accent));
	transition: height .9s cubic-bezier(.22, 1, .36, 1);
}
.smseo-timeline__item { position: relative; padding-left: 60px; }
.smseo-timeline__marker {
	position: absolute;
	left: 8px;
	top: 2px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--wp--preset--color--base);
	box-shadow: 0 0 0 2px var(--wp--preset--color--contrast-3);
	font-size: .6875rem;
	font-weight: 700;
	font-family: var(--wp--preset--font-family--display);
	color: var(--wp--preset--color--contrast-2);
	transition: box-shadow .3s ease, color .3s ease, background .3s ease;
}
.smseo-timeline__item.is-revealed .smseo-timeline__marker {
	background: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 4px var(--wp--preset--color--primary-3);
	color: #fff;
}
.smseo-timeline__kicker {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin: 0 0 4px;
}
.smseo-timeline__title { font-size: var(--wp--preset--font-size--large); margin: 0 0 6px; }
.smseo-timeline__body { margin: 0; color: var(--wp--preset--color--contrast-2); font-size: var(--wp--preset--font-size--small); line-height: 1.6; }

/* ----------------------------------------------------- 10. SERP preview */

.smseo-serp {
	border-radius: var(--wp--custom--radius--lg);
	background: #fff;
	box-shadow: 0 24px 70px rgba(5, 10, 25, .45), inset 0 0 0 1px rgba(10, 16, 32, .08);
	overflow: hidden;
	color: #202124;
	font-size: 13px;
	line-height: 1.45;
}
.smseo-serp__bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: #f1f3f4;
	border-bottom: 1px solid #e3e5e8;
}
.smseo-serp__dots { display: flex; gap: 5px; }
.smseo-serp__dots i { width: 9px; height: 9px; border-radius: 50%; background: #d7dade; display: block; }
.smseo-serp__query {
	flex: 1;
	background: #fff;
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 12px;
	color: #5f6368;
	border: 1px solid #e3e5e8;
	white-space: nowrap;
	overflow: hidden;
}
.smseo-serp__caret { display: inline-block; width: 1px; height: 12px; background: #1a73e8; vertical-align: -2px; animation: smseo-caret 1.1s steps(1) infinite; }
@keyframes smseo-caret { 50% { opacity: 0; } }
.smseo-serp__body { padding: 14px; display: grid; gap: 12px; }
.smseo-serp__ai {
	border: 1px solid #dbe3f7;
	background: linear-gradient(180deg, #f6f9ff, #fff);
	border-radius: 10px;
	padding: 10px 12px;
}
.smseo-serp__ai-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #1a73e8; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.smseo-serp__skeleton { height: 7px; border-radius: 4px; background: linear-gradient(90deg, #e8eaed 25%, #f4f5f7 50%, #e8eaed 75%); background-size: 200% 100%; animation: smseo-shimmer 1.6s linear infinite; }
@keyframes smseo-shimmer { to { background-position: -200% 0; } }
.smseo-serp__cite { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 11px; font-weight: 700; color: #0a1020; background: #e6f4ee; border-radius: 999px; padding: 3px 9px; }
.smseo-serp__result { display: grid; gap: 3px; transition: transform .55s cubic-bezier(.22, 1, .36, 1), opacity .4s ease; }
.smseo-serp__result--you { position: relative; padding: 8px 10px; margin: 0 -10px; border-radius: 8px; background: #eef4ff; box-shadow: inset 0 0 0 1px #d3e0fb; }
.smseo-serp__url { font-size: 11px; color: #5f6368; }
.smseo-serp__title { font-size: 14px; color: #1a0dab; font-weight: 500; }
.smseo-serp__desc { font-size: 12px; color: #4d5156; }
.smseo-serp__rank {
	position: absolute;
	top: 8px;
	right: 10px;
	font-size: 10px;
	font-weight: 800;
	color: #0a7a52;
	background: #d9f2e8;
	border-radius: 999px;
	padding: 2px 7px;
	font-variant-numeric: tabular-nums;
}
.smseo-serp__foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-top: 1px solid #e8eaed;
	background: #fafafa;
	font-size: 11px;
	color: #5f6368;
}

/* --------------------------------------------------- 11. ROI calculator */

.smseo-roi {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--xl);
	padding: clamp(22px, 4vw, 40px);
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--lg), inset 0 0 0 1px var(--wp--preset--color--contrast-3);
}
@media (min-width: 900px) { .smseo-roi { grid-template-columns: 1fr 1fr; align-items: start; } }
.smseo-roi__controls { display: grid; gap: var(--wp--preset--spacing--40); }
.smseo-roi__field { display: grid; gap: 8px; }
.smseo-roi__field label {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}
.smseo-roi__field output {
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--primary);
	font-weight: 700;
}
.smseo-roi__field input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 6px;
	border-radius: 99px;
	background: linear-gradient(to right, var(--wp--preset--color--primary) var(--smseo-fill, 40%), var(--wp--preset--color--surface-2) var(--smseo-fill, 40%));
	outline-offset: 4px;
}
.smseo-roi__field input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--md);
	cursor: grab;
}
.smseo-roi__field input[type="range"]::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--wp--preset--color--primary);
	cursor: grab;
}
.smseo-roi__field input[type="number"] {
	font: inherit;
	padding: 10px 12px;
	border: 1px solid var(--wp--preset--color--contrast-3);
	border-radius: var(--wp--custom--radius--md);
	width: 100%;
}
.smseo-roi__out {
	border-radius: var(--wp--custom--radius--lg);
	padding: clamp(18px, 3vw, 28px);
	background: var(--wp--preset--color--dark);
	color: #fff;
	display: grid;
	gap: 18px;
	align-content: start;
}
.smseo-roi__headline { display: grid; gap: 4px; }
.smseo-roi__big {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
	margin: 0;
	background: linear-gradient(96deg, #fff, #a9c2ff 60%, #25d69b);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.smseo-roi__caption { font-size: var(--wp--preset--font-size--x-small); color: #9aa8c4; margin: 0; }
.smseo-roi__rows { display: grid; gap: 10px; margin: 0; }
.smseo-roi__row { display: flex; justify-content: space-between; gap: 14px; font-size: var(--wp--preset--font-size--small); padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.smseo-roi__row span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.smseo-roi__row--total { border-bottom: 0; padding-bottom: 0; font-size: var(--wp--preset--font-size--medium); }
.smseo-roi__disclaimer { font-size: var(--wp--preset--font-size--x-small); color: #9aa8c4; margin: 0; line-height: 1.55; }
.smseo-roi__bars { display: flex; align-items: flex-end; gap: 6px; height: 72px; }
.smseo-roi__bar {
	flex: 1;
	border-radius: 4px 4px 0 0;
	background: linear-gradient(to top, rgba(91, 139, 255, .35), #5b8bff);
	transition: height .5s cubic-bezier(.22, 1, .36, 1);
	min-height: 3px;
}

/* ------------------------------------------------- 12. Compare slider */

.smseo-compare {
	position: relative;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--lg);
	user-select: none;
	touch-action: pan-y;
	line-height: 0;
}
.smseo-compare img { width: 100%; display: block; }
.smseo-compare__after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--smseo-pos, 50%)); }
.smseo-compare__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--smseo-pos, 50%);
	width: 2px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(10, 16, 32, .2);
	cursor: ew-resize;
}
.smseo-compare__grip {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	box-shadow: var(--wp--preset--shadow--lg);
	display: grid;
	place-items: center;
	font-size: 14px;
	color: var(--wp--preset--color--contrast);
}
.smseo-compare__label {
	position: absolute;
	top: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(7, 12, 24, .72);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	line-height: 1.6;
}
.smseo-compare__label--before { left: 12px; }
.smseo-compare__label--after { right: 12px; }

/* ----------------------------------------------------- 13. Filter grid */

.smseo-filter__bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--wp--preset--spacing--50); }
.smseo-filter__chip {
	appearance: none;
	cursor: pointer;
	border: 1px solid var(--wp--preset--color--contrast-3);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast-2);
	padding: .5rem 1rem;
	border-radius: var(--wp--custom--radius--pill);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	transition: all .2s ease;
}
.smseo-filter__chip:hover { border-color: var(--wp--preset--color--primary); color: var(--wp--preset--color--primary); }
.smseo-filter__chip[aria-pressed="true"] {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.smseo-filter__grid { display: grid; gap: var(--wp--preset--spacing--40); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.smseo-filter__item { transition: opacity .3s ease, transform .3s ease; }
.smseo-filter__item.is-hidden { display: none; }
.smseo-filter__empty { grid-column: 1 / -1; padding: 2rem; text-align: center; color: var(--wp--preset--color--contrast-2); }

/* ------------------------------------- 14. Reading progress, scroll top */

.smseo-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 200;
	background: transparent;
	pointer-events: none;
}
.smseo-progress__bar {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--accent));
	transition: width .1s linear;
}

.smseo-totop {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 98;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	border: 1px solid var(--wp--preset--color--contrast-3);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
	box-shadow: var(--wp--preset--shadow--lg);
}
.smseo-totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.has-smseo-mobile-bar .smseo-totop { bottom: 76px; }

/* ------------------------------------------------------ 15. Theme toggle */

.smseo-theme-toggle {
	appearance: none;
	cursor: pointer;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--wp--preset--color--contrast-3);
	background: transparent;
	color: var(--wp--preset--color--contrast);
	display: grid;
	place-items: center;
	transition: background .2s ease, transform .2s ease;
}
.smseo-theme-toggle:hover { background: var(--wp--preset--color--surface); transform: rotate(-12deg); }
.smseo-theme-toggle .smseo-theme-toggle__sun { display: none; }
[data-smseo-theme="dark"] .smseo-theme-toggle__sun { display: block; }
[data-smseo-theme="dark"] .smseo-theme-toggle__moon { display: none; }

/* --------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
	.smseo-js :where(.smseo-reveal, .smseo-stagger > *) {
		opacity: 1 !important;
		transform: none !important;
		filter: none !important;
		animation: none !important;
	}
	.smseo-aurora::before,
	.smseo-aurora::after,
	.smseo-marquee__track,
	.smseo-serp__caret,
	.smseo-serp__skeleton,
	.smseo-chip__dot { animation: none !important; }
	.smseo-marquee__track { transform: none !important; }
	.wp-block-button__link::before { display: none; }
	.smseo-lift:hover, .smseo-glass:hover, .wp-block-button__link:hover { transform: none; }
	.smseo-tabs__panel { animation: none; }
	.smseo-timeline__progress { transition: none; }
}

/* ------------------------------------------------------ 16. Dark mode */

/*
 * The toggle re-points the palette tokens rather than restyling components,
 * so anything built with theme colours follows automatically — including
 * blocks and sections an author adds later.
 */
:root[data-smseo-theme="dark"] {
	--wp--preset--color--base: #070c18;
	--wp--preset--color--surface: #0e1728;
	--wp--preset--color--surface-2: #16223c;
	--wp--preset--color--contrast: #f3f6fc;
	--wp--preset--color--contrast-2: #9aa8c4;
	--wp--preset--color--contrast-3: #243252;
	--wp--preset--color--primary: #5b8bff;
	--wp--preset--color--primary-2: #a9c2ff;
	--wp--preset--color--primary-3: #152242;
	--wp--preset--color--accent: #25d69b;
	--wp--preset--color--accent-2: #0f2b23;
	--wp--preset--color--signal: #ffbe3d;
	--wp--preset--color--dark: #f3f6fc;
	--wp--preset--color--dark-2: #e9eff9;
	--wp--preset--gradient--brand-soft: linear-gradient(135deg, #101b33 0%, #070c18 100%);
	--wp--preset--gradient--fade-up: linear-gradient(180deg, rgba(7, 12, 24, 0) 0%, #0e1728 100%);
	color-scheme: dark;
}

:root[data-smseo-theme="dark"] body { background: var(--wp--preset--color--base); }

/* Sections that opted into the light-on-dark treatment need their hard-coded
   inks flipped back, since the tokens under them have inverted. */
:root[data-smseo-theme="dark"] .smseo-footer,
:root[data-smseo-theme="dark"] .has-dark-background-color {
	background-color: #0e1728 !important;
	color: #f3f6fc !important;
}
:root[data-smseo-theme="dark"] .has-dark-background-color :where(h1, h2, h3, h4, p, li, cite) { color: inherit; }
:root[data-smseo-theme="dark"] .has-base-color { color: #f3f6fc !important; }
:root[data-smseo-theme="dark"] .smseo-serp { filter: none; }
:root[data-smseo-theme="dark"] .smseo-header {
	background: color-mix(in srgb, #070c18 92%, transparent);
	border-bottom-color: #243252;
}
:root[data-smseo-theme="dark"] .smseo-grid-bg--light::before {
	background-image:
		linear-gradient(to right, rgba(255, 255, 255, .055) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, .055) 1px, transparent 1px);
}
:root[data-smseo-theme="dark"] .smseo-gradient-text--ink {
	background: linear-gradient(96deg, #f3f6fc 10%, #88a9ff 60%, #25d69b 100%);
}
:root[data-smseo-theme="dark"] .smseo-chip--light {
	background: #152242;
	color: #a9c2ff;
	box-shadow: inset 0 0 0 1px #243252;
}

/* A dark-text logo disappears on a dark header. Inverting lightness while
   rotating hue keeps the brand colours roughly intact and the wordmark
   legible, whatever logo the site owner uploads. Set
   --smseo-logo-dark-filter: none on :root if your logo is already light. */
:root[data-smseo-theme="dark"] .smseo-header .custom-logo,
:root[data-smseo-theme="dark"] .smseo-header .wp-block-site-logo img {
	filter: var(--smseo-logo-dark-filter, invert(1) hue-rotate(180deg));
}
