// All pages — Home, Portfolio (+ detail), About, Services, Contact, Strategy.
// Real works, real images, Basic typography.

// ═════════════════════════════════════════════════════════════════════
// HOME
// ═════════════════════════════════════════════════════════════════════
function HomePage({ navigate, openProject }) {
  // Feature 4 hand-picked projects in asymmetric arrangement
  const featuredIds = ["yvonne-zurcher", "captn-sullys", "montecito", "divanova", "wanderer", "peacock"];
  const featured = featuredIds.map(id => PROJECTS.find(p => p.id === id)).filter(Boolean);

  // Hero tags — each jumps to Portfolio with the filter pre-selected.
  const heroTags = [
    { label: "Brand Identity", filter: "Brand Identity", red: true },
    { label: "Wordmarks",     filter: "Wordmark" },
    { label: "Line Art",      filter: "Line art" },
    { label: "Editorial",     filter: "Editorial" },
  ];

  return (
    <main>
      {/* ────── HERO — text left, ring right ────── */}
      <header className="hero" style={{
        minHeight: "100vh", display: "flex", alignItems: "center",
        position: "relative",
        background: "var(--black)",
        overflow: "hidden",
        paddingTop: 120,
      }}>
        <div className="ghost">GENCY</div>

        <div className="wrap" style={{ position: "relative", zIndex: 3, width: "100%" }}>
          <div style={{ display: "grid", gridTemplateColumns: "1.05fr 1fr", gap: 60, alignItems: "center" }}>
            {/* LEFT — text */}
            <div>
              <div className="fade-1 mono" style={{ color: "var(--red)", marginBottom: 32 }}>
                ▸ Independent Studio · Est. 2021
              </div>
              <h1 className="fade-2 display" style={{
                fontSize: "clamp(40px, 5vw, 82px)",
                color: "var(--white)",
                letterSpacing: "-0.01em",
              }}>
                Lines that<br/>hold weight.
              </h1>
              <div className="fade-3 mono" style={{
                marginTop: 30, fontSize: 12, letterSpacing: ".3em", color: "var(--gray)",
              }}>
                Logo Design · Illustration · Art Direction
              </div>
              <div className="fade-4" style={{ display: "flex", gap: 12, flexWrap: "wrap", marginTop: 34 }}>
                {heroTags.map(t => (
                  <button
                    key={t.filter}
                    onClick={() => navigate("portfolio", t.filter)}
                    className={"tag" + (t.red ? " red" : "")}
                    style={{ cursor: "pointer", transition: "transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease" }}
                    onMouseEnter={e => {
                      e.currentTarget.style.transform = "translateY(-2px)";
                      if (!t.red) {
                        e.currentTarget.style.background = "var(--red)";
                        e.currentTarget.style.borderColor = "var(--red)";
                        e.currentTarget.style.color = "#fff";
                      }
                    }}
                    onMouseLeave={e => {
                      e.currentTarget.style.transform = "none";
                      if (!t.red) {
                        e.currentTarget.style.background = "transparent";
                        e.currentTarget.style.borderColor = "";
                        e.currentTarget.style.color = "";
                      }
                    }}
                  >
                    {t.label}
                  </button>
                ))}
              </div>
              <div className="fade-5" style={{ marginTop: 44, display: "flex", gap: 14, flexWrap: "wrap" }}>
                <button onClick={() => navigate("portfolio")} className="btn btn-red">See the work →</button>
                <button onClick={() => navigate("services")} className="btn btn-ghost">Services</button>
              </div>
            </div>

            {/* RIGHT — ring */}
            <div className="fade-3" style={{ position: "relative", display: "flex", justifyContent: "center", alignItems: "center" }}>
              <HeroRing />
            </div>
          </div>
        </div>

        <div className="scrollcue fade-5">Scroll</div>
      </header>

      {/* ────── OVERVIEW ────── */}
      <section className="pad-lg">
        <div className="wrap">
          <Reveal>
            <span className="eyebrow">01 — Studio</span>
            <h2 className="sec-title">A studio for marks<br/>that <span style={{ color: "var(--red)" }}>last longer</span><br/>than the trend.</h2>
            <p className="lead">GencyDesigns is the one-person studio of an independent logo designer, illustrator, and art director. The work is hand-drawn first, vectorised second, and shipped only when every line earns its place.</p>
            <div className="metabar">
              <div><div className="k">Practice</div><div className="v">Identity</div></div>
              <div><div className="k">Founded</div><div className="v">2021</div></div>
              <div><div className="k">Discipline</div><div className="v">Multidisciplinary</div></div>
              <div><div className="k">Clients</div><div className="v">Worldwide</div></div>
            </div>
          </Reveal>
        </div>
      </section>

      {/* ────── SELECTED WORK ────── */}
      <section className="pad" id="selected-work">
        <div className="wrap">
          <Reveal>
            <div style={{ display: "flex", justifyContent: "space-between", alignItems: "flex-end", flexWrap: "wrap", gap: 18, marginBottom: 52 }}>
              <div>
                <span className="eyebrow">01 — Selected Work</span>
                <h2 className="sec-title" style={{ marginBottom: 0 }}>Recent<br/>commissions.</h2>
              </div>
              <button onClick={() => navigate("portfolio")} className="btn btn-ghost">View all work →</button>
            </div>
          </Reveal>
          <div className="work-grid">
            {featured.map((p, i) => (
              <WorkCard key={p.id} project={p} index={i} onClick={() => openProject(p.id)} />
            ))}
          </div>
        </div>
      </section>

      {/* ────── STATEMENT — RED ────── */}
      <section className="pad-lg" style={{ background: "var(--red)", color: "#fff", textAlign: "center" }}>
        <div className="wrap-narrow">
          <Reveal>
            <p className="display" style={{ fontSize: "clamp(30px, 5.8vw, 84px)", lineHeight: 1.02 }}>
              "We arrived with a<br/>moodboard. We left with<br/>a mark we'd never have<br/>asked for."
            </p>
            <p className="mono" style={{ marginTop: 38, fontSize: 12, letterSpacing: ".28em", opacity: 0.85 }}>
              — Yvonne Zürcher · Personal commission
            </p>
          </Reveal>
        </div>
      </section>

      {/* ────── PROCESS ────── */}
      <section className="pad-lg" style={{ background: "var(--ink-2)" }}>
        <div className="wrap">
          <Reveal>
            <span className="eyebrow">02 — Process</span>
            <h2 className="sec-title">Four movements,<br/>one mark.</h2>
            <p className="lead">The method is small on purpose. No five-week discovery, no fifty-slide deck — just enough structure to give the drawing room to be specific.</p>
            <div style={{
              display: "grid", gridTemplateColumns: "repeat(4, 1fr)", gap: 0,
              marginTop: 64, borderTop: "1px solid var(--line)",
            }}>
              {PROCESS_STEPS.map((s, i) => (
                <div key={s.n} style={{
                  padding: "44px 30px 44px 0",
                  borderRight: i < 3 ? "1px solid var(--line)" : "none",
                  paddingRight: i === 3 ? 0 : 30,
                  paddingLeft: i === 0 ? 0 : 30,
                }}>
                  <div className="mono" style={{ fontSize: 14, color: "var(--red)", letterSpacing: ".15em", marginBottom: 22 }}>/ {s.n}</div>
                  <h3 className="head" style={{ fontSize: 26, marginBottom: 14, color: "var(--white)", letterSpacing: ".02em" }}>{s.title.toUpperCase()}</h3>
                  <p style={{ fontSize: 14, lineHeight: 1.7, color: "var(--gray-2)", fontWeight: 300 }}>{s.body}</p>
                </div>
              ))}
            </div>
          </Reveal>
        </div>
      </section>

      {/* ────── DISCIPLINES ────── */}
      <section className="pad-lg">
        <div className="wrap">
          <Reveal>
            <span className="eyebrow">03 — Disciplines</span>
            <h2 className="sec-title">What gets<br/>made here.</h2>
            <div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 24, marginTop: 60 }}>
              {[
                { n: "01", t: "Logo & Identity", b: "Wordmarks, monograms, single-line marks. Hand-drawn before they're vectorised. Built to scale from a hood-tab to a billboard." },
                { n: "02", t: "Illustration", b: "Editorial, packaging, marginalia. Line-art series drawn at A2 with a 0.3mm rapidograph, then reduced." },
                { n: "03", t: "Art Direction", b: "Editorial issues, campaigns, image commissioning. Type and layout systems that hold up across production." },
              ].map(d => (
                <button key={d.n} onClick={() => navigate("portfolio")} style={{
                  textAlign: "left", padding: 30, background: "var(--ink-2)",
                  border: "1px solid var(--line)", borderRadius: 8,
                  transition: "transform .4s, border-color .4s, background .4s",
                }}
                onMouseEnter={e => { e.currentTarget.style.borderColor = "var(--red)"; e.currentTarget.style.transform = "translateY(-4px)"; }}
                onMouseLeave={e => { e.currentTarget.style.borderColor = "var(--line)"; e.currentTarget.style.transform = "translateY(0)"; }}
                >
                  <div className="mono" style={{ color: "var(--red)", marginBottom: 32 }}>/ {d.n}</div>
                  <h3 className="display" style={{ fontSize: 32, marginBottom: 18, letterSpacing: ".01em" }}>{d.t}</h3>
                  <p style={{ fontSize: 14, lineHeight: 1.65, color: "var(--gray-2)", fontWeight: 300 }}>{d.b}</p>
                  <div className="mono" style={{ marginTop: 32, color: "var(--gray)", display: "flex", justifyContent: "space-between" }}>
                    <span>SEE WORK</span><span>→</span>
                  </div>
                </button>
              ))}
            </div>
          </Reveal>
        </div>
      </section>

      {/* ────── CTA OUTRO ────── */}
      <section className="pad-lg" style={{ background: "var(--ink-2)", textAlign: "center" }}>
        <div className="wrap-narrow">
          <Reveal>
            <span className="eyebrow">04 — Working together</span>
            <h2 className="display" style={{ fontSize: "clamp(40px, 7vw, 110px)", marginBottom: 26 }}>
              Let's make<br/>a mark<br/><span style={{ color: "var(--red)" }}>that lasts.</span>
            </h2>
            <p style={{ fontSize: 17, color: "var(--gray)", maxWidth: 540, margin: "0 auto 44px", lineHeight: 1.7, fontWeight: 300 }}>
              Tell me about the work — the company, the audience, the deadline you're not sure about. I read everything and reply within 12 hours, 7/7.
            </p>
            <button onClick={() => navigate("contact")} className="btn">Begin a conversation ↗</button>
          </Reveal>
        </div>
      </section>
    </main>
  );
}

