:root{
    /* --c-active: hsl(72, 100%, 50%);
    --c-map: hsl(20, 70%, 35%); */

    /* taking back some color of the clock */
    --c-active: rgb(170,255,0);
    --c-alternate: saddlebrown;

    --c-ligth-back: whitesmoke;
    --c-dark-back: #333;
    --c-translucent: rgba(245,245,245,0.7);

    --fs-small: 0.8rem;
    --fs-big: 1.2rem; /* for desktop styled index page Authentic sans condensed */
    --fs-computer-small: min(6vw, 2.5rem);
    --fs-computer-logo: min(12vw, 5rem);

    --pad-v: 0.3rem;
    --border: 1px solid var(--c-dark-back);
    --bleed: 6mm;
}
/* 4 period colors */
.day{
    background-color: white;
    color: black;
}
.night{
    background-color: black;
    color: white;
}
.sunrise{
    background-color: Coral;
    color: black;  
}
.sunset{
    background-color: LightPink;
    color: black;  
}


.map, #map{
    /* all path are super thin */
    --thin: 0.5px;
    /* this is the thickness of the main walk */
    --thick: 4px;
    /* this is the thickness of the white outlines */
    --outline: 1px;

    /* default / web ? */
    --c-map:rgb(172,147,110); /* saddlebrown; */
    --c-map-light: rgb(172,147,110); /* saddlebrown; */
    --c-map-strong: rgb(25, 158, 4);

    /* palette 1 */
    /* --c-map: #907165;
    --c-map-light: #ff7477;
    --c-map-strong: #407060; */

    /* palette 2 */
    /* --c-map: #ac936e;
    --c-map-light: #e0d3c9;
    --c-map-strong: #00a95c; */

    /* palette 3 */
    /* --c-map: grey;
    --c-map-light: gainsboro;
    --c-map-strong: #44d62c; */

    /* reworking sizes */
    --fs-computer-logo: 4rem;


    font-size: 10.5pt;
    line-height: 12.5pt;
}


/*  GLOBAL INTERFACE STYLING
    ----------------------------------------------------- */

html{
    scroll-behavior: smooth;

    /* make sure that everybody can read this */
    /* 
        because you're jumping between looking far outside and looking at a screen
        the guide should be a transition into that 
    */
    font-size: 1.2em;
    font-family: 'Authentic-sans-condensed';
}

body{
    font-size: inherit;
    line-height: 1.35;
}
body > main{
    position: relative;
}

body:not(.guide){
    display: grid;
    grid-template-rows: auto 1fr;
    height: 100vh;
}

html.map body {
    display: initial;
    height: initial;
}

a{
    color: currentColor;
    text-decoration: none;
}
small{
    font-size: var(--fs-small);
}

/* for project name and view names */
h1
{
    font-family: 'Computer';
    font-style: normal;
    text-transform: lowercase;
    font-size: var(--fs-computer-logo);
    font-weight: bold;
    letter-spacing: 0.15em;
    line-height: 1.15;
	text-align: center;
	paint-order: stroke;
	z-index: 999;
    -webkit-text-stroke: 0.025em currentColor;
}
.guide h1{
    color: var(--c-active);
}

h2, h3, strong{
    font-weight: bold;
}

h2{
    text-decoration: underline;
    text-align: center;
}
* + h2{
    margin-top: 4rem;
}
h3 + p{
    margin-top: 0;
}
* + h3{
    margin-top: 2rem;
}
* + p{
    margin: 0.5em 0;
}

hr{
    border: none;
    margin: 1em 0 4em;
    border-bottom: var(--border);
}

/* for tree names */
em{
    font-weight: bold;
}

table{
    width: 100%;
    margin-bottom: 2rem;
}

@media screen and (max-width: 769px) {
    * + h2{
        margin-top: 2rem;
    }
    
    h3 + p{
        margin-top: 0;
    }
    * + h3{
        margin-top: 1rem;
    }
}

/*  TEXT LAYOUT
    ----------------------------------------------------- */

