/* ============================================================
   Nudge — demo access gate
   Matches the app: warm paper, amber action, DM Serif Display.
   Plain CSS (no build step) so the lock paints instantly.
   ============================================================ */

html.gate-locked, html.gate-locked body {
  overflow: hidden;
}

#nudge-gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg, #FAFAF8);
  font-family: var(--sans, 'IBM Plex Sans', system-ui, sans-serif);
  color: var(--ink, #1C1917);
  -webkit-font-smoothing: antialiased;
  opacity: 1;
  transition: opacity 0.35s ease;
}
#nudge-gate.gate-hide { opacity: 0; }

/* Soft warm wash behind the card */
#nudge-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(255,107,53,0.10), transparent 60%),
    radial-gradient(700px 480px at 90% 110%, rgba(245,166,35,0.10), transparent 60%);
  pointer-events: none;
}

.gate-card {
  position: relative;
  width: 100%;
  max-width: 384px;
  background: var(--paper, #fff);
  border: 1px solid var(--line, rgba(28,25,23,0.10));
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(28,25,23,0.05), 0 24px 60px -24px rgba(28,25,23,0.28);
  padding: 36px 34px 30px;
  animation: gate-rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes gate-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to   { opacity: 1; transform: none; }
}

.gate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.gate-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--action, #FF6B35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 1px 2px rgba(194,65,12,0.35);
}
.gate-mark::after {
  content: "";
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--cream, #FFFDF6);
}
.gate-brand-name {
  font-family: var(--serif, 'DM Serif Display', Georgia, serif);
  font-size: 26px;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.01em;
}

.gate-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint, #A8A29E);
  margin: 0 0 8px;
}
.gate-title {
  font-family: var(--serif, 'DM Serif Display', Georgia, serif);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.18;
  margin: 0 0 8px;
  text-wrap: balance;
}
.gate-sub {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft, #78716C);
  margin: 0 0 22px;
  text-wrap: pretty;
}

.gate-field {
  position: relative;
  margin-bottom: 12px;
}
.gate-input {
  width: 100%;
  font-family: var(--sans, 'IBM Plex Sans', system-ui, sans-serif);
  font-size: 16px;
  color: var(--ink, #1C1917);
  background: var(--cream, #FFFDF6);
  border: 1px solid var(--line-strong, rgba(28,25,23,0.25));
  border-radius: 12px;
  padding: 13px 46px 13px 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gate-input::placeholder { color: var(--ink-faint, #A8A29E); }
.gate-input:focus {
  border-color: var(--action, #FF6B35);
  box-shadow: 0 0 0 3px rgba(255,107,53,0.16);
}
.gate-input:disabled { opacity: 0.6; cursor: not-allowed; }

.gate-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-faint, #A8A29E);
  cursor: pointer;
  padding: 7px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.13s ease, background 0.13s ease;
}
.gate-eye:hover { color: var(--ink-soft, #78716C); background: rgba(0,0,0,0.04); }

.gate-btn {
  width: 100%;
  appearance: none;
  border: 1px solid var(--action, #FF6B35);
  background: var(--action, #FF6B35);
  color: #fff;
  font-family: var(--sans, 'IBM Plex Sans', system-ui, sans-serif);
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  padding: 13px 18px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(194,65,12,0.3);
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.08s ease, opacity 0.14s ease;
}
.gate-btn:hover { background: var(--action-deep, #C2410C); border-color: var(--action-deep, #C2410C); }
.gate-btn:active { transform: translateY(0.5px); }
.gate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.gate-msg {
  min-height: 18px;
  font-size: 13px;
  margin: 12px 2px 0;
  line-height: 1.45;
  text-wrap: pretty;
}
.gate-msg.error { color: var(--destructive, #E5484D); }
.gate-msg.muted { color: var(--ink-faint, #A8A29E); }

.gate-shake { animation: gate-shake 0.4s ease; }
@keyframes gate-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

.gate-foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line, rgba(28,25,23,0.10));
  font-size: 12px;
  color: var(--ink-faint, #A8A29E);
  text-align: center;
  text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  .gate-card { animation: none; }
  .gate-shake { animation: none; }
  #nudge-gate { transition: none; }
}
