// Content data — kept separate so it's easy to migrate to Astro content collections.
// In Astro: move each array into src/content/{collection}/*.md or a data.ts file.

const PILLARS = [
  { id: "tv",     kind: "Televisión",  count: 48, label: "Comerciales, noticieros, telenovelas." },
  { id: "print",  kind: "Impresos",    count: 63, label: "Avisos, portadas, postales." },
  { id: "places", kind: "Lugares",     count: 31, label: "Fotografías y postales de ciudades." },
  { id: "sound",  kind: "Sonido",      count: 24, label: "Jingles y cuñas de radio." },
];

const DECADES = ["1950s", "1960s", "1970s", "1980s", "1990s"];

// Illustration hotspots — positions are % of the illustration bounding box.
// `youtube` = YouTube video id to embed in the CRT modal.
const HOTSPOTS = [
  {
    id: "avila",
    title: "El Ávila",
    place: "Caracas · Cordillera de la Costa",
    year: "ca. 1972",
    kind: "Postal fotográfica",
    x: 58, y: 18,
    blurb: "Nuestro imponente guardián natural. Visto desde Plaza Venezuela en una tarde de verano.",
    youtube: "Qy4dPzRQFXM",
    era: "1970s",
    category: "places",
  },
  {
    id: "distribuidor",
    title: "Distribuidor Altamira",
    place: "Caracas · Autopista Francisco Fajardo",
    year: "1967",
    kind: "Noticiero · archivo",
    x: 76, y: 62,
    blurb: "La modernidad venezolana en concreto. Curvas que conectan una ciudad que nunca dormía.",
    youtube: "Qy4dPzRQFXM",
    era: "1960s",
    category: "places",
  },
  {
    id: "savoy",
    title: "Chocolates Savoy",
    place: "Caracas · Los Dos Caminos",
    year: "1965",
    kind: "Comercial de televisión",
    x: 12, y: 30,
    blurb: "El letrero rojo sobre la autopista. Un sabor que definió generaciones venezolanas.",
    youtube: "Qy4dPzRQFXM",
    era: "1960s",
    category: "tv",
  },
  {
    id: "teresa-carreno",
    title: "Teatro Teresa Carreño",
    place: "Caracas · Los Caobos",
    year: "1983",
    kind: "Inauguración · archivo",
    x: 42, y: 70,
    blurb: "Escenario de talento y orgullo nacional. La noche que abrió sus puertas al país.",
    youtube: "Qy4dPzRQFXM",
    era: "1980s",
    category: "places",
  },
  {
    id: "catedral",
    title: "Catedral de Caracas",
    place: "Caracas · Casco Histórico",
    year: "ca. 1958",
    kind: "Fotografía",
    x: 20, y: 55,
    blurb: "Testigo de siglos de nuestra historia. Las campanas que marcaron el ritmo del centro.",
    youtube: "Qy4dPzRQFXM",
    era: "1950s",
    category: "places",
  },
  {
    id: "teleferico",
    title: "Teleférico de Caracas",
    place: "Mácuto ↔ El Ávila",
    year: "1956",
    kind: "Noticiero",
    x: 8, y: 80,
    blurb: "Una vista única que nos eleva. Inaugurado por Pérez Jiménez, símbolo de una era.",
    youtube: "Qy4dPzRQFXM",
    era: "1950s",
    category: "places",
  },
  {
    id: "parque-este",
    title: "Parque del Este",
    place: "Caracas · Los Palos Grandes",
    year: "1961",
    kind: "Aviso impreso",
    x: 68, y: 28,
    blurb: "Un rincón verde para la familia caraqueña. Diseñado por Burle Marx.",
    youtube: "Qy4dPzRQFXM",
    era: "1960s",
    category: "print",
  },
  {
    id: "sabana-grande",
    title: "Sabana Grande",
    place: "Caracas · Boulevard",
    year: "1979",
    kind: "Fotografía · revista",
    x: 90, y: 40,
    blurb: "El corazón comercial y multicultural. Cafés, librerías, y el bullicio de una ciudad viva.",
    youtube: "Qy4dPzRQFXM",
    era: "1970s",
    category: "print",
  },
];

