/*
 * Design reminder: Practical Navy + Mint Editorial. These supporting pages keep the same
 * restrained navy header, mint action color, editorial typography, generous whitespace,
 * and conversion-first path back to the cash-offer form as the home page.
 */

import { useEffect, useState, type ReactNode } from "react";
import { ArrowRight, Check, ChevronRight, Clock3, House, Mail, MapPin, Menu, Phone, Search, ShieldCheck, X } from "lucide-react";
import { locationData } from "@/data/locationData";
import { getMockMarketActivity } from "@/data/mockMarketActivity";
import { Skeleton } from "@/components/ui/skeleton";
import SEOHead from "@/components/SEOHead";
import SellFastOfferForm from "@/components/SellFastOfferForm";
import { contentHeroImages, SITE_HERO_IMAGES } from "@/lib/pageHeroVisuals";

const BRAND_MARK = "/assets/original-home-buyers-logo.png";

const primaryLinks = [
  ["Sell Your House Fast", "/sell-your-house-fast.html"],
  ["How It Works", "/how-it-works.html"],
  ["What We Buy", "/situations.html"],
  ["Areas We Serve", "/locations.html"],
  ["Seller Education", "/blog.html"],
  ["About Us", "/about.html"],
  ["Contact", "/contact.html"],
] as const;

function PageHeader() {
  const [mobileMenuOpen, setMobileMenuOpen] = useState(false);

  return (
    <>
      <div className="utility-bar"><div className="shell utility-bar__inner"><a href="tel:+12404105636"><Phone size={13} /> Call us at <strong>(240) 410-5636</strong> for a free, no-obligation property review.</a></div></div>
      <header className="site-header site-header--content"><div className="shell header-inner"><a className="brand" href="/" aria-label="Original Home Buyers home"><img src={BRAND_MARK} alt="" className="brand__mark" /><span className="brand__words"><strong>Original</strong><span>Home Buyers</span><small>FAMILY-OWNED <i>|</i> NATIONWIDE</small></span></a><nav className={`main-nav ${mobileMenuOpen ? "main-nav--open" : ""}`} aria-label="Primary navigation">{primaryLinks.map(([label, href]) => <a href={href} key={href} onClick={() => setMobileMenuOpen(false)}>{label}</a>)}</nav><a className="button button--mint header-cta" href="/#offer-form">Get My Cash Offer</a><button className="menu-toggle" aria-label="Toggle navigation" aria-expanded={mobileMenuOpen} onClick={() => setMobileMenuOpen((value) => !value)}>{mobileMenuOpen ? <X size={22} /> : <Menu size={22} />}</button></div></header>
    </>
  );
}

function FooterDisclosures() {
  return <div className="shell footer-disclosures"><p>Original Home Buyers reviews homes for potential direct, as-is purchase opportunities. Any potential offer is property-specific and subject to review and written agreement; terms and amounts may vary.</p><p>Information on this website is for general informational purposes only and is not legal, financial, tax, or real estate advice. Consult an appropriately licensed professional for guidance specific to your situation.</p><p>Original Home Buyers is committed to the letter and spirit of the federal Fair Housing Act. We do not discriminate on the basis of race, color, religion, sex, national origin, disability, or familial status.</p></div>;
}

function FooterSocial() {
  return <div className="footer-social" aria-label="Social media"><a href="https://www.facebook.com/originalhomebuyers" target="_blank" rel="noreferrer" className="footer-social__link" aria-label="Follow Original Home Buyers on Facebook"><span aria-hidden="true">f</span></a><span className="footer-social__link footer-social__link--placeholder" role="img" aria-label="Instagram profile coming soon" title="Instagram profile coming soon"><span aria-hidden="true">◎</span></span><span className="footer-social__link footer-social__link--placeholder" role="img" aria-label="X profile coming soon" title="X profile coming soon"><span aria-hidden="true">𝕏</span></span><span className="footer-social__link footer-social__link--placeholder" role="img" aria-label="TikTok profile coming soon" title="TikTok profile coming soon"><span aria-hidden="true">♪</span></span></div>;
}

function PageFooter() {
  return <footer className="site-footer"><div className="shell footer-grid"><a className="brand brand--footer" href="/"><img src={BRAND_MARK} alt="" className="brand__mark" /><span className="brand__words"><strong>Original</strong><span>Home Buyers</span><small>FAMILY-OWNED <i>|</i> NATIONWIDE</small></span></a><div><strong>Explore</strong><a href="/sell-your-house-fast.html">Sell Your House Fast</a><a href="/how-it-works.html">How It Works</a><a href="/situations.html">What We Buy</a><a href="/locations.html">Areas We Serve</a><a href="/compare-selling-options.html">Compare Options</a></div><div><strong>Seller Education</strong><a href="/blog.html">Seller Education Blog</a><a href="/cash-sale-benefits.html">Cash Sale Benefits Guide</a><a href="/blog.html#selling-without-agent">Selling Without an Agent</a><a href="/seller-insights.html">Seller Insights</a></div><div><strong>Property Topics</strong><a href="/sell-as-is.html">Sell As-Is</a><a href="/foreclosure-help.html">Foreclosure Help</a><a href="/sell-inherited-property.html">Inherited Property</a><a href="/sell-during-divorce.html">Divorce & Home Sales</a></div><div><strong>Contact</strong><a href="tel:+12404105636">(240) 410-5636</a><a href="mailto:Info@Originalhomebuyers.com">Info@Originalhomebuyers.com</a><a href="/about.html">About Us</a><a href="/contact.html">Contact Us</a><a href="/privacy.html">Privacy Policy</a><a href="/terms.html">Terms of Use</a><FooterSocial /></div></div><FooterDisclosures /><div className="shell footer-bottom"><span>© 2026 Original Home Buyers. All rights reserved.</span><span>Family-owned. Nationwide.</span></div></footer>;
}

function PageHero({ eyebrow, title, intro, image, aside }: { eyebrow: string; title: string; intro: string; image?: string; aside?: ReactNode }) {
  return <section className={`content-hero ${aside ? "content-hero--with-form" : ""}`} style={image ? { backgroundImage: `linear-gradient(90deg, rgba(2,34,64,.96), rgba(2,39,74,.82)), url(${image})` } : undefined}><div className="shell content-hero__inner"><div className="content-hero__copy"><span className="eyebrow eyebrow--line">{eyebrow}</span><h1>{title}</h1><p>{intro}</p></div>{aside && <aside className="content-hero__aside" id="cash-offer-form" aria-label="Request a cash offer">{aside}</aside>}</div></section>;
}

function ContentPage({ eyebrow, title, intro, children, image, heroAside }: { eyebrow: string; title: string; intro: string; children: ReactNode; image?: string; heroAside?: ReactNode }) {
  const pageImage = image ?? contentHeroImages[title] ?? SITE_HERO_IMAGES.situations;
  return <div className="content-page"><PageHeader /><main><PageHero eyebrow={eyebrow} title={title} intro={intro} image={pageImage} aside={heroAside} />{children}<EducationPageFaq title={title} /></main><PageFooter /></div>;
}

function ContentSection({ eyebrow, title, children, tone = "light", id }: { eyebrow?: string; title: string; children: ReactNode; tone?: "light" | "mist"; id?: string }) {
  return <section id={id} className={`content-section content-section--${tone}`}><div className="shell content-section__inner">{eyebrow && <span className="eyebrow eyebrow--line eyebrow--dark">{eyebrow}</span>}<h2>{title}</h2><div className="content-copy">{children}</div></div></section>;
}

type EducationFaqItem = { question: string; answer: string };

const educationPageFaqs: Record<string, EducationFaqItem[]> = {
  "Foreclosure Help and Home-Sale Options": [
    { question: "Should I wait after receiving a foreclosure notice?", answer: "No. Deadlines, notices, and available options vary by loan and state. Contact your servicer and a qualified housing, legal, or financial professional promptly to understand the situation." },
    { question: "Can selling be an option before an auction?", answer: "A sale may be one possible path, but feasibility depends on timing, title, loan balance, property value, buyer review, and transaction requirements." },
  ],
  "Sell an Inherited Property": [
    { question: "Can an inherited property be sold before probate is complete?", answer: "Authority to sell estate property depends on the estate, title, will, court process, and state law. Consult the estate's attorney or another appropriate local professional." },
    { question: "What should heirs discuss before exploring a sale?", answer: "Discuss estate authority, co-heir decisions, occupancy, property contents, title, insurance, tax questions, and the documents a local closing professional may need." },
  ],
  "Selling a Home During Divorce": [
    { question: "Who can decide to sell a home during divorce?", answer: "Authority can depend on title, agreements, court orders, and state law. A qualified family-law attorney or another appropriate adviser can explain the requirements that apply." },
    { question: "Can a direct sale help during a separation?", answer: "A direct sale may be one option where the required decision-makers agree to explore it. Any purchase remains subject to ownership, review, written terms, required approvals, and closing requirements." },
  ],
};

