@import 'fonts.css';
@import 'variables.css';

html {
  color: var(--color-text);
  background-color: var(--color-background);
  background-color: rgb(255, 255, 255);
  text-rendering: optimizeSpeed;
  font-weight: 400;

  font-family: 'Oracle', sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.25;
  font-size: 24px;
}

header {
  display: inline-block;
  gap: 0.25rem;
  box-sizing: border-box;
  z-index: 3000;
  position: relative;
  line-height: 1;
  position: sticky;
  top: 0;
}

.title a {
  display: block;
  font-size: 1rem;
  padding: var(--gap);
  box-sizing: border-box;
  opacity: 1!important;
  line-height: 1;
  background-color: white;
}

/* clouds */

#wind-container {
  position: fixed;
  width: 100%;
  height: 100vh;
  top: 0;
  left: 0;
}

.cloud {
  position: fixed;
  top: 0rem;
  left: 0rem;
  min-height: 1em;
  max-width: 30rem;
  padding: 0.35em;
  box-sizing: border-box;
  transition: opacity 2s;
  opacity: 0;
}

.cloud.windy {
  opacity: 1;
}

.cloud.title {
  padding: 0;
  position: fixed;
  opacity: 1!important;
}

.cloud.emoji {
  font-size: 1.5em;
  z-index: 0;
  cursor: default;
}

.cloud.about {
  font-size: 1em;
  line-height: 1.2;
  width: 19em;
  max-width: 90vw;
}

.cloud.contact a {
  font-size: 1em;
  background-color: var(--color-text);
  border-radius: 2rem;
  display: block;
  padding: 0.2em 0.65em 0.25em 0.65em;
  line-height: 1;
  color: var(--color-background)!important;
  text-decoration: none;
  transition: background-color 0.2s;
}

.cloud.contact a:hover {
  background-color: var(--color-accent);
}

.cloud.footnote {
  padding: 0;
}

.cloud.footnote input {
  display: none;
}

.cloud.footnote label {
  padding: var(--gap);
  box-sizing: border-box;
  display: block;
  cursor: pointer;
  font-size: 0.75rem;
}

.cloud.footnote .popup {
  display: none;
  position: fixed;
  left: 0;
  bottom: 0;
  padding: var(--gap);
  box-sizing: border-box;
  width: 100vw;
  z-index: 100;
  background-color: white;
  font-size: 0.75rem;
}

.cloud.footnote:has(:checked) .popup {
  display: block;
}

.cloud.footnote .popup a {
  text-decoration: underline;
}

.cloud.project-tile {
  border-radius: 0.5em;
  transition: box-shadow 0.25s, opacity 1s;
  padding: 0.4em 0.5em 0.3em 0.5em;

}

.cloud.project-tile:hover {
  box-shadow: 0 0 3em rgba(0, 30, 255, 0.15);
}

.cloud h2 {
  font-size: 1em;
  line-height: 1;
  padding-bottom: 0.1em;
  color: var(--color-accent);
}

.cloud h3 {
  font-size: 0.75em;
  letter-spacing: 0.01em;
}

.home canvas {
  pointer-events: none;
}

.default .title a,
.project .title a {
  color: var(--color-accent);
}

/* layout */

#layout {
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--gap));
  position: relative;
  z-index: 0;
  padding: 0 var(--gap);
  box-sizing: border-box;
}

#layout:has(.fullscreen) {
  padding: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

