/* Tuo v3 — Validation, Partners, Capacity, Risks, FAQ, Footer */

// ── Seasonality matrix data helpers ──
// Real data lives on window.TUO_SEASONALITY (see seasonality-data.js, generated from the Excel).
// For each product we have ~144 rows of {entry, exit, months, cagr, maxDD, nav, vol, calmar, sharpe, sortino, underwater}.
const SEASON_PRODUCTS = ['BP Core', 'BP Bullish', 'Dynamic Hedge', 'BTC HODL'];
const SEASON_PRODUCT_COLORS = {
  'BP Core': '#3ecf8e',
  'BP Bullish': '#f5a524',
  'Dynamic Hedge': '#7c8bff',
  'BTC HODL': '#f7931a',
};
const SEASON_ENTRIES = ['2021-Q3','2021-Q4','2022-Q1','2022-Q2','2022-Q3','2022-Q4','2023-Q1','2023-Q2','2023-Q3','2023-Q4','2024-Q1','2024-Q2','2024-Q3','2024-Q4','2025-Q1','2025-Q2'];
const SEASON_EXITS = ['2022-Q3','2022-Q4','2023-Q1','2023-Q2','2023-Q3','2023-Q4','2024-Q1','2024-Q2','2024-Q3','2024-Q4','2025-Q1','2025-Q2','2025-Q3','2025-Q4','2026-Q1','2026-Q2'];

function seasonCellLookup(product) {
  const data = (window.TUO_SEASONALITY || {})[product] || [];
  const map = new Map();
  for (const c of data) map.set(c.entry + '>' + c.exit, c);
  return map;
}

function fmtPct(v, signed) { if (v == null || isNaN(v)) return '—'; const s = (signed && v > 0 ? '+' : '') + v.toFixed(2) + '%'; return s; }
function fmtMoney(v) { if (v == null || isNaN(v)) return '—'; return '$' + Math.round(v).toLocaleString('en-US'); }
function shortQ(q) { if (!q) return ''; const [y, qq] = q.split('-'); return qq + ' ' + y; }

// Diverging color scale for BTC HODL (red ↔ green), monotonic green for Tuo products.
function seasonColorFor(v, product) {
  if (v == null || isNaN(v)) return 'transparent';
  if (product === 'BTC HODL') {
    // red → neutral → green, anchored on this product's range (-65 → +222)
    if (v >= 0) {
      const t = Math.min(1, v / 80); // saturate at +80% so cells aren't all near-white
      return `oklch(${42 + t * 24}% ${0.05 + t * 0.16} 152 / 0.95)`;
    } else {
      const t = Math.min(1, -v / 65);
      return `oklch(${48 - t * 16}% ${0.08 + t * 0.18} 27 / 0.95)`;
    }
  }
  // Tuo products: dark mint → bright mint, range varies by product but normalize 0-80
  const min = 0, max = 80;
  const t = Math.max(0, Math.min(1, (v - min) / (max - min)));
  const lightness = 22 + t * 42;
  const chroma = 0.04 + t * 0.16;
  return `oklch(${lightness}% ${chroma} 165 / 0.96)`;
}

function SeasonProductPicker({ value, onChange, en }) {
  return React.createElement('div', { className: 'season-picker', role: 'tablist' },
    SEASON_PRODUCTS.map(p => React.createElement('button', {
      key: p,
      role: 'tab',
      'aria-selected': p === value,
      className: 'season-picker-btn' + (p === value ? ' active' : '') + (p === 'BTC HODL' ? ' benchmark' : ''),
      style: { '--c': SEASON_PRODUCT_COLORS[p] },
      onClick: () => onChange(p),
    },
      React.createElement('span', { className: 'season-picker-dot' }),
      p,
      p === 'BTC HODL' && React.createElement('span', { className: 'season-picker-tag' }, en ? 'benchmark' : 'benchmark')
    ))
  );
}

function SeasonLegend({ product, stats, en }) {
  const isBtc = product === 'BTC HODL';
  return React.createElement('div', { className: 'season-legend-row' },
    React.createElement('div', { className: 'season-legend-summary' },
      React.createElement('span', { className: 'season-legend-strong' },
        isBtc
          ? (en ? `${stats.negative} of ${stats.total} windows lost money` : `${stats.negative} de ${stats.total} ventanas perdieron dinero`)
          : (en ? `${stats.total} windows tested · 0 negative` : `${stats.total} ventanas testeadas · 0 negativas`)
      ),
      React.createElement('span', { className: 'season-legend-stats' },
        en ? 'Min ' : 'Mín ', React.createElement('b', null, fmtPct(stats.min, true)), ' · ',
        en ? 'Median ' : 'Mediana ', React.createElement('b', null, fmtPct(stats.median, true)), ' · ',
        en ? 'Max ' : 'Máx ', React.createElement('b', null, fmtPct(stats.max, true))
      )
    ),
    React.createElement('div', { className: 'season-legend-scale' },
      React.createElement('span', { className: 'season-legend-tick' }, isBtc ? '−65%' : '0%'),
      React.createElement('span', { className: 'season-legend-bar', 'data-mode': isBtc ? 'div' : 'mono' }),
      React.createElement('span', { className: 'season-legend-tick' }, isBtc ? '+80%+' : '+80%'),
      React.createElement('span', { className: 'season-legend-axis-label' }, 'CAGR')
    )
  );
}