.text{
    scroll-margin: 9999px;
    max-width: 85ch;
    padding: 1rem 1rem 1rem;
}
.text  ul{
    padding-left: 1.25em;
    position: relative;
}
.text  ul li::before{
    content: '>';
    position: absolute;
    left: 0;
    z-index: 0;
}
.about .text a,
.story .text a,
.index .text a{
    text-decoration: underline;
    color: var(--c-alternate);
}
.text img{
    display: block;
    max-width: min(100%, 12rem);
    margin: 1em auto;
}
.text dl{
    margin-top: 0.5em;
}
.text dd{
    padding-left: 1.25rem;
    margin-bottom: 0.5em;
    position: relative;
    z-index: 0;
}
.text dd::before{
    content: '>';
    position: absolute;
    left: 0;
    z-index: 0;
}
.text section{
    padding-top: 1em;
    padding-bottom: 3em;
}



/*  TAB NAVIGATION
    ----------------------------------------------------- */

nav{
    position: sticky;
    top: 0;
    z-index: 999;
}
nav ul{
    display: flex;
    border-bottom: var(--border);
}
nav ul li{
    flex-basis: 0;
    flex-shrink: 1;
    flex-grow: 1;
    margin: 0 !important;
}
nav ul li a{
    display: block;
    background-color: var(--c-ligth-back);
    padding: var(--pad-v) 0.5rem;
    text-align: center;
}
nav ul li form {
    display: flex;
    background-color: var(--c-ligth-back);
    padding: var(--pad-v) 0.5rem;
    text-align: center;
}
nav ul li form button {
    flex: 1 0;
    background: none;
    border: none;
    font: inherit;
    margin: 0;
    padding: 0;
    text-align: center;
}
nav ul li:not(:last-of-type) a,
nav ul li:not(:last-of-type) form{
    border-right: var(--border);
}
nav .back::before{
    content: '<\00a0\00a0';
    font-weight: normal;
}
nav li.active{
    color: var(--c-active);
}
nav h1{
    background-color: var(--c-dark-back);
    color: white;
    margin: 0;
    padding: var(--pad-v) 0.5rem 0rem;
    font-size: var(--fs-computer-small);
}

nav.lang{
    font-size: var(--fs-small);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    color: black;
}
nav.lang ul{
    border-bottom: none;
    border-top: var(--border);
}

/*  DETAILS TAG
    ----------------------------------------------------- */

summary{
    background-color: var(--c-ligth-back);
    padding: var(--pad-v) 1rem;
    cursor: pointer;
    text-align: center;
    border-bottom: var(--border);
}
details summary + div{
    padding: 1em;
    font-size: var(--fs-small);
}

body > main > details:first-child{
    margin-top: 1px;
    position: absolute;
    top: 0;
    z-index: 999;
    left: 0;
    right: 0;
}
details[open]{
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(0.4em);
    z-index: 14;
}

/*  INDEX SPECIFIC
    ----------------------------------------------------- */

body.index{
    display: grid;
    grid-template-columns: 50% 50%;
    min-height: 100vh;

    /* nice readability */
    font-size: var(--fs-big);
    line-height: 1.45;

    --top-pad: calc(4 * 1.15 * var(--fs-computer-logo));
}
.index-map{
    position: fixed;
    top: 0;
    right: 0;
    left: 50%;
    height: 100vh;
    overflow: hidden;
    border-left: var(--border);
}
.index h1,
.map h1{
	/* position: fixed;
	top: 5rem;
	left: 50%;
	right: 0;
	transform: translate(-50%, 0);*/

	pointer-events: none;
	z-index: 500;
	color: var(--c-active);
    text-shadow: 0 0 0.05em grey;

	/* opacity: 1;
	transition: 1s opacity; */
}
/* body.index.scrolled h1{
    opacity: 0;
} */

