// RepúblicaData — components

const { useState, useEffect, useRef } = React;

// ── tiny utilities ──────────────────────────────────────────────────────────

function useInView(opts = { threshold: 0.15, once: true }) {
  const ref = useRef(null);
  const [seen, setSeen] = useState(false);
  useEffect(() => {
    const el = ref.current;
    if (!el || seen) return;
    const io = new IntersectionObserver((entries) => {
      entries.forEach((e) => {
        if (e.isIntersecting) {
          setSeen(true);
          if (opts.once) io.disconnect();
        }
      });
    }, { threshold: opts.threshold || 0.15 });
    io.observe(el);
    return () => io.disconnect();
  }, [seen]);
  return [ref, seen];
}

// Animated number — counts up when in view
function CountUp({ value, prefix = "", suffix = "", decimals = 0, duration = 1600 }) {
  const [ref, seen] = useInView();
  const [v, setV] = useState(0);
  useEffect(() => {
    if (!seen) return;
    const start = performance.now();
    const tick = (t) => {
      const p = Math.min(1, (t - start) / duration);
      const eased = 1 - Math.pow(1 - p, 3);
      setV(value * eased);
      if (p < 1) requestAnimationFrame(tick);
    };
    requestAnimationFrame(tick);
  }, [seen, value, duration]);
  return (
    <span ref={ref}>
      {prefix}{v.toFixed(decimals)}{suffix}
    </span>
  );
}

// Live clock — Buenos Aires
function LiveClock() {
  const [now, setNow] = useState(() => new Date());
  useEffect(() => {
    const id = setInterval(() => setNow(new Date()), 1000);
    return () => clearInterval(id);
  }, []);
  const hh = String(now.getHours()).padStart(2, "0");
  const mm = String(now.getMinutes()).padStart(2, "0");
  const ss = String(now.getSeconds()).padStart(2, "0");
  return <span className="mono">{hh}:{mm}:{ss} <span className="dim">BA</span></span>;
}

// ── Top bar ─────────────────────────────────────────────────────────────────

function TopBar() {
  const C = window.COPY.hero;
  return (
    <header className="topbar">
      <div className="topbar-inner">
        <a href="#" className="brand" aria-label="RepúblicaData">
          <BrandMark />
          <span className="brand-word">República<em>Data</em></span>
        </a>
        <nav className="topnav">
          <a href="#servicios">Servicios</a>
          <a href="#stack">Tecnología</a>
          <a href="#metodo">Metodología</a>
          <a href="#contacto">Contacto</a>
        </nav>
        <div className="topbar-right">
          <a href="#contacto" className="btn-primary topbar-cta">
            <span>{C.cta}</span>
            <Arrow />
          </a>
        </div>
      </div>
    </header>
  );
}

function BrandMark() {
  // Simple, serious mark: monogram in a hairline circle
  return (
    <svg className="brand-mark" viewBox="0 0 32 32" aria-hidden="true">
      <circle cx="16" cy="16" r="15.4" fill="none" stroke="currentColor" strokeWidth="0.6" />
      <path d="M16 4 L16 28 M4 16 L28 16" stroke="currentColor" strokeWidth="0.4" opacity="0.35" />
      <text x="16" y="20.5" textAnchor="middle" fontFamily="var(--serif)" fontSize="13" fill="currentColor" fontStyle="italic">R</text>
    </svg>
  );
}

// ── Hero ────────────────────────────────────────────────────────────────────

function Hero({ accent }) {
  const C = window.COPY.hero;
  return (
    <section className="hero">
      <div className="hero-grid">
        <div className="hero-eyebrow">
          <span className="dot" /> {C.eyebrow}
        </div>

        <h1 className="hero-title">
          <span className="line">{C.titleA}</span>
          <span className="line">
            <span className="serif italic">{C.titleB}</span>
            <span className="hero-rule" aria-hidden="true" />
          </span>
          <span className="line">
            <span className="hero-pill">{C.titleC}</span>
            <span> {C.titleD}</span>
          </span>
        </h1>

        <div className="hero-bottom">
          <p className="hero-sub">{C.sub}</p>
          <div className="hero-ctas">
            <a href="#contacto" className="btn-primary">
              <span>{C.cta}</span>
              <Arrow />
            </a>
            <a href="#metodo" className="btn-ghost">{C.ctaSecondary}</a>
          </div>
        </div>

      </div>

      <Marquee />
    </section>
  );
}