// ── The big matrix ──
function SeasonalityMatrix({ product, onCell, en }) {
  const lookup = React.useMemo(() => seasonCellLookup(product), [product]);
  const stats = React.useMemo(() => {
    const vals = [...lookup.values()].map(c => c.cagr).sort((a, b) => a - b);
    const n = vals.length;
    if (!n) return { min: 0, median: 0, max: 0, total: 0, negative: 0 };
    return {
      min: vals[0],
      median: vals[Math.floor(n / 2)],
      max: vals[n - 1],
      total: n,
      negative: vals.filter(v => v < 0).length,
    };
  }, [lookup]);

  return React.createElement('div', { className: 'season-block' },
    React.createElement(SeasonLegend, { product, stats, en }),
    React.createElement('div', { className: 'season-matrix-wrap' },
      React.createElement('table', { className: 'season-matrix', 'data-product': product },
        React.createElement('thead', null,
          React.createElement('tr', null,
            React.createElement('th', { className: 'season-corner' },
              React.createElement('span', null, en ? 'Entry ↓' : 'Entrada ↓'),
              React.createElement('span', null, en ? 'Exit →' : 'Salida →')),
            SEASON_EXITS.map(q => React.createElement('th', { key: q, scope: 'col' }, shortQ(q))))),
        React.createElement('tbody', null,
          SEASON_ENTRIES.map((entry, ri) => React.createElement('tr', { key: entry },
            React.createElement('th', { className: 'season-row-head', scope: 'row' }, shortQ(entry)),
            SEASON_EXITS.map((exit, ci) => {
              const cell = lookup.get(entry + '>' + exit);
              if (!cell) return React.createElement('td', { key: exit, className: 'season-cell-empty', 'aria-hidden': true });
              const v = cell.cagr;
              const tooltip = (en
                ? `${shortQ(entry)} → ${shortQ(exit)} · ${cell.months} mo · CAGR ${fmtPct(v, true)} · Max DD ${fmtPct(cell.maxDD)}`
                : `${shortQ(entry)} → ${shortQ(exit)} · ${cell.months} mes · CAGR ${fmtPct(v, true)} · Max DD ${fmtPct(cell.maxDD)}`);
              const isNeg = v < 0;
              return React.createElement('td', {
                key: exit,
                className: 'season-cell' + (isNeg ? ' negative' : ''),
                style: { background: seasonColorFor(v, product), animationDelay: `${(ri + ci) * 18}ms` },
                title: tooltip,
                onClick: () => onCell({ ...cell, product }),
                tabIndex: 0,
                onKeyDown: (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onCell({ ...cell, product }); } },
              },
                React.createElement('span', { className: 'season-cell-val' }, fmtPct(v, true).replace('%', ''))
              );
            })
          ))
        )
      )
    )
  );
}

// ── Mini equity chart (compact SVG inside View More panel) ──
// Renders the strategy NAV across the cell's entry→exit window vs BTC HODL,
// with the underwater region shaded red and a red marker at the deepest drawdown.
function MiniEquityChart({ cell, en, c }) {
  const d = (typeof window !== 'undefined') && window.TUO_PERF_DATA;
  if (!d || !d.weeks) return null;
  const seriesMap = {
    'BP Core': d.bpCoreWeekly, 'BP Bullish': d.bpBullishWeekly,
    'Dynamic Hedge': d.dynHedgeWeekly, 'BTC HODL': d.btcHodlWeekly,
  };
  const stratNav = seriesMap[cell.product];
  if (!stratNav) return null;

  // "2022-Q4" → start/end dates
  const qStart = (q) => { const [y, qq] = q.split('-'); const m = { Q1:0, Q2:3, Q3:6, Q4:9 }[qq]; return new Date(Date.UTC(+y, m, 1)); };
  const qEnd = (q) => { const [y, qq] = q.split('-'); const m = { Q1:2, Q2:5, Q3:8, Q4:11 }[qq]; const dd = { Q1:31, Q2:30, Q3:30, Q4:31 }[qq]; return new Date(Date.UTC(+y, m, dd)); };
  const startDate = qStart(cell.entry), endDate = qEnd(cell.exit);
  const weeks = d.weeks;
  let startIdx = weeks.findIndex(w => new Date(w + 'T00:00:00Z') >= startDate);
  let endIdx = -1;
  for (let i = weeks.length - 1; i >= 0; i--) { if (new Date(weeks[i] + 'T00:00:00Z') <= endDate) { endIdx = i; break; } }
  if (startIdx < 0 || endIdx < 0 || startIdx >= endIdx) return null;

  const stratSlice = stratNav.slice(startIdx, endIdx + 1);
  const btcSlice = d.btcHodlWeekly.slice(startIdx, endIdx + 1);
  const sN = stratSlice.map(v => v / stratSlice[0] * 100);
  const bN = btcSlice.map(v => v / btcSlice[0] * 100);

  // Drawdown trace on the strategy
  let peak = -Infinity, maxDD = 0, maxDDIdx = 0;
  const peakArr = [], ddArr = [];
  for (let i = 0; i < sN.length; i++) {
    if (sN[i] > peak) peak = sN[i];
    peakArr.push(peak);
    const ddv = peak > 0 ? (peak - sN[i]) / peak : 0;
    ddArr.push(ddv);
    if (ddv > maxDD) { maxDD = ddv; maxDDIdx = i; }
  }

  const W = 480, H = 130, padX = 8, padY = 14;
  const innerW = W - padX * 2, innerH = H - padY * 2;
  const allV = sN.concat(cell.product === 'BTC HODL' ? [] : bN);
  const minY = Math.min(...allV), maxY = Math.max(...allV);
  const xy = (i, v) => [
    padX + (i / Math.max(1, sN.length - 1)) * innerW,
    padY + innerH - ((v - minY) / ((maxY - minY) || 1)) * innerH
  ];
  const toPath = (arr) => arr.map((v, i) => (i === 0 ? 'M' : 'L') + xy(i, v).join(',')).join(' ');
  const stratPath = toPath(sN);
  const btcPath = cell.product === 'BTC HODL' ? null : toPath(bN);

  // Underwater regions (closed path between peakArr and sN during DD)
  const uwPaths = [];
  let i = 0;
  while (i < sN.length) {
    if (ddArr[i] > 0.001) {
      let j = i;
      while (j < sN.length && ddArr[j] > 0.001) j++;
      let p = '';
      for (let k = i; k < j; k++) { const [x, y] = xy(k, peakArr[k]); p += (k === i ? 'M' : 'L') + x + ',' + y + ' '; }
      for (let k = j - 1; k >= i; k--) { const [x, y] = xy(k, sN[k]); p += 'L' + x + ',' + y + ' '; }
      p += 'Z';
      uwPaths.push(p);
      i = j;
    } else { i++; }
  }

  const [mx, my] = xy(maxDDIdx, sN[maxDDIdx]);
  const [, py] = xy(maxDDIdx, peakArr[maxDDIdx]);

  const dot = (color) => React.createElement('span', { className: 'vm-mini-legend-dot', style: { background: color } });

  return React.createElement('section', { className: 'vm-section' },
    React.createElement('h4', null, en ? 'Window curve · vs BTC HODL' : 'Curva del período · vs BTC HODL'),
    React.createElement('div', { className: 'vm-mini-chart' },
      React.createElement('svg', {
        viewBox: `0 0 ${W} ${H}`, width: '100%', height: H,
        preserveAspectRatio: 'none', style: { display: 'block' }
      },
        // Underwater shading (red)
        uwPaths.map((p, idx) => React.createElement('path', {
          key: 'uw-' + idx, d: p,
          fill: 'rgba(255, 80, 80, 0.18)', stroke: 'rgba(255, 80, 80, 0.4)', strokeWidth: 0.6
        })),
        // BTC HODL benchmark line
        btcPath && React.createElement('path', {
          d: btcPath, fill: 'none', stroke: '#f7931a', strokeWidth: 1.4,
          strokeDasharray: '3 3', opacity: 0.7
        }),
        // Strategy line
        React.createElement('path', { d: stratPath, fill: 'none', stroke: c, strokeWidth: 1.8 }),
        // Max DD marker (red vertical line + dot at the trough)
        React.createElement('line', {
          x1: mx, y1: py, x2: mx, y2: my,
          stroke: 'rgba(255, 80, 80, 0.85)', strokeWidth: 1.2, strokeDasharray: '2 2'
        }),
        React.createElement('circle', {
          cx: mx, cy: my, r: 3.5, fill: '#ff5050', stroke: '#0c0c0c', strokeWidth: 1
        })
      ),
      React.createElement('div', { className: 'vm-mini-legend' },
        React.createElement('span', null, dot(c), cell.product),
        btcPath && React.createElement('span', null, dot('#f7931a'), 'BTC HODL'),
        React.createElement('span', null, dot('#ff5050'),
          en ? `Max DD ${(maxDD * 100).toFixed(1)}%` : `Max DD ${(maxDD * 100).toFixed(1).replace('.', ',')}%`)
      )
    )
  );
}