.column {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.blocks {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.blocks:has(.sticky) {
  position: sticky;
  top: var(--gap);
}

.block {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* image block */

.image-block {
  gap: 0.25rem;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

/* audio block */

.audio-block {
  line-height: 0;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

audio {
  width: 100%;
  max-width: 37em;
  
}

/* video block */

.video-block figure {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.video-block figcaption {
  text-align: center;
  margin-top: 0.25rem;
  max-width: 50em;
}

video {
  width: 100%;
  
  box-sizing: border-box;
  box-shadow: 0px 0.5rem 1rem rgba(0, 0, 0, 0.5);
  outline: 1px solid rgb(80, 80, 80);
  outline-offset: -1px;
  border-radius: 10px;
}

/* quote block */

.quote-block {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  max-width: 37em;
  padding-top: var(--gap);
  padding-bottom: var(--gap);
}

blockquote {
  border-left: 2px solid var(--color-text);;
  padding-left: 1em;
  box-sizing: border-box
}

/* code block */

.code-block {
  background-color: rgba(60, 60, 65, 0.2);
  color: var(--color-text);
  border-radius: 6px;
  outline: 1px solid rgba(150, 150, 150, 0.25);
}

.code-block pre {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: pre;
  padding: 1rem;
  scrollbar-color: rgba(255, 255, 255, 0.5) black;
  scrollbar-width: thin;
  font-size: 0.9em;
}

.code-block figcaption {
  position: absolute;
  bottom: 0rem;
  right: 0rem;
  padding: 0.25em 0.5em;
  text-transform: uppercase;
  border-radius: 3px;
  opacity: 0.75;
}

/* figure */

figure {
  width: 100%;
  box-sizing: border-box;
  line-height: 0;
}

figcaption {
  font-size: 0.75rem;
  text-wrap: balance;
  box-sizing: border-box;
  text-align: center;

}

figcaption .source {
  color: rgb(150, 150, 150);
}

.audio-block figcaption {
  text-align: center;
}

/* text block */

.text-block {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  gap: var(--gap);
}

a, a:link, a:visited {
  color: var(--color-text);
}

em {
  font-style: italic;
}

u {
  text-decoration: underline;
}

s {
  text-decoration: line-through;
}

ul li {
  list-style: disc;
  margin-left: 1em;
}

ol li {
  list-style: decimal;
  margin-left: 2em;
}

.text-block h2 {
  font-size: 4rem;
  letter-spacing: -0.03em;
  line-height: 0.9;
  margin-bottom: -0.1rem;
  margin-left: -0.05em;
}

.text-block h3 {
  font-size: 2rem;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.text-block h4 {
  font-size: 1.5rem;
}

.text-block p,
.text-block ul,
.text-block ol {
  max-width: 33em;
}

/* footnotes */

#footnotes {
  width: 100%;
  max-width: 38em;
  
  padding-bottom: var(--gap);
  padding-top: 0.25em;
}

.footnotes-list {
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

/* credits */

#credits {
  width: 100%;
  max-width: 35rem;
  padding-top: 2rem;
}

#credits table {
  width: 100%;
  
  border-collapse: collapse;
  box-sizing: border-box;
  font-size: 0.85rem;
}

#credits th {
  font-size: 0.75rem;
}

#credits tr {
  display: grid;
  grid-template-columns: 35% 65%;
  padding: 0.15em 0;
  padding-bottom: 0.1em;
  align-items: first baseline;
  border-bottom: 1px solid var(--color-text);
}

#credits a {
  color: var(--color-text)!important;
}

/* gallery */

#gallery {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(50px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2000;
  padding: 0.5rem;
  box-sizing: border-box;
}

#gallery.open {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

#gallery img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

/* fx */

img.zoom {
  cursor: pointer;
}

.shadow {
  box-shadow: 0px 0.5rem 1rem rgba(0, 0, 0, 0.25);
  outline: 1px solid rgb(0, 0, 0);
  outline-offset: -1px;
  border-radius: 0.5rem;
}

.lazy {
  opacity: 0;
}

.loaded {
  opacity: 1;
  transition: opacity 0.5s;
}



























/* downloads block */

.downloads-collection {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: var(--layout-width);
  
}

.downloads-item {
  display: inline-block;
  padding: 0.5em;
  box-sizing: border-box;
  background-color: var(--color-g);
  border: 1px solid var(--color-d);
  font-size: 0.75rem;
  border-radius: 6px;

}

/* faq block */

.faq-block {
  width: 100%;
  max-width: var(--layout-width);
  
  border-radius: 1rem;
  background-color: white;
}

summary {
  padding: 1rem;
  cursor: pointer;
  display: list-item;
}

summary + p {
  padding: 1rem;
  padding-top: 0;
}

summary::marker {
  content: "+ ";
}

details[open] summary::marker {
  content: "- ";
}

/* diagram */

.diagram-container {
  max-width: 42rem;
}

.diagram-container svg {
  width: 100%;
  font-family: 'Sohne';
  letter-spacing: 0.02em;
}

/* diagram legend */

.diagram svg.legend-ramp {
  width: 350px;
  margin-left: 0;
  margin-bottom: 1rem;
}

.legend-swatches {
  font-family: 'Sohne';
  font-size: 0.65rem;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.legend-swatch {
  margin-right: 0;
  display: flex;
}

.legend-swatch svg {
  margin-right: 3px;
  width: auto;
}

/* page block */

.pages-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 25rem;
  box-sizing: border-box;
}

.pages-item {
  padding: 0.75rem;
  border-radius: 1rem;
  min-height: 5rem;
  box-sizing: border-box;
}

.pages-block h2 {
  font-size: 1.25rem;
  line-height: 1.1em;
  text-wrap: balance;
  font-weight: bold;
}

.pages-block .tag {
  font-size: 0.75rem;
  opacity: 0.65;
  padding-bottom: 0.2em;
  color: inherit
}

.pages-block .subtitle {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  max-width: 42em;
}

.pages-block .subtitle * {
  display: inline;
}

.pages-item.article-page {
  background-color: var(--color-d);
}

.pages-item.map-page {
  background-color: var(--color-f);
}

.pages-item.diagram-page {
  background-color: white;
}

.pages-item.story-page {
  background-color: var(--color-e);
  color: var(--color-c);
}

/* diagram block */

.diagram-block {
  max-width: 42rem;
  width: 100%;
  gap: 0;
}

.diagram-block .diagram-container {
  background-color: rgb(240, 240, 242);
  width: 100%;
}

.diagram-block h2 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.diagram-block .subtitle {
  margin-bottom: 0.5rem;
}

.diagram-block figcaption {
  padding: 0.5rem 1rem;
  box-sizing: border-box;
  font-size: 0.75rem;
  text-align: left;
  text-wrap: auto;
  text-wrap: balance;
  text-align: center;
}

/* map */

.map-container {
  position: relative;
  width: 100%;
}

.map-canvas {
  width: 100%;
  height: calc(100svh - 5rem);
  align-self: self-start;
  position: sticky;
  top: 0;
}

.scroll .map-canvas {
  border-radius: 0;
  position: sticky;
  top: var(--gap);
  width: 100%;
  height: calc(100lvh - 4 * var(--gap));
}

.no-scroll .map-canvas {
  position: relative;
  transition: none;
  outline: 2px solid white;
  outline-offset: -1px;
}

.fullscreen .map-canvas {
  border-radius: 0;
  height: 100vh;
  outline: none
}

/* map block */

.map-block {
  gap: 0
}

/* map legend */

.map-container .legend {
  display: flex;
  flex-direction: row;
  column-gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  background-color: rgba(255, 255, 255);
  backdrop-filter: blur(10px);
  z-index: 1000;
  font-size: 0.75rem;
  position: sticky;
  bottom: 0;
  margin-top: -1rem;
}

.map-container .legend-section {
  display: flex;
  flex-direction: row;
  column-gap: 0.5em;
  flex-wrap: wrap;
  align-items: center;
}

.map-container .legend::selection {
  background-color: transparent;
}

.map-container .legend-item label {
  height: 40px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  padding: 0 0.25em;
}

.legend-item:hover label {
  text-decoration: underline;
}

.legend-item .legend-item-color {
  display: inline-block;
  height: 1em;
  width: 1em;
  border-radius: 1em;
  margin-right: 0.25em;
  outline: 1px solid rgba(0, 0, 0, 0.25);
  outline-offset: -1px;
  transition: 0.2s;
}

.legend-item.checkbox {
  transition: 0.2s;
}

.legend-item.checkbox label {
  cursor: pointer;
}

.legend-item.checkbox input[type=checkbox] {
  display: none;
}

.legend-item.checkbox:not(:has(:checked)) {
  opacity: 0.5;
}

.legend-item.checkbox:not(:has(:checked)) .legend-item-color {
  background-color: rgb(255, 255, 255)!important;
}

.legend-item select {
  height: 1.75em;
  background-color: rgb(255, 255, 255);
  border-radius: 12px;
  padding: 0 0.25em;
  box-sizing: border-box;
  border-right: 0.25em solid transparent;
  outline: 1px solid rgb(220, 220, 220);
  cursor: pointer;
}

.legend-item.hidden {
  display: none;
}

/* map fullscreen */

body:has(.map-container.fullscreen) {
  overflow: hidden;
}

.map-container.fullscreen {
  top: 0;
  left: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  padding: 0;
}

/* map fullscreen button */

.toggle-fullscreen {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  background-color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.5s;
  outline: 1px solid #00000010;
  outline-offset: -1px;
  box-shadow: 0 0px 20px #00000025;
}

.toggle-fullscreen svg {
  fill: var(--color-e);
  width: 0.8rem;
  height: 0.8rem
}

.toggle-fullscreen .shrink,
.toggle-fullscreen.active .expand {
  display: none
}

.toggle-fullscreen .expand,
.toggle-fullscreen.active .shrink {
  display: block
}

.scroll .toggle-fullscreen {
  display: none;
}

/* map stories */

.scenes {
  scroll-snap-type: both mandatory;
  scroll-behavior: smooth;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 110vh;
  position: relative;
  z-index: 100;
  font-size: 0.85rem;
  pointer-events: none;
  margin-top: 0rem;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 110vh;
}

.scenes h2 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.scenes h3 {
  margin-top: 0;
}

.scene {
  padding: 0.4rem;
  pointer-events: all;
  transition: opacity 0.8s;
  opacity: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 22em;
  text-align: center;
  background-color: #ffffff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.scene.active {
    opacity: 1;
}















.maplibregl-popup {
  max-width: 90vw!important;
}

.maplibregl-popup-content {
  padding: 0!important;
}

.maplibregl-cooperative-gesture-screen {
  display: none !important;
}

/* map feature popup */

.maplibregl-popup-content {
  background-color: transparent;
  box-shadow: none;
  position: sticky;
  top: 0;
}

.feature-popup {
  background-color: transparent;
  box-shadow: none;
}

.popup-content {
  border-radius: 0rem;
  background-color: rgba(255, 255, 255);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px #00000050;
  outline: 2px solid white;
  outline-offset: -1px;
}

.feature-popup .popup-content {
  font-family: 'Oracle', sans-serif;
  overflow-y: hidden;
  padding: 0.25rem 0.25rem;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto;
  row-gap: 0.25em;
  column-gap: 1em;
  max-width: 75vw;
  font-size: 0.75rem;
  line-height: 1.3;
}

.feature-popup .popup-section {
  max-width: 20em;
}

.feature-popup .popup-item-key {
  color: rgb(150, 150, 150);
  font-weight: 400;
  letter-spacing: 0.01em;
  font-size: 0.85em;
}