/* Reco brand mark + mascot — uses the real logo artwork (assets/reco-mark.png).
   Playfulness comes from MOTION (pop / bob / wiggle), never from redrawing the
   logo, so the mark always stays on-brand.
   Exports: RecoParrot, RecoWordmark, RecoLogomark */

const RECO_MARK = '/assets/reco-mark.png';
const MARK_RATIO = 372 / 354; // h/w of the cropped artwork

// mood: 'happy' (default) | 'sleep' (dimmed, for claimed state)
// idle: gentle continuous bob for hero moments
function RecoParrot({ size = 96, mood = 'happy', idle = false, style = {} }) {
  const dim = mood === 'sleep';
  return (
    <img src={RECO_MARK} alt="Reco" draggable="false"
      className={idle ? 'reco-idle' : undefined}
      style={{
        width: size, height: size * MARK_RATIO, objectFit: 'contain',
        display: 'block', userSelect: 'none',
        filter: dim ? 'grayscale(0.92) brightness(1.05)' : 'none',
        opacity: dim ? 0.78 : 1,
        ...style,
      }} />
  );
}

// Horizontal lockup: parrot mark + "Reco" wordmark
function RecoWordmark({ height = 30, color = 'var(--reco-navy)', style = {} }) {
  return (
    <div style={{ display: 'flex', alignItems: 'center', gap: height * 0.26, ...style }}>
      <RecoParrot size={height * 1.12} />
      <span className="reco-brand" style={{
        fontFamily: 'var(--iv-font-sans)', fontWeight: 700,
        fontSize: height, lineHeight: 1, letterSpacing: '-0.04em', color,
      }}>Reco</span>
    </div>
  );
}

// Parrot mark inside a soft tinted disc (compact chrome)
function RecoLogomark({ size = 40, style = {} }) {
  return (
    <div style={{
      width: size, height: size, borderRadius: 'var(--iv-radius-full)',
      background: 'var(--iv-paper-warmer)', display: 'flex',
      alignItems: 'center', justifyContent: 'center', flexShrink: 0,
      overflow: 'hidden', ...style,
    }}>
      <RecoParrot size={size * 0.66} />
    </div>
  );
}

Object.assign(window, { RecoParrot, RecoWordmark, RecoLogomark });