// ── View More panel (side sheet) ──
function ViewMorePanel({ cell, onClose, en }) {
  // Esc to close, lock scroll while open
  React.useEffect(() => {
    if (!cell) return;
    const onKey = (e) => { if (e.key === 'Escape') onClose(); };
    document.addEventListener('keydown', onKey);
    const prevOverflow = document.body.style.overflow;
    document.body.style.overflow = 'hidden';
    return () => { document.removeEventListener('keydown', onKey); document.body.style.overflow = prevOverflow; };
  }, [cell, onClose]);
  if (!cell) return null;

  // For comparison block, look up BTC HODL cell on same window
  const btcMap = seasonCellLookup('BTC HODL');
  const btc = btcMap.get(cell.entry + '>' + cell.exit);
  // Find this product's full 5y in-sample reference (entry 2021-Q3 → exit 2026-Q2)
  const fullMap = seasonCellLookup(cell.product);
  const full = fullMap.get('2021-Q3>2026-Q2');
  const c = SEASON_PRODUCT_COLORS[cell.product] || '#3ecf8e';

  const Stat = ({ label, value, hint, tone }) => React.createElement('div', { className: 'vm-stat' + (tone ? ' tone-' + tone : '') },
    React.createElement('div', { className: 'vm-stat-label' }, label),
    React.createElement('div', { className: 'vm-stat-value' }, value),
    hint && React.createElement('div', { className: 'vm-stat-hint' }, hint)
  );

  const Delta = ({ a, b, format, suffix }) => {
    if (a == null || b == null) return React.createElement('span', { className: 'vm-delta' }, '—');
    const d = a - b;
    const positive = d > 0;
    const txt = (format || ((x) => x.toFixed(2)))(d) + (suffix || '');
    return React.createElement('span', { className: 'vm-delta ' + (positive ? 'pos' : d < 0 ? 'neg' : '') }, (positive ? '+' : '') + txt);
  };

  return React.createElement('div', { className: 'vm-overlay', onClick: onClose, role: 'dialog', 'aria-modal': true },
    React.createElement('aside', { className: 'vm-panel', onClick: (e) => e.stopPropagation(), style: { '--c': c } },
      React.createElement('header', { className: 'vm-head' },
        React.createElement('div', { className: 'vm-eyebrow' },
          React.createElement('span', { className: 'vm-dot' }),
          cell.product
        ),
        React.createElement('h3', null, en
          ? `Entry ${shortQ(cell.entry)} → Exit ${shortQ(cell.exit)}`
          : `Entrada ${shortQ(cell.entry)} → Salida ${shortQ(cell.exit)}`
        ),
        React.createElement('p', { className: 'vm-sub' }, en ? `${cell.months} months held` : `${cell.months} meses`),
        React.createElement('button', { className: 'vm-close', onClick: onClose, 'aria-label': 'Close' }, '×')
      ),

      // Primary metrics
      React.createElement('section', { className: 'vm-section' },
        React.createElement('h4', null, en ? 'Outcome' : 'Resultado'),
        React.createElement('div', { className: 'vm-stats vm-stats-3' },
          React.createElement(Stat, { label: en ? 'CAGR (net)' : 'CAGR (neto)', value: fmtPct(cell.cagr, true), tone: cell.cagr < 0 ? 'neg' : 'pos' }),
          React.createElement(Stat, { label: en ? 'Max drawdown' : 'Drawdown máx.', value: fmtPct(cell.maxDD) }),
          React.createElement(Stat, { label: en ? 'NAV from $100,000' : 'NAV desde $100.000', value: fmtMoney(cell.nav) })
        )
      ),

      // Risk-adjusted
      React.createElement('section', { className: 'vm-section' },
        React.createElement('h4', null, en ? 'Risk-adjusted' : 'Ajustado por riesgo'),
        React.createElement('div', { className: 'vm-stats vm-stats-4' },
          React.createElement(Stat, { label: en ? 'Annualized vol.' : 'Volatilidad anual.', value: fmtPct(cell.vol), hint: en ? 'σ of daily returns' : 'σ retornos diarios' }),
          React.createElement(Stat, { label: 'Sharpe', value: cell.sharpe != null ? cell.sharpe.toFixed(2) : '—', hint: en ? 'Yield / volatility' : 'Yield / volatilidad' }),
          React.createElement(Stat, { label: 'Calmar', value: cell.calmar != null ? cell.calmar.toFixed(2) : '—', hint: en ? 'CAGR / max DD' : 'CAGR / max DD' }),
          React.createElement(Stat, { label: en ? '% time underwater' : '% tiempo underwater', value: fmtPct(cell.underwater), hint: en ? 'Days below peak' : 'Días bajo el peak' })
        )
      ),

      // Comparison vs BTC HODL — same window
      btc && cell.product !== 'BTC HODL' && React.createElement('section', { className: 'vm-section vm-compare' },
        React.createElement('h4', null, en ? 'vs BTC HODL · same window' : 'vs BTC HODL · misma ventana'),
        React.createElement('table', { className: 'vm-table' },
          React.createElement('thead', null, React.createElement('tr', null,
            React.createElement('th', null, ''),
            React.createElement('th', null, cell.product),
            React.createElement('th', null, 'BTC HODL'),
            React.createElement('th', null, 'Δ')
          )),
          React.createElement('tbody', null,
            React.createElement('tr', null,
              React.createElement('td', null, 'CAGR'),
              React.createElement('td', { className: 'vm-num' }, fmtPct(cell.cagr, true)),
              React.createElement('td', { className: 'vm-num' }, fmtPct(btc.cagr, true)),
              React.createElement('td', { className: 'vm-num' }, React.createElement(Delta, { a: cell.cagr, b: btc.cagr, suffix: ' pp' }))
            ),
            React.createElement('tr', null,
              React.createElement('td', null, en ? 'Max drawdown' : 'Max drawdown'),
              React.createElement('td', { className: 'vm-num' }, fmtPct(cell.maxDD)),
              React.createElement('td', { className: 'vm-num' }, fmtPct(btc.maxDD)),
              React.createElement('td', { className: 'vm-num' }, React.createElement(Delta, { a: cell.maxDD, b: btc.maxDD, suffix: ' pp' }))
            ),
            React.createElement('tr', null,
              React.createElement('td', null, en ? 'NAV from $100k' : 'NAV desde $100k'),
              React.createElement('td', { className: 'vm-num' }, fmtMoney(cell.nav)),
              React.createElement('td', { className: 'vm-num' }, fmtMoney(btc.nav)),
              React.createElement('td', { className: 'vm-num' }, React.createElement(Delta, { a: cell.nav, b: btc.nav, format: (x) => '$' + Math.round(x).toLocaleString('en-US') }))
            )
          )
        )
      ),

      // Comparison vs full 5-year in-sample
      full && cell.entry + '>' + cell.exit !== '2021-Q3>2026-Q2' && React.createElement('section', { className: 'vm-section vm-compare' },
        React.createElement('h4', null, en ? 'vs full 5y in-sample' : 'vs full 5a in-sample'),
        React.createElement('table', { className: 'vm-table' },
          React.createElement('thead', null, React.createElement('tr', null,
            React.createElement('th', null, ''),
            React.createElement('th', null, en ? 'This window' : 'Esta ventana'),
            React.createElement('th', null, en ? 'Full 5y' : 'Full 5a'),
            React.createElement('th', null, en ? 'Note' : 'Nota')
          )),
          React.createElement('tbody', null,
            React.createElement('tr', null,
              React.createElement('td', null, 'CAGR'),
              React.createElement('td', { className: 'vm-num' }, fmtPct(cell.cagr, true)),
              React.createElement('td', { className: 'vm-num' }, fmtPct(full.cagr, true)),
              React.createElement('td', { className: 'vm-note' },
                cell.cagr >= full.cagr
                  ? (en ? 'above the headline' : 'sobre el headline')
                  : (en ? 'below the headline' : 'debajo del headline')
              )
            ),
            React.createElement('tr', null,
              React.createElement('td', null, en ? 'Max drawdown' : 'Max drawdown'),
              React.createElement('td', { className: 'vm-num' }, fmtPct(cell.maxDD)),
              React.createElement('td', { className: 'vm-num' }, fmtPct(full.maxDD)),
              React.createElement('td', { className: 'vm-note' },
                cell.maxDD <= full.maxDD
                  ? (en ? 'shallower' : 'más superficial')
                  : (en ? 'slightly deeper' : 'un poco más profundo')
              )
            )
          )
        )
      ),

      // Compact equity curve for this exact entry→exit window vs BTC HODL,
      // with red shading on underwater periods + red marker at the deepest drawdown.
      React.createElement(MiniEquityChart, { cell, en, c }),

      React.createElement('footer', { className: 'vm-foot' },
        React.createElement('p', { className: 'vm-disclaimer' }, en
          ? 'Hypothetical, based on backtest 2021–2026 on Arbitrum. Past results do not guarantee future outcomes.'
          : 'Hipotético, basado en backtest 2021–2026 en Arbitrum. El desempeño pasado no garantiza resultados futuros.'),
        React.createElement('a', { className: 'vm-method', href: 'https://docs.tuo.app/methodology', target: '_blank', rel: 'noreferrer' },
          en ? 'How we computed this →' : 'Cómo calculamos esto →')
      )
    )
  );
}