function Arrow() {
  return (
    <svg width="14" height="10" viewBox="0 0 14 10" fill="none" aria-hidden="true">
      <path d="M0 5 H12 M8 1 L12 5 L8 9" stroke="currentColor" strokeWidth="1.2" />
    </svg>
  );
}

function HeroTicker({ accent }) {
  const data = window.HERO_TICKER;
  const [i, setI] = useState(0);
  useEffect(() => {
    const id = setInterval(() => setI((x) => (x + 1) % data.length), 2200);
    return () => clearInterval(id);
  }, []);
  const max = Math.max(...data.map((d) => Math.max(d.a, d.b)));
  return (
    <aside className="ticker">
      <div className="ticker-head">
        <span className="mono small dim">SIM · ATLAS / Live model</span>
        <span className="mono small live"><span className="live-dot" /> LIVE</span>
      </div>
      <div className="ticker-rows">
        {data.map((d, idx) => (
          <div key={d.region} className={"ticker-row " + (idx === i ? "is-active" : "")}>
            <div className="t-region">{d.region}</div>
            <div className="t-bars">
              <div className="t-bar t-a" style={{ width: (d.a / max * 100) + "%" }} />
              <div className="t-bar t-b" style={{ width: (d.b / max * 100) + "%", background: accent }} />
            </div>
            <div className="t-vals mono">
              <span>{d.a.toFixed(1)}</span>
              <span className="dim">/</span>
              <span>{d.b.toFixed(1)}</span>
              <span className={"t-delta " + (d.delta >= 0 ? "up" : "down")}>
                {d.delta >= 0 ? "▲" : "▼"} {Math.abs(d.delta).toFixed(1)}
              </span>
            </div>
          </div>
        ))}
      </div>
      <div className="ticker-foot mono small dim">
        Modelo de intención de voto · ventana móvil 7d · n = 12,481
      </div>
    </aside>
  );
}

function Marquee() {
  const items = window.COPY.marquee;
  return (
    <div className="marquee" aria-hidden="true">
      <div className="marquee-track">
        {[...items, ...items, ...items].map((t, i) => (
          <span key={i} className="marquee-item">
            <span className="diamond" /> {t}
          </span>
        ))}
      </div>
    </div>
  );
}

// ── Stats band ──────────────────────────────────────────────────────────────

function Stats() {
  const items = window.COPY.stats;
  return (
    <section className="manifesto">
      <ol className="manifesto-list">
        {items.map((p, i) => (
          <li key={i} className="manifesto-row">
            <span className="manifesto-num mono">{p.num}</span>
            <h3 className="manifesto-title">{p.title}</h3>
            <p className="manifesto-body">{p.body}</p>
          </li>
        ))}
      </ol>
    </section>
  );
}

// ── Section header ──────────────────────────────────────────────────────────

function SectionHead({ label, title, body, num }) {
  return (
    <header className="sec-head">
      <div className="sec-head-meta mono small">
        <span>{num}</span>
        <span className="dim">/</span>
        <span>{label}</span>
      </div>
      <h2 className="sec-title">{title}</h2>
      {body && <p className="sec-body">{body}</p>}
    </header>
  );
}

// ── Services ────────────────────────────────────────────────────────────────

function Services() {
  const intro = window.COPY.servicesIntro;
  const items = window.COPY.services;
  return (
    <section id="servicios" className="services">
      <SectionHead num="§ 01" label={intro.label} title={intro.title} body={intro.body} />
      <div className="svc-grid">
        {items.map((s, i) => (
          <article key={i} className="svc">
            <div className="svc-head">
              <span className="svc-n mono">{s.n}</span>
              <span className="svc-kicker mono small dim">{s.kicker}</span>
            </div>
            <h3 className="svc-title">{s.title}</h3>
            <ul className="svc-bullets">
              {s.bullets.map((b, j) => (
                <li key={j}><span className="bullet-dash" />{b}</li>
              ))}
            </ul>
          </article>
        ))}
      </div>
    </section>
  );
}

// ── Stack ───────────────────────────────────────────────────────────────────