.banner{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.1em;
    position: relative;
}
.banner > img{
    max-width: 100%;
    min-width: 0;
    margin: 0;
}
.banner > h1{
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* When there are no images keep some whitespace. */
.banner > h1:only-child {
	margin: 2ch 0;
	position: relative;
	grid-column-end: span 3;
}

@media screen and (max-width: 769px) {
    body.index{
        display: block;
    
        /* put back standard font-size and line-height */
        font-size: 1rem;
        line-height: 1.35;
    }
    .index-map{
        position: static;
        height: 80vh;
        left: 0;
        overflow: hidden;
        border-left: 0;
        border-top: var(--border);
    }
    body.index h1 {
        position: fixed;
        top: 2.5rem;
        left: 0;
        right: 0;
        transform: none;

        padding: 0;
        width: 100%;
    }
    .images {
        /* grid-template-columns: repeat(2, 1fr); */
        max-width: 100%;
        margin-top: calc(var(--top-pad) - 5em);
    }
}

/*  GUIDE SPECIFIC
    ----------------------------------------------------- */

body.guide{
    padding: 1rem;
}
body.guide > *:nth-child(2){
    margin-top: 0;
}

/* dialogue flow */
body.guide > *{
    scroll-margin: 50vh;
    margin: 0.5rem 0;
    transition: 0.25s opacity;
}
body.guide :target{
    opacity: 1;
}
body.guide :target a{
    color: var(--c-alternate);
}
body.guide :target + * {
    opacity: 0;
    display: block !important;
}
body.guide :target ~ * {
    display: none;
}

body.guide li + li,
body.about li + li{
    margin-top: 0.5rem;
}
body.guide ul{
    padding: 0;
}
body.guide li a{
    display: block;
    padding: 0 1.25rem;
    position: relative;
}
body.guide li a::before{
    content: '>';
    position: absolute;
    left: 0;
}

body.guide nav {
    margin: -1rem -1rem 2rem -1rem;
}

body.guide.text nav ul li::before {
    content: "";
    display: none;
}

/*  Story SPECIFIC
    ----------------------------------------------------- */

.one_story:not(:last-of-type){
    border-bottom: var(--border);
    padding-bottom: 0.5rem;
}


/*  Soundscape SPECIFIC
    ----------------------------------------------------- */

body.soundscape main {
    display: flex;
}

body.soundscape [data-playing="false"] {
    flex: 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 1.35em;
}

body.soundscape [data-playing="false"] span {
    text-align: center;
}

body.soundscape [data-playing="true"] {
    flex: 1 0;
    display: grid;
    grid-template-rows: 50% min-content 1fr;
}

body.soundscape [data-playing="true"] div {
    text-align: center;
}

body.soundscape [data-playing][hidden] {
    display: none;
}

body.soundscape #stop-soundscape {
    display: flex;
    align-items: center;
    justify-content: center;
}

/*  PORTRAIT SPECIFIC
    ----------------------------------------------------- */

body.portrait > main{
    padding-top: calc(1.35rem + calc(2 * var(--pad-v)) + 1rem);
}

.clock-frame{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    bottom: 0;
    z-index: 999;
}

.subtitle{
    position: fixed;
    bottom: 0;
    height: auto;
    left: 0;
    right: 0;
    padding: 0.5em 1em;
    font-size: var(--fs-small);
}
.subtitle a{
    color: var(--c-active);
}

/*  Overview
    ----------------------------------------------------- */
.overview-wrapper {
    display: grid;
    grid-template-rows: 1fr min-content;
    width: 100vw;
    height: 100vh;
}

.overview-wrapper > nav#language-switch {
    position: initial;
    top: initial;
}

.overview-wrapper > nav#language-switch {
    border-top: var(--border);
    border-bottom: none;
}

.overview{
    --fs-computer-small: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100vw;
    height: 100%;
    overflow: hidden;
    background: white;
}
.overview > div{
    position: relative;
    width: 100%;
    height: 100%;
}
.overview > div > iframe{
    width: 100%;
    height: 100%;
}

