/*
 * The old site's global styles (_reset, _variables, _mixins, _typography,
 * _general.scss), converted once to plain CSS (ADR-0007). The `onScreen`
 * breakpoints are written out:
 *   phone-only (max-width: 599px)       tablet-portrait-up (min-width: 600px)
 *   phone-and-tablet-landscape-only (max-width: 900px)
 *   tablet-landscape-up (min-width: 900px)   desktop-up (min-width: 1024px)
 *   macbook-up (min-width: 1200px)      big-desktop-up (min-width: 1800px)
 *   landscape (orientation: landscape)  hover-device (hover: hover)
 * The `paragraphStyle` presets are repeated where they are used; each one
 * is marked with a comment.
 */

:root {
  --color-base: #000;
  --color-bg: #fff;
  --color-marker: #7ff2bb;
  --color-line: #ff0;
  --color-map: #242424;

  --transition-default: 400ms ease;
  --transition-fast: 200ms ease;
  --transition-quadr: 600ms ease;

  --font-size-base: 20px;
  --font-size-base-mobile: 4.75vmin;
  --font-size-small: 0.775rem;
  --font-size-medium: 1.22rem;
  --font-size-large: 1.42rem;
  --font-size-very-large: 12vmin;
  --font-size-very-large-mobile: 7vw;

  --spacing-xs: 0.25rem;
  --spacing-s: 0.75rem;
  --spacing-m: 1rem;
  --spacing-lm: 2rem;
  --spacing-l: 3rem;
  --spacing-xl: 6rem;

  --opacity: 0.4;
  --hamburger-width: 2rem;
}

/* 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, sub, sup, tt, var, b, u, i,
center, dl, dt, dd, ol, ul, li, 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;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  display: block;
}

body {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;

  &::before,
  &::after {
    content: none;
  }
}

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

/* Typography */

@font-face {
  font-family: 'Futura';
  src: url('../fonts/FuturaBooObl/font.woff2') format('woff2'), url('../fonts/FuturaBooObl/font.woff') format('woff');
  font-weight: 200;
  font-style: italic;
}

@font-face {
  font-family: 'Futura';
  src: url('../fonts/FuturaMedObl/font.woff2') format('woff2'), url('../fonts/FuturaMedObl/font.woff') format('woff');
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: 'Futura';
  src: url('../fonts/FuturaMed/font.woff2') format('woff2'), url('../fonts/FuturaMed/font.woff') format('woff');
  font-weight: 400;
}

@font-face {
  font-family: 'Futura';
  src: url('../fonts/FuturaBoo/font.woff2') format('woff2'), url('../fonts/FuturaBoo/font.woff') format('woff');
  font-weight: 200;
}

html,
body {
  font-family: 'Futura', sans-serif;
  line-height: 1.25;
}

strong {
  font-weight: 400;
}

em {
  font-style: italic;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
}

/* paragraphStyle('large') */
h1,
h2 {
  font-size: var(--font-size-large);
  font-weight: 400;
}

/* paragraphStyle('medium') */
h3, h4, h5, h6 {
  font-size: var(--font-size-medium);
  font-weight: 400;
}

a,
a:link,
a:visited,
a:active {
  color: currentColor;
  text-decoration: underline;
  text-underline-offset: 0.1em;

  @media (hover: hover) {
    transition: opacity var(--transition-fast);

    &:hover {
      opacity: var(--opacity);
    }
  }
}

p {
  margin-bottom: 1em;
  hyphens: auto;
}

ol,
ul {
  padding-left: 1.5em;

  p {
    margin: 0;
  }
}

ol {
  list-style-type: decimal;
}

ul {
  list-style-type: disc;
}

u {
  text-decoration: none;
}

/* paragraphStyle('small') */
figcaption {
  font-size: var(--font-size-small);
  letter-spacing: 0.03em;
  font-weight: 200;
  text-align: center;
  margin: var(--spacing-s) 0;
  max-width: calc(100% - 1em);
}

/* paragraphStyle('medium_text') */
.medium-text,
.medium-text p {
  font-size: var(--font-size-medium);
  line-height: 1.35;
  font-weight: 200;
}

/* paragraphStyle('small') */
.small-text,
.small-text p {
  font-size: var(--font-size-small);
  letter-spacing: 0.03em;
  font-weight: 200;
}

/* General */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* paragraphStyle('normal') */
html,
body {
  background-color: var(--color-map);
  color: var(--color-base);
  font-size: var(--font-size-base-mobile);
  font-weight: 200;
  line-height: 1.4;

  @media (min-width: 900px) {
    font-size: var(--font-size-base);
  }
}

/* The overlay. */
.scroll-area {
  background-color: var(--color-bg);
  color: var(--color-base);
  width: 100vw;
  height: 100dvh;
  position: fixed;
  inset: 0;
  overflow: auto;
  z-index: 1001;

  @media (min-width: 900px) {
    width: 500px;
    left: unset;
  }
}

.block {
  margin-bottom: 1rem;
}

img {
  transition: opacity var(--transition-default);
  vertical-align: middle;
  max-width: 100%;
}

/*
 * Images fade in once they have loaded, as vue-lazyload's did: hidden here
 * while scripts run, faded in by assets/js/images.js. Without scripts they
 * show as soon as they load.
 */
@media (scripting: enabled) {
  img.lazy {
    opacity: 0;
  }
}

/*
 * Focus rings only for keyboard navigation (assets/js/focus.js): after a
 * mouse or touch press, none, even when keys are pressed afterwards. Also
 * MapLibre's glow on its buttons, which it draws with a box-shadow; the
 * second selector outweighs its `button:focus:focus-visible`.
 */
html[data-input="pointer"] :focus {
  outline: none;
}

html[data-input="pointer"] .maplibregl-ctrl button:focus,
html[data-input="pointer"] .maplibregl-ctrl button:focus:focus-visible {
  box-shadow: none;
}

/* Figures (_figures.scss): a box with the image's aspect ratio. */
.aspect-ratio-wrap {
  height: 0;
  width: 100%;
  overflow: visible;
  position: relative;
  background-color: rgba(0, 0, 0, 0.05);

  img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    background-color: white;
  }
}

.no-margin {
  margin: 0 !important;
}
