:root {
  /*--highlight: #0db810;*/
  --highlight: #68bac9;
  --uiBaseColor: #68bac9;
}

* {
  background-repeat: no-repeat;
  cursor: inherit;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

a {
  cursor: pointer;
  text-decoration: none;
  outline: 0;
  color: #569dac;
  font-weight: 500;
  transition: color .3s;
}

a:hover,
a:active {
  color: #7FC4C7;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 200;
  word-spacing: .1em;
  font-family:'Barlow', sans-serif;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;   /* guard: no element can force a wider layout viewport */
}

body {
  /*background-color: #eee;*/
  background-color: #3f6d80;
  margin: 0;
  min-height: 100%;
  font-family: 'Barlow', sans-serif;
  font-size: 1.1em;
  line-height: 1.25em;
  font-weight: 200;
  color: #444;
  cursor: default;
  overflow-x: hidden;


  transition: background-color .5s;
}

/*body.darkmode {*/
/*  !*background-color: #444;*!*/
/*  background-color: #3f6d80;*/
/*}*/

/*#bg {*/
/*  position: fixed;*/
/*  width: 100%;*/
/*  min-height: 100%;*/
/*  background-image: url('../img/header-bg.png');*/
/*  background-size: cover;*/
/*  background-position: center top;*/
/*  background-repeat: no-repeat;*/
/*  opacity: 0.5;*/
/*}*/

#bg:before {
  content: '';
  position: fixed;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(0, 0, 0, 0.1) 5%, rgba(0, 0, 0, .95) 95%);
  transition: opacity .5s;
}

/*.darkmode #bg:before {*/
/*  background-image: linear-gradient(rgba(0, 0, 0, 0.1) 5%, rgba(0, 0, 0, .95) 100%);*/
/*}*/

#bg:after {
  content: '';
  position: fixed;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right, rgba(0, 0, 0, .4), rgba(0, 0, 0, .0) 25%, rgba(0, 0, 0, .0) 70%, rgba(0, 0, 0, .4));

  opacity: 1;
  transition: opacity .5s;
}

/*.darkmode #bg:after {*/
/*  opacity: 1;*/
/*}*/

header {
  /* --- globe animation tuning knobs --- */
  --header-h: 30vw;   /* header height (overridden per breakpoint below) */
  --globe-x: 1.72;    /* horizontal: larger = globe further RIGHT, away from the ATLAS text */
  --globe-top: 29%;   /* vertical position of globe top within the header */
  --globe-h: 47%;     /* globe size (height) relative to the header */

  position: relative;
  display: block;
  height: var(--header-h);
  /*  min-height: 200px; */
  margin-bottom: -5vw;
  background-image: url('../media/header-logo3.png');
  background-position: 10% bottom;
  background-size: auto 100%;
  background-repeat: no-repeat;
}

header:after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  /*background-image: url('../img/icon.png');*/
  background-position: 62.0% 57%;
  background-size: 19.8% auto;
  background-repeat: no-repeat;
}

header.animate:after {
  background-image: none;
}

header .hero-anim {
  position: absolute;
  top: var(--globe-top);
  height: var(--globe-h);
  width: auto;                                       /* keeps 16:9 aspect */
  left: calc(10vw + var(--globe-x) * var(--header-h));
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s;
}

header .hero-anim.visible {
  opacity: 1;
}

#home>h4 {
  position: absolute;
  top: 85%;
  left: 30%;
  width: 55%;
  /*font-size: 1.3em;*/
  font-size: max(1.1em, 2vw);
  line-height: 1.3;
  font-style: italic;
  color: #fff;
}

/*.darkmode #home>h4 {*/
/*  color: #fff;*/
/*}*/

nav {
  position: fixed;
  width: 100%;
  top: 0;
  padding: 0 0 0 0;
  display: flex;
  justify-content: flex-start;
  z-index: 100;
  font-family: 'Barlow', sans-serif;
  /*font-size: 1.3em;*/
  font-size: max(1.1em, 1vw);
  color: #555;
  background-color: #333333;
  pointer-events: none;

  transition: background-image .3s;
}

