// Inline SVG logos as React components — bypasses <img> styling issues.

// Real logo image components (uses the brand PNGs)
function UCreativeLogoImg({ theme = "light", height = 40, style = {} }) {
  const src = theme === "dark" ? "assets/logos/uc-creative-light.png" : "assets/logos/uc-creative-dark.png";
  return (
    <img src={src} alt="UCreativeMedia — Design that moves"
      style={{ height, width: "auto", display: "block", ...style }} />
  );
}

// Brand colors for the multi-color feather tail
const FEATHER = {
  yellow: "#f7c500",
  purple: "#6b27a6",
  orange: "#ee6a26",
  green:  "#00bf7a",
};

function UCreativeMark({ color = "currentColor", size = 60, monochrome = false }) {
  // The peacock mark with multi-color feather tail.
  // monochrome=true paints everything in `color` (for subtle backgrounds).
  const fyellow = monochrome ? color : FEATHER.yellow;
  const fpurple = monochrome ? color : FEATHER.purple;
  const forange = monochrome ? color : FEATHER.orange;
  const fgreen  = monochrome ? color : FEATHER.green;
  return (
    <svg viewBox="0 0 320 280" width={size} height={(size * 280) / 320} xmlns="http://www.w3.org/2000/svg" aria-label="UCreativeMedia">
      {/* Peacock body + neck + head (black/color) */}
      <g fill={color}>
        <path d="M125.77,264.7c-20.06-7.79-26.12-31.93-27.29-36.6-11.27-44.92,32.07-72.1,17.02-108.48-.52-1.26-9.76-22.92-26.08-24.31-6.91-.59-17.18,1.85-21.66,9.72-1.8,3.16-2.17,6.33-2.21,8.4-1.91,1.51-4.69,4.08-7.07,7.96-2.46,4-3.5,7.74-3.98,10.17,5.84-4.84,11.35-7.43,15.03-8.84,5.86-2.24,10.94-4.19,16.8-2.65,3.68,1.24,8.63,3.61,11.49,8.4,11.56,19.38-29.81,47.26-28.1,89.8.09,2.24,1.7,31.44,23.9,48.3,22.71,17.25,60.67,16.82,76.91-2.21,4.11-4.82,6.18-10.03,7.29-14.06-1.28,1.15-27.38,23.99-52.05,14.41ZM82.35,110.34c-2.69,0-4.86-2.17-4.86-4.86s2.17-4.86,4.86-4.86,4.86,2.17,4.86,4.86-2.17,4.86-4.86,4.86Z"/>
        <path d="M232.87,137.66c7.62-36.46-7.28-60.64,7.66-80.79,7.98-10.76,20.73-15.31,31.61-17.39-18.08-8.86-38.7-8.35-52.63,2.36-21.6,16.6-15.94,49.14-14.92,54.98,2.07,11.88,5.87,14.45,9.43,25.92,4.13,13.32,6.39,33.66-3.93,62.84,8.2-10.57,18.34-26.67,22.78-47.91Z"/>
        <path d="M89.64,90.2c.95-4.86,3.21-7.88,4.42-9.28,1.11-1.28,6.18-6.77,11.49-5.75.6.12,2.77.53,3.54,2.21.66,1.43.07,3.29-.88,4.42-2.05,2.43-5.41,1.06-9.72,2.21-2.31.61-5.51,2.11-8.84,6.19Z"/>
        <path d="M101.24,91.76c2.68-4.16,5.89-6.14,7.53-6.99,1.51-.78,8.24-4.01,12.8-1.1.51.33,2.37,1.52,2.47,3.36.08,1.57-1.15,3.08-2.45,3.78-2.8,1.5-5.42-1.01-9.85-1.54-2.37-.28-5.9-.07-10.5,2.49Z"/>
        <path d="M107.41,99.72c3.86-3.1,7.54-3.95,9.37-4.24,1.68-.26,9.09-1.18,12.49,3.03.38.47,1.77,2.19,1.28,3.97-.42,1.52-2.07,2.56-3.53,2.81-3.13.53-4.82-2.68-8.85-4.59-2.16-1.02-5.57-1.94-10.75-.98Z"/>
      </g>
      {/* Tail feathers — from top to bottom: yellow, purple, orange, green */}
      <path fill={fyellow} d="M239.15,86.6c-.02-.12-.06-.3-.1-.52-.54-3.04-2.27-12.76,1.67-22.26,5.02-12.09,16.4-17.01,18.85-18.07,4.77-2.06,11.78-5.09,19.64-2.36,11.04,3.84,14.54,15.86,14.92,17.28-3.15-1.58-8.99-3.98-16.5-3.93-13.69.1-22.82,8.33-25.92,11-3.11,2.67-8.95,8.52-12.57,18.85Z"/>
      <path fill={fpurple} d="M240.02,107.92c-.57-4.33-1.71-17.42,6.46-29.57,7.42-11.04,21.33-19.57,34.84-17.68.34.05.65.1.65.1,2.21.43,5.75,1.41,9.4,3.85.33.22,3.9,2.66,6.21,5.94,6.11,8.69,1.75,21,1.26,22.33-4-2.14-12.45-5.93-23.56-5.5-3.73.15-15.44.77-25.92,9.43-4.77,3.94-7.69,8.23-9.34,11.1Z"/>
      <path fill={forange} d="M238.4,131.52c-.22-3.69-.68-18.27,9.52-28.73,13.98-14.34,41.54-14.38,48.56-2.83,1.11,1.83,3.86,7.48-.79,18.85-3.67-2.36-12.44-7.27-24.35-7.07-4.12.07-13.04.43-21.79,6.56-6.16,4.32-9.49,9.84-11.16,13.22Z"/>
      <path fill={fgreen} d="M212.43,185.57c4.41-5.28,7.75-10.17,10.21-14.14,2.07-3.34,5.05-8.19,7.85-14.92,2.95-7.06,3.39-10.4,4.71-14.14,1.88-5.3,12.05-23.95,31.42-26.71,12.81-1.82,22.98,4.18,26.5,6.49-5.46,1.08-13.4,3.28-21.96,8.15-6.93,3.95-11.5,7.98-12.4,8.92-10.53,10.98-9.78,22.43-22.08,33.84-8.23,7.63-17.66,10.92-24.26,12.51Z"/>
    </svg>
  );
}

