File size: 3,504 Bytes
587459d
 
 
 
 
 
b50322f
 
587459d
 
 
cfaedfc
587459d
 
 
 
 
b50322f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
587459d
b50322f
587459d
b50322f
 
 
 
587459d
 
 
 
b50322f
 
587459d
 
 
 
cfaedfc
 
587459d
 
 
 
 
 
 
 
b50322f
 
587459d
 
 
 
cfaedfc
 
587459d
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
"use client";

import { useLanguage } from "@/components/LanguageContext";
import { ErrorBoundary } from "@/components/ui/error-boundary";
import MapContainer from "@/components/MapContainer";
import {
  DashboardPreviewMetrics,
  PlannedProviderRegions,
  RegionCount,
  StatsGrid,
} from "@/components/StatsDisplay";
import { ProductVisionNotice } from "@/components/ProductVisionNotice";

export function GatewayMeshSection() {
  const { t } = useLanguage();

  return (
    <section
      id="dashboard-preview"
      className="relative z-10 w-full max-w-7xl mx-auto px-4 md:px-6 py-24 overflow-hidden"
    >
      <div className="text-center space-y-5 mb-16 z-10 relative max-w-3xl mx-auto">
        <div className="inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-xs md:text-sm font-medium text-primary backdrop-blur-md shadow-lg font-mono tracking-widest uppercase">
          <span className="w-1.5 h-1.5 rounded-full bg-primary animate-pulse shadow-[0_0_8px_var(--primary-glow)]" />
          {t("dashboardBadge")}
        </div>
        <h2 className="text-4xl font-extrabold tracking-tight sm:text-5xl md:text-6xl text-foreground leading-tight">
          {t("dashboardTitle")}
        </h2>
        <p className="text-sm md:text-base text-muted-foreground leading-relaxed font-mono max-w-2xl mx-auto">
          {t("dashboardDesc")}
        </p>
        <p className="text-xs font-mono text-primary/80 uppercase tracking-widest">
          {t("dashboardSimulationNotice")}
        </p>
      </div>

      <ErrorBoundary>
        <div className="font-mono max-w-[min(100vw,1600px)] mx-auto relative overflow-hidden md:rounded-md flex flex-col md:block px-6 pt-4 md:pt-8">
          <div className="w-full max-w-[1600px] space-y-1.5 mx-auto mt-1 mb-12">
            <p className="text-center text-[11px] sm:text-xs font-mono text-muted-foreground/80 uppercase tracking-wide mb-8 max-w-xl mx-auto">
              {t("dashboardMeshSubbrand")}
            </p>

            {/* Mobile View */}
            <div className="flex flex-col min-[961px]:hidden">
              <section className="pb-6 w-full">
                <div className="flex flex-col gap-y-6">
                  <DashboardPreviewMetrics />
                  <PlannedProviderRegions />
                </div>
                <RegionCount />
              </section>

              <div className="w-full flex flex-col items-center pointer-events-none">
                <ProductVisionNotice />
                <MapContainer />
              </div>
            </div>

            {/* Desktop View */}
            <div className="relative hidden min-[961px]:flex flex-row max-lg:items-end lg:items-center lg:justify-between">
              <section className="lg:absolute lg:bottom-0 pb-6 w-fit z-10 relative">
                <div className="flex flex-col gap-y-8">
                  <DashboardPreviewMetrics />
                  <PlannedProviderRegions />
                </div>
                <RegionCount />
              </section>

              <div className="w-full h-full flex flex-col items-center pointer-events-none max-lg:scale-[1.5] max-lg:-translate-y-16 max-lg:translate-x-[-20%]">
                <ProductVisionNotice />
                <MapContainer />
              </div>
            </div>

            <section className="mt-8">
              <StatsGrid />
            </section>
          </div>
        </div>
      </ErrorBoundary>
    </section>
  );
}