// Archive grid — video/image items organized by decade
const ARCHIVE = [
  { id: "a1", era: "1950s", category: "places", title: "Teleférico inaugurado", source: "Noticiero Nacional", duration: "2:14", tone: "sky",    youtube: "Qy4dPzRQFXM" },
  { id: "a2", era: "1950s", category: "print",  title: "Polar · cerveza nacional", source: "Revista Élite", duration: "Impreso", tone: "ochre", youtube: "Qy4dPzRQFXM" },
  { id: "a3", era: "1960s", category: "tv",     title: "Savoy · un instante de dulzura", source: "RCTV", duration: "0:58", tone: "accent", youtube: "Qy4dPzRQFXM" },
  { id: "a4", era: "1960s", category: "places", title: "Distribuidor Altamira", source: "Postal VIASA", duration: "Foto", tone: "ivy",   youtube: "Qy4dPzRQFXM" },
  { id: "a5", era: "1970s", category: "tv",     title: "Harina P.A.N. · así se hace", source: "VTV", duration: "1:12", tone: "ochre", youtube: "Qy4dPzRQFXM" },
  { id: "a6", era: "1970s", category: "print",  title: "Concord · el carro del año", source: "Auto Mundial", duration: "Impreso", tone: "accent", youtube: "Qy4dPzRQFXM" },
  { id: "a7", era: "1980s", category: "tv",     title: "Pepsi · la generación siente", source: "Venevisión", duration: "1:00", tone: "sky",  youtube: "Qy4dPzRQFXM" },
  { id: "a8", era: "1980s", category: "places", title: "Teresa Carreño · apertura", source: "Archivo RCTV", duration: "3:42", tone: "ivy", youtube: "Qy4dPzRQFXM" },
  { id: "a9", era: "1990s", category: "tv",     title: "Maltín Polar · inspiración", source: "Venevisión", duration: "0:45", tone: "accent", youtube: "Qy4dPzRQFXM" },
  { id: "a10", era: "1990s", category: "print", title: "CANTV · llamadas larga distancia", source: "Diario El Universal", duration: "Impreso", tone: "ochre", youtube: "Qy4dPzRQFXM" },
  { id: "a11", era: "1990s", category: "tv",    title: "Cafea · la pausa perfecta", source: "Televen", duration: "0:30", tone: "ivy", youtube: "Qy4dPzRQFXM" },
  { id: "a12", era: "1970s", category: "places", title: "Sabana Grande al atardecer", source: "Revista Momento", duration: "Foto", tone: "sky", youtube: "Qy4dPzRQFXM" },
];

const MARQUEE_ITEMS = [
  "48 comerciales",
  "·",
  "63 impresos",
  "·",
  "31 postales",
  "·",
  "desde 1952",
  "·",
  "archivo ciudadano",
  "·",
  "Caracas · Maracaibo · Valencia",
  "·",
  "cine · radio · televisión",
  "·",
];

// ── Hero "Pieza del día" — rotates once per day (deterministic by UTC date)
// Edit titles / years / blurbs freely; `id` is the YouTube video id.
const HERO_VIDEOS = [
  { id: "B2yoL4_vBHc", title: "Pieza № 01", year: "Archivo", duration: "",
    blurb: "Fragmento del archivo audiovisual venezolano, recuperado para este atlas." },
  { id: "YguIGwGRYTU", title: "Pieza № 02", year: "Archivo", duration: "",
    blurb: "Memoria viva en movimiento — imagen rescatada de los años del país que fuimos." },
  { id: "cf0bkNGpaek", title: "Pieza № 03", year: "Archivo", duration: "",
    blurb: "Un instante de la Venezuela cotidiana, conservado en cinta y devuelto a la luz." },
  { id: "GK3se10r8tw", title: "Pieza № 04", year: "Archivo", duration: "",
    blurb: "Registro de época — un testimonio visual del país de ayer." },
  { id: "1lyDQAssdvQ", title: "Pieza № 05", year: "Archivo", duration: "",
    blurb: "Pieza del archivo ciudadano, seleccionada para la rotación diaria." },
  { id: "WkNxe8ClC5s", title: "Pieza № 06", year: "Archivo", duration: "",
    blurb: "Otra pieza del atlas afectivo — la memoria contada cuadro por cuadro." },
];

// Deterministic "video of the day" — rotates at UTC midnight.
function pickHeroVideo() {
  const d = new Date();
  const dayIndex = Math.floor(Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate()) / 86400000);
  return HERO_VIDEOS[dayIndex % HERO_VIDEOS.length];
}

Object.assign(window, { PILLARS, DECADES, HOTSPOTS, ARCHIVE, MARQUEE_ITEMS, HERO_VIDEOS, pickHeroVideo });
