{
  "version": 8,
  "name": "Introvert Maps Topo (OMT)",
  "sources": {
    "basemap": {
      "type": "vector",
      "url": "{{BASEMAP_URL}}",
      "attribution": "© OpenMapTiles © OpenStreetMap contributors"
    }
  },
  "glyphs": "{{GLYPHS_URL}}",
  "layers": [
    {
      "id": "background",
      "type": "background",
      "paint": { "background-color": "#f7f6f1" }
    },
    {
      "id": "landcover-wood",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landcover",
      "filter": ["==", ["get", "class"], "wood"],
      "paint": { "fill-color": "#cfe3c2", "fill-opacity": 0.4 }
    },
    {
      "id": "landcover-grass",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landcover",
      "filter": ["match", ["get", "class"], ["grass", "scrub", "heath"], true, false],
      "paint": { "fill-color": "#e2eed6", "fill-opacity": 0.5 }
    },
    {
      "id": "landcover-farmland",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landcover",
      "filter": ["==", ["get", "class"], "farmland"],
      "paint": { "fill-color": "#f0eee0", "fill-opacity": 0.5 }
    },
    {
      "id": "landcover-sand",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landcover",
      "filter": ["==", ["get", "class"], "sand"],
      "paint": { "fill-color": "#ecdeb0", "fill-opacity": 0.75 }
    },
    {
      "id": "landcover-wetland",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landcover",
      "filter": ["==", ["get", "class"], "wetland"],
      "paint": { "fill-color": "#d3e4d8", "fill-opacity": 0.5 }
    },
    {
      "id": "park",
      "type": "fill",
      "source": "basemap",
      "source-layer": "park",
      "paint": { "fill-color": "#d6ecc4", "fill-opacity": 0.35 }
    },
    {
      "id": "landuse-residential",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landuse",
      "filter": ["match", ["get", "class"], ["residential", "suburb", "neighbourhood"], true, false],
      "paint": { "fill-color": "#ece9e2", "fill-opacity": 0.6 }
    },

    {
      "id": "water",
      "type": "fill",
      "source": "basemap",
      "source-layer": "water",
      "paint": { "fill-color": "#a4d6ee" }
    },
    {
      "id": "waterway-river",
      "type": "line",
      "source": "basemap",
      "source-layer": "waterway",
      "filter": ["match", ["get", "class"], ["river", "canal"], true, false],
      "layout": { "line-cap": "round" },
      "paint": {
        "line-color": "#8cc4dd",
        "line-width": ["interpolate", ["linear"], ["zoom"], 11, 0.6, 16, 2.4]
      }
    },
    {
      "id": "waterway-stream",
      "type": "line",
      "source": "basemap",
      "source-layer": "waterway",
      "minzoom": 13,
      "filter": ["match", ["get", "class"], ["stream", "ditch", "drain"], true, false],
      "layout": { "line-cap": "round" },
      "paint": {
        "line-color": "#a4cddd",
        "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.4, 16, 1.2]
      }
    },

    {
      "id": "roads-minor-casing",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "minzoom": 13,
      "filter": ["match", ["get", "class"], ["minor", "service"], true, false],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#e6e1d3",
        "line-width": ["interpolate", ["linear"], ["zoom"], 13, 1.6, 16, 5]
      }
    },
    {
      "id": "roads-minor",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "filter": ["match", ["get", "class"], ["minor", "service"], true, false],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#ffffff",
        "line-width": ["interpolate", ["linear"], ["zoom"], 12, 0.5, 16, 3.2]
      }
    },
    {
      "id": "roads-pedestrian-casing",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "minzoom": 14,
      "filter": ["any",
        ["all", ["==", ["get", "class"], "path"], ["match", ["get", "subclass"], ["pedestrian", "steps"], true, false]],
        ["==", ["get", "class"], "busway"]],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#e6e1d3",
        "line-width": ["interpolate", ["linear"], ["zoom"], 14, 1.8, 16, 4.6]
      }
    },
    {
      "id": "roads-pedestrian",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "minzoom": 14,
      "filter": ["any",
        ["all", ["==", ["get", "class"], "path"], ["==", ["get", "subclass"], "pedestrian"]],
        ["==", ["get", "class"], "busway"]],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#ffffff",
        "line-width": ["interpolate", ["linear"], ["zoom"], 14, 1.0, 16, 3.0]
      }
    },
    {
      "id": "roads-steps",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "minzoom": 14,
      "filter": ["all", ["==", ["get", "class"], "path"], ["==", ["get", "subclass"], "steps"]],
      "layout": { "line-cap": "butt", "line-join": "round" },
      "paint": {
        "line-color": "#ffffff",
        "line-width": ["interpolate", ["linear"], ["zoom"], 14, 1.0, 16, 3.0],
        "line-dasharray": [0.4, 0.35]
      }
    },
    {
      "id": "roads-tertiary-casing",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "minzoom": 10,
      "filter": ["==", ["get", "class"], "tertiary"],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#dcbc82",
        "line-width": ["interpolate", ["linear"], ["zoom"], 10, 1.1, 16, 5.5]
      }
    },
    {
      "id": "roads-tertiary",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "minzoom": 10,
      "filter": ["==", ["get", "class"], "tertiary"],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#fdf6e3",
        "line-width": ["interpolate", ["linear"], ["zoom"], 10, 0.6, 16, 3.8]
      }
    },
    {
      "id": "roads-secondary-casing",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "minzoom": 9,
      "filter": ["==", ["get", "class"], "secondary"],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#dcbc82",
        "line-width": ["interpolate", ["linear"], ["zoom"], 9, 1.2, 16, 6]
      }
    },
    {
      "id": "roads-secondary",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "minzoom": 9,
      "filter": ["==", ["get", "class"], "secondary"],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#fdf6e3",
        "line-width": ["interpolate", ["linear"], ["zoom"], 9, 0.7, 16, 4.2]
      }
    },
    {
      "id": "roads-primary-casing",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "minzoom": 8,
      "filter": ["==", ["get", "class"], "primary"],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#d4b87e",
        "line-width": ["interpolate", ["linear"], ["zoom"], 8, 1.4, 16, 7]
      }
    },
    {
      "id": "roads-primary",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "minzoom": 8,
      "filter": ["==", ["get", "class"], "primary"],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#fdf6e3",
        "line-width": ["interpolate", ["linear"], ["zoom"], 8, 0.8, 16, 5]
      }
    },
    {
      "id": "roads-highway-casing",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "filter": ["match", ["get", "class"], ["motorway", "trunk"], true, false],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#c9a86a",
        "line-width": ["interpolate", ["linear"], ["zoom"], 7, 1.8, 16, 9]
      }
    },
    {
      "id": "roads-highway",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "filter": ["match", ["get", "class"], ["motorway", "trunk"], true, false],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#fbf0d5",
        "line-width": ["interpolate", ["linear"], ["zoom"], 7, 1.0, 16, 6.5]
      }
    },
    {
      "id": "rail",
      "type": "line",
      "source": "basemap",
      "source-layer": "transportation",
      "minzoom": 12,
      "filter": ["==", ["get", "class"], "rail"],
      "paint": {
        "line-color": "#b8b3a8",
        "line-width": ["interpolate", ["linear"], ["zoom"], 12, 0.6, 16, 1.6]
      }
    },

    {
      "id": "admin-region",
      "type": "line",
      "source": "basemap",
      "source-layer": "boundary",
      "minzoom": 6,
      "filter": ["all", ["==", ["get", "admin_level"], 4], ["!=", ["get", "maritime"], 1]],
      "layout": { "line-join": "round" },
      "paint": {
        "line-color": "#9a86a6",
        "line-opacity": 0.5,
        "line-width": ["interpolate", ["linear"], ["zoom"], 6, 0.5, 12, 1.2],
        "line-dasharray": [2, 2]
      }
    },
    {
      "id": "admin-country",
      "type": "line",
      "source": "basemap",
      "source-layer": "boundary",
      "filter": ["all", ["==", ["get", "admin_level"], 2], ["!=", ["get", "maritime"], 1]],
      "layout": { "line-cap": "round", "line-join": "round" },
      "paint": {
        "line-color": "#7a4f8a",
        "line-opacity": 0.8,
        "line-width": ["interpolate", ["linear"], ["zoom"], 3, 0.8, 7, 1.8, 12, 3.0],
        "line-dasharray": [3, 1.5]
      }
    },

    {
      "id": "waterway-label",
      "type": "symbol",
      "source": "basemap",
      "source-layer": "waterway",
      "minzoom": 13,
      "filter": ["all", ["has", "name"], ["match", ["get", "class"], ["river", "canal"], true, false]],
      "layout": {
        "text-field": "{name}",
        "text-font": ["NotoSans-Regular"],
        "text-size": 11,
        "symbol-placement": "line",
        "text-max-angle": 40,
        "symbol-spacing": 400
      },
      "paint": {
        "text-color": "#3d7f9c",
        "text-halo-color": "#f2f8fb",
        "text-halo-width": 1.2
      }
    },
    {
      "id": "water-label",
      "type": "symbol",
      "source": "basemap",
      "source-layer": "water_name",
      "minzoom": 12,
      "filter": ["has", "name"],
      "layout": {
        "text-field": "{name}",
        "text-font": ["NotoSans-Regular"],
        "text-size": ["interpolate", ["linear"], ["zoom"], 12, 10, 15, 12],
        "text-max-width": 6
      },
      "paint": {
        "text-color": "#3d7f9c",
        "text-halo-color": "#f2f8fb",
        "text-halo-width": 1.2
      }
    },
    {
      "id": "road-label",
      "type": "symbol",
      "source": "basemap",
      "source-layer": "transportation_name",
      "minzoom": 13,
      "filter": ["match", ["get", "class"], ["motorway", "trunk", "primary", "secondary", "tertiary", "minor", "path", "busway"], true, false],
      "layout": {
        "text-field": "{name}",
        "text-font": ["NotoSans-Regular"],
        "text-size": ["interpolate", ["linear"], ["zoom"], 13, 10, 16, 12],
        "symbol-placement": "line",
        "text-max-angle": 40,
        "symbol-spacing": 450
      },
      "paint": {
        "text-color": "#7a6b48",
        "text-halo-color": "#ffffff",
        "text-halo-width": 1.4
      }
    },
    {
      "id": "peak-marker",
      "type": "circle",
      "source": "basemap",
      "source-layer": "mountain_peak",
      "minzoom": 8,
      "filter": ["==", ["get", "class"], "peak"],
      "paint": {
        "circle-radius": ["interpolate", ["linear"], ["zoom"], 10, 1.6, 14, 2.6],
        "circle-color": "#6b4423",
        "circle-stroke-color": "#f7f6f1",
        "circle-stroke-width": 1
      }
    },
    {
      "id": "peak-label",
      "type": "symbol",
      "source": "basemap",
      "source-layer": "mountain_peak",
      "minzoom": 9,
      "filter": ["all", ["==", ["get", "class"], "peak"], ["has", "name"]],
      "layout": {
        "text-field": ["case", ["has", "ele"],
          ["concat", ["get", "name"], " ", ["to-string", ["get", "ele"]], " m"],
          ["get", "name"]],
        "text-font": ["NotoSans-Bold"],
        "text-size": ["interpolate", ["linear"], ["zoom"], 9, 8, 11, 10, 13, 11, 15, 12],
        "text-anchor": "top",
        "text-offset": [0, 0.45],
        "text-max-width": 8,
        "symbol-sort-key": ["coalesce", ["get", "rank"], 10]
      },
      "paint": {
        "text-color": "#6b4423",
        "text-halo-color": "#f7f6f1",
        "text-halo-width": 1.4
      }
    },
    {
      "id": "hut-marker",
      "type": "symbol",
      "source": "basemap",
      "source-layer": "poi",
      "minzoom": 13,
      "filter": ["match", ["get", "subclass"], ["alpine_hut", "wilderness_hut"], true, false],
      "layout": {
        "icon-image": "hut-icon",
        "icon-size": 0.8,
        "icon-allow-overlap": true,
        "icon-ignore-placement": true
      }
    },
    {
      "id": "hut-label",
      "type": "symbol",
      "source": "basemap",
      "source-layer": "poi",
      "minzoom": 13,
      "filter": ["all", ["has", "name"],
        ["match", ["get", "subclass"], ["alpine_hut", "wilderness_hut"], true, false]],
      "layout": {
        "text-field": "{name}",
        "text-font": ["NotoSans-Bold"],
        "text-size": 11,
        "text-anchor": "top",
        "text-offset": [0, 1.3],
        "text-max-width": 8,
        "symbol-sort-key": 0
      },
      "paint": {
        "text-color": "#8a4513",
        "text-halo-color": "#ffffff",
        "text-halo-width": 1.5
      }
    },
    {
      "id": "poi-label",
      "type": "symbol",
      "source": "basemap",
      "source-layer": "poi",
      "minzoom": 14,
      "filter": ["all", ["has", "name"],
        ["match", ["get", "class"], ["attraction"], true, false],
        ["match", ["get", "subclass"], ["viewpoint", "attraction"], true, false]],
      "layout": {
        "text-field": "{name}",
        "text-font": ["NotoSans-Regular"],
        "text-size": 10,
        "text-anchor": "top",
        "text-offset": [0, 0.4],
        "text-max-width": 7
      },
      "paint": {
        "text-color": "#6b5a3a",
        "text-halo-color": "#ffffff",
        "text-halo-width": 1.3
      }
    },
    {
      "id": "place-village",
      "type": "symbol",
      "source": "basemap",
      "source-layer": "place",
      "minzoom": 10,
      "filter": ["match", ["get", "class"], ["village", "hamlet", "suburb", "neighbourhood"], true, false],
      "layout": {
        "text-field": "{name}",
        "text-font": ["NotoSans-Regular"],
        "text-size": ["interpolate", ["linear"], ["zoom"], 12, 11, 15, 13],
        "text-max-width": 7,
        "symbol-sort-key": ["coalesce", ["get", "rank"], 100]
      },
      "paint": {
        "text-color": "#55524a",
        "text-halo-color": "#f7f6f1",
        "text-halo-width": 1.6
      }
    },
    {
      "id": "place-town",
      "type": "symbol",
      "source": "basemap",
      "source-layer": "place",
      "minzoom": 8,
      "filter": ["==", ["get", "class"], "town"],
      "layout": {
        "text-field": "{name}",
        "text-font": ["NotoSans-Bold"],
        "text-size": ["interpolate", ["linear"], ["zoom"], 8, 10.5, 12, 13, 15, 16],
        "text-max-width": 8,
        "symbol-sort-key": ["coalesce", ["get", "rank"], 50]
      },
      "paint": {
        "text-color": "#3a3833",
        "text-halo-color": "#f7f6f1",
        "text-halo-width": 1.8
      }
    },
    {
      "id": "place-city",
      "type": "symbol",
      "source": "basemap",
      "source-layer": "place",
      "minzoom": 6,
      "filter": ["==", ["get", "class"], "city"],
      "layout": {
        "text-field": "{name}",
        "text-font": ["NotoSans-Bold"],
        "text-size": ["interpolate", ["linear"], ["zoom"], 6, 13, 10, 18, 15, 22],
        "text-max-width": 8,
        "symbol-sort-key": ["coalesce", ["get", "rank"], 30]
      },
      "paint": {
        "text-color": "#2e2c28",
        "text-halo-color": "#f7f6f1",
        "text-halo-width": 2.0
      }
    }
  ]
}
