/*** Reset ***/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, tt, var,
b, u, i, center,
dl, dt, dd,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}

blockquote, q {
	quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

em {
	font-style: italic;
}

img {
	width: 100%;
	height: auto;
}

/*** Structure ***/
* {
    /*border: 1px solid #f00 !important;*/
}

html {
	margin: 0;
	padding: 0;
}

body {
	background: #fefcf8;
	margin: 0;
	font-family: Lato, sans-serif;
	overflow-x: hidden;
	line-height: 1.5em;
}

#skiptocontent a {
    padding: 10px;
    position: fixed;
    top: -40px;
    left: 0px;
    color: #fff;
    background: #004f41;
    -webkit-transition: top 1s ease-out;
    transition: top 1s ease-out;
    z-index: 43000;
}

#skiptocontent a:focus {
	position: fixed;
	left: 0px;
	top: 0px;
	-webkit-transition: top .1s ease-in;
    transition: top .1s ease-in;
}

.wrapper {
	max-width: 1400px;
	margin: 0 auto;
	position: relative;
	padding: 2em 2% 0 2%;
}

.text-wrapper {
	max-width: 900px;
	margin: 0 auto;
}

/* Typography */

h1 {
	color: #fff;
	font-weight: 700;
	font-size: 3.6rem;
	line-height: 1em;
}

h2, h3 {
	font-family: Rasa, serif;
	font-weight: 500;
	line-height: 1em;
}

h2 {
	font-size: 3.6rem;
    padding-top: 1em;
    border-top: solid 2px #faedc5;
}

h3 {
	color: #fff;
	font-size: 2.5rem;
}

h4 {
	color:  #1a8495;
	font-size: 1.8rem;
	font-weight: 300;
	text-transform: uppercase;
	margin-top: 2em;
}

p {
    margin: 1.2em 0;
}

p, ol, ul {
    font-weight: 300;
    line-height: 1.6em;
	font-size: 1.3rem;
}

blockquote {
	font-family: Rasa, serif;
	font-size: 1.6rem;
    line-height: 1.3em;
	font-weight: 700;
	font-style: italic;
	color: #aaa16a;
	border-top: solid 4px #faedc5 ;
	border-bottom: solid 4px #faedc5 ;
	padding: 1em 0;
}

.quote-attribution {
	font-family: Lato, sans-serif;
	font-size: 1.1rem;
	font-weight: 300;
	font-style: normal;
	text-transform: uppercase;
}

#main-title {
	font-size: 5.6rem;
}

#main-subhead {
	margin-top: 4em;
}

/* General styles */

.visually-hidden {
  clip-path: inset(100%);
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

#btt {
	position: fixed;
	width: 30px;
	height: 30px;
	right: 20px;
	bottom: 20px;
	opacity: 0.2;
	cursor: pointer;
	z-index: 600000;
	display: none;
}

#btt:hover {
	opacity: 1;
}

.clear {
	clear: both;
}

.strong {
	font-weight: 900;
}

.centred {
	text-align: center;
}

.left-image, .right-image, .text-width-image {
	width: 100%;
	margin: 40px 0;
}

.chart {
	margin: 100px 0;
}

figcaption {
	font-family: Rasa, serif;
	color: #506785;
	padding: 8px;
	border-bottom: solid 2px #abb6cc;
	font-size: 1.2rem;
	line-height: 1em;
	font-weight: 500;
	background: #fff;
}

.slimabove {
	margin-top: 2px;
}

.source {
	font-size: 0.9rem;
	font-style: italic;
}

/* Overlay parts */
.header-overlay {
    background: linear-gradient(rgba(0,0,0,0.35) 55%, rgba(0,0,0,0));
    padding: 15vh 0 0 0;
    position: relative;
    z-index: 9;
    min-height: 100vh;
    text-align: center;
}

.full-bg {
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-background-size: 100%;
    -moz-background-size: 100%;
    -o-background-size: 100%;
    background-size: 100%;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    padding-bottom: 4em;
    position: relative;
}

.overlay-channel {
	margin-top: 20em;
	width: 50%;
	margin-left: 25%;
}

.overlay-panel {
	font-size: 1.2rem;
	line-height: 1.5em;
	text-align: left;
	background: rgba(0, 0, 0, 0.6);
	color: #f9e2b9;
	font-weight: 500;
	border-radius: 14px;
	padding: 20px 3%;
	position: sticky;
    position: -webkit-sticky;
    top: 100px;
    margin-top: 800px;
    margin-bottom: 200px;
	width: 80%;
	margin-left: 5%;
}

.overlay-panel p {
	font-weight: 400;
	line-height: 1.2em;
	margin: 0.4em 0;
}

