// Editorial launch page — sections.

// ─────── NAV ───────
const TopNav = () => {
  const [scrolled, setScrolled] = React.useState(false);
  React.useEffect(() => {
    const onScroll = () => setScrolled(window.scrollY > 8);
    window.addEventListener("scroll", onScroll);
    return () => window.removeEventListener("scroll", onScroll);
  }, []);
  return (
    <div className={"chrome-nav " + (scrolled ? "scrolled" : "")}>
      <div className="wrap" style={{ display: "flex", alignItems: "center", height: 56, justifyContent: "space-between" }}>
        <a href="#top" style={{ display: "flex", alignItems: "center", gap: 10, textDecoration: "none", color: "#111" }}>
          <img src="./logo.png" alt="AC Media" width={28} height={28} style={{ display: "block" }} />
          <span style={{ fontSize: 15, fontWeight: 500, letterSpacing: "-0.01em" }}>Portal</span>
          <span className="label" style={{ marginLeft: 4 }}>by AC Media</span>
        </a>
        <nav style={{ display: "flex", gap: 28, fontSize: 13 }}>
          {[
            ["Product", "#product"],
            ["How it works", "#how"],
            ["For teams", "#teams"],
            ["Help", "#help"],
          ].map(([t, h]) => (
            <a key={t} href={h} style={{ color: "var(--g500)", textDecoration: "none" }}>{t}</a>
          ))}
        </nav>
        <div style={{ display: "flex", alignItems: "center", gap: 16 }}>
          <a href="#invite" style={{ fontSize: 13, color: "var(--g500)", textDecoration: "none" }}>Sign in</a>
          <a href="#invite" style={{
            background: "#111", color: "#fff",
            padding: "10px 18px",
            fontSize: 11, fontWeight: 600, letterSpacing: "0.1em", textTransform: "uppercase",
            textDecoration: "none",
          }}>Get an invite</a>
        </div>
      </div>
    </div>
  );
};

// ─────── HERO ───────
const Hero = () => (
  <section id="top" className="sec-top" style={{ paddingBottom: 80, position: "relative" }}>
    <div className="wrap">
      <div style={{ display: "grid", gridTemplateColumns: "1fr", gap: 64 }}>
        {/* Headline */}
        <div style={{ maxWidth: 1100 }}>
          <div style={{ display: "flex", alignItems: "center", gap: 12, marginBottom: 40 }}>
            <span style={{ width: 7, height: 7, borderRadius: "50%", background: "#16a34a", boxShadow: "0 0 0 3px rgba(22,163,74,0.18)" }} className="pulse-dot" />
            <span className="label">In private beta · Melbourne, AU</span>
          </div>

          <h1 className="display" style={{ margin: 0, fontSize: "clamp(48px, 8vw, 112px)" }}>
            Book the shoot.
            <br />
            <span style={{ fontStyle: "italic", fontWeight: 500 }}>Skip</span>
            <br />
            the phone tag.
          </h1>

          <div style={{ display: "grid", gridTemplateColumns: "auto 1fr", gap: 48, marginTop: 56, alignItems: "start" }}>
            <div style={{ fontSize: 13, color: "var(--g500)", lineHeight: 1.6, maxWidth: 420 }}>
              <p style={{ margin: 0 }}>
                Portal is the AC Media client platform for real estate agents.
                Book photography or film in <span style={{ color: "#111" }}>three quick
                steps</span>, hand off the brief, and watch every shoot move from confirmation
                to delivered files. All without a single phone call.
              </p>
              <div style={{ display: "flex", gap: 12, marginTop: 24 }}>
                <a href="#invite" style={{
                  background: "#111", color: "#fff", textDecoration: "none",
                  padding: "14px 22px",
                  fontSize: 11, fontWeight: 600, letterSpacing: "0.1em", textTransform: "uppercase",
                }}>Get an invite →</a>
                <a href="#product" style={{
                  border: "0.5px solid rgba(0,0,0,0.15)", color: "#111", textDecoration: "none",
                  padding: "14px 22px",
                  fontSize: 11, fontWeight: 600, letterSpacing: "0.1em", textTransform: "uppercase",
                }}>See it in use</a>
              </div>
            </div>
            <div style={{ justifySelf: "end", alignSelf: "end", textAlign: "right" }}>
              <div className="label">Figure 01</div>
              <div style={{ fontSize: 12, color: "var(--g400)", marginTop: 4 }}>
                Client dashboard &nbsp;·&nbsp; Booking wizard, step 1
              </div>
            </div>
          </div>
        </div>

        {/* Split hero shot */}
        <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 16, marginTop: 16 }}>
          <BrowserChrome>
            <DashboardMock />
          </BrowserChrome>
          <BrowserChrome>
            <WizardMock />
          </BrowserChrome>
        </div>
      </div>
    </div>
  </section>
);

