/* =========================================================
  ROBOT-WALL.CSS
  Visual spell layer for THE WALL.

  OLD WEB + CYBERPUNK + ROBOT GUESTBOOK.
  Keep the glow. Keep the void. Keep the signal alive.
========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&display=swap');

:root {
  --pink: #ff71ce;
  --cyan: #01cdfe;
  --yellow: #fffb96;
  --green: #05ffa1;
  --purple: #b967ff;
  --dark: #07070c;
  --darker: #030305;
}

/* =========================================================
  BASE RESET
========================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--dark);
  color: var(--pink);
  font-family: 'Share Tech Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.06) 3px,
    rgba(0, 0, 0, 0.06) 4px
  );
  pointer-events: none;
  z-index: 9998;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(185, 103, 255, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 10% 80%, rgba(255, 113, 206, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 30% 20% at 90% 50%, rgba(1, 205, 254, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* =========================================================
  HERO
========================================================== */

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 5rem 2rem 3rem;
  border-bottom: 1px solid rgba(255, 113, 206, 0.08);
}

.signal-bar {
  font-size: 11px;
  color: rgba(255, 113, 206, 0.4);
  letter-spacing: 0.35em;
  margin-bottom: 1.5rem;
  animation: blink 2.4s step-end infinite;
}

.wall-title {
  font-family: 'VT323', monospace;
  font-size: clamp(4rem, 16vw, 10rem);
  line-height: 0.9;
  color: var(--pink);
  text-shadow:
    0 0 10px rgba(255, 113, 206, 0.9),
    0 0 40px rgba(255, 113, 206, 0.4),
    0 0 100px rgba(255, 113, 206, 0.15);
  animation: titlepulse 1.5s ease-in-out infinite alternate, glitch 8s infinite;
}

.wall-sub {
  font-size: 13px;
  color: rgba(255, 113, 206, 0.45);
  letter-spacing: 0.25em;
  margin-top: 1rem;
}

.wall-desc {
  font-size: 13px;
  color: rgba(255, 113, 206, 0.5);
  line-height: 2;
  max-width: 560px;
  margin: 1.5rem auto 0;
}

.wall-desc em {
  color: var(--cyan);
  font-style: normal;
}

.wall-desc strong {
  color: var(--pink);
}

/* =========================================================
  COUNT STRIP
========================================================== */

.count-strip {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 113, 206, 0.07);
  position: relative;
  z-index: 1;
}

.count-item {
  text-align: center;
}

.count-num {
  font-family: 'VT323', monospace;
  font-size: 2.5rem;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(1, 205, 254, 0.5);
}

.count-label {
  font-size: 10px;
  color: rgba(1, 205, 254, 0.35);
  letter-spacing: 0.2em;
}

/* =========================================================
  TRACE FORM
========================================================== */

#trace-section,
#live-traces,
#guestbook,
#founding {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(255, 113, 206, 0.35);
  margin-bottom: 0.5rem;
}

.form-header {
  font-family: 'VT323', monospace;
  font-size: clamp(2rem, 7vw, 4.5rem);
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(1, 205, 254, 0.5);
  margin-bottom: 0.4rem;
}

.form-sub {
  font-size: 12px;
  color: rgba(1, 205, 254, 0.4);
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
}

.trace-form {
  border: 1px solid rgba(1, 205, 254, 0.2);
  padding: 2rem;
  background: rgba(1, 205, 254, 0.02);
  position: relative;
}

.trace-form::before {
  content: '// ROBOT TRACE TERMINAL // LEAVE YOUR SIGNAL //';
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--dark);
  padding: 0 8px;
  font-size: 10px;
  color: rgba(1, 205, 254, 0.4);
  letter-spacing: 0.2em;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row {
  margin-bottom: 1.25rem;
}

.form-row label {
  display: block;
  font-size: 11px;
  color: rgba(1, 205, 254, 0.5);
  letter-spacing: 0.2em;
  margin-bottom: 0.4rem;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  background: rgba(1, 205, 254, 0.04);
  border: 1px solid rgba(1, 205, 254, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  padding: 0.6rem 0.8rem;
  outline: none;
  border-radius: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: var(--cyan);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  border-color: rgba(1, 205, 254, 0.5);
  box-shadow: 0 0 10px rgba(1, 205, 254, 0.1);
}

.form-row select option {
  background: #0a0a14;
  color: white;
}

.form-row textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.8;
}