.spacer {
    width: 20px;
    height: 1000px;
}

/* Sections */


.vid-bg {
  display: none;
}

.text-section {
	padding: 3em 0;
	background: #fff;
}

.text-section h3 {
	color: #59532f;
	margin-top: 2em;
}

#intro {
	text-align: center;
	background-image: url(../img/PricklyAcaciaInvernessPoster.png);
}

.vid-section {
	overflow: hidden;
	position: relative;
}

.vid-container {
	overflow: hidden;
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: none;
}

.vid-bg {
	object-fit: cover;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

#intro-vid-container {
	width: 100vw;
	height: 100vh;
	overflow: hidden;
	position: fixed;
	z-index: -1;
}

.fixed {
	position: fixed;
}

.fixed-bg {
    min-height: 100vh;
    -webkit-background-size: 100%;
    -moz-background-size: 100%;
    -o-background-size: 100%;
    background-size: 100%;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    background-attachment: initial;
    background-repeat: no-repeat;
    background-position: center center;
    padding-bottom: 4em;
    position: relative;
}

.sticky-map {
	width: 100vw;
    height: 100vh;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
}

.case-study {
	font-size: 1.8rem;
	background: url(../img/cs-bg.jpg);
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
	color: #fff;
	padding: 4%;
	width: 92%;
	margin: 3em 0;
	border-radius: 14px;
	position: relative;
	transition: all .8s;
	overflow: hidden;
}

.case-study h3 {
	color: #faedc5;
	margin-top: 0;
}

a {
	text-decoration: none;
}

.case-study::before { 
	content:"";
	position:absolute; top:0;right:0;bottom:0;left:0;
	background:inherit;
	transition:inherit;
}

.case-study:hover::before { 
	transform: scale(1.35);
}

.case-study-content {
	position: relative;
	width: 100%;
	height: 100%;
}

.video-cont {
	background: #c4be98;
	padding: 4%;
	border-radius: 20px;
}

.video-cont h4 {
	color: #fff;
	margin: 0 0 20px 0;
	font-weight: 600;
}