function EducationPageFaq({ title }: { title: string }) {
  const items = educationPageFaqs[title];
  if (!items) return null;

  return <ContentSection eyebrow="COMMON QUESTIONS" title="Questions to discuss before deciding." tone="mist"><div className="sell-fast-faq-list">{items.map((item) => <article key={item.question}><h3>{item.question}</h3><p>{item.answer}</p></article>)}</div><p className="legal-note">General information only. Requirements, rights, and timelines vary by state, property, and individual circumstances.</p></ContentSection>;
}

export function SellFastPage() {
  return (
    <>
      <SEOHead title="Sell Your House Fast for Cash Nationwide | Original Home Buyers" description="Explore a direct, as-is home-sale option with Original Home Buyers. Request a no-obligation cash offer and discuss your property, timing, and local closing options." canonicalUrl="https://homebuyers-nationwide.com/sell-your-house-fast.html" keywords={["sell house fast", "sell house fast for cash", "cash home buyer nationwide", "sell house as-is", "cash offer for house", "Original Home Buyers"]} schema={{ "@context": "https://schema.org", "@graph": [{ "@type": "WebPage", "name": "Sell Your House Fast for Cash Nationwide | Original Home Buyers", "url": "https://homebuyers-nationwide.com/sell-your-house-fast.html", "description": "Nationwide seller education and a no-obligation cash-offer request form from Original Home Buyers." }, { "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "Can I request a cash offer if my house needs repairs?", "acceptedAnswer": { "@type": "Answer", "text": "You can request a review for a property in its current condition. The property condition is considered during the review, and any proposed terms are subject to written agreement." } }, { "@type": "Question", "name": "How does Original Home Buyers review a cash offer?", "acceptedAnswer": { "@type": "Answer", "text": "A review may consider the property condition, local sale context, ownership details, and the seller's preferred timeline. A direct offer is not a one-size-fits-all estimate." } }, { "@type": "Question", "name": "What happens after I submit the offer form?", "acceptedAnswer": { "@type": "Answer", "text": "Original Home Buyers receives the request and follows up to learn more about the property and timeline. Submitting a request does not require a homeowner to accept an offer." } }, { "@type": "Question", "name": "Are closing steps the same nationwide?", "acceptedAnswer": { "@type": "Answer", "text": "No. Closing requirements and documentation vary by state and property. The appropriate local closing professional can explain the applicable process if a transaction moves forward." } }] }] }} />
      <ContentPage eyebrow="SELL AS-IS · NATIONWIDE" title="Sell Your House Fast for Cash" intro="A direct, as-is alternative to a traditional listing when repairs, showings, or timing make a sale feel difficult." image={SITE_HERO_IMAGES.sellFast} heroAside={<SellFastOfferForm />}>
      <ContentSection eyebrow="A CLEAR THREE-STEP PROCESS" title="Selling your house can be simple.">
        <p>Original Home Buyers reviews your property, discusses your timeline, and may present a direct cash offer based on the house and the local market. You can start a conversation about selling in its current condition without first renovating, cleaning out, or staging the property.</p>
        <div className="content-card-grid content-card-grid--three">
          <article><span className="content-card__number">01</span><h3>Tell us about the property</h3><p>Start with the address, your name, and a U.S. phone number. Email is optional.</p></article>
          <article><span className="content-card__number">02</span><h3>Review your options</h3><p>A team member will learn more about the house, condition, and preferred timeline.</p></article>
          <article><span className="content-card__number">03</span><h3>Choose what works</h3><p>If the terms fit, coordinate an agreed closing date with the appropriate local closing professional.</p></article>
        </div>
        <a className="button button--mint" href="#cash-offer-form">Get My Cash Offer <ArrowRight size={16} /></a>
      </ContentSection>

      <ContentSection eyebrow="WHY HOMEOWNERS CALL" title="A direct path around common listing obstacles." tone="mist">
        <div className="icon-list">
          <p><Check size={18} /> Start a conversation without preparing the home for a traditional listing.</p>
          <p><Check size={18} /> Discuss a direct purchase rather than a traditional listing-agent process.</p>
          <p><Check size={18} /> Talk through a closing timeline that fits a move, estate, or financial situation.</p>
          <p><Check size={18} /> Review inherited, vacant, rental, fire-damaged, code-violation, foreclosure, and major-repair properties.</p>
        </div>
      </ContentSection>

      <ContentSection eyebrow="WHEN A DIRECT SALE MAY HELP" title="Some property situations call for a different path.">
        <p>A traditional listing can be a strong choice when you have time to prepare the home, host showings, and wait for the right buyer. A direct cash-sale conversation can be useful when certainty, simplicity, or an as-is sale is more important to you than pursuing a conventional listing process.</p>
        <div className="content-card-grid content-card-grid--three sell-fast-situation-grid">
          <article><House size={20} /><h3>Repairs feel out of reach</h3><p>Discuss a house with deferred maintenance, damage, or a cleanout that you do not want to complete before exploring a sale.</p></article>
          <article><Clock3 size={20} /><h3>Your timeline has changed</h3><p>Consider your options around a relocation, estate, separation, rental transition, or another time-sensitive change.</p></article>
          <article><ShieldCheck size={20} /><h3>You want a clear next step</h3><p>Review the property with one team, ask questions, and decide whether a direct offer is a fit for your goals.</p></article>
        </div>
      </ContentSection>

      <ContentSection eyebrow="HOW AN OFFER IS REVIEWED" title="A property review considers more than an address." tone="mist">
        <p>Original Home Buyers does not use a one-size-fits-all number. When we review a property, the conversation may include the current condition, local sale context, ownership details, and the timeline you have in mind. Any offer is subject to review and written terms.</p>
        <div className="process-list sell-fast-review-list">
          <article><span className="content-card__number">01</span><div><h3>Property condition</h3><p>Tell us about the house as it stands, including repairs, occupancy, or other issues that may affect a conventional sale.</p></div></article>
          <article><span className="content-card__number">02</span><div><h3>Local sale context</h3><p>We consider the property and its local market rather than relying on a generic nationwide estimate.</p></div></article>
          <article><span className="content-card__number">03</span><div><h3>Your preferred timing</h3><p>We discuss the timing that matters to you and whether a direct offer can reasonably support it.</p></div></article>
        </div>
      </ContentSection>

      <ContentSection eyebrow="CLOSING WITH CLARITY" title="Know the next steps before you decide.">
        <p>Closing requirements vary by state and property. If you decide to move forward, the appropriate local closing professional can verify ownership, review title and required documents, and explain the signing and funding process. Original Home Buyers will discuss the proposed timeline with you, but no sale is final until the written transaction documents are completed.</p>
        <div className="sell-fast-disclosure"><ShieldCheck size={19} aria-hidden="true" /><p><strong>Important:</strong> This page provides general information, not legal, tax, financial, or real estate advice. Availability, timing, and terms depend on the property, location, title, and review.</p></div>
        <div className="content-cta"><h3>Ready to discuss your property?</h3><p>Share the address and a few details. There is no obligation to accept an offer.</p><a className="button button--mint" href="#cash-offer-form">Request a Cash Offer <ArrowRight size={16} /></a></div>
      </ContentSection>
      <ContentSection eyebrow="SELL-FAST QUESTIONS" title="Common questions from homeowners.">
        <div className="sell-fast-faq-list">
          <article><h3>Can I ask about a cash offer if the house needs repairs?</h3><p>Yes. You can request a review for a property in its current condition. The condition is part of the review, and any proposed terms are set out in writing.</p></article>
          <article><h3>How is a direct offer reviewed?</h3><p>Original Home Buyers may consider the property condition, local sale context, ownership details, and your preferred timing. A direct offer is not a one-size-fits-all estimate.</p></article>
          <article><h3>What happens after I submit the form?</h3><p>We receive your request and follow up to learn more about the property and the sale you are considering. Sending a request does not require you to accept an offer.</p></article>
          <article><h3>Are closing steps the same nationwide?</h3><p>No. Required documents and closing practices vary by state and property. The appropriate local closing professional can explain the applicable process if a sale moves forward.</p></article>
        </div>
      </ContentSection>
      </ContentPage>
    </>
  );
}

export function HowItWorksPage() {
  const items = [
    ["01", "Tell Us About the Property", "Share the address, a few details about the house, and the timing that matters to you. You can start the conversation without cleaning, staging, or making repairs first."],
    ["02", "Review the Property and Your Options", "Our team learns more about the property and local context. A walkthrough or additional information may be helpful before any written terms are discussed."],
    ["03", "Decide What Works for You", "If a direct offer is a fit, you can review the written terms and discuss a closing date with the appropriate local closing professional. You are never required to accept."],
  ];
  return <ContentPage eyebrow="HOW IT WORKS" title="A Clear Three-Step Home Selling Process" intro="A direct sale is a property-specific conversation. Here is what to expect from the first request through a possible closing.">
    <ContentSection eyebrow="THE PROCESS" title="What to expect from the first conversation through closing.">
      <div className="process-list">{items.map(([number, title, copy]) => <article key={number}><span className="content-card__number">{number}</span><div><h3>{title}</h3><p>{copy}</p></div></article>)}</div>
      <div className="content-cta"><h3>Ready to discuss your property?</h3><p>Request a free, no-obligation offer and take the first step when it works for you.</p><a className="button button--mint" href="/#offer-form">Get My Cash Offer <ArrowRight size={16} /></a></div>
    </ContentSection>
    <ContentSection eyebrow="COMPARE YOUR OPTIONS" title="Choose the selling path that fits your situation." tone="mist">
      <p>A direct sale, a traditional listing, and a self-managed sale all work differently. The right path depends on your property’s condition, your goals, your preferred timing, and local market conditions.</p>
      <div className="selling-options" role="table" aria-label="Comparison of common home selling paths">
        <div className="selling-options__head" role="row"><span role="columnheader">Consideration</span><span role="columnheader">Direct cash offer</span><span role="columnheader">Listing with an agent</span><span role="columnheader">Selling on your own</span></div>
        <div className="selling-options__row" role="row"><span className="selling-options__feature" role="cell">Property preparation</span><span role="cell" data-option="Direct cash offer">The property is reviewed in its current condition; repairs are discussed as part of the review.</span><span role="cell" data-option="Listing with an agent">Preparation, cleaning, repairs, staging, and marketing may be considered before listing.</span><span role="cell" data-option="Selling on your own">You manage preparation, pricing, marketing, and buyer communication yourself.</span></div>
        <div className="selling-options__row" role="row"><span className="selling-options__feature" role="cell">Showings and access</span><span role="cell" data-option="Direct cash offer">A walkthrough or other property review may be arranged when it is useful.</span><span role="cell" data-option="Listing with an agent">Marketing, scheduled showings, and buyer visits are typically part of the process.</span><span role="cell" data-option="Selling on your own">You coordinate inquiries, access, and showings directly with prospective buyers.</span></div>
        <div className="selling-options__row" role="row"><span className="selling-options__feature" role="cell">Costs and terms</span><span role="cell" data-option="Direct cash offer">Original Home Buyers does not charge a listing-agent commission; all transaction terms should be reviewed in writing.</span><span role="cell" data-option="Listing with an agent">Commission, seller costs, concessions, and other terms depend on the listing agreement and transaction.</span><span role="cell" data-option="Selling on your own">You decide how to market the property and which services or professionals to engage.</span></div>
        <div className="selling-options__row" role="row"><span className="selling-options__feature" role="cell">Timeline and certainty</span><span role="cell" data-option="Direct cash offer">Timing and written terms are discussed after a property-specific review.</span><span role="cell" data-option="Listing with an agent">A buyer’s financing, inspections, appraisal, and negotiated terms can shape the timeline.</span><span role="cell" data-option="Selling on your own">The timeline depends on finding and negotiating with a buyer and coordinating the transaction.</span></div>
      </div>
      <p className="selling-options__disclosure">Every property and sale is different. This comparison is general information, not legal, tax, financial, or real estate advice.</p>
      <div className="content-cta"><h3>Get information before you decide.</h3><p>A property review and a direct cash-offer conversation cost nothing and do not commit you to a sale.</p><a className="button button--mint" href="/#offer-form">Request a Cash Offer <ArrowRight size={16} /></a></div>
    </ContentSection>
  </ContentPage>;
}

const situationCards = [
  ["Inherited Property", "Tell us about the property and your preferred timeline. We will review the situation and explain the next step."],
  ["Vacant House", "Discuss an empty property without carrying the cost of utilities, maintenance, and upkeep indefinitely."],
  ["Rental Property", "Explore an as-is sale for a rental that no longer fits your plans or has become difficult to manage."],
  ["Problem Tenants", "Share the situation and understand what options may be available for an occupied rental."],
  ["Major Repairs", "We review properties with roof, foundation, fire, mold, water, or other deferred maintenance concerns."],
  ["Foreclosure", "Discuss a possible sale before deadlines become more difficult to manage."],
  ["Probate Property", "A practical path for estate-related real estate when heirs need clarity and a flexible timeline."],
  ["Code Violations", "Review properties with permits, compliance, or municipal issues that make a normal listing harder."],
  ["Behind on Taxes", "Talk through properties with tax balances or other title matters that need attention."],
  ["Relocation", "Move forward without waiting through a long listing when a new opportunity or timeline is approaching."],
  ["Divorce or Life Change", "A direct conversation can help when a property needs to be handled during a major transition."],
  ["Other Situation", "Every property is reviewed individually. Contact us even if your situation is not listed."],
];

export function SituationsPage() {
  return <ContentPage eyebrow="INHERITED PROPERTY" title="Property Situations We Can Help With" intro="We buy houses in many conditions and help homeowners facing a wide range of property challenges."><ContentSection title="Tell us about the property and your preferred timeline."><div className="situation-page-grid">{situationCards.map(([title, copy]) => <article key={title}><House size={19} /><h3>{title}</h3><p>{copy}</p></article>)}</div><div className="content-cta"><h3>Do not see your exact situation?</h3><p>Contact us anyway. Every property is reviewed individually.</p><a className="button button--mint" href="/contact.html">Contact Original Home Buyers <ArrowRight size={16} /></a></div></ContentSection></ContentPage>;
}

const stateGroups = [
  ["Alabama", "AL"], ["Alaska", "AK"], ["Arizona", "AZ"], ["Arkansas", "AR"], ["California", "CA"], ["Colorado", "CO"], ["Connecticut", "CT"], ["Delaware", "DE"], ["District of Columbia", "DC"], ["Florida", "FL"], ["Georgia", "GA"], ["Hawaii", "HI"], ["Idaho", "ID"], ["Illinois", "IL"], ["Indiana", "IN"], ["Iowa", "IA"], ["Kansas", "KS"], ["Kentucky", "KY"], ["Louisiana", "LA"], ["Maine", "ME"], ["Maryland", "MD"], ["Massachusetts", "MA"], ["Michigan", "MI"], ["Minnesota", "MN"], ["Mississippi", "MS"], ["Missouri", "MO"], ["Montana", "MT"], ["Nebraska", "NE"], ["Nevada", "NV"], ["New Hampshire", "NH"], ["New Jersey", "NJ"], ["New Mexico", "NM"], ["New York", "NY"], ["North Carolina", "NC"], ["North Dakota", "ND"], ["Ohio", "OH"], ["Oklahoma", "OK"], ["Oregon", "OR"], ["Pennsylvania", "PA"], ["Rhode Island", "RI"], ["South Carolina", "SC"], ["South Dakota", "SD"], ["Tennessee", "TN"], ["Texas", "TX"], ["Utah", "UT"], ["Vermont", "VT"], ["Virginia", "VA"], ["Washington", "WA"], ["West Virginia", "WV"], ["Wisconsin", "WI"], ["Wyoming", "WY"],
] as const;

function slugifyLocation(value: string) {
  return value.toLowerCase().replaceAll(" ", "-");
}

function displayLocationName(value: string) {
  return value.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
}

function trackLocationInterest(eventName: string, properties: Record<string, string | number>) {
  const analytics = (window as typeof window & { umami?: { track?: (name: string, data?: Record<string, string | number>) => void } }).umami;
  analytics?.track?.(eventName, properties);
  window.dispatchEvent(new CustomEvent("homebuyers:analytics", { detail: { event: eventName, ...properties } }));
}

type RecentLocation = { label: string; href: string; locationType: "state" | "county" };
type ShortcutSort = "featured" | "recent-interest" | "mock-market-activity" | "alphabetical";

const quickCountyShortcuts = [
  { state: "California", stateSlug: "california", county: "los-angeles" },
  { state: "Texas", stateSlug: "texas", county: "harris" },
  { state: "Florida", stateSlug: "florida", county: "miami-dade" },
  { state: "Illinois", stateSlug: "illinois", county: "cook" },
  { state: "Arizona", stateSlug: "arizona", county: "maricopa" },
  { state: "Georgia", stateSlug: "georgia", county: "fulton" },
  { state: "Nevada", stateSlug: "nevada", county: "clark" },
  { state: "Washington", stateSlug: "washington", county: "king" },
] as const;

export function LocationsPage() {
  const [query, setQuery] = useState("");
  const [recentLocations, setRecentLocations] = useState<RecentLocation[]>([]);
  const [shortcutSort, setShortcutSort] = useState<ShortcutSort>("featured");
  const [isCountySearchLoading, setIsCountySearchLoading] = useState(false);

  useEffect(() => {
    try {
      const saved = JSON.parse(window.localStorage.getItem("homebuyers-recent-locations") || "[]") as RecentLocation[];
      setRecentLocations(Array.isArray(saved) ? saved.slice(0, 4) : []);
    } catch {
      setRecentLocations([]);
    }
  }, []);

  function rememberLocation(location: RecentLocation) {
    setRecentLocations((current) => {
      const next = [location, ...current.filter((item) => item.href !== location.href)].slice(0, 4);
      window.localStorage.setItem("homebuyers-recent-locations", JSON.stringify(next));
      return next;
    });
  }

  const normalizedQuery = query.trim().toLowerCase();
  useEffect(() => {
    if (!normalizedQuery) {
      setIsCountySearchLoading(false);
      return;
    }
    const timeout = window.setTimeout(() => setIsCountySearchLoading(false), 180);
    return () => window.clearTimeout(timeout);
  }, [normalizedQuery]);

  function handleSearchChange(value: string) {
    setQuery(value);
    setIsCountySearchLoading(Boolean(value.trim()));
    if (value.trim().length === 3) trackLocationInterest("location_search_used", { query_length: value.trim().length });
  }
  const stateEntries = stateGroups.map(([state, abbreviation]) => {
    const slug = slugifyLocation(state);
    return { state, abbreviation, slug, counties: locationData[slug] || [] };
  });
  const matchingStates = normalizedQuery
    ? stateEntries.filter(({ state, abbreviation }) => state.toLowerCase().includes(normalizedQuery) || abbreviation.toLowerCase() === normalizedQuery)
    : stateEntries;
  const matchingCounties = normalizedQuery
    ? stateEntries.flatMap(({ state, abbreviation, slug, counties }) => counties.filter((county) => displayLocationName(county).toLowerCase().includes(normalizedQuery)).map((county) => ({ state, abbreviation, slug, county }))).slice(0, 16)
    : [];
  const matchCount = matchingStates.length + matchingCounties.length;
  const quickCountyLinks = [...quickCountyShortcuts]
    .filter(({ stateSlug, county }) => locationData[stateSlug]?.includes(county))
    .sort((left, right) => {
      if (shortcutSort === "alphabetical") return displayLocationName(left.county).localeCompare(displayLocationName(right.county));
      if (shortcutSort === "mock-market-activity") {
        const leftScore = getMockMarketActivity(left.stateSlug, left.county)?.activityScore ?? 0;
        const rightScore = getMockMarketActivity(right.stateSlug, right.county)?.activityScore ?? 0;
        return rightScore - leftScore;
      }
      if (shortcutSort === "recent-interest") {
        const leftHref = `/areas-we-serve/${left.stateSlug}/${left.county}-county/`;
        const rightHref = `/areas-we-serve/${right.stateSlug}/${right.county}-county/`;
        const leftRank = recentLocations.findIndex((item) => item.href === leftHref);
        const rightRank = recentLocations.findIndex((item) => item.href === rightHref);
        return (leftRank === -1 ? Number.MAX_SAFE_INTEGER : leftRank) - (rightRank === -1 ? Number.MAX_SAFE_INTEGER : rightRank);
      }
      return 0;
    });

  return (
    <div className="content-page legacy-locations-page">
      <PageHeader />
      <main>
        <section className="legacy-locations-directory" style={{ backgroundImage: `linear-gradient(90deg, rgba(2,34,64,.94), rgba(2,39,74,.78)), url(${SITE_HERO_IMAGES.locations})` }}>
          <div className="legacy-locations-directory__inner">
            <span className="legacy-locations-directory__eyebrow">NATIONWIDE SERVICE AREAS</span>
            <h1>Sell your house fast, wherever the property is located.</h1>
            <p>Start with your state below. Every property is reviewed individually, and each location page explains the same direct, as-is selling option.</p>
            <div className="legacy-location-search">
              <Search size={18} aria-hidden="true" />
              <input aria-label="Search by state or county" value={query} onFocus={() => trackLocationInterest("location_search_focused", { surface: "locations_directory" })} onChange={(event) => handleSearchChange(event.target.value)} placeholder="Search by state or county" />
              {query && <button type="button" aria-label="Clear location search" onClick={() => handleSearchChange("")}><X size={17} /></button>}
            </div>
            {normalizedQuery && <p className="legacy-location-search__summary" role="status">{matchCount > 0 ? `${matchCount} matching ${matchCount === 1 ? "location" : "locations"} for “${query.trim()}”` : `No state or county matches for “${query.trim()}”`}</p>}
            {!normalizedQuery && <section className="location-shortcuts" aria-label="Quick county shortcuts"><div className="location-shortcuts__heading"><div><span>QUICK COUNTY SHORTCUTS</span><small>Jump straight to a local market.</small></div><label className="shortcut-sort"><span>Sort shortcuts</span><select value={shortcutSort} onChange={(event) => { const value = event.target.value as ShortcutSort; setShortcutSort(value); trackLocationInterest("county_shortcut_sort_changed", { sort: value }); }}><option value="featured">Featured markets</option><option value="recent-interest">Recent local interest</option><option value="mock-market-activity">Mock market activity (test)</option><option value="alphabetical">County name A–Z</option></select></label></div><small className="shortcut-sort__note">{shortcutSort === "mock-market-activity" ? "Mock test data is active. These scores are for interface testing only and are not housing-market data." : "Recent local interest reflects locations recently opened in this browser, not third-party housing-market data."}</small><div className="location-shortcuts__links">{quickCountyLinks.map(({ state, stateSlug, county }) => { const href = `/areas-we-serve/${stateSlug}/${county}-county/`; const label = `${displayLocationName(county)} County, ${state}`; const mockActivity = getMockMarketActivity(stateSlug, county); return <a href={href} key={href} onClick={() => { rememberLocation({ label, href, locationType: "county" }); trackLocationInterest("county_shortcut_clicked", { state, county: displayLocationName(county) }); }}><MapPin size={14} />{label}{shortcutSort === "mock-market-activity" && mockActivity && <span className="shortcut-activity-test" aria-label={`Mock activity test score ${mockActivity.activityScore} out of 100`}>Mock {mockActivity.activityScore}</span>}<ChevronRight size={14} /></a>; })}</div></section>}
            {recentLocations.length > 0 && !normalizedQuery && <section className="recent-locations" aria-label="Recently searched locations"><div className="location-shortcuts__heading"><span>RECENTLY SEARCHED</span><button type="button" onClick={() => { window.localStorage.removeItem("homebuyers-recent-locations"); setRecentLocations([]); }}>Clear</button></div><div className="recent-locations__links">{recentLocations.map((location) => <a href={location.href} key={location.href} onClick={() => trackLocationInterest("recent_location_clicked", { location_type: location.locationType, location: location.label })}><Clock3 size={14} />{location.label}<ChevronRight size={14} /></a>)}</div></section>}
            {normalizedQuery && isCountySearchLoading && <section className="legacy-county-match-group county-search-skeleton" aria-label="Loading matching county locations" aria-busy="true"><span>COUNTY MATCHES</span><div className="legacy-county-results">{Array.from({ length: 4 }, (_, index) => <div className="county-search-skeleton__card" key={index}><Skeleton className="county-search-skeleton__icon" /><span><Skeleton className="county-search-skeleton__line county-search-skeleton__line--title" /><Skeleton className="county-search-skeleton__line" /></span><Skeleton className="county-search-skeleton__code" /></div>)}</div></section>}
            {matchingCounties.length > 0 && !isCountySearchLoading && <section className="legacy-county-match-group" aria-label="Matching county locations"><span>COUNTY MATCHES</span><div className="legacy-county-results">{matchingCounties.map(({ state, abbreviation, slug, county }) => { const href = `/areas-we-serve/${slug}/${county}-county/`; const label = `${displayLocationName(county)} County, ${state}`; return <a href={href} key={`${slug}-${county}`} onClick={() => { rememberLocation({ label, href, locationType: "county" }); trackLocationInterest("location_card_clicked", { location_type: "county", state, county: displayLocationName(county) }); }}><MapPin size={16} aria-hidden="true" /><span><b>{displayLocationName(county)} County</b><em>{state}</em></span><small>{abbreviation}</small></a>; })}</div></section>}
            <div className="legacy-state-grid" aria-label="Choose a state to view local home-selling information">
              {matchingStates.map(({ state, abbreviation, slug, counties }) => { const href = `/areas-we-serve/${slug}/`; return <a href={href} key={state} onClick={() => { rememberLocation({ label: state, href, locationType: "state" }); trackLocationInterest("location_card_clicked", { location_type: "state", state, state_code: abbreviation, market_count: counties.length }); }}><MapPin size={17} aria-hidden="true" /><span><b>Sell My {state} House Fast</b><em>{counties.length} local {counties.length === 1 ? "market" : "markets"}</em></span><small>{abbreviation}</small></a>; })}
            </div>
            {normalizedQuery && matchingStates.length === 0 && matchingCounties.length === 0 && <p className="legacy-location-search__empty">Try a full state name, a state abbreviation, or the county name.</p>}
          </div>
        </section>
      </main>
      <PageFooter />
    </div>
  );
}

export function AboutPage() {
  return <ContentPage eyebrow="WHO WE ARE" title="A Family-Owned Team Focused on Practical Solutions" intro="Original Home Buyers offers homeowners a direct, as-is selling conversation when a traditional listing does not feel like the right next step.">
    <ContentSection eyebrow="OUR STORY" title="A clearer path for complicated property situations.">
      <p>Original Home Buyers was built around a simple idea: homeowners deserve a straightforward conversation about their options, especially when a house, timing, or life event makes a traditional sale feel difficult. We begin by listening to the situation, learning about the property, and explaining the possible next steps without pressure.</p>
      <p>Every property has its own context. A move, inherited home, vacancy, repair burden, separation, rental transition, or financial change can create a need for a different kind of sale conversation. Our role is to review the property individually and help a homeowner decide whether a direct offer is worth considering.</p>
    </ContentSection>
    <ContentSection eyebrow="OUR MISSION" title="Make the next step easier to understand." tone="mist">
      <p>We aim to give homeowners a practical alternative to a traditional listing process: a property-specific review, a clear explanation of any proposed terms, and time to decide what is right for them. A direct cash offer is not the right choice for every seller, and we encourage homeowners to compare their options and seek independent guidance when useful.</p>
      <div className="content-cta"><h3>Start with a no-obligation conversation.</h3><p>Tell us about the property and your preferred timeline. You do not have to make repairs or commit to a sale to ask questions.</p><a className="button button--mint" href="/#offer-form">Tell Us About Your Property <ArrowRight size={16} /></a></div>
    </ContentSection>
    <ContentSection eyebrow="WHAT WE STAND FOR" title="The principles that guide each conversation.">
      <div className="content-card-grid content-card-grid--three about-values-grid">
        <article><House size={20} /><h3>Dignity first</h3><p>We aim to listen to the homeowner’s circumstances before discussing a possible property purchase.</p></article>
        <article><ShieldCheck size={20} /><h3>Clear communication</h3><p>We explain the review process, proposed terms, and next steps in plain language so questions can be raised early.</p></article>
        <article><Clock3 size={20} /><h3>Property-specific review</h3><p>Condition, title, location, and timing matter. We avoid one-size-fits-all promises about offers or closings.</p></article>
      </div>
    </ContentSection>
    <ContentSection eyebrow="WHAT TO EXPECT" title="A direct conversation, without pressure." tone="mist">
      <div className="icon-list"><p><Check size={18} /> Start with the property, your goals, and the timing you have in mind.</p><p><Check size={18} /> Discuss the house in its current condition before making repair plans.</p><p><Check size={18} /> Review any potential offer and transaction terms in writing before deciding.</p><p><Check size={18} /> Work with the appropriate local closing professional if a sale moves forward.</p></div>
      <p className="selling-options__disclosure">Information on this page is general. Property availability, timing, purchase terms, and closing requirements vary by property and location.</p>
      <a className="button button--mint" href="/#offer-form">Request a Cash Offer <ArrowRight size={16} /></a>
    </ContentSection>
  </ContentPage>;
}

export function SellAsIsPage() {
  return <><SEOHead title="Sell a House As-Is Nationwide | Original Home Buyers" description="Learn what selling a house as-is can involve, from repairs and disclosures to a direct-sale conversation with Original Home Buyers." canonicalUrl="https://homebuyers-nationwide.com/sell-as-is.html" keywords={["sell house as-is", "cash buyer as-is house", "sell house needing repairs"]} schema={{ "@context": "https://schema.org", "@type": "FAQPage", mainEntity: [{ "@type": "Question", name: "What does selling a house as-is mean?", acceptedAnswer: { "@type": "Answer", text: "An as-is sale generally means the seller does not agree to complete repairs as a condition of sale. Required disclosures and transaction rules vary by state." } }, { "@type": "Question", name: "Can a house needing repairs be reviewed for a direct sale?", acceptedAnswer: { "@type": "Answer", text: "Yes. A property can be reviewed in its current condition, but any potential purchase terms depend on property-specific review and written agreement." } }] }} /><ContentPage eyebrow="SELL AS-IS · NATIONWIDE" title="Sell a House As-Is" intro="Explore a direct-sale conversation when repairs, cleanout work, or listing preparation no longer fit your situation."><ContentSection eyebrow="WHAT AS-IS MEANS" title="Start with the house as it stands."><p>Selling as-is can mean considering a sale without first renovating, staging, or completing a long repair list. It does not remove a homeowner’s responsibility to understand applicable disclosure, title, estate, or local requirements. A qualified local professional can explain rules that apply to your property.</p><div className="content-card-grid content-card-grid--three"><article><House size={20} /><h3>Condition concerns</h3><p>Roof, foundation, electrical, water, environmental, or deferred-maintenance concerns can be part of a property review.</p></article><article><Clock3 size={20} /><h3>Less preparation</h3><p>Discuss a direct sale before planning a traditional listing, showings, renovation, or extensive cleanout.</p></article><article><ShieldCheck size={20} /><h3>Written terms matter</h3><p>Review all proposed terms, contingencies, responsibilities, and closing steps in writing before deciding.</p></article></div></ContentSection><ContentSection eyebrow="A PRACTICAL REVIEW" title="Questions to ask before accepting any offer." tone="mist"><div className="icon-list"><p><Check size={18} /> Is the offer in writing and clear about price, contingencies, and closing coordination?</p><p><Check size={18} /> Are there any upfront fees, assignment provisions, or changes to the proposed terms?</p><p><Check size={18} /> Have you considered a traditional listing or independent advice if it could better meet your goals?</p><p><Check size={18} /> Does the property have title, estate, tenant, lien, or condition concerns that require professional guidance?</p></div><div className="content-cta"><h3>Discuss the property in its current condition.</h3><p>A request for information does not require you to accept an offer.</p><a className="button button--mint" href="/#offer-form">Request a Cash Offer <ArrowRight size={16} /></a></div></ContentSection><ContentSection eyebrow="AS-IS QUESTIONS" title="Common homeowner questions."><div className="sell-fast-faq-list"><article><h3>Do I need to repair the house before requesting a review?</h3><p>No. You can share information about the property in its current condition. The condition may affect any potential terms.</p></article><article><h3>Can I still seek other options?</h3><p>Yes. A direct-sale conversation is one option. You may compare alternatives and seek independent legal, tax, financial, or real estate advice.</p></article></div><p className="legal-note">General information only; laws, disclosures, and closing requirements vary by state and property.</p></ContentSection></ContentPage></>;
}

export function ForeclosureHelpPage() {
  return <><SEOHead title="Foreclosure Help and Home-Sale Options | Original Home Buyers" description="General nationwide information about discussing a property sale while facing mortgage or foreclosure-related deadlines." canonicalUrl="https://homebuyers-nationwide.com/foreclosure-help.html" keywords={["foreclosure help", "sell house before foreclosure", "cash offer foreclosure"]} schema={{ "@context": "https://schema.org", "@type": "FAQPage", mainEntity: [{ "@type": "Question", name: "Should I wait to seek help after receiving a foreclosure notice?", acceptedAnswer: { "@type": "Answer", text: "Deadlines and rights vary by loan and state. Contact your servicer and a qualified housing, legal, or financial professional promptly to understand options." } }, { "@type": "Question", name: "Can selling be one option before an auction?", acceptedAnswer: { "@type": "Answer", text: "A sale may be one possible path, but feasibility depends on timing, title, loan balance, property value, buyer review, and transaction requirements." } }] }} /><ContentPage eyebrow="FORECLOSURE HELP · NATIONWIDE" title="Foreclosure Help and Home-Sale Options" intro="If mortgage-related notices or deadlines are creating pressure, start by understanding your options and speaking with qualified support."><ContentSection eyebrow="START WITH INFORMATION" title="Foreclosure processes are state- and loan-specific."><p>Foreclosure procedures, notices, timelines, reinstatement rights, loss-mitigation options, and sale requirements can differ substantially. Contact your loan servicer promptly and consider a HUD-approved housing counselor, a qualified attorney, or another licensed professional who can explain choices for your circumstances.</p><a className="inline-link" href="https://www.hud.gov/i_want_to/talk_to_a_housing_counselor" target="_blank" rel="noreferrer">Find a HUD-approved housing counselor <ArrowRight size={15} /></a></ContentSection><ContentSection eyebrow="OPTIONS TO DISCUSS" title="A sale is only one possible path." tone="mist"><div className="content-card-grid content-card-grid--three"><article><ShieldCheck size={20} /><h3>Contact the servicer</h3><p>Ask about the status of the loan, notices, loss-mitigation options, and documents that may be required.</p></article><article><House size={20} /><h3>Consider a sale</h3><p>A direct or listed sale may be worth discussing when timing, equity, title, and buyer review make it feasible.</p></article><article><Clock3 size={20} /><h3>Coordinate professionals</h3><p>Legal, housing, title, and financial professionals can help identify the documents and deadlines involved.</p></article></div></ContentSection><ContentSection eyebrow="DIRECT-SALE CONVERSATION" title="Review the property without assuming an outcome."><p>Original Home Buyers can discuss a potential direct purchase, but cannot provide legal, tax, credit, loan-modification, or foreclosure advice. A sale is not guaranteed and depends on property review, title, existing obligations, written terms, and the time available.</p><div className="content-cta"><h3>Tell us about the property and timing.</h3><p>We will review the request and explain whether a direct-sale conversation may be practical.</p><a className="button button--mint" href="/#offer-form">Request a Cash Offer <ArrowRight size={16} /></a></div><p className="legal-note">This page is general information, not legal, financial, credit, tax, or foreclosure advice. Seek timely advice specific to your loan and state.</p></ContentSection></ContentPage></>;
}

export function InheritedPropertyPage() {
  return <><SEOHead title="Sell an Inherited Property Nationwide | Original Home Buyers" description="General guidance for heirs and estate representatives considering an inherited-property sale, including probate, title, contents, and co-owner questions." canonicalUrl="https://homebuyers-nationwide.com/sell-inherited-property.html" keywords={["sell inherited house", "inherited property cash buyer", "probate house sale"]} schema={{ "@context": "https://schema.org", "@type": "FAQPage", mainEntity: [{ "@type": "Question", name: "Can inherited property be sold before probate is complete?", acceptedAnswer: { "@type": "Answer", text: "Authority to sell estate property depends on the estate, title, will, court process, and state law. Consult the estate's attorney or appropriate local professional." } }, { "@type": "Question", name: "How is an inherited property reviewed for sale?", acceptedAnswer: { "@type": "Answer", text: "A review may consider condition, title, occupancy, estate authority, property contents, local market context, and the owners' preferred timing." } }] }} /><ContentPage eyebrow="INHERITED PROPERTY · NATIONWIDE" title="Sell an Inherited Property" intro="A practical starting point for heirs, personal representatives, and families navigating an estate-related property."><ContentSection eyebrow="START WITH AUTHORITY" title="Confirm who can make decisions for the property."><p>Inherited property may involve a will, probate or other estate administration, a personal representative, trust documents, title work, co-heirs, and state-specific requirements. Before a sale, confirm who is authorized to sign and what approvals or documents are needed. An estate attorney or qualified local professional can help explain the applicable process.</p><div className="content-card-grid content-card-grid--three"><article><ShieldCheck size={20} /><h3>Estate authority</h3><p>Clarify whether a personal representative, trustee, court, or multiple heirs must approve the transaction.</p></article><article><House size={20} /><h3>Property readiness</h3><p>Consider occupancy, maintenance, contents, insurance, utilities, and any title or tax questions.</p></article><article><Clock3 size={20} /><h3>Shared decisions</h3><p>Give co-heirs time to understand alternatives, communicate preferences, and review written terms.</p></article></div></ContentSection><ContentSection eyebrow="A DIRECT-SALE OPTION" title="Discuss the property in its present condition." tone="mist"><p>A direct-sale conversation can be useful when family members are managing a vacant house, live out of state, prefer not to renovate, or want to explore a simplified sale path. Any potential purchase depends on property review, title, estate authority, local closing practices, and written agreement.</p><div className="content-cta"><h3>Start with the property and estate context.</h3><p>Tell us what you know about the home, the decision-makers, and the timing you are considering.</p><a className="button button--mint" href="/#offer-form">Discuss an Inherited Property <ArrowRight size={16} /></a></div></ContentSection><ContentSection eyebrow="IMPORTANT CONSIDERATIONS" title="Keep legal and tax questions with the right professional."><div className="icon-list"><p><Check size={18} /> Estate authority and probate administration can differ by state and estate.</p><p><Check size={18} /> Tax basis, estate obligations, and proceeds should be discussed with qualified tax and legal professionals.</p><p><Check size={18} /> Property contents, valuables, records, and personal items may need a plan before a closing is scheduled.</p></div><p className="legal-note">This page provides general information only and is not probate, legal, tax, financial, or real estate advice.</p></ContentSection></ContentPage></>;
}

export function DivorceHomeSalePage() {
  return <><SEOHead title="Selling a Home During Divorce | Original Home Buyers" description="General nationwide information for homeowners considering property decisions and a direct-sale option during divorce or separation." canonicalUrl="https://homebuyers-nationwide.com/sell-during-divorce.html" keywords={["sell house during divorce", "divorce home sale", "cash offer divorce property"]} schema={{ "@context": "https://schema.org", "@type": "FAQPage", mainEntity: [{ "@type": "Question", name: "Who can decide to sell a home during divorce?", acceptedAnswer: { "@type": "Answer", text: "Authority depends on title, agreements, court orders, and state law. Consult a qualified family-law attorney or other professional for guidance." } }, { "@type": "Question", name: "Can a direct sale help during a separation?", acceptedAnswer: { "@type": "Answer", text: "A direct sale may be one option where the owners agree to explore it, but any purchase depends on ownership, review, written terms, and closing requirements." } }] }} /><ContentPage eyebrow="DIVORCE & HOME SALES · NATIONWIDE" title="Selling a Home During Divorce" intro="A measured starting point for homeowners considering what to do with a shared property during a separation or divorce."><ContentSection eyebrow="BEGIN WITH CLARITY" title="Property decisions are often part of a larger legal process."><p>Ownership, marital-property rules, temporary arrangements, court orders, mortgage obligations, title, and decision-making authority vary by state and individual circumstances. Before agreeing to a sale, speak with your legal and financial advisers about the options and approvals that may apply.</p><div className="content-card-grid content-card-grid--three"><article><ShieldCheck size={20} /><h3>Confirm authority</h3><p>Understand who is on title, who must sign, and whether an agreement or court order affects a potential sale.</p></article><article><House size={20} /><h3>Consider the house</h3><p>Discuss condition, occupancy, repairs, insurance, mortgage, liens, and the cost of maintaining the property.</p></article><article><Clock3 size={20} /><h3>Coordinate decisions</h3><p>Clear communication and written terms can help each owner understand the proposed process and next steps.</p></article></div></ContentSection><ContentSection eyebrow="A DIRECT-SALE DISCUSSION" title="Explore an option without pressure." tone="mist"><p>When all required decision-makers agree to explore a sale, Original Home Buyers can review the property in its current condition and discuss whether a direct purchase may be practical. Any possible transaction is subject to review, title, required approvals, written agreement, and local closing requirements.</p><div className="content-cta"><h3>Discuss the property and your timing.</h3><p>A request does not require either owner to accept an offer.</p><a className="button button--mint" href="/#offer-form">Request a Cash Offer <ArrowRight size={16} /></a></div></ContentSection><ContentSection eyebrow="PROFESSIONAL GUIDANCE" title="Keep legal and financial decisions with your advisers."><div className="icon-list"><p><Check size={18} /> Ask how a possible sale could interact with title, divorce proceedings, temporary orders, and distribution decisions.</p><p><Check size={18} /> Review tax, loan, insurance, and proceeds questions with qualified professionals.</p><p><Check size={18} /> Avoid relying on a property buyer for legal conclusions about your rights or obligations.</p></div><p className="legal-note">This page is general information, not legal, tax, financial, or real estate advice. Seek advice specific to your state and circumstances.</p></ContentSection></ContentPage></>;
}

export function SellerInsightsPage() {
  return <><SEOHead title="Seller Insights: Direct Sale Considerations | Original Home Buyers" description="General seller education on comparing a direct property sale with a traditional listing or financed-buyer transaction." canonicalUrl="https://homebuyers-nationwide.com/seller-insights.html" keywords={["cash sale considerations", "direct home sale", "selling house options"]} /><ContentPage eyebrow="SELLER INSIGHTS" title="Questions to Consider Before You Sell" intro="A transparent look at common considerations when comparing a direct property sale with a traditional listing."><ContentSection eyebrow="NOT CUSTOMER TESTIMONIALS" title="General information, not individual outcomes."><p>This page summarizes practical topics for sellers. It does not include customer reviews, promised results, quoted transaction timelines, or assurances that one selling path is right for every property.</p></ContentSection><ContentSection eyebrow="COMPARE THE PROCESS" title="Understand the moving parts before choosing a path." tone="mist"><div className="content-card-grid content-card-grid--three"><article><House size={20} /><h3>Preparation</h3><p>Ask what condition work, access, showings, documentation, or marketing may be needed for the path you are considering.</p></article><article><ShieldCheck size={20} /><h3>Terms and contingencies</h3><p>Review the proposed price, contingencies, financing, inspection, appraisal, assignment, and closing terms in writing.</p></article><article><Clock3 size={20} /><h3>Timing and coordination</h3><p>Property condition, title, buyer review, state practices, and professional availability can shape timing.</p></article></div></ContentSection><ContentSection eyebrow="MAKE AN INFORMED DECISION" title="A direct offer is one option, not a requirement."><p>A homeowner may choose to seek a direct purchase, list with an agent, sell independently, wait, or pursue another path. Compare the likely responsibilities, risks, expenses, and timing with qualified advisers before deciding.</p><div className="content-cta"><h3>Ask about a direct property review.</h3><p>Tell us about the house and the situation; there is no obligation to accept any potential offer.</p><a className="button button--mint" href="/#offer-form">Request a Cash Offer <ArrowRight size={16} /></a></div><p className="legal-note">General information only. It is not legal, tax, financial, credit, or real estate advice.</p></ContentSection></ContentPage></>;
}

export function CompareSellingOptionsPage() {
  return <><SEOHead title="Direct Sale vs. Listing With an Agent | Original Home Buyers" description="Compare common considerations for a direct as-is property sale and listing with a local real estate agent." canonicalUrl="https://homebuyers-nationwide.com/compare-selling-options.html" keywords={["cash buyer vs real estate agent", "sell house direct vs listing", "home selling options"]} /><ContentPage eyebrow="COMPARE SELLING OPTIONS" title="Direct Sale vs. Listing With an Agent" intro="Compare common steps, responsibilities, and questions before deciding how to sell your property."><ContentSection eyebrow="SIDE-BY-SIDE COMPARISON" title="Two paths can have different tradeoffs."><div className="selling-options selling-options--two" role="table" aria-label="Comparison of direct sale and listing with an agent"><div className="selling-options__head" role="row"><span role="columnheader">Consideration</span><span role="columnheader">Listing with an agent</span><span role="columnheader">Direct sale to Original Home Buyers</span></div><div className="selling-options__row" role="row"><span className="selling-options__feature" role="cell">Commissions and costs</span><span role="cell" data-option="Listing with an agent">Commission, marketing, seller costs, and concessions depend on the listing agreement and transaction.</span><span role="cell" data-option="Direct sale">A direct purchase does not use a listing agent. Review all proposed transaction costs and terms in writing.</span></div><div className="selling-options__row" role="row"><span className="selling-options__feature" role="cell">Property condition</span><span role="cell" data-option="Listing with an agent">Preparation, repairs, staging, or buyer-requested work may be considered based on the listing and contract.</span><span role="cell" data-option="Direct sale">The property can be reviewed in its current condition; condition remains part of any property-specific evaluation.</span></div><div className="selling-options__row" role="row"><span className="selling-options__feature" role="cell">Contingencies</span><span role="cell" data-option="Listing with an agent">Inspection, financing, appraisal, and other contingencies may be negotiated with a buyer.</span><span role="cell" data-option="Direct sale">Any proposed terms are defined in writing after review; do not assume a term is waived unless the agreement says so.</span></div><div className="selling-options__row" role="row"><span className="selling-options__feature" role="cell">Showings and access</span><span role="cell" data-option="Listing with an agent">Marketing and showings are typically coordinated with prospective buyers.</span><span role="cell" data-option="Direct sale">A property review or walkthrough may be arranged when useful; there is no public listing process.</span></div><div className="selling-options__row" role="row"><span className="selling-options__feature" role="cell">Timing and closing</span><span role="cell" data-option="Listing with an agent">Timing can depend on pricing, marketing, buyer terms, financing, title, and local closing practices.</span><span role="cell" data-option="Direct sale">Timing is discussed after property review and depends on title, required documents, written agreement, and local closing practices.</span></div></div><p className="selling-options__disclosure">Every property and transaction is different. This comparison is general information, not legal, tax, financial, or real estate advice.</p></ContentSection><ContentSection eyebrow="WHAT CONTINGENCIES MEAN" title="Read the contract language closely." tone="mist"><p>An inspection contingency can give a buyer time to inspect the property and, depending on the agreement, seek changes or withdraw. A financing contingency can make a transaction dependent on a buyer obtaining financing. The exact effect of either provision depends on the contract and applicable law; a qualified attorney or real estate professional can explain the agreement before you sign.</p><div className="content-cta"><h3>Explore a direct-sale conversation.</h3><p>Ask questions, review any potential terms in writing, and decide whether a direct option fits your goals.</p><a className="button button--mint" href="/#offer-form">Request a Cash Offer <ArrowRight size={16} /></a></div></ContentSection><ContentSection eyebrow="CONTACT ORIGINAL HOME BUYERS" title="Talk through your property and options."><div className="contact-details"><a href="tel:+12404105636"><Phone size={22} /><span><strong>(240) 410-5636</strong><small>Call or text to discuss the property.</small></span></a><a href="mailto:Info@Originalhomebuyers.com"><Mail size={22} /><span><strong>Info@Originalhomebuyers.com</strong><small>Info@Originalhomebuyers.com</small></span></a><div><MapPin size={22} /><span><strong>3500 W Rogers Ave</strong><small>Baltimore, MD 21215</small></span></div></div></ContentSection></ContentPage></>;
}

export function BlogPage() {
  return <><SEOHead title="Seller Education Blog | Original Home Buyers" description="Nationwide seller education about direct cash sales, traditional listings, and self-managed home sales from Original Home Buyers." canonicalUrl="https://homebuyers-nationwide.com/blog.html" keywords={["selling house for cash benefits", "sell house without agent", "home selling options", "cash offer blog"]} schema={{ "@context": "https://schema.org", "@type": "Blog", name: "Original Home Buyers Seller Education Blog", description: "General nationwide seller education about common home-sale options." }} /><ContentPage eyebrow="SELLER EDUCATION" title="Seller Education Blog" intro="Clear, general information to help you compare a direct sale, a traditional listing, and a self-managed home sale before you decide."><ContentSection id="cash-sale-benefits" eyebrow="SELLING FOR CASH" title="Potential benefits and tradeoffs of a direct cash sale."><p>A cash offer is generally an offer that is not conditioned on the buyer obtaining conventional purchase financing. It does not automatically mean that a sale is as-is, that no inspection will occur, or that every contract term is waived. Read the proposed agreement carefully and ask questions before deciding.</p><div className="content-card-grid content-card-grid--three"><article><Clock3 size={20} /><h3>Fewer financing steps</h3><p>Without a conventional buyer-loan approval process, there may be fewer financing-related steps. Title, documents, property review, and written terms can still affect the transaction.</p></article><article><House size={20} /><h3>Property in its current condition</h3><p>A direct buyer may review the home in its present condition. Whether repairs, inspections, credits, or other requirements apply depends on the proposed agreement.</p></article><article><ShieldCheck size={20} /><h3>Private property review</h3><p>Instead of a public listing campaign, a direct sale may involve a focused conversation and a walkthrough when useful for the property.</p></article></div><p>A direct sale is not the best path for every homeowner. If maximizing exposure or comparing competing buyer interest is your priority, a traditional listing may be worth considering. Compare the likely responsibilities, costs, timing, and terms of each path with qualified local professionals.</p><a className="inline-link" href="/cash-sale-benefits.html">Read the full Cash Sale Benefits Guide <ArrowRight size={15} /></a><div className="content-cta"><h3>Explore a direct-sale conversation.</h3><p>Tell us about the property and review any potential written terms without an obligation to sell.</p><a className="button button--mint" href="/#offer-form">Request a Cash Offer <ArrowRight size={16} /></a></div></ContentSection><ContentSection id="selling-without-agent" eyebrow="SELLING WITHOUT AN AGENT" title="What to weigh before managing a sale yourself." tone="mist"><p>Selling without a listing agent can give a homeowner more direct control over preparation, pricing, marketing, access, and negotiations. It can also make the homeowner responsible for work that an agent would ordinarily help coordinate. The right choice depends on the property, your capacity, local market conditions, and the support you choose to retain.</p><div className="content-card-grid content-card-grid--three"><article><Search size={20} /><h3>Marketing and exposure</h3><p>Consider how prospective buyers will find the property, how inquiries will be handled, and whether a listing service or other marketing support is appropriate.</p></article><article><House size={20} /><h3>Preparation and presentation</h3><p>Decide what cleaning, decluttering, repairs, photos, disclosures, and access planning are appropriate before showing the home.</p></article><article><Check size={20} /><h3>Offers and coordination</h3><p>Real estate contracts can include terms beyond price. Consider inspections, contingencies, title, closing, and negotiation support before accepting an offer.</p></article></div><p>A self-managed sale may work for some owners, while a licensed real estate agent or another qualified professional may provide useful market, marketing, negotiation, and transaction support. A direct cash-sale conversation is another option to compare when the home’s condition or your preferred process makes a traditional listing less appealing.</p><div className="content-cta"><h3>Compare your sale options before deciding.</h3><p>Ask us about a direct review, then compare all of your practical paths in light of your own goals.</p><a className="button button--mint" href="/compare-selling-options.html">Compare Selling Options <ArrowRight size={16} /></a></div><p className="legal-note">The information in these articles is general and educational. It is not legal, tax, financial, or real estate advice; local rules and transaction terms vary.</p></ContentSection></ContentPage></>;
}

export function CashSaleBenefitsPage() {
  return <><SEOHead title="Cash Sale Benefits and Tradeoffs | Original Home Buyers" description="Nationwide general information on cash-sale benefits, written offer terms, and questions to consider before selling a house directly." canonicalUrl="https://homebuyers-nationwide.com/cash-sale-benefits.html" keywords={["cash sale benefits", "cash offer for house", "selling house for cash", "direct home sale"]} schema={{ "@context": "https://schema.org", "@type": "FAQPage", mainEntity: [{ "@type": "Question", name: "What is a cash offer for a house?", acceptedAnswer: { "@type": "Answer", text: "A cash offer generally means the buyer is not relying on a conventional purchase mortgage as a contract condition. The written agreement controls the actual price, contingencies, timing, and responsibilities." } }, { "@type": "Question", name: "Does a cash offer guarantee a quick or as-is sale?", acceptedAnswer: { "@type": "Answer", text: "No. Timing, repairs, inspections, title, access, closing coordination, and other terms depend on the property, buyer review, local practices, and the written agreement." } }] }} /><ContentPage eyebrow="SELLING FOR CASH · NATIONWIDE" title="Cash Sale Benefits and Tradeoffs" intro="Use this guide to understand what a direct cash-sale conversation may involve before deciding whether it fits your property and priorities."><ContentSection eyebrow="START WITH THE CONTRACT" title="Cash describes funding, not every transaction term."><p>A cash offer generally means the buyer is not seeking conventional purchase financing as a condition of the sale. It does not automatically determine the purchase price, inspection rights, repair expectations, title work, closing date, possession, or any other responsibility. Those details belong in the written agreement you review before signing.</p><div className="content-card-grid content-card-grid--three"><article><Clock3 size={20} /><h3>Fewer loan-related steps</h3><p>A direct cash buyer may not need conventional buyer-loan approval. Title, documents, property review, and the written agreement can still affect the process.</p></article><article><House size={20} /><h3>Current-condition review</h3><p>A buyer may review a home in its present condition. Whether repairs, credits, inspections, or access are requested depends on the proposed terms.</p></article><article><ShieldCheck size={20} /><h3>Focused communication</h3><p>A direct sale can involve a private property discussion rather than a public listing campaign. Consider whether that tradeoff fits your goals.</p></article></div></ContentSection><ContentSection eyebrow="COMPARE THE TRADEOFFS" title="A direct sale is one option among several." tone="mist"><p>Some homeowners value a direct conversation when repairs, showings, preparation, or public marketing do not fit their situation. Others may prefer to seek broader buyer exposure through a traditional listing or manage a sale independently. The best path can depend on property condition, local demand, title, timing, resources, and your own goals.</p><div className="icon-list"><p><Check size={18} /> Compare the potential price, costs, responsibilities, and risks of each path before deciding.</p><p><Check size={18} /> Ask whether a listing, independent sale, or another approach could better support your priorities.</p><p><Check size={18} /> Seek qualified local legal, tax, financial, title, or real estate guidance for questions specific to your circumstances.</p></div><a className="button button--outline" href="/compare-selling-options.html">Compare Selling Options <ArrowRight size={16} /></a></ContentSection><ContentSection eyebrow="READ EVERY TERM" title="Questions to ask about a direct written offer."><div className="icon-list"><p><Check size={18} /> What is the proposed price, earnest-money arrangement, and closing process?</p><p><Check size={18} /> Does the agreement address inspections, property access, repairs, credits, title, liens, occupancy, and possession clearly?</p><p><Check size={18} /> Are assignments, contingencies, fees, or conditions described in language you understand?</p><p><Check size={18} /> Who will coordinate closing, and what documents or approvals may be needed?</p></div><div className="content-cta"><h3>Discuss the property without an obligation to sell.</h3><p>Original Home Buyers can review your property for a potential direct purchase. Any possible transaction depends on property-specific review and written agreement.</p><a className="button button--mint" href="/#offer-form">Request a Cash Offer <ArrowRight size={16} /></a></div><p className="legal-note">This is general nationwide information, not legal, tax, financial, credit, title, or real estate advice. Terms and requirements vary by property and location.</p></ContentSection></ContentPage></>;
}

export function ContactPage() {
  return <ContentPage eyebrow="CONTACT US" title="Contact Original Home Buyers" intro="Call, email, or submit your property information to speak with our home-buying team."><ContentSection title="Contact Information"><div className="contact-details"><a href="tel:+12404105636"><Phone size={22} /><span><strong>(240) 410-5636</strong><small>Call for a free property review.</small></span></a><a href="mailto:Info@Originalhomebuyers.com"><Mail size={22} /><span><strong>Info@Originalhomebuyers.com</strong><small>Email the home-buying team.</small></span></a><div><MapPin size={22} /><span><strong>3500 W Rogers Ave</strong><small>Baltimore, MD 21215</small></span></div></div></ContentSection><ContentSection eyebrow="REQUEST AN OFFER" title="The fastest way to begin is to submit the property address and your phone number." tone="mist"><p>Share a few details through the free offer form and our team will contact you to discuss the property and your options.</p><a className="button button--mint" href="/#offer-form">Go to Cash Offer Form <ArrowRight size={16} /></a></ContentSection></ContentPage>;
}

export function PrivacyPage() {
  return <ContentPage eyebrow="LEGAL" title="Privacy Policy" intro="This policy describes how Original Home Buyers may collect, use, and safeguard information provided through this website."><ContentSection title="Information We May Collect"><p>We may collect information you provide, such as your name, phone number, email address, property address, property details, preferred timing, and messages. We may also receive limited technical information from your browser or device when you use the website.</p></ContentSection><ContentSection title="How We May Use Information" tone="mist"><p>Information may be used to respond to requests, review a potential property transaction, communicate about the services you request, operate and improve the website, protect against misuse, and comply with applicable obligations. We do not sell your information as part of a property inquiry.</p></ContentSection><ContentSection title="Sharing, Communications, and Choices"><p>We may share information with service providers or professional parties involved in operating the website, responding to your request, or coordinating a possible transaction, when appropriate. If you opt in to calls or text messages, consent is not a condition of purchase; message and data rates may apply, and you may reply STOP to opt out of texts.</p></ContentSection><ContentSection title="Security, Retention, and Your Rights" tone="mist"><p>We use reasonable administrative and technical measures designed to protect information, but no online system is completely secure. We retain information for as long as reasonably necessary for the purposes described here, subject to legal and operational requirements. Depending on where you live, you may have rights to request access, correction, or deletion of certain personal information.</p></ContentSection><ContentSection title="Contact"><p>Questions or privacy requests may be sent to <a className="inline-link" href="mailto:Info@Originalhomebuyers.com">Info@Originalhomebuyers.com</a>.</p><p className="legal-note">This policy should be reviewed by qualified counsel before reliance or publication as a final legal notice.</p></ContentSection></ContentPage>;
}

export function TermsPage() {
  return <ContentPage eyebrow="LEGAL" title="Terms of Use" intro="These terms describe permitted website use, communications consent, and the limits of the information and services described on this website."><ContentSection title="Website Use and Information"><p>You may use this website for lawful personal or business purposes related to learning about Original Home Buyers and requesting information. Website content is general information and is not legal, tax, financial, credit, or real estate advice.</p></ContentSection><ContentSection title="Property Requests and Potential Offers" tone="mist"><p>Submitting information does not guarantee an offer, purchase, price, timeline, or transaction. Any potential property purchase is subject to review, title and other due diligence, written agreement, and applicable closing requirements. Do not rely on website content as a binding offer.</p></ContentSection><ContentSection title="Communications and Acceptable Use"><p>By checking the consent box, you authorize communications described on the form. Consent is not a condition of purchase, and you may reply STOP to opt out of text messages. You may not misuse the website, submit false information, interfere with its operation, or use its content in a way that infringes intellectual-property or other rights.</p></ContentSection><ContentSection title="Changes, Disclaimers, and Contact" tone="mist"><p>We may update website content or these terms from time to time. To the extent permitted by law, the website is provided without warranties of uninterrupted availability or suitability for a particular purpose. Questions may be sent to <a className="inline-link" href="mailto:Info@Originalhomebuyers.com">Info@Originalhomebuyers.com</a>.</p><p className="legal-note">These terms should be reviewed by qualified counsel before reliance or publication as final legal terms.</p></ContentSection></ContentPage>;
}