function ValidationSection() {
  const en = useLang() === 'en';
  const [product, setProduct] = React.useState('BP Core');
  const [activeCell, setActiveCell] = React.useState(null);

  // Pillar 1: tape audit · 2: seasonality · 3: walk-forward · 4: stress
  const pillarsCopy = en ? [
    {
      q: 'Are the numbers real?',
      a: 'Every fee, every cost, every payment in our backtest was rebuilt from raw on-chain transactions. Then an independent auditor rebuilt the entire 5-year computation from scratch — separately — and compared it to ours, line by line.',
      anchor: 'Discrepancy: 0.01% across 20 million checks.', anchorSub: 'Below the 5% threshold institutional auditors require.',
      cta: 'Read the full audit report →',
    },
    null, // pillar 2 is rendered separately as the hero block below
    {
      q: 'Did you over-tune the strategy to past data?',
      a: "The fastest way to lie with a backtest is to optimize the strategy against the same data you're showing. We tested it on 60 different windows the strategy had never seen during design.",
      anchor: 'Out-of-sample held within 4–6 pp of in-sample.', anchorSub: 'No detectable overfitting.',
    },
    {
      q: 'What if everything breaks at once?',
      a: 'We modeled seven extreme scenarios — Ethereum flash-crashing 50% in a day, Bitcoin dropping 40% in five days, fees collapsing to a fifth, funding inverting. Then we ran each product through every one.',
      anchor: 'Six of seven passed with margins intact.', anchorSub: 'The one failure mode — sustained ETH/BTC correlation breakdown for 3+ months — has never been observed in 6+ years of crypto data.',
    },
  ] : [
    {
      q: '¿Los números son reales?',
      a: 'Cada fee, cada costo, cada pago en nuestro backtest fue reconstruido desde transacciones on-chain crudas. Después, un auditor independiente rearmó el cálculo completo de 5 años desde cero — por separado — y lo comparó con el nuestro, línea por línea.',
      anchor: 'Discrepancia: 0,01% en 20 millones de verificaciones.', anchorSub: 'Por debajo del threshold de 5% que requieren los auditores institucionales.',
      cta: 'Leer el reporte de auditoría completo →',
    },
    null,
    {
      q: '¿Sobreajustaron la estrategia a la data del pasado?',
      a: 'La forma más rápida de mentir con un backtest es optimizar la estrategia contra la misma data que estás mostrando. La testeamos sobre 60 ventanas distintas que la estrategia nunca vio durante el diseño.',
      anchor: 'Fuera de muestra: dentro de 4–6 pp del in-sample.', anchorSub: 'Sin overfitting detectable.',
    },
    {
      q: '¿Qué pasa si todo se rompe al mismo tiempo?',
      a: 'Modelamos siete escenarios extremos — Ethereum cayendo 50% en un día, Bitcoin bajando 40% en cinco días, los fees colapsando a un quinto, el funding invirtiéndose. Después corrimos cada producto a través de cada uno.',
      anchor: 'Seis de siete pasaron con márgenes intactos.', anchorSub: 'El único modo de falla — correlation breakdown ETH/BTC sostenido por 3+ meses — nunca fue observado en 6+ años de data cripto.',
    },
  ];

  const Pillar = ({ data, idx }) => React.createElement('article', { className: 'pillar-v2', 'data-section-label': `Pillar ${idx}` },
    React.createElement('div', { className: 'pillar-v2-tag' }, en ? `QUESTION 0${idx}` : `PREGUNTA 0${idx}`),
    React.createElement('h3', { className: 'pillar-v2-q' }, data.q),
    React.createElement('p', { className: 'pillar-v2-a' }, data.a),
    React.createElement('div', { className: 'pillar-v2-anchor' },
      React.createElement('div', { className: 'pillar-v2-anchor-bar' }),
      React.createElement('strong', null, data.anchor),
      data.anchorSub && React.createElement('span', null, data.anchorSub)
    ),
    data.cta && React.createElement('a', { className: 'pillar-v2-cta', href: '#' }, data.cta)
  );

  return React.createElement(Section, { id: 'validation', className: 'validation-v2' },
    React.createElement(SectionTitle, null, en
      ? 'Four questions you should be asking. Four answers we already documented.'
      : 'Cuatro preguntas que deberías estar haciéndote. Cuatro respuestas ya documentadas.'),

    // Pillar 1
    React.createElement(Reveal, null, React.createElement(Pillar, { data: pillarsCopy[0], idx: 1 })),

    // Pillar 2 — hero seasonality block
    React.createElement(Reveal, { delay: 0.05 },
      React.createElement('article', { className: 'pillar-v2 pillar-v2-hero', 'data-section-label': 'Pillar 2 · Seasonality matrix' },
        React.createElement('div', { className: 'pillar-v2-tag' }, en ? 'QUESTION 02' : 'PREGUNTA 02'),
        React.createElement('h3', { className: 'pillar-v2-q' }, en
          ? 'Does this only work if I started at the perfect moment?'
          : '¿Solo funciona si arranqué en el momento perfecto?'),
        React.createElement('p', { className: 'pillar-v2-a' }, en
          ? React.createElement(React.Fragment, null,
              'We tested every possible 12-month entry-and-exit pair across our 5-year window — for all three products. ',
              React.createElement('b', null, '432 combinations. Every single one ended positive.'),
              ' The matrix below shows BP Core. Each cell is a different entry-exit pair. The pattern is the answer.')
          : React.createElement(React.Fragment, null,
              'Testeamos cada par posible de entrada y salida de 12 meses sobre nuestra ventana de 5 años — para los tres productos. ',
              React.createElement('b', null, '432 combinaciones. Cada una terminó positiva.'),
              ' La matriz de abajo muestra BP Core. Cada celda es un par entrada-salida distinto. El patrón es la respuesta.')
        ),
        React.createElement('div', { className: 'pillar-v2-anchor' },
          React.createElement('div', { className: 'pillar-v2-anchor-bar' }),
          React.createElement('strong', null, en
            ? 'Worst Tuo combination across all products: +2.8% CAGR (Dynamic Hedge).'
            : 'Peor combinación Tuo entre todos los productos: +2,8% CAGR (Dynamic Hedge).'),
          React.createElement('span', null, en
            ? 'For comparison, holding Bitcoin over the same set of windows produced 26 negative outcomes out of 151, with the worst losing more than 65%.'
            : 'Para comparar, holdear Bitcoin sobre ese mismo set de ventanas produjo 26 resultados negativos de 151, con el peor perdiendo más de 65%.')
        ),

        React.createElement(SeasonProductPicker, { value: product, onChange: setProduct, en }),
        React.createElement(SeasonalityMatrix, { product, onCell: setActiveCell, en }),

        React.createElement('p', { className: 'season-disclaimer' }, en
          ? 'Hypothetical, based on backtest 2021–2026 on Arbitrum. Click any cell for the full window detail. Past results do not guarantee future outcomes.'
          : 'Hipotético, basado en backtest 2021–2026 en Arbitrum. Click en cualquier celda para ver el detalle completo. El desempeño pasado no garantiza resultados futuros.')
      )
    ),

    // Pillar 3
    React.createElement(Reveal, { delay: 0.1 }, React.createElement(Pillar, { data: pillarsCopy[2], idx: 3 })),
    // Pillar 4
    React.createElement(Reveal, { delay: 0.15 }, React.createElement(Pillar, { data: pillarsCopy[3], idx: 4 })),

    React.createElement(ViewMorePanel, { cell: activeCell, onClose: () => setActiveCell(null), en })
  );
}

