:root {
  --bg: #a1a6a6;
  --ink: #ffffff;
  --mono-ink: rgba(255, 255, 255, 0.42);
  --mono-hover: rgba(255, 255, 255, 0.75);
  --pad: 24px;
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Background transmission lines + traveling pulses ----- */
.texture {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ----- Corner mono text ----- */
.top-center,
.top-right,
.bottom-right {
  position: fixed;
  z-index: 4;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.88px;
  line-height: 19px;
  color: var(--mono-ink);
}

.top-center {
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.top-center .sep {
  display: inline-block;
  width: 2.2em;
}

.top-right {
  top: 34px;
  right: var(--pad);
  text-align: right;
}

.bottom-right {
  bottom: 36px;
  right: var(--pad);
  text-align: right;
}

/* ----- Center wordmark ----- */
.center {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.wordmark {
  margin: 0;
  font-family: "Playfair Display", "Bodoni Moda", Georgia, serif;
  font-weight: 500;
  font-size: 80px;
  line-height: 1;
  color: var(--ink);
  transform: translate(0, -2vh) scaleX(0.94);
  transform-origin: center;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 200ms ease;
}

.wordmark:hover {
  transform: translate(0, -2vh) scale(1.075) scaleX(0.94);
}

/* ----- About state (click wordmark) ----- */
#about {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  place-items: center;
  cursor: pointer;
}

.about-inner {
  max-width: min(560px, calc(100% - 48px));
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;
  font-size: 19px;
  line-height: 33px;
  color: var(--mono-hover);
}

.about-inner p {
  margin: 0 0 1.5em;
}

body.about #about {
  display: grid;
}

body.about .texture,
body.about .center,
body.about .top-center,
body.about .top-right,
body.about .bottom-right {
  display: none;
}

/* ----- Links ----- */
a,
a:visited {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--mono-hover);
}

a:focus-visible {
  outline: 1px solid var(--mono-hover);
  outline-offset: 2px;
}

a {
  transition: color 150ms ease-out;
}

/* ----- Load fade-in: everything together ----- */
@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade {
  opacity: 0;
  animation: fadein 900ms ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .texture .pulses {
    display: none;
  }
  .fade {
    animation: none;
    opacity: 1;
  }
  a {
    transition: none;
  }
}

/* ----- Mobile ----- */
@media (max-width: 640px) {
  .wordmark {
    font-size: 52px;
  }
  .top-center {
    text-align: center;
    white-space: normal;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
  }
  .top-center .sep {
    display: none;
  }
  .top-center span {
    white-space: nowrap;
  }
}