.overview nav{
    position: absolute;
    bottom: 0;
    top: 0;
    width: 100%;
    z-index: 99999;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    mix-blend-mode: difference;
    flex-wrap: wrap;
    align-content: flex-end;
}
.overview .interactive nav{
    top: auto;
    height: 3rem;
}
.overview nav .tree{
    flex: 1 0 100%;
    text-align: center;
    font-weight: bold;
    box-sizing: border-box;
}
.overview nav > span{
    padding: 0 1rem;
}

.thumbnail img{
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
}
.thumbnail h1{
    position: absolute;
    inset: 0;
    z-index: 9;
    display: flex;
    color: white;
    justify-content: center;
    align-items: center;
}

/* css kiosk adjustment */
.kiosk main{
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}
.kiosk .subtitle{
    bottom: 1rem;
    display: none;
}
.kiosk .legend{
    display: none;
}
.kiosk.clock-view{
    display: flex;
    align-items: center;
}

.kiosk #time-toggles{
    text-align: center;
}
.kiosk #graph-container{
    margin-top: 1rem;
}
.kiosk #graph-legend-container {
    margin-top: 1rem;
}
.kiosk .data-graph-legend-entry{
    font-size: 90%;
}
.data-graph-legend-entry{
    display: flex !important;
}
.data-graph-legend-entry div{
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
}
.data-graph-legend-entry span{
    width: 33%;
}
.data-graph-legend-entry span:nth-of-type(2){
    text-align: center;
}
.data-graph-legend-entry span:nth-of-type(3){
    text-align: right;
}

/*  DATA / GRAPH SPECIFIC
    ----------------------------------------------------- */

body.data #graph-legend-container label {
    display: block;
    margin-bottom: .5ch;
}

body.data #graph-legend-container input {
    margin-right: 1ch;
}

body.data #graph-container {
    /*height: calc((9/16) * 100vw);*/
    height: 40vh;
}

body.data {
    --color-growth: burlywood;
    --color-flow: goldenrod;
    --color-air-temperature: hsl(280, 100%, 50%);
    --color-temperature: hsl(340, 100%, 50%);
    --color-co2 : rgb(0,255,0);
    --color-humidity: rgb(0,255,255);
}

body.data svg text {
    font-family: 'Authentic-sans-condensed';
    font-size: .8rem;
}

body.data #time-toggles,
body.data #graph-legend-container {
    padding: 1ch;
}

body.data #time-toggles [data-active] {
    text-decoration: underline;
}

body.data select {
    font: inherit;
}

/*  MAP SPECIFIC
    ----------------------------------------------------- */

body.map{
    background-color: whitesmoke;
}
#map{
    background-color: white;
    overflow: hidden;
}

/* --- printing styles --- */

.map body{
    line-height: inherit;
    background-color: whitesmoke;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.page .leaflet-control-container{
    display: none !important;
}
.page{
    background-color: white;
    padding: var(--bleed);
    /* height: 309mm;  */
    /* width: 222mm; */
    height: 297mm;
    width: 210mm;
    box-sizing: border-box;
    flex-shrink: 0;
    flex-grow: 0;
    overflow: hidden;
    position: relative;
}
.page::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    border: var(--bleed) solid rgba(251, 175, 175, 0.2);
    pointer-events: none;
}
.page #map{
    width: 100%;
    height: 100%;
    top: -3cm;
    transform: scale(1.1);
}
@page {
    size: 222mm 309mm;
    margin: 0;
}
@media print{
    .page {
        margin: 0;
    }
    .page::after {
        display: none;
    }
}

/* --- wheelchair legend --- */
#interface-map-legend {
    z-index: 1000;
    position: fixed;
    bottom: .7rem;
    left: 1rem;
    max-width: 50vw;
    text-decoration: underline var(--c-map-strong) dashed var(--thick);
    text-decoration-skip-ink: none;
	font-size: .75rem;
	font-family: 'Authentic-sans-condensed';
	line-height: 1.2;
	-webkit-text-stroke: calc(var(--outline) * 3.5) white;
	paint-order: stroke;
	color: var(--c-map-strong);
}

