// training.jsx - SOC Training Program page

const CURRICULUM = [
  {
    phase: "Phase 1 - Planning & Architecture",
    sessions: [
      { n: "00", t: "Program Overview - What You're About to Build", dur: "~14 min", avail: true },
      { n: "01", t: "Client Meeting & SOC Requirements Gathering", dur: "~34 min", avail: true },
      { n: "02A", t: "SOC Architecture Design - Choosing Your Tools", dur: "~17 min", avail: true },
      { n: "02B", t: "SOC Architecture Design - Patterns, Data Flow & Network Design", dur: "~14 min", avail: false },
      { n: "03A", t: "Infrastructure Sizing - EPS, Storage & Server Specs", dur: "~14 min", avail: false },
      { n: "03B", t: "Infrastructure Sizing - Deployment Models & Cost Breakdown", dur: "~14 min", avail: false },
    ],
  },
  {
    phase: "Phase 2 - Core Deployment",
    sessions: [
      { n: "04", t: "Wazuh Deployment - Server, Indexer, Dashboard", dur: "~15 min", avail: false },
      { n: "05", t: "Wazuh Agent Deployment & Enrollment", dur: "~14 min", avail: false },
    ],
  },
  {
    phase: "Phase 3 - Detection & Response",
    sessions: [
      { n: "06A", t: "Custom Rules, Decoders & Alert Tuning (Part 1)", dur: "~12 min", avail: false },
      { n: "06B", t: "Custom Rules, Decoders & Alert Tuning (Part 2)", dur: "~8 min", avail: false },
      { n: "07A", t: "Incident Response Platform - Catalyst & TheHive (Part 1)", dur: "~13 min", avail: false },
      { n: "07B", t: "Incident Response Platform - Catalyst & TheHive (Part 2)", dur: "~14 min", avail: false },
      { n: "08", t: "MISP - Threat Intelligence Setup & Feeds", dur: "~14 min", avail: false },
      { n: "09", t: "Integration - Wazuh + TheHive + MISP + Slack/Telegram", dur: "~14 min", avail: false },
      { n: "10", t: "Network Security Monitoring with Suricata", dur: "~14 min", avail: false },
    ],
  },
  {
    phase: "Phase 4 - Operations & Handover",
    sessions: [
      { n: "11", t: "SOC Dashboards, Reports & KPIs", dur: "~14 min", avail: false },
      { n: "12A", t: "Playbooks, Runbooks & SOC Processes (Part 1)", dur: "~13 min", avail: false },
      { n: "12B", t: "Playbooks, Runbooks & SOC Processes (Part 2)", dur: "~12 min", avail: false },
      { n: "13", t: "Testing & Purple Team Validation", dur: "~15 min", avail: false },
      { n: "14", t: "Client Handover, Training & Documentation", dur: "~15 min", avail: false },
    ],
  },
];

const TOOLS = ["Wazuh", "Suricata", "MISP", "Catalyst / TheHive", "Slack / Telegram", "Docker"];

const INCLUDED = [
  { t: "20 Recorded Sessions", d: "15+ hours of detailed, no-fluff video content. 3 months access to all recordings, including any new updates released during the program." },
  { t: "AI SOC Platform - 2 Months", d: "Hands-on access to the Secure Sleuths AI SOC Platform. Same platform our managed SOC clients use in production." },
  { t: "Live Q&A - Every 2 Weeks", d: "Group call with the instructor every 2 weeks. Bring your deployment questions, architecture decisions, troubleshooting." },
  { t: "3 Months Deployment Support", d: "Direct support during the program period. Help with deployment issues, config problems, and architecture decisions." },
  { t: "Templates & Documents", d: "SOC requirements templates, architecture documents, IR playbooks, runbooks, KPI dashboards, and config files." },
  { t: "Real-World Architecture", d: "Not theory. Actual deployment patterns used in production SOCs. Design documents, config files, and scripts included." },
];

const AUDIENCE = [
  { t: "MSSP / MDR Founders", d: "Build a repeatable, scalable SOC delivery model for your clients. This is the exact process used in real client engagements." },
  { t: "Security Consultants", d: "Add SOC deployment as a service to your practice. Walk in with a proven methodology, walk out with a new revenue stream." },
  { t: "SOC Analysts & Engineers", d: "Level up from operating a SOC to building one from scratch. Understand the full picture." },
  { t: "IT Teams Wearing the Security Hat", d: "Stand up proper security monitoring without a massive budget. Open-source tools, real architecture, no enterprise license fees." },
];