function Stack({ accent }) {
  const intro = window.COPY.stackIntro;
  const items = window.COPY.stack;
  const [active, setActive] = useState(0);
  return (
    <section id="stack" className="stack">
      <SectionHead num="§ 02" label={intro.label} title={intro.title} body={intro.body} />
      <div className="stack-grid">
        <div className="stack-list" role="tablist">
          {items.map((s, i) => (
            <button key={s.code} role="tab" aria-selected={active === i}
              className={"stack-item " + (active === i ? "is-active" : "")}
              onMouseEnter={() => setActive(i)}
              onClick={() => setActive(i)}>
              <span className="stack-code mono">{String(i + 1).padStart(2, "0")}</span>
              <span className="stack-name">{s.name}</span>
              <span className="stack-id mono small dim">{s.code}</span>
              <span className="stack-arrow"><Arrow /></span>
            </button>
          ))}
        </div>
        <StackPreview item={items[active]} index={active} accent={accent} />
      </div>
    </section>
  );
}

function StackPreview({ item, index, accent }) {
  return (
    <div className="stack-preview" key={item.code}>
      <div className="sp-frame">
        <div className="sp-chrome mono small">
          <span className="sp-dot" /><span className="sp-dot" /><span className="sp-dot" />
          <span className="sp-path dim">republicadata://{item.code.toLowerCase()}.live</span>
          <span className="sp-clock"><LiveClock /></span>
        </div>
        <div className="sp-body">
          <StackVisual code={item.code} accent={accent} />
        </div>
      </div>
      <div className="sp-meta">
        <div className="sp-code mono small dim">{item.code} ·  módulo {String(index + 1).padStart(2, "0")} de 06</div>
        <h4 className="sp-name">{item.name}</h4>
        <p className="sp-desc">{item.desc}</p>
      </div>
    </div>
  );
}

// SVG-based visualizations for each module — abstract, never recreating real UIs
function StackVisual({ code, accent }) {
  if (code === "ATLAS") return <AtlasViz accent={accent} />;
  if (code === "ECO")    return <EcoViz accent={accent} />;
  if (code === "FORJA")  return <ForjaViz accent={accent} />;
  if (code === "PULSO")  return <PulsoViz accent={accent} />;
  if (code === "FISCAL") return <FiscalViz accent={accent} />;
  return <BunkerViz accent={accent} />;
}

function AtlasViz({ accent }) {
  // grid of dots intensity = "vote density"
  const cols = 24, rows = 14;
  const cells = [];
  for (let y = 0; y < rows; y++) {
    for (let x = 0; x < cols; x++) {
      const cx = (x + 0.5) / cols;
      const cy = (y + 0.5) / rows;
      const d = Math.sqrt((cx - 0.45) ** 2 + (cy - 0.55) ** 2);
      const v = Math.max(0, 1 - d * 1.6) + (Math.random() * 0.18 - 0.09);
      cells.push({ x, y, v: Math.max(0, Math.min(1, v)) });
    }
  }
  return (
    <svg viewBox="0 0 480 280" className="viz" preserveAspectRatio="xMidYMid meet">
      <g>
        {cells.map((c, i) => (
          <rect key={i}
            x={c.x * (480 / cols) + 4} y={c.y * (280 / rows) + 4}
            width={(480 / cols) - 8} height={(280 / rows) - 8}
            fill={c.v > 0.55 ? accent : "currentColor"} opacity={0.06 + c.v * 0.85} />
        ))}
      </g>
      <g className="viz-overlay mono">
        <text x="14" y="22" fontSize="9" opacity="0.55">DENSIDAD DE VOTO · CIRCUITO</text>
        <text x="466" y="22" fontSize="9" opacity="0.55" textAnchor="end">N=4,128</text>
        <line x1="14" y1="266" x2="466" y2="266" stroke="currentColor" strokeWidth="0.4" opacity="0.3" />
      </g>
    </svg>
  );
}

