update doormilewings card image update
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { ScrollReveal } from "@/animations/Reveal";
|
||||
import { ScrollReveal, StaggerChildren } from "@/animations/Reveal";
|
||||
import styles from "./WingsHowItWorks.module.css";
|
||||
|
||||
const STEPS = [
|
||||
{
|
||||
label: "Local Pickup",
|
||||
desc: "Fast, on-demand first-mile logistics dispatched by electric vehicle.",
|
||||
icon: (
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d="M3 13h13l3 4h2v3H3z" />
|
||||
<circle cx="7" cy="20" r="1.6" />
|
||||
<circle cx="16" cy="20" r="1.6" />
|
||||
@@ -20,7 +21,7 @@ const STEPS = [
|
||||
label: "Airport Clearance",
|
||||
desc: "Automated screening, grouping, and rapid cross-docking at the hub.",
|
||||
icon: (
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z" />
|
||||
<path d="m9 12 2 2 4-4" />
|
||||
</svg>
|
||||
@@ -30,7 +31,7 @@ const STEPS = [
|
||||
label: "Air Transit",
|
||||
desc: "Optimized cargo flights bypass surface congestion on our regional fleet.",
|
||||
icon: (
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d="M22 12h-6l-4-9-2 1 3 8H5l-2-3-1.5.6L3 14l1.5 4.4L6 18l-2-3h8l3 8 2-1-3-8h6z" />
|
||||
</svg>
|
||||
),
|
||||
@@ -39,7 +40,7 @@ const STEPS = [
|
||||
label: "Destination Hub",
|
||||
desc: "Immediate de-consolidation and screening upon arrival.",
|
||||
icon: (
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round">
|
||||
<rect x="4" y="10" width="16" height="11" rx="1" />
|
||||
<path d="M9 21v-6h6v6M4 10 12 3l8 7" />
|
||||
</svg>
|
||||
@@ -49,7 +50,7 @@ const STEPS = [
|
||||
label: "EV Last-Mile",
|
||||
desc: "Zero-emission electric vehicles complete the final delivery.",
|
||||
icon: (
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d="M3 13h13l3 4h2v3H3z" />
|
||||
<circle cx="7" cy="20" r="1.6" />
|
||||
<circle cx="16" cy="20" r="1.6" />
|
||||
@@ -61,246 +62,63 @@ const STEPS = [
|
||||
|
||||
export default function WingsHowItWorks() {
|
||||
const [active, setActive] = useState(0);
|
||||
const fillPct = ((active + 1) / STEPS.length) * 100;
|
||||
|
||||
return (
|
||||
<>
|
||||
<style
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
.whw-section {
|
||||
background: #09090b;
|
||||
padding: var(--space-section-lg, 80px) clamp(20px, 5vw, 40px);
|
||||
}
|
||||
<section className={styles.section} id="wings-how-it-works">
|
||||
<div className={styles.sectionShell}>
|
||||
<div className={styles.headerRow}>
|
||||
<ScrollReveal delay={0.05} duration={0.75} yOffset={25} className={styles.header}>
|
||||
<div className={styles.eyebrow}>/ How It Works /</div>
|
||||
<h2 className={styles.title}>
|
||||
Pickup to
|
||||
<br />
|
||||
delivery, one
|
||||
<br />
|
||||
connected flow
|
||||
</h2>
|
||||
</ScrollReveal>
|
||||
|
||||
.whw-header {
|
||||
margin: 0 auto 56px auto;
|
||||
max-width: 720px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.whw-eyebrow {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 2px;
|
||||
text-transform: uppercase;
|
||||
color: #c8102e;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.whw-title {
|
||||
font-size: clamp(28px, 3.2vw, 46px) !important;
|
||||
font-weight: 800 !important;
|
||||
letter-spacing: -0.03em !important;
|
||||
line-height: 1.15 !important;
|
||||
text-transform: none !important;
|
||||
color: #ffffff !important;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.whw-inner {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.whw-track-wrap {
|
||||
position: relative;
|
||||
height: 4px;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border-radius: 2px;
|
||||
margin: 0 auto 44px auto;
|
||||
}
|
||||
|
||||
.whw-track-fill {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
background: #c8102e;
|
||||
box-shadow: 0 0 10px #c8102e;
|
||||
border-radius: 2px;
|
||||
transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.whw-nodes {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
}
|
||||
|
||||
.whw-node {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
background: #18181b;
|
||||
border: 2px solid rgba(255, 255, 255, 0.2);
|
||||
transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
|
||||
}
|
||||
|
||||
.whw-node.is-active {
|
||||
background: #c8102e;
|
||||
border-color: #ffffff;
|
||||
box-shadow: 0 0 10px #c8102e;
|
||||
}
|
||||
|
||||
.whw-steps {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.whw-step {
|
||||
min-width: 0;
|
||||
padding: 22px 18px;
|
||||
border-radius: 16px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
cursor: pointer;
|
||||
transition: border-color 0.35s ease, background-color 0.35s ease, transform 0.35s ease;
|
||||
}
|
||||
|
||||
.whw-step.is-active {
|
||||
border-color: rgba(200, 16, 46, 0.5);
|
||||
background: rgba(200, 16, 46, 0.06);
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
|
||||
.whw-step-num {
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 1px;
|
||||
color: rgba(255, 255, 255, 0.35);
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.whw-step.is-active .whw-step-num {
|
||||
color: #c8102e;
|
||||
}
|
||||
|
||||
.whw-step-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 10px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.whw-step.is-active .whw-step-icon {
|
||||
background: rgba(200, 16, 46, 0.15);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.whw-step-label {
|
||||
font-size: 15px !important;
|
||||
font-weight: 700 !important;
|
||||
line-height: 1.3 !important;
|
||||
text-transform: none !important;
|
||||
color: #ffffff !important;
|
||||
margin: 0 0 6px 0;
|
||||
}
|
||||
|
||||
.whw-step-desc {
|
||||
font-size: 12.5px;
|
||||
line-height: 1.5;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.whw-track-wrap { display: none; }
|
||||
|
||||
.whw-steps {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 16px;
|
||||
position: relative;
|
||||
padding-left: 28px;
|
||||
}
|
||||
|
||||
.whw-steps::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
top: 8px;
|
||||
bottom: 8px;
|
||||
width: 2px;
|
||||
border-radius: 2px;
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
|
||||
.whw-step {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.whw-step::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -27px;
|
||||
top: 24px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
background: #18181b;
|
||||
border: 2px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.whw-step.is-active::before {
|
||||
background: #c8102e;
|
||||
border-color: #ffffff;
|
||||
box-shadow: 0 0 10px rgba(200, 16, 46, 0.7);
|
||||
}
|
||||
}
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
|
||||
<section className="whw-section" id="wings-how-it-works">
|
||||
<ScrollReveal delay={0.05} duration={0.75} yOffset={25} className="whw-header">
|
||||
<div className="whw-eyebrow">/ How It Works /</div>
|
||||
<h2 className="whw-title">Pickup to delivery, one connected flow</h2>
|
||||
</ScrollReveal>
|
||||
|
||||
<ScrollReveal delay={0.1} duration={0.8} yOffset={30} className="whw-inner">
|
||||
<div className="whw-track-wrap" aria-hidden="true">
|
||||
<div className="whw-track-fill" style={{ width: `${fillPct}%` }} />
|
||||
<div className="whw-nodes">
|
||||
{STEPS.map((_, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className={`whw-node${i <= active ? " is-active" : ""}`}
|
||||
style={{ left: `${((i + 0.5) / STEPS.length) * 100}%` }}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
<div className={styles.progress} aria-hidden="true">
|
||||
<span className={styles.progressCount}>
|
||||
{String(active + 1).padStart(2, "0")} / {String(STEPS.length).padStart(2, "0")}
|
||||
</span>
|
||||
<span className={styles.progressTrack}>
|
||||
<span
|
||||
className={styles.progressFill}
|
||||
style={{ width: `${((active + 1) / STEPS.length) * 100}%` }}
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="whw-steps">
|
||||
{STEPS.map((step, i) => (
|
||||
<div
|
||||
key={step.label}
|
||||
className={`whw-step${i === active ? " is-active" : ""}`}
|
||||
onMouseEnter={() => setActive(i)}
|
||||
onClick={() => setActive(i)}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter" || e.key === " ") setActive(i);
|
||||
}}
|
||||
>
|
||||
<div className="whw-step-num">0{i + 1}</div>
|
||||
<div className="whw-step-icon" aria-hidden="true">{step.icon}</div>
|
||||
<h3 className="whw-step-label">{step.label}</h3>
|
||||
<p className="whw-step-desc">{step.desc}</p>
|
||||
<StaggerChildren stagger={0.06} duration={0.6} yOffset={24} className={styles.flow}>
|
||||
{STEPS.map((step, i) => (
|
||||
<div
|
||||
key={step.label}
|
||||
className={`${styles.step} ${i === active ? styles.stepActive : ""}`}
|
||||
onMouseEnter={() => setActive(i)}
|
||||
onClick={() => setActive(i)}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter" || e.key === " ") setActive(i);
|
||||
}}
|
||||
>
|
||||
<div className={styles.stepTop}>
|
||||
<span className={styles.stepNum}>{String(i + 1).padStart(2, "0")}</span>
|
||||
<span className={styles.stepTag}>
|
||||
<span className={styles.stepIcon} aria-hidden="true">{step.icon}</span>
|
||||
Step
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</ScrollReveal>
|
||||
</section>
|
||||
</>
|
||||
<div className={styles.stepBottom}>
|
||||
<h3 className={styles.stepTitle}>{step.label}</h3>
|
||||
<p className={styles.stepDesc}>{step.desc}</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</StaggerChildren>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user