/* Campaign design guidance. Reference artwork is displayed unchanged. */
const CAMPAIGN_BRIEF = "Create a cinematic bladestack.io campaign using a near-black or deep-navy environment, signature blue, and controlled cyan/violet light. Build a clear hierarchy around one bold headline, one focal subject, and one action. Use oversized white type with a selective blue/violet emphasis; keep secondary information quiet and readable. Place approved portraits naturally into the environment, preserving recognizable features and natural skin tones. Use fine grids, particles, architectural depth, angular frames, and light trails to support the composition. Samurai and blade motifs may support culture or brand storytelling when purposeful. Preserve supplied logo artwork, keep all newly typed company names lowercase, and use only approved campaign facts, customer references, and dates. Deliver editable production files privately and finished exports in the agreed sizes.";

const DesignLanguageTab = () => {
  const c = BRAND.campaign;
  const [copyState, setCopyState] = React.useState("Copy creative direction");
  const copyBrief = async () => {
    try { await navigator.clipboard.writeText(CAMPAIGN_BRIEF); setCopyState("Copied"); }
    catch { setCopyState("Select the text below to copy"); }
  };
  const principles = [
    ["01", "Start with depth", "Use a near-black or deep-navy field, with the brightest light concentrated near the focal subject. City architecture, particles, grids, and haze establish scale while quieter areas make room for text."],
    ["02", "Make type decisive", "Use a heavy Aptos Display headline with a compact line height. Emphasize one phrase in blue, violet, or a controlled gradient. Use Aptos for supporting copy and tracked mono labels for small technical details."],
    ["03", "Give people presence", "Anchor a portrait or group photograph to one side or the lower edge. Preserve recognizable features, natural skin tones, and believable lighting. Let the dark environment frame the person instead of tinting the face blue."],
    ["04", "Build an angular frame", "Use clipped corners, thin technical rules, restrained node marks, and a small number of illuminated edges. Keep lines away from faces and letterforms. Frames should organize content and guide the eye."],
    ["05", "Control the light", "Use electric blue as the main lighting accent. Cyan, violet, and lavender provide contrast or depth. Reserve small warm accents for a story that calls for them; they do not become new core interface colors."],
    ["06", "Use cultural imagery deliberately", "The samurai silhouette, blade motifs, and futuristic city are part of the campaign vocabulary. Use them for brand and culture stories when they carry meaning. Technical reports and product interfaces keep an engineering-focused visual register."],
  ];
  const palette = [
    ["Near-black", c.base, "Large background fields"], ["Deep navy", BRAND.dark.navyDeep, "Atmospheric depth"],
    ["Navy", BRAND.dark.navy, "Panels and environments"], ["Signature blue", BRAND.primary[500], "Headline and lighting anchor"],
    ["Electric cyan", c.cyan, "Edge light and contrast"], ["Violet", c.violet, "Selective gradient emphasis"],
    ["Lavender", c.lavender, "Supporting luminous text"], ["White", c.white, "Primary readable type"],
  ];
  return (
    <div className="space-y-12">
      <section aria-labelledby="design-language-title">
        <SectionEyebrow number="01" label="Design language" />
        <div className="rounded-2xl overflow-hidden" style={{background:c.base,border:`1px solid ${c.line}`}}>
          <div className="grid lg:grid-cols-2 items-center">
            <div className="p-7 md:p-10">
              <div className="font-mono" style={{fontSize:13,letterSpacing:TRACKING.eyebrow,color:c.cyan}}>CAMPAIGNS · EVENTS · CULTURE</div>
              <h1 id="design-language-title" className="mt-5" style={{fontSize:"clamp(2.2rem, 4vw, 3.4rem)",lineHeight:1.06,fontWeight:900,letterSpacing:TRACKING.cover,color:c.white}}>Cinematic campaign design</h1>
              <p className="mt-5" style={{fontSize:18,lineHeight:1.6,color:c.muted}}>Dark environments. Electric light. Bold type. Human presence. A visual language for posters, employee stories, event campaigns, wallpapers, and brand films.</p>
              <p className="mt-5" style={{fontSize:15,lineHeight:1.6,color:c.muted}}>The identity stays consistent: approved logo artwork, precise messaging, and a clear focal point. The campaign treatment adds atmosphere and emotion around that foundation.</p>
            </div>
            <figure className="m-0">
              <img src="assets/design-language/cinematic-brand-scene.jpg" alt="bladestack.io brand scene with a samurai silhouette overlooking a blue-lit futuristic city" style={{display:"block",width:"100%",height:"auto"}} />
              <figcaption className="px-5 py-3" style={{fontSize:13,lineHeight:1.5,color:c.muted,borderTop:`1px solid ${c.line}`}}>Brand atmosphere: deep space, architectural scale, a quiet logo area, and a single illuminated subject.</figcaption>
            </figure>
          </div>
        </div>
      </section>

      <section aria-labelledby="context-title">
        <h2 id="context-title" style={{fontSize:28,fontWeight:700,color:BRAND.ink.body}}>Choose the treatment for the job</h2>
        <div className="grid md:grid-cols-2 gap-4 mt-5">
          <Card><h3 style={{fontSize:21,fontWeight:700,color:BRAND.ink.body}}>Technical communication</h3><p className="mt-3" style={{fontSize:16,lineHeight:1.65,color:BRAND.ink.muted}}>Reports, diagrams, data, proposals, and product interfaces prioritize clarity. Use restrained surfaces, predictable structure, and quiet accents. The existing Colors, Typography, Foundations, and Components tabs define this system.</p></Card>
          <Card style={{background:BRAND.dark.navy,border:`1px solid ${c.line}`}}><h3 style={{fontSize:21,fontWeight:700,color:c.white}}>Cinematic campaigns</h3><p className="mt-3" style={{fontSize:16,lineHeight:1.65,color:c.muted}}>Social posts, event promotions, team stories, wallpapers, and brand films may use full-frame dark environments, portraits, cultural imagery, texture, and controlled glow. Use this page to brief and review that work.</p></Card>
        </div>
      </section>

      <section aria-labelledby="campaign-palette-title">
        <SectionEyebrow number="02" label="Color and light" />
        <h2 id="campaign-palette-title" style={{fontSize:28,fontWeight:700,color:BRAND.ink.body}}>A shared identity with a wider campaign palette</h2>
        <p className="mt-3 mb-5 max-w-3xl" style={{fontSize:16,lineHeight:1.65,color:BRAND.ink.muted}}>Signature blue and secondary teal remain the core brand colors. Campaign lighting adds cyan, violet, and lavender on dark foundations. These production tokens provide a repeatable starting point; photographic light and gradients naturally contain intermediate colors.</p>
        <div className="grid grid-cols-2 md:grid-cols-4 gap-4">
          {palette.map(([name,hex,role])=><Card key={name} padding={0} style={{overflow:"hidden"}}><div style={{background:hex,height:76,borderBottom:`1px solid ${BRAND.surface.border}`}}/><div className="p-4"><h3 style={{fontSize:16,fontWeight:700,color:BRAND.ink.body}}>{name}</h3><div className="font-mono mt-1" style={{fontSize:14,color:BRAND.primary[700]}}>{hex}</div><p className="mt-2" style={{fontSize:14,lineHeight:1.5,color:BRAND.ink.muted}}>{role}</p></div></Card>)}
        </div>
        <div className="rounded-xl mt-5 p-6" style={{background:BRAND.dark.navy,border:`1px solid ${c.line}`}}><p style={{fontSize:14,color:c.muted,marginBottom:12}}>Selective headline emphasis</p><p style={{fontSize:"clamp(1.8rem, 4vw, 3.2rem)",fontWeight:900,lineHeight:1.1,letterSpacing:TRACKING.cover,color:c.white}}>Cybersecurity engineering<br/><span style={{background:c.headlineGradient,WebkitBackgroundClip:"text",backgroundClip:"text",color:"transparent"}}>Absurdly technical.</span></p><p className="mt-4" style={{fontSize:14,lineHeight:1.6,color:c.muted}}>Keep the rest of the headline white. Avoid gradients on long paragraphs, small labels, and fine-print details.</p></div>
      </section>

      <section aria-labelledby="principles-title">
        <SectionEyebrow number="03" label="Composition" />
        <h2 id="principles-title" style={{fontSize:28,fontWeight:700,color:BRAND.ink.body}}>Six rules for a recognizable campaign</h2>
        <div className="grid md:grid-cols-2 gap-4 mt-5">{principles.map(([n,title,body])=><Card key={n}><span className="font-mono" style={{fontSize:14,fontWeight:700,color:BRAND.primary[500]}}>{n}</span><h3 className="mt-3" style={{fontSize:21,fontWeight:700,color:BRAND.ink.body}}>{title}</h3><p className="mt-3" style={{fontSize:16,lineHeight:1.65,color:BRAND.ink.muted}}>{body}</p></Card>)}</div>
        <p className="mt-5" style={{fontSize:16,lineHeight:1.65,color:BRAND.ink.muted}}>For a square portrait post, start with roughly 4–6% outer margins and a 55/45 text-to-subject split, then adjust for the photograph and headline. Keep one focal subject and one dominant message. These are starting proportions, not rigid templates.</p>
      </section>

      <section aria-labelledby="reference-title">
        <SectionEyebrow number="04" label="Visual references" />
        <h2 id="reference-title" style={{fontSize:28,fontWeight:700,color:BRAND.ink.body}}>How the language works in a finished composition</h2>
        <p className="mt-3 mb-5" style={{fontSize:16,lineHeight:1.65,color:BRAND.ink.muted}}>Read these examples for hierarchy, framing, light, and portrait treatment. For a new campaign, supply its own approved wording, people, dates, and permissions.</p>
        <div className="grid md:grid-cols-2 gap-6">
          {[
            ["Employee spotlight","assets/design-language/employee-spotlight.png","An employee spotlight showing a right-anchored portrait, bold white and blue name, and illuminated angular frame","The name establishes hierarchy. A large portrait anchors the right side, while a quiet technical background and thin illuminated rules organize the supporting story."],
            ["Team introduction","assets/design-language/team-introduction.png","A team introduction combining a natural portrait, blue-lit city, samurai silhouette, and structured skill labels","The portrait remains natural. Cultural imagery sits behind the person, and repeated labels, icons, and edge lighting create a coherent structure."],
          ].map(([title,src,alt,caption])=><figure key={src} className="m-0 rounded-xl overflow-hidden" style={{border:`1px solid ${BRAND.surface.border}`,background:BRAND.surface.card}}><img src={src} alt={alt} loading="lazy" style={{display:"block",width:"100%",height:"auto"}}/><figcaption className="p-5"><h3 style={{fontSize:21,fontWeight:700,color:BRAND.ink.body}}>{title}</h3><p className="mt-3" style={{fontSize:16,lineHeight:1.65,color:BRAND.ink.muted}}>{caption}</p><a href={src} target="_blank" rel="noreferrer" className="inline-block mt-4" style={{color:BRAND.primary[700],fontWeight:700,fontSize:14}}>View full-size reference</a></figcaption></figure>)}
        </div>
      </section>

      <section aria-labelledby="application-title">
        <SectionEyebrow number="05" label="Apply the language" />
        <div className="grid md:grid-cols-2 gap-4">
          <Card><h2 id="application-title" style={{fontSize:24,fontWeight:700,color:BRAND.ink.body}}>Event and partner compositions</h2><p className="mt-3" style={{fontSize:16,lineHeight:1.65,color:BRAND.ink.muted}}>Reserve a clear top zone for approved marks. Keep event details in one high-contrast panel. Use an angular photo window for recaps, or a portrait-led split for speaker promotions. Show one date/location group and one action. Partner artwork follows its own usage rules.</p></Card>
          <Card><h2 style={{fontSize:24,fontWeight:700,color:BRAND.ink.body}}>Brand film and motion</h2><p className="mt-3" style={{fontSize:16,lineHeight:1.65,color:BRAND.ink.muted}}>Animate a small number of line sweeps, light accents, or depth layers. Let the subject and headline settle before the next idea. Keep essential text stable long enough to read, avoid strobing, and preserve the message with sound off. Use a steady final logo and CTA hold.</p></Card>
        </div>
      </section>

      <section aria-labelledby="creative-brief-title">
        <SectionEyebrow number="06" label="Reusable direction" />
        <div className="flex flex-wrap justify-between items-center gap-4 mb-4"><h2 id="creative-brief-title" style={{fontSize:28,fontWeight:700,color:BRAND.ink.body}}>A starting brief for your creative partner</h2><button type="button" onClick={copyBrief} className="rounded-lg px-4 py-3" style={{background:BRAND.primary[500],color:BRAND.surface.card,fontSize:14,fontWeight:700}}>{copyState}</button></div>
        <textarea readOnly aria-label="Reusable creative direction" value={CAMPAIGN_BRIEF} rows={8} style={{width:"100%",resize:"vertical",padding:20,borderRadius:12,border:`1px solid ${BRAND.surface.border}`,background:BRAND.surface.card,color:BRAND.ink.body,fontSize:16,lineHeight:1.65}} />
        <p className="mt-4" style={{fontSize:15,lineHeight:1.65,color:BRAND.ink.muted}}>Add the campaign objective, audience, final copy, required assets, output dimensions, CTA, deadline, and approver. The creative direction is reusable; those project decisions change each time.</p>
      </section>
    </div>
  );
};
window.DesignLanguageTab = DesignLanguageTab;
