/* OpenHero source by Cristian Olivera Chávez. MIT License Copyright (c) 2026 Cristian Olivera Chávez Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ "use client"; import { Icon } from "@iconify/react"; import { useEffect, useMemo, useRef, useState } from "react"; type TabId = "wind-stance" | "water-stance" | "sun-stance"; export default function Page() { const [scrolled, setScrolled] = useState(false); const [activeTab, setActiveTab] = useState("wind-stance"); const [revealed, setRevealed] = useState>(new Set()); const videoRef = useRef(null); const revealRefs = useRef>([]); const leaves = useMemo(() => { return Array.from({ length: 40 }, (_, i) => { const size = 10 + ((i * 7) % 16); const left = (i * 13.7) % 100; const bottom = (i * 9.2) % 100; const duration = 5 + (i % 7) * 0.7; const delay = -(i % 10) * 1.3; const rot = (i * 37) % 360; return { size, left, bottom, duration, delay, rot, i }; }); }, []); useEffect(() => { const onScroll = () => { const y = window.scrollY; setScrolled(y > 80); const progress = Math.min(Math.max(y / window.innerHeight, 0), 1); if (videoRef.current) { videoRef.current.style.transform = `scale(${1.02 + progress * 0.12}) translateY(${progress * 50}px)`; } }; onScroll(); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); useEffect(() => { const observer = new IntersectionObserver( (entries) => { setRevealed((prev) => { const next = new Set(prev); entries.forEach((entry) => { if (entry.isIntersecting) { const id = entry.target.getAttribute("data-reveal-id"); if (id) next.add(id); observer.unobserve(entry.target); } }); return next; }); }, { threshold: 0.15, rootMargin: "0px 0px -40px 0px" } ); revealRefs.current.forEach((el) => { if (el) observer.observe(el); }); return () => observer.disconnect(); }, []); const setRevealRef = (el: HTMLElement | null, index: number) => { revealRefs.current[index] = el; }; const revealClass = (id: string) => (revealed.has(id) ? "scroll-reveal active" : "scroll-reveal"); return (
{leaves.map((leaf) => (
))}

Where the storm
Meets the blade.

Embrace the quiet fury of nature. Stand upon the precipice of legend, where swirling verdant leaves carry the ancient whispers of guardians past.

setRevealRef(el, 0)} data-reveal-id="chronicles-left" className={`${revealClass("chronicles-left")} space-y-6 lg:col-span-5`} > Ancient Pathways

The world breathes in perfect harmony.

To walk the path of the gale is to realize that the sword is not merely a weapon of steel, but an extension of the wind. Every rustle of the forest and every ripple across the summit lake dictates the rhythm of the warrior's soul.

"The wind does not break the tree that bends. It sweeps away the shadow of doubt."

{[ { key: "gale", icon: "ph:wind-bold", bg: "bg-emerald-400/10", color: "text-emerald-400", title: "Gale Ascension", body: "Harness dynamic atmospheric pressure to elevate agility and outpace opponents through shifting wind streams.", }, { key: "mirror", icon: "ph:waves-bold", bg: "bg-sky-400/10", color: "text-sky-400", title: "Mirror Reflection", body: "Attune inner focus to the pristine tranquility of alpine lake surfaces, neutralizing aggressive stances instantly.", }, { key: "sun", icon: "ph:sun-dim-bold", bg: "bg-amber-400/10", color: "text-amber-400", title: "Solar Radiance", body: "Strike precisely when gold light pierces cloud barriers, weaponizing blinding horizons to secure strategic dominance.", }, { key: "stone", icon: "ph:mountains-bold", bg: "bg-white/5", color: "text-white/80", title: "Stone Endurance", body: "Ground all focus deep into ancient tectonic roots, maintaining absolute defensive balance against violent assaults.", }, ].map((item, index) => (
setRevealRef(el, index + 1)} data-reveal-id={item.key} className={`${revealClass(item.key)} clan-border space-y-4 p-8`} style={{ transitionDelay: `${index * 100}ms` }} >

{item.title}

{item.body}

))}
setRevealRef(el, 5)} data-reveal-id="stances-title" className={`${revealClass("stances-title")} mx-auto mb-16 max-w-2xl text-center`} > Martial Philosophy

Stances of the Elements

{[ { id: "wind-stance", label: "Wind" }, { id: "water-stance", label: "Water" }, { id: "sun-stance", label: "Sun" }, ].map((tab) => ( ))}
{activeTab === "wind-stance" && (

The Zephyr Flow

A highly dynamic stance dedicated to deflecting incoming projectiles and piercing armored defenses. By synchronizing bodily movement with low-altitude wind drafts, the warrior flows effortlessly around threats, leaving glowing green leaf trails behind each rapid stride.

  • Increased evasion against long-range kinetic weaponry
  • Seamless counter-attacks initiated straight from side-steps
)} {activeTab === "water-stance" && (

The Torrent Surge

Fluid and relentless. Designed specifically to shatter the defensive shields of heavy combatants. Like water channeling down alpine valleys, this stance builds crushing forward momentum that cannot be blocked.

  • Heavy shield-breaking strike sequences
  • Multi-target continuous fluid strikes
)} {activeTab === "sun-stance" && (

The Solstice Flare

Uncompromising precision. Executed when the light angles flawlessly over the mountain horizon. It capitalizes on structural vulnerabilities, trading heavy movement for instantaneous lethal counters.

  • Critical strike multipliers against staggered foes
  • Blinding aura generation upon successful parries
)}
setRevealRef(el, 6)} data-reveal-id="landscapes-header" className={`${revealClass("landscapes-header")} mb-16 flex flex-col items-start justify-between gap-6 md:flex-row md:items-end`} >
Boundless Refuge

The Sacrificial Vistas

Witness the geographic realms where the elements congregate to test the limits of ancient steel.

{[ { key: "azure", tag: "The Lower Basin", title: "The Azure Veil", body: "A mirrors-edge lake suspended thousands of feet high, capturing mountain reflections and cooling heavy winds instantly.", image: "/resources/openhero/supporting-media/cb4bd6d8cf1a9d388072.jpg", color: "text-sky-400", }, { key: "crest", tag: "The Highest Peak", title: "Crest of Solitude", body: "Where sunlight punctures dense cloud mass, blinding uninvited guests and offering pristine clarity to master ronins.", image: "/resources/openhero/supporting-media/1e0b44e5204572cbbbf5.jpg", color: "text-amber-400", }, { key: "verdant", tag: "The Ancient Woods", title: "Verdant Vortex", body: "Deep foliage zones dominated by high-speed swirling currents, detaching thousands of emerald leaves simultaneously.", image: "/resources/openhero/supporting-media/751a05f812dcd8dc8184.jpg", color: "text-emerald-400", }, ].map((item, index) => (
setRevealRef(el, 7 + index)} data-reveal-id={item.key} className={`${revealClass(item.key)} group relative flex h-[450px] items-end overflow-hidden border border-white/5 bg-[#0b1316] p-8`} style={{ transitionDelay: `${index * 150}ms` }} >
{item.tag}

{item.title}

{item.body}

))}
{[ ["Blade Length", "73.4 cm"], ["Steel Composition", "Tamahagane / Folded 16x"], ["Hamon Pattern", "Midareba (Wild Wave)"], ["Total Mass", "1.18 kg"], ].map(([label, value]) => (
{label} {value}
))}
setRevealRef(el, 10)} data-reveal-id="armory-text" className={`${revealClass("armory-text")} order-1 space-y-6 lg:col-span-6 lg:order-2`} > Forged Immortality

Steel tempered within the vortex.

Every katana crafted under the Sushima lineage goes through arduous volcanic tempering, followed by high-altitude cooling exposures. This allows the edge to maintain absolute micro-alignment, splitting air molecules effortlessly as you dance along windward horizons.

setRevealRef(el, 11)} data-reveal-id="guild" className={`${revealClass("guild")} relative z-10 space-y-8`}>

Join the Wanderer's Guild

Receive direct dispatches regarding seasonal stances, landscape mappings, and legendary blade drops from our masters.

); }