// SQSEO marketing, "What is GEO" guide page (→ window.LTQM.WhatIsGeo)
// 1:1 port of the nivk.com geo-explained page UI (cinematic pinned hero,
// editorial stat cards, comparison ledger, numbered process, FAQ, dark CTA),
// restyled to SQSEO tokens only: Plus Jakarta Sans / Inter / JetBrains Mono,
// ink + emerald palette. Hero timeline runs on the vendored GSAP ScrollTrigger
// via LTQEngine; the globe is the vendored cobe module. On the "static" engine
// tier (reduced motion, prerender) everything renders stacked and visible.
(function init(){
if(!window.LongtailIQDesignSystem_ae8f12 || !window.LTQM || !window.LTQM.Reveal || !window.LTQEngine){return setTimeout(init,30);}
const React = window.React;
const DS = window.LongtailIQDesignSystem_ae8f12;
const { Icon } = DS;
const { Reveal } = window.LTQM;

const ACCENT = "#0E8A5F";            // --accent-500 (emerald)
const ACCENT_BRIGHT = "#10B981";     // emerald for dark surfaces
const INK = "#0A0A0C";               // --ink-900

// ── Injected CSS: the nivk hero materials + section layout, SQSEO palette ──
const GEO_CSS = `
.geoh { position: relative; display: flex; height: 100vh; width: 100%; align-items: center; justify-content: center;
  overflow: hidden; font-family: var(--font-sans); background: var(--bg-app, #fff); perspective: 1500px; }
.geoh .gsap-reveal { visibility: hidden; }
.geoh.geoh-static .gsap-reveal { visibility: visible; }

.geoh-grain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; opacity: 0.05; mix-blend-mode: overlay;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="nf"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23nf)"/></svg>'); }

/* Matte / gradient display text (nivk 3d-matte, ink instead of deep green) */
.geoh-matte { color: ${INK}; text-shadow: 0 10px 30px rgba(10,10,12,0.2), 0 2px 4px rgba(10,10,12,0.1); }
.geoh-silver { background: linear-gradient(180deg, ${INK} 0%, rgba(10,10,12,0.7) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; transform: translateZ(0);
  filter: drop-shadow(0px 10px 20px rgba(10,10,12,0.15)) drop-shadow(0px 2px 4px rgba(10,10,12,0.1)); }

/* Deep physical card, ink gradient instead of nivk's deep green */
.geoh-card { background: linear-gradient(145deg, #16161A 0%, ${INK} 100%);
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.9), 0 20px 40px -20px rgba(0,0,0,0.8),
    inset 0 1px 2px rgba(255,255,255,0.2), inset 0 -2px 4px rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.04); position: relative; }
.geoh-sheen { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 50;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06) 0%, transparent 40%);
  mix-blend-mode: screen; transition: opacity 0.3s ease; }

/* Realistic iPhone hardware (verbatim nivk materials) */
.geoh-bezel { background-color: #111; border-radius: 3rem;
  box-shadow: inset 0 0 0 2px #52525B, inset 0 0 0 7px #000, 0 40px 80px -15px rgba(0,0,0,0.9), 0 15px 25px -5px rgba(0,0,0,0.7);
  transform-style: preserve-3d; }
.geoh-hwbtn { position: absolute; width: 3px; background: linear-gradient(90deg, #404040 0%, #171717 100%);
  box-shadow: -2px 0 5px rgba(0,0,0,0.8), inset -1px 0 1px rgba(255,255,255,0.15), inset 1px 0 2px rgba(0,0,0,0.8);
  border-left: 1px solid rgba(255,255,255,0.05); z-index: 0; }
.geoh-glare { position: absolute; inset: 0; z-index: 40; pointer-events: none;
  background: linear-gradient(110deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 45%); }

/* Tactile light button (nivk btn-modern-light, emerald focus ring) */
.geoh-btn-light { display: flex; min-height: 48px; width: 100%; align-items: center; justify-content: center; gap: 12px;
  padding: 18px 40px; border-radius: 999px; border: none; cursor: pointer; font-family: var(--font-sans);
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 100%); color: #0F172A;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.1), 0 12px 24px -4px rgba(0,0,0,0.3), inset 0 1px 1px rgba(255,255,255,1), inset 0 -3px 6px rgba(0,0,0,0.06);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.geoh-btn-light:hover { transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 6px 12px -2px rgba(0,0,0,0.15), 0 20px 32px -6px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,1), inset 0 -3px 6px rgba(0,0,0,0.06); }
.geoh-btn-light:active { transform: translateY(1px); background: linear-gradient(180deg, #F1F5F9 0%, #E2E8F0 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.1), inset 0 3px 6px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(0,0,0,0.02); }
.geoh-btn-light:focus { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px ${ACCENT}, 0 12px 24px -4px rgba(0,0,0,0.3); }
@media (min-width: 640px) { .geoh-btn-light { width: auto; } }

/* Hero layers */
.geoh-text-wrapper { position: absolute; left: 0; right: 0; z-index: 10; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; width: 100%; max-width: 100vw; padding: 0 12px; will-change: transform; transform-style: preserve-3d; }
.geoh-h1 { margin: 0; font-family: var(--font-display); }
.geoh-tag1 { display: block; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 8px; font-size: clamp(2.25rem, 1rem + 6vw, 6rem); line-height: 1.02; }
.geoh-tag2 { display: block; font-weight: 800; letter-spacing: -0.04em; font-size: clamp(2.25rem, 1rem + 6vw, 6rem); line-height: 1.02; }

.geoh-cta-wrapper { position: absolute; left: 0; right: 0; z-index: 10; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; width: 100%; max-width: 100vw; padding: 0 12px; pointer-events: auto; will-change: transform; }
.geoh-cta-h2 { margin: 0 0 24px; max-width: min(100%, 42rem); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(1.875rem, 1rem + 4.5vw, 4.5rem); line-height: 1.04; }
.geoh-cta-p { margin: 0 auto 40px; max-width: 36rem; font-size: clamp(1rem, 0.9rem + 0.6vw, 1.25rem); font-weight: 300; line-height: 1.6; color: var(--text-muted); }

.geoh-card-stage { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; pointer-events: none; perspective: 1500px; }
.main-card { width: 92vw; height: 92vh; border-radius: 32px; overflow: hidden; display: flex; align-items: center; justify-content: center; pointer-events: auto; }
@media (min-width: 768px) { .main-card { width: 85vw; height: 85vh; border-radius: 40px; } }

.geoh-card-row { position: relative; width: 100%; height: 100%; max-width: 80rem; margin: 0 auto; padding: 24px 16px;
  display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; z-index: 10; }
.geoh-card-brand { order: 1; display: flex; justify-content: center; z-index: 20; width: 100%; }
.geoh-wordmark { font-family: var(--font-sans); font-weight: 800; letter-spacing: -0.04em; color: #fff; line-height: 1;
  font-size: clamp(2.6rem, 1.6rem + 3.4vw, 4.6rem); white-space: nowrap; }
.geoh-wordmark span { color: rgba(255,255,255,0.5); }
.geoh-mockup-wrap { order: 2; position: relative; width: 100%; height: 380px; display: flex; align-items: center; justify-content: center; z-index: 10; perspective: 1000px; }
.geoh-mockup-scale { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; transform: scale(0.65); }
@media (min-width: 768px) { .geoh-mockup-scale { transform: scale(0.85); } }
.geoh-card-copy { order: 3; display: flex; flex-direction: column; justify-content: center; text-align: center; z-index: 20; width: 100%; padding: 0 16px; }
.geoh-card-copy h3 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; color: #fff;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.25; }
@media (min-width: 1024px) {
  .geoh-card-row { flex-direction: row; justify-content: space-between; padding: 0 48px; }
  .geoh-card-brand { order: 3; justify-content: flex-end; width: 33.33%; }
  .geoh-mockup-wrap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: auto; height: 600px; }
  .geoh-mockup-scale { transform: scale(1); }
  .geoh-card-copy { order: 1; text-align: left; width: 33.33%; padding: 0; }
}

/* Globe pullback panel (inside the card) */
.globe-wrapper { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; z-index: 10; padding: 0 32px; gap: 32px; }
.globe-visual { width: 100%; max-width: 280px; flex-shrink: 0; aspect-ratio: 1; }
.globe-adoption-copy { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.globe-adoption-copy h3 { margin: 0 0 16px; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; color: #fff;
  font-size: clamp(1.5rem, 1rem + 2vw, 3rem); text-shadow: 0 4px 14px rgba(0,0,0,0.4); }
.globe-adoption-copy p { margin: 0; max-width: 32rem; font-weight: 500; line-height: 1.6; color: rgba(255,255,255,0.82);
  font-size: clamp(1rem, 0.85rem + 0.9vw, 1.5rem); }
.globe-adoption-copy p b { color: ${ACCENT_BRIGHT}; font-weight: 700; }
@media (min-width: 768px) {
  .globe-wrapper { flex-direction: row; padding: 0 64px; gap: 64px; }
  .globe-visual { width: 50%; max-width: 420px; }
  .globe-adoption-copy { width: 50%; align-items: flex-start; text-align: left; }
}

/* Static fallback: no GSAP → everything stacked and visible */
.geoh.geoh-static { height: auto; flex-direction: column; padding: 72px 0 0; overflow: visible; }
.geoh.geoh-static .geoh-text-wrapper, .geoh.geoh-static .geoh-cta-wrapper { position: static; }
.geoh.geoh-static .geoh-cta-wrapper { order: 4; padding: 72px 16px 84px; }
.geoh.geoh-static .geoh-card-stage { position: static; order: 2; height: auto; padding: 56px 0 0; pointer-events: auto; }
.geoh.geoh-static .main-card { height: auto; flex-direction: column; padding: 56px 0; gap: 40px; }
.geoh.geoh-static .geoh-card-row { height: auto; gap: 40px; }
.geoh.geoh-static .geoh-mockup-wrap { position: relative; left: auto; top: auto; transform: none; }
.geoh.geoh-static .globe-wrapper { position: static; padding-bottom: 24px; }

/* ── Sections 2-8 (nivk GeoExplained layout) ── */
.geo-sec { padding: 96px 24px; }
@media (min-width: 640px) { .geo-sec { padding: 128px 32px; } }
@media (min-width: 1024px) { .geo-sec { padding: 160px 48px; } }
.geo-wrap { max-width: 1400px; margin: 0 auto; }
.geo-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(14,138,95,0.75); }
.geo-h2 { margin: 16px 0 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; color: ${INK};
  font-size: clamp(1.875rem, 1.2rem + 2.4vw, 3rem); line-height: 1.08; }
.geo-sub { margin: 16px 0 0; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem); color: var(--text-muted); line-height: 1.6; }
.geo-center { text-align: center; max-width: 48rem; margin: 0 auto 64px; }
@media (min-width: 640px) { .geo-center { margin-bottom: 80px; } }
.geo-band { background: var(--ink-50); }
.geo-band-soft { background: rgba(245,242,236,0.45); }

.geo-quote { margin: 48px 0 0; padding: 4px 0 4px 26px; border-left: 4px solid rgba(14,138,95,0.4); }
@media (min-width: 640px) { .geo-quote { padding-left: 32px; } }
.geo-quote p { margin: 0; font-weight: 500; color: rgba(10,10,12,0.9); letter-spacing: -0.01em;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.65rem); line-height: 1.45; }
.geo-par { margin: 0; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem); line-height: 1.8; color: var(--text-muted); }

/* Editorial insight cards */
.geo-cards { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .geo-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .geo-cards { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.geo-ecard { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; height: 100%;
  border-radius: 28px; background: #fff; border: 1px solid rgba(20,16,8,0.09); padding: 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.04); transition: all 0.5s cubic-bezier(0.22,1,0.36,1); }
.geo-ecard:hover { transform: translateY(-4px); border-color: rgba(14,138,95,0.25); box-shadow: 0 16px 44px rgba(0,0,0,0.07); }
@media (min-width: 1024px) { .geo-ecard { padding: 28px; } }
.geo-ecard-media { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 20px; background: var(--ink-50); margin-bottom: 28px; }
.geo-ecard-media svg { width: 100%; height: 100%; display: block; transition: transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.geo-ecard:hover .geo-ecard-media svg { transform: scale(1.03); }
.geo-ecard-media::after { content: ""; position: absolute; inset: 0; border-radius: 20px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); pointer-events: none; }
.geo-ecard h3 { margin: 0 0 16px; font-family: var(--font-mono); font-weight: 600; letter-spacing: -0.02em; color: ${INK};
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem); line-height: 1.2; }
.geo-ecard .geo-ecard-desc { margin: 0 0 32px; font-size: 16px; line-height: 1.65; color: var(--text-muted); }
.geo-ecard hr { border: none; border-top: 1px solid var(--border-subtle); margin: 0 0 20px; }
.geo-ecard-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.geo-ecard-ava { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
  border-radius: 999px; color: #fff; font-weight: 700; font-size: 14px; letter-spacing: -0.02em; box-shadow: var(--ring-inset, inset 0 0 0 1px rgba(255,255,255,0.2)); }
.geo-ecard-chip { flex: none; border-radius: 999px; border: 1px solid var(--border-subtle); background: rgba(245,242,236,0.9); padding: 6px 12px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-body); }

/* Comparison */
.geo-cmp-desktop { display: none; }
.geo-cmp-mobile { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) { .geo-cmp-desktop { display: block; } .geo-cmp-mobile { display: none; } }
.geo-cmp-table { overflow: hidden; border-radius: 16px; border: 1px solid var(--border-subtle); box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,0.05)); }
.geo-cmp-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; }

/* Process steps */
.geo-step { position: relative; padding: 48px 0; display: flex; align-items: flex-start; gap: 24px; }
@media (min-width: 640px) { .geo-step { padding: 64px 0; gap: 40px; } }
.geo-step-num { flex: none; font-family: var(--font-mono); font-weight: 700; letter-spacing: -0.03em; line-height: 1; user-select: none;
  color: rgba(14,138,95,0.16); font-size: clamp(3rem, 2.2rem + 2.6vw, 4.5rem); }
.geo-step h3 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; color: ${INK};
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem); line-height: 1.3; }
.geo-step ul { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.geo-step li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.6; color: var(--text-muted); }
.geo-step li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 999px; background: rgba(14,138,95,0.45); margin-top: 9px; }

/* GEO-with-SQSEO benefit cards */
.geo-benefits { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .geo-benefits { grid-template-columns: 1fr 1fr; } }
.geo-bcard { border-radius: 16px; border: 1px solid rgba(20,16,8,0.09); background: rgba(255,255,255,0.8); padding: 32px;
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,0.04)); backdrop-filter: blur(4px);
  transition: all 0.3s cubic-bezier(0.22,1,0.36,1); }
.geo-bcard:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,0.08); border-color: rgba(14,138,95,0.2); }
.geo-bcard-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px;
  background: rgba(14,138,95,0.1); color: ${ACCENT}; margin-bottom: 20px; }
.geo-bcard h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: ${INK}; }
.geo-bcard p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }

/* FAQ */
.geo-faq-item { border-bottom: 1px solid rgba(20,16,8,0.08); }
.geo-faq-item:last-child { border-bottom: none; }
.geo-faq-q { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0;
  background: transparent; border: none; cursor: pointer; text-align: left; font-family: var(--font-sans);
  transition: color 0.25s ease; }
.geo-faq-q:hover .geo-faq-qt { color: ${ACCENT}; }
.geo-faq-qt { font-size: clamp(1.125rem, 1rem + 0.4vw, 1.25rem); font-weight: 600; letter-spacing: -0.015em; color: ${INK}; transition: color 0.25s ease; }
.geo-faq-chev { flex: none; color: var(--text-muted); transition: transform 0.3s cubic-bezier(0.22,1,0.36,1); }
.geo-faq-chev.open { transform: rotate(180deg); }
.geo-faq-a { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out; }
.geo-faq-a.open { grid-template-rows: 1fr; opacity: 1; padding-bottom: 24px; }
.geo-faq-a > div { overflow: hidden; }
.geo-faq-a p { margin: 0; max-width: 48rem; font-size: 16px; line-height: 1.65; color: var(--text-muted); }

/* Final CTA (nivk dark gradient band, ink + emerald glow) */
.geo-cta { position: relative; overflow: hidden; background: linear-gradient(180deg, ${INK} 0%, #121216 50%, ${INK} 100%); }
.geo-cta::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 50% at 50% 120%, rgba(16,185,129,0.12), transparent); }
.geo-cta-h2 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; color: #fff;
  font-size: clamp(1.875rem, 1.2rem + 2.4vw, 3rem); line-height: 1.08; }
.geo-cta-p { margin: 24px 0 0; font-size: 18px; font-weight: 300; color: rgba(255,255,255,0.5); line-height: 1.6; }
.geo-cta-btns { margin-top: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
@media (min-width: 640px) { .geo-cta-btns { flex-direction: row; } }
.geo-cta-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; width: 100%;
  padding: 14px 32px; border-radius: 12px; border: 1px solid #fff; background: #fff; color: ${INK};
  font-family: var(--font-sans); font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none;
  box-shadow: 0 10px 26px rgba(0,0,0,0.28); transition: all 0.3s cubic-bezier(0.22,1,0.36,1); }
.geo-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0,0,0,0.36); background: rgba(255,255,255,0.94); }
.geo-cta-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; width: 100%;
  padding: 14px 32px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2); background: transparent; color: #fff;
  font-family: var(--font-sans); font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22,1,0.36,1); }
.geo-cta-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }
@media (min-width: 640px) { .geo-cta-primary, .geo-cta-secondary { width: auto; } }
`;

// ── Assistant paragraph with the brand bolded (nivk AssistantParagraphWithBrand) ──
function BrandBold({ text }) {
  const parts = String(text).split("SQSEO");
  if (parts.length === 1) return text;
  return parts.map((seg, i) => (
    <span key={i}>{seg}{i < parts.length - 1 ? <strong>SQSEO</strong> : null}</span>
  ));
}

// ── cobe globe (vendored module; static sphere fallback) ────────────────────
function Globe() {
  const canvasRef = React.useRef(null);
  const [failed, setFailed] = React.useState(window.LTQEngine.tier === "static");
  React.useEffect(() => {
    if (window.LTQEngine.tier === "static") return;
    let globe = null, phi = 0, disposed = false;
    // Indirect dynamic import: Babel-standalone must not rewrite it.
    const dynImport = new Function("p", "return import(p)");
    dynImport("/vendor/cobe.module.js").then((m) => {
      if (disposed || !canvasRef.current) return;
      const createGlobe = m.default || m.createGlobe;
      const size = canvasRef.current.offsetWidth || 300;
      globe = createGlobe(canvasRef.current, {
        devicePixelRatio: 2, width: size * 2, height: size * 2, phi: 0, theta: 0.24,
        dark: 1, diffuse: 1.2, mapSamples: 16000, mapBrightness: 5.2,
        baseColor: [0.16, 0.16, 0.18], markerColor: [16 / 255, 185 / 255, 129 / 255], glowColor: [0.09, 0.42, 0.31],
        markers: [
          { location: [38.95, -77.45], size: 0.06 }, { location: [37.62, -122.38], size: 0.06 },
          { location: [49.01, 2.55], size: 0.07 }, { location: [35.55, 139.78], size: 0.06 },
          { location: [-33.95, 151.18], size: 0.05 }, { location: [-23.43, -46.47], size: 0.05 },
          { location: [1.36, 103.99], size: 0.05 }, { location: [59.65, 17.93], size: 0.05 },
          { location: [52.31, 4.76], size: 0.07 }, { location: [19.09, 72.87], size: 0.05 },
        ],
        onRender: (state) => { state.phi = phi; phi += 0.004; },
      });
    }).catch(() => { if (!disposed) setFailed(true); });
    return () => { disposed = true; if (globe) globe.destroy(); };
  }, []);
  if (failed) {
    // Static sphere: emerald-lit ink globe with marker dots (no WebGL)
    return (
      <div aria-hidden="true" style={{ width: "100%", aspectRatio: "1", borderRadius: "999px", position: "relative",
        background: "radial-gradient(circle at 32% 28%, #2A2A30 0%, #141416 55%, #0A0A0C 100%)",
        boxShadow: "inset -18px -24px 60px rgba(0,0,0,0.75), inset 10px 12px 44px rgba(16,185,129,0.14), 0 30px 80px rgba(0,0,0,0.5)" }}>
        {[[24,30],[38,62],[52,22],[60,48],[34,44],[70,64],[46,74],[22,58]].map(([t, l], i) => (
          <span key={i} style={{ position: "absolute", top: t + "%", left: l + "%", width: 6, height: 6, borderRadius: 999,
            background: ACCENT_BRIGHT, boxShadow: "0 0 10px rgba(16,185,129,0.9)" }} />
        ))}
      </div>
    );
  }
  return <canvas ref={canvasRef} style={{ width: "100%", height: "100%", display: "block" }} aria-hidden="true" />;
}

// ── The iPhone (verbatim nivk hardware + authentic ChatGPT chat) ────────────
function IphoneMockup({ mockupRef }) {
  const t = window.LTQM.t;
  return (
    <div ref={mockupRef} className="geoh-bezel" style={{ position: "relative", width: 280, height: 580, display: "flex", flexDirection: "column", willChange: "transform" }}>
      <div className="geoh-hwbtn" style={{ top: 120, left: -3, height: 25, borderRadius: "6px 0 0 6px" }} aria-hidden="true" />
      <div className="geoh-hwbtn" style={{ top: 160, left: -3, height: 45, borderRadius: "6px 0 0 6px" }} aria-hidden="true" />
      <div className="geoh-hwbtn" style={{ top: 220, left: -3, height: 45, borderRadius: "6px 0 0 6px" }} aria-hidden="true" />
      <div className="geoh-hwbtn" style={{ top: 170, right: -3, left: "auto", height: 70, borderRadius: "0 6px 6px 0", transform: "scaleX(-1)" }} aria-hidden="true" />

      <div style={{ position: "absolute", inset: 7, background: "#050914", borderRadius: "2.5rem", overflow: "hidden",
        boxShadow: "inset 0 0 15px rgba(0,0,0,1)", color: "#fff", zIndex: 10 }}>
        <div className="geoh-glare" aria-hidden="true" />

        {/* Dynamic island */}
        <div style={{ position: "absolute", top: 5, left: "50%", transform: "translateX(-50%)", width: 100, height: 28, background: "#000",
          borderRadius: 999, zIndex: 50, display: "flex", alignItems: "center", justifyContent: "flex-end", padding: "0 12px",
          boxShadow: "inset 0 -1px 2px rgba(255,255,255,0.1)" }}>
          <span style={{ width: 6, height: 6, borderRadius: 999, background: "#22c55e", boxShadow: "0 0 8px rgba(34,197,94,0.8)" }} />
        </div>

        {/* ChatGPT app */}
        <div style={{ position: "relative", width: "100%", height: "100%", padding: "40px 16px 32px", display: "flex", flexDirection: "column", background: "#fff" }}>
          <div className="phone-widget" style={{ display: "flex", alignItems: "center", justifyContent: "space-between", paddingBottom: 12,
            borderBottom: "1px solid #f3f4f6", marginBottom: 20 }}>
            <div style={{ display: "flex", alignItems: "center", gap: 8 }}>
              <img src="/assets/chatgpt-logo.jpg" alt={t("geo.chat.brand")} width={32} height={32} style={{ width: 32, height: 32, borderRadius: 999, objectFit: "cover" }} loading="lazy" />
              <span style={{ fontSize: 16, fontWeight: 600, letterSpacing: "-0.01em", color: "#000" }}>{t("geo.chat.brand")}</span>
            </div>
            <span style={{ width: 24, height: 24, display: "flex", alignItems: "center", justifyContent: "center", color: "#6b7280" }}>
              <Icon name="more-horizontal" size={20} strokeWidth={2} />
            </span>
          </div>

          <div style={{ flex: 1, display: "flex", flexDirection: "column", gap: 24, overflow: "hidden", position: "relative" }}>
            <div className="phone-widget" style={{ alignSelf: "flex-end", maxWidth: "85%", background: "#f4f4f5", borderRadius: "24px 6px 24px 24px", padding: "10px 16px" }}>
              <p style={{ margin: 0, fontSize: 14, lineHeight: 1.4, color: "#000", fontWeight: 500 }}>{t("geo.chat.user")}</p>
            </div>
            <div className="phone-widget" style={{ alignSelf: "flex-start", width: "100%", display: "flex", gap: 12 }}>
              <img src="/assets/chatgpt-logo.jpg" alt="" width={28} height={28} style={{ width: 28, height: 28, borderRadius: 999, flex: "none", marginTop: 2, objectFit: "cover", boxShadow: "0 1px 2px rgba(0,0,0,0.1)" }} loading="lazy" />
              <div style={{ flex: 1, paddingTop: 2 }}>
                <p style={{ margin: 0, fontSize: 14, lineHeight: 1.5, color: "#000" }}><BrandBold text={t("geo.chat.a1")} /></p>
                <p style={{ margin: "12px 0 0", fontSize: 14, lineHeight: 1.5, color: "#000" }}>{t("geo.chat.a2")}</p>
              </div>
            </div>
          </div>

          <div className="phone-widget" style={{ marginTop: "auto", paddingTop: 8 }}>
            <div style={{ width: "100%", height: 44, background: "#f4f4f5", borderRadius: 999, display: "flex", alignItems: "center", padding: "0 16px" }}>
              <span style={{ width: 20, height: 20, borderRadius: 999, background: "#e4e4e7", display: "flex", alignItems: "center", justifyContent: "center", marginRight: 8, color: "#71717a" }}>
                <Icon name="plus" size={10} strokeWidth={2} />
              </span>
              <span style={{ fontSize: 14, color: "#6b7280" }}>{t("geo.chat.placeholder")}</span>
              <span style={{ marginLeft: "auto", width: 28, height: 28, borderRadius: 999, background: "#000", display: "flex", alignItems: "center", justifyContent: "center", color: "#fff" }}>
                <Icon name="send" size={12} strokeWidth={2} />
              </span>
            </div>
          </div>

          <div style={{ position: "absolute", bottom: 8, left: "50%", transform: "translateX(-50%)", width: 130, height: 5, background: "rgba(0,0,0,0.8)", borderRadius: 999 }} />
        </div>
      </div>
    </div>
  );
}

// ── Section 1: the cinematic pinned hero (nivk CinematicHero, GSAP timeline) ─
const PIN_SCROLL_END = "+=4200"; // nivk CINEMATIC_HERO_PIN_SCROLL_END_COMPACT
const SCROLL_SCRUB = 0.12;

function CinematicHero() {
  const t = window.LTQM.t;
  const containerRef = React.useRef(null);
  const mainCardRef = React.useRef(null);
  const mockupRef = React.useRef(null);
  const rafRef = React.useRef(0);
  const [staticMode, setStaticMode] = React.useState(window.LTQEngine.tier === "static");

  React.useEffect(() => {
    let cleanup = null, disposed = false;
    window.LTQEngine.load("scrolltrigger").then((ST) => {
      const gsap = window.gsap;
      if (disposed) return;
      if (!ST || !gsap) { setStaticMode(true); return; }
      const el = containerRef.current;
      if (!el) return;
      const isMobile = window.innerWidth < 768;
      const q = (sel) => el.querySelectorAll(sel);

      // Mouse parallax + card sheen tracking
      const onMove = (e) => {
        if (window.scrollY > window.innerHeight * 2) return;
        cancelAnimationFrame(rafRef.current);
        rafRef.current = requestAnimationFrame(() => {
          if (!mainCardRef.current || !mockupRef.current) return;
          const rect = mainCardRef.current.getBoundingClientRect();
          mainCardRef.current.style.setProperty("--mouse-x", (e.clientX - rect.left) + "px");
          mainCardRef.current.style.setProperty("--mouse-y", (e.clientY - rect.top) + "px");
          const xVal = (e.clientX / window.innerWidth - 0.5) * 2;
          const yVal = (e.clientY / window.innerHeight - 0.5) * 2;
          gsap.to(mockupRef.current, { rotationY: xVal * 12, rotationX: -yVal * 12, ease: "power3.out", duration: 1.2 });
        });
      };
      const onLeave = () => {
        if (!mockupRef.current) return;
        gsap.to(mockupRef.current, { rotationX: 0, rotationY: 0, rotationZ: 0, duration: 0.65, ease: "power2.out" });
      };
      window.addEventListener("mousemove", onMove);
      mainCardRef.current && mainCardRef.current.addEventListener("pointerleave", onLeave);

      // Intro: taglines blur in
      gsap.set(q(".text-track"), { autoAlpha: 0, y: 60, scale: 0.85, filter: "blur(20px)", rotationX: -20 });
      gsap.set(q(".text-days"), { autoAlpha: 1, clipPath: "inset(0 100% 0 0)" });
      const introTl = gsap.timeline({ delay: 0.3 });
      introTl
        .to(q(".text-track"), { duration: 1.8, autoAlpha: 1, y: 0, scale: 1, filter: "blur(0px)", rotationX: 0, ease: "expo.out" })
        .to(q(".text-days"), { duration: 1.4, clipPath: "inset(0 0% 0 0)", ease: "power4.inOut" }, "-=1.0");

      // Scroll timeline (verbatim nivk choreography)
      gsap.set(q(".main-card"), { y: window.innerHeight + 200, autoAlpha: 1 });
      gsap.set([...q(".card-left-text"), ...q(".card-right-text"), ...q(".mockup-scroll-wrapper"), ...q(".phone-widget")], { autoAlpha: 0 });
      gsap.set(q(".cta-wrapper"), { autoAlpha: 0, scale: 0.8, filter: "blur(30px)" });
      gsap.set(q(".globe-wrapper"), { autoAlpha: 0 });
      gsap.set(q(".globe-visual"), { autoAlpha: 0, scale: 0.8 });
      gsap.set(q(".globe-adoption-copy"), { autoAlpha: 0, y: 14 });

      const scrollTl = gsap.timeline({
        scrollTrigger: { trigger: el, start: "top top", end: PIN_SCROLL_END, pin: true, scrub: SCROLL_SCRUB,
          anticipatePin: 1, fastScrollEnd: true, invalidateOnRefresh: true },
      });
      scrollTl
        .add("start", 1.35)
        .to(q(".hero-text-wrapper"), { scale: 1, filter: "blur(0px)", opacity: 1, duration: 2 }, 0)
        .to(q(".main-card"), { y: window.innerHeight + 200, duration: 2 }, 0)
        .to(q(".hero-text-wrapper"), { scale: 1.15, filter: "blur(20px)", opacity: 0.2, ease: "power2.inOut", duration: 2 }, "start")
        .to(q(".main-card"), { y: 0, ease: "power3.inOut", duration: 2 }, "start")
        .to(q(".main-card"), { width: "100%", height: "100%", borderRadius: "0px", ease: "power3.inOut", duration: 1.5 })
        .fromTo(q(".mockup-scroll-wrapper"),
          { y: 300, z: -500, rotationX: 50, rotationY: -34, rotationZ: -6, autoAlpha: 0, scale: 0.6 },
          { y: 0, z: 0, rotationX: 4, rotationY: -11, rotationZ: -4, autoAlpha: 1, scale: 1, ease: "expo.out", duration: 3.0 },
          "-=0.8")
        .fromTo(q(".phone-widget"), { y: 40, autoAlpha: 0, scale: 0.95 },
          { y: 0, autoAlpha: 1, scale: 1, stagger: 0.15, ease: "back.out(1.2)", duration: 1.5 }, "-=1.5")
        .fromTo(q(".card-left-text"), { x: -50, autoAlpha: 0 }, { x: 0, autoAlpha: 1, ease: "power4.out", duration: 1.5 }, "-=1.5")
        .fromTo(q(".card-right-text"), { x: 50, autoAlpha: 0, scale: 0.8 }, { x: 0, autoAlpha: 1, scale: 1, ease: "expo.out", duration: 1.5 }, "<")
        .to({}, { duration: 2.5 })
        .set(q(".hero-text-wrapper"), { autoAlpha: 0 })
        .set(q(".cta-wrapper"), { autoAlpha: 1 })
        .to({}, { duration: 1.5 })
        .to([...q(".mockup-scroll-wrapper"), ...q(".card-left-text"), ...q(".card-right-text")], {
          scale: 0.95, y: -20, z: -100, autoAlpha: 0, ease: "power2.inOut", duration: 2.5, stagger: 0.1 })
        .to(q(".main-card"), { width: isMobile ? "92vw" : "85vw", height: isMobile ? "92vh" : "85vh",
          borderRadius: isMobile ? "32px" : "40px", ease: "expo.inOut", duration: 2.8 }, "pullback")
        .to(q(".cta-wrapper"), { scale: 1, filter: "blur(0px)", ease: "expo.inOut", duration: 2.8 }, "pullback")
        .to(q(".globe-wrapper"), { autoAlpha: 1, duration: 0.35, ease: "power2.out" }, "pullback+=0.8")
        .to(q(".globe-visual"), { autoAlpha: 1, scale: 1, duration: 2.0, ease: "power2.out" }, "pullback+=0.8")
        .to(q(".globe-adoption-copy"), { autoAlpha: 1, y: 0, duration: 0.9, ease: "power2.out" }, "pullback+=2.8")
        .to({}, { duration: 2.9 })
        .to(q(".main-card"), { y: -window.innerHeight - 300, ease: "power3.inOut", duration: 2.5 });

      let resizeId;
      const onResize = () => { clearTimeout(resizeId); resizeId = setTimeout(() => ST.refresh(), 150); };
      window.addEventListener("resize", onResize);
      window.addEventListener("orientationchange", onResize);

      cleanup = () => {
        window.removeEventListener("mousemove", onMove);
        window.removeEventListener("resize", onResize);
        window.removeEventListener("orientationchange", onResize);
        mainCardRef.current && mainCardRef.current.removeEventListener("pointerleave", onLeave);
        cancelAnimationFrame(rafRef.current);
        clearTimeout(resizeId);
        introTl.kill();
        scrollTl.scrollTrigger && scrollTl.scrollTrigger.kill();
        scrollTl.kill();
      };
    });
    return () => { disposed = true; cleanup && cleanup(); };
  }, []);

  const explore = () => {
    const target = document.getElementById("what-is-geo");
    if (target) target.scrollIntoView({ behavior: "smooth", block: "start" });
    else window.scrollTo({ top: window.innerHeight * 1.5, behavior: "smooth" });
  };

  return (
    <div ref={containerRef} className={"geoh" + (staticMode ? " geoh-static" : "")}>
      <div className="geoh-grain" aria-hidden="true" />

      {/* Background layer: animated taglines */}
      <div className="geoh-text-wrapper hero-text-wrapper">
        <h1 className="geoh-h1">
          <span className="text-track geoh-tag1 geoh-matte">{t("geo.hero.tag1")}</span>
          <span className="text-days geoh-tag2 geoh-silver">{t("geo.hero.tag2")}</span>
        </h1>
      </div>

      {/* Background layer 2: the CTA the card flies away to reveal */}
      <div className="geoh-cta-wrapper cta-wrapper gsap-reveal">
        <h2 className="geoh-cta-h2 geoh-silver">{t("geo.def.title")}</h2>
        <p className="geoh-cta-p">{t("geo.hero.cta_desc")}</p>
        <div style={{ display: "flex", flexDirection: "column", gap: 16, width: "100%", maxWidth: 448, justifyContent: "center", padding: "0 4px" }}>
          <button type="button" className="geoh-btn-light" onClick={explore}>
            <span style={{ fontSize: 18, fontWeight: 700, letterSpacing: "-0.01em", lineHeight: 1 }}>{t("geo.hero.explore")}</span>
            <Icon name="arrow-down" size={20} strokeWidth={2} />
          </button>
        </div>
      </div>

      {/* Foreground: the physical ink card */}
      <div className="geoh-card-stage">
        <div ref={mainCardRef} className="main-card geoh-card gsap-reveal">
          <div className="geoh-sheen" aria-hidden="true" />

          {/* Globe pullback panel */}
          <div className="globe-wrapper">
            <div className="globe-visual"><Globe /></div>
            <div className="globe-adoption-copy">
              <h3>{t("geo.hero.globe_heading")}</h3>
              <p>{t("geo.hero.adoption_lead")} <b>{t("geo.hero.adoption_stat")}</b> {t("geo.hero.adoption_rest")}</p>
            </div>
          </div>

          <div className="geoh-card-row">
            <div className="geoh-card-brand card-right-text gsap-reveal">
              <span className="geoh-wordmark" role="img" aria-label="SQSEO">SQ<span>SEO</span></span>
            </div>
            <div className="geoh-mockup-wrap mockup-scroll-wrapper">
              <div className="geoh-mockup-scale">
                <IphoneMockup mockupRef={mockupRef} />
              </div>
            </div>
            <div className="geoh-card-copy card-left-text gsap-reveal">
              <h3>{t("geo.hero.sub")}</h3>
            </div>
          </div>
        </div>
      </div>
    </div>
  );
}

// ── Section 2: What is GEO? ─────────────────────────────────────────────────
function Definition() {
  const t = window.LTQM.t;
  return (
    <section id="what-is-geo" className="geo-sec" style={{ scrollMarginTop: 96 }}>
      <div className="geo-wrap">
        <div style={{ maxWidth: "48rem", margin: "0 auto" }}>
          <Reveal>
            <span className="geo-label">{t("geo.def.pill")}</span>
            <h2 className="geo-h2">{t("geo.def.title")}</h2>
          </Reveal>
          <Reveal delay={80}>
            <blockquote className="geo-quote"><p>{t("geo.def.quote")}</p></blockquote>
          </Reveal>
          <div style={{ marginTop: 48, display: "flex", flexDirection: "column", gap: 24 }}>
            {["geo.def.p1", "geo.def.p2", "geo.def.p3"].map((k, i) => (
              <Reveal key={k} delay={160 + i * 80}><p className="geo-par">{t(k)}</p></Reveal>
            ))}
          </div>
        </div>
      </div>
    </section>
  );
}

// ── Section 3: Why GEO matters (editorial insight cards) ────────────────────
// Abstract data-viz covers replace the nivk photos: same media area, SQSEO palette.
const COVER_BG = "%23F5F2EC"; const COVER_LINE = "%23DDD8CE";
const COVERS = [
  // rising line chart
  `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Crect width='400' height='300' fill='${COVER_BG}'/%3E%3Cg stroke='${COVER_LINE}' stroke-width='1'%3E%3Cpath d='M0 60h400M0 120h400M0 180h400M0 240h400'/%3E%3C/g%3E%3Cpath d='M20 250 C 90 240, 120 200, 170 190 S 260 130, 310 90 S 370 50, 385 42' fill='none' stroke='%230E8A5F' stroke-width='5' stroke-linecap='round'/%3E%3Ccircle cx='385' cy='42' r='9' fill='%230E8A5F'/%3E%3Ccircle cx='385' cy='42' r='16' fill='%230E8A5F' opacity='0.25'/%3E%3C/svg%3E`,
  // bars
  `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Crect width='400' height='300' fill='${COVER_BG}'/%3E%3Cg stroke='${COVER_LINE}' stroke-width='1'%3E%3Cpath d='M0 60h400M0 120h400M0 180h400M0 240h400'/%3E%3C/g%3E%3Cg%3E%3Crect x='55' y='170' width='44' height='90' rx='8' fill='%231A1A1E'/%3E%3Crect x='125' y='140' width='44' height='120' rx='8' fill='%231A1A1E'/%3E%3Crect x='195' y='108' width='44' height='152' rx='8' fill='%231A1A1E'/%3E%3Crect x='265' y='58' width='44' height='202' rx='8' fill='%230E8A5F'/%3E%3C/g%3E%3C/svg%3E`,
  // donut
  `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Crect width='400' height='300' fill='${COVER_BG}'/%3E%3Cg stroke='${COVER_LINE}' stroke-width='1'%3E%3Cpath d='M0 60h400M0 120h400M0 180h400M0 240h400'/%3E%3C/g%3E%3Ccircle cx='200' cy='150' r='84' fill='none' stroke='%231A1A1E' stroke-width='30'/%3E%3Ccircle cx='200' cy='150' r='84' fill='none' stroke='%230E8A5F' stroke-width='30' stroke-dasharray='370 528' stroke-dashoffset='-40' stroke-linecap='round' transform='rotate(-90 200 150)'/%3E%3C/svg%3E`,
];
const AVATAR_TONES = ["var(--grad-accent, #0E8A5F)", "var(--grad-ink, #16161A)", "var(--blue-500, #3b6ef5)"];

function InsightEditorialCard({ title, description, cover, author, initials, tone, date, category }) {
  return (
    <div className="geo-ecard">
      <div className="geo-ecard-media">
        <svg viewBox="0 0 400 300" role="img" aria-label={category} style={{ background: "var(--ink-50)" }}>
          <image href={cover} width="400" height="300" />
        </svg>
      </div>
      <div style={{ display: "flex", flexDirection: "column", flexGrow: 1 }}>
        <h3>{title}</h3>
        <p className="geo-ecard-desc">{description}</p>
        <div style={{ marginTop: "auto" }}>
          <hr />
          <div className="geo-ecard-foot">
            <div style={{ display: "flex", minWidth: 0, alignItems: "center", gap: 12 }}>
              <span className="geo-ecard-ava" style={{ background: tone }}>{initials}</span>
              <span style={{ minWidth: 0, display: "flex", flexDirection: "column" }}>
                <span style={{ fontSize: 14, fontWeight: 600, lineHeight: 1.3, color: "var(--text-strong)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{author}</span>
                <span style={{ fontSize: 13, fontWeight: 500, color: "var(--text-muted)" }}>{date}</span>
              </span>
            </div>
            <span className="geo-ecard-chip">{category}</span>
          </div>
        </div>
      </div>
    </div>
  );
}

function WhyMatters() {
  const t = window.LTQM.t;
  const authors = [
    { name: t("geo.why.a1"), initials: "ME" },
    { name: t("geo.why.a2"), initials: "DR" },
    { name: t("geo.why.a3"), initials: "PN" },
  ];
  const stats = [1, 2, 3].map((i) => ({ v: t(`geo.why.s${i}.v`), d: t(`geo.why.s${i}.d`) }));
  return (
    <div className="geo-band-soft">
      <section className="geo-sec">
        <div className="geo-wrap">
          <Reveal>
            <div className="geo-center" style={{ marginBottom: 64 }}>
              <span className="geo-label">{t("geo.why.pill")}</span>
              <h2 className="geo-h2">{t("geo.why.title")}</h2>
            </div>
          </Reveal>
          <div className="geo-cards">
            {stats.map((s, i) => (
              <Reveal key={i} delay={(i + 1) * 80} style={{ display: "flex" }}>
                <InsightEditorialCard title={s.v} description={s.d} cover={COVERS[i]}
                  author={authors[i].name} initials={authors[i].initials} tone={AVATAR_TONES[i]}
                  date={t("geo.why.card_year")} category={t("geo.why.card_category")} />
              </Reveal>
            ))}
          </div>
        </div>
      </section>
    </div>
  );
}

// ── Section 4: GEO vs SEO ───────────────────────────────────────────────────
function Comparison() {
  const t = window.LTQM.t;
  const rows = [1, 2, 3, 4, 5].map((i) => ({ label: t(`geo.cmp.r${i}.label`), seo: t(`geo.cmp.r${i}.seo`), geo: t(`geo.cmp.r${i}.geo`) }));
  return (
    <section className="geo-sec">
      <div className="geo-wrap">
        <Reveal>
          <div className="geo-center">
            <span className="geo-label">{t("geo.cmp.pill")}</span>
            <h2 className="geo-h2">{t("geo.cmp.title")}</h2>
            <p className="geo-sub">{t("geo.cmp.sub")}</p>
          </div>
        </Reveal>

        {/* Desktop */}
        <div className="geo-cmp-desktop">
          <Reveal delay={80}>
            <div className="geo-cmp-table">
              <div className="geo-cmp-grid">
                <div style={{ background: "rgba(245,242,236,0.6)", padding: 24 }} />
                <div style={{ background: "rgba(245,242,236,0.6)", padding: 24, borderLeft: "1px solid var(--border-subtle)" }}>
                  <p style={{ margin: 0, fontSize: 13, fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.08em", color: "var(--text-muted)" }}>{t("geo.cmp.seo")}</p>
                </div>
                <div style={{ background: "rgba(14,138,95,0.06)", padding: 24, borderLeft: "1px solid rgba(14,138,95,0.1)" }}>
                  <p style={{ margin: 0, fontSize: 13, fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.08em", color: ACCENT }}>{t("geo.cmp.geo")}</p>
                </div>
              </div>
              {rows.map((row, i) => (
                <div key={i} className="geo-cmp-grid" style={{ borderBottom: i < rows.length - 1 ? "1px solid rgba(20,16,8,0.06)" : "none" }}>
                  <div style={{ padding: 24, background: "rgba(255,255,255,0.6)" }}>
                    <p style={{ margin: 0, fontSize: 14, fontWeight: 600, color: "var(--text-strong)" }}>{row.label}</p>
                  </div>
                  <div style={{ padding: 24, background: "rgba(255,255,255,0.6)", borderLeft: "1px solid rgba(20,16,8,0.06)" }}>
                    <p style={{ margin: 0, fontSize: 14, lineHeight: 1.6, color: "var(--text-muted)" }}>{row.seo}</p>
                  </div>
                  <div style={{ padding: 24, background: "rgba(14,138,95,0.03)", borderLeft: "1px solid rgba(14,138,95,0.1)" }}>
                    <p style={{ margin: 0, fontSize: 14, lineHeight: 1.6, fontWeight: 500, color: "var(--text-strong)" }}>{row.geo}</p>
                  </div>
                </div>
              ))}
            </div>
          </Reveal>
        </div>

        {/* Mobile */}
        <div className="geo-cmp-mobile">
          {rows.map((row, i) => (
            <Reveal key={i} delay={(i + 1) * 60}>
              <div style={{ borderRadius: 12, border: "1px solid var(--border-subtle)", overflow: "hidden" }}>
                <div style={{ background: "rgba(245,242,236,0.6)", padding: "12px 20px" }}>
                  <p style={{ margin: 0, fontSize: 14, fontWeight: 600, color: "var(--text-strong)" }}>{row.label}</p>
                </div>
                <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr" }}>
                  <div style={{ padding: 16 }}>
                    <p style={{ margin: "0 0 8px", fontSize: 10, fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.08em", color: "var(--text-muted)" }}>{t("geo.cmp.seo_short")}</p>
                    <p style={{ margin: 0, fontSize: 12, lineHeight: 1.6, color: "var(--text-muted)" }}>{row.seo}</p>
                  </div>
                  <div style={{ padding: 16, background: "rgba(14,138,95,0.03)", borderLeft: "1px solid rgba(20,16,8,0.06)" }}>
                    <p style={{ margin: "0 0 8px", fontSize: 10, fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.08em", color: ACCENT }}>{t("geo.cmp.geo_short")}</p>
                    <p style={{ margin: 0, fontSize: 12, lineHeight: 1.6, fontWeight: 500, color: "var(--text-strong)" }}>{row.geo}</p>
                  </div>
                </div>
              </div>
            </Reveal>
          ))}
        </div>
      </div>
    </section>
  );
}

// ── Section 5: How GEO works ────────────────────────────────────────────────
function HowItWorks() {
  const t = window.LTQM.t;
  const steps = [1, 2, 3].map((i) => ({
    n: "0" + i, title: t(`geo.how.s${i}.title`), points: [1, 2, 3, 4].map((j) => t(`geo.how.s${i}.p${j}`)),
  }));
  return (
    <div className="geo-band-soft">
      <section className="geo-sec">
        <div className="geo-wrap">
          <Reveal>
            <div className="geo-center" style={{ marginBottom: 64 }}>
              <span className="geo-label">{t("geo.how.pill")}</span>
              <h2 className="geo-h2">{t("geo.how.title")} {t("geo.how.gray")}</h2>
            </div>
          </Reveal>
          <div style={{ maxWidth: "48rem", margin: "0 auto" }}>
            {steps.map((s, i) => (
              <Reveal key={i} delay={(i + 1) * 80}>
                <div className="geo-step" style={{ borderBottom: i < steps.length - 1 ? "1px solid rgba(20,16,8,0.08)" : "none" }}>
                  <span className="geo-step-num" aria-hidden="true">{s.n}</span>
                  <div style={{ minWidth: 0 }}>
                    <h3>{s.title}</h3>
                    <ul>{s.points.map((p, j) => <li key={j}>{p}</li>)}</ul>
                  </div>
                </div>
              </Reveal>
            ))}
          </div>
        </div>
      </section>
    </div>
  );
}

// ── Section 6: GEO with SQSEO (nivk "GEO for Shopify" layout) ───────────────
const SQ_ICONS = ["message-circle", "bar-chart-3", "search-check", "target"];
function GeoInSqseo() {
  const t = window.LTQM.t;
  const benefits = [1, 2, 3, 4].map((i) => ({ title: t(`geo.sq.b${i}.t`), d: t(`geo.sq.b${i}.d`) }));
  return (
    <section className="geo-sec" style={{ position: "relative", overflow: "hidden" }}>
      <div aria-hidden="true" style={{ position: "absolute", inset: 0, pointerEvents: "none",
        background: "linear-gradient(135deg, rgba(14,138,95,0.04) 0%, transparent 50%, rgba(14,138,95,0.02) 100%)" }} />
      <div className="geo-wrap" style={{ position: "relative" }}>
        <Reveal>
          <div className="geo-center">
            <span className="geo-label">{t("geo.sq.pill")}</span>
            <h2 className="geo-h2">{t("geo.sq.title")} {t("geo.sq.gray")}</h2>
            <p className="geo-sub" style={{ maxWidth: "42rem", marginLeft: "auto", marginRight: "auto" }}>{t("geo.sq.sub")}</p>
          </div>
        </Reveal>
        <div className="geo-benefits">
          {benefits.map((b, i) => (
            <Reveal key={i} delay={(i + 1) * 80} style={{ display: "flex" }}>
              <div className="geo-bcard" style={{ flex: 1 }}>
                <span className="geo-bcard-icon"><Icon name={SQ_ICONS[i]} size={20} strokeWidth={1.8} /></span>
                <h3>{b.title}</h3>
                <p>{b.d}</p>
              </div>
            </Reveal>
          ))}
        </div>
      </div>
    </section>
  );
}

// ── Section 7: FAQ (nivk FAQItem: chevron + grid-rows) ──────────────────────
function FAQItem({ q, a, index }) {
  const [open, setOpen] = React.useState(false);
  return (
    <Reveal delay={index * 60}>
      <div className="geo-faq-item">
        <button type="button" className="geo-faq-q" onClick={() => setOpen(!open)} aria-expanded={open}>
          <span className="geo-faq-qt">{q}</span>
          <span className={"geo-faq-chev" + (open ? " open" : "")}><Icon name="chevron-down" size={20} strokeWidth={1.8} /></span>
        </button>
        <div className={"geo-faq-a" + (open ? " open" : "")}><div><p>{a}</p></div></div>
      </div>
    </Reveal>
  );
}

function GeoFaq() {
  const t = window.LTQM.t;
  const items = [1, 2, 3, 4, 5].map((i) => ({ q: t(`geo.faq.${i}.q`), a: t(`geo.faq.${i}.a`) }));
  return (
    <div className="geo-band-soft">
      <section className="geo-sec">
        <div className="geo-wrap">
          <Reveal>
            <div className="geo-center" style={{ marginBottom: 64 }}>
              <span className="geo-label">{t("geo.faq.pill")}</span>
              <h2 className="geo-h2">{t("geo.faq.title")}</h2>
            </div>
          </Reveal>
          <div style={{ maxWidth: "48rem", margin: "0 auto" }}>
            {items.map((item, i) => <FAQItem key={i} q={item.q} a={item.a} index={i + 1} />)}
          </div>
        </div>
      </section>
    </div>
  );
}

// ── Section 8: Final CTA (nivk dark band, ink + emerald glow) ───────────────
function FinalCta() {
  const t = window.LTQM.t, href = window.LTQM.href;
  return (
    <div className="geo-cta">
      <section className="geo-sec" style={{ position: "relative" }}>
        <div className="geo-wrap">
          <div style={{ maxWidth: "40rem", margin: "0 auto", textAlign: "center" }}>
            <Reveal><h2 className="geo-cta-h2">{t("geo.cta.title")}</h2></Reveal>
            <Reveal delay={80}><p className="geo-cta-p">{t("geo.cta.sub")}</p></Reveal>
            <Reveal delay={160}>
              <div className="geo-cta-btns">
                <a className="geo-cta-primary" href="/app/register.html">
                  {t("geo.cta.primary")}<Icon name="arrow-right" size={16} strokeWidth={2} />
                </a>
                <a className="geo-cta-secondary" href={href("/tools")}>{t("geo.cta.secondary")}</a>
              </div>
            </Reveal>
          </div>
        </div>
      </section>
    </div>
  );
}

function WhatIsGeo() {
  return (
    <div style={{ overflowX: "clip", background: "var(--bg-app, #fff)" }}>
      <style>{GEO_CSS}</style>
      <CinematicHero />
      <Definition />
      <WhyMatters />
      <Comparison />
      <HowItWorks />
      <GeoInSqseo />
      <GeoFaq />
      <FinalCta />
    </div>
  );
}

window.LTQM = window.LTQM || {};
window.LTQM.WhatIsGeo = WhatIsGeo;
})();
