/* General rules */

html {
  -webkit-text-size-adjust: 100%; /* needed for iOS Safari landscape mode */
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Exo', sans-serif;
  font-size: 17px;
  line-height: 30px;
  text-align: center;
  color: #2F3133;
  background-color: #00B2A9; /* needed for iOS Safari toolbar tint */
}



/* Text formatting */

h3, h5, p {
  max-width: 600px;
  width: 100%;
  margin: 0;
}

h3 {
  font-weight: 500;
  font-size: 22px;
}

h5 {
  font-weight: 600;
  font-size: 18px;
}

p {
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

p:not(:last-of-type) {
  /* inserts padding after paragraphs, except for the last paragraph in a multi-paragraph text */
  padding-bottom: 12px;
}

strong {
  font-weight: 600;
}

ul {
  padding: 0 0 12px 20px;
  margin: 0;
}

.wall-of-text ul {
  list-style-type: none;
}

.wall-of-text li {
  position: relative;
}

.wall-of-text li:before {
  content: "•";
  position: absolute;
  left: -15px;
}

.floating-box h5,
.big-list-item-content h5 {
  margin-bottom: 12px;
}

.section.impressum p,
.section.footer p {
  padding-bottom: 12px;
}

.hero.background-image,
.pill {
  color: white;
}

.section.inverted,
.footer {
  color: rgba(255,255,255,0.9);
}

.herotext {
  font-weight: 200;
  padding-bottom: 36px;
  padding-left: 36px;
  padding-right: 36px;
  max-width: 960px;
  margin: auto;
}

.section-header {
  font-weight: 500;
  font-size: 26px;
  line-height: 48px;
  margin-bottom: 36px;
  max-width: 600px;
  width: 100%;
}

.brandguide-overlay-box h3 {
  margin-bottom: 24px;
}

.wall-of-text {
  text-align: left;
}

.footer {
  font-size: 14px;
  line-height: 26px;
}

.quote {
  font-style: italic;
  color: #00B2A9;
}

.blog-article-teaser h5 a,
.blog-article h3 a {
  text-decoration: none;
}

p.date {
  font-style: italic;
  color: #606566;
}

.blog-article-teaser {
  text-align: left;
  line-height: 26px;
}

.blog-article-teaser p.date {
  font-size: 15px;
}




/* Links and buttons */

a {
  color: #00B2A9;
  box-sizing: border-box;
  transition: all 300ms;
}

a:hover:not(.maplink) {
  opacity: 0.75;
}

a.blue:not(.pill) {
  color: #0597CC;
}

.footer a:not(.button) {
  color: inherit;
  line-height: 42px;
}

.maplink {
  color: inherit;
  text-decoration: none;
}

.button {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  font-weight: 500;
  line-height: 38px;
  padding-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
}

.button:not(.big) {
  height: 40px;
}

.button:hover {
  text-decoration: none;
}

.big {
  font-size: 20px;
  width: 100%;
  min-width: 192px;
  max-width: 312px;
  flex-basis: auto;
  flex-grow: 1;
  border-radius: 12px;
  padding: 26px 24px 24px 24px;
  margin: 24px;
  background-color: #E5F7F6;
}

.pill {
  font-size: 16px;
  margin-top: 24px;
  padding: 2px 18px 0 18px;
  border-radius: 22px;
  background-color: #00B2A9;
}

.pill.blue {
  background-color: #0597CC;
}

.inverted .pill {
  color: #2F3133;
  background-color: white;
}

.footer .pill {
  color: #2F3133;
  background-color: rgba(255,255,255,0.75);
  margin: 12px;
  width: 192px;
}




/* Icons and images */

img {
  border-style: none;
}

.blog-article > img {
  width: 100%;
}

.blog-article > img:not(:last-child) {
  margin-bottom: 12px;
}

.blog-article > img:not(:first-child) {
  margin-top: 12px;
}

.linearicons,
.linearicons-big {
  font-family: 'Linearicons';
  line-height: 1;
}

a.button .linearicons {
  font-size: 20px;
  margin-top: 8px;
  margin-bottom: 10px;
}

.button.big .linearicons {
  font-size: 28px;
  margin-top: 4px;
  margin-bottom: 6px;
}

.button .linearicons:first-child {
  margin-right: 8px;
}

.button .linearicons:last-child {
  margin-left: 8px;
}

.linearicons-big {
  font-size: 48px;
  margin: 12px;
}

.icon-close {
  font-size: 20px;
  padding: 12px;
  color: #9AA2A6;
  align-self: flex-end;
  cursor: pointer;
  transition: opacity 300ms;
}

.icon-close:hover {
  opacity: 0.75;
}

.logo-futurelab {
  height: 30px;
  width: 140px;
}

.logo-as-header {
  /* width: 384px; */
  max-width: 100%;
  height: 48px;
  max-height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.row-of-icons {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.background-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}




/* Top bar elements */

.topbar {
  display: flex;
  margin: 0 auto;
  width: 100%;
  position: absolute;
  z-index: 1000;
  transition: background-color 300ms;
}

.no-hero .topbar,
.jsdisabled .topbar,
.scrolled .topbar {
  background-color: rgba(0, 178, 169, 0.95);
  box-shadow: 0 0 12px 0 rgba(0,0,0,0.12);
}

.topbar .content {
  flex-flow: row wrap;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a.goto-home {
  margin: 12px auto 12px 12px;
  display: flex;
}

.topbar .logo-futurelab {
  height: 28px;
  width: 131px;
}

.topbar ul {
  display: flex;
  list-style-type: none;
  padding: 0;
}

.topbar li {
  display: flex;
}

.currentpage,
.topbar a:not(.goto-home) {
  padding-top: 4px;
  border-bottom: 2px solid transparent;
  line-height: 34px;
}

.topbar a:not(.goto-home) {
  text-decoration: none;
  color: white;
}

.currentpage {
  color: rgba(255, 255, 255, 0.75);
  transition: padding-bottom 300ms;
}

.page-nav {
  margin-left: 12px;
  margin-right: 12px;
  text-transform: uppercase;
}

.topbar .page-nav .currentpage {
  border-bottom-color: rgba(255,255,255,0.675);
}

.topbar .page-nav li a:hover {
  border-bottom-color: rgba(255,255,255,0.9);
  transition: all 300ms;
}

.lang-nav {
  margin-top: 6px;
}

.lang-nav li.currentpage,
.lang-nav li a {
  padding-left: 12px;
  padding-right: 12px;
}




/* Content sections */

.section, .hero, .brandguide-overlay {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
}

.hero.background-image, .map {
  height: 100vh;
  max-height: 1080px;
}

.no-hero .hero {
  background-color: #F7F9FA;
}

.section {
  padding: 72px 24px;
}

.section.map {
  min-height: 480px;
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
}

.map-overlay {
  padding: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: column nowrap;
  background-color: rgba(0,178,169,0.15);
}

.content {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-flow: column nowrap;
}

.section .content {
  max-width: 1360px;
  align-items: center;
  justify-content: center;
}

.content.multiple-columns {
  flex-flow: row wrap;
  align-items: stretch;
}

.section.footer {
  align-items: center;
  padding-top: 48px;
  padding-bottom: 48px;
  background-color: #606566;
}

.footer-contact {
  font-size: 16px;
  margin-top: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-self: stretch;
}

.content.gallery {
  flex-flow: row wrap;
  padding: 48px 0;
  max-width: 1640px;
}

.gallery figure {
  margin: 3px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.brandguide-overlay {
  display: none;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(47,49,51,0.75);
  z-index: 2000;
}

.brandguide-overlay-box {
  background-color: white;
  border-radius: 24px;
  padding: 12px;
  margin: 12px;
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  max-width: 480px;
}

.brandguide-overlay--visible {
  display: flex;
}

.brandguide-overlay-content {
  padding: 0 12px 12px 12px;
  display: flex;
  width: 100%;
  box-sizing: border-box;
  flex-flow: column nowrap;
  align-items: center;
}


/* Smaller elements */

.floating-box {
  box-sizing: border-box;
  border-radius: 12px;
  width: 100%;
  min-width: 224px;
  max-width: 480px;
  flex-basis: auto;
  flex-grow: 1;
  background-color: rgba(9, 105, 146, 0.9);
  padding: 24px 24px 18px 24px;
}

.floating-box-left {
  margin-right: auto;
}

.floating-box-right {
  margin-left: auto;
}

.blog-article {
  margin-bottom: 48px;
  width: 100%;
  max-width: 600px;
  border-bottom: 1px solid #E6E9EB;
  padding-bottom: 48px;
}

.content.agenda {
  max-width: 360px;
  font-weight: 500;
  margin-top: 24px;
  align-items: stretch;
}

.agenda-item {
  margin-top: 24px;
}

.agenda-item:not(:last-child) {
  border-bottom: 1px solid #E6E9EB;
  padding-bottom: 24px;
}

p.agenda-item-time {
  font-size: 15px;
  color: #5F6466;
  padding-bottom: 0;
}

.agenda-item-title {
  color: #0078A7;
}

.big-list-item {
  width: 100%;
  max-width: 720px;
  display: flex;
  padding: 48px 0;
  align-items: center;
  justify-content: space-between;
  border-top: solid 1px rgba(255,255,255,0.5);
}

.big-list-item-header {
  font-size: 24px;
  text-transform: uppercase;
  width: 192px;
}

.big-list-item-content {
  max-width: 480px;
  width: 100%;
}

.box {
  box-sizing: border-box;
  margin: 24px;
  width: 100%;
  min-width: 240px;
  max-width: 408px;
  flex-basis: auto;
  flex-grow: 1;
  padding: 24px 24px 18px 24px;
  border-radius: 12px;
  background-color: #F7F9FA;
}

.box.transparent {
  background-color: transparent;
}

.person {
  box-sizing: border-box;
  margin: 15px;
  width: 240px;
}

.person img {
  width: 192px;
  height: 192px;
  margin-bottom: 6px;
  border-radius: 96px;
}

.no-hero .topbar,
.jsdisabled .topbar,
.scrolled .topbar,
.floating-box,
.map-overlay,
.brandguide-overlay {
  backdrop-filter: blur(5px) saturate(200%);
  -webkit-backdrop-filter: blur(5px) saturate(200%);
}



/* Media queries */

@media only screen and (min-width: 624px) {
  /* Bigger devices */

  .topbar {
    top: 0;
    position: fixed;
  }

  .scrolled .topbar .currentpage,
  .scrolled .topbar li a {
    padding-bottom: 6px;
    transition: padding-bottom 300ms;
  }

  .page-nav {
    margin-top: 6px;
  }

  .jsenabled:not(.no-hero) .page-nav {
    align-items: flex-start;
  }

  .page-nav li:not(:last-of-type) {
    margin-right: 30px;
  }

  .lang-nav {
    margin-left: 12px;
    margin-right: 12px;
  }

  .herotext {
    font-size: 48px;
    line-height: 72px;
    padding-top: 88px;
  }

  .blog-article {
    /* Avoid titles ending up under the navbar when jumping to an anchor. */
    margin-top: -96px;
    padding-top: 96px;
  }

}

@media only screen and (max-width: 623px) {
  /* Smaller devices */

  .scrolled .topbar {
    top: 0;
    position: fixed;
  }

  .page-nav {
    order: 1;
    flex-basis: 100%;
    border-top: 1px solid rgba(255,255,255,0.25);
    justify-content: space-around;
  }

  .scrolled .page-nav {
    border-top: none;
  }

  .scrolled .goto-home,
  .scrolled .topbar .lang-nav {
    display: none;
  }

  .herotext {
    font-size: 36px;
    line-height: 54px;
    padding-top: 129px;
  }

  .blog-article {
    /* Avoid titles ending up under the navbar when jumping to an anchor. */
    margin-top: -64px;
    padding-top: 64px;
  }

}

@media only screen and (max-width: 479px) {
  /* Distribute rect-items with narrow screens */

  .herotext {
    font-size: 28px;
    line-height: 42px;
    padding-top: 129px;
  }

  .button.big,
  .box,
  .person {
    margin-left: 0;
    margin-right: 0;
  }
}

@media only screen and (max-width: 767px) {
  /* big-list-item design for smaller devices */

  .big-list-item {
    flex-flow: column nowrap;
    max-width: 480px;
  }

  .big-list-item-header {
    margin-bottom: 36px;
  }

  .big-list-item h5 {
    text-align: center;
  }

}




/* Gallery media queries */

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

  .gallery figure,
  .gallery .landscape img {
    height: 240px;
  }

  .gallery figure,
  .gallery .portrait  img {
    width: 240px;
  }
}

@media only screen and (min-width: 642px) and (max-width: 1031px) {

  .gallery figure,
  .gallery .landscape img {
    height: 192px;
  }

  .gallery figure,
  .gallery .portrait  img {
    width: 192px;
  }
}

@media only screen and (min-width: 372px) and (max-width: 641px) {

  .gallery figure,
  .gallery .landscape img {
    height: 156px;
  }

  .gallery figure,
  .gallery .portrait  img {
    width: 156px;
  }
}

@media only screen and (max-width: 371px) {
  /* Distribute gallery items with narrow screens */

  .gallery figure,
  .gallery .landscape img {
    height: 120px;
  }

  .gallery figure,
  .gallery .portrait  img {
    width: 120px;
  }
}




/* Dark mode media queries */

@media (prefers-color-scheme: dark) {

  body,
  .icon-close,
  a.button.big {
    color: rgba(255,255,255,0.9);
  }

  .section img {
    opacity: 0.75;
  }

  a {
    color: #00CCC2; /* Mint, then brightness +10 */
  }

  p.date, p.agenda-item-time {
    color: #9AA2A6; /* Concrete */
  }

  body,
  .no-hero .topbar,
  .jsdisabled .topbar,
  .scrolled .topbar,
  .pill {
    background-color: rgba(0, 128, 121, 0.95); /* Mint, then -20 to brightness, then 95% of that */
  }

  .pill.blue {
    background-color: #0078A7; /* Ocean */
  }

  .section.footer {
    background-color: #19191A; /* Night */
  }

  .big {
    background-color: rgba(0,178,169,0.5); /* Mint */
  }

  .floating-box {
    background-color: rgba(37, 60, 73, 0.9); /* 20% Ocean over Anthracite, then +5 to hue, then 90% of that */
  }

  .no-hero .hero, .brandguide-overlay-box, .box {
    background-color: #3F4144; /* 33% Smoke over Anthracite */
  }

  .brandguide-overlay {
    background-color: rgba(47,49,51,0.75); /* Smoke @75% */
  }

  .blog-article, .agenda-item:not(:last-child) {
    border-bottom: 1px solid #606566; /* Smoke */
  }

  .agenda-item-title {
    color: #7FBBD3; /* 50% Ocean */
  }
}
