/* Three hero variants for the Nubel landing page.
   Each exposes props: { copy } — with tone-switched copy passed in.
*/

const { useState: _useState, useEffect: _useEffect } = React;

// ---------- Variant A — Editorial oversized ----------
// Giant centered display type. Clean. Editorial. Classic Nubel.
const HeroA = ({ copy }) => (
  <section className="hero-a" style={{
    padding: "clamp(32px, 5vw, 56px) 0 clamp(48px, 8vw, 88px)",
    position: "relative", overflow: "hidden",
  }}>
    {/* Layered background */}
    <div className="hero-bg" aria-hidden="true">
      <div className="hero-bg-grid"/>
      <div className="hero-bg-glow hero-bg-glow-1"/>
      <div className="hero-bg-glow hero-bg-glow-2"/>
      <div className="hero-bg-fade"/>
      {/* Floating ambient marks */}
      <svg className="hero-bg-mark hero-bg-mark-1" viewBox="0 0 60 60" fill="none">
        <circle cx="30" cy="30" r="28" stroke="currentColor" strokeWidth="1" strokeDasharray="3 4" opacity="0.5"/>
        <circle cx="30" cy="30" r="6" fill="currentColor" opacity="0.7"/>
      </svg>
      <svg className="hero-bg-mark hero-bg-mark-2" viewBox="0 0 80 80" fill="none">
        <path d="M10 70 V30 Q10 14 26 14 Q42 14 42 30 V70" stroke="currentColor" strokeWidth="2" strokeLinecap="round" opacity="0.35"/>
        <circle cx="62" cy="56" r="10" fill="currentColor" opacity="0.5"/>
      </svg>
      <svg className="hero-bg-mark hero-bg-mark-3" viewBox="0 0 40 40" fill="none">
        <path d="M20 4 L24 16 L36 16 L26 24 L30 36 L20 28 L10 36 L14 24 L4 16 L16 16 Z" fill="currentColor" opacity="0.18"/>
      </svg>
    </div>

    <div className="nb-wrap" style={{textAlign:"center", position:"relative", zIndex: 1}}>
      <div className="hero-eyebrow-wrap nb-fade-up">
        <span className="nb-eyebrow" style={{marginBottom: 32}}>
          <span className="dot"/> New · Early access pilot in Vancouver
        </span>
      </div>
      <h1 className="nb-display-xl nb-balance nb-fade-up" style={{
        margin:"28px auto 22px", maxWidth: 1080,
        animationDelay:"60ms",
      }}>
        Hire <em style={{
          fontStyle:"normal", color:"var(--nubel-orange)",
          position:"relative",
          display:"inline-block",
        }}>people,</em><br/>
        not resumes.
      </h1>
      <p className="nb-body-lg nb-pretty nb-fade-up" style={{
        color:"var(--fg-2)", maxWidth: 620, margin:"0 auto 40px",
        fontSize: "clamp(17px, 1.6vw, 20px)",
        animationDelay:"120ms",
      }}>
        {copy.sub}
      </p>
      <div className="nb-fade-up" style={{
        display:"flex", gap:12, justifyContent:"center", flexWrap:"wrap",
        animationDelay:"180ms",
      }}>
        <a href="https://app.nubel.ca/how-it-works" className="btn btn-primary btn-lg">
          Join the pilot <span style={{opacity:0.55}}>•</span> it's free
          <Icon name="arrow" size={14} stroke={2.2}/>
        </a>
        <a href="https://app.nubel.ca/onboarding/recruiter" className="btn btn-ghost btn-lg">
          For employers
          <Icon name="arrow" size={14} stroke={2.2}/>
        </a>
      </div>

      {/* Small proof strip */}
      <div className="nb-fade-up" style={{
        marginTop: 56, display:"flex", justifyContent:"center", gap: 24,
        color:"var(--fg-3)", fontFamily:"var(--font-mono)", fontSize: 12,
        textTransform:"uppercase", letterSpacing:"0.12em", flexWrap:"wrap",
        animationDelay:"240ms",
      }}>
        <span>Pilot · BC</span>
        <span style={{color:"var(--border-2)"}}>◆</span>
        <span>Marketing · Design · CS · Data</span>
        <span style={{color:"var(--border-2)"}}>◆</span>
        <span>Founding employers wanted</span>
      </div>
    </div>
  </section>
);