function FeaturedCell({ project, idx, large, onClick }) {
  return (
    <ImageBlock
      src={project.cover.src}
      alt={project.title}
      ratio={large ? 4/5 : 1}
      num={`/ 0${idx + 1}`}
      onClick={onClick}
      overlay={
        <div>
          <div className="mono" style={{ color: "var(--red)", marginBottom: 10 }}>{project.category.toUpperCase()} · {project.year}</div>
          <h3 className="display" style={{ fontSize: 38, color: "#fff" }}>{project.title.toUpperCase()}</h3>
          <div className="mono" style={{ marginTop: 14, color: "var(--gray-3)" }}>View case study →</div>
        </div>
      }
    />
  );
}

// ═════════════════════════════════════════════════════════════════════
// PORTFOLIO
// ═════════════════════════════════════════════════════════════════════
function PortfolioPage({ openProject, initialFilter }) {
  const [filter, setFilter] = useState(initialFilter || "All");
  // Update if route changes carry a new filter
  useEffect(() => { if (initialFilter) setFilter(initialFilter); }, [initialFilter]);

  // Filter logic supports both top-level categories AND tag-keywords.
  // A tag match is case-insensitive substring match against any tag string.
  const isCategory = (v) => CATEGORIES.includes(v);
  const filtered = useMemo(() => {
    if (filter === "All") return PROJECTS;
    if (isCategory(filter)) return PROJECTS.filter(p => p.category === filter);
    const needle = filter.toLowerCase();
    return PROJECTS.filter(p => p.tags.some(t => t.toLowerCase().includes(needle)));
  }, [filter]);

  // Curated style/tag filters — mirror the hero chips so they're discoverable here too.
  const styleFilters = ["Wordmark", "Line art", "Editorial", "Engraving", "Monogram", "Packaging"];

  const countFor = (v) => {
    if (v === "All") return PROJECTS.length;
    if (isCategory(v)) return PROJECTS.filter(p => p.category === v).length;
    const needle = v.toLowerCase();
    return PROJECTS.filter(p => p.tags.some(t => t.toLowerCase().includes(needle))).length;
  };

  return (
    <main>
      <PageHeader
        index="01"
        label="Work · Index"
        title={<>An archive<br/>of marks.</>}
        sub="A selection of work since 2021 across logo design, brand identity, illustration, and art direction. Filter by discipline or style, or open any project for the long version."
        ghost="WORK"
      />

      {/* FILTER BAR — Discipline (categories) + Style (tag keywords) */}
      <section style={{ borderTop: "1px solid var(--line)", borderBottom: "1px solid var(--line)", padding: "22px 0", background: "var(--ink-2)" }}>
        <div className="wrap" style={{ display: "flex", flexDirection: "column", gap: 14 }}>
          {/* Row 1: Discipline */}
          <div style={{ display: "flex", alignItems: "center", gap: 18, flexWrap: "wrap" }}>
            <span className="mono gray" style={{ width: 88, flexShrink: 0 }}>DISCIPLINE</span>
            <div style={{ display: "flex", gap: 10, flexWrap: "wrap", flex: 1 }}>
              {CATEGORIES.map(c => (
                <button
                  key={c}
                  onClick={() => setFilter(c)}
                  className={"tag" + (filter === c ? " active" : "")}
                  style={{ cursor: "pointer" }}>
                  {c}
                </button>
              ))}
            </div>
            <span className="mono gray" style={{ flexShrink: 0 }}> </span>
          </div>
          {/* Row 2: Style */}
          <div style={{ display: "flex", alignItems: "center", gap: 18, flexWrap: "wrap", paddingTop: 10, borderTop: "1px solid var(--line)" }}>
            <span className="mono gray" style={{ width: 88, flexShrink: 0 }}>STYLE</span>
            <div style={{ display: "flex", gap: 10, flexWrap: "wrap", flex: 1 }}>
              {styleFilters.map(s => (
                <button
                  key={s}
                  onClick={() => setFilter(s)}
                  className={"tag" + (filter === s ? " active" : "")}
                  style={{ cursor: "pointer" }}>
                  {s}
                </button>
              ))}
            </div>
          </div>
        </div>
      </section>

      {/* GRID — grouped by discipline when viewing all */}
      <section className="pad">
        <div className="wrap">
          {filter === "All" ? (
            CATEGORIES.filter(c => c !== "All").map(cat => {
              const group = filtered
                .filter(p => p.category === cat)
                .sort((a, b) => Number(b.year) - Number(a.year));
              if (group.length === 0) return null;
              return (
                <div key={cat} style={{ marginBottom: 96 }}>
                  <Reveal>
                    <div style={{ display: "flex", alignItems: "baseline", justifyContent: "space-between", gap: 18, flexWrap: "wrap", paddingBottom: 22, marginBottom: 44, borderBottom: "1px solid var(--line-strong)" }}>
                      <h2 className="display" style={{ fontSize: "clamp(26px, 3.6vw, 50px)" }}>{cat}</h2>
                      <span className="mono gray">{String(group.length).padStart(2, "0")} {group.length === 1 ? "PROJECT" : "PROJECTS"}</span>
                    </div>
                  </Reveal>
                  <div className="work-grid">
                    {group.map((p, i) => (
                      <WorkCard key={p.id} project={p} index={i} onClick={() => openProject(p.id)} />
                    ))}
                  </div>
                </div>
              );
            })
          ) : (
            <div className="work-grid">
              {filtered.map((p, i) => (
                <WorkCard key={p.id} project={p} index={i} onClick={() => openProject(p.id)} />
              ))}
            </div>
          )}

          {filtered.length === 0 && (
            <div style={{ padding: "120px 0", textAlign: "center" }}>
              <p className="display" style={{ fontSize: 60 }}>Nothing here yet.</p>
            </div>
          )}
        </div>
      </section>
    </main>
  );
}