function UCreativeWordmark({ color = "#1f1f1f", tagline = "#00bf7a", size = 200, layout = "full", monochrome = false }) {
  const fyellow = monochrome ? color : FEATHER.yellow;
  const fpurple = monochrome ? color : FEATHER.purple;
  const forange = monochrome ? color : FEATHER.orange;
  const fgreen  = monochrome ? color : FEATHER.green;
  const h = layout === "full" ? (size * 319) / 536 : (size * 280) / 536;
  return (
    <svg viewBox={layout === "full" ? "0 0 536 319" : "0 0 536 280"} width={size} height={h} xmlns="http://www.w3.org/2000/svg" aria-label="UCreativeMedia">
      {/* Peacock body */}
      <g fill={color}>
        <path d="M125.77,264.7c-20.06-7.79-26.12-31.93-27.29-36.6-11.27-44.92,32.07-72.1,17.02-108.48-.52-1.26-9.76-22.92-26.08-24.31-6.91-.59-17.18,1.85-21.66,9.72-1.8,3.16-2.17,6.33-2.21,8.4-1.91,1.51-4.69,4.08-7.07,7.96-2.46,4-3.5,7.74-3.98,10.17,5.84-4.84,11.35-7.43,15.03-8.84,5.86-2.24,10.94-4.19,16.8-2.65,3.68,1.24,8.63,3.61,11.49,8.4,11.56,19.38-29.81,47.26-28.1,89.8.09,2.24,1.7,31.44,23.9,48.3,22.71,17.25,60.67,16.82,76.91-2.21,4.11-4.82,6.18-10.03,7.29-14.06-1.28,1.15-27.38,23.99-52.05,14.41ZM82.35,110.34c-2.69,0-4.86-2.17-4.86-4.86s2.17-4.86,4.86-4.86,4.86,2.17,4.86,4.86-2.17,4.86-4.86,4.86Z"/>
        <path d="M232.87,137.66c7.62-36.46-7.28-60.64,7.66-80.79,7.98-10.76,20.73-15.31,31.61-17.39-18.08-8.86-38.7-8.35-52.63,2.36-21.6,16.6-15.94,49.14-14.92,54.98,2.07,11.88,5.87,14.45,9.43,25.92,4.13,13.32,6.39,33.66-3.93,62.84,8.2-10.57,18.34-26.67,22.78-47.91Z"/>
        <path d="M89.64,90.2c.95-4.86,3.21-7.88,4.42-9.28,1.11-1.28,6.18-6.77,11.49-5.75.6.12,2.77.53,3.54,2.21.66,1.43.07,3.29-.88,4.42-2.05,2.43-5.41,1.06-9.72,2.21-2.31.61-5.51,2.11-8.84,6.19Z"/>
        <path d="M101.24,91.76c2.68-4.16,5.89-6.14,7.53-6.99,1.51-.78,8.24-4.01,12.8-1.1.51.33,2.37,1.52,2.47,3.36.08,1.57-1.15,3.08-2.45,3.78-2.8,1.5-5.42-1.01-9.85-1.54-2.37-.28-5.9-.07-10.5,2.49Z"/>
        <path d="M107.41,99.72c3.86-3.1,7.54-3.95,9.37-4.24,1.68-.26,9.09-1.18,12.49,3.03.38.47,1.77,2.19,1.28,3.97-.42,1.52-2.07,2.56-3.53,2.81-3.13.53-4.82-2.68-8.85-4.59-2.16-1.02-5.57-1.94-10.75-.98Z"/>
      </g>
      {/* Feathers */}
      <path fill={fyellow} d="M239.15,86.6c-.02-.12-.06-.3-.1-.52-.54-3.04-2.27-12.76,1.67-22.26,5.02-12.09,16.4-17.01,18.85-18.07,4.77-2.06,11.78-5.09,19.64-2.36,11.04,3.84,14.54,15.86,14.92,17.28-3.15-1.58-8.99-3.98-16.5-3.93-13.69.1-22.82,8.33-25.92,11-3.11,2.67-8.95,8.52-12.57,18.85Z"/>
      <path fill={fpurple} d="M240.02,107.92c-.57-4.33-1.71-17.42,6.46-29.57,7.42-11.04,21.33-19.57,34.84-17.68.34.05.65.1.65.1,2.21.43,5.75,1.41,9.4,3.85.33.22,3.9,2.66,6.21,5.94,6.11,8.69,1.75,21,1.26,22.33-4-2.14-12.45-5.93-23.56-5.5-3.73.15-15.44.77-25.92,9.43-4.77,3.94-7.69,8.23-9.34,11.1Z"/>
      <path fill={forange} d="M238.4,131.52c-.22-3.69-.68-18.27,9.52-28.73,13.98-14.34,41.54-14.38,48.56-2.83,1.11,1.83,3.86,7.48-.79,18.85-3.67-2.36-12.44-7.27-24.35-7.07-4.12.07-13.04.43-21.79,6.56-6.16,4.32-9.49,9.84-11.16,13.22Z"/>
      <path fill={fgreen} d="M212.43,185.57c4.41-5.28,7.75-10.17,10.21-14.14,2.07-3.34,5.05-8.19,7.85-14.92,2.95-7.06,3.39-10.4,4.71-14.14,1.88-5.3,12.05-23.95,31.42-26.71,12.81-1.82,22.98,4.18,26.5,6.49-5.46,1.08-13.4,3.28-21.96,8.15-6.93,3.95-11.5,7.98-12.4,8.92-10.53,10.98-9.78,22.43-22.08,33.84-8.23,7.63-17.66,10.92-24.26,12.51Z"/>
      {/* Creative text */}
      <text x="115" y="246" fontFamily="Quicksand, sans-serif" fontWeight="800" fontSize="92" fill={color} letterSpacing="-1">Creative</text>
      {/* Tagline */}
      {layout === "full" && (
        <text x="186" y="276" fontFamily="Quicksand, sans-serif" fontWeight="700" fontSize="22" fill={tagline} letterSpacing="4">DESIGN THAT MOVES</text>
      )}
    </svg>
  );
}