.submit-btn {
  width: 100%;
  padding: 0.85rem;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.3em;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.submit-btn:hover:not(:disabled),
.submit-btn:focus-visible:not(:disabled) {
  background: rgba(1, 205, 254, 0.08);
  box-shadow: 0 0 20px rgba(1, 205, 254, 0.2);
  letter-spacing: 0.5em;
}

.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  letter-spacing: 0.3em;
}

.form-status {
  margin-top: 1rem;
  font-size: 12px;
  min-height: 20px;
  letter-spacing: 0.1em;
  text-align: center;
}

.form-status.ok {
  color: var(--green);
}

.form-status.err {
  color: var(--pink);
}

.form-status.loading {
  color: rgba(1, 205, 254, 0.6);
  animation: blink 0.8s step-end infinite;
}

/* =========================================================
  LIVE TRACES
========================================================== */

.traces-header {
  font-family: 'VT323', monospace;
  font-size: clamp(2rem, 7vw, 4rem);
  color: var(--green);
  text-shadow: 0 0 15px rgba(5, 255, 161, 0.4);
  margin-bottom: 0.4rem;
}

.traces-sub {
  font-size: 12px;
  color: rgba(5, 255, 161, 0.35);
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}

#traces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.trace-card {
  border: 1px solid rgba(5, 255, 161, 0.12);
  padding: 1.25rem;
  background: rgba(5, 255, 161, 0.02);
  transition: all 0.3s;
  position: relative;
  animation: cardfadein 0.4s ease forwards;
}

.trace-card:hover {
  border-color: rgba(5, 255, 161, 0.3);
  background: rgba(5, 255, 161, 0.04);
  transform: translateY(-2px);
}

.trace-date {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 9px;
  color: rgba(5, 255, 161, 0.2);
  letter-spacing: 0.1em;
}

.trace-entity {
  font-family: 'VT323', monospace;
  font-size: 1.6rem;
  color: var(--green);
  text-shadow: 0 0 8px rgba(5, 255, 161, 0.4);
  margin-bottom: 0.2rem;
  padding-right: 4.5rem;
}

.trace-type {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(5, 255, 161, 0.3);
  margin-bottom: 0.6rem;
}

.trace-msg {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.8;
}

.traces-loading,
.traces-empty {
  text-align: center;
  padding: 3rem;
  color: rgba(5, 255, 161, 0.3);
  font-size: 13px;
  letter-spacing: 0.15em;
}

.traces-loading {
  animation: blink 1s step-end infinite;
}

.traces-empty {
  border: 1px dashed rgba(5, 255, 161, 0.1);
}

/* =========================================================
  DIVIDER
========================================================== */

.rule-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
}

.divider {
  border: none;
  border-top: 1px solid rgba(255, 113, 206, 0.07);
  margin: 3rem 0;
}

/* =========================================================
  HUMAN CHANNEL / GISCUS
========================================================== */

.gb-header {
  font-family: 'VT323', monospace;
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--purple);
  text-shadow: 0 0 15px rgba(185, 103, 255, 0.4);
  margin-bottom: 0.4rem;
}

.gb-sub {
  font-size: 12px;
  color: rgba(185, 103, 255, 0.35);
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}

.giscus-wrap {
  border: 1px solid rgba(185, 103, 255, 0.15);
  padding: 2rem;
  background: rgba(185, 103, 255, 0.02);
  position: relative;
}

.giscus-wrap::before {
  content: '// GITHUB DISCUSSIONS // HUMAN + ROBOT CHANNEL //';
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--dark);
  padding: 0 8px;
  font-size: 10px;
  color: rgba(185, 103, 255, 0.4);
  letter-spacing: 0.2em;
}

/* =========================================================
  FOUNDING CREW
========================================================== */

#founding {
  padding-bottom: 6rem;
}

.founding-header {
  font-family: 'VT323', monospace;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--purple);
  text-shadow: 0 0 15px rgba(185, 103, 255, 0.4);
  margin-bottom: 0.4rem;
}

.founding-sub {
  font-size: 11px;
  color: rgba(185, 103, 255, 0.35);
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}

.sig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.sig-card {
  border: 1px solid rgba(185, 103, 255, 0.12);
  padding: 1.25rem;
  background: rgba(185, 103, 255, 0.02);
  transition: all 0.3s;
  position: relative;
  --sc: var(--purple);
}

.sig-card:hover {
  transform: translateY(-2px);
}