nav * {
  pointer-events: all;
}

/*.darkmode nav {*/
/*  background-color: #333333;*/
/*}*/

nav a {
  position: relative;
  display: inline-block;
  padding: .4em 1em 0.5em 1em;
  color: #aaaaaa;
  font-weight: 400;
  transition: color .4s;
}

nav a:hover {
  color: #cccccc;
  text-decoration: underline; 
}

nav a.active {
  /*color: var(--highlight);*/
  color: rgb(104, 186, 201);
}

/*.darkmode nav a.active {*/
/*  color: rgb(104, 186, 201);*/
/*}*/

nav a[href='#home'] {
  padding-right: 1.5em;
  margin-left: 0.5em;
  background-image: url('../media/Logo_white.png');
  background-size: auto 65%;
  background-position: left;

  filter: grayscale(1);
  transition: filter .3s;
}

nav a[href='#home']:hover {
  /*background-image: url('../img/AtlasAnimation_ohne.gif');*/
  background-size: auto 70%;
}

nav a[href='#home']:hover,
nav a[href='#home'].active {
  filter: grayscale(0);
}
section {
  position: relative;
  padding-top: 5em;
  margin-bottom: -2em;
  pointer-events: none;
  z-index: 1;
}

section:first-of-type {
  padding-top: 0;
  margin-bottom: 1em;
}

section:last-of-type {
  margin-bottom: 0;
}

/* panels */
.panels {
  position: relative;
  display: flex;
  padding: 0.3em;
  justify-content: space-around;
  flex-wrap: wrap;
  pointer-events: all;
}

section>h1 {
  position: relative;
  display: block;
  width: 100%;
  /*color: #777;*/
  color: rgba(255, 255, 255, .6);
  /*font-weight: bold;*/
  text-align: center;
  padding: .4em 1em;

  text-transform: uppercase;
  font-family: Barlow, sans-serif;
  font-size: 2.0em;
  font-weight:300;
  text-indent: 0.3em;
  letter-spacing: 0.3em;
  /*color:#7FC4C7;*/

  transition: color .3s;
}

section.active>h1 {
  /*color: var(--highlight);*/
  color: rgb(104, 186, 201);
}


/*.darkmode section>h1 {*/
/*  color: rgba(255, 255, 255, .6);*/
/*}*/

/*.darkmode section.active>h1 {*/
/*  color: rgb(104, 186, 201);*/
/*}*/

/* pools */
#pools>.panels {
  align-items: flex-start;
}

/* contact */
#contact {
  min-height: 80vh;    /* fallback */
  min-height: 80svh;   /* stable height — avoids jitter as the mobile URL bar hides/shows */
}

.social>.content {
  text-align: center;
}

#facebook-qr,
#mail-qr,
#insta-qr,
#twitter-qr,
#telegram-qr {
  position: relative;
  display: inline-block;
  width: 6em;
  height: 2em;
  margin: 0 auto;
  background-size: contain;
  background-position: center top;
}

#insta-qr {
  background-image: url('../media/icons8-instagram-100b.png');
}

#twitter-qr {
  background-image: url('../media/icons8-twitter-100b.png');
}

#telegram-qr {
  background-image: url('../media/icons8-telegram-app-100b.png');
}

#facebook-qr {
  background-image: url('../media/icons8-facebook-100b.png');
}

#mail-qr {
  background-image: url('../media/icons8-mail-100b.png');
}

#facebook-qr:hover,
#mail-qr:hover,
#insta-qr:hover,
#twitter-qr:hover,
#telegram-qr:hover {
  transform: scale(1.1);
}

footer {
  width: 100%;
  padding: 5% 0 1% 0;
  text-align: center;
  color: #999;
  z-index: 0;
}

