{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Brand manual format 1.1.0",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "const": "1.1.0"
    },
    "formatVersion": {
      "const": "1.1.0"
    },
    "brandVersion": {
      "type": "string",
      "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9]*$"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "language": {
      "type": "string",
      "enum": ["es"]
    },
    "reviewedAt": {
      "type": "string",
      "pattern": "^20[0-9]{2}-[0-9]{2}-[0-9]{2}$"
    },
    "releaseStatus": {
      "type": "string",
      "enum": ["draft", "reviewed"]
    },
    "owner": {
      "type": "string",
      "minLength": 1
    },
    "headline": {
      "type": "string",
      "minLength": 1
    },
    "intro": {
      "type": "string",
      "minLength": 1
    },
    "notice": {
      "type": "string",
      "minLength": 1
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]*$"
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "location": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["id", "title", "location"],
        "additionalProperties": false
      },
      "minItems": 1
    },
    "logo": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "path": {
              "type": "string",
              "pattern": "^assets/[a-z0-9][a-z0-9.-]*\\.(jpg|jpeg|png|svg|webp)$"
            },
            "alt": {
              "type": "string",
              "minLength": 1
            },
            "width": {
              "type": "integer",
              "minimum": 1
            },
            "height": {
              "type": "integer",
              "minimum": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "documented",
                "proposed",
                "missing",
                "deprecated",
                "approved"
              ]
            },
            "source": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]*$"
            },
            "rights": {
              "type": "string",
              "minLength": 1
            },
            "approval": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "path",
            "alt",
            "width",
            "height",
            "status",
            "source",
            "rights"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "colors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]*$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "value": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$"
          },
          "use": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "documented",
              "proposed",
              "missing",
              "deprecated",
              "approved"
            ]
          },
          "source": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]*$"
          },
          "approval": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["id", "name", "value", "use", "status", "source"],
        "additionalProperties": false
      },
      "minItems": 2
    },
    "semantic": {
      "type": "object",
      "properties": {
        "background": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$"
        },
        "text": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$"
        },
        "heading": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$"
        },
        "link": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$"
        },
        "actionBackground": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$"
        },
        "actionText": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$"
        },
        "inverseBackground": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$"
        },
        "inverseText": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$"
        },
        "focus": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$"
        }
      },
      "required": [
        "background",
        "text",
        "heading",
        "link",
        "actionBackground",
        "actionText",
        "inverseBackground",
        "inverseText",
        "focus"
      ],
      "additionalProperties": false
    },
    "fonts": {
      "type": "object",
      "properties": {
        "display": {
          "type": "string",
          "minLength": 1
        },
        "body": {
          "type": "string",
          "minLength": 1
        },
        "mono": {
          "type": "string",
          "minLength": 1
        },
        "note": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "string",
          "enum": [
            "documented",
            "proposed",
            "missing",
            "deprecated",
            "approved"
          ]
        },
        "source": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$"
        },
        "approval": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": ["display", "body", "mono", "note", "status", "source"],
      "additionalProperties": false
    },
    "contrastPairs": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$"
        },
        "minItems": 2,
        "maxItems": 2
      },
      "minItems": 1
    },
    "sections": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "esencia",
              "logotipo",
              "color",
              "tipografia",
              "imagenes",
              "voz",
              "aplicaciones",
              "descargas",
              "mantenimiento"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "lead": {
            "type": "string",
            "minLength": 1
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1
                },
                "text": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "documented",
                    "proposed",
                    "missing",
                    "deprecated",
                    "approved"
                  ]
                },
                "source": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9-]*$"
                },
                "approval": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": ["title", "text", "status", "source"],
              "additionalProperties": false
            },
            "minItems": 1
          }
        },
        "required": ["id", "title", "lead", "items"],
        "additionalProperties": false
      },
      "minItems": 9,
      "maxItems": 9
    },
    "examples": {
      "type": "object",
      "properties": {
        "webTitle": {
          "type": "string",
          "minLength": 1
        },
        "webBody": {
          "type": "string",
          "minLength": 1
        },
        "webAction": {
          "type": "string",
          "minLength": 1
        },
        "appTitle": {
          "type": "string",
          "minLength": 1
        },
        "appBody": {
          "type": "string",
          "minLength": 1
        },
        "appAction": {
          "type": "string",
          "minLength": 1
        },
        "commercialTitle": {
          "type": "string",
          "minLength": 1
        },
        "commercialBody": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "webTitle",
        "webBody",
        "webAction",
        "appTitle",
        "appBody",
        "appAction",
        "commercialTitle",
        "commercialBody"
      ],
      "additionalProperties": false
    },
    "specimens": {
      "type": "object",
      "properties": {
        "heroCaption": {
          "type": "string",
          "minLength": 1
        },
        "display": {
          "type": "string",
          "minLength": 1
        },
        "body": {
          "type": "string",
          "minLength": 1
        },
        "mono": {
          "type": "string",
          "minLength": 1
        },
        "logoCaption": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": ["heroCaption", "display", "body", "mono", "logoCaption"],
      "additionalProperties": false
    },
    "semanticStatus": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "documented",
            "proposed",
            "missing",
            "deprecated",
            "approved"
          ]
        },
        "source": {
          "type": "string",
          "minLength": 1
        },
        "approval": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": ["status", "source"],
      "additionalProperties": false
    },
    "logoSpec": {
      "type": "object",
      "properties": {
        "clearSpaceRatio": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "minScreenPx": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "documented",
            "proposed",
            "missing",
            "deprecated",
            "approved"
          ]
        },
        "source": {
          "type": "string",
          "minLength": 1
        },
        "approval": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": ["clearSpaceRatio", "minScreenPx", "status", "source"],
      "additionalProperties": false,
      "description": "Legacy numeric mirror only. Per-variant clearSpace and minSize fields are authoritative and have independent states. Do not use this legacy status for either measurement."
    },
    "kit": {
      "$ref": "kit.schema.json"
    }
  },
  "required": [
    "schemaVersion",
    "formatVersion",
    "brandVersion",
    "slug",
    "name",
    "language",
    "reviewedAt",
    "releaseStatus",
    "owner",
    "headline",
    "intro",
    "notice",
    "sources",
    "logo",
    "colors",
    "semantic",
    "fonts",
    "contrastPairs",
    "sections",
    "examples",
    "specimens",
    "semanticStatus",
    "logoSpec",
    "kit"
  ],
  "additionalProperties": false
}