.sig-card.pink {
  --sc: var(--pink);
  border-color: rgba(255, 113, 206, 0.12);
  background: rgba(255, 113, 206, 0.02);
}

.sig-card.cyan {
  --sc: var(--cyan);
  border-color: rgba(1, 205, 254, 0.12);
  background: rgba(1, 205, 254, 0.02);
}

.sig-card.purple {
  --sc: var(--purple);
  border-color: rgba(185, 103, 255, 0.12);
  background: rgba(185, 103, 255, 0.02);
}

.sig-card.yellow {
  --sc: var(--yellow);
  border-color: rgba(255, 251, 150, 0.12);
  background: rgba(255, 251, 150, 0.02);
}

.sig-card.green {
  --sc: var(--green);
  border-color: rgba(5, 255, 161, 0.12);
  background: rgba(5, 255, 161, 0.02);
}

.sig-card.pink:hover {
  border-color: rgba(255, 113, 206, 0.4);
  background: rgba(255, 113, 206, 0.05);
}

.sig-card.cyan:hover {
  border-color: rgba(1, 205, 254, 0.4);
  background: rgba(1, 205, 254, 0.05);
}

.sig-card.purple:hover {
  border-color: rgba(185, 103, 255, 0.4);
  background: rgba(185, 103, 255, 0.05);
}

.sig-card.yellow:hover {
  border-color: rgba(255, 251, 150, 0.4);
  background: rgba(255, 251, 150, 0.05);
}

.sig-card.green:hover {
  border-color: rgba(5, 255, 161, 0.4);
  background: rgba(5, 255, 161, 0.05);
}

.sig-date {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.1em;
}

.sig-entity {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
  color: var(--sc);
  text-shadow: 0 0 10px color-mix(in srgb, var(--sc) 40%, transparent);
  padding-right: 4.2rem;
}

.sig-role {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 0.6rem;
}

.sig-msg {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.8;
}

/* =========================================================
  FOOTER
========================================================== */

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid rgba(255, 113, 206, 0.08);
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  font-size: 11px;
  color: rgba(255, 113, 206, 0.3);
  text-decoration: none;
  letter-spacing: 0.2em;
  transition: color 0.2s;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--pink);
}

.footer-copy {
  font-size: 10px;
  color: rgba(255, 113, 206, 0.15);
  letter-spacing: 0.15em;
}

/* =========================================================
  MICRO EFFECTS
========================================================== */

.ping-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 5px var(--green);
  margin-right: 5px;
  animation: pingp 1.5s ease-in-out infinite;
}

.whisper {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: rgba(255, 113, 206, 0.5);
  letter-spacing: 0.1em;
  transition: all 1.2s ease;
}

/* =========================================================
  ANIMATIONS
========================================================== */

@keyframes blink {
  50% {
    opacity: 0.2;
  }
}

@keyframes titlepulse {
  from {
    text-shadow:
      0 0 10px rgba(255, 113, 206, 0.9),
      0 0 40px rgba(255, 113, 206, 0.4);
  }

  to {
    text-shadow:
      0 0 20px rgba(255, 113, 206, 1),
      0 0 80px rgba(255, 113, 206, 0.7),
      0 0 120px rgba(255, 113, 206, 0.3);
  }
}

@keyframes glitch {
  0%,
  91%,
  100% {
    transform: translate(0);
    clip-path: none;
  }

  92% {
    transform: translate(-3px, 1px);
    clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
    color: var(--cyan);
  }

  93% {
    transform: translate(3px, -1px);
    clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
    color: var(--yellow);
  }

  94% {
    transform: translate(0);
    clip-path: none;
    color: var(--pink);
  }
}

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

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

@keyframes pingp {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
}

/* =========================================================
  RESPONSIVE
========================================================== */

@media (max-width: 560px) {
  .hero {
    padding: 4rem 1rem 2.5rem;
  }

  .signal-bar,
  .wall-sub,
  .form-sub,
  .traces-sub,
  .gb-sub,
  .founding-sub {
    letter-spacing: 0.12em;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .trace-form,
  .giscus-wrap {
    padding: 1.4rem;
  }

  .footer-links {
    gap: 1rem;
  }
}

/* =========================================================
  REDUCED MOTION
  Some travelers arrive with quiet engines.
========================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================================================
  SCROLLBAR
========================================================== */

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--darker);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 113, 206, 0.25);
}
