{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "$schema": {
      "default": "https://ideare.app/schema/brand.v1.json",
      "type": "string",
      "const": "https://ideare.app/schema/brand.v1.json"
    },
    "schemaVersion": { "type": "number", "const": 1 },
    "slug": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" },
    "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 },
    "name": { "type": "string", "minLength": 1, "maxLength": 60 },
    "shortName": { "type": "string", "minLength": 1, "maxLength": 12 },
    "domain": { "type": "string", "pattern": "^(?:[a-z0-9-]+\\.)+[a-z]{2,}$" },
    "locales": {
      "minItems": 1,
      "type": "array",
      "items": { "type": "string", "enum": ["pt-BR", "en", "es"] }
    },
    "defaultLocale": { "type": "string", "enum": ["pt-BR", "en", "es"] },
    "copy": {
      "type": "object",
      "propertyNames": { "type": "string", "enum": ["pt-BR", "en", "es"] },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "tagline": { "type": "string", "minLength": 1, "maxLength": 80 },
          "description": { "type": "string", "minLength": 1, "maxLength": 300 },
          "card": {
            "type": "object",
            "properties": {
              "title": { "type": "string", "minLength": 1, "maxLength": 70 },
              "subtitle": { "type": "string", "maxLength": 140 }
            },
            "required": ["title"]
          }
        },
        "required": ["tagline", "description", "card"]
      }
    },
    "voice": {
      "default": { "tone": [] },
      "type": "object",
      "properties": {
        "tone": {
          "maxItems": 8,
          "type": "array",
          "items": { "type": "string", "minLength": 1, "maxLength": 40 }
        },
        "notes": { "type": "string", "maxLength": 2000 },
        "notesPublic": { "default": false, "type": "boolean" },
        "neverSay": {
          "default": [],
          "maxItems": 60,
          "type": "array",
          "items": { "type": "string", "minLength": 1, "maxLength": 60 }
        },
        "examples": {
          "default": [],
          "maxItems": 20,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "context": { "type": "string", "minLength": 1, "maxLength": 60 },
              "text": { "type": "string", "minLength": 1, "maxLength": 400 }
            },
            "required": ["context", "text"]
          }
        }
      },
      "required": ["tone"]
    },
    "mark": {
      "type": "object",
      "properties": {
        "svg": { "type": "string", "maxLength": 65536 },
        "small": { "type": "string", "maxLength": 65536 },
        "dark": { "type": "string", "maxLength": 65536 },
        "tile": {
          "default": {},
          "type": "object",
          "properties": {
            "fill": {
              "default": "primary",
              "type": "string",
              "enum": [
                "ground",
                "surface",
                "ink",
                "muted",
                "line",
                "primary",
                "onPrimary",
                "accent",
                "onAccent",
                "focus",
                "danger",
                "success",
                "warning"
              ]
            },
            "shape": {
              "default": "rounded",
              "type": "string",
              "enum": ["square", "rounded", "circle"]
            },
            "radius": {
              "default": 0.22,
              "type": "number",
              "minimum": 0,
              "maximum": 0.5
            },
            "padding": {
              "default": 0.18,
              "type": "number",
              "minimum": 0,
              "maximum": 0.4
            }
          }
        },
        "source": {
          "type": "object",
          "properties": {
            "kind": { "type": "string", "enum": ["monogram", "icon", "ai", "upload"] },
            "ref": { "type": "string", "maxLength": 80 }
          },
          "required": ["kind"]
        }
      },
      "required": ["svg"]
    },
    "wordmark": {
      "type": "object",
      "properties": {
        "text": { "type": "string", "minLength": 1, "maxLength": 40 },
        "font": { "default": "display", "type": "string", "enum": ["display", "text"] },
        "weight": { "default": 700, "type": "integer", "minimum": 100, "maximum": 900 },
        "tracking": { "default": 0, "type": "number", "minimum": -0.2, "maximum": 0.5 }
      },
      "required": ["text"]
    },
    "colors": {
      "type": "object",
      "properties": {
        "light": {
          "type": "object",
          "properties": {
            "ground": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "surface": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "ink": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "muted": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "line": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "primary": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "onPrimary": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "accent": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "onAccent": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "focus": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "danger": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "success": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "warning": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }
          },
          "required": [
            "ground",
            "surface",
            "ink",
            "muted",
            "line",
            "primary",
            "onPrimary",
            "accent",
            "onAccent",
            "focus",
            "danger",
            "success",
            "warning"
          ]
        },
        "dark": {
          "type": "object",
          "properties": {
            "ground": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "surface": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "ink": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "muted": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "line": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "primary": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "onPrimary": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "accent": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "onAccent": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "focus": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "danger": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "success": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
            "warning": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }
          },
          "required": [
            "ground",
            "surface",
            "ink",
            "muted",
            "line",
            "primary",
            "onPrimary",
            "accent",
            "onAccent",
            "focus",
            "danger",
            "success",
            "warning"
          ]
        }
      },
      "required": ["light", "dark"]
    },
    "paints": {
      "type": "object",
      "propertyNames": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,31}$" },
      "additionalProperties": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }
    },
    "fonts": {
      "type": "object",
      "properties": {
        "display": {
          "type": "object",
          "properties": {
            "family": { "type": "string", "minLength": 1, "maxLength": 80 },
            "id": { "type": "string", "pattern": "^[a-z0-9-]+$" },
            "weights": {
              "minItems": 1,
              "maxItems": 9,
              "type": "array",
              "items": { "type": "integer", "minimum": 100, "maximum": 900 }
            },
            "license": { "type": "string", "enum": ["OFL-1.1", "Apache-2.0"] },
            "files": {
              "default": {},
              "type": "object",
              "propertyNames": { "type": "string", "pattern": "^[1-9]00$" },
              "additionalProperties": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              }
            }
          },
          "required": ["family", "id", "weights", "license"]
        },
        "text": {
          "type": "object",
          "properties": {
            "family": { "type": "string", "minLength": 1, "maxLength": 80 },
            "id": { "type": "string", "pattern": "^[a-z0-9-]+$" },
            "weights": {
              "minItems": 1,
              "maxItems": 9,
              "type": "array",
              "items": { "type": "integer", "minimum": 100, "maximum": 900 }
            },
            "license": { "type": "string", "enum": ["OFL-1.1", "Apache-2.0"] },
            "files": {
              "default": {},
              "type": "object",
              "propertyNames": { "type": "string", "pattern": "^[1-9]00$" },
              "additionalProperties": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              }
            }
          },
          "required": ["family", "id", "weights", "license"]
        }
      },
      "required": ["display", "text"]
    },
    "radii": {
      "default": {},
      "type": "object",
      "properties": {
        "control": { "default": 10, "type": "number", "minimum": 0, "maximum": 64 },
        "card": { "default": 16, "type": "number", "minimum": 0, "maximum": 64 }
      }
    },
    "art": {
      "default": {},
      "type": "object",
      "properties": {
        "prompt": { "default": "", "type": "string", "maxLength": 2000 },
        "references": {
          "default": [],
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
              "mime": {
                "type": "string",
                "enum": ["image/png", "image/jpeg", "image/webp"]
              },
              "width": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "height": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": ["sha256", "mime", "width", "height"]
          }
        },
        "referencesPublic": { "default": false, "type": "boolean" },
        "avoid": {
          "default": [],
          "maxItems": 30,
          "type": "array",
          "items": { "type": "string", "minLength": 1, "maxLength": 80 }
        }
      }
    },
    "links": {
      "default": {},
      "type": "object",
      "properties": {
        "site": {
          "type": "object",
          "properties": {
            "value": { "type": "string", "minLength": 1, "maxLength": 300 },
            "public": { "default": false, "type": "boolean" }
          },
          "required": ["value"]
        },
        "instagram": {
          "type": "object",
          "properties": {
            "value": { "type": "string", "minLength": 1, "maxLength": 300 },
            "public": { "default": false, "type": "boolean" }
          },
          "required": ["value"]
        },
        "facebook": {
          "type": "object",
          "properties": {
            "value": { "type": "string", "minLength": 1, "maxLength": 300 },
            "public": { "default": false, "type": "boolean" }
          },
          "required": ["value"]
        },
        "x": {
          "type": "object",
          "properties": {
            "value": { "type": "string", "minLength": 1, "maxLength": 300 },
            "public": { "default": false, "type": "boolean" }
          },
          "required": ["value"]
        },
        "linkedin": {
          "type": "object",
          "properties": {
            "value": { "type": "string", "minLength": 1, "maxLength": 300 },
            "public": { "default": false, "type": "boolean" }
          },
          "required": ["value"]
        },
        "youtube": {
          "type": "object",
          "properties": {
            "value": { "type": "string", "minLength": 1, "maxLength": 300 },
            "public": { "default": false, "type": "boolean" }
          },
          "required": ["value"]
        },
        "tiktok": {
          "type": "object",
          "properties": {
            "value": { "type": "string", "minLength": 1, "maxLength": 300 },
            "public": { "default": false, "type": "boolean" }
          },
          "required": ["value"]
        },
        "whatsapp": {
          "type": "object",
          "properties": {
            "value": { "type": "string", "minLength": 1, "maxLength": 300 },
            "public": { "default": false, "type": "boolean" }
          },
          "required": ["value"]
        },
        "email": {
          "type": "object",
          "properties": {
            "value": { "type": "string", "minLength": 1, "maxLength": 300 },
            "public": { "default": false, "type": "boolean" }
          },
          "required": ["value"]
        },
        "phone": {
          "type": "object",
          "properties": {
            "value": { "type": "string", "minLength": 1, "maxLength": 300 },
            "public": { "default": false, "type": "boolean" }
          },
          "required": ["value"]
        }
      }
    }
  },
  "required": [
    "schemaVersion",
    "name",
    "shortName",
    "locales",
    "defaultLocale",
    "copy",
    "mark",
    "wordmark",
    "colors",
    "fonts"
  ],
  "$id": "https://ideare.app/schema/brand.v1.json",
  "title": "ideare brand.json v1"
}