/* --- interpolation styles --- */

#interpolation-selector {
    position: fixed;
    z-index: 999;
    background-color: var(--c-ligth-back);
    padding: var(--pad-v) 1rem;
    cursor: pointer;
    text-align: center;
    border-bottom: var(--border);
    left: 0;
    right: 0;
    top: 2rem;

    display: none;
}
.app-map{
    position: fixed;
    /* top: 5.25rem; */
    top: 2rem;

    right: 0;
    left: 0;
    bottom: 0;
    height: auto;
    overflow: hidden;
}

/* --- control and default --- */

img.leaflet-marker-icon,
img.leaflet-marker-shadow{
    display: none;
}
div.leaflet-marker-icon{
    background-color: initial;
    border: none;
}

.leaflet-touch .leaflet-bar {
    border-radius: 0 !important;
	border: var(--border) !important;
}
.leaflet-left .leaflet-control {
	margin-left: 1rem !important;
}
.leaflet-top .leaflet-control {
	margin-top: 0.7rem !important;
}
.leaflet-touch .leaflet-bar a{
	border-radius: 0 !important;
    background-color: var(--c-ligth-back);
    font-size: 1rem !important;
}
.leaflet-bar a {
	border-bottom: var(--border) !important;
}
.leaflet-bar a:last-child {
	border-bottom: none !important;
}
.leaflet-container a {
    font-family: inherit;
    font-size: inherit;
	color: currentColor !important;
}
.leaflet-container .leaflet-control-attribution {
	background: var(--c-ligth-back) !important;
	padding: 0.25em 0.5em;
    font-family: 'Authentic-sans-condensed';
    font-size: var(--fs-small);
}
.leaflet-container a > .leaflet-attribution-flag{
    display: none !important;
}
.contour-layer {
    fill: none;
}
[data-map-style="aerial"] .leaflet-tile-pane {
	z-index: 200;
	filter: brightness(1.3) grayscale(1);
}

[data-map-style="map"] .leaflet-tile-pane {
	z-index: 200;
	filter: brightness(.8) contrast(1.9) grayscale(1)
}
.new-control{
    position: absolute;
    top: 0.7rem;
    right: 1rem;
    z-index: 999999999;
    background-color: var(--c-ligth-back);
    border: var(--border);
    font-size: 1rem;
    font-family: 'Authentic-sans-condensed';
    line-height: 1.2;
    padding: 0.25em 0.5em;
}

.map-view .new-control,
.map-view .leaflet-control-container{
    font-size: var(--fs-small);
}

/* --- drawing OSM elements --- */
.label-walk {
	font-size: 1rem;
	font-family: 'Authentic-sans-condensed';
	line-height: 1.2;
	stroke: white;
	stroke-width: calc(3 * var(--outline));
	paint-order: stroke;
	fill: var(--c-map-strong);
}
.marker-box {
    font-size: 1rem;
    font-family: 'Authentic-sans-condensed';
    line-height: 1.2;
    margin-top: -3px;
    margin-left: 6px;
    width: max-content;
    padding: 2px 0.75em;
    position: relative;

    background-color: initial;
    -webkit-text-stroke: calc(var(--outline) * 3.5) white;
    paint-order: stroke;
    color: var(--c-map-strong);
}
.marker-box.poi{
    color: var(--c-map);
    padding: 0 0.5em;
}
.marker-box:not(.poi)::after{
    --s: 0.6em;

    content: '';
    margin-top: 9px;

    position: absolute;
    top: calc(var(--s) * -0.5);
    left: calc(var(--s) * -0.5);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background-color: var(--c-map-strong);

    border: calc(var(--outline) * 1.25) solid white;
    box-sizing: border-box;
}

.marker-box div[data-position="left"] {
    position: absolute;
    right: calc(100% + .75em);
    bottom: 0;
}