function TrainingPage({ setPage }) {
  return (
    <div className="page">
      {/* Hero */}
      <section style={{ padding: "80px 0 40px" }}>
        <div className="container" style={{ display: "flex", flexDirection: "column", gap: 32, maxWidth: 900, textAlign: "center", alignItems: "center" }}>
          <Label>SOC TRAINING PROGRAM · 20 SESSIONS · HANDS-ON</Label>
          <h1 className="serif" style={{ fontSize: "clamp(52px, 6.5vw, 104px)", margin: 0, lineHeight: 0.98, letterSpacing: "-0.025em" }}>
            Build an enterprise SOC<br/>
            <span style={{ color: "var(--fg-mute)", fontStyle: "italic" }}>from zero.</span>
          </h1>
          <p style={{ fontSize: 18, color: "var(--fg-mute)", margin: 0, maxWidth: 620, lineHeight: 1.55 }}>
            End-to-end SOC training built from actual client deployments - not from documentation.
            Plus 2 months hands-on access to the AI SOC Platform.
          </p>
        </div>
      </section>

      {/* Stats */}
      <section style={{ padding: "20px 0 40px" }}>
        <div className="container">
          <div style={{ display: "grid", gridTemplateColumns: "repeat(5, 1fr)", border: "1px solid var(--line)" }}>
            {[
              ["20", "Video sessions"],
              ["15+", "Hours of content"],
              ["4", "Learning phases"],
              ["6", "Open-source tools"],
              ["2mo", "Platform access"],
            ].map(([v, l], i) => (
              <div key={i} style={{
                padding: "24px 16px", textAlign: "center",
                borderRight: i < 4 ? "1px solid var(--line-soft)" : "none",
              }}>
                <span className="serif" style={{ fontSize: 36, color: "var(--accent)", display: "block" }}>{v}</span>
                <Mono style={{ fontSize: 11, color: "var(--fg-dim)", marginTop: 6, display: "block" }}>{l}</Mono>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* Tools */}
      <section style={{ padding: "40px 0" }}>
        <div className="container" style={{ display: "flex", flexDirection: "column", gap: 24 }}>
          <Divider label="TOOLS YOU'LL MASTER" />
          <div style={{ display: "grid", gridTemplateColumns: "repeat(6, 1fr)", border: "1px solid var(--line)" }}>
            {TOOLS.map((t, i) => (
              <div key={i} style={{
                padding: "20px 16px", textAlign: "center",
                borderRight: i < 5 ? "1px solid var(--line-soft)" : "none",
              }}>
                <Mono style={{ fontSize: 13, color: "var(--accent)" }}>◆ {t}</Mono>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* Curriculum */}
      <section style={{ padding: "60px 0" }}>
        <div className="container" style={{ display: "flex", flexDirection: "column", gap: 40 }}>
          <Divider label="FULL CURRICULUM · 20 SESSIONS" />
          {CURRICULUM.map((phase, pi) => (
            <div key={pi}>
              <h3 className="serif" style={{ fontSize: 28, margin: "0 0 20px", letterSpacing: "-0.01em" }}>{phase.phase}</h3>
              <div style={{ border: "1px solid var(--line)" }}>
                {phase.sessions.map((s, si) => (
                  <div key={si} style={{
                    display: "grid", gridTemplateColumns: "60px 1fr 100px 100px",
                    gap: 16, alignItems: "center",
                    padding: "16px 20px",
                    borderBottom: si < phase.sessions.length - 1 ? "1px solid var(--line-soft)" : "none",
                    opacity: s.avail ? 1 : 0.6,
                  }}>
                    <Mono style={{ fontSize: 12, color: "var(--accent)" }}>{s.n}</Mono>
                    <span style={{ fontSize: 14, color: "var(--fg)" }}>{s.t}</span>
                    <Mono style={{ fontSize: 11, color: "var(--fg-dim)" }}>{s.dur}</Mono>
                    <Tag color={s.avail ? "var(--accent)" : "var(--fg-dim)"}>{s.avail ? "AVAILABLE" : "COMING SOON"}</Tag>
                  </div>
                ))}
              </div>
            </div>
          ))}
        </div>
      </section>

      {/* What's included */}
      <section style={{ padding: "60px 0" }}>
        <div className="container" style={{ display: "flex", flexDirection: "column", gap: 40 }}>
          <Divider label="WHAT'S INCLUDED" />
          <div style={{ display: "grid", gridTemplateColumns: "repeat(2, 1fr)", gap: 0, border: "1px solid var(--line)" }}>
            {INCLUDED.map((item, i) => (
              <div key={i} style={{
                padding: 28,
                borderRight: (i % 2 === 0) ? "1px solid var(--line-soft)" : "none",
                borderBottom: i < INCLUDED.length - 1 ? "1px solid var(--line-soft)" : "none",
                display: "flex", flexDirection: "column", gap: 10,
              }}>
                <h4 className="serif" style={{ fontSize: 20, margin: 0 }}>{item.t}</h4>
                <p style={{ margin: 0, color: "var(--fg-mute)", fontSize: 13.5, lineHeight: 1.6 }}>{item.d}</p>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* Who it's for */}
      <section style={{ padding: "60px 0" }}>
        <div className="container" style={{ display: "flex", flexDirection: "column", gap: 40 }}>
          <Divider label="WHO IS THIS FOR" />
          <div style={{ display: "grid", gridTemplateColumns: "repeat(2, 1fr)", border: "1px solid var(--line)" }}>
            {AUDIENCE.map((a, i) => (
              <div key={i} style={{
                padding: 28,
                borderRight: (i % 2 === 0) ? "1px solid var(--line-soft)" : "none",
                borderBottom: i < 2 ? "1px solid var(--line-soft)" : "none",
                display: "flex", flexDirection: "column", gap: 10,
              }}>
                <h4 className="serif" style={{ fontSize: 20, margin: 0 }}>{a.t}</h4>
                <p style={{ margin: 0, color: "var(--fg-mute)", fontSize: 13.5, lineHeight: 1.6 }}>{a.d}</p>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* Instructor */}
      <section style={{ padding: "60px 0" }}>
        <div className="container" style={{ display: "flex", flexDirection: "column", gap: 24 }}>
          <Divider label="YOUR INSTRUCTOR" />
          <div style={{ display: "grid", gridTemplateColumns: "auto 1fr", gap: 32, border: "1px solid var(--line)", padding: 36, alignItems: "center" }}>
            <div style={{
              width: 80, height: 80, background: "var(--accent)",
              display: "flex", alignItems: "center", justifyContent: "center",
              fontSize: 36, fontFamily: "var(--serif)", color: "#1A1207",
            }}>P</div>
            <div>
              <h3 className="serif" style={{ fontSize: 24, margin: 0 }}>Prathamesh Bakliwal</h3>
              <Mono style={{ fontSize: 12, color: "var(--fg-dim)", display: "block", marginTop: 4 }}>
                Founder, Secure Sleuths · Wazuh Ambassador for India
              </Mono>
              <p style={{ margin: "12px 0 0", color: "var(--fg-mute)", fontSize: 14, lineHeight: 1.6 }}>
                Runs a managed SOC practice serving clients across fintech, healthtech, edtech, and research.
                Built the AI SOC Platform (9,260+ lines) that auto-triages alerts, tunes detection rules, and hunts threats autonomously.
                This program is the exact process used in production client engagements.
              </p>
            </div>
          </div>
        </div>
      </section>

      {/* Pricing */}
      <section style={{ padding: "60px 0" }}>
        <div className="container">
          <div style={{
            border: "1px solid var(--accent)",
            background: "oklch(0.82 0.17 155 / 0.04)",
            padding: "48px",
            display: "grid", gridTemplateColumns: "1fr auto", gap: 40, alignItems: "center",
          }}>
            <div>
              <Label>TRAINING PROGRAM PRICING</Label>
              <div style={{ display: "flex", alignItems: "baseline", gap: 12, marginTop: 12 }}>
                <span className="serif" style={{ fontSize: 56, color: "var(--accent)", letterSpacing: "-0.02em" }}>₹44,999</span>
                <Mono style={{ fontSize: 14, color: "var(--fg-dim)" }}>/ $499 USD</Mono>
              </div>
              <p style={{ margin: "12px 0 0", color: "var(--fg-mute)", fontSize: 14, lineHeight: 1.6 }}>
                One-time payment · 3 months access to recordings · EMI available: 3 x ₹15,000
              </p>
              <div style={{ display: "flex", flexDirection: "column", gap: 8, marginTop: 20 }}>
                {[
                  "20 recorded sessions (3 months access)",
                  "AI SOC Platform access (2 months)",
                  "Live Q&A calls every 2 weeks",
                  "3 months deployment support",
                  "All templates, scripts, and config files",
                ].map((f, i) => (
                  <div key={i} style={{ display: "flex", gap: 10, alignItems: "baseline" }}>
                    <Mono style={{ fontSize: 11, color: "var(--accent)" }}>✓</Mono>
                    <span style={{ fontSize: 13.5, color: "var(--fg)" }}>{f}</span>
                  </div>
                ))}
              </div>
              <Mono style={{ fontSize: 11, color: "var(--fg-dim)", display: "block", marginTop: 16 }}>
                EMI options available · reach out for details
              </Mono>
            </div>
            <div style={{ display: "flex", flexDirection: "column", gap: 12 }}>
              <button className="btn btn-primary" onClick={() => setPage("contact")}>
                Enroll now →
              </button>
              <button className="btn" onClick={() => setPage("contact")}>
                Ask a question
              </button>
            </div>
          </div>
        </div>
      </section>
    </div>
  );
}

Object.assign(window, { TrainingPage });