// ═════════════════════════════════════════════════════════════════════
// PROJECT DETAIL
// ═════════════════════════════════════════════════════════════════════
function ProjectDetail({ project, onClose, openProject }) {
  useEffect(() => {
    const onKey = (e) => { if (e.key === "Escape") onClose(); };
    window.addEventListener("keydown", onKey);
    document.body.style.overflow = "hidden";
    return () => {
      window.removeEventListener("keydown", onKey);
      document.body.style.overflow = "";
    };
  }, [onClose]);

  const i = PROJECTS.findIndex(p => p.id === project.id);
  const next = PROJECTS[(i + 1) % PROJECTS.length];
  const prev = PROJECTS[(i - 1 + PROJECTS.length) % PROJECTS.length];

  return (
    <div style={{
      position: "fixed", inset: 0, zIndex: 150,
      background: "var(--black)", color: "var(--white)", overflowY: "auto",
      animation: "fadeUp .5s cubic-bezier(.16,1,.3,1) both",
    }}>
      {/* Sticky bar */}
      <div style={{
        position: "sticky", top: 0, zIndex: 5,
        background: "color-mix(in srgb, var(--black) 85%, transparent)", backdropFilter: "blur(14px)",
        borderBottom: "1px solid var(--line)",
        padding: "18px 40px", display: "flex", justifyContent: "space-between", alignItems: "center",
      }}>
        <button onClick={onClose} className="mono" style={{ color: "var(--white)" }}>← BACK TO INDEX</button>
        <span className="mono gray">{project.title.toUpperCase()}</span>
        <button onClick={onClose} aria-label="Close" style={{ fontSize: 22, color: "var(--white)" }}>×</button>
      </div>

      {/* HERO */}
      <section className="pad-lg" style={{ position: "relative", overflow: "hidden", paddingTop: 100, paddingBottom: 80 }}>
        <div className="ghost" style={{ fontSize: "30vw" }}>{project.title.toUpperCase().split(" ")[0]}</div>
        <div className="wrap" style={{ position: "relative", zIndex: 2 }}>
          <div className="mono" style={{ color: "var(--red)", marginBottom: 22 }}>
            CASE STUDY · {project.category.toUpperCase()}
          </div>
          <h1 className="display" style={{ fontSize: "clamp(56px, 10vw, 152px)" }}>{project.title}</h1>
          <p className="lead" style={{ marginTop: 32, maxWidth: 760 }}>{project.summary}</p>

          <div className="metabar">
            <div><div className="k">Client</div><div className="v">{project.client.split(" ")[0]}</div></div>
            <div><div className="k">Discipline</div><div className="v">{project.category.split(" ")[0]}</div></div>
            <div><div className="k">Scope</div><div className="v">{project.tags[0]}</div></div>
            <div><div className="k">Year</div><div className="v">{project.year}</div></div>
          </div>
        </div>
      </section>

      {/* HERO BLEED — primary cover */}
      <div className="bleed">
        <Reveal>
          <div className="cap"><span>The Primary Mark</span><span>{project.title.toUpperCase()} · {project.year}</span></div>
          <ImageBlock
            src={project.cover.src}
            alt={project.title}
            ratio={Math.max(project.cover.ratio, 16/9)}
            num="/ HERO"
            fit="contain"
            style={{ background: "var(--ink-2)" }}
          />
        </Reveal>
      </div>

      {/* CONCEPT — inverse panel */}
      <section className="pad-lg" style={{ background: "var(--ink-2)", color: "var(--white)" }}>
        <div className="wrap">
          <Reveal>
            <span className="eyebrow">02 — The Concept</span>
            <h2 className="sec-title" style={{ color: "var(--white)" }}>One mark.<br/>Many lives.</h2>
            <div style={{ display: "grid", gridTemplateColumns: "1.05fr .95fr", gap: 90, alignItems: "center", marginTop: 40 }}>
              <div>
                <p className="lead" style={{ color: "var(--gray-2)" }}>
                  {project.client} arrived with a category problem disguised as a logo brief. We spent the first conversations not drawing — clarifying the proposition, sitting with the audience, deciding what the company would and wouldn't be.
                </p>
                <p className="body" style={{ color: "var(--gray-2)", marginTop: 22 }}>
                  The mark followed. One contour, drawn at four optical weights, tested at thumbnail and at billboard before it ever earned its name.
                </p>
                <div style={{ display: "flex", gap: 10, flexWrap: "wrap", marginTop: 34 }}>
                  {project.tags.map(t => (
                    <span key={t} style={{ border: "1px solid #d8d5cb", background: "#f3f1e9", color: "#444", padding: "8px 16px", borderRadius: 100, fontFamily: "var(--mono)", fontSize: 10, letterSpacing: ".14em", textTransform: "uppercase" }}>{t}</span>
                  ))}
                </div>
              </div>
              <div>
                <div style={{ aspectRatio: "1/1", background: "#f6f4ee", borderRadius: 6, position: "relative", overflow: "hidden", display: "flex", alignItems: "center", justifyContent: "center", padding: 32 }}>
                  <img src={project.cover.src} alt={project.title}
                    style={{ maxWidth: "100%", maxHeight: "100%", objectFit: "contain", filter: "contrast(1.05)" }} />
                </div>
                <p className="mono" style={{ fontSize: 11, color: "#777", marginTop: 16 }}>
                  Fig. 01 — The mark, isolated. Holds its reading down to favicon scale.
                </p>
              </div>
            </div>
          </Reveal>
        </div>
      </section>

      {/* GALLERY */}
      {project.gallery.length > 0 && (
        <section className="pad-lg">
          <div className="wrap">
            <Reveal>
              <span className="eyebrow">03 — System in use</span>
              <h2 className="sec-title">Off the page,<br/>onto the surface.</h2>
              <div style={{ display: "grid", gridTemplateColumns: project.gallery.length === 1 ? "1fr" : "1fr 1fr", gap: 20, marginTop: 60 }}>
                {project.gallery.map((g, ix) => (
                  <div key={ix} style={{ borderRadius: 8, overflow: "hidden", gridColumn: ix === 0 && project.gallery.length > 2 ? "1 / -1" : "auto" }}>
                    <ImageBlock
                      src={g.src}
                      alt={g.label}
                      ratio={g.ratio}
                      label={g.label.toUpperCase()}
                      num={`/ ${String(ix + 1).padStart(2, "0")}`}
                      fit="contain"
                      style={{ background: "var(--ink-2)" }}
                    />
                  </div>
                ))}
              </div>
            </Reveal>
          </div>
        </section>
      )}

      {/* STATEMENT */}
      <section className="pad-lg" style={{ background: "var(--red)", color: "#fff", textAlign: "center" }}>
        <div className="wrap-narrow">
          <Reveal>
            <p className="display" style={{ fontSize: "clamp(28px, 5.4vw, 80px)", lineHeight: 1.05, maxWidth: 1000, margin: "0 auto" }}>
              "Drawn once. Drawn well. The only thing about the company that hasn't changed since."
            </p>
            <p className="mono" style={{ marginTop: 38, fontSize: 12, letterSpacing: ".28em", opacity: 0.85 }}>
              — {project.client.toUpperCase()}
            </p>
          </Reveal>
        </div>
      </section>

      {/* PREV / NEXT */}
      <nav style={{ borderTop: "1px solid var(--line)", borderBottom: "1px solid var(--line)" }}>
        <div className="wrap" style={{ display: "grid", gridTemplateColumns: "1fr 1fr" }}>
          <button onClick={() => openProject(prev.id)} style={{ padding: "44px 32px 44px 0", textAlign: "left", borderRight: "1px solid var(--line)" }}>
            <div className="mono" style={{ color: "var(--red)", marginBottom: 12 }}>← PREVIOUS</div>
            <div className="display" style={{ fontSize: 36 }}>{prev.title}</div>
          </button>
          <button onClick={() => openProject(next.id)} style={{ padding: "44px 0 44px 32px", textAlign: "right" }}>
            <div className="mono" style={{ color: "var(--red)", marginBottom: 12 }}>NEXT →</div>
            <div className="display" style={{ fontSize: 36 }}>{next.title}</div>
          </button>
        </div>
      </nav>
    </div>
  );
}

