/* Nullhaven Contact Interface */

:root {
  --fg: #d0d0d0;
  --fg-bright: #ffffff;
  --muted: #777777;
  --bg-screen: #0a0a0a;
  --border: rgba(200, 200, 200, 0.15);
  --border-bright: rgba(220, 220, 220, 0.34);

  --panel-width: min(88vw, 820px);
  --fade-duration: 0.7s;
}

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

html,
body {
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, #1a1a1a 0%, #0d0d0d 60%, #050505 100%);
  font-family: "Courier New", monospace;
  color: var(--fg);
  overflow: hidden;
}

/* CRT wrapper */
.screen-shell {
  position: fixed;
  inset: 0;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: powerOn var(--fade-duration) cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes powerOn {
  0% {
    clip-path: inset(50% 0 50% 0);
    opacity: 0;
    filter: brightness(3);
  }

  40% {
    clip-path: inset(0% 0 0% 0);
    opacity: 1;
    filter: brightness(1.5);
  }

  100% {
    clip-path: inset(0% 0 0% 0);
    opacity: 1;
    filter: brightness(1);
  }
}

.screen-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.52) 100%);
  pointer-events: none;
  z-index: 8;
}

.screen-shell::after {
  content: "";
  position: absolute;
  inset: 22px 28px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 4px
  );
  pointer-events: none;
  z-index: 20;
  border-radius: 4px;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.03) 0%, transparent 70%),
    var(--bg-screen);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow:
    inset 0 0 60px rgba(255, 255, 255, 0.02),
    inset 0 0 120px rgba(255, 255, 255, 0.03),
    0 0 40px rgba(255, 255, 255, 0.05),
    0 0 80px rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: subtleFlicker 8s infinite steps(1, end);
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 0, 0, 0.025) 0%, transparent 8%, transparent 92%, rgba(0, 80, 255, 0.025) 100%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
  z-index: 6;
}

.screen::after {
  content: "";
  position: absolute;
  inset: -100% 0 100% 0;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.05), transparent);
  pointer-events: none;
  z-index: 7;
  animation: scanSweep 12s linear infinite;
}

.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

@keyframes subtleFlicker {
  0%, 14%, 19%, 55%, 100% { opacity: 1; }
  15% { opacity: 0.988; }
  56% { opacity: 0.994; }
}

@keyframes scanSweep {
  0% { transform: translateY(-120%); }
  100% { transform: translateY(240%); }
}

.contact-panel {
  position: relative;
  z-index: 10;
  width: var(--panel-width);
  opacity: 0;
  animation: panelFade 0.45s ease forwards;
  animation-delay: 0.18s;
}

@keyframes panelFade {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

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

.interface-title {
  color: var(--fg-bright);
  font-size: clamp(24px, 4.5vw, 56px);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
  margin-bottom: clamp(28px, 5vw, 52px);
}

form {
  display: grid;
  gap: 24px;
}

.field {
  display: grid;
  gap: 10px;
}

.field-label {
  color: var(--muted);
  font-size: clamp(12px, 1.4vw, 15px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.48);
  color: var(--fg-bright);
  border: 1px solid rgba(200, 200, 200, 0.18);
  border-radius: 0;
  font: inherit;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.04em;
  padding: 13px 14px;
  outline: none;
  resize: none;
  box-shadow:
    inset 0 0 22px rgba(255, 255, 255, 0.018),
    0 0 16px rgba(255, 255, 255, 0.018);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

textarea {
  min-height: clamp(170px, 25vh, 260px);
  line-height: 1.45;
}

input::placeholder,
textarea::placeholder {
  color: rgba(190, 190, 190, 0.34);
}

input:focus,
textarea:focus {
  border-color: var(--border-bright);
  box-shadow:
    inset 0 0 28px rgba(255, 255, 255, 0.028),
    0 0 18px rgba(255, 255, 255, 0.06);
  filter: brightness(1.08);
}

button {
  justify-self: start;
  background: transparent;
  color: #d8d8d8;
  border: 1px solid rgba(200, 200, 200, 0.2);
  font: inherit;
  font-size: clamp(13px, 1.5vw, 16px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 12px 18px;
  cursor: pointer;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.14);
  transition:
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

button:hover,
button:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.08);
  filter: brightness(1.12);
  outline: none;
}

.hidden {
  display: none !important;
}

.queued-panel {
  text-align: left;
}

.queued-status {
  color: var(--muted);
  font-size: clamp(14px, 1.8vw, 20px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: clamp(34px, 5vw, 64px);
}

.queued-title {
  color: var(--fg-bright);
  font-size: clamp(28px, 5vw, 68px);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: clamp(26px, 4vw, 42px);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
}

.queued-body {
  color: var(--fg);
  font-size: clamp(16px, 2vw, 24px);
  letter-spacing: 0.06em;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .screen-shell {
    padding: 10px 12px;
  }

  html,
  body {
    overflow: auto;
  }

  .screen {
    min-height: 100%;
    padding: 32px 18px;
  }

  .contact-panel {
    width: min(92vw, 820px);
  }

  button {
    width: 100%;
  }
}
