// Static data for poster studio.

const SIZES = {
  A1: { w: 594, h: 841, label: "A1" },
  A2: { w: 420, h: 594, label: "A2" },
  A3: { w: 297, h: 420, label: "A3" },
  A4: { w: 210, h: 297, label: "A4" },
  Custom: { w: 297, h: 420, label: "Custom" },
};

// Curated font list, mixing condensed display + slab serif
const FONTS = [
  { id: "anton", label: "Anton", css: '"Anton", sans-serif', kind: "Condensed", weight: 400 },
  { id: "bebas", label: "Bebas Neue", css: '"Bebas Neue", sans-serif', kind: "Condensed", weight: 400 },
  { id: "oswald", label: "Oswald", css: '"Oswald", sans-serif', kind: "Condensed", weight: 700 },
  { id: "barlow", label: "Barlow Condensed", css: '"Barlow Condensed", sans-serif', kind: "Condensed", weight: 900 },
  { id: "robotoc", label: "Roboto Condensed", css: '"Roboto Condensed", sans-serif', kind: "Condensed", weight: 700 },
  { id: "bigshoulders", label: "Big Shoulders", css: '"Big Shoulders Display", sans-serif', kind: "Condensed", weight: 900 },
  { id: "archivo", label: "Archivo Black", css: '"Archivo Black", sans-serif', kind: "Heavy", weight: 400 },
  { id: "bowlby", label: "Bowlby One", css: '"Bowlby One", sans-serif', kind: "Heavy", weight: 400 },
  { id: "alfaslab", label: "Alfa Slab One", css: '"Alfa Slab One", serif', kind: "Slab", weight: 400 },
  { id: "robotoslab", label: "Roboto Slab", css: '"Roboto Slab", serif', kind: "Slab", weight: 900 },
  { id: "zilla", label: "Zilla Slab", css: '"Zilla Slab", serif', kind: "Slab", weight: 900 },
  { id: "dmserif", label: "DM Serif Display", css: '"DM Serif Display", serif', kind: "Serif", weight: 400 },
  { id: "playfair", label: "Playfair Display", css: '"Playfair Display", serif', kind: "Serif", weight: 900 },
];

const BODY_FONTS = [
  { id: "inter", label: "Inter", css: '"Inter", sans-serif' },
  { id: "robotoc", label: "Roboto Condensed", css: '"Roboto Condensed", sans-serif' },
  { id: "robotoslab", label: "Roboto Slab", css: '"Roboto Slab", serif' },
  { id: "zilla", label: "Zilla Slab", css: '"Zilla Slab", serif' },
  { id: "mono", label: "JetBrains Mono", css: '"JetBrains Mono", monospace' },
];

