:root {
  color-scheme: dark;
  --ink: #0b1111;
  --paper: #f4f1e8;
  --muted: #313b3b;
  --cyan: #a7f2f0;
  --acid: #d9ef35;
  --red: #e93c2c;
  --void: #d5f0ee;
  --line: rgba(11, 17, 17, 0.62);
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--void);
  color: var(--ink);
  font-family: "SFMono-Regular", "Roboto Mono", "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.threshold {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  background-color: #071011;
  background-image: url("assets/simulization-hero.png");
  background-position: center;
  background-size: cover;
}

.threshold::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 9, 10, 0.2), transparent 28%, transparent 72%, rgba(2, 9, 10, 0.34));
  content: "";
}

.threshold::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  border: 5px solid var(--ink);
  content: "";
}

.masthead,
footer {
  position: absolute;
  z-index: 2;
  right: clamp(24px, 4vw, 68px);
  left: clamp(24px, 4vw, 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.masthead {
  top: clamp(24px, 5vh, 54px);
}

.wordmark,
.locator,
.signal-code,
.signal-note,
.access-label,
.response,
footer {
  margin: 0;
  text-transform: uppercase;
}

.wordmark {
  padding: 10px 12px;
  background: var(--acid);
  border: 2px solid var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
}

.wordmark::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 11px;
  background: var(--red);
  content: "";
}

.locator,
footer {
  color: var(--paper);
  font-size: 10px;
  font-weight: 700;
}

.signal {
  position: absolute;
  z-index: 2;
  top: clamp(86px, 12vh, 130px);
  left: clamp(24px, 4vw, 68px);
  display: flex;
  gap: 8px;
}

.signal-code,
.signal-note,
.access-label {
  display: inline-block;
  padding: 7px 9px;
  background: var(--acid);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.signal-note {
  background: var(--red);
  color: var(--paper);
}

.access {
  position: absolute;
  z-index: 3;
  right: clamp(24px, 7vw, 118px);
  bottom: clamp(76px, 13vh, 130px);
  width: min(390px, calc(100vw - 48px));
  padding: 18px;
  background: var(--ink);
  border: 2px solid var(--paper);
  box-shadow: 9px 9px 0 var(--red);
}

.terminal-line {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  min-height: 50px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--acid);
}

input {
  min-width: 0;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  caret-color: var(--acid);
  font-size: 15px;
}

input:focus-visible {
  box-shadow: inset 0 -1px var(--cyan);
}

button {
  height: 32px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  background: var(--acid);
  color: var(--ink);
  cursor: pointer;
  font-size: 9px;
}

button:hover,
button:focus-visible {
  background: var(--paper);
  color: var(--ink);
  outline: 2px solid var(--paper);
}

button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.response {
  min-height: 16px;
  margin-top: 12px;
  color: var(--paper);
  font-size: 9px;
}

.response[data-state="error"] {
  color: #ff7669;
}

.response[data-state="accepted"] {
  color: var(--acid);
}

footer {
  bottom: 28px;
  padding: 6px 8px;
  background: var(--paper);
  border: 1px solid var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .threshold {
    min-height: 100dvh;
    background-position: 50% center;
  }

  .locator,
  footer span:last-child {
    display: none;
  }

  .signal {
    top: 84px;
    right: 24px;
    left: 24px;
    flex-wrap: wrap;
  }

  .access {
    right: 24px;
    bottom: 82px;
    left: 24px;
    width: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .wordmark::before {
    animation: pulse 4.8s steps(1, end) infinite;
  }

  .signal,
  .access {
    animation: arrive 1.8s ease-out both;
  }

  .access {
    animation-delay: 0.35s;
  }
}

@keyframes pulse {
  0%,
  92%,
  100% {
    opacity: 1;
  }

  93%,
  96% {
    opacity: 0.15;
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