// ═════════════════════════════════════════════════════════════════════
// ABOUT
// ═════════════════════════════════════════════════════════════════════
function AboutPage({ navigate }) {
  return (
    <main>
      <PageHeader
        index="02"
        label="Studio · About"
        title={<>Drawing since<br/>before it was<br/>useful.</>}
        sub="GencyDesigns is a one-person studio practicing logo design, illustration, and art direction. The work is hand-drawn first, vectorised second, and shipped only when every line earns its place."
        ghost="STUDIO"
      />

      {/* PORTRAIT + INTRO — uses real portrait */}
      <section className="pad-lg">
        <div className="wrap">
          <div style={{ display: "grid", gridTemplateColumns: "1.1fr 1fr", gap: 80, alignItems: "start" }}>
            <Reveal>
              <div style={{ position: "relative", overflow: "hidden", borderRadius: 4 }}>
                <img src="assets/portrait.jpg" alt="Gency — portrait"
                  style={{ width: "100%", aspectRatio: "4/5", objectFit: "cover", display: "block", filter: "contrast(1.05)" }} />
                <div style={{ position: "absolute", left: 16, bottom: 14, fontFamily: "var(--mono)", fontSize: 10, letterSpacing: ".14em", textTransform: "uppercase", color: "#fff", background: "rgba(10,10,11,.6)", padding: "6px 12px", borderRadius: 100, border: "1px solid rgba(255,255,255,.18)" }}>
                  GENCY · STUDIO PORTRAIT
                </div>
              </div>
              <div className="mono gray" style={{ display: "flex", justifyContent: "space-between", marginTop: 14 }}>
                <span>FIG. 01</span><span>SHOT BY THE WINDOW · 2026</span>
              </div>
            </Reveal>
            <Reveal style={{ paddingTop: 24 }}>
              <p className="display" style={{ fontSize: "clamp(30px, 4vw, 56px)", marginBottom: 32 }}>
                I'm Gency.<br/>I draw <span style={{ color: "var(--red)" }}>marks</span>.
              </p>
              <p className="body">The studio opened in 2021. I left agencies because the work I cared about — the slow, line-by-line, draw-it-again work — wasn't the work that paid their rent.</p>
              <p className="body" style={{ marginTop: 18 }}>It pays mine, now. Most clients come by referral, which keeps the practice small on purpose — focused, selective, and answerable only to the work.</p>
              <p className="body" style={{ marginTop: 18 }}>The signature is line art — single-weight, continuous-stroke, drawn before it ever sees a Bézier. It lasts longer than the style of the moment.</p>
              <div style={{ display: "flex", gap: 12, marginTop: 40 }}>
                <button onClick={() => navigate("portfolio")} className="btn">See the work →</button>
                <button onClick={() => navigate("contact")} className="btn btn-ghost">Get in touch</button>
              </div>
            </Reveal>
          </div>
        </div>
      </section>

      {/* PRINCIPLES — RED */}
      <section className="pad-lg" style={{ background: "var(--red)", color: "#fff" }}>
        <div className="wrap">
          <Reveal>
            <span className="eyebrow" style={{ color: "#fff" }}>01 — Practice</span>
            <h2 className="sec-title">Three things<br/>I don't negotiate.</h2>
            <div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 48, marginTop: 64 }}>
              {[
                { n: "/ 01", t: "Drawn, not generated.", b: "Every mark starts as a pencil drawing. The vector is the last step, not the first — and never the only one." },
                { n: "/ 02", t: "Few rounds, deep ones.", b: "Two refinement rounds, not five. The cost of clarity is showing up with strong opinions, lightly held." },
                { n: "/ 03", t: "One stroke, many sizes.", b: "If a mark only works at one size, it isn't a mark — it's a poster. Tested at thumbnail and at billboard before sign-off." },
              ].map((p, i) => (
                <div key={i} style={{ borderTop: "1px solid rgba(255,255,255,.25)", paddingTop: 24 }}>
                  <div className="mono" style={{ marginBottom: 22, opacity: 0.85 }}>{p.n}</div>
                  <h3 className="display" style={{ fontSize: 32, marginBottom: 18, letterSpacing: ".01em" }}>{p.t}</h3>
                  <p style={{ fontSize: 14, lineHeight: 1.7, opacity: 0.92, fontWeight: 300 }}>{p.b}</p>
                </div>
              ))}
            </div>
          </Reveal>
        </div>
      </section>

      {/* DISCIPLINES */}
      <section className="pad-lg" style={{ background: "var(--ink-2)" }}>
        <div className="wrap">
          <Reveal>
            <span className="eyebrow">02 — Disciplines</span>
            <h2 className="sec-title">What I make,<br/>specifically.</h2>
            <div style={{ marginTop: 60 }}>
              {[
                { c: "Logo & monogram", items: "Wordmarks · Continuous-line marks · Monograms · Custom display lettering · Identity refresh" },
                { c: "Brand identity systems", items: "Strategy · Type & color · Illustration library · Guidelines · Templates · Rollout" },
                { c: "Illustration", items: "Editorial · Line-art series · Cover commissions · Packaging illustration · Marginalia" },
                { c: "Art direction", items: "Editorial issues · Campaigns · Image commissioning · Type & layout systems · Production oversight" },
              ].map((s, i) => (
                <div key={s.c} style={{
                  borderTop: "1px solid var(--line)",
                  borderBottom: i === 3 ? "1px solid var(--line)" : "none",
                  padding: "32px 0", display: "grid", gridTemplateColumns: "60px 1fr 2fr", gap: 32, alignItems: "baseline",
                }}>
                  <span className="mono" style={{ color: "var(--red)" }}>/ 0{i + 1}</span>
                  <h3 className="head" style={{ fontSize: 22 }}>{s.c.toUpperCase()}</h3>
                  <p className="body" style={{ maxWidth: "none" }}>{s.items}</p>
                </div>
              ))}
            </div>
          </Reveal>
        </div>
      </section>

      {/* RECOGNITION */}
      <section className="pad-lg">
        <div className="wrap">
          <Reveal>
            <span className="eyebrow">03 — Recognition</span>
            <h2 className="sec-title">A few honest<br/>nods.</h2>
            <ul style={{ listStyle: "none", marginTop: 60 }}>
              {RECOGNITIONS.map((r, i) => (
                <li key={i} style={{ borderTop: "1px solid var(--line)", padding: "26px 0", display: "flex", justifyContent: "space-between", alignItems: "baseline", gap: 24 }}>
                  <span className="head" style={{ fontSize: 20 }}>{r.toUpperCase()}</span>
                  <span className="mono gray" style={{ flexShrink: 0 }}>20{23 + (i % 3)}</span>
                </li>
              ))}
            </ul>
          </Reveal>
        </div>
      </section>
    </main>
  );
}

