/* ──────────────────────────────────────────────────────────
   Telos Creative — Strategy / Presentation Auth Gate
   Used by:
     - presentation-may2026.html              (admin-only)
     - presentation-may2026-part2.html        (admin-only)
     - strategy/{tenant}-2026-05.html         (admin-or-tenant:{slug})
   v=58-07 — Phase 58-07 introduces the gate

   Discoverability protection only — codes live client-side.
   See SUMMARY 58-07 for honest threat-model notes.
   ────────────────────────────────────────────────────────── */

/* When the gate is locked, hide every direct child of <body>
   EXCEPT the gate itself. Use `visibility: hidden` (not display:none)
   so deck.js can still measure slide layout on first render and the
   user doesn't see a layout pop after auth resolves. */
body.auth-gate-locked > *:not(.auth-gate) {
  visibility: hidden;
}

/* ── Gate backdrop ───────────────────────────────────────── */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;

  background: #0F1B2B;          /* matches deck --bg-body */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #FFFFFF;

  /* Fade-in keeps the gate from flashing during initial paint */
  animation: authGateFadeIn 180ms ease-out;
}

@keyframes authGateFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Gate card ───────────────────────────────────────────── */
.auth-gate__card {
  width: 100%;
  max-width: 380px;
  background: #1A2940;          /* matches deck --bg-card */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 32px 28px 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  text-align: center;
}

/* ── Brand mark (TC monogram) ────────────────────────────── */
.auth-gate__brand {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border-radius: 10px;
  background: #0F1B2B;
  border: 1px solid rgba(106, 171, 181, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6AABB5;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
}

/* ── Headings ────────────────────────────────────────────── */
.auth-gate__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.auth-gate__sub {
  margin: 0 0 24px;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
}

/* ── Form ────────────────────────────────────────────────── */
.auth-gate__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-gate__input {
  width: 100%;
  padding: 12px 14px;
  background: #0F1B2B;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.01em;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  box-sizing: border-box;
}

.auth-gate__input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.auth-gate__input:focus {
  border-color: #6AABB5;
  box-shadow: 0 0 0 3px rgba(106, 171, 181, 0.18);
}

.auth-gate__input.is-shaking {
  animation: authGateShake 380ms cubic-bezier(.36,.07,.19,.97);
  border-color: #E07A6A;
}

@keyframes authGateShake {
  10%, 90%  { transform: translateX(-2px); }
  20%, 80%  { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60%  { transform: translateX(6px); }
}

.auth-gate__submit {
  width: 100%;
  padding: 12px 16px;
  background: #6AABB5;
  border: 1px solid #6AABB5;
  border-radius: 10px;
  color: #0F1B2B;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.auth-gate__submit:hover {
  background: #8DC5CD;
}

.auth-gate__submit:active {
  transform: translateY(1px);
}

.auth-gate__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ── Error message — generic, no oracle ──────────────────── */
.auth-gate__error {
  min-height: 18px;
  margin: 4px 0 -4px;
  font-size: 12.5px;
  color: #E07A6A;
  letter-spacing: 0.01em;
  text-align: left;
  visibility: hidden;
}

.auth-gate__error.is-visible {
  visibility: visible;
}

/* ── Footer ──────────────────────────────────────────────── */
.auth-gate__foot {
  margin-top: 22px;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.32);
  text-transform: uppercase;
}

/* ── Print: never show the gate in print preview ─────────── */
@media print {
  .auth-gate { display: none !important; }
  body.auth-gate-locked > *:not(.auth-gate) { visibility: visible !important; }
}