// ---------- Variant B — Split with phone mock ----------
const HeroB = ({ copy }) => (
  <section style={{padding:"clamp(56px, 9vw, 112px) 0"}}>
    <div className="nb-wrap" style={{
      display:"grid", gridTemplateColumns:"minmax(0, 1.15fr) minmax(0, 1fr)",
      gap: 64, alignItems:"center",
    }}>
      <div className="nb-fade-up">
        <span className="nb-eyebrow" style={{marginBottom: 24}}>
          <span className="dot"/> New · Hiring has never been easier
        </span>
        <h1 className="nb-display-lg nb-balance" style={{margin: "24px 0 20px"}}>
          Stand out <em style={{
            fontStyle:"normal", position:"relative", whiteSpace:"nowrap",
          }}>without<SquiggleUnder/></em><br/>
          sending resumes.
        </h1>
        <p className="nb-body-lg nb-pretty" style={{color:"var(--fg-2)", maxWidth: 520, margin:"0 0 32px"}}>
          {copy.sub}
        </p>
        <div style={{display:"flex", gap: 10, flexWrap:"wrap"}}>
          <a href="https://app.nubel.ca/how-it-works" className="btn btn-primary btn-lg">
            Get Started <span style={{opacity:0.55}}>•</span> it's free
            <Icon name="arrow" size={14} stroke={2.2}/>
          </a>
          <a href="#how" className="btn btn-ghost btn-lg">
            How it works
          </a>
        </div>

        {/* inline meta */}
        <div style={{
          marginTop: 36, display:"flex", gap: 20, alignItems:"center",
          color:"var(--fg-3)", fontFamily:"var(--font-mono)", fontSize:12,
          textTransform:"uppercase", letterSpacing:"0.1em",
        }}>
          <span>PILOT · BC</span>
          <span>•</span>
          <span>FREE for candidates</span>
        </div>
      </div>

      {/* Right: stacked phone + floating chips */}
      <div className="nb-fade-up" style={{position:"relative", minHeight: 540, animationDelay:"120ms"}}>
        <div className="mock-phone" style={{margin:"0 auto"}}>
          <HeroPhoneMock/>
        </div>

        {/* Floating chip: question */}
        <div style={{
          position:"absolute", top: 30, left: "-8%",
          background:"var(--bg-1)", border:"1px solid var(--border-1)",
          borderRadius: 14, padding: "10px 14px",
          boxShadow:"var(--shadow-md)", maxWidth: 260,
          fontSize: 13, fontWeight: 500,
        }}>
          <div style={{color:"var(--fg-3)", fontSize:11, fontWeight:600, letterSpacing:"0.08em", textTransform:"uppercase", marginBottom: 4}}>
            Q · 02:00
          </div>
          Walk us through a project you're proud of.
        </div>

        {/* Floating chip: verdict */}
        <div style={{
          position:"absolute", bottom: 60, right: "-6%",
          background:"var(--bg-1)", border:"1px solid var(--border-1)",
          borderRadius: 14, padding: "10px 14px",
          boxShadow:"var(--shadow-md)", display:"flex", gap:8, alignItems:"center",
          fontSize: 13, fontWeight: 600,
        }}>
          <span style={{
            width: 22, height: 22, borderRadius:"50%",
            background: "var(--success-soft)", color: "var(--success)",
            display:"flex", alignItems:"center", justifyContent:"center",
          }}>
            <Icon name="check" size={13} stroke={2.4}/>
          </span>
          Shortlisted by Northside
        </div>
      </div>
    </div>
  </section>
);

