:root {
  --text-main: #f7f7f3;
  --text-soft: rgba(247, 247, 243, 0.76);
  --bg-deep: #000;
}

@font-face {
  font-family: "Nuixyber";
  src: url("../fonts/Nuixyber.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

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

body {
  color: var(--text-main);
  background: var(--bg-deep);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
}

body.legal-body {
  overflow: auto;
}

.homepage {
  position: relative;
  display: grid;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
}

.background-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../assets/protor-background.png");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: grayscale(1) contrast(1.08) brightness(0.54);
  transform: scale(1.02);
}

.homepage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.18) 48%, rgba(0, 0, 0, 0.62)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.12) 42%, rgba(0, 0, 0, 0.82));
  pointer-events: none;
}

.brand-mark {
  position: fixed;
  top: 2rem;
  right: 2rem;
  display: inline-flex;
  width: 3.25rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(1) drop-shadow(0 0 18px rgba(255, 255, 255, 0.24));
}

.hero {
  display: flex;
  min-height: 100vh;
  width: min(100%, 1180px);
  flex-direction: column;
  justify-content: center;
  padding: 5rem 7vw;
}

.type-title {
  min-height: 8.4rem;
  margin: 0;
  font-family: "Nuixyber", "Segoe UI", sans-serif;
  font-size: 7rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-shadow:
    0 0 18px rgba(100, 180, 255, 0.55),
    0 0 42px rgba(54, 140, 255, 0.34);
}

.type-title::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.74em;
  margin-left: 0.08em;
  background: currentColor;
  transform: translateY(0.08em);
  animation: cursor-pulse 1.05s ease-in-out infinite;
}

.type-title.is-complete::after {
  opacity: 0.62;
}

.tagline {
  max-width: 30rem;
  margin: 1.1rem 0 0;
  color: var(--text-soft);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 520ms ease, transform 520ms ease;
}

.tagline.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tagline.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.07em;
  height: 0.9em;
  margin-left: 0.12em;
  background: currentColor;
  transform: translateY(0.12em);
  animation: cursor-pulse 1.05s ease-in-out infinite;
}

.site-footer {
  position: fixed;
  right: 2rem;
  bottom: 1.5rem;
  z-index: 2;
}

.site-footer a,
.legal-content a {
  color: var(--text-soft);
  text-decoration: none;
  transition: color 160ms ease;
}

.site-footer a {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer a:hover,
.site-footer a:focus,
.legal-content a:hover,
.legal-content a:focus {
  color: var(--text-main);
}

.legal-page {
  min-height: 100vh;
  padding: 7rem 1.5rem 4rem;
}

.legal-page .background-image {
  position: fixed;
}

.legal-content {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.68);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
}

.back-link {
  display: inline-flex;
  margin-bottom: 1.5rem;
  font-family: "Nuixyber", "Segoe UI", sans-serif;
  font-size: 1.45rem;
  line-height: 1;
}

.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content p {
  letter-spacing: 0;
}

.legal-content h1 {
  margin: 0 0 1.75rem;
  font-family: "Nuixyber", "Segoe UI", sans-serif;
  font-size: 3rem;
  font-weight: 400;
}

.legal-content h2 {
  margin: 1.8rem 0 0.6rem;
  color: var(--text-main);
  font-size: 1.1rem;
}

.legal-content h3 {
  margin: 1.45rem 0 0.5rem;
  color: var(--text-main);
  font-size: 1rem;
}

.legal-content p {
  margin: 0;
  color: rgba(247, 247, 243, 0.78);
  font-size: 1rem;
  line-height: 1.7;
}

@keyframes cursor-pulse {
  0%,
  100% {
    opacity: 0.18;
  }

  45%,
  55% {
    opacity: 0.9;
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 4.5rem 2rem;
  }

  .type-title {
    min-height: 6.1rem;
    font-size: 5rem;
  }
}

@media (max-width: 560px) {
  .background-image {
    background-position: 58% center;
  }

  .brand-mark {
    top: 1.2rem;
    right: 1.2rem;
    width: 2.65rem;
    height: 1.92rem;
  }

  .hero {
    justify-content: flex-end;
    padding: 5rem 1.25rem 5.5rem;
  }

  .type-title {
    min-height: 4.2rem;
    font-size: 3.35rem;
  }

  .tagline {
    max-width: 18rem;
    font-size: 1rem;
  }

  .site-footer {
    right: 1.25rem;
    bottom: 1.15rem;
  }

  .legal-page {
    padding: 5.5rem 1rem 2.5rem;
  }

  .legal-content {
    padding: 1.25rem;
  }

  .legal-content h1 {
    font-size: 2.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
