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

:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --muted: #9b9b9b;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* BACKGROUND */

.terminal-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--paper);
  pointer-events: none;
}

#terminal-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.58;
}

/* Softens the terminal texture directly behind the typography,
   while keeping the effect visible across the rest of the page. */
.terminal-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at center,
      rgba(255,255,255,0.78) 0%,
      rgba(255,255,255,0.48) 30%,
      rgba(255,255,255,0.08) 64%,
      rgba(255,255,255,0) 100%
    );
}

/* PAGE */

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

/* HERO */

.hero {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font: inherit;
}

.line {
  display: block;
  overflow: hidden;
  padding: 0 0.08em;
  margin: -0.045em 0;
}

.line > span {
  display: block;

  font-size: clamp(54px, 8.5vw, 150px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.075em;
  white-space: nowrap;

  transform: translateY(112%);
  will-change: transform;
}

body.loaded .line > span {
  transform: translateY(0);
  transition: transform 1.1s cubic-bezier(0.76, 0, 0.24, 1);
}

body.loaded .line:nth-child(1) > span { transition-delay: 0.05s; }
body.loaded .line:nth-child(2) > span { transition-delay: 0.13s; }
body.loaded .line:nth-child(3) > span { transition-delay: 0.21s; }
body.loaded .line:nth-child(4) > span { transition-delay: 0.29s; }

/* FOOTER */

.footer {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 28px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;

  opacity: 0;
  transform: translateY(10px);

  transition:
    opacity 0.8s ease 0.9s,
    transform 0.8s ease 0.9s;
}

body.loaded .footer {
  opacity: 1;
  transform: translateY(0);
}

.footer > span {
  color: var(--muted);
}

.footer a {
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer a:hover {
  opacity: 0.45;
}

/* MOBILE */

@media (max-width: 700px) {
  .page {
    padding: 20px;
  }

  .line > span {
    font-size: clamp(42px, 13vw, 78px);
    letter-spacing: -0.07em;
  }

  .footer {
    left: 20px;
    right: 20px;
    bottom: 20px;
    font-size: 10px;
  }

  #terminal-canvas {
    opacity: 0.48;
  }
}

/* Respect reduced-motion preferences. */

@media (prefers-reduced-motion: reduce) {
  .line > span,
  .footer {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
