// Variant B — Moderna Audaz
// Editorial feel: big type, strong patriotic red + blue blocks, cream/off-white bg
// Serif display font (Fraunces alt → use "Instrument Serif") + Inter text.
// More graphic, less clinical. Red used as primary accent, not sparingly.

const B = {
  navy: "#041E42",       // deeper Panama flag blue
  blue: "#0E3B8A",
  red: "#CE1126",        // Panama flag red
  redDark: "#9F0C1C",
  cream: "#F5F0E8",
  creamDark: "#EBE3D5",
  ink: "#0A0A0A",
  ink2: "#2A2A2A",
  ink3: "#6B6B6B",
  border: "#D9D2C4",
  white: "#FFFFFF",
  gold: "#C9A961",       // subtle warmth
};

const BIcon = ({ name, size = 20, color = "currentColor", stroke = 1.8 }) => {
  const paths = {
    stethoscope: "M6 3v6a4 4 0 0 0 8 0V3M10 13v3a4 4 0 0 0 8 0v-1M18 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4z",
    tooth: "M12 3c-3 0-5 1.5-5 4 0 2 1 3 1 6s-.5 8 2 8 2-4 2-6 0-2 0-2 0 0 0 2 0 6 2 6 2-5 2-8 1-4 1-6c0-2.5-2-4-5-4z",
    flask: "M9 3h6M10 3v6L5 19a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2l-5-10V3",
    phone: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.9.72 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.35 1.85.59 2.81.72A2 2 0 0 1 22 16.92z",
    mail: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2zM22 6l-10 7L2 6",
    pin: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0zM12 7a3 3 0 1 0 0 6 3 3 0 0 0 0-6z",
    clock: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM12 6v6l4 2",
    check: "M5 12l5 5L20 7",
    whatsapp: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.263.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347zM12 2a10 10 0 0 0-8.535 15.19L2 22l4.905-1.43A10 10 0 1 0 12 2z",
    instagram: "M16 3H8a5 5 0 0 0-5 5v8a5 5 0 0 0 5 5h8a5 5 0 0 0 5-5V8a5 5 0 0 0-5-5zM12 8a4 4 0 1 1 0 8 4 4 0 0 1 0-8zM17.5 6.5h.01",
    arrow: "M5 12h14M12 5l7 7-7 7",
    arrowUpRight: "M7 17L17 7M7 7h10v10",
    menu: "M3 6h18M3 12h18M3 18h18",
    close: "M18 6L6 18M6 6l12 12",
    plus: "M12 5v14M5 12h14",
    minus: "M5 12h14",
    star: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",
    quote: "M3 21c3 0 5-2 5-5V9H3v6h3c0 2-1 3-3 3v3zM14 21c3 0 5-2 5-5V9h-5v6h3c0 2-1 3-3 3v3z",
  };
  return (
    <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke={color} strokeWidth={stroke} strokeLinecap="round" strokeLinejoin="round">
      <path d={paths[name] || paths.check} />
    </svg>
  );
};

// Real clinic logo — uses mix-blend-mode: multiply so the light
// background of the JPEG blends into the cream/navy/dark page color.
// On dark backgrounds we switch to 'screen' so the logo pops.
const BLogo = ({ size = 40, onDark = false }) => (
  <div style={{
    width: size, height: size, position: "relative", flexShrink: 0,
    display: "flex", alignItems: "center", justifyContent: "center",
    background: "transparent",
  }}>
    <img src="assets/logo.jpeg" alt="Consultorio Médico Panamá"
      style={{
        width: "100%", height: "100%", objectFit: "contain", display: "block",
        mixBlendMode: onDark ? "screen" : "multiply",
      }} />
  </div>
);

const BSerif = {
  fontFamily: "'Instrument Serif', 'Fraunces', 'Times New Roman', Georgia, serif",
  fontWeight: 400,
};

Object.assign(window, { B, BIcon, BLogo, BSerif });
