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

* {
  box-sizing: border-box;
}

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

/* container */

html {
  /* colors */
  color: var(--color-text);;
  background-color: var(--color-background);
  /* typography */
  font-family: 'Oracle', sans-serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0em;
  text-rendering: optimizeSpeed;
  /* layout */
  overflow-x: hidden;
  scroll-behavior: smooth;
}

main {
  padding: 0 var(--gap);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* header */

header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  background-color: var(--color-accent);
  font-size: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: 0.25s;
}

header .title {
  text-wrap: balance;
}

header.scrolled {
  top: -4rem;
}

header a:link, header a:visited {
  display: inline-block;
  padding: var(--gap);
  color: white!important;
}

header button {
  padding: var(--gap);
  color: white;
  cursor: pointer;
}

/* menu */

#menu {
  position: fixed;
  transform: translateX(100%);
  top: 0;
  right: 0;
  background-color: black;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

#menu.active {
  opacity: 1;
  transform: translateX(0);
}

#menu ul {
  display: flex;
  flex-direction: row;
}

#menu li {
  list-style: none;
  margin: 0;
}

#menu a {
  width: 100%;
  transition: 0.1s;
}

#menu a:hover {
  background-color: var(--color-accent);
}

#menu .active {
  text-decoration: underline;
}

/* footer */

footer {
  margin-top: 5rem;
  padding: var(--gap);
}

/* marks */

em {
  font-style: italic;
}

strong {
  font-weight: bold;
}

u {
  text-decoration: underline;
}

s {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

sup {
    font-feature-settings: "subs";
}

sub {
    font-feature-settings: "sups";
}

/* nodes */

h1 {
  font-size: 4rem;
  letter-spacing: -0.01em;
  line-height: 1;
  text-wrap: balance;
  max-width: 10em;
  hyphens: auto;
  hyphenate-limit-chars: auto 4 4;
}

h2 {
  font-size: 2.5rem;
  line-height: 1.1;
  text-wrap: balance;
  hyphenate-limit-chars: auto 4 4;
}

h3 {
  font-size: 2rem;
  line-height: 1;
  text-wrap: balance;
}

h4 {
  font-size: 1.25rem;
  text-wrap: balance;
}

h5 {
  font-size: 1rem;
  text-wrap: balance;
}

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

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

a, a:link, a:visited, a:active, a:focus {
  color: var(--color-accent)!important;
}

/* title */

#title {
  width: 100%;
  max-width: var(--width-l);
  margin: auto;
  position: relative;
  overflow: hidden;
  padding: var(--gap) 0;
}

.more,
.breadcrumb {
  font-variation-settings: "TRIP" 0.5;
  letter-spacing: 0.02em;
}
.more a,
.breadcrumb a {
  display: inline-block;
  height: 40px;
}

/* home */

.home header {
  position: fixed;
  background-color: transparent;
}

.home header.background {
  background-color: var(--color-accent);
}

.home #title {
  height: 100svh;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-1* var(--gap));
  background-color: var(--color-accent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.home #title .text {
  width: 100%;
  color: white;
  z-index: 10;
  padding: 0 var(--gap);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home h1 {
  font-size: 6rem;
}

.home h2 {
  font-size: 3rem;
}

.home #introduction {
  width: 100%;
  max-width: 35em;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  padding: 3rem 0;
}

.home #title .background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100svh;
  object-fit: cover;
  mix-blend-mode: screen;
  z-index: 0;
  opacity: 0.65;
}

.home #title .background img {
  transform: scale(1.1);
  transition: 0.1s;
}

/* pages */

#pages {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--gap);
  row-gap: 2rem;
  max-width: var(--width-l);
  margin: auto;
}

.item #pages {
  grid-template-columns: 1fr 1fr 1fr;
  padding: 0 2rem;
}

.item .tile h3 {
  font-size: 1.5rem;
}

.item .tile .teaser {
  font-size: 0.85rem;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tile .cover {
  aspect-ratio: 3/2;
  filter: grayscale(1);
  background-color: rgb(240, 240, 240);
  overflow: hidden;
}

.tile .text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* layout */

#layout {
  display: flex;
  flex-direction: column;
  margin: auto;
  margin-bottom: 5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  box-sizing: border-box;
  width: 100%;
  max-width: var(--width-l);
  padding: var(--gap) 0;
}

.grid:first-child {
  padding: 0;
}

.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;
}

/* text block */

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

.text-block * {
  width: 100%;
}

.text-block a:hover {
  text-decoration: underline;
}

/* image block */

.image-block {
  gap: 0.25rem;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  mix-blend-mode: darken;
}

img.zoom {
  cursor: zoom-in;
}

/* video block */

video {
  width: 100%;
}

/* quote block */

.quote-block {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  max-width: var(--width-s);
  padding-left: var(--gap);
  border-left: 0.15em dotted var(--color-text);
  box-sizing: border-box;
  margin: auto;
}

blockquote {
  display: flex;
  flex-direction: column;
  gap: 0.5em
}

/* figure */

figure {
  width: 100%;
  box-sizing: border-box;
  background-color: var(--color-lightgray);
  line-height: 0;
}

/* figcaption */

figcaption {
  font-size: var(--font-size-xs);
  line-height: 1.25;
  font-weight: 475;
  letter-spacing: 0.02em;
  box-sizing: border-box;
}

figcaption .source {
  display: inline-block;
  opacity: 0.5;
}

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

/* gallery */

#gallery {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100lvh;
  background-color: var(--color-background);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
  padding: 1rem;
  box-sizing: border-box;
  transition: 0.25s;
}

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

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

/* fx */

.lazy {
  opacity: 0;
  transform: translateY(1rem);
}

.loaded {
  opacity: 1;
  transform: translateY(0rem);
  transition: opacity 0.5s, transform 0.5s;
}

.shadow {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

html:has(.map) {
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
}

.map footer {
  display: none;
}

.maplibregl-popup {
  max-width: 100%!important;
  font-family: 'Oracle';
}

.maplibregl-popup-content a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.maplibregl-popup h3 {
  font-size: 1rem;
}

.maplibregl-popup h4 {
  font-size: 0.75rem;
}