// ═════════════════════════════════════════════════════════════════════
// SERVICES
// ═════════════════════════════════════════════════════════════════════
function ServicesPage({ navigate }) {
  const [openFaq, setOpenFaq] = useState(0);
  return (
    <main>
      <PageHeader
        index="03"
        label="Services · Offerings"
        title={<>Three ways<br/>to work<br/>together.</>}
        sub="Every project gets a written estimate before we begin. Pricing is honest — based on scope, complexity, and how many touchpoints the system needs to govern."
        ghost="SERVICES"
      />

      <section className="pad-lg">
        <div className="wrap">
          <Reveal>
            <div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 20 }}>
              {SERVICES.map((s, i) => (
                <article key={s.id} style={{
                  padding: 36, borderRadius: 8,
                  background: s.featured ? "var(--red)" : "var(--ink-2)",
                  color: s.featured ? "#fff" : "var(--white)",
                  border: s.featured ? "1px solid var(--red)" : "1px solid var(--line)",
                  display: "flex", flexDirection: "column", minHeight: 640,
                  transition: "transform .4s",
                }}
                onMouseEnter={e => e.currentTarget.style.transform = "translateY(-6px)"}
                onMouseLeave={e => e.currentTarget.style.transform = "translateY(0)"}
                >
                  <div style={{ display: "flex", justifyContent: "space-between", alignItems: "baseline", marginBottom: 32 }}>
                    <span className="mono" style={{ color: s.featured ? "rgba(255,255,255,.85)" : "var(--red)" }}>/ {s.n}</span>
                    {s.featured && <span className="mono" style={{ color: "#fff", letterSpacing: ".2em" }}>★ MOST ASKED</span>}
                  </div>
                  <h3 className="display" style={{ fontSize: 48, marginBottom: 14, letterSpacing: ".01em" }}>{s.name}</h3>
                  <p style={{ fontSize: 16, marginBottom: 24, opacity: s.featured ? 0.92 : 1, fontWeight: 300 }}>{s.tagline}</p>
                  <p style={{ fontSize: 14, lineHeight: 1.65, marginBottom: 32, color: s.featured ? "rgba(255,255,255,.85)" : "var(--gray-2)", fontWeight: 300 }}>{s.description}</p>

                  <div style={{ borderTop: "1px solid " + (s.featured ? "rgba(255,255,255,.25)" : "var(--line)"), paddingTop: 22, marginBottom: 24 }}>
                    <div className="mono" style={{ marginBottom: 16, opacity: 0.7 }}>(INCLUDES)</div>
                    <ul style={{ listStyle: "none", display: "flex", flexDirection: "column", gap: 10 }}>
                      {s.deliverables.map((d, ix) => (
                        <li key={ix} style={{ display: "flex", gap: 12, fontSize: 14, lineHeight: 1.45, fontWeight: 300 }}>
                          <span style={{ color: s.featured ? "#fff" : "var(--red)", flexShrink: 0 }}>—</span>
                          <span>{d}</span>
                        </li>
                      ))}
                    </ul>
                  </div>

                  <div style={{ marginTop: "auto" }}>
                    <div style={{ display: "flex", justifyContent: "space-between", paddingTop: 18, borderTop: "1px solid " + (s.featured ? "rgba(255,255,255,.25)" : "var(--line)") }}>
                      <span className="mono" style={{ opacity: 0.7 }}>(TIMELINE)</span>
                      <span className="mono">{s.timeline.toUpperCase()}</span>
                    </div>
                    <div className="display" style={{ fontSize: 32, margin: "22px 0 24px" }}>{s.starting}</div>
                    <button onClick={() => navigate("contact")} className="btn" style={{
                      width: "100%", justifyContent: "center",
                      background: s.featured ? "#fff" : "var(--white)",
                      color: s.featured ? "#0a0a0b" : "var(--black)",
                    }}>
                      Request quote →
                    </button>
                  </div>
                </article>
              ))}
            </div>
          </Reveal>
        </div>
      </section>

      <section className="pad" style={{ background: "var(--ink-2)" }}>
        <div className="wrap">
          <Reveal>
            <div style={{ display: "grid", gridTemplateColumns: "1fr 2fr", gap: 64 }}>
              <div>
                <span className="eyebrow">01 — On Pricing</span>
                <h2 className="sec-title">Honest,<br/>by design.</h2>
              </div>
              <div style={{ display: "flex", flexDirection: "column", gap: 18 }}>
                <p className="body">The numbers don't appear here on purpose. Pricing is by quote — once we've talked, you'll get a written estimate fixed to your scope, with no surprises and no after-the-fact line items.</p>
                <p className="body">Payment is 40% to begin, 30% at midpoint, 30% on delivery. Smaller projects can be a single split.</p>
                <p className="body">Don't see what you need? Identity refreshes, packaging-only commissions, type design, and consulting all happen here too — just <button onClick={() => navigate("contact")} style={{ color: "var(--red)", textDecoration: "underline", fontFamily: "inherit", fontSize: "inherit" }}>ask</button>.</p>
              </div>
            </div>
          </Reveal>
        </div>
      </section>

      <section className="pad-lg">
        <div className="wrap">
          <Reveal>
            <div style={{ display: "grid", gridTemplateColumns: "1fr 2fr", gap: 64, alignItems: "start" }}>
              <div>
                <span className="eyebrow">02 — Common questions</span>
                <h2 className="sec-title">Before you<br/>write — maybe<br/>this.</h2>
              </div>
              <div>
                {FAQ.map((f, i) => (
                  <div key={i} style={{ borderTop: "1px solid var(--line)" }}>
                    <button onClick={() => setOpenFaq(openFaq === i ? -1 : i)}
                      style={{ width: "100%", textAlign: "left", display: "flex", justifyContent: "space-between", alignItems: "center", padding: "28px 0", gap: 24 }}>
                      <span className="head" style={{ fontSize: 20 }}>{f.q.toUpperCase()}</span>
                      <span className="mono" style={{ flexShrink: 0, color: "var(--red)", fontSize: 18, transition: "transform .3s", transform: openFaq === i ? "rotate(45deg)" : "none" }}>+</span>
                    </button>
                    <div style={{
                      maxHeight: openFaq === i ? 240 : 0, overflow: "hidden",
                      transition: "max-height .4s cubic-bezier(.2,.7,.2,1)",
                    }}>
                      <p className="body" style={{ paddingBottom: 28, paddingRight: 60 }}>{f.a}</p>
                    </div>
                  </div>
                ))}
                <div style={{ borderTop: "1px solid var(--line)" }}></div>
              </div>
            </div>
          </Reveal>
        </div>
      </section>
    </main>
  );
}

