@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap");

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

body {
  min-height: 100vh;
  background: #000;
  color: #fff;
  font-family: "IBM Plex Mono", monospace;
}

.home-page {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.header {
  margin-bottom: 4rem;
}

.logo {
  font-size: 5rem;
  font-weight: 400;
  letter-spacing: 0;
}

.tagline-heading {
  max-width: 56rem;
  margin-top: 2rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.diagram {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 2rem auto 5rem;
}

.diagram-label {
  position: absolute;
  color: #ccc;
  font-size: 0.8rem;
}

.label-top {
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
}

.label-left {
  bottom: -5px;
  left: -32px;
}

.label-right {
  right: -12px;
  bottom: -5px;
}

.trifecta-logo {
  width: 300px;
  height: 300px;
  display: block;
}

.trifecta-lines,
.trifecta-ring {
  fill: none;
  stroke: #fff;
  stroke-width: 5;
}

.trifecta-eye {
  fill: #fff;
  transform-box: fill-box;
  transform-origin: center;
}

.trifecta-eye.is-blinking {
  animation: trifecta-blink 180ms ease-in-out;
}

@keyframes trifecta-blink {
  0%,
  100% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(0.08);
  }
}

.manctera-box {
  width: 700px;
  margin-top: 2rem;
  padding: 20px 1rem 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #fff;
  color: #fff;
  text-decoration: none;
}

.manctera-name {
  font-size: 2.5rem;
  font-weight: 400;
}

.manctera-description {
  margin-top: 0.75rem;
  font-size: 0.8rem;
}

.manctera-enter {
  margin-top: 1.25rem;
  padding: 0.5rem 1rem;
  border: 1px solid #fff;
  background: #fff;
  color: #000;
  font-size: 0.8rem;
  transition: background-color 180ms ease;
}

.manctera-box:hover .manctera-enter,
.manctera-box:focus-visible .manctera-enter {
  background: #000;
  color: #fff;
}

.manctera-box:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}

.content-list {
  width: 700px;
}

.content-row {
  min-height: 100px;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid #fff;
  text-align: left;
}

.content-row:last-child {
  border-bottom: 0;
}

.content-title {
  font-size: 1rem;
  font-weight: 600;
}

.content-description {
  color: #ccc;
  font-size: 0.8rem;
  line-height: 1.5;
}

.content-enter {
  padding: 0.5rem 1rem;
  border: 1px solid #fff;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.content-enter:hover,
.content-enter:focus-visible {
  background: #000;
  color: #fff;
}

.content-enter:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.field-notes-heading {
  margin-top: 4rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

.signature {
  margin-top: 4rem;
  font-size: 0.8rem;
  opacity: 0.85;
}

.signature a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.manctera-signature {
  text-align: center;
}

.manctera-page {
  --gravity-scale: 1;
  --gravity-opacity: 1;
  --coordinate-opacity: 1;
  padding: 50px 0 100px;
}

.close-manctera {
  position: fixed;
  top: 50px;
  right: 50px;
  width: 30px;
  height: 30px;
  color: #000;
}

.close-manctera svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: #d9d9d9;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  transition: transform 180ms ease;
}

.close-manctera circle,
.close-manctera line {
  vector-effect: non-scaling-stroke;
}

.close-manctera circle {
  stroke: none;
}

.close-manctera line {
  fill: none;
}

.close-manctera:hover svg,
.close-manctera:focus-visible svg {
  transform: rotate(90deg);
}

.close-manctera:focus-visible {
  outline: 2px solid #f5f5f5;
  outline-offset: 6px;
}

.composition {
  width: 500px;
  margin: 0 auto;
}

.gravity-stage {
  position: sticky;
  top: 50px;
  z-index: 0;
  width: 500px;
  height: 500px;
}

.orbit-wrapper {
  width: 500px;
  height: 500px;
  background: #000;
  opacity: var(--gravity-opacity);
  transform: scale(var(--gravity-scale));
  transform-origin: center;
  will-change: transform, opacity;
}

.composition-title {
  position: relative;
  z-index: 1;
  margin: 50px 0 0;
  color: #f5f5f5;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

.manctera-essay {
  position: relative;
  z-index: 1;
  margin-top: 50px;
  color: #f5f5f5;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  text-align: left;
}

.manctera-essay p + p {
  margin-top: 2rem;
}

.essay-figure {
  margin: 2rem 0;
}

.essay-figure img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

.manctera-essay .pull-quote {
  padding: 20px 0 20px 20px;
  border-left: 5px solid #fff;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
}

.orbit-scene {
  width: 500px;
  height: 500px;
  display: block;
  overflow: visible;
  shape-rendering: geometricPrecision;
}

.sun,
.earth {
  fill: transparent;
  stroke: #f5f5f5;
  stroke-width: 5;
}

.plus {
  fill: none;
  stroke: #f5f5f5;
  stroke-width: 5;
  stroke-linecap: round;
}

.earth-coordinates {
  fill: #f5f5f5;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-anchor: middle;
  dominant-baseline: hanging;
  opacity: var(--coordinate-opacity);
}

.orbit-track {
  transform-box: view-box;
  transform-origin: 250px 250px;
  will-change: transform;
  animation: earth-orbit 6s linear infinite;
}

@keyframes earth-orbit {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(1turn);
  }
}

@media (max-width: 768px) {
  .home-page {
    padding: 1.5rem;
  }

  .logo {
    font-size: 3.5rem;
  }

  .manctera-box,
  .content-list {
    width: min(700px, 100%);
  }

  .content-row {
    grid-template-columns: 1fr;
    padding: 1.25rem 0;
  }

  .content-enter {
    justify-self: start;
  }
}

@media (max-width: 499px) {
  .manctera-page {
    padding: 70px 0 70px;
  }

  .gravity-stage {
    top: 70px;
  }

  .close-manctera {
    top: 20px;
    right: 20px;
  }

  .composition,
  .gravity-stage,
  .orbit-wrapper,
  .orbit-scene {
    width: 350px;
  }

  .gravity-stage,
  .orbit-wrapper,
  .orbit-scene {
    height: 350px;
  }

  .sun,
  .earth,
  .plus {
    stroke-width: 3;
  }

  .manctera-essay {
    margin-top: 40px;
    font-size: 14px;
  }
}
