/* ROKI Docs gate styles */
html.docs-locked body { visibility: hidden; }
html.docs-locked #docs-gate { visibility: visible; }

#docs-gate {
  position: fixed; inset: 0;
  z-index: 9999;
  display: grid; place-items: center;
  background: #0e0c0a;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(231,90,74,0.18), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(231,90,74,0.10), transparent 55%);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color: #fff;
  animation: dg-fade-in 0.35s ease;
  overflow: hidden;
}
#docs-gate.dg-pass { animation: dg-fade-out 0.4s ease forwards; }
@keyframes dg-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dg-fade-out { to { opacity: 0; transform: scale(1.02); } }

#docs-gate .dg-grain {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.6) 0 1px, transparent 1px 3px);
}

#docs-gate .dg-corner {
  position: absolute;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(231,90,74,0.55);
  text-transform: uppercase;
  pointer-events: none;
}
#docs-gate .dg-corner-tl { top: 18px; left: 22px; }
#docs-gate .dg-corner-tr { top: 18px; right: 22px; }
#docs-gate .dg-corner-bl { bottom: 18px; left: 22px; }
#docs-gate .dg-corner-br { bottom: 18px; right: 22px; }

/* HOME button — persistent escape hatch back to the public site.
   Sits at top-right of the overlay; shifts REV 3.0 corner label down
   so the two don't overlap. */
#docs-gate .dg-home {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: #e75a4a;
  background: rgba(14,12,10,0.7);
  border: 1.5px solid rgba(231,90,74,0.55);
  border-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  box-shadow: 0 0 0 1px rgba(231,90,74,0.06) inset;
}
#docs-gate .dg-home svg { display: block; }
#docs-gate .dg-home:hover {
  background: #e75a4a;
  color: #15110e;
  border-color: #e75a4a;
}
#docs-gate .dg-home:active { transform: translateY(1px); }

/* Push REV 3.0 corner label down so it doesn't collide with HOME */
#docs-gate .dg-corner-tr { top: 56px; right: 18px; }

#docs-gate .dg-card {
  position: relative;
  width: min(460px, 92vw);
  background: #15110e;
  border: 1.5px solid rgba(231,90,74,0.35);
  border-radius: 4px;
  padding: 40px 34px 24px;
  text-align: center;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    0 0 0 1px rgba(231,90,74,0.08) inset,
    0 0 60px rgba(231,90,74,0.06) inset;
}
#docs-gate .dg-card::before,
#docs-gate .dg-card::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid #e75a4a;
}
#docs-gate .dg-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
#docs-gate .dg-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

#docs-gate .dg-card.dg-shake { animation: dg-shake 0.42s cubic-bezier(.36,.07,.19,.97); }
@keyframes dg-shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* CLASSIFIED rubber stamp — matches Roki.html .classified-stamp */
#docs-gate .dg-stamp {
  --stamp-ink: #e75a4a;
  position: absolute;
  top: 14px;
  right: 14px;
  transform: rotate(-7deg);
  pointer-events: none;
  z-index: 4;

  font-family: 'Archivo Black', 'Anton', 'Impact', sans-serif;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-stretch: 75%;
  text-indent: 0.22em;
  color: var(--stamp-ink);

  padding: 5px 11px 4px;
  border: 2.5px solid var(--stamp-ink);
  border-radius: 3px;
  background: transparent;

  box-shadow:
    inset 0 0 0 1.5px rgba(21,17,14,0.85),
    inset 0 0 0 2.5px var(--stamp-ink);

  text-shadow:
    0.6px 0.4px 0 rgba(231,90,74,0.55),
    -0.4px 0.5px 0 rgba(231,90,74,0.4),
    0 0 1.3px rgba(231,90,74,0.35);

  filter: drop-shadow(0 0 0.5px rgba(231,90,74,0.4)) contrast(1.05);

  /* Lighter stamp on dark paper — use plus-lighter so the red glows on
     the dark gate background instead of darkening like a multiply stamp. */
  mix-blend-mode: normal;
  opacity: 0.95;
}

#docs-gate .dg-stamp::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 4px;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 30%, rgba(21,17,14,0.85) 0 1.2px, transparent 1.4px),
    radial-gradient(circle at 78% 18%, rgba(21,17,14,0.75) 0 0.9px, transparent 1.1px),
    radial-gradient(circle at 42% 72%, rgba(21,17,14,0.8) 0 1.1px, transparent 1.3px),
    radial-gradient(circle at 88% 80%, rgba(21,17,14,0.65) 0 0.8px, transparent 1px),
    radial-gradient(circle at 22% 88%, rgba(21,17,14,0.75) 0 1px, transparent 1.2px),
    radial-gradient(circle at 60% 40%, rgba(21,17,14,0.6) 0 0.7px, transparent 0.9px),
    repeating-linear-gradient(72deg,
      transparent 0 5px,
      rgba(21,17,14,0.4) 5px 6px,
      transparent 6px 11px);
  mix-blend-mode: normal;
  opacity: 0.6;
}

#docs-gate .dg-stamp::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 1px solid var(--stamp-ink);
  border-radius: 5px;
  opacity: 0.32;
  pointer-events: none;
}

#docs-gate .dg-mark {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  background: #e75a4a;
  border-radius: 4px;
  display: grid; place-items: center;
  box-shadow: 0 0 0 4px rgba(231,90,74,0.18);
}
#docs-gate .dg-mark img { width: 38px; height: 38px; object-fit: contain; }

#docs-gate .dg-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: #e75a4a;
  margin-bottom: 10px;
  text-transform: uppercase;
}

#docs-gate .dg-title {
  font-family: 'Archivo Black', 'Anton', sans-serif;
  font-size: 26px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: #fff;
}

#docs-gate .dg-sub {
  font-family: 'Inter', 'Inter Tight', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin: 0 0 22px;
  line-height: 1.55;
}

#docs-gate #dg-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
#docs-gate #dg-input {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.22em;
  padding: 14px 14px;
  background: #0a0807;
  border: 1.5px solid #2f2520;
  border-radius: 4px;
  color: #fff;
  text-align: center;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#docs-gate #dg-input:focus {
  border-color: #e75a4a;
  box-shadow: 0 0 0 3px rgba(231,90,74,0.18);
}
#docs-gate #dg-input::placeholder { color: rgba(255,255,255,0.2); letter-spacing: 0.18em; font-size: 11px; }

#docs-gate #dg-form button {
  font-family: 'Archivo Black', 'Anton', sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  padding: 0 18px;
  background: #e75a4a;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}
#docs-gate #dg-form button:hover { filter: brightness(1.08); }
#docs-gate #dg-form button:active { transform: translateY(1px); }

#docs-gate .dg-msg {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 22px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.55);
  margin: 4px 0 14px;
  text-transform: uppercase;
}
#docs-gate .dg-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: #6ee07a;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(110,224,122,0.7);
  animation: dg-blink 1.4s ease-in-out infinite;
}
#docs-gate .dg-dot-err {
  background: #e75a4a;
  box-shadow: 0 0 6px rgba(231,90,74,0.8);
}
@keyframes dg-blink { 0%,100%{opacity:1;} 50%{opacity:0.35;} }

#docs-gate .dg-meta {
  display: flex; justify-content: space-between;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.3);
  margin: 0 0 14px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  padding-top: 10px;
}

#docs-gate .dg-back {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  text-transform: uppercase;
}
#docs-gate .dg-back:hover { color: #e75a4a; }

