54 lines
1.8 KiB
TypeScript
54 lines
1.8 KiB
TypeScript
"use client";
|
|
|
|
import { m, useReducedMotion } from "motion/react";
|
|
|
|
import { capabilities } from "@/lib/portfolio";
|
|
|
|
export function CapabilityRows() {
|
|
const shouldReduceMotion = useReducedMotion();
|
|
|
|
return (
|
|
<section
|
|
id="capabilities"
|
|
aria-labelledby="capabilities-heading"
|
|
className="mx-auto max-w-7xl px-6 py-28 text-blacksite-text sm:px-8 sm:py-36 lg:px-12"
|
|
>
|
|
<div className="mb-12">
|
|
<div>
|
|
<p className="section-label mb-3">CAPABILITIES /.04</p>
|
|
<h2
|
|
id="capabilities-heading"
|
|
className="font-display text-3xl font-semibold tracking-[-0.05em] text-blacksite-text sm:text-5xl"
|
|
>
|
|
Built for hostile constraints.
|
|
</h2>
|
|
</div>
|
|
</div>
|
|
|
|
<div className="border-t border-blacksite-line">
|
|
{capabilities.map((capability, index) => (
|
|
<m.div
|
|
key={capability.index}
|
|
className="grid gap-5 border-b border-blacksite-line py-6 sm:grid-cols-[1fr_auto] sm:items-center sm:py-8"
|
|
initial={shouldReduceMotion ? false : { opacity: 0, y: 14 }}
|
|
whileInView={{ opacity: 1, y: 0 }}
|
|
viewport={{ once: true, margin: "-12%" }}
|
|
transition={{
|
|
duration: shouldReduceMotion ? 0 : 0.45,
|
|
delay: shouldReduceMotion ? 0 : index * 0.07,
|
|
ease: "easeOut",
|
|
}}
|
|
>
|
|
<p className="font-display text-[clamp(28px,4.5vw,64px)] font-semibold leading-[0.95] tracking-[-0.06em] text-blacksite-text">
|
|
{capability.text}
|
|
</p>
|
|
<p className="section-label text-left text-signal-orange sm:text-right">
|
|
{capability.index}
|
|
</p>
|
|
</m.div>
|
|
))}
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|