// ─────── STATUS TICKER (between hero and 3-up) ───────
const Ticker = () => {
  // Status colour follows the kind of event (mirrors Portal's stage palette)
  const items = [
    { t: "Toorak · bundle confirmed Fri 24 Apr",      c: "#16a34a" }, // green — confirmed
    { t: "South Yarra · photos delivered, 38 images", c: "#16a34a" }, // green — delivered
    { t: "Armadale · brief completed by agent",       c: "#2563eb" }, // blue — info
    { t: "Brighton · alternative slot accepted",      c: "#16a34a" }, // green — accepted
    { t: "Hawthorn · film editing 82%, ETA Thu",      c: "#2563eb" }, // blue — editing
    { t: "Carlton North · drone footage uploaded",    c: "#f59e0b" }, // amber — in queue
    { t: "Albert Park · invoice issued",              c: "#10b981" }, // emerald — invoicing
  ];
  const row = [...items, ...items];
  return (
    <section style={{ padding: "32px 0", borderTop: "0.5px solid var(--hair)", borderBottom: "0.5px solid var(--hair)", overflow: "hidden" }}>
      <div style={{ display: "flex", gap: 64, whiteSpace: "nowrap", width: "max-content" }} className="marquee-track">
        {row.map((it, i) => (
          <div key={i} className="mono" style={{ fontSize: 11, color: "var(--g500)", display: "inline-flex", alignItems: "center", gap: 10 }}>
            <span style={{ width: 6, height: 6, borderRadius: "50%", background: it.c }} />
            {it.t}
          </div>
        ))}
      </div>
    </section>
  );
};