function EcoViz({ accent }) {
  // sentiment waveform
  const pts = [];
  for (let i = 0; i <= 80; i++) {
    const t = i / 80;
    const y = 140 + Math.sin(t * 12) * 40 + Math.sin(t * 27) * 18 + Math.cos(t * 5) * 8;
    pts.push([i * 6, y]);
  }
  const path = pts.map((p, i) => (i === 0 ? "M" : "L") + p[0] + "," + p[1]).join(" ");
  return (
    <svg viewBox="0 0 480 280" className="viz" preserveAspectRatio="xMidYMid meet">
      <g opacity="0.18">
        {[40, 80, 120, 160, 200, 240].map((y) => (
          <line key={y} x1="0" y1={y} x2="480" y2={y} stroke="currentColor" strokeWidth="0.4" />
        ))}
      </g>
      <path d={path} fill="none" stroke={accent} strokeWidth="1.4" />
      <path d={path + " L480,280 L0,280 Z"} fill={accent} opacity="0.08" />
      {pts.filter((_, i) => i % 8 === 0).map(([x, y], i) => (
        <circle key={i} cx={x} cy={y} r="2" fill={accent} />
      ))}
      <g className="mono" fill="currentColor">
        <text x="14" y="22" fontSize="9" opacity="0.55">SENTIMIENTO · 7 DÍAS</text>
        <text x="466" y="22" fontSize="9" opacity="0.55" textAnchor="end">+ 1.2 M conv.</text>
      </g>
      <g>
        <line x1="220" y1="40" x2="220" y2="260" stroke={accent} strokeWidth="0.6" strokeDasharray="2 3" opacity="0.6" />
        <text x="226" y="52" fontSize="9" fill={accent} fontFamily="var(--mono)">OPERACIÓN DETECTADA</text>
      </g>
    </svg>
  );
}

function ForjaViz({ accent }) {
  const lines = [
    "> variantes(formato = \"redes · short\")",
    "  v1  ·  \"tono cercano · 280 caracteres\"",
    "  v2  ·  \"tono institucional · spot 30s\"",
    "  v3  ·  \"tono testimonial · video 60s\"",
    "> revisión equipo de comunicación  ✓",
    "> aprobado para publicación  · 14:32 BA",
  ];
  return (
    <svg viewBox="0 0 480 280" className="viz" preserveAspectRatio="xMidYMid meet">
      <rect x="0" y="0" width="480" height="280" fill="currentColor" opacity="0.02" />
      <g className="mono" fontSize="11">
        {lines.map((l, i) => (
          <text key={i} x="20" y={50 + i * 28} fill="currentColor" opacity={i === 4 ? 1 : 0.78}>
            {l}
          </text>
        ))}
        <rect x="20" y={50 + lines.length * 28 - 10} width="9" height="14" fill={accent}>
          <animate attributeName="opacity" values="1;0;1" dur="1s" repeatCount="indefinite" />
        </rect>
      </g>
    </svg>
  );
}

function PulsoViz({ accent }) {
  // panel tracking lines
  const series = (seed, base) => {
    const pts = [];
    let v = base;
    for (let i = 0; i <= 24; i++) {
      v += (Math.sin(i * 0.7 + seed) * 0.6) + (Math.random() - 0.5) * 0.4;
      pts.push([i * 20, 230 - (v - 30) * 8]);
    }
    return pts.map((p, i) => (i === 0 ? "M" : "L") + p[0] + "," + p[1]).join(" ");
  };
  return (
    <svg viewBox="0 0 480 280" className="viz" preserveAspectRatio="xMidYMid meet">
      <g opacity="0.2">
        {[60, 110, 160, 210].map((y) => (
          <line key={y} x1="20" y1={y} x2="460" y2={y} stroke="currentColor" strokeWidth="0.4" strokeDasharray="2 3" />
        ))}
      </g>
      <path d={series(0.2, 42)} fill="none" stroke={accent} strokeWidth="1.6" />
      <path d={series(1.4, 35)} fill="none" stroke="currentColor" strokeWidth="1.2" opacity="0.55" />
      <path d={series(2.8, 23)} fill="none" stroke="currentColor" strokeWidth="1" opacity="0.3" strokeDasharray="3 3" />
      <g className="mono" fontSize="9" opacity="0.55" fill="currentColor">
        <text x="14" y="22">SEGUIMIENTO SEMANAL · EJEMPLO</text>
        <text x="466" y="22" textAnchor="end">muestra representativa</text>
        <text x="20" y="248">L</text><text x="100" y="248">M</text><text x="180" y="248">M</text>
        <text x="260" y="248">J</text><text x="340" y="248">V</text><text x="420" y="248">S</text>
      </g>
    </svg>
  );
}

