:root {
  --bg-light: white;
  --bg-dark: black;
  --fg-light: black;
  --fg-dark: white;
  --gray: #757575;
  --selection-bg-light: #ccc;
  --selection-fg-light: #444;
  --selection-bg-dark: #555;
  --selection-fg-dark: #eee;
  --bg: var(--bg-light);
  --fg: var(--fg-light);
  --selection-bg: var(--selection-bg-light);
  --selection-fg: var(--selection-fg-light);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--bg-dark);
    --fg: var(--fg-dark);
    --selection-bg: var(--selection-bg-dark);
    --selection-fg: var(--selection-fg-dark);
  }
}

html[data-theme="light"] {
  --bg: var(--bg-light);
  --fg: var(--fg-light);
  --selection-bg: var(--selection-bg-light);
  --selection-fg: var(--selection-fg-light);
}

html[data-theme="dark"] {
  --bg: var(--bg-dark);
  --fg: var(--fg-dark);
  --selection-bg: var(--selection-bg-dark);
  --selection-fg: var(--selection-fg-dark);
}

::selection {
  background-color: #ccc;
  color: #444;
  text-shadow: none;
}

::-moz-selection {
  background-color: #ccc;
  color: #444;
  text-shadow: none;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme])::selection {
    background-color: #555;
    color: #eee;
  }

  html:not([data-theme])::-moz-selection {
    background-color: #555;
    color: #eee;
  }
}

html[data-theme="light"]::selection {
  background-color: #ccc;
  color: #444;
}

html[data-theme="light"]::-moz-selection {
  background-color: #ccc;
  color: #444;
}

html[data-theme="dark"]::selection {
  background-color: #555;
  color: #eee;
}

html[data-theme="dark"]::-moz-selection {
  background-color: #555;
  color: #eee;
}

@font-face {
  font-family: 'Futura PT';
  src: url('fonts/futurapt-light-webfont.eot');
  src: url('fonts/futurapt-light-webfont.eot?#iefix') format('embedded-opentype'),
       url('fonts/futurapt-light-webfont.woff2') format('woff2'),
       url('fonts/futurapt-light-webfont.woff') format('woff'),
       url('fonts/futurapt-light-webfont.ttf') format('truetype'),
       url('fonts/futurapt-light-webfont.svg#futura_ptlight') format('svg');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

html {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 300;
  transition: background-color 100ms ease, color 600ms ease;
  overflow: hidden;
  background-repeat: repeat;
  background-position: center;
  background-attachment: scroll;
  background-size: auto;
}

.w {
  height: 100vh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
}

.t {
  position: relative;
  margin: 0;
  font-family: 'Futura PT', Arial, Helvetica, sans-serif;
  font-size: 5rem;
  font-weight: 300;
  line-height: 1;
  color: black;
  color: var(--fg);
  z-index: 2;
  pointer-events: none;
  user-select: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 500ms ease 50ms, color 800ms ease-out 80ms;
}

.fl .t {
  visibility: visible;
  opacity: 1;
}

.nb {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: transparent;
  font-size: 0.8rem;
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  border-radius: 0.6rem;
  backdrop-filter: blur(6px);
  z-index: 9;
}

html[data-theme="light"] .nb {
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: #555;
}

html[data-theme="dark"] .nb {
  background-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
  color: #aaa;
}

.nl {
  display: inline-block;
  box-sizing: border-box;
  padding: 0.4rem 0.8rem;
  border-radius: 0.3rem;
  color: gray;
  color: var(--gray);
  background: none;
  text-decoration: none;
  font-weight: bold;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  margin: 0 1.1rem;
}

.nl:hover,
.nl:focus {
  text-decoration: underline;
  background: rgba(128, 128, 128, 0.2);
  border-color: rgba(128, 128, 128, 0.3);
  box-shadow: 0 8px 20px rgba(128, 128, 128, 0.4);
}

.nl:focus,
.nl:focus-visible {
  outline: 2px solid silver;
  outline-offset: 2px;
}

#tt {
  position: fixed;
  bottom: 0.5rem;
  right: 0.5rem;
  background: transparent;
  color: gray;
  color: var(--gray);
  border: none;
  font-size: 1rem;
  line-height: 1;
  padding: 0.2rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 50ms ease, filter 50ms ease;
}

#tt:hover,
#tt:focus-visible {
  opacity: 1;
  outline: none;
}

#tt.invert {
  filter: invert(1);
}

#to {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  transition: none;
  background: transparent;
  opacity: 0;
  transform: scale(1);
}

.vh {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  /* stylelint-disable-next-line property-no-deprecated */
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

@supports (gap: 1rem) {
  .nb .nl {
    margin: 0;
  }
}

@supports not ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))) {
  .nb {
    z-index: 999;
  }

  html[data-theme="light"] .nb {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  }

  html[data-theme="dark"] .nb {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 660px) {
  .t {
    font-size: 3rem;
  }

  .nb {
    padding: 0.4rem 0.5rem;
    color: black;
  }

  html[data-theme="dark"] .nb {
    color: white;
  }
}

@media (max-width: 400px) {
  .t {
    font-size: 2.5rem;
  }

  .nb {
    font-size: 0.8rem;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    left: 2rem;
    right: 2rem;
    transform: none;
    justify-content: center;
  }

  .nl {
    padding: 0.4rem 0.5rem;
    margin: 0 0.3rem;
  }
}

html[data-theme="dark"] .t {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3), 0 0 11px rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] .t {
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.3), 0 0 11px rgba(0, 0, 0, 0.2);
}


@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  .nb {
    backdrop-filter: none;
    background-color: rgba(255, 255, 255, 0.1);
  }

  html[data-theme="dark"] .nb {
    background-color: rgba(0, 0, 0, 0.1);
  }
}

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .w {
    display: -ms-flexbox;
    -ms-flex-pack: center;
    -ms-flex-align: center;
    height: 100vh;
    text-align: center;
  }

  .t {
    margin-left: 0;
    display: inline-block;
  }

  html[data-theme="dark"] .t {
    color: white;
  }

  html[data-theme="light"] .t {
    color: black;
  }
}

@media (max-width: 400px) and (-ms-high-contrast: none), (max-width: 400px) and (-ms-high-contrast: active) {
  .t {
    margin-left: 0;
  }
}

@media (orientation: landscape) and (max-height: 400px) and (-ms-high-contrast: none), (orientation: landscape) and (max-height: 400px) and (-ms-high-contrast: active) {
  .nb {
    bottom: 0.6rem;
    padding: 0.35rem 0.45rem;
  }

  .nl {
    margin: 0 0.25rem;
    padding: 0.3rem 0.45rem;
  }

  #tt {
    bottom: 0.15rem;
    right: 0.2rem;
  }
}

html[data-theme="dark"] body {
  background-color: black;
  color: white;
  background-image: url('dark.png');
}

html[data-theme="light"] body {
  background-color: white;
  color: black;
  background-image: url('light.png');
}
