:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0d0d0d;
  --text: #f8f8f8;
  --muted: #c9c9c9;
  --dim: #777777;
  --line: rgba(248, 248, 248, 0.2);
  --line-strong: #f8f8f8;
  --shadow: #000000;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    monospace;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.12) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 2px, transparent 2px),
    #050505;
  background-size:
    16px 16px,
    16px 16px,
    128px 128px,
    128px 128px,
    auto;
  image-rendering: pixelated;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0,
    rgba(255, 255, 255, 0.04) 2px,
    transparent 2px,
    transparent 6px
  );
  opacity: 0.38;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(135deg, transparent 0 34%, rgba(255, 255, 255, 0.1) 34% 35%, transparent 35%),
    linear-gradient(45deg, transparent 0 64%, rgba(255, 255, 255, 0.08) 64% 65%, transparent 65%);
  opacity: 1;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(22px, 4vw, 48px);
  overflow: hidden;
}

.hero {
  position: relative;
  width: min(1120px, 100%);
  min-height: min(700px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(310px, 0.58fr);
  align-items: center;
  gap: clamp(32px, 6vw, 82px);
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 720px;
}

.kicker {
  width: fit-content;
  margin: 0 0 28px;
  padding: 8px 10px;
  color: var(--text);
  font-size: clamp(0.76rem, 1.5vw, 0.92rem);
  line-height: 1.35;
  text-transform: uppercase;
  border: 2px solid var(--line-strong);
  background: #050505;
  box-shadow: 6px 6px 0 #000000;
}

h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.04em;
  margin: 0;
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(3.7rem, 8.1vw, 8.5rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
  filter: contrast(1.12);
}

h1 span {
  display: inline-block;
  padding: 0 0.035em 0.055em;
  background: #f8f8f8;
  color: #050505;
  box-shadow:
    0.055em 0.055em 0 #050505,
    0.095em 0.095em 0 #f8f8f8,
    0.15em 0.15em 0 #000000;
  text-shadow:
    0.035em 0 0 #f8f8f8,
    -0.035em 0 0 #f8f8f8,
    0 0.035em 0 #f8f8f8;
}

.intro {
  max-width: 670px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 22px;
  margin-top: 34px;
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  color: #050505;
  font-weight: 800;
  text-decoration: none;
  background: #f8f8f8;
  border: 2px solid #050505;
  box-shadow:
    6px 6px 0 #777777,
    10px 10px 0 #000000;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.contact:hover,
.contact:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow:
    8px 8px 0 #777777,
    14px 14px 0 #000000;
}

.signal {
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.console {
  position: relative;
  z-index: 2;
  min-width: 0;
  width: min(100%, 410px);
  justify-self: end;
  border: 2px solid var(--line-strong);
  background: var(--panel);
  box-shadow:
    10px 10px 0 #000000,
    inset 0 0 0 2px #050505;
  animation: console-drift 8s ease-in-out infinite;
}

.console::before {
  position: absolute;
  inset: -12px;
  z-index: -1;
  content: "";
  border: 1px solid rgba(248, 248, 248, 0.22);
  transform: translate(12px, 12px);
}

.console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--line-strong);
  background: #171717;
}

.console-top p {
  margin: 0;
  padding-right: 14px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.terminal-bar {
  display: flex;
  gap: 8px;
  padding: 14px;
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  display: block;
  background: var(--muted);
}

.terminal-bar span:nth-child(1) {
  background: #f8f8f8;
}

.terminal-bar span:nth-child(2) {
  background: #c9c9c9;
}

.terminal-bar span:nth-child(3) {
  background: #777777;
}

.terminal-lines {
  padding: 24px 22px 18px;
}

.terminal-lines p {
  display: flex;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.86rem, 1.5vw, 1rem);
  line-height: 2;
}

.terminal-lines span {
  color: var(--text);
}

.terminal-lines .ready {
  color: var(--text);
  font-weight: 800;
}

.meter {
  height: 8px;
  margin: 0 22px 24px;
  border: 2px solid var(--line-strong);
  background: #050505;
}

.meter span {
  display: block;
  width: 72%;
  height: 100%;
  background:
    repeating-linear-gradient(
      90deg,
      #f8f8f8 0,
      #f8f8f8 12px,
      #777777 12px,
      #777777 16px
    );
  animation: meter-pulse 5s ease-in-out infinite;
}

.pixel-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.pixel-field span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border: 2px solid rgba(248, 248, 248, 0.46);
  background: rgba(248, 248, 248, 0.13);
  box-shadow: 4px 4px 0 #000000;
  animation: float-bit 11s ease-in-out infinite;
  animation-delay: var(--delay);
}

.pixel-field span:nth-child(2n) {
  background: rgba(248, 248, 248, 0.08);
  box-shadow: 4px 4px 0 #000000;
}

.pixel-field span:nth-child(3n) {
  background: rgba(248, 248, 248, 0.2);
  box-shadow: 4px 4px 0 #000000;
}

@keyframes float-bit {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(14px, -24px, 0) rotate(8deg);
  }
}

.circuit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.circuit span {
  position: absolute;
  display: block;
  background: rgba(248, 248, 248, 0.24);
}

.circuit span:nth-child(1) {
  width: 28%;
  height: 1px;
  top: 24%;
  right: 18%;
}

.circuit span:nth-child(2) {
  width: 1px;
  height: 24%;
  top: 24%;
  right: 18%;
}

.circuit span:nth-child(3) {
  width: 22%;
  height: 1px;
  right: 18%;
  bottom: 24%;
}

.circuit span:nth-child(4) {
  width: 10px;
  height: 10px;
  right: calc(18% - 5px);
  bottom: calc(24% - 5px);
  background: #f8f8f8;
  box-shadow: 4px 4px 0 #000000;
}

@keyframes console-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes meter-pulse {
  0%,
  100% {
    width: 70%;
  }

  50% {
    width: 86%;
  }
}

@media (max-width: 820px) {
  .shell {
    min-height: auto;
    padding: 28px 20px 34px;
  }

  .hero {
    min-height: calc(100vh - 62px);
    grid-template-columns: 1fr;
    align-content: center;
    gap: 34px;
  }

  .console {
    justify-self: stretch;
    width: calc(100vw - 54px);
    max-width: 100%;
    animation: none;
  }

  .circuit {
    opacity: 0.4;
  }
}

@media (max-width: 520px) {
  .hero {
    gap: 28px;
  }

  .kicker {
    max-width: 100%;
    margin-bottom: 22px;
    font-size: 0.72rem;
  }

  h1 {
    font-size: clamp(2.65rem, 14.2vw, 3.85rem);
  }

  .intro {
    max-width: 32ch;
    margin-top: 24px;
    font-size: 0.98rem;
    line-height: 1.62;
  }

  .actions {
    margin-top: 28px;
  }

  .signal {
    max-width: none;
    font-size: 0.82rem;
  }

  .contact {
    flex: 0 0 calc(100vw - 54px);
    width: calc(100vw - 54px);
    max-width: 100%;
    justify-content: center;
    font-size: 0.92rem;
  }

  .console-top p {
    display: none;
  }

  .console::before {
    inset: -8px;
    transform: translate(8px, 8px);
  }

  .terminal-lines {
    padding: 20px 18px 16px;
  }

  .meter {
    margin: 0 18px 20px;
  }
}

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