/* RootX — blackhat dev landing */
:root {
  --bg-deep: #050508;
  --bg-panel: rgba(8, 10, 14, 0.85);
  --red: #e11d48;
  --red-dim: #9f1239;
  --red-glow: rgba(225, 29, 72, 0.35);
  --text: #e4e4e7;
  --muted: #71717a;
  --border: rgba(225, 29, 72, 0.25);
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  --font-display: "Orbitron", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
}

#matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.45;
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  opacity: 0.4;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 20%, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}

.wrap {
  position: relative;
  z-index: 3;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.hero-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.hero-logo img {
  max-width: min(420px, 92vw);
  height: auto;
  filter: drop-shadow(0 0 24px var(--red-glow));
  animation: logo-float 6s ease-in-out infinite;
}

@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.hero-title {
  text-align: center;
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 20px var(--red-glow);
}

.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.glitch::before {
  color: var(--red);
  clip-path: inset(0 0 60% 0);
  animation: glitch-1 2.5s infinite linear alternate-reverse;
}

.glitch::after {
  color: #22d3ee;
  clip-path: inset(40% 0 0 0);
  animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 1px);
  }
  40% {
    transform: translate(2px, -1px);
  }
  60% {
    transform: translate(-1px, -1px);
  }
  80% {
    transform: translate(1px, 2px);
  }
  100% {
    transform: translate(0);
  }
}

@keyframes glitch-2 {
  0% {
    transform: translate(0);
  }
  25% {
    transform: translate(2px, 0);
  }
  50% {
    transform: translate(-2px, 1px);
  }
  75% {
    transform: translate(1px, -1px);
  }
  100% {
    transform: translate(0);
  }
}

.tagline {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.6em;
  margin-bottom: 2rem;
}

.tagline .cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--red);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(225, 29, 72, 0.08);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.15), transparent);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.panel-head .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.panel-body {
  padding: 1rem 1.25rem;
}

.kv {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.8rem;
}

.kv dt {
  margin: 0;
  color: var(--muted);
  word-break: break-all;
}

.kv dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.kv dd.mono {
  font-size: 0.72rem;
  line-height: 1.45;
}

.section-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.btn:hover {
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 20px var(--red-glow);
}

.btn-primary {
  background: rgba(225, 29, 72, 0.12);
  border-color: var(--red-dim);
}

.footer-note {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* Modal — Toto PIN */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 1.35rem 1.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 0 48px rgba(0, 0, 0, 0.65), 0 0 24px var(--red-glow);
}

.modal-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.modal-hint {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-dim);
}

.modal-input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.modal-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red-glow);
}

.modal-error {
  margin: 0;
  font-size: 0.78rem;
  color: #fb7185;
}

.modal-error[hidden] {
  display: none !important;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.status-loading {
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 540px) {
  .kv {
    grid-template-columns: 1fr;
  }

  .kv dt {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .kv dt:first-of-type {
    padding-top: 0;
    border-top: none;
  }
}