// Palettes: bg, ink (lyric body), accent (hero word), muted (pattern primary), highlight (pattern secondary)
// Role logic: ink = high contrast vs bg; accent = saturated, pops on bg;
// muted = low-contrast tone vs bg (patterns stay behind text); highlight = complementary mid-tone.
const PALETTES = {
  // --- Warm ---
  belter: {
    label: "Belter", group: "Warm",
    bg: "#efece1", ink: "#1c1c1c", accent: "#c8262a", muted: "#9a9a9c", highlight: "#d8a3a4",
  },
  earth: {
    label: "Terracotta", group: "Warm",
    bg: "#f3e9dc", ink: "#33261a", accent: "#c1502e", muted: "#e3d0b9", highlight: "#8f9a6b",
  },
  mustard: {
    label: "Mustard", group: "Warm",
    bg: "#f7ecd2", ink: "#322508", accent: "#c98212", muted: "#ead9b0", highlight: "#59683f",
  },
  clay: {
    label: "Clay", group: "Warm",
    bg: "#f6e3da", ink: "#44241c", accent: "#a4443a", muted: "#eccfc2", highlight: "#6c8577",
  },
  peach: {
    label: "Peach", group: "Warm",
    bg: "#fdeee2", ink: "#41281a", accent: "#e07242", muted: "#f4d9c2", highlight: "#5d7d6e",
  },
  butter: {
    label: "Butter", group: "Warm",
    bg: "#f9efc7", ink: "#3d2f0e", accent: "#e0a81c", muted: "#f0e0a4", highlight: "#8a6d1f",
  },
  cherry: {
    label: "Cherry", group: "Warm",
    bg: "#f7e8e4", ink: "#2b1214", accent: "#b31b2c", muted: "#eccfc8", highlight: "#5d2a30",
  },
  mocha: {
    label: "Mocha", group: "Warm",
    bg: "#ece1d4", ink: "#2e2018", accent: "#8a5a3c", muted: "#d8c6b2", highlight: "#4f3a2a",
  },
  linen: {
    label: "Linen", group: "Warm",
    bg: "#f1ebe0", ink: "#35302a", accent: "#9c5b38", muted: "#e4dbcb", highlight: "#6b7d6a",
  },
  jukebox: {
    label: "Jukebox", group: "Warm",
    bg: "#f4e7d4", ink: "#4a1f24", accent: "#7d2a35", muted: "#e8d3b8", highlight: "#93b3c4",
  },
  // --- Cool ---
  canter: {
    label: "Canter", group: "Cool",
    bg: "#0f5b62", ink: "#cfe6e0", accent: "#f7c63a", muted: "#1a767e", highlight: "#08373c",
  },
  ocean: {
    label: "Ocean", group: "Cool",
    bg: "#e8f0f3", ink: "#0a2a3a", accent: "#0a6a8a", muted: "#7da4b3", highlight: "#e8a23a",
  },
  slate: {
    label: "Slate", group: "Cool",
    bg: "#e9ebf1", ink: "#20263a", accent: "#3d55a8", muted: "#d6dae6", highlight: "#c2762b",
  },
  mint: {
    label: "Mint", group: "Cool",
    bg: "#e9f2e8", ink: "#1f3526", accent: "#2e7d52", muted: "#d4e5cf", highlight: "#d8843a",
  },
  powder: {
    label: "Powder", group: "Cool",
    bg: "#f1edf7", ink: "#322a44", accent: "#6a4fa3", muted: "#e2dbee", highlight: "#c2806b",
  },
  blush: {
    label: "Blush", group: "Cool",
    bg: "#f7e9e6", ink: "#3a3b2e", accent: "#7c9270", muted: "#eed6d0", highlight: "#c98a92",
  },
  chrome: {
    label: "Chrome", group: "Cool",
    bg: "#e8eaee", ink: "#1b1e26", accent: "#3a55d9", muted: "#c9cdd8", highlight: "#8d94a6",
  },
  patina: {
    label: "Patina", group: "Cool",
    bg: "#eaefec", ink: "#25332f", accent: "#5f8d84", muted: "#d5e0da", highlight: "#b06a4a",
  },
  // --- Dark ---
  forest: {
    label: "Forest", group: "Dark",
    bg: "#1a2a1a", ink: "#e0ead0", accent: "#c4a83a", muted: "#3a5a3a", highlight: "#e88a3a",
  },
  midnight: {
    label: "Midnight", group: "Dark",
    bg: "#10182b", ink: "#dfe6f2", accent: "#f0b429", muted: "#1e2b4a", highlight: "#46639c",
  },
  neon: {
    label: "Neon", group: "Dark",
    bg: "#0c0e12", ink: "#e8e8e8", accent: "#c8f04a", muted: "#1d2330", highlight: "#39455c",
  },
  ember: {
    label: "Ember", group: "Dark",
    bg: "#16110d", ink: "#ecdfd0", accent: "#e0662e", muted: "#2a211a", highlight: "#8c5a3a",
  },
  plum: {
    label: "Plum", group: "Dark",
    bg: "#211425", ink: "#eee2ef", accent: "#e0a33c", muted: "#38243e", highlight: "#8a5a96",
  },
  academia: {
    label: "Academia", group: "Dark",
    bg: "#1c2620", ink: "#e8dfc8", accent: "#a83244", muted: "#2c3a30", highlight: "#b08d3f",
  },
  dusk: {
    label: "Dusk", group: "Dark",
    bg: "#241f33", ink: "#efe6f2", accent: "#e88aa0", muted: "#352c4a", highlight: "#7a6aa8",
  },
  glow: {
    label: "Glow", group: "Dark",
    bg: "#0b0b14", ink: "#f2f0fa", accent: "#ff5fa2", muted: "#1c1c2e", highlight: "#4de3e0",
  },
  // --- Print ---
  bw: {
    label: "Mono", group: "Print",
    bg: "#f4f4f2", ink: "#0a0a0a", accent: "#0a0a0a", muted: "#7a7a7a", highlight: "#cfcfcf",
  },
  paper: {
    label: "Paper", group: "Print",
    bg: "#f6f1e7", ink: "#1a1a1a", accent: "#1a1a1a", muted: "#8a8780", highlight: "#c0bba9",
  },
  riso: {
    label: "Riso", group: "Print",
    bg: "#f6f1e8", ink: "#20337f", accent: "#f04e6e", muted: "#e9dfcd", highlight: "#f3b53a",
  },
  bauhaus: {
    label: "Bauhaus", group: "Print",
    bg: "#f2ecdd", ink: "#141414", accent: "#d33a2c", muted: "#e3dac4", highlight: "#2a4fa3",
  },
  pop: {
    label: "Pop", group: "Print",
    bg: "#fdf3da", ink: "#1c1c1c", accent: "#e8447a", muted: "#f2e2b8", highlight: "#2f9e8f",
  },
  zine: {
    label: "Zine", group: "Print",
    bg: "#efede6", ink: "#111111", accent: "#d42a1e", muted: "#b9b5aa", highlight: "#3a3a3a",
  },
};

