
:root {
  --bg: #faf7f4;
  --fg: #3b3b3b;
  --em: #000;
  --boldbase: 0.0085em;
  --linkbold: calc(var(--boldbase) * 3);
  
  --cols: 40;
  --pad: 2ch;
  --min: 16px;
  --max: 18px;
  --ls: -0.035em;
  --fontsize: clamp(
    var(--min),
    calc((100vw - 2 * var(--pad)) / var(--cols)),
    var(--max)
  );
  --width: calc(var(--cols) * 1ch + var(--cols) * var(--ls));
  --ch: calc(1ch + var(--ls));
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  font-family: gt pressura mono, monospace;
  line-height: 1.6em;
  font-weight: 400;
  font-size: var(--fontsize);
  letter-spacing: var(--ls);
  /* animation: fadeIn 0.6s cubic-bezier(0.25, 0.1, 0.25, 1); */
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

/* 40ch-wide, centered container; font-size scales down on small screens so the full 40-character line always fits. */

.text {
  width: var(--width);
  margin-inline: auto;
  margin: 0 auto;
  padding-inline: var(--pad);
  white-space: pre;
  margin-top: -1lh;

  .block {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* box-shadow: 0 0 0 1px #ddd; */

}

.mono {
  white-space: pre;
}

a:not(.unlink),
a b {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  text-decoration-color: currentColor;
  transition: .15s;
}

a:not(.unlink):hover:not(:active),
a.unlink:hover:not(:active) b {
  -webkit-text-stroke: var(--linkbold) currentColor;
  -webkit-text-fill-color: currentColor;
}

b {
  --s: 1;
  font-weight: 400;
  color: var(--em);
  -webkit-text-stroke: calc(var(--boldbase) * var(--s)) currentColor;
  -webkit-text-fill-color: currentColor;
}

i:not(.logo) {
  letter-spacing: .15em;
  font-size: 1.1em;
  font-family: courier prime, monospace;
  font-weight: 400;
}

b i,
i b {
  letter-spacing: 0;
  --s: 5;
}


iframe {
  display: block;
  margin: 0 auto;
}

.cover {
  position: relative;
  height: 100svh;
  > div { position: absolute; width: 100%; margin-top: -1lh; }
  > .ratio { top: 38%; transform: translateY(-50%); }
  > .center { top: 50%; transform: translateY(-50%); }
  > .bottom { bottom: 0; }
}

.spaced {
  margin-top: 50lvh;
  margin-bottom: 50lvh;
}

.center {
  text-align: center;
}

.logo {
  display: inline-block;
  vertical-align: middle;
  --size: calc(6 * var(--ch));
  --ratio: 0.95;
  width: var(--size);
  position: relative;
  &:before,
  &:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--size);
    height: var(--size);
  }
  &:before {
    background-color: #fff;
  }
  &:after {
    background-size: calc(var(--size) * var(--ratio));
    background-position: center;
    background-repeat: no-repeat;
  }
}
.black .logo {
  &:before {
    /* background-color: color-mix(in srgb, var(--fg), var(--bg) 84%); */
    background-color: color-mix(in srgb, var(--fg), var(--bg) 100%);
  }
  &:after {
    filter: invert();
  }
}
.black .band .logo:before {
  background: none;
}
.menu .logo {
  top: .5lh;
}
.logo.fade {
  opacity: 0.2;
  margin-right: calc(var(--ch) * -1);
}
.black .logo.fade {
  opacity: 0.3;
}

.band { display: block; text-align: left; b { --s: 2; } }
.band.head { padding: 3ch 1ch; }
.band.foot { padding: 33lvh 1ch 3ch; }

.logo.u:after { background-image: url(brand/u.png?251120); }
.logo.m:after { background-image: url(brand/m.png?251120); }
.logo.a:after { background-image: url(brand/a.png?251120); }
.logo.b:after { background-image: url(brand/b.png?251120); }
.logo.i:after { background-image: url(brand/i.png?251120); }
.logo.x:after { background-image: url(brand/x.png?251120); }

.up {
  display: inline-block;
  transform: rotate(-90deg);
  position: relative;
  top: .2em;
  left: -.1em;
}