function PartnerLogo({ name }) {
  const common = { width: 40, height: 40, viewBox: '0 0 44 44', xmlns: 'http://www.w3.org/2000/svg' };
  switch (name) {
    case 'Uniswap V3':
      return React.createElement('svg', common,
        React.createElement('circle', { cx: 22, cy: 22, r: 22, fill: '#FF007A' }),
        React.createElement('path', { d: 'M17 14c-1 .6-1.5 1.5-1.5 2.7 0 1.4.6 2.4 2 3.3l1 .6-.9-1.3c-1.3-1.7-1.4-3.2-.4-4.6.4-.6.4-.6-.2-.7zm9 1.4c-.4-.1-.4 0-.2.5.2.4.2.8.2 1.1.1.4.5.9 1.1 1.3.8.4.9.6.6 1-.4.5-1.8.6-3.1.1-1.6-.6-1.8-.6-1.3-.1.6.6 2 1.4 3 1.5.9.2.9.2-.4 1-1.3.6-1.3.6-.5.9.6.2.9.5.9.9 0 .8-1.5 1.5-3.1 1.5-1.5 0-2.3-.4-2.3-.8 0-.3.5-.4 1.5-.4.8 0 1.4-.1 1.4-.3 0-.5-1.4-.8-2.4-.6-1.4.4-2.4 1.1-2.3 1.8 0 .9 1.4 2 3.1 2.4l1.4.4-1.3 1.5c-.7.9-1.5 1.6-1.8 1.7-.4.1-.7.4-.7.6 0 .6 1.2 1.3 2.5 1.3 1.3 0 1.3 0 1.5-1.4.1-.8.6-2 1.3-2.8l1.1-1.5.5 1.5c.3 1.3 1 2.4 1.9 3.4l.9 1-1-1.6c-.9-1.5-1.5-3.4-1.3-3.6.2-.1.7.3 1.5 1l1.3.9-.6-1.1c-.9-1.6-2.2-2.9-3.3-3.4-1-.5-1-.5-.6-.8.5-.3.6-.6.4-.9-.1-.4 0-.6.4-.5.4.2.7-.1.8-.7.1-.5.5-.9.8-.9.8 0 .8-.4-.2-.8-.9-.5-.9-.5-.4-.9.7-.7-.5-1.5-1.4-1-.5.3-.7.3-.5 0 .4-.4.2-.5-.6-.5-.6-.1-1.4-.2-1.7-.4z', fill: '#fff' })
      );
    case 'Arbitrum':
      return React.createElement('svg', common,
        React.createElement('circle', { cx: 22, cy: 22, r: 22, fill: '#28A0F0' }),
        React.createElement('path', { d: 'M22 10l-9 17h4.5L22 18.5 26.5 27H31l-9-17z M14 28h4l3-5.5L19.5 19z', fill: '#fff' }),
        React.createElement('path', { d: 'M27 22l3 5h-6z', fill: '#fff' })
      );
    case 'Ethereum':
      return React.createElement('svg', common,
        React.createElement('circle', { cx: 22, cy: 22, r: 22, fill: '#627EEA' }),
        React.createElement('g', { fill: '#fff' },
          React.createElement('path', { fillOpacity: 0.6, d: 'M22 6v11.7l9.9 4.4z' }),
          React.createElement('path', { d: 'M22 6l-9.9 16.1L22 17.7z' }),
          React.createElement('path', { fillOpacity: 0.6, d: 'M22 29.6V38l9.9-13.7z' }),
          React.createElement('path', { d: 'M22 38v-8.4l-9.9-5.3z' }),
          React.createElement('path', { fillOpacity: 0.2, d: 'M22 27.7l9.9-5.6L22 17.7z' }),
          React.createElement('path', { fillOpacity: 0.6, d: 'M12.1 22.1l9.9 5.6V17.7z' })
        )
      );
    case 'Hyperliquid':
      return React.createElement('svg', common,
        React.createElement('rect', { width: 44, height: 44, rx: 22, fill: '#0a1f1c' }),
        React.createElement('path', { d: 'M9 24c0-3 3-5 6-5s4 2 6 2 4-2 7-2 6 2 6 5-2 5-5 5-5-3-7-3-4 3-7 3-6-2-6-5z', fill: '#97FCE4' })
      );
    case 'Chainlink':
      return React.createElement('svg', common,
        React.createElement('circle', { cx: 22, cy: 22, r: 22, fill: '#375BD2' }),
        React.createElement('path', { d: 'M22 10l-8 4.6v9.2L22 28.5l8-4.7v-9.2L22 10zm-5 12.4v-6.1l5-2.9 5 2.9v6.1l-5 2.9-5-2.9z', fill: '#fff' })
      );
    default:
      return null;
  }
}