const PALETTE_GROUPS = ["Warm", "Cool", "Dark", "Print"];

const PATTERNS = [
  { id: "none", label: "None" },
  { id: "stripes", label: "Stripes" },
  { id: "bands", label: "Bands" },
  { id: "dots", label: "Dots" },
  { id: "halftone", label: "Halftone" },
  { id: "grid", label: "Grid" },
  { id: "checker", label: "Checker" },
  { id: "triangles", label: "Triangles" },
  { id: "crosses", label: "Crosses" },
  { id: "scales", label: "Scales" },
  { id: "arcs", label: "Arcs" },
  { id: "rays", label: "Rays" },
  { id: "wave", label: "Waves" },
  { id: "aura", label: "Aura" },
];

const LAYOUTS = [
  { id: "centered", label: "Centered Hero" },
  { id: "stamped", label: "Stamped" },
  { id: "stack", label: "Stacked Letters" },
  { id: "repeat", label: "Word Pattern" },
  { id: "bleed", label: "Bleed" },
  { id: "split", label: "Split" },
  { id: "tower", label: "Tower" },
  { id: "tape", label: "Tape" },
  { id: "marquee", label: "Marquee" },
  { id: "echo", label: "Outline Echo" },
  { id: "spine", label: "Spine" },
  { id: "ransom", label: "Ransom" },
  { id: "ticket", label: "Ticket" },
  { id: "tracklist", label: "Tracklist" },
  { id: "swiss", label: "Swiss" },
  { id: "contour", label: "Contour" },
  { id: "wavy", label: "Wave Text" },
  { id: "player", label: "Player" },
  { id: "soundwave", label: "Soundwave" },
  { id: "receipt", label: "Receipt" },
  { id: "vinyl", label: "Vinyl" },
  { id: "lineup", label: "Lineup" },
  { id: "typewriter", label: "Typewriter" },
  { id: "neon", label: "Neon Sign" },
];

// Sample starter content — an ORIGINAL demo lyric written for this project.
// Never ship copyrighted song lyrics as sample/marketing content.
const SAMPLE = {
  hero: "wildfire",
  blocks: [
    { id: "b1", text: "We lit the radio on fire\nSang until the streetlights died\nEvery word a little braver\nWith you swaying at my side\nHalf the town was fast asleep\nAnd the other half was ours\nWe were loud enough for both\nSinging up at parked-out cars" },
    { id: "b2", text: "You could start a riot smiling\nTurn the rain to confetti skies\nI've been humming you for hours\nThere's a chorus in your eyes\nEvery record in the attic\nEvery tape we wore to thread\nStill plays quieter than you do\nSpinning circles in my head" },
    { id: "b3", text: "If the morning never finds us\nWe can stay right where we are\nKeep the record spinning slowly\nCount the static like it's stars\nAnd if someone asks tomorrow\nWhat the noise was all about\nTell them two fools found a chorus\nAnd they couldn't sing it out" },
  ],
};

// Expose
Object.assign(window, { SIZES, FONTS, BODY_FONTS, PALETTES, PALETTE_GROUPS, PATTERNS, LAYOUTS, SAMPLE });