function FiscalViz({ accent }) {
  // grid of cells, subset filled = fiscalized mesas
  const cells = [];
  for (let y = 0; y < 8; y++)
    for (let x = 0; x < 18; x++)
      cells.push({ x, y, on: Math.random() > 0.18 });
  return (
    <svg viewBox="0 0 480 280" className="viz" preserveAspectRatio="xMidYMid meet">
      <g>
        {cells.map((c, i) => (
          <g key={i}>
            <rect
              x={20 + c.x * 25} y={50 + c.y * 25}
              width="20" height="20" rx="2"
              fill={c.on ? accent : "currentColor"}
              opacity={c.on ? 0.85 : 0.06} />
            {c.on && <circle cx={30 + c.x * 25} cy={60 + c.y * 25} r="2" fill="#fff" opacity="0.9" />}
          </g>
        ))}
      </g>
      <g className="mono" fontSize="9" fill="currentColor">
        <text x="14" y="32" opacity="0.55">FISCALES POR MESA · COBERTURA EN VIVO</text>
        <text x="466" y="32" textAnchor="end" opacity="0.55">144 mesas · 117 OK</text>
        <text x="20" y="270" fill={accent} opacity="0.9">▲ 81.3 % cobertura</text>
      </g>
    </svg>
  );
}

function BunkerViz({ accent }) {
  return (
    <svg viewBox="0 0 480 280" className="viz" preserveAspectRatio="xMidYMid meet">
      <g opacity="0.4">
        <rect x="20" y="30" width="200" height="110" fill="none" stroke="currentColor" strokeWidth="0.5" />
        <rect x="230" y="30" width="100" height="110" fill="none" stroke="currentColor" strokeWidth="0.5" />
        <rect x="340" y="30" width="120" height="110" fill="none" stroke="currentColor" strokeWidth="0.5" />
        <rect x="20" y="150" width="140" height="110" fill="none" stroke="currentColor" strokeWidth="0.5" />
        <rect x="170" y="150" width="160" height="110" fill="none" stroke="currentColor" strokeWidth="0.5" />
        <rect x="340" y="150" width="120" height="110" fill="none" stroke="currentColor" strokeWidth="0.5" />
      </g>
      <g className="mono" fontSize="8" opacity="0.55" fill="currentColor">
        <text x="26" y="46">ATLAS · MAPA</text>
        <text x="236" y="46">ECO</text>
        <text x="346" y="46">PULSO</text>
        <text x="26" y="166">FORJA</text>
        <text x="176" y="166">FISCAL</text>
        <text x="346" y="166">ALERTAS</text>
      </g>
      {/* mini visualizations inside boxes */}
      <g>
        <path d="M40,110 L70,90 L100,100 L130,80 L160,75 L190,85" stroke={accent} strokeWidth="1.4" fill="none" />
        <path d="M40,120 L70,115 L100,118 L130,108 L160,112 L190,105" stroke="currentColor" strokeWidth="1" fill="none" opacity="0.5" />
      </g>
      <g>
        {Array.from({ length: 10 }).map((_, i) => (
          <rect key={i} x={240 + i * 9} y={130 - Math.random() * 60} width="6" height={Math.random() * 60 + 10} fill={accent} opacity="0.7" />
        ))}
      </g>
      <g>
        <circle cx="400" cy="90" r="36" fill="none" stroke="currentColor" strokeWidth="0.5" opacity="0.5" />
        <circle cx="400" cy="90" r="24" fill="none" stroke={accent} strokeWidth="0.8" />
        <text x="400" y="93" textAnchor="middle" fontSize="13" fontFamily="var(--serif)" fontStyle="italic" fill={accent}>+4.1</text>
      </g>
      <g>
        {Array.from({ length: 24 }).map((_, i) => (
          <rect key={i}
            x={30 + (i % 8) * 16} y={180 + Math.floor(i / 8) * 22}
            width="12" height="16" rx="1.5"
            fill={Math.random() > 0.3 ? accent : "currentColor"}
            opacity={Math.random() > 0.3 ? 0.8 : 0.15} />
        ))}
      </g>
      <g className="mono" fontSize="9">
        <text x="180" y="220" opacity="0.55">cobertura territorial</text>
        <text x="190" y="240" fill={accent}>▲ 81.3 %</text>
      </g>
      <g>
        <circle cx="370" cy="200" r="3" fill={accent}>
          <animate attributeName="opacity" values="1;0.2;1" dur="1.4s" repeatCount="indefinite" />
        </circle>
        <text x="380" y="204" fontSize="9" fontFamily="var(--mono)" fill={accent}>3 alertas activas</text>
        <text x="380" y="220" fontSize="9" fontFamily="var(--mono)" opacity="0.45">2 medias · 1 alta</text>
      </g>
    </svg>
  );
}