// ─────── THREE-UP: BOOK → MANAGE → TRACK ───────
const ThreeUp = () => {
  const items = [
    {
      n: 1, lead: "Book in three steps",
      body: "Service, details, review. Pick photography, film, or a bundle and add extras like a floor plan or a social reel. Your name, email, phone and agency pre-fill from your profile, every time.",
      tags: ["Three quick steps", "Australian addresses", "Bundle = 10% off"],
    },
    {
      n: 2, lead: "Every booking, one dashboard",
      body: "Every shoot you've requested, in one list. Clear status labels (Awaiting review, Confirmed, Completed) with the full brief, the package, and one-tap reschedule or cancel.",
      tags: ["Confirmed / Awaiting / Completed", "Reschedule any time", "No spreadsheet"],
    },
    {
      n: 3, lead: "Live production status",
      body: "No more \"is it ready yet?\" emails. Tap Check status on any confirmed booking and see exactly where things sit, with an ETA. Photo and film tracked separately when you book a bundle.",
      tags: ["Photo + film, side by side", "Live percentage", "ETA on every stage"],
    },
  ];
  return (
    <section id="product" className="sec">
      <div className="wrap">
        <div style={{ display: "grid", gridTemplateColumns: "220px 1fr", gap: 64, marginBottom: 72 }}>
          <Kicker n={2}>What you get</Kicker>
          <h2 className="display" style={{ margin: 0, fontSize: "clamp(36px, 4.5vw, 64px)", maxWidth: 900 }}>
            Book. Manage. Track. <span style={{ color: "var(--g400)" }}>The whole shoot, in one place.</span>
          </h2>
        </div>
        <div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 32 }}>
          {items.map((it) => (
            <div key={it.n} style={{ display: "flex", flexDirection: "column", gap: 16 }}>
              <div style={{ display: "flex", alignItems: "baseline", gap: 10 }}>
                <span className="mono" style={{ fontSize: 11, color: "var(--g400)" }}>0{it.n}</span>
                <span style={{ height: 0.5, width: 24, background: "var(--g300)" }} />
              </div>
              <h3 style={{ margin: 0, fontSize: 22, fontWeight: 600, letterSpacing: "-0.02em", lineHeight: 1.2 }}>{it.lead}</h3>
              <p style={{ margin: 0, fontSize: 14, color: "var(--g500)", lineHeight: 1.6 }}>{it.body}</p>
              <div style={{ display: "flex", gap: 6, flexWrap: "wrap", marginTop: "auto", paddingTop: 12 }}>
                {it.tags.map((t) => <Tag key={t}>{t}</Tag>)}
              </div>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
};

// ─────── DEEP DIVE — reusable left/right row ───────
const DeepDive = ({ n, kicker, title, body, highlight, screenshot, right = false }) => (
  <section className="sec" id={"feature-" + n}>
    <div className="wrap">
      <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 64, alignItems: "center" }}>
        <div style={{ order: right ? 2 : 1 }}>
          <Kicker n={n}>{kicker}</Kicker>
          <h3 className="display" style={{ margin: "24px 0 0", fontSize: "clamp(32px, 3.6vw, 52px)" }}>{title}</h3>
          <p style={{ margin: "20px 0 0", fontSize: 15, color: "var(--g500)", lineHeight: 1.65, maxWidth: 460 }}>{body}</p>
          <div style={{ marginTop: 32, paddingTop: 20, borderTop: "0.5px solid var(--hair)" }}>
            <Label>Highlight</Label>
            <p style={{ margin: "10px 0 0", fontSize: 13, color: "var(--g700)", lineHeight: 1.6, maxWidth: 460 }}>{highlight}</p>
          </div>
        </div>
        <div style={{ order: right ? 1 : 2 }}>
          <BrowserChrome>
            {screenshot}
          </BrowserChrome>
          <div className="fig-cap" style={{ marginTop: 10, textAlign: right ? "left" : "right" }}>
            Fig. {String(n).padStart(2, "0")} · {kicker}
          </div>
        </div>
      </div>
    </div>
  </section>
);

// ─────── FEATURE — BRIEF, SCHEDULING, CHAT ───────
const FeatureBrief = () => (
  <DeepDive
    n={4}
    kicker="The shoot brief"
    title={<>One form. Everything <span style={{ color: "var(--g400)" }}>the shooter and editor need.</span></>}
    body="Add the listing agents, drop in reference images or links, pick the music vibe for the film, and call out the hero features. Update any time before the shoot. We'll send a friendly reminder if anything's still missing."
    highlight="Listing agents, reference images, notes and links, plus film-specific questions like music preference, piece-to-camera and key selling points."
    screenshot={<BriefMock />}
  />
);

const FeatureScheduling = () => (
  <DeepDive
    n={5}
    kicker="Alternative slots"
    title={<>If your time isn't free, <span style={{ color: "var(--g400)" }}>we don't make you start over.</span></>}
    body="When we can't fit your preferred time, we email you a few proposed slots. Pick one in a tap, or suggest your own. For bundles you can choose different times for photo and film."
    highlight="A few proposed times. Pick one, propose your own, or hold off and reply to the email. Whatever's easiest."
    right
    screenshot={<ConfirmMock />}
  />
);

const FeatureChat = () => (
  <DeepDive
    n={6}
    kicker="Live production status"
    title={<>Tap <em style={{ fontStyle: "normal", color: "var(--g400)" }}>Check status</em> on any booking.</>}
    body={<>Every confirmed booking has a Check status button. One tap shows you exactly where the shoot sits, the current stage for photo and film, and an ETA on each. No more chasing for an update.<br/><br/><span style={{ display: "inline-block", fontSize: 10, fontWeight: 700, letterSpacing: "0.1em", textTransform: "uppercase", color: "#b45309", background: "#fef3c7", padding: "3px 9px", borderRadius: 4, marginRight: 8 }}>Coming next</span><span style={{ fontSize: 13, color: "var(--g500)" }}>An in-app assistant that can answer questions about your booking, pricing and packages.</span></>}
    highlight={<><strong style={{ color: "#0f172a", fontWeight: 600 }}>Five stages, tracked separately for photo and film:</strong><br/>To Shoot → In Queue → Editing → Delivered → Ready for Invoicing.</>}
    screenshot={<LiveStatusMock />}
  />
);