// ═════════════════════════════════════════════════════════════════════
// CONTACT
// ═════════════════════════════════════════════════════════════════════
function ContactPage({ navigate }) {
  const CONTACT_EMAIL = "hello@gencydesigns.com";
  const [form, setForm] = useState({
    name: "", email: "", projectType: "Brand Identity", budget: "By quote", timeline: "2–3 weeks", message: "",
  });
  const [errors, setErrors] = useState({});
  const [submitted, setSubmitted] = useState(false);
  const [mailHref, setMailHref] = useState("#");
  const update = (k, v) => setForm(f => ({ ...f, [k]: v }));
  const validate = () => {
    const e = {};
    if (!form.name.trim()) e.name = "Required";
    if (!form.email.trim()) e.email = "Required";
    else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(form.email)) e.email = "Check this";
    if (!form.message.trim() || form.message.trim().length < 20) e.message = "A sentence or two, please";
    setErrors(e);
    return Object.keys(e).length === 0;
  };
  const onSubmit = (ev) => {
    ev.preventDefault();
    if (!validate()) return;
    const body = [
      `New enquiry from ${form.name}`,
      `Submitted ${new Date().toLocaleString()}`,
      ``,
      `Name: ${form.name}`,
      `Email: ${form.email}`,
      `Project type: ${form.projectType}`,
      `Budget: ${form.budget}`,
      `Timeline: ${form.timeline}`,
      ``,
      `Message:`,
      form.message,
    ].join("\n");
    const href = `mailto:${CONTACT_EMAIL}?subject=${encodeURIComponent(`Enquiry \u2014 ${form.name}`)}&body=${encodeURIComponent(body)}`;
    setMailHref(href);
    setSubmitted(true);
    window.location.href = href;
  };

  if (submitted) {
    return (
      <main style={{ background: "var(--black)", minHeight: "100vh", display: "flex", alignItems: "center" }}>
        <section className="wrap-narrow" style={{ padding: "200px 40px", textAlign: "center" }}>
          <div className="mono" style={{ color: "var(--red)", marginBottom: 28 }}>▸ RECEIVED · {new Date().toLocaleDateString()}</div>
          <h1 className="display" style={{ fontSize: "clamp(56px, 8.5vw, 132px)" }}>
            Thank you,<br/><span style={{ color: "var(--red)" }}>{form.name.split(" ")[0]}.</span>
          </h1>
          <p className="lead" style={{ marginTop: 32, marginInline: "auto" }}>
            Your email app should have opened with your note ready to send to <a href={mailHref} style={{ color: "var(--white)", borderBottom: "1px solid var(--red)" }}>hello@gencydesigns.com</a> — just hit send. If it didn't open, <a href={mailHref} style={{ color: "var(--red)", borderBottom: "1px solid var(--red)" }}>click here to send it</a>. I reply within 12 hours — usually with a question or two before anything else.
          </p>
          <button onClick={() => { setSubmitted(false); setForm({ name: "", email: "", projectType: "Brand Identity", budget: "By quote", timeline: "2–3 weeks", message: "" }); }} className="btn btn-ghost" style={{ marginTop: 44 }}>
            Send another →
          </button>
        </section>
      </main>
    );
  }

  return (
    <main>
      <PageHeader
        index="06"
        label="Contact · Inquiry"
        title={<>Begin with a<br/>conversation.</>}
        sub={<>Tell me about the company, the audience, and the thing you're trying to solve. A paragraph is plenty — we'll find the rest in a call. Or, if you want to go deeper now, <button onClick={() => navigate("brief")} style={{ color: "var(--red)", borderBottom: "1px solid var(--red)", fontFamily: "inherit", fontSize: "inherit" }}>fill out the full brief</button>.</>}
        ghost="CONTACT"
      />

      <section className="pad-lg">
        <div className="wrap">
          <div style={{ display: "grid", gridTemplateColumns: "2fr 1fr", gap: 80, alignItems: "start" }}>
            <Reveal>
              <form onSubmit={onSubmit} noValidate>
                <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 32, marginBottom: 32 }}>
                  <div className={"field" + (errors.name ? " err" : "")}>
                    <label htmlFor="name">/ 01 — Your name</label>
                    <input id="name" type="text" value={form.name} onChange={e => update("name", e.target.value)} placeholder="Elena Marsh" autoComplete="name" />
                    {errors.name && <span className="err-msg">{errors.name}</span>}
                  </div>
                  <div className={"field" + (errors.email ? " err" : "")}>
                    <label htmlFor="email">/ 02 — Email</label>
                    <input id="email" type="email" value={form.email} onChange={e => update("email", e.target.value)} placeholder="elena@northfolk.co" autoComplete="email" />
                    {errors.email && <span className="err-msg">{errors.email}</span>}
                  </div>
                </div>
                <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr 1fr", gap: 32, marginBottom: 32 }}>
                  <div className="field">
                    <label htmlFor="type">/ 03 — Project type</label>
                    <select id="type" value={form.projectType} onChange={e => update("projectType", e.target.value)}>
                      <option>Logo Design</option><option>Brand Identity</option>
                      <option>Illustration</option><option>Art Direction</option><option>Not sure yet</option>
                    </select>
                  </div>
                  <div className="field">
                    <label htmlFor="budget">/ 04 — Budget</label>
                    <select id="budget" value={form.budget} onChange={e => update("budget", e.target.value)}>
                      <option>By quote</option>
                      <option>Modest · lean</option>
                      <option>Mid · standard</option>
                      <option>Generous · ambitious</option>
                      <option>Let's discuss</option>
                    </select>
                  </div>
                  <div className="field">
                    <label htmlFor="timeline">/ 05 — Timeline</label>
                    <select id="timeline" value={form.timeline} onChange={e => update("timeline", e.target.value)}>
                      <option>1 week</option>
                      <option>2–3 weeks</option>
                      <option>3–4 weeks</option>
                      <option>4+ weeks (flexible)</option>
                      <option>Just exploring</option>
                    </select>
                  </div>
                </div>
                <div className={"field" + (errors.message ? " err" : "")} style={{ marginBottom: 40 }}>
                  <label htmlFor="message">/ 06 — The project</label>
                  <textarea id="message" rows="6" value={form.message} onChange={e => update("message", e.target.value)} placeholder="A small coffee roaster — three years old, opening a second café. We want a mark that travels from cup to packaging to neon sign without falling apart." />
                  {errors.message && <span className="err-msg">{errors.message}</span>}
                  <span className="mono gray" style={{ alignSelf: "flex-end" }}>{form.message.length} / a paragraph is plenty</span>
                </div>
                <div style={{ display: "flex", alignItems: "center", justifyContent: "space-between", gap: 24, flexWrap: "wrap" }}>
                  <p className="mono gray" style={{ maxWidth: 380, fontSize: 11, letterSpacing: ".14em" }}>
                    By sending you agree to be contacted at the email above. Notes are kept private.
                  </p>
                  <button type="submit" className="btn btn-red">Send the note →</button>
                </div>
              </form>
            </Reveal>

            <Reveal style={{ position: "sticky", top: 100 }}>
              <div style={{ padding: 30, background: "var(--ink-2)", border: "1px solid var(--line)", borderRadius: 8 }}>
                <div className="mono gray" style={{ marginBottom: 18 }}>(DIRECT)</div>
                <a href="mailto:hello@gencydesigns.com"
                   style={{ display: "inline-block", marginBottom: 10, color: "var(--white)", fontFamily: "var(--sans)", fontSize: 14, fontWeight: 400, letterSpacing: ".01em", borderBottom: "1px solid var(--red)", paddingBottom: 2 }}>
                  hello@gencydesigns.com
                </a>
                <div className="mono gray" style={{ fontSize: 11 }}>REPLIES WITHIN 12 HOURS · 7/7</div>

                <div className="mono gray" style={{ marginTop: 32, marginBottom: 14 }}>(ELSEWHERE)</div>
                <ul style={{ listStyle: "none", display: "flex", flexDirection: "column", gap: 10 }}>
                  <li><a className="head" style={{ fontSize: 14, color: "var(--white)" }} href="https://www.behance.net/gency" target="_blank" rel="noreferrer">BEHANCE ↗</a></li>
                  <li><a className="head" style={{ fontSize: 14, color: "var(--white)" }} href="#">INSTAGRAM ↗</a></li>
                  <li><a className="head" style={{ fontSize: 14, color: "var(--white)" }} href="#">LINKEDIN ↗</a></li>
                </ul>

                <div className="mono gray" style={{ marginTop: 32, marginBottom: 14 }}>(CURRENTLY)</div>
                <div style={{ display: "flex", alignItems: "center", gap: 12, marginBottom: 8 }}>
                  <span className="dot"></span>
                  <span style={{ fontSize: 14, fontWeight: 300 }}>Open for new commissions</span>
                </div>
                <div className="mono gray" style={{ fontSize: 11 }}>STARTS TYPICALLY 4–6 WEEKS OUT</div>
              </div>
            </Reveal>
          </div>
        </div>
      </section>
    </main>
  );
}

