=== ScalingHawk Smooth Scroll (Powered by Lenis) ===
Contributors: maslam0814
Tags: smooth scroll, animation, scroll, lenis
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Smooth scrolling for WordPress powered by the Lenis JavaScript library.

== Description ==

**ScalingHawk Smooth Scroll (Powered by Lenis)** replaces the default browser scrolling with a smooth, fluid, inertia-based scrolling experience powered by the [Lenis](https://lenis.dev/) scrolling engine.

This plugin enables smooth scrolling in WordPress using the Lenis JavaScript library. This plugin is not affiliated with or endorsed by the Lenis project.

= Key Features =

* **Smooth Inertia Scrolling** — Natural, frame-synced scroll animations
* **Smooth Anchor Links** — Automatically smooths all anchor navigation (#links)
* **Fixed Header Support** — Auto-detects sticky/fixed headers and offsets scroll targets
* **GSAP ScrollTrigger Compatibility** — Syncs with GSAP animations automatically
* **Scroll-to-Top Support** — Universal detection of scroll-to-top buttons across themes
* **Conflict Detection** — Warns about existing smooth scroll CSS or libraries
* **Accessibility** — Focus management after smooth scroll for keyboard/screen reader users
* **Dynamic Content** — Handles AJAX content, page builders, and lazy-loaded sections
* **Admin Settings** — Full control over scroll duration, smoothness, header offset, and more

= Universal Theme Compatibility =

Works with all WordPress themes including:

* Kadence
* Astra
* GeneratePress
* Flavor
* Flavor starter
* OceanWP
* Elementor-based themes
* Gutenberg block themes
* Custom themes
* Page builders (Elementor, WPBakery, Beaver Builder, Bricks)

= Performance =

* No jQuery dependency
* Single requestAnimationFrame loop
* Lightweight architecture (~12KB total)
* Defers to GSAP ticker when available (no double RAF)

== Installation ==

1. Upload the `scalinghawk-smooth-scroll` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **Settings → Smooth Scroll** to configure options.
4. That's it — smooth scrolling is now active.

== Frequently Asked Questions ==

= Does this plugin work with my theme? =

Yes. The plugin is designed to be completely theme-independent. It works with all standard WordPress themes and page builders.

= Will this conflict with GSAP animations? =

No. When GSAP and ScrollTrigger are detected on the page, the plugin automatically syncs the scroll position with ScrollTrigger and uses GSAP's ticker instead of its own animation loop.

= Can I disable smooth scrolling on mobile? =

Yes. Go to **Settings → Smooth Scroll → Mobile & Touch** and check "Disable on Mobile".

= My anchor links scroll behind the fixed header. How do I fix this? =

Go to **Settings → Smooth Scroll → Navigation & Anchors** and either:
- Set a manual "Fixed Header Offset" value in pixels, or
- Enable "Auto-Detect Header Height" to let the plugin detect your header automatically.

= What happens if another smooth scroll plugin is active? =

The plugin includes conflict detection. It will log a warning in the browser console and override conflicting CSS `scroll-behavior: smooth` rules.

= Can I use Lenis's `data-lenis-prevent` attribute? =

Yes. Add `data-lenis-prevent` to any element where you want to disable smooth scrolling (e.g., custom scrollable containers).

== Screenshots ==

1. Admin settings page — All settings
2. Admin settings page — General settings
3. Admin settings page — Scroll behaviour configuration
4. Admin settings page — Mobile & touch options
5. Admin settings page — Navigation & anchor settings

== Changelog ==

= 1.0.0 =
* Initial public release
* Smooth inertia scrolling powered by Lenis
* Smooth anchor navigation support
* Fixed and sticky header offset handling
* GSAP ScrollTrigger compatibility
* Mobile and touch device controls
* Accessibility-focused scroll behavior
* Dynamic content and AJAX compatibility
* Universal scroll-to-top button support
* Admin settings panel for customization
* Conflict detection for existing smooth scroll implementations