function PartnersSection() {
  const en = useLang() === 'en';
  const partners = [
    { name: 'Uniswap V3', cat: en ? 'Liquidity venue' : 'Venue de liquidez', claim: en ? 'Tuo provides liquidity on Uniswap V3 pools.' : 'Tuo provee liquidez en pools de Uniswap V3.' },
    { name: 'Arbitrum', cat: en ? 'Network' : 'Red', claim: en ? 'Smart contract deployed on Arbitrum.' : 'Smart contract desplegado en Arbitrum.' },
    { name: 'Ethereum', cat: en ? 'Network' : 'Red', claim: en ? 'Backtest covers Ethereum mainnet 2021–2023.' : 'Backtest cubre Ethereum mainnet 2021–2023.' },
    { name: 'Hyperliquid', cat: en ? 'Hedge venue' : 'Venue de cobertura', claim: en ? 'Perpetual hedges on decentralized derivatives venues.' : 'Coberturas perpetuas en venues descentralizados.' },
    { name: 'Chainlink', cat: en ? 'Oracle' : 'Oráculo', claim: en ? 'Price feeds with redundant median fallback.' : 'Feeds de precio con median fallback redundante.' },
  ];
  return React.createElement(Section, { id: 'partners' },
    React.createElement(SectionTitle, null, en ? 'Built on infrastructure you already trust' : 'Construido sobre infraestructura que ya conocés'),
    React.createElement(Reveal, null, React.createElement('p', null, en ? "We compose proven, audited, public on-chain infrastructure into a single product." : 'Componemos infraestructura on-chain pública, auditada y probada en un solo producto.')),
    React.createElement('div', { className: 'partners-grid' },
      partners.map((p, i) => React.createElement(Reveal, { key: i, delay: i * 0.08 },
        React.createElement('div', { className: 'partner-card' },
          React.createElement('div', { className: 'partner-logo-wrap' }, React.createElement(PartnerLogo, { name: p.name })),
          React.createElement('div', { className: 'partner-name' }, p.name),
          React.createElement('div', { className: 'partner-cat' }, p.cat),
          React.createElement('div', { className: 'partner-claim' }, p.claim),
          React.createElement('div', { className: 'partner-disclaimer' }, en
            ? `Tuo uses ${p.name} infrastructure. Not an endorsement.`
            : `Tuo usa infraestructura de ${p.name}. No es endorsement.`)
        )))
    ),
  );
}