// ── Method ──────────────────────────────────────────────────────────────────

function Method() {
  const intro = window.COPY.methodIntro;
  const items = window.COPY.method;
  return (
    <section id="metodo" className="method">
      <SectionHead num="§ 03" label={intro.label} title={intro.title} body={intro.body} />
      <ol className="method-list">
        {items.map((m, i) => (
          <MethodRow key={i} m={m} i={i} total={items.length} />
        ))}
      </ol>
    </section>
  );
}

function MethodRow({ m, i, total }) {
  const [ref, seen] = useInView({ threshold: 0.25, once: true });
  return (
    <li ref={ref} className={"mrow " + (seen ? "is-in" : "")}
        style={{ "--mi": i }}>
      <div className="mrow-rule" />
      <div className="mrow-num mono">
        <span className="mrow-phase">{m.phase}</span>
        <span className="mrow-weeks dim">{m.weeks}</span>
      </div>
      <div className="mrow-content">
        <h3 className="mrow-title">{m.title}</h3>
        <p className="mrow-body">{m.body}</p>
      </div>
      <div className="mrow-progress mono small dim">{String(i + 1).padStart(2, "0")} / {String(total).padStart(2, "0")}</div>
    </li>
  );
}

// ── Closing / Contact ───────────────────────────────────────────────────────

function Closing() {
  const C = window.COPY.closing;
  return (
    <section id="contacto" className="closing">
      <div className="closing-grid">
        <div className="closing-left">
          <div className="sec-head-meta mono small">
            <span>§ 04</span><span className="dim">/</span><span>{C.label}</span>
          </div>
          <h2 className="closing-title">
            <span>{C.titleA} </span>
            <span className="serif italic">{C.titleB}</span>
            <br />
            <span>{C.titleC} </span>
            <span className="serif italic underline">{C.titleD}</span>
          </h2>
          <p className="closing-body">{C.body}</p>
          <ul className="closing-promises mono small">
            <li>· Una sola campaña por distrito</li>
            <li>· NDA recíproco antes de la primera reunión</li>
            <li>· Respuesta personal en menos de 48 h</li>
          </ul>
        </div>
        <form
          className="closing-form"
          action="https://formsubmit.co/santiago@kalir.io"
          method="POST"
        >
          <input type="hidden" name="_subject" value="Nuevo contacto · RepúblicaData" />
          <input type="hidden" name="_template" value="table" />
          <input type="hidden" name="_captcha" value="false" />
          <input type="text" name="_honey" style={{ display: "none" }} tabIndex="-1" autoComplete="off" />
          {C.fields.map((f, i) => {
            const isEmail = /email/i.test(f);
            const name = f.toLowerCase()
              .normalize("NFD").replace(/[̀-ͯ]/g, "")
              .replace(/[^a-z0-9]+/g, "_").replace(/^_|_$/g, "");
            return (
              <label key={i} className="field">
                <span className="field-num mono">{String(i + 1).padStart(2, "0")}</span>
                <span className="field-label">{f}</span>
                <input
                  className="field-input"
                  type={isEmail ? "email" : "text"}
                  name={name}
                  required
                  placeholder=" "
                  aria-label={f}
                />
              </label>
            );
          })}
          <button type="submit" className="btn-primary big">
            <span>{C.cta}</span><Arrow />
          </button>
          <p className="form-note mono small dim">{C.note}</p>
        </form>
      </div>
    </section>
  );
}

// ── Footer ──────────────────────────────────────────────────────────────────

function Footer() {
  const F = window.COPY.footer;
  return (
    <footer className="footer">
      <div className="footer-grid">
        <div>
          <div className="brand">
            <BrandMark />
            <span className="brand-word">República<em>Data</em></span>
          </div>
        </div>
        <div className="footer-col">
          <div className="footer-h mono small dim">OFICINAS</div>
          {F.addr.map((a, i) => <div key={i}>{a}</div>)}
        </div>
      </div>
      <div className="footer-legal mono small dim">{F.legal}</div>
    </footer>
  );
}

Object.assign(window, {
  TopBar, Hero, Stats, Services, Stack, Method, Closing, Footer,
});