// ─────── ONBOARDING ───────
const Onboarding = () => (
  <section id="teams" className="sec">
    <div className="wrap">
      <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 64, alignItems: "start" }}>
        <div style={{ position: "sticky", top: 100 }}>
          <Kicker n={7}>Onboarding</Kicker>
          <h3 className="display" style={{ margin: "24px 0 0", fontSize: "clamp(32px, 3.6vw, 52px)" }}>
            Built for the whole agency,
            <br />
            <span style={{ color: "var(--g400)" }}>not just one agent.</span>
          </h3>
          <p style={{ margin: "20px 0 0", fontSize: 15, color: "var(--g500)", lineHeight: 1.65, maxWidth: 440 }}>
            Your agency gets a code. Anyone on the team can use it to sign up themselves and
            land in the right office. No central admin needed, no email chains to set up new agents.
          </p>
          <div style={{ marginTop: 32, paddingTop: 20, borderTop: "0.5px solid var(--hair)" }}>
            <Label>Highlight</Label>
            <p style={{ margin: "10px 0 0", fontSize: 13, color: "var(--g700)", lineHeight: 1.6, maxWidth: 440 }}>
              Self-serve sign-up for the whole team. Or, if you'd rather, we can send an invite link straight to each agent.
            </p>
          </div>
        </div>
        <BrowserChrome>
          <RegisterMock />
        </BrowserChrome>
      </div>
    </div>
  </section>
);

// ─────── HELP ───────
const HelpSection = () => (
  <section id="help" className="sec">
    <div className="wrap">
      <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 64, alignItems: "center" }}>
        <BrowserChrome>
          <HelpMock />
        </BrowserChrome>
        <div>
          <Kicker n={8}>Help, when you need it</Kicker>
          <h3 className="display" style={{ margin: "24px 0 0", fontSize: "clamp(32px, 3.6vw, 52px)" }}>
            Guides for every part of Portal. <span style={{ color: "var(--g400)" }}>And a real human at the end.</span>
          </h3>
          <p style={{ margin: "20px 0 0", fontSize: 15, color: "var(--g500)", lineHeight: 1.65, maxWidth: 460 }}>
            Step-by-step guides for booking, the brief, rescheduling and reading the production tracker.
            If a guide doesn't answer it, the AC Media studio team is one email away.
          </p>
        </div>
      </div>
    </div>
  </section>
);

