/* global React, window */
/* ============================================
   RiskPage — Risk Disclosure (legal content).
   Clean, readable long-form layout.
   ============================================ */

function RiskSection({ n, title, children }) {
  return (
    <section style={{ marginBottom: 36 }}>
      <div className="flex gap-3" style={{ alignItems: 'baseline', marginBottom: 12 }}>
        <span className="font-mono" style={{ fontSize: 13, color: 'var(--cyan)', fontWeight: 600 }}>{n}</span>
        <h2 style={{ fontSize: 22, lineHeight: 1.2 }}>{title}</h2>
      </div>
      <div className="text-muted legal-body" style={{ fontSize: 15.5, lineHeight: 1.75 }}>
        {children}
      </div>
    </section>
  );
}

function RiskPage({ go }) {
  return (
    <div>
      {/* HERO */}
      <section style={{ padding: '64px 0 24px' }}>
        <div className="container" style={{ maxWidth: 880 }}>
          <span className="eyebrow">LEGAL · RISK DISCLOSURE</span>
          <h1 className="mt-4" style={{ fontSize: 52, lineHeight: 1.04 }}>
            Risk <span className="gradient-text">disclosure</span>
          </h1>
          <p className="mt-6 text-muted" style={{ fontSize: 17, lineHeight: 1.6 }}>
            Trading forex and CFDs with leverage carries a high level of risk and may not be suitable for every
            investor. Please read this disclosure carefully before purchasing or using any expert advisor, signal,
            or service offered on Expert For Forex.
          </p>
          <div className="font-mono text-xs text-muted mt-6">LAST UPDATED · JUNE 2026</div>
        </div>
      </section>

      {/* High-risk callout */}
      <section style={{ paddingBottom: 8 }}>
        <div className="container" style={{ maxWidth: 880 }}>
          <div className="panel panel-padded" style={{ background: 'rgba(255,184,0,0.06)', borderColor: 'rgba(255,184,0,0.35)' }}>
            <div className="flex gap-3" style={{ alignItems: 'flex-start' }}>
              <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="var(--amber)" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" style={{ flexShrink: 0, marginTop: 2 }}><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
              <p style={{ fontSize: 15.5, lineHeight: 1.65, color: 'var(--text)' }}>
                <strong>Your capital is at risk.</strong> The vast majority of retail traders lose money trading
                leveraged products. You should never trade with money you cannot afford to lose, and you should
                seek independent financial advice if you have any doubts.
              </p>
            </div>
          </div>
        </div>
      </section>

      {/* BODY */}
      <section className="section" style={{ paddingTop: 32 }}>
        <div className="container" style={{ maxWidth: 880 }}>

          <RiskSection n="01" title="No guarantee of profit">
            <p>
              Expert For Forex sells automated trading software (expert advisors), tools, and educational content.
              Nothing we provide is a promise, guarantee, or assurance of profit. Past performance — including any
              backtest, demo result, or live track record shown on this site — is <strong>not</strong> a reliable
              indicator of future results. Markets change, and a strategy that performed well historically can lose
              money in the future.
            </p>
          </RiskSection>

          <RiskSection n="02" title="Leverage works both ways">
            <p>
              Forex and CFDs are typically traded with leverage. Leverage magnifies both gains and losses, and it is
              possible to lose more than your initial deposit on some account types. Small market movements can have a
              large impact on your account balance. Make sure you fully understand the leverage and margin terms of
              your chosen broker before trading.
            </p>
          </RiskSection>

          <RiskSection n="03" title="Backtests and simulated results">
            <p>
              Backtest reports and simulated performance have inherent limitations. They are produced with the benefit
              of hindsight, may not account for slippage, spread widening, requotes, swaps, commissions, or real-world
              execution delays, and can be over-optimised to historical data. Live results will differ — sometimes
              significantly — from any backtest shown.
            </p>
          </RiskSection>

          <RiskSection n="04" title="Expert advisors and automation">
            <p>
              Automated systems carry additional technical risks, including but not limited to: platform or VPS
              downtime, internet or power outages, broker-side execution differences, incorrect settings, and software
              errors. An expert advisor will execute its logic regardless of market conditions — it has no judgement.
              You are solely responsible for monitoring your account, configuring risk parameters appropriately, and
              testing on a demo account before going live.
            </p>
          </RiskSection>

          <RiskSection n="05" title="Third-party brokers and providers">
            <p>
              Brokers, VPS providers, and other companies listed or recommended on this site are independent third
              parties. We do not control their services, pricing, execution, or solvency, and we are not responsible
              for your dealings with them. We may receive a partner commission when you open an account through our
              links, at no additional cost to you. Always do your own due diligence and check that a provider is
              appropriately regulated for your jurisdiction.
            </p>
          </RiskSection>

          <RiskSection n="06" title="Not financial advice">
            <p>
              Expert For Forex is not a licensed financial adviser, broker, or fund manager. All content, tools, and
              software are provided for informational purposes only and do not constitute financial, investment, legal,
              or tax advice, nor a recommendation to buy or sell any instrument. Any trading decisions you make are
              your own.
            </p>
          </RiskSection>

          <RiskSection n="07" title="Your responsibility">
            <p>
              By using this website and any product purchased through it, you acknowledge that you understand the risks
              described here, that you are trading at your own risk, and that Expert For Forex and its team accept no
              liability for any loss or damage arising from the use of our products, the reliance on any information
              provided, or your trading activity.
            </p>
          </RiskSection>

          <div className="panel panel-padded mt-2" style={{ background: 'rgba(0,0,0,0.3)' }}>
            <p className="text-muted" style={{ fontSize: 14.5, lineHeight: 1.7 }}>
              Questions about this disclosure? Contact us at{' '}
              <a href="mailto:admin@expertforforex.com" style={{ color: 'var(--cyan)' }}>admin@expertforforex.com</a>{' '}
              or visit the{' '}
              <a onClick={() => go('about')} style={{ color: 'var(--cyan)', cursor: 'pointer' }}>contact page</a>.
            </p>
          </div>

        </div>
      </section>
    </div>
  );
}

window.RiskPage = RiskPage;