path.park-layer{
    fill: var(--c-map-light);
    stroke-width: 0;
}
path.water-layer{
    fill: var(--c-map-strong);
    stroke-width: 0;
    fill: url('/map#diagonalHatch');
}
path.ways-layer-outline{
    fill: none;
    stroke-width: 1.75;
    stroke: white;
    /* stroke-width: calc(var(--thin) * 2);
    stroke: white; */
}
path.ways-layer{
    fill: none;
    stroke-width: var(--thin);
    stroke: var(--c-map);
    /* stroke-width: calc(var(--thin) * 2);
    stroke: white; */
}
path.poi-layer{
    stroke-width: 0;
    stroke: none;
    fill: none;
}
path.poi-layer.building{
    stroke-width: var(--outline);
    fill: var(--c-map);
    stroke: white;
}
path.walk-layer{
    fill: none;
    stroke-width: var(--thick);
    stroke: var(--c-map-strong);
    stroke-linecap: round;
}
path.walk-complement-layer{
    stroke-width: var(--thick);
    stroke-dasharray: 4,8;
    stroke-linecap: round;
}

/* --- legend and text --- */

.map h1{
    color: var(--c-map-strong) !important;
    position: absolute !important;
    top: auto !important;
    bottom: calc(1cm + var(--bleed)) !important;
    width:105mm !important;
    left: calc(105mm + var(--bleed)) !important;
    text-shadow: none !important;
    transform: none !important;
}

.map #logos {
	position: absolute;
	bottom: calc(8mm + var(--bleed));
	left: calc(10mm + var(--bleed));
	display: grid;
	grid-template-columns: min-content min-content;
	height: 10mm;
	column-gap: 8mm;
}

.map #logos img {
	height: 9mm;
}

#legend{
    position: absolute;
    top: 0;
    z-index: 999;
    color: var(--c-map-strong);
    bottom: calc(1.5cm + var(--bleed));
    left: var(--bleed);
    top: auto;
    padding: 1cm;
    right: calc(105mm + var(--bleed));
    -webkit-text-stroke: calc(var(--outline) * 2) white;
    paint-order: stroke;
}
#legend ol{
    color: var(--c-map);
    padding-left: 1em;
    list-style: decimal;
}
#legend ul{
    margin: 1em 0;
}
#legend ul li{
    display: block;
    margin-bottom: 0.5em;
}
#legend ul li:nth-child(1){
    text-decoration: underline var(--c-map-strong) solid var(--thick);
    text-decoration-skip-ink: none;
}
#legend ul li:nth-child(2){
    text-decoration: underline var(--c-map-strong) dashed var(--thick);
    text-decoration-skip-ink: none;
}
/* #legend ul li:nth-child(3){
    text-decoration: underline var(--c-map) solid var(--thick);
    text-decoration-skip-ink: none;
} */



/** PRINT STYLES **/
/*
html, body, .page, #map, .map body {
	background: none;
	background-color: none;
}

:root, #map {
  --c-map: black;
  --c-map-light: black;
  --c-map-strong: black;
}
*/
/** Green styles, hide elements to make the PDF lighter **/
/*
.map #logos,
.park-layer,
.water-layer,
.ways-layer,
.ways-layer-outline,
#legend ol,
.poi-layer.building,
.marker-box.poi {
	visibility: hidden;
}
*/

/** Brown styles **/
/*
:root, #map {
	--c-map-strong: white;
}

#legend ul {
	visibility: hidden;
}
*/
/*
 activate lines below to hide walk layer and create more of an overlay effect.
*/
/*
.walk-layer {
	visibility: hidden;
}
*/

/* ---------------------------- */

.langgg{
    position: absolute;
    bottom: -1rem;
    right: 1rem;
    line-height: 1;
    font-size: var(--fs-computer-logo);
}

.touch-dialogue{
    position: fixed !important;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999999;
    transition: 0.5s;
    opacity: 1;
    pointer-events: none;
}
.touch-dialogue.hidden{
    opacity: 0;
}
.touch-dialogue > div{
    border-radius: 4rem;
    padding: 2rem;
    background-color: white;
    border: 1px solid grey;
}