// ─────── POLISH STRIP ───────
const Polish = () => {
  const items = [
    {
      kicker: "Built for your phone",
      body: "Same Portal, every device. Book on the go between inspections, then check in from your desk later. Save it to your home screen for one-tap access.",
      render: () => (
        <div style={{
          width: 180, height: 300, borderRadius: 24,
          background: "#fff", border: "0.5px solid rgba(0,0,0,0.1)",
          boxShadow: "0 20px 40px -20px rgba(0,0,0,0.1)",
          padding: 18, display: "flex", flexDirection: "column", gap: 10,
        }}>
          <div style={{ height: 8, borderRadius: 4, background: "var(--g100)" }} />
          {[70, 55, 85].map((h, i) => (
            <div key={i} style={{ padding: 10, border: "0.5px solid var(--hair)", borderRadius: 4, display: "flex", flexDirection: "column", gap: 6 }}>
              <div style={{ height: 6, width: h + "%", borderRadius: 3, background: i === 0 ? "#111" : "var(--g200)" }} />
              <div style={{ height: 4, width: "60%", borderRadius: 2, background: "var(--g100)" }} />
            </div>
          ))}
          <div style={{ flex: 1 }} />
          <div style={{ display: "flex", justifyContent: "space-around", paddingTop: 8, borderTop: "0.5px solid var(--hair)" }}>
            {["○", "◉", "○", "○"].map((d, i) => (
              <span key={i} style={{ fontSize: 12, color: i === 1 ? "#111" : "var(--g300)" }}>{d}</span>
            ))}
          </div>
        </div>
      ),
    },
    {
      kicker: "Less to type",
      body: "Your name, email, phone and agency pre-fill into every booking. The form you fill the least is the one you type the least.",
      render: () => (
        <div style={{ maxWidth: 280, display: "flex", flexDirection: "column", gap: 14 }}>
          <UnderlineInput label="Agent name" value="Amelia Thornton" />
          <UnderlineInput label="Work email" value="amelia@atlasrealty.com.au" />
          <UnderlineInput label="Agency" value="Atlas Realty · Toorak" />
        </div>
      ),
    },
    {
      kicker: "Catches mistakes early",
      body: "Forms tell you what's off as you go, never after you submit. Invite codes verify on the spot, weekend dates politely decline.",
      render: () => (
        <div style={{ maxWidth: 280, display: "flex", flexDirection: "column", gap: 10 }}>
          <UnderlineInput label="Invite code" value="ATLAS-TK-2026" right={<span style={{ fontSize: 10, color: "#059669", fontWeight: 600, letterSpacing: "0.06em", textTransform: "uppercase" }}>✓ Valid</span>} />
          <UnderlineInput label="Preferred date" value="Sat 26 Apr" right={<span style={{ fontSize: 10, color: "#b91c1c", fontWeight: 600, letterSpacing: "0.06em", textTransform: "uppercase" }}>Weekdays only</span>} />
        </div>
      ),
    },
    {
      kicker: "Made in Melbourne",
      body: "AU-only address lookup, weekday-only shoot dates, prices in AUD. Built in Melbourne for the agents we work with every day.",
      render: () => (
        <div style={{ maxWidth: 280, display: "flex", flexDirection: "column", gap: 10 }}>
          <UnderlineInput label="Property address" value="14 Grange Rd, Toorak VIC 3142" />
          <div style={{ display: "flex", gap: 6, flexWrap: "wrap" }}>
            <Tag>AU-only</Tag>
            <Tag>AUD</Tag>
            <Tag>Mon–Fri</Tag>
          </div>
        </div>
      ),
    },
  ];
  return (
    <section className="sec">
      <div className="wrap">
        <div style={{ display: "grid", gridTemplateColumns: "220px 1fr", gap: 64, marginBottom: 72 }}>
          <Kicker n={9}>Polish strip</Kicker>
          <h2 className="display" style={{ margin: 0, fontSize: "clamp(36px, 4.5vw, 64px)", maxWidth: 900 }}>
            Designed for <span style={{ color: "var(--g400)" }}>the way you work.</span>
          </h2>
        </div>
        <div style={{ display: "grid", gridTemplateColumns: "repeat(2, 1fr)", gap: 0, borderTop: "0.5px solid var(--hair)" }}>
          {items.map((it, i) => (
            <div key={it.kicker} style={{
              padding: "40px 32px",
              borderBottom: "0.5px solid var(--hair)",
              borderRight: i % 2 === 0 ? "0.5px solid var(--hair)" : "none",
              display: "grid", gridTemplateColumns: "1fr 1fr", gap: 32, alignItems: "center",
            }}>
              <div>
                <Label>{it.kicker}</Label>
                <p style={{ margin: "12px 0 0", fontSize: 14, color: "var(--g600)", lineHeight: 1.6 }}>{it.body}</p>
              </div>
              <div style={{ display: "flex", justifyContent: "center" }}>{it.render()}</div>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
};

// ─────── FAQ ───────
const FAQ = () => {
  const items = [
    { q: "Who is Portal for?",
      a: "Real estate agents and their teams who book AC Media for property photography and video. Portal is the client side of our studio: the booking, the brief, the live production tracker, the delivery. It's the AC Media workflow, opened up to the agents we work with." },
    { q: "What happens if my preferred shoot time isn't available?",
      a: "We email a few proposed alternative slots. Accept one in a tap, or propose your own date and time. For bundles you can pick different times for photo and film." },
    { q: "Can I reschedule or cancel after booking?",
      a: "Yes, directly from the booking on your dashboard. If the new time isn't free we'll come back with alternatives." },
    { q: "How is production tracked?",
      a: "Every confirmed booking has a Check status button. Behind it sits a five-stage pipeline (To Shoot, In Queue, Editing, Delivered, Ready for Invoicing) tracked separately for photo and film, with a live percentage and an ETA on each." },
    { q: "How do I get my whole agency onto Portal?",
      a: "Once your agency has a code, anyone on the team can sign up themselves and land in the right office. If you'd rather, we can also send a personalised invite link to each agent." },
    { q: "Is there an app?",
      a: "Portal works perfectly on your phone, with the same features as on desktop. Save it to your home screen for one-tap access between inspections." },
  ];
  const [open, setOpen] = React.useState(0);
  return (
    <section id="faq" className="sec">
      <div className="wrap">
        <div style={{ display: "grid", gridTemplateColumns: "1fr 2fr", gap: 64, alignItems: "start" }}>
          <div style={{ position: "sticky", top: 100 }}>
            <Kicker n={10}>Questions</Kicker>
            <h2 className="display" style={{ margin: "24px 0 0", fontSize: "clamp(32px, 3.6vw, 52px)" }}>
              Short answers.
            </h2>
            <p style={{ margin: "16px 0 0", fontSize: 13, color: "var(--g500)" }}>
              Still have questions? Drop us an email at <span className="mono">admin@acmediaau.com</span>.
            </p>
          </div>
          <div style={{ borderTop: "0.5px solid var(--hair)" }}>
            {items.map((it, i) => (
              <div key={i} style={{ borderBottom: "0.5px solid var(--hair)" }}>
                <button
                  onClick={() => setOpen(open === i ? -1 : i)}
                  style={{
                    width: "100%", padding: "22px 0",
                    background: "transparent", border: "none", cursor: "pointer",
                    display: "flex", justifyContent: "space-between", alignItems: "center", gap: 24,
                    textAlign: "left", color: "#111",
                  }}
                >
                  <span style={{ fontSize: 18, fontWeight: 500, letterSpacing: "-0.015em" }}>{it.q}</span>
                  <span style={{ fontSize: 22, color: "var(--g400)", transition: "transform .2s", transform: open === i ? "rotate(45deg)" : "none" }}>+</span>
                </button>
                {open === i && (
                  <p style={{ margin: "0 0 22px", fontSize: 14, color: "var(--g600)", lineHeight: 1.7, maxWidth: 640 }}>
                    {it.a}
                  </p>
                )}
              </div>
            ))}
          </div>
        </div>
      </div>
    </section>
  );
};

// ─────── INVITE CTA ───────
const InviteCTA = () => {
  const [email, setEmail] = React.useState("");
  const [submitted, setSubmitted] = React.useState(false);
  return (
    <section id="invite" className="sec" style={{ paddingTop: 140, paddingBottom: 140 }}>
      <div className="wrap">
        <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 80, alignItems: "end" }}>
          <div>
            <Kicker n={11}>Get an invite</Kicker>
            <h2 className="display" style={{ margin: "24px 0 0", fontSize: "clamp(48px, 6vw, 88px)" }}>
              Get your agency
              <br />on Portal.
            </h2>
            <p style={{ margin: "24px 0 0", fontSize: 15, color: "var(--g500)", lineHeight: 1.65, maxWidth: 440 }}>
              We're onboarding Melbourne agencies one office at a time. Drop your work email
              below and we'll come back with a walk-through, a quote, and an invite code
              your team can self-serve from.
            </p>
          </div>
          <div>
            {submitted ? (
              <div style={{ padding: 32, border: "0.5px solid var(--hair)" }}>
                <div className="label" style={{ marginBottom: 8 }}>Thanks</div>
                <p style={{ margin: 0, fontSize: 18, letterSpacing: "-0.015em" }}>
                  We'll be in touch from <span className="mono">admin@acmediaau.com</span> within a business day.
                </p>
              </div>
            ) : (
              <form
                onSubmit={(e) => { e.preventDefault(); if (email) setSubmitted(true); }}
                style={{ display: "flex", flexDirection: "column", gap: 18 }}
              >
                <div>
                  <div className="label" style={{ marginBottom: 10 }}>Work email</div>
                  <input
                    type="email"
                    placeholder="you@agency.com.au"
                    value={email}
                    onChange={(e) => setEmail(e.target.value)}
                    required
                    style={{
                      width: "100%",
                      border: "none",
                      borderBottom: "0.5px solid rgba(0,0,0,0.2)",
                      padding: "10px 0",
                      fontSize: 22,
                      letterSpacing: "-0.015em",
                      fontFamily: "inherit",
                      background: "transparent",
                      outline: "none",
                    }}
                  />
                </div>
                <div>
                  <div className="label" style={{ marginBottom: 10 }}>Agency</div>
                  <input
                    type="text"
                    placeholder="Atlas Realty, Toorak"
                    style={{
                      width: "100%",
                      border: "none",
                      borderBottom: "0.5px solid rgba(0,0,0,0.2)",
                      padding: "10px 0",
                      fontSize: 18,
                      fontFamily: "inherit",
                      background: "transparent",
                      outline: "none",
                    }}
                  />
                </div>
                <button
                  type="submit"
                  style={{
                    marginTop: 20, alignSelf: "flex-start",
                    background: "#111", color: "#fff", border: "none",
                    padding: "18px 32px",
                    fontSize: 11, fontWeight: 600, letterSpacing: "0.12em", textTransform: "uppercase",
                    cursor: "pointer",
                  }}
                >
                  Request invite →
                </button>
                <p style={{ margin: "8px 0 0", fontSize: 11, color: "var(--g400)" }}>
                  We'll only ever use this to reach out about Portal. No newsletter.
                </p>
              </form>
            )}
          </div>
        </div>
      </div>
    </section>
  );
};

// ─────── FOOTER ───────
const Footer = () => (
  <footer style={{ padding: "48px 0 64px", borderTop: "0.5px solid var(--hair)" }}>
    <div className="wrap" style={{ display: "grid", gridTemplateColumns: "2fr 1fr 1fr 1fr", gap: 48, alignItems: "start" }}>
      <div>
        <div style={{ display: "flex", alignItems: "center", gap: 10, marginBottom: 12 }}>
          <img src="./logo.png" alt="AC Media" width={28} height={28} style={{ display: "block" }} />
          <div>
            <div style={{ fontSize: 15, fontWeight: 500 }}>Portal</div>
            <div className="label">by AC Media</div>
          </div>
        </div>
        <p style={{ margin: 0, fontSize: 12, color: "var(--g400)", maxWidth: 340, lineHeight: 1.6 }}>
          AC Media is a Melbourne-based real estate production studio. Portal is our
          client platform, currently in private beta.
        </p>
      </div>
      <div>
        <div className="label" style={{ marginBottom: 12 }}>Product</div>
        {["Booking", "Dashboard", "Brief", "Help centre"].map((t) => (
          <div key={t} style={{ fontSize: 13, color: "var(--g500)", margin: "6px 0" }}>{t}</div>
        ))}
      </div>
      <div>
        <div className="label" style={{ marginBottom: 12 }}>Company</div>
        {["About AC Media", "Work", "Contact", "Privacy"].map((t) => (
          <div key={t} style={{ fontSize: 13, color: "var(--g500)", margin: "6px 0" }}>{t}</div>
        ))}
      </div>
      <div>
        <div className="label" style={{ marginBottom: 12 }}>Melbourne</div>
        <div style={{ fontSize: 13, color: "var(--g500)", lineHeight: 1.6 }}>
          admin@acmediaau.com<br />Level 1, 62 Smith Street<br />Collingwood VIC 3066
        </div>
      </div>
    </div>
    <div className="wrap" style={{ marginTop: 56, paddingTop: 24, borderTop: "0.5px solid var(--hair)", display: "flex", justifyContent: "space-between", alignItems: "center", fontSize: 11, color: "var(--g400)" }}>
      <span>© 2026 AC Media Pty Ltd. All rights reserved.</span>
      <span style={{ display: "inline-flex", alignItems: "center", gap: 8 }}>
        <span style={{ width: 6, height: 6, borderRadius: "50%", background: "#16a34a" }} className="pulse-dot" />
        <span className="mono" style={{ color: "#15803d" }}>v0.9 · private beta</span>
      </span>
    </div>
  </footer>
);

Object.assign(window, { TopNav, Hero, Ticker, ThreeUp, FeatureBrief, FeatureScheduling, FeatureChat, Onboarding, HelpSection, Polish, FAQ, InviteCTA, Footer });