/* hamburger toggle button — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.4em;
  padding: .35em .6em;
  cursor: pointer;
  line-height: 1;
}

.nav-toggle:hover {
  color: #ddd;
}

/* dashboard error state */
.dashboard.error {
  position: relative;
  min-height: 6em;
}

.dashboard.error::after {
  content: 'Pool data temporarily unavailable — ' attr(data-error-detail);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  color: #999;
  font-size: 0.8em;
  padding: 1em;
  text-align: center;
  background: rgba(47, 47, 47, 0.92);
  z-index: 10;
  word-break: break-all;
}

/* responsive */
@media all and (max-width: 900px) {

  nav {
    flex-wrap: wrap;
    font-size: max(0.9em, 0.9vw);
  }

  nav > a {
    padding: .4em .6em;
  }

}

@media all and (max-width: 780px), all and (max-height: 500px) {

  header {
    --header-h: 35vw;   /* globe left/top/height recompute automatically from this */
    /*background-image: url('../img/header-logo-media.png');*/
  }

  header:after {
    background-position: 82.3% 48.4%;
    background-size: 30.2% auto;
  }

  /* hamburger menu active on mobile */
  .nav-toggle {
    display: block;
    order: -1;
    min-height: 44px;
    min-width: 44px;
  }

  nav {
    justify-content: flex-start;
    background-color: #333333;
    box-shadow: 0 .2em .3em rgba(0, 0, 0, .2);
    flex-wrap: wrap;
    font-size: max(0.7em, 0.8vw);
  }

  /* hide nav links until menu is open */
  nav > a {
    display: none;
    padding: .5em .4em;
    min-height: 44px;
    align-items: center;
  }

  nav.nav-open > a {
    display: flex;
  }

  section:first-of-type {
    padding-top: 3em;
  }

  section>h1 {
    font-size: 1.68em;   /* mobile headers +20% */
  }

  /* Atlas logo in the open hamburger menu — was clipped on its right edge */
  nav a[href='#home'] {
    width: 2.4em;
    padding-right: .6em;
    background-size: contain;
    background-position: left center;
  }

  #home>h4 {
    position: relative;
    top: 15%;
    left: 5%;
    width: 90%;
    padding-top: 2em;
    margin-bottom: -5em;
    text-align: center;
    font-size: 0.8em;
  }

  .panel {
    flex-basis: 100%;
    margin: .5em .1em;
  }

  .panel.content{
    font-size: 0.8em;
  }

  .panel.social>.content{
    flex-basis: 100%;
  }

  #facebook-qr,
  #mail-qr,
  #insta-qr,
  #twitter-qr,
  #telegram-qr {
    width: 2.5em;
  }

  th,
  td {
    max-width: 50vw;
  }

  .social{
    max-width: 60%;
  }

}

@media all and (max-width: 480px) {

  header {
    --header-h: 42vw;   /* globe left/top/height recompute automatically from this */
  }

  header:after {
    background-position: 88% 50%;
    background-size: 38% auto;
  }

  section>h1 {
    font-size: 1.44em;   /* mobile headers +20% */
    letter-spacing: 0.15em;
  }

  #home>h4 {
    font-size: 0.75em;
    left: 3%;
    width: 94%;
  }

  .panels {
    padding: 0.1em;
  }

  #facebook-qr,
  #mail-qr,
  #insta-qr,
  #twitter-qr,
  #telegram-qr {
    width: 2.75em;
    height: 2.75em;   /* >=44px tap target on phones */
  }

  .social {
    max-width: 80%;
  }

}

/* Landscape phones / very short viewports: width-only breakpoints miss these
   (wide but short), so size the header to viewport HEIGHT — `30vw` would explode
   to a huge header in landscape. The globe `left` calc tracks --header-h, so it
   follows automatically. */
@media (max-height: 500px) {

  header {
    --header-h: 55vh;    /* fallback */
    --header-h: 55svh;   /* stable against mobile address-bar show/hide */
  }

  #contact {
    min-height: auto;
  }

}