function UniverseLogo({ color = "#1f1f1f", accent = "#00bf7a", size = 280, withText = true }) {
  // "U" with three orbiting dots, then UNIVERSE / OF / CONTENT text on the right
  const w = withText ? 622 : 300;
  const h = withText ? (size * 254) / 622 : (size * 254) / 300;
  return (
    <svg viewBox={withText ? "0 0 622.19 254" : "0 0 300 254"} width={size} height={h} xmlns="http://www.w3.org/2000/svg" aria-label="Universe of Content">
      <g fill={color}>
        <path d="M75.41,103.54l39.37-32.77.81,81.67c.11,10.95,3.81,22.1,10.26,30.56,12.27,16.11,42.33,17.02,57.17,4.82,9.77-8.03,14.82-20.83,14.85-33.8l.16-70.54c.02-8.88-1.97-17.58-7.26-24.62-7.78-10.35-24.04-6.96-19.05-13.62l60.83-.04.25,3.48c.13,1.75-16.64,1.44-22.7,17.13-2.49,6.45-3.93,13.87-3.95,21.06l-.14,64.97c-.05,24.21-12.66,46.49-36.55,53.34-19.98,5.73-40.93,4.59-60.19-3.26-19.81-8.08-33.02-26.26-33.27-47.93l-.59-50.46Z"/>
        <path d="M52.04,111.1l14.2-21.68c6-9.16,7.59-20.34,2.49-30.42s-18.03-6.93-14.55-13.74l76.97.34-28.74,24.22-50.36,41.27Z"/>
        <path d="M288.99,220.88c-.28,1.59-4.56,1.92-6.5,1.28l.02-190.63,6.47.02v189.34Z"/>
      </g>
      {/* Three dots (accent) */}
      <g fill={accent}>
        <path d="M239.19,150.54c8.23-1.29,14.31,4.83,15.1,11.36.93,7.73-4.11,14.04-11.25,15.2s-13.88-3.81-15.16-10.89,3.23-14.4,11.32-15.67Z"/>
        <path d="M238.53,113.77c7.39-1.7,14.46,3.54,15.63,10.4,1.24,7.24-2.78,14.15-10.32,15.91-6.55,1.53-13.67-2.83-15.61-9.55-2.12-7.3,2.29-14.91,10.3-16.76Z"/>
        <path d="M237.32,77.3c7.22-2.17,14.23,2.03,16.4,8.53,2.38,7.13-1.49,14.75-8.48,17.14s-14.55-1.46-16.88-8.83c-2.14-6.76,1.34-14.55,8.97-16.84Z"/>
      </g>
      {withText && (
        <g fontFamily="Quicksand, sans-serif" fontWeight="800" fill={color}>
          <text x="311" y="89" fontSize="49" letterSpacing="2">UNIVERSE</text>
          <text x="311" y="139" fontSize="49" letterSpacing="2">OF</text>
          <text x="311" y="189" fontSize="49" letterSpacing="2">CONTENT</text>
        </g>
      )}
    </svg>
  );
}

Object.assign(window, { UCreativeMark, UCreativeWordmark, UniverseLogo, UCreativeLogoImg });