// Decorative phone interior — stylized, not a real screenshot
const HeroPhoneMock = () => (
  <div style={{
    width:"100%", height:"100%",
    background:"linear-gradient(180deg, var(--bg-warm), var(--bg-1))",
    padding: 16, display:"flex", flexDirection:"column", gap: 10,
  }}>
    {/* status */}
    <div style={{display:"flex", justifyContent:"space-between", alignItems:"center", fontSize:11, fontWeight:600, color:"var(--fg-2)"}}>
      <span>9:41</span>
      <span>● ● ●</span>
    </div>
    {/* header */}
    <div style={{display:"flex", alignItems:"center", gap: 8, marginTop: 4}}>
      <NMark size={18}/>
      <span style={{fontWeight:700, fontSize:14}}>Your profile</span>
      <span style={{marginLeft:"auto", fontSize:11, color:"var(--fg-3)", fontFamily:"var(--font-mono)"}}>3/5</span>
    </div>
    {/* video tile */}
    <div style={{
      position:"relative", borderRadius: 12, overflow:"hidden",
      background:"linear-gradient(135deg, #2A2A2A, #0A0A0A)", aspectRatio:"1/1",
      display:"flex", alignItems:"flex-end", padding: 10,
    }}>
      <div style={{
        position:"absolute", top:8, left:8,
        fontFamily:"var(--font-mono)", fontSize:10,
        color:"#fff", background:"rgba(243,91,4,0.95)",
        padding:"2px 6px", borderRadius: 4, fontWeight:700, letterSpacing: "0.08em",
        display:"flex", alignItems:"center", gap: 5,
      }}>
        <span style={{width:6, height:6, borderRadius:"50%", background:"#fff", animation:"nb-blink 1s infinite"}}/>
        REC
      </div>
      <div style={{color:"#fff", fontSize:12, fontWeight:600, lineHeight: 1.3}}>
        How would you launch a new product to Gen Z?
      </div>
      {/* play glyph */}
      <div style={{
        position:"absolute", top:"50%", left:"50%", transform:"translate(-50%, -50%)",
        width: 48, height: 48, borderRadius:"50%", background:"rgba(255,255,255,0.18)",
        backdropFilter:"blur(4px)",
        display:"flex", alignItems:"center", justifyContent:"center", color:"#fff",
      }}>
        <Icon name="play" size={18}/>
      </div>
    </div>
    {/* question progress */}
    <div style={{display:"flex", gap: 4}}>
      {[1,1,1,0,0].map((f,i) => (
        <div key={i} style={{flex:1, height:3, borderRadius:2, background: f ? "var(--nubel-orange)" : "var(--border-1)"}}/>
      ))}
    </div>
    {/* copy */}
    <div style={{fontSize:11, color:"var(--fg-3)"}}>Question 4 of 5</div>
    <div style={{fontSize:13, fontWeight:600, color:"var(--fg-1)", lineHeight: 1.35}}>
      Tell us about a time you worked through a hard problem.
    </div>
    <div style={{marginTop: 6, display:"flex", gap: 8}}>
      <button style={{
        flex: 1, padding: "10px", borderRadius: 9999,
        background:"var(--nubel-orange)", color:"#fff", border: 0,
        fontWeight: 700, fontSize: 12, display:"flex", alignItems:"center", justifyContent:"center", gap: 6,
      }}>
        <Icon name="rec" size={10}/> Record · 2:00
      </button>
    </div>
  </div>
);

// ---------- Variant C — Kinetic word flipper ----------
const HeroC = ({ copy }) => (
  <section style={{padding:"clamp(72px, 11vw, 144px) 0 clamp(48px, 7vw, 96px)"}}>
    <div className="nb-wrap">
      <div style={{display:"flex", alignItems:"baseline", gap: 16, marginBottom: 12, color:"var(--fg-3)"}}>
        <span className="nb-mono" style={{fontSize:12, letterSpacing:"0.12em", textTransform:"uppercase"}}>/001 · the pitch</span>
        <span style={{flex:1, height:1, background:"var(--border-1)"}}/>
        <span className="nb-mono" style={{fontSize:12, letterSpacing:"0.12em", textTransform:"uppercase"}}>26-04</span>
      </div>

      <h1 style={{
        margin:"0 0 28px",
        fontWeight: 800,
        fontSize:"clamp(56px, 10vw, 140px)",
        lineHeight: 0.94,
        letterSpacing: "-0.035em",
        maxWidth: 1200,
      }} className="nb-balance">
        See the <br className="only-sm"/>
        <WordFlip words={["person.", "spark.", "story.", "human."]} style={{
          fontWeight: 800,
          fontSize: "inherit",
          letterSpacing: "inherit",
        }}/>
        <br/>
        not the résumé.
      </h1>

      <div style={{
        display:"grid", gridTemplateColumns:"minmax(0, 1.2fr) minmax(0, 1fr)",
        gap: 48, alignItems:"end", marginTop: 24,
      }}>
        <p className="nb-body-lg nb-pretty" style={{color:"var(--fg-2)", maxWidth: 620, margin: 0}}>
          {copy.sub}
        </p>
        <div style={{display:"flex", gap: 10, flexWrap:"wrap", justifyContent:"flex-end"}}>
          <a href="https://app.nubel.ca/how-it-works" className="btn btn-primary btn-lg">
            Join the pilot <Icon name="arrow" size={14} stroke={2.2}/>
          </a>
          <a href="https://app.nubel.ca/onboarding/recruiter" className="btn btn-ghost btn-lg">
            For employers
          </a>
        </div>
      </div>
    </div>

    {/* Ticker line */}
    <div style={{marginTop: 64, padding:"16px 0", borderTop:"1px solid var(--border-1)", borderBottom:"1px solid var(--border-1)"}}>
      <TickerLine text="VIDEO PROFILES · VANCOUVER PILOT · NO RESUMES · HIRE THE HUMAN · EARLY ACCESS · " speed={60}/>
    </div>
  </section>
);

window.HeroA = HeroA;
window.HeroB = HeroB;
window.HeroC = HeroC;