// ═════════════════════════════════════════════════════════════════════
// STRATEGY — brief response
// ═════════════════════════════════════════════════════════════════════
function StrategyPage({ navigate }) {
  return (
    <main>
      <PageHeader
        index="07"
        label="Strategy · Brief response"
        title={<>The plan,<br/>laid flat.</>}
        sub="The full website concept — sitemap, content architecture, color, typography, platform recommendation, hero copy, package framing, and the principles that hold the build to standard."
        ghost="PLAN"
      />

      <section className="wrap" style={{ padding: "20px 40px", borderTop: "1px solid var(--line)", borderBottom: "1px solid var(--line)", display: "flex", gap: 32, flexWrap: "wrap" }}>
        {[
          ["01", "Sitemap"], ["02", "Content"], ["03", "Color"], ["04", "Type"],
          ["05", "Platform"], ["06", "Hero copy"], ["07", "Packages"], ["08", "Principles"]
        ].map(([n, t]) => (
          <a key={n} href={`#s-${n}`} className="mono" style={{ color: "var(--gray-2)", transition: "color .25s" }}
            onMouseEnter={e => e.currentTarget.style.color = "var(--red)"}
            onMouseLeave={e => e.currentTarget.style.color = "var(--gray-2)"}>
            <span style={{ color: "var(--red)", marginRight: 8 }}>{n}</span>{t.toUpperCase()}
          </a>
        ))}
      </section>

      <StrategySection id="s-01" n="01" title={<>Sitemap.</>}>
        <div style={{ display: "grid", gridTemplateColumns: "repeat(5, 1fr)", gap: 16 }}>
          {[
            { p: "Home", s: ["Hero · animated ring mark", "Studio overview", "Featured work bleed", "Red statement", "Process · 4 steps", "Disciplines · 3 cards", "CTA outro"] },
            { p: "Work", s: ["Filter (5 cats)", "Asymmetric grid", "Selected projects", "Project detail overlay", "Concept · Gallery", "Red outcome quote", "Prev / Next"] },
            { p: "Studio", s: ["Real portrait + intro", "Three red principles", "Disciplines table", "Recognition list"] },
            { p: "Services", s: ["The Mark · System · Direction", "Pricing note", "FAQ"] },
            { p: "Contact", s: ["Inquiry form (6 fields)", "Direct email", "Elsewhere", "Booking status"] },
          ].map(c => (
            <div key={c.p} style={{ borderTop: "1px solid var(--line)", paddingTop: 18 }}>
              <h3 className="head" style={{ fontSize: 18, marginBottom: 14 }}>{c.p.toUpperCase()}</h3>
              <ul style={{ listStyle: "none", display: "flex", flexDirection: "column", gap: 8 }}>
                {c.s.map((s, i) => (
                  <li key={i} className="body" style={{ fontSize: 13, lineHeight: 1.55, color: "var(--gray-2)", display: "flex", gap: 8 }}>
                    <span className="mono" style={{ color: "var(--red)" }}>—</span>{s}
                  </li>
                ))}
              </ul>
            </div>
          ))}
        </div>
      </StrategySection>

      <StrategySection id="s-02" n="02" title={<>Content.</>}>
        <p className="body">All projects in the index are real — a selection from Gency's archive, including Yvonne Zürcher, Phoenix, Capt'n Sullys, The Plastic Surgery Clinic, Streamline, Spartan G, Montecito Beach Club, Ignited Style, Divanova, The Wanderer, Restaurant Delicatessen, Botanical Couture, Peacock, Aurea, and Atelier Modesta. Each project page is mocked end-to-end (concept, isolation plate, gallery, outcome quote). The studio portrait on the About page is the real photograph; the studio statement, principles, and process notes are written specifically for this brand voice and ready to ship.</p>
      </StrategySection>

      <StrategySection id="s-03" n="03" title={<>Color.</>}>
        <div style={{ display: "grid", gridTemplateColumns: "repeat(4, 1fr)", gap: 0, borderRadius: 8, overflow: "hidden", marginTop: 8 }}>
          {[
            { name: "Djambar Red", hex: "#EC0C1C", role: "Primary · Energy", bg: "var(--red)", fg: "#fff" },
            { name: "Deep Navy", hex: "#091022", role: "Anchor · Depth", bg: "#091022", fg: "#fff" },
            { name: "Carbon", hex: "#0A0A0B", role: "Base · Surface", bg: "#0c0c0d", fg: "#fff" },
            { name: "Off White", hex: "#FAFAFA", role: "Inversion · Print", bg: "#fafafa", fg: "#1a1a1a" },
          ].map(c => (
            <div key={c.name} style={{ background: c.bg, color: c.fg, padding: "42px 30px", minHeight: 280, display: "flex", flexDirection: "column", justifyContent: "flex-end" }}>
              <div className="display" style={{ fontSize: 26, marginBottom: 10 }}>{c.name.toUpperCase()}</div>
              <div className="mono" style={{ fontSize: 12, opacity: 0.85 }}>{c.hex}</div>
              <div className="mono" style={{ fontSize: 10, opacity: 0.62, marginTop: 6 }}>{c.role.toUpperCase()}</div>
            </div>
          ))}
        </div>
        <p className="body" style={{ marginTop: 28 }}>
          <strong style={{ color: "var(--white)" }}>Off-white on Carbon</strong> for the majority of the site. Red is the only accent — full-bleed statement fields or single-element highlight. Never as a button fill outside CTAs.
        </p>
      </StrategySection>

      <StrategySection id="s-04" n="04" title={<>Typography.</>}>
        <div style={{ marginTop: 8, border: "1px solid var(--line)", borderRadius: 8, overflow: "hidden" }}>
          {[
            { spec: "Display · Basic", sample: <span className="display" style={{ fontSize: 64 }}>LINES THAT HOLD</span> },
            { spec: "Heading · Basic (Tight)", sample: <span className="head" style={{ fontSize: 30 }}>WORN ON THE STREET — NOT THE RUNWAY.</span> },
            { spec: "Body · Inter Tight", sample: <span style={{ fontFamily: "var(--sans)", fontSize: 17, color: "var(--gray-2)", lineHeight: 1.7, fontWeight: 300 }}>Built for the people who move with intent. Every garment carries the mark — a quiet reminder of where strength comes from.</span> },
            { spec: "Mono · Space Mono", sample: <span className="mono" style={{ fontSize: 13 }}>/ 03 — TYPOGRAPHY · BRAND · 2026</span> },
            { spec: "Glyphs · Basic", sample: <span className="display" style={{ fontSize: 26, color: "var(--gray)" }}>A B C D E G K M R S 0 1 2 3 4 5 6 7 8 9 / & — •</span> },
          ].map((r, i) => (
            <div key={i} style={{ padding: "46px 50px", borderBottom: i === 4 ? "none" : "1px solid var(--line)", display: "flex", justifyContent: "space-between", alignItems: "baseline", gap: 30, flexWrap: "wrap" }}>
              <span className="mono gray" style={{ flexShrink: 0, width: 200 }}>{r.spec.toUpperCase()}</span>
              <div style={{ flex: 1 }}>{r.sample}</div>
            </div>
          ))}
        </div>
      </StrategySection>

      <StrategySection id="s-05" n="05" title={<>Platform.</>}>
        <div style={{ display: "grid", gridTemplateColumns: "1fr 2fr", gap: 48 }}>
          <div>
            <div className="mono" style={{ color: "var(--red)", marginBottom: 12 }}>(RECOMMENDED)</div>
            <div className="display" style={{ fontSize: 72 }}>FRAMER</div>
            <p className="mono gray" style={{ marginTop: 12 }}>CUSTOM-FEELING · NO DEV REQUIRED</p>
          </div>
          <div style={{ display: "flex", flexDirection: "column", gap: 18 }}>
            <p className="body">Framer wins for four reasons: (i) <strong style={{ color: "var(--white)" }}>design fidelity</strong> — supports the asymmetric editorial build without compromise; (ii) <strong style={{ color: "var(--white)" }}>self-hosted images</strong> via Framer's CMS; (iii) <strong style={{ color: "var(--white)" }}>Hostinger compatibility</strong> — point the custom domain via CNAME, keep Hostinger for email (<span className="mono" style={{ color: "#fff" }}>hello@gencydesigns.com</span>); (iv) <strong style={{ color: "var(--white)" }}>solo maintainability</strong> — edits don't require a developer.</p>
            <div style={{ display: "grid", gridTemplateColumns: "repeat(2, 1fr)", gap: 16, marginTop: 12 }}>
              {[
                ["Webflow", "Capable equivalent. Steeper curve; pricing comparable."],
                ["WordPress", "Most flexible long-term, but minimal themes rarely stay minimal. More maintenance."],
                ["Squarespace", "Fast to ship, breaks at asymmetric layout. Templates show."],
                ["Custom code", "Highest ceiling, highest cost. Only if you iterate frequently."],
              ].map(([n, b]) => (
                <div key={n} style={{ borderTop: "1px solid var(--line)", paddingTop: 14 }}>
                  <div className="head" style={{ fontSize: 18, marginBottom: 6 }}>{n.toUpperCase()}</div>
                  <div className="body" style={{ fontSize: 13, lineHeight: 1.55 }}>{b}</div>
                </div>
              ))}
            </div>
          </div>
        </div>
      </StrategySection>

      <StrategySection id="s-06" n="06" title={<>Hero copy.</>}>
        <div style={{ background: "var(--red)", padding: "56px 48px", borderRadius: 8 }}>
          <div className="mono" style={{ marginBottom: 24, opacity: 0.85 }}>(PRIMARY)</div>
          <h2 className="display" style={{ fontSize: "clamp(48px, 7vw, 120px)", color: "#fff" }}>LINES THAT<br/>HOLD WEIGHT.</h2>
          <p style={{ fontSize: 17, lineHeight: 1.55, maxWidth: 560, marginTop: 24, color: "#fff", fontWeight: 300 }}>
            GencyDesigns is the studio of an independent logo designer, illustrator, and art director — drawing precise marks for clients who care about craft.
          </p>
          <div style={{ marginTop: 40, paddingTop: 24, borderTop: "1px solid rgba(255,255,255,.25)" }}>
            <div className="mono" style={{ marginBottom: 14, opacity: 0.85 }}>(ALTERNATES — FOR TESTING)</div>
            <ul style={{ listStyle: "none", display: "flex", flexDirection: "column", gap: 12 }}>
              <li><span className="mono" style={{ marginRight: 14, opacity: 0.8 }}>A</span><span className="display" style={{ fontSize: 30 }}>DRAWN ONCE. DRAWN WELL.</span></li>
              <li><span className="mono" style={{ marginRight: 14, opacity: 0.8 }}>B</span><span className="display" style={{ fontSize: 30 }}>ONE STROKE. ANY SCALE.</span></li>
              <li><span className="mono" style={{ marginRight: 14, opacity: 0.8 }}>C</span><span className="display" style={{ fontSize: 30 }}>THE SLOW LINES.</span></li>
            </ul>
          </div>
        </div>
      </StrategySection>

      <StrategySection id="s-07" n="07" title={<>Packages.</>}>
        <div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 20 }}>
          {SERVICES.map(s => (
            <div key={s.id} style={{ padding: 28, borderRadius: 8, border: "1px solid var(--line)", background: "var(--ink-2)" }}>
              <div className="mono" style={{ color: "var(--red)", marginBottom: 12 }}>/ {s.n}</div>
              <h3 className="display" style={{ fontSize: 32, marginBottom: 8 }}>{s.name}</h3>
              <p className="body" style={{ fontSize: 14, marginBottom: 18 }}>{s.tagline}</p>
              <p className="body" style={{ fontSize: 13, lineHeight: 1.6, marginBottom: 20 }}>{s.description}</p>
              <div className="mono gray" style={{ marginBottom: 6 }}>(STARTING)</div>
              <div className="head" style={{ fontSize: 22 }}>{s.starting.toUpperCase()}</div>
            </div>
          ))}
        </div>
        <button onClick={() => navigate("services")} className="btn" style={{ marginTop: 40 }}>Full service detail →</button>
      </StrategySection>

      <StrategySection id="s-08" n="08" title={<>Principles.</>}>
        <p className="body" style={{ marginBottom: 32 }}>A short checklist to keep the build to standard.</p>
        <ol style={{ listStyle: "none" }}>
          {[
            ["Asymmetry over symmetry.", "Every page uses an off-center grid. Centered hero is forbidden unless intentionally weighted."],
            ["Basic carries weight.", "Display type does most of the visual work — don't reach for illustration to compensate for a weak headline."],
            ["One red per screen.", "Red is a punctuation mark, not a brand fill. Sparingly: a rule, dot, focus state, full bleed."],
            ["Hairlines, not boxes.", "Borders are 1px at 10% opacity over carbon. Cards are rare; rules are the rule."],
            ["Whitespace is content.", "Generous margins, big leading. Don't fill empty space — let it breathe."],
            ["Motion under 400ms.", "IntersectionObserver fade-up + scroll progress + slow GIF + ring parallax. No carousels."],
            ["Accessibility, by default.", "WCAG AA contrast. 16px minimum body. Visible focus rings. Keyboard parity."],
            ["Fast over fancy.", "Self-hosted WebP, properly sized. No video backgrounds. GIF loaded once, on the hero only."],
          ].map(([t, b], i) => (
            <li key={i} style={{ display: "grid", gridTemplateColumns: "60px 1fr 2fr", gap: 24, padding: "24px 0", borderTop: "1px solid var(--line)", borderBottom: i === 7 ? "1px solid var(--line)" : "none" }}>
              <span className="mono" style={{ color: "var(--red)" }}>/ {String(i + 1).padStart(2, "0")}</span>
              <h3 className="head" style={{ fontSize: 18 }}>{t.toUpperCase()}</h3>
              <p className="body" style={{ fontSize: 14 }}>{b}</p>
            </li>
          ))}
        </ol>
      </StrategySection>

      <section className="pad" style={{ background: "var(--ink-2)" }}>
        <div className="wrap">
          <Reveal>
            <div style={{ display: "grid", gridTemplateColumns: "1fr 2fr", gap: 48 }}>
              <div className="mono" style={{ color: "var(--red)" }}>(END OF BRIEF)</div>
              <div>
                <p className="display" style={{ fontSize: 36, marginBottom: 16 }}>
                  Everything above is on the site — this isn't a deck, it's a working prototype.
                </p>
                <p className="body">
                  Use the Tweaks panel (bottom-right) to swap accent color, toggle the hero ring, or change scheme. Then click through Home → Work → Studio → Services → Contact.
                </p>
              </div>
            </div>
          </Reveal>
        </div>
      </section>
    </main>
  );
}

function StrategySection({ id, n, title, children }) {
  return (
    <section id={id} className="pad" style={{ scrollMarginTop: 100 }}>
      <div className="wrap">
        <Reveal>
          <div style={{ display: "grid", gridTemplateColumns: "1fr 2fr", gap: 48, marginBottom: 40 }}>
            <div className="mono" style={{ color: "var(--red)" }}>/ {n}</div>
            <h2 className="display" style={{ fontSize: "clamp(36px, 5vw, 68px)" }}>{title}</h2>
          </div>
          <div>{children}</div>
        </Reveal>
      </div>
    </section>
  );
}

Object.assign(window, {
  HomePage, PortfolioPage, ProjectDetail, AboutPage, ServicesPage, ContactPage, StrategyPage,
});
