{
  "version": 8,
  "name": "Introvert Maps Topo (OMT) Night",
  "sources": {
    "basemap": {
      "type": "vector",
      "url": "{{BASEMAP_URL}}",
      "attribution": "© OpenMapTiles © OpenStreetMap contributors"
    }
  },
  "glyphs": "{{GLYPHS_URL}}",
  "layers": [
    {
      "id": "background",
      "type": "background",
      "paint": { "background-color": "#161a22" }
    },
    {
      "id": "landcover-wood",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landcover",
      "filter": ["==", ["get", "class"], "wood"],
      "paint": { "fill-color": "#1c2a20", "fill-opacity": 0.45 }
    },
    {
      "id": "landcover-grass",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landcover",
      "filter": ["match", ["get", "class"], ["grass", "scrub", "heath"], true, false],
      "paint": { "fill-color": "#212b22", "fill-opacity": 0.55 }
    },
    {
      "id": "landcover-farmland",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landcover",
      "filter": ["==", ["get", "class"], "farmland"],
      "paint": { "fill-color": "#23241d", "fill-opacity": 0.5 }
    },
    {
      "id": "landcover-sand",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landcover",
      "filter": ["==", ["get", "class"], "sand"],
      "paint": { "fill-color": "#2c2a1e", "fill-opacity": 0.6 }
    },
    {
      "id": "landcover-wetland",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landcover",
      "filter": ["==", ["get", "class"], "wetland"],
      "paint": { "fill-color": "#1e2a2b", "fill-opacity": 0.5 }
    },
    {
      "id": "park",
      "type": "fill",
      "source": "basemap",
      "source-layer": "park",
      "paint": { "fill-color": "#1e3023", "fill-opacity": 0.4 }
    },
    {
      "id": "landuse-residential",
      "type": "fill",
      "source": "basemap",
      "source-layer": "landuse",
      "filter": ["match", ["get", "class"], ["residential", "suburb", "neighbourhood"], true, false],
      "paint": { "fill-color": "#23252c", "fill-opacity": 0.6 }
    },

    {
      "id": "water",
      "type": "fill",
      "source": "basemap",
      "source-layer": "water",
      "paint": { "fill-color": "#16304a" }
    },
    {
      "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": "#3a6f8f",
        "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": "#335a6e",
        "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": "#2c2f37",
        "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": "#565b66",
        "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": "#2c2f37",
        "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": "#565b66",
        "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": "#565b66",
        "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": "#3d3520",
        "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": "#a89566",
        "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": "#3d3520",
        "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": "#a89566",
        "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": "#4a3e22",
        "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": "#b6a06a",
        "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": "#59482a",
        "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": "#c9b078",
        "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": "#55514a",
        "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.45,
        "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": "#b094c0",
        "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": "#8fc4e0",
        "text-halo-color": "#0e1a24",
        "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": "#8fc4e0",
        "text-halo-color": "#0e1a24",
        "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": "#d6c594",
        "text-halo-color": "#15110a",
        "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": "#cf9866",
        "circle-stroke-color": "#161a22",
        "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": "#e0b48a",
        "text-halo-color": "#12100c",
        "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": "#f0a070",
        "text-halo-color": "#12100c",
        "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": "#c8b890",
        "text-halo-color": "#12100c",
        "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": "#b6b2aa",
        "text-halo-color": "#12141a",
        "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": "#e8e4dc",
        "text-halo-color": "#12141a",
        "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": "#f2efe9",
        "text-halo-color": "#12141a",
        "text-halo-width": 2.0
      }
    }
  ]
}