.inner {
  --bg: #fff;
  --fg: #282828;
}

.black {
  --bg: #000;
  --fg: #fff;
  --em: #fff;
  --boldbase: 0.016em;
  --linkbold: calc(var(--boldbase) * 2);
  --fr: calc(560/315);
  --fw: 75vw;
  @media(max-width: 900px){ --fw: 100vw; }
  --fh: calc(var(--fw) / var(--fr));
  --b: calc(var(--fh) * .25);
  .text,
  iframe {
    margin: var(--b) auto;
  }
  iframe {
    aspect-ratio: var(--fr);
    width: var(--fw);
    height: var(--fh);
  }
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

.bars {
  position: fixed;
  top: 0;
  right: 0;
  margin: 1lh;

  border-radius: 100%;
  overflow: hidden;
  display: flex;

  --h: 3.6ch;
  --bw: calc(var(--h) / 3);
  --w: calc(var(--bw) * 6);
  
  .bar {
    width: var(--bw);
    height: var(--h);
  }

  .white { background: #ffffff; }
  .yellow { background: #ffff00; }
  .cyan { background: #00ffff; }
  .green { background: #00ff00; }
  .magenta { background: #ff00ff; }
  .red { background: #ff0000; }
  .blue { background: #0000ff; }
  .black { background: #000000; }

  transition: .8s;
  &:hover { transform: scale(1.05); }
  &:active { transform: scale(.975); }

  mix-blend-mode: darken;

  &.nosignal {
    mix-blend-mode: normal;
    width: var(--w);
    height: var(--h);
    video {
      --s: 170%;
      width: var(--s);
      height: var(--s);
      object-fit: cover;
    }
  }
}

.black .bars {
  mix-blend-mode: lighten;
}

.menu-bg {
  object-fit: cover;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  opacity: .85;
}

body:not(.on) .menu-bg {
  visibility: hidden;
}
body.on .bars {
  mix-blend-mode: normal;
  /* video { display: none }
  background: red;
  width: var(--h);
  transform: translateX(calc((var(--w) - var(--h)) / -2)) */
}

.bar.white, .bar.black { display: none }

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

.pstl-flier {
  --speed: 60s;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
  width: min(100vw, 20svh);
  animation: pstl-fly var(--speed) linear infinite;
  animation-delay: 1s;
  transform: translateX(-120%) translateY(-120%) rotateZ(0);
  filter: invert();
  will-change: transform;
  mix-blend-mode: exclusion;
}

@keyframes pstl-fly {
  98.001%, 0% {  transform: translateX(-200%) translateY(100svh) rotateZ(0deg); display: block; }
  15% {          transform: translateX(100vw) translateY(-100%) rotateZ(180deg) }
  15.001%, 18% { transform: translateX(100vw) translateY(-30%)  rotateZ(0deg) }
  40% {          transform: translateX(-200%) translateY(3svh)   rotateZ(-180deg) }
  40.001%, 43% { transform: translateX(-200%) translateY(-100%) rotateZ(-180deg) }
  65% {          transform: translateX(100vw) translateY(50svh)  rotateZ(0deg) }
  65.001%, 68% { transform: translateX(20vw)  translateY(-200%) rotateZ(180deg) }
  95% {          transform: translateX(10vw)  translateY(100svh) rotateZ(0deg)}
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

@font-face {
  font-display: block;
  font-family: 'GT Pressura Mono';
  src: url('./font/gt-pressura-mono-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-display: block;
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  src: url('./font/courier-prime-regular.woff2') format('woff2');
}

@font-face {
  font-display: block;
  font-family: 'Courier Prime';
  font-style: italic;
  font-weight: 400;
  src: url('./font/courier-prime-regular-italic.woff2') format('woff2');
}

@font-face {
  font-display: block;
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  src: url('./font/courier-prime-bold.woff2') format('woff2');
}

@font-face {
  font-display: block;
  font-family: 'Courier Prime';
  font-style: italic;
  font-weight: 700;
  src: url('./font/courier-prime-bold-italic.woff2') format('woff2');
}