function CapacitySection() {
  const en = useLang() === 'en';
  return React.createElement(Section, { id: 'capacity' },
    React.createElement(SectionTitle, null, en ? 'Capacity & access' : 'Capacidad y acceso'),
    React.createElement(Reveal, null, React.createElement('p', null, en
      ? "Intentionally capped. We refuse to deploy more capital than on-chain liquidity can absorb without dilution."
      : 'Intencionalmente capeado. No desplegamos más capital del que la liquidez on-chain puede absorber sin dilución.')),
    React.createElement(Reveal, { delay: 0.1 },
      React.createElement('div', { className: 'capacity-table-wrap' },
        React.createElement('table', { className: 'capacity-table' },
          React.createElement('thead', null, React.createElement('tr', null,
            ['', en ? 'Phase 1 (Sandbox)' : 'Phase 1 (Sandbox)', 'Phase 2', 'Phase 3'].map((h,i) => React.createElement('th', {key:i}, h)))),
          React.createElement('tbody', null,
            [[en?'TVL cap':'TVL cap', '$500k', '$10M', '$25M'],
             [en?'Per-vault':'Por vault', '$50k', '$250k', '$1M'],
             [en?'Min deposit':'Depósito mín.', '$50k', '$2,500', '$2,500'],
             [en?'Chain':'Cadena', 'Arbitrum', en?'Arbitrum + Ethereum':'Arbitrum + Ethereum', en?'Arbitrum + Ethereum':'Arbitrum + Ethereum'],
             [en?'Performance fee':'Performance fee', '20%', '30%', '30%'],
            ].map((row,i) => React.createElement('tr', {key:i}, row.map((c,j) => React.createElement(j===0?'th':'td', {key:j}, c)))))))),
    React.createElement(Reveal, { delay: 0.2 },
      React.createElement(CardTitle, null, en ? 'Fee structure' : 'Estructura de fees'),
      React.createElement('div', { className: 'capacity-table-wrap' },
        React.createElement('table', { className: 'capacity-table fee-table' },
          React.createElement('thead', null, React.createElement('tr', null, ['Fee', en?'Rate':'Tasa', en?'Applied':'Cuándo'].map((h,i) => React.createElement('th', {key:i}, h)))),
          React.createElement('tbody', null,
            [[en?'Entry':'Entrada', en?'None':'Ninguno', en?'No entry fee':'Sin fee de entrada'],
             [en?'Exit':'Salida', en?'None':'Ninguno', en?'No exit fee':'Sin fee de salida'],
             ['Management', en?'None':'Ninguno', en?'No management fee':'Sin fee de management'],
             ['Performance', en ? '20% / 30%' : '20% / 30%', en?'High-water mark, on profits only · 20% in Phase 1, 30% in Phase 2–3':'High-water mark, solo sobre ganancias · 20% en Phase 1, 30% en Phase 2–3'],
            ].map((row,i) => React.createElement('tr', {key:i}, row.map((c,j) => React.createElement(j===0?'th':'td', {key:j}, c))))))),
      )
  );
}

// Risks section removed from landing per v2 brief consensus.
// Covered by: microcopy, footer link, FAQ questions, app deposit flow.

function FAQSection() {
  const en = useLang() === 'en';
  const [openIdx, setOpenIdx] = React.useState(-1);
  const faqs = en ? [
    { q: 'Do I need DeFi expertise to use Tuo?', a: 'No. You need a self-custody wallet and some USDC, BTC, or ETH. The strategy operates automatically — you deposit, monitor your dashboard, and withdraw when you choose.' },
    { q: 'Who holds my capital?', a: 'You do. Each investor receives an individual on-chain vault represented by an NFT in your wallet. Tuo never takes custody of your funds — we provide the strategy and signals; the capital remains under your control at all times.' },
    { q: 'What is the minimum deposit?', a: 'During Phase 1 (sandbox) the minimum is $50,000 in USDC equivalent. From Phase 2 onward the minimum drops to $2,500. BTC and ETH are also accepted at deposit.' },
    { q: 'Is there a lock-up period?', a: 'No. Withdrawals are available at any time with no penalty. That said, our backtest data suggests yield outcomes are most consistent over horizons of 12 months or longer.' },
    { q: 'Which blockchain does Tuo operate on?', a: 'Arbitrum is the primary venue, with Ethereum mainnet used selectively. Both chains are supported in Phase 2 onward.' },
    { q: 'Why are your live targets below the backtest numbers?', a: 'We model execution drift, fee compression, and live-environment friction conservatively. Our policy is to under-promise: the published target sits meaningfully below historical backtest performance by design.' },
    { q: 'Is Tuo live yet?', a: 'A paper-trading pilot has been running since April 2026 to validate live execution. The full smart-contract product is targeted for Phase 1 launch in Q3 2026.' },
    { q: 'Can I exit or transfer my position?', a: 'Yes. Withdrawals are instant. The NFT representing your vault is also transferable, so positions can be moved or sold on any compatible marketplace.' },
    { q: 'How is this taxed?', a: 'Tax treatment depends on your jurisdiction. Tuo does not provide tax advice — please consult a qualified professional in your country.' },
    { q: 'What is the difference between the three products?', a: 'They sit on a single spectrum of market exposure. Dynamic Hedge is the most defensive, designed for income-style returns with minimal directional risk. BP Bullish is the most directional, designed to participate in crypto upside. BP Core is the balanced default — our flagship.' },
    { q: 'What are the main risks?', a: 'Tuo is not a savings account. Risks include smart-contract risk, market and execution risk, and the possibility that live results differ materially from backtest. Full disclosure is published at docs.tuo.app/risks; the app requires explicit acknowledgment before any deposit.' },
    { q: 'What happens if live performance does not match the backtest?', a: 'It is a real possibility, which is why our live targets are deliberately set below backtest performance and why we will publish the paper-trading track record at 90+ days. The simulator on this site carries a historical-only disclaimer for the same reason.' },
    { q: 'How are fees charged?', a: 'No entry, exit, or management fees. A performance fee applies only to net profits above your high-water mark — 20% in Phase 1, 30% in Phase 2 and beyond. If a period is flat or negative, no performance fee is charged.' },
  ] : [
    { q: '¿Necesito experiencia en DeFi para usar Tuo?', a: 'No. Necesitas una wallet de auto-custodia y algo de USDC, BTC o ETH. La estrategia opera de forma automatizada — tú depositas, monitoreas tu dashboard y retiras cuando lo decidas.' },
    { q: '¿Quién custodia mi capital?', a: 'Tú. Cada inversor recibe un vault individual on-chain representado por un NFT en tu wallet. Tuo nunca toma custodia de tus fondos — proveemos la estrategia y las señales; el capital permanece bajo tu control en todo momento.' },
    { q: '¿Cuál es el depósito mínimo?', a: 'Durante Phase 1 (sandbox) el mínimo es $50,000 en equivalente USDC. Desde Phase 2 en adelante el mínimo baja a $2,500. BTC y ETH también se aceptan al momento del depósito.' },
    { q: '¿Hay período de bloqueo?', a: 'No. Los retiros están disponibles en cualquier momento, sin penalidad. Dicho esto, los datos de backtest sugieren que los resultados son más consistentes en horizontes de 12 meses o más.' },
    { q: '¿En qué blockchain opera Tuo?', a: 'Arbitrum es la red principal, con Ethereum mainnet usado de forma selectiva. Ambas redes están soportadas desde Phase 2 en adelante.' },
    { q: '¿Por qué los targets live están por debajo del backtest?', a: 'Modelamos el drift de ejecución, la compresión de fees y la fricción del entorno live de forma conservadora. Nuestra política es prometer de menos: el target publicado se sitúa significativamente por debajo del backtest histórico por diseño.' },
    { q: '¿Tuo ya está live?', a: 'Un piloto de paper trading está corriendo desde abril 2026 para validar la ejecución live. El producto completo en smart contracts apunta a Phase 1 en Q3 2026.' },
    { q: '¿Puedo salir o transferir mi posición?', a: 'Sí. Los retiros son instantáneos. El NFT que representa tu vault es transferible, por lo que las posiciones pueden moverse o venderse en cualquier marketplace compatible.' },
    { q: '¿Cómo se grava esto fiscalmente?', a: 'El tratamiento fiscal depende de tu jurisdicción. Tuo no provee asesoramiento fiscal — consulta a un profesional calificado en tu país.' },
    { q: '¿Cuál es la diferencia entre los tres productos?', a: 'Se ubican en un mismo espectro de exposición al mercado. Dynamic Hedge es el más defensivo, diseñado para rendimientos tipo renta con riesgo direccional mínimo. BP Bullish es el más direccional, diseñado para participar del upside cripto. BP Core es el balance por defecto — nuestro flagship.' },
    { q: '¿Cuáles son los riesgos principales?', a: 'Tuo no es una caja de ahorros. Los riesgos incluyen riesgo de smart contract, riesgo de mercado y de ejecución, y la posibilidad de que los resultados live difieran materialmente del backtest. El disclosure completo está publicado en docs.tuo.app/risks; la app requiere reconocimiento explícito antes de cualquier depósito.' },
    { q: '¿Qué pasa si el desempeño live no replica el backtest?', a: 'Es una posibilidad real, y por eso nuestros targets live están deliberadamente debajo del desempeño del backtest, y por eso publicaremos el track record del paper trading a 90+ días. El simulador en este sitio lleva disclaimer de solo-histórico por la misma razón.' },
    { q: '¿Cómo se cobran los fees?', a: 'Sin fee de entrada, salida ni management. La performance fee se aplica solamente sobre ganancias netas por encima de tu high-water mark — 20% en Phase 1, 30% en Phase 2 y posteriores. Si un período es plano o negativo, no se cobra performance fee.' },
  ];

  return React.createElement(Section, { id: 'faq' },
    React.createElement(SectionTitle, null, en ? 'Frequently asked questions' : 'Preguntas frecuentes'),
    React.createElement('div', { className: 'faq-list' },
      faqs.map((f, i) => {
        const isOpen = openIdx === i;
        return React.createElement('div', {
          key: i, className: 'faq-item' + (isOpen ? ' open' : ''),
          onClick: () => setOpenIdx(isOpen ? -1 : i)
        },
          React.createElement('div', { className: 'faq-q' },
            React.createElement('span', null, f.q),
            fm ? React.createElement(fm.span, {
              className: 'faq-chevron',
              animate: { rotate: isOpen ? 180 : 0 },
              transition: { duration: 0.3 }
            }, '▾') : React.createElement('span', { className: 'faq-chevron' }, isOpen ? '−' : '+')
          ),
          AnimatePresence ? React.createElement(AnimatePresence, null,
            isOpen && React.createElement(fm.div, {
              key: 'answer',
              initial: { height: 0, opacity: 0 },
              animate: { height: 'auto', opacity: 1 },
              exit: { height: 0, opacity: 0 },
              transition: { duration: 0.4, ease: [0.16, 1, 0.3, 1] },
              style: { overflow: 'hidden' }
            }, React.createElement('div', { className: 'faq-a' }, f.a))
          ) : (isOpen && React.createElement('div', { className: 'faq-a' }, f.a))
        );
      })
    )
  );
}