.embed-youtube {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.embed-youtube iframe,
.embed-youtube object,
.embed-youtube embed {
    border: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* Tooltip */
.mapTooltip, .chartTooltip {
  position: absolute;
  background: #fff;
  border: 6px solid #3d3d3b;
  line-height: 1;
  font: 1.2rem 'Lato', sans-serif;
  font-weight: normal;
  padding: 8px;
  color: #1e4163;
  text-align: left;
  border-radius:10px;
  pointer-events: none;
}

.mapTooltip:after, .mapTooltip:before {
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
  top: 100%;
  left: 50%;
}

.mapTooltip:after {
  border-color: rgba(255, 255, 255, 0);
  border-top-color: #fff;
  border-width: 10px;
  margin-left: -10px;
}

.mapTooltip:before {
  border-color: rgba(0, 138, 135, 0);
  border-top-color: #3d3d3b;
  border-width: 18px;
  margin-left: -18px;
}

.tooltipYear {
    font-size: 1.2rem;
    margin: 6px 0 6px 0;
    color: #1e4163;
}

.tooltipUnitText {
    font-size: 0.8rem;
}

.tooltipPercentText {
    font-size: 0.8rem;
    font-weight: normal;
}

.tooltipUnitValue {
    font-size: 1rem;
    font-weight: bold;
}

.tooltipPercentValue {
    font-size: 1rem;
    font-weight: bold;
}

/* d3-generated elements */
.cityCircle {
	fill: dimgray;
}

.cityName {
	font-family: "Roboto", sans-serif;
	font-size: 1rem;
	fill: #666;
	dominant-baseline: central;
	stroke: white;
	stroke-width: 1px;
	paint-order: stroke;
}

.zoomPath {
  fill: white;
}

.zoomPath:hover {
  fill: #f4f4f4;
}

.zoomText {
  font-family: "Arial", sans-serif;
  font-size: 20px;
  fill: #222;
  pointer-events: none; 
}

.yearButtonsContainer {
	position: absolute;
	top: calc(2em + 16px);
	left: 7%;
}

.yearButtons {
	display:inline-block;
	padding:0.35em 1.2em;
	border:0.1em solid #FFFFFF;
	margin:0 0.6em 0 0;
	border-radius:0.12em;
	box-sizing: border-box;
	text-decoration:none;
	font-family:'Roboto',sans-serif;
	font-weight:300;
	font-size: 1em;
	background-color:#FFFFFF;
	color:#222222;
	text-align:center;
	transition: all 0.2s;
}
.yearButtons:hover {
	color:#000000;
	background-color:#EEEEEE;
}

.yearButtons.active {
	border:0.1em solid #222222;
	background-color:#444444;
	color:#FFFFFF;
}

.legendTitle {
	dominant-baseline: hanging;
	font-family:'Roboto',sans-serif;
	font-size: 1.2em;
	fill: darkslategray;
}

.legendValues, .noDataValues {
	dominant-baseline: hanging;
	text-anchor: middle;
	font-family:'Roboto',sans-serif;
	font-size: 0.7em;
	fill: #444;
}

.slopeContainer {
	position: absolute;
	font-size: 0.8rem;
	text-align: left;
	background: rgba(255, 255, 255, 0.8);
	color: #222;
	border-radius: 14px;
	padding: 16px 1%;
    top: 15%;
	width: 12%;
	right: 5%;
	height: 70vh;
}

.slopeInnerContainer {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.slopeTitle {
	margin-bottom: 0.6rem;
}

.slopeSvgDiv {
	flex: 1;
}

.slopeAxis .domain {
	stroke: none;
}

.slopeAxis .tick line {
	stroke-dasharray: 2, 2;
	stroke: #888;
}

.slopeLabels {
	dominant-baseline: central;
	font-family:'Roboto',sans-serif;
	font-size: 0.8em;
	fill: #444;
}

.chartContainer {
	width:  100%;
	position: relative;
}

.chartTitle {
	font-size: 2.6em;
	color: #59532F;
	font-family: "Rasa-Medium", serif;
	margin: 2em 0 0.4em 0;
}

.costPerTreeLabels {
	dominant-baseline: middle;
	font-size: 16px;
	font-family: 'Lato', sans-serif;
	fill: #000;
}

.costPerTreeAxisText, .costOfDelayAxisText {
	dominant-baseline: middle;
	font-size: 16px;
	font-family: 'Lato', sans-serif;
	font-weight: 700;
	fill: #000;
}

.costPerTreeAxisSubText, .costOfDelayAxisSubText {
	font-weight: 400;
}

.costPerTreeCostsLabels {
	fill: #6A7147;
	font-size: 12px;
	font-family: 'Lato', sans-serif;
}

.yAxisCostToDcq line {
	stroke-dasharray: 4,4;
	stroke-width: 0.5;
    stroke-miterlimit: 10;
}

.yAxisCostToDcq text, .xAxisCostToDcq text {
	font-size: 16px;
	font-family: 'Lato', sans-serif;
	fill: #000;
}

.costToDcqLegend {
	font-size: 12px;
	font-family: 'Lato', sans-serif;
	fill: #231F20;	
	dominant-baseline: central;
}

.costPerTreeTooltipTitle, .costOfDelayTooltipTitle, .costToDcqTooltipTitle {
	font-size: 1.4rem;
	font-weight: 500;
	margin-bottom: 1rem;
}

.costPerTreeTooltipCost, .costOfDelayTooltipCost, .costToDcqTooltipCost {
	font-size: 1rem;
	font-weight: 400;
}

.costPerTreeTooltipValue, .costOfDelayTooltipValue, .costToDcqTooltipValue {
	font-size: 1rem;
	font-weight: 700;
}

/* Footer */

footer {
	background: #c4be98;
	padding: 3em 0;
}

#footer-logo {
	width: 160px;
	height: auto;
	margin-bottom: 1em;
}

.split {
	display: flex;
	justify-content: space-between;
}

.fineprint {
	font-size: 0.8rem;
	color: #545643;
}

.fineprint a {
	color: #333023;
}

.fineprint a:hover, .fineprint a:active {
	color: #545643;
	text-decoration: underline;
}


/* Media queries */

/* Change to video bg if not mobile */
@media screen and (min-width: 768px) {

	.vid-bg {
		display: block;
	}

	#intro {
		background-image: none;
	}

	.overlay-panel {
	    top: 400px;
		width: 24%;
		margin-left: 35%;
	}

	.left-overlay {
		margin-left: 5%;
	}

}

@media screen and (min-width: 1000px) {

	.inline-image {
		width: 100%;
		margin: 2% 0;
	}

	.left-image {
		width: 60%;
		float: left;
		margin: 2% 4% 2% -15%;
	}

	.right-image, blockquote {
		width: 60%;
		float: right;
		margin: 2% -15% 2% 4%;
	}

	.no-top-margin {
		margin-top: 0;
	}

}

@media (hover: hover) and (pointer: fine) {
	.vid-container {
		display: block;
	}

	.fixed-bg {
	    background-attachment: fixed;
	}

}

@media (min-aspect-ratio: 16/9) {
  video {
    width: 100%;
    height: auto;
  }
}

@media (max-aspect-ratio: 16/9) {
  video {
    width: auto;
    height: 100%;
  }
}


