// content.jsx, all copy & data for the process site
(function () {
  const SECTIONS = [
    { id: 'overview', label: 'Overview', num: '01' },
    { id: 'journey', label: 'The journey', num: '02' },
    { id: 'brand', label: 'Brand & toolbar', num: '03' },
    { id: 'buttons', label: 'Tool buttons', num: '04' },
    { id: 'sizes', label: 'Pixel sizing', num: '05' },
    { id: 'sprites', label: 'Canvas sprites', num: '06' },
    { id: 'physics', label: 'Physics & growth', num: '07' },
    { id: 'behind', label: 'Behind the scenes', num: '08' },
  ];

  // Tools shown in the button gallery (state-flippable)
  const TOOLS = [
    { id: 'sand',  name: 'Sand',  tint: '#FFDCC0', states: 3, blurb: 'Granular. Falls, then slides into natural piles.' },
    { id: 'water', name: 'Water', tint: '#CFE0FF', states: 3, blurb: 'Fluid. Spreads sideways and seeps through soil.' },
    { id: 'fire',  name: 'Fire',  tint: '#FFD2C2', states: 3, blurb: 'Rises, ignites sand, melts stone, dies into smoke.' },
    { id: 'stone', name: 'Stone', tint: '#E2E2E0', states: 3, blurb: 'Immovable scaffolding, until fire wears it down.' },
    { id: 'sun',   name: 'Sun',   tint: '#FFEFC2', states: 3, blurb: 'Drag onto the canvas to cast a light beam.' },
    { id: 'soil',  name: 'Soil',  tint: '#E7D8C8', states: 3, blurb: 'Fertile ground. Holds water, grows seeds.' },
    { id: 'seed',  name: 'Seed',  tint: '#EFE6C2', states: 3, blurb: 'Flutters down; sprouts a palm with soil + water.' },
    { id: 'human', name: 'Player', tint: '#E4E2F5', states: 3, blurb: 'A character that walks, swims, climbs and flees fire.' },
  ];
  const UTIL_TOOLS = [
    { id: 'wipe',  name: 'Wipe',  tint: '#EDEDED', states: 3, blurb: 'The eraser. Clears any cell back to empty.' },
    { id: 'music', name: 'Music', tint: '#EDEDED', states: 2, blurb: 'Toggles the ambient soundtrack on and off.' },
  ];

  const SIZES = [
    { label: 'XXS', px: 4 }, { label: 'XS', px: 8 }, { label: 'S', px: 12 },
    { label: 'L', px: 16 }, { label: 'XL', px: 20 }, { label: 'XXL', px: 24 },
  ];

  // Canvas sprite families
  const SPRITES = [
    { id: 'sand',  name: 'Sand',  files: ['sand0', 'sand1', 'sand2'], note: '3 variants cycle as you paint so a dune never looks tiled.', color: '#DC8F50' },
    { id: 'water', name: 'Water', files: ['water0', 'water1', 'water2'], note: '3 rotation frames that shimmer on a timer.', color: '#2C7BE5', anim: true },
    { id: 'soil',  name: 'Soil',  files: ['soil0', 'soil1', 'soil2'], note: 'Darker, denser cousin of sand, the growing medium.', color: '#65432B' },
    { id: 'seed',  name: 'Seed',  files: ['seed0', 'seed1', 'seed2'], note: 'Tiny kernels that flutter rather than fall.', color: '#D4BA6A' },
    { id: 'stone', name: 'Stone', files: ['stone0', 'stone1', 'stone2'], note: 'Cool grey blocks with three face variants.', color: '#888780' },
    { id: 'fire',  name: 'Fire',  files: ['fire'], note: 'One sprite, dimmed by remaining life as it burns out.', color: '#F0641E' },
    { id: 'coconut', name: 'Coconut', files: ['coconut0', 'coconut1', 'coconut2'], note: 'Drops from a mature palm, then rolls to rest.', color: '#6B3D1F' },
    { id: 'stem',  name: 'Palm trunk', files: ['stem0', 'stem1', 'stem2'], dir: 'icons', note: 'Brown while young, turns green once tall.', color: '#8a6a3a' },
    { id: 'stemGreen', name: 'Palm (mature)', files: ['stem_green_0', 'stem_green_1', 'stem_green_2'], dir: 'icons', note: 'Swaps in at height 7+ to read as living wood.', color: '#55AF5F' },
  ];

  const VERSIONS = [
    { n: 1, title: 'First grains', file: 'assets/videos/Version1.mp4', hasVideo: true,
      blurb: 'The core falling-sand loop comes alive: a grid, gravity, and sand that piles diagonally. Proof the cellular automaton feels right before any polish.',
      tags: ['Grid + gravity', 'Sand piling', 'Bare canvas'] },
    { n: 2, title: 'Elements & states', file: 'assets/videos/Version2.mp4', hasVideo: true,
      blurb: 'Water, fire and stone join sand. The toolbar gets its three-state button language (default / pressed / selected) and the pixel-art icon cards.',
      tags: ['Water + fire', 'Button states', 'Toolbar'] },
    { n: 3, title: 'Life & light', file: 'assets/videos/Version3.mp4', hasVideo: true,
      blurb: 'Soil, seeds and the seed → palm → coconut growth chain arrive, plus the draggable sunlight beam and full dark mode across every component.',
      tags: ['Growth chain', 'Sunlight beam', 'Dark mode'] },
    { n: 4, title: 'The player', file: 'assets/videos/Version4.mp4', hasVideo: true,
      blurb: 'A human character is dropped into the world, walking, swimming, climbing, tanning in the sun and fleeing from fire. The simulation becomes a place.',
      tags: ['Character', 'Wayfinding AI', 'Polish'] },
  ];

  // Physics rules, plain language
  const PHYSICS = [
    { id: 'sand', name: 'How sand falls', color: '#DC8F50',
      lines: ['Each frame, a grain looks straight down and drops through up to 3 empty cells at once, that little bit of "look-ahead" reads as acceleration.',
               'If the cell below is full, it tries the two diagonals. That single rule is what carves the smooth 45° slopes of a pile.',
               'Sand sitting next to water darkens and cools, a cheap "wet" tint instead of a whole new material.'] },
    { id: 'water', name: 'How water spreads', color: '#2C7BE5',
      lines: ['Water falls like sand, but when blocked it scans up to 3 cells sideways for a gap and slides one step toward it.',
               'The spread is gated at 70% per frame so a poured bucket levels out instead of flash-flooding the screen.',
               'It seeps slowly down through soil (12% chance per frame) so buried seeds can still drink.'] },
    { id: 'fire', name: 'How fire behaves', color: '#F0641E',
      lines: ['Flames drift upward with a little random wobble and a 120-frame lifespan, fading as they burn out.',
               'Touch sand and there is a small chance it ignites, fire spreads organically rather than instantly.',
               'Touch water and the flame is snuffed into a puff of smoke. Sit against stone long enough and the stone dissolves.'] },
    { id: 'growth', name: 'How palms grow', color: '#55AF5F',
      lines: ['A seed that lands next to both soil and water germinates into a palm trunk, consuming one water cell.',
               'The trunk climbs one cell at a time, faster when more water sits nearby, dormant when it is dry.',
               'At height 5 a crown fades in; at height 7 the trunk turns green; mature palms drop coconuts that roll and settle.'] },
  ];

  window.CONTENT = { SECTIONS, TOOLS, UTIL_TOOLS, SIZES, SPRITES, VERSIONS, PHYSICS };
})();