function FooterSection() {
  const en = useLang() === 'en';
  return React.createElement('footer', { id: 'footer', className: 'tuo-footer' },
    React.createElement('div', { className: 'footer-top' },
      React.createElement('div', { className: 'footer-brand' },
        React.createElement('span', { className: 'footer-logo' },
          React.createElement('svg', { width: 22, height: 22, viewBox: '0 0 44 44', fill: 'none', style: { verticalAlign: 'middle', marginRight: 8 } },
            React.createElement('rect', { x: 1, y: 1, width: 42, height: 42, rx: 10, fill: '#171717', stroke: '#2e2e2e', strokeWidth: 1 }),
            React.createElement('path', { d: 'M13 14H31M22 14V24', stroke: '#fafafa', strokeWidth: 3, strokeLinecap: 'round' }),
            React.createElement('path', { d: 'M12 34L18 28L24 31L32 22', stroke: '#3ecf8e', strokeWidth: 2, strokeLinecap: 'round', strokeLinejoin: 'round' })
          ),
          'tuo', React.createElement('span', { style: { color: '#3ecf8e' } }, '.app')
        ),
        React.createElement('span', { className: 'footer-entity' }, 'Tuo Fund · Cayman Islands SPC (', en ? 'in formation' : 'en constitución', ')')),
      React.createElement('div', { className: 'footer-links' },
        // Real links (live destinations under *.tuo.app) listed first.
        React.createElement('a', {
          href: 'https://tracker.tuo.app',
          target: '_blank', rel: 'noopener noreferrer'
        }, en ? 'positions tracker' : 'tracker de posiciones'),
        React.createElement('a', {
          href: 'https://deck.tuo.app',
          target: '_blank', rel: 'noopener noreferrer'
        }, en ? 'May 2026 deck' : 'deck mayo 2026'),
        // Placeholders — point to # until destinations are live.
        ['docs', 'github', 'twitter', 'discord', en ? 'audits' : 'auditorías'].map(l =>
          React.createElement('a', { key: l, href: '#' }, l)),
        React.createElement('a', { href: 'https://docs.tuo.app/risks', className: 'footer-risks-link' },
          en ? 'Risks & Disclosures' : 'Riesgos y Disclosures')),
      React.createElement('div', { className: 'footer-contact' }, React.createElement('a', { href: 'mailto:hello@tuo.app' }, 'hello@tuo.app'))
    ),
    React.createElement(Reveal, null,
      React.createElement('div', { className: 'footer-disclaimer' },
        React.createElement('p', null, en
          ? 'Past performance does not guarantee future results. Backtested performance is hypothetical and reflects retroactive application of strategy logic to historical on-chain data; actual results may differ materially. Tuo is not registered with any securities regulator. The fund is not available to residents of the United States or to any other restricted jurisdiction. This site does not constitute an offer or solicitation where unlawful. Nothing on this site is investment, tax, legal, or financial advice.'
          : 'El desempeño pasado no garantiza resultados futuros. El desempeño backtested es hipotético y refleja aplicación retroactiva de lógica sobre data histórica on-chain; resultados reales pueden diferir materialmente. Tuo no está registrado ante ningún regulador de valores. No disponible para residentes de EE.UU. ni jurisdicciones restringidas. No constituye oferta ni solicitud donde sea ilegal. Nada en este sitio es asesoramiento de inversión, fiscal, legal o financiero.')))
  );
}

Object.assign(window, { ValidationSection, PartnersSection, CapacitySection, FAQSection, FooterSection });
