import type { Metadata } from "next";
import Image from "next/image";
import { SiteShell } from "./_components/SiteShell";

export const metadata: Metadata = {
  title: { absolute: "SmartCut64 — fast, frame-accurate Windows video editing" },
  description: "Frame-accurate cuts with validated smart rendering, modern 64-bit codecs, batch workflows and familiar editing controls.",
};

export default function Home() {
  return (
    <SiteShell>
      <div className="announcement"><strong>Pre-launch release candidate</strong> · Windows 10/11 · Native 64-bit · Checkout is not yet enabled</div>
      <section className="hero">
        <div className="hero-grid">
          <div>
            <p className="eyebrow">Fast, exact, transparent</p>
            <h1>Cut precisely.<br /><span>Keep the quality.</span></h1>
            <p className="hero-lead">SmartCut64 copies safe compressed GOPs and re-encodes only the pictures that need repair at a cut. You see the plan, the progress phase, and the validation result.</p>
            <div className="hero-actions">
              <a className="button-primary" href="/demo">Watch the product demo</a>
              <a className="button-secondary" href="/formats">Check your formats</a>
            </div>
            <div className="hero-proof"><span>Frame-accurate timeline</span><span>Modern 64-bit pipeline</span><span>Software fallback</span></div>
          </div>
          <div className="product-visual">
            <Image src="/smartcut64-hero.png" width={1680} height={945} priority alt="SmartCut64 opening screen with a film strip being cut and an Open Video button" />
          </div>
        </div>
      </section>

      <section className="section">
        <div className="content-wide">
          <div className="section-heading">
            <div><p className="eyebrow">The editing loop</p><h2>Three steps, with every frame visible</h2></div>
            <p>Open a source, mark what stays or goes, then choose an output profile. The thumbnail strip, dB waveform, cut colours and Preview Your Edits mode all reflect the same frame model.</p>
          </div>
          <div className="workflow-grid">
            <article className="workflow-card"><span className="workflow-number">01</span><h3>Navigate</h3><p>Scrub the program, use single-frame thumbnails, jump by keyframe or chapter, and inspect real source audio.</p></article>
            <article className="workflow-card"><span className="workflow-number">02</span><h3>Mark and review</h3><p>Set In and Out, cut or trim, then preview only the kept sequence across every edit boundary.</p></article>
            <article className="workflow-card"><span className="workflow-number">03</span><h3>Save with evidence</h3><p>Watch boundary encoding and packet copy separately. A destination is completed only after its validation passes.</p></article>
          </div>
        </div>
      </section>

      <section className="section section-soft">
        <div className="content-wide">
          <div className="section-heading">
            <div><p className="eyebrow">Built for real libraries</p><h2>More than a cutter</h2></div>
            <p>SmartCut64 keeps the directness long-time editor users value while adding current codecs, explicit container guidance, background work and failure reports that are useful.</p>
          </div>
          <div className="feature-grid">
            <article className="feature-card"><span className="card-icon">⌁</span><h3>Intelligent smart render</h3><p>Copy reusable interior GOPs. Encode unsafe boundary pictures with the source codec and validate the joined result.</p></article>
            <article className="feature-card"><span className="card-icon">P</span><h3>Preview Your Edits</h3><p>Playback, controls and thumbnails map onto the kept output, skipping every removed frame before you export.</p></article>
            <article className="feature-card"><span className="card-icon">A</span><h3>Ad-Detective</h3><p>Scan scene and black-frame transitions, review candidates, and accept only the markers or cuts you want.</p></article>
            <article className="feature-card"><span className="card-icon">＋</span><h3>Joiner and title cards</h3><p>Combine edited projects, source clips and multi-object title cards into one validated delivery.</p></article>
            <article className="feature-card"><span className="card-icon">≋</span><h3>Batch and watch folders</h3><p>Queue edits, scans, remuxes and Joiner jobs with stable output naming and visible operation status.</p></article>
            <article className="feature-card"><span className="card-icon">GPU</span><h3>Measured acceleration</h3><p>One NVIDIA, Intel or AMD adapter can accelerate supported work, with per-codec advice and automatic software retry.</p></article>
          </div>
        </div>
      </section>

      <section className="section section-dark">
        <div className="content-wide">
          <div className="section-heading">
            <div><p className="eyebrow">Current pipeline</p><h2>Modern formats, conservative decisions</h2></div>
            <p>If a packet-copy route cannot be proved safe, SmartCut64 encodes the boundary or explains why the requested container needs a different stream choice.</p>
          </div>
          <div className="stats-grid">
            <div className="stat"><strong>H.264 / HEVC</strong><span>including tested 10-bit HEVC paths</span></div>
            <div className="stat"><strong>MPEG-2 / MPEG-4</strong><span>including DVD-originated editor workflows</span></div>
            <div className="stat"><strong>AV1 / VP9</strong><span>preview and tested smart-render paths</span></div>
            <div className="stat"><strong>FFV1 / ProRes</strong><span>software plus tested Vulkan full transcode</span></div>
          </div>
          <div className="codec-usp">
            <div><span>Video</span><p>MPEG-2 · MPEG-4 Part 2 · H.264/AVC · HEVC/H.265 Main/Main10 · AV1 8/10-bit · VP9 8/10-bit · FFV1 · Apple ProRes</p></div>
            <div><span>Audio</span><p>AAC · AC-3 · E-AC-3 · MP2 · MP3 · FLAC · Opus · Vorbis · ALAC · PCM · DVD/Blu-ray LPCM · DTS/DTS-HD family · TrueHD/Atmos bitstream · Dolby E bridge</p></div>
            <a href="/formats">View the operation-by-operation codec matrix</a>
          </div>
        </div>
      </section>

      <section className="section">
        <div className="content-wide compatibility-band">
          <div><p className="eyebrow">A familiar transition</p><h2>Keep the muscle memory. Gain a current engine.</h2><p>Cut/scene editing, thumbnails, chapter movement, Preview Your Edits, Joiner, Ad-Detective, Batch Manager, QuickStream Fix and supported project interchange follow familiar desktop conventions. DVD authoring and disc burning are intentionally excluded.</p></div>
          <div className="compatibility-list"><span>Single-frame centred thumbnails</span><span>Green kept / red removed timeline</span><span>VideoReDo project and batch interchange where supported</span><span>Light and professional dark themes</span></div>
        </div>
      </section>

      <section className="section section-soft">
        <div className="content-wide price-panel">
          <div><p className="eyebrow">Planned founding offer</p><h2>Official signed build, clean exports and support</h2><p>The proposed first 250 Personal licences include two computer activations plus 12 months of updates and email support. SmartCut64 is GPL-3.0-or-later; paying supports the official signed release, clean-export entitlement, updates and support without removing free-software rights.</p></div>
          <div className="price-block"><strong>£4.99</strong><span>one-time for the first 250 customers<br />then £14.99 one-time · no subscription</span></div>
        </div>
      </section>

      <section className="section">
        <div className="content-wide">
          <div className="section-heading"><div><p className="eyebrow">Straight answers</p><h2>Before you try it</h2></div><p>The release page distinguishes implemented and tested work from the independent approvals still required before public sale.</p></div>
          <div className="faq-grid">
            <article className="faq-card"><h3>Does it re-encode the whole file?</h3><p>Normally no. Intelligent smart render encodes unsafe boundaries and copies reusable GOPs. Evaluation watermarking, codec changes and full-transcode profiles do re-encode kept video.</p></article>
            <article className="faq-card"><h3>Will it use my GPU?</h3><p>It can test the actual available adapter per codec, recommend a decoder/encoder, and fall back to software. Boundary GOP encoding remains software-only.</p></article>
            <article className="faq-card"><h3>Can it edit DVD video?</h3><p>Supported MPEG-2, VOB and program-stream media can be edited. SmartCut64 does not author menus, build VIDEO_TS structures or burn discs.</p></article>
            <article className="faq-card"><h3>Is it available to buy today?</h3><p>Not yet. Checkout remains disabled until signed artifacts, test purchases, independent legal review and codec-patent decisions are complete.</p></article>
          </div>
        </div>
      </section>
    </SiteShell>
  );
}
