// Instagram — the last cream panel before the footer in the home hijack stack.
// A static, hand-curated strip (NO live feed, no embed, no third-party script):
// six 3:4 tiles that each link out to the profile, with a hover wash.
//
// Images live in assets/ig/ as 630x840 crops of photos already in assets/. A
// tile with src: null is a labelled tonal placeholder (tone: sand | umber) — a
// gap waiting for its photo.
// IG_HAVE_ASSETS false hides the whole section (HomePage.jsx leaves it out of
// the hijack stack, so no empty panel).
const IG_URL = "https://instagram.com/nourrir.life";
const IG_HAVE_ASSETS = true;
const IG_TILES = [
  { n: "01", label: "Polaroids",       src: null, tone: "sand" },
  { n: "02", label: "Stacked tasting", src: "assets/ig/04.jpg", alt: "Rows of sealed trays, each banded with the name of its dish." },
  { n: "03", label: "Collage",         src: null, tone: "umber" },
  { n: "04", label: "Sauce pour",      src: "assets/ig/01.jpg", alt: "Sauce poured over sea bass and rice in a kraft box." },
  { n: "05", label: "Two eating",      src: "assets/ig/02.jpg", alt: "Two friends laughing over their plates at a round table." },
  { n: "06", label: "Plated fish",     src: "assets/ig/06.jpg", alt: "Glazed salmon on noodles and snow peas, plated." },
];

function Instagram() {
  if (!IG_HAVE_ASSETS) return null;
  return (
    <section className="ig snap-panel" data-screen-label="Instagram">
      <div className="ig__inner">
        <span className="ig__eyebrow">Follow us on Instagram</span>
        <a className="ig__handle" href={IG_URL} target="_blank" rel="noopener">@nourrir.life</a>
        <div className="ig__row">
          {IG_TILES.map((t) => (
            <a className="ig__tile" key={t.n} href={IG_URL} target="_blank" rel="noopener"
               aria-label={`View on Instagram — ${t.label}`}>
              {t.src
                ? <img className="ig__img" src={t.src} alt={t.alt} loading="lazy"/>
                : <span className={"ig__ph ig__ph--" + t.tone}><span>{t.label}</span></span>}
              <span className="ig__wash"><span>View on<br/>Instagram</span></span>
            </a>
          ))}
        </div>
        <a className="btn btn--ghost ig__follow" href={IG_URL} target="_blank" rel="noopener">Follow @nourrir.life &rarr;</a>
      </div>
    </section>
  );
}
window.Instagram = Instagram;
window.IG_HAVE_ASSETS = IG_HAVE_ASSETS;
