/* Passphrase gate — blurs the page behind a centered unlock card */
html.is-gated,
html.is-gated body {
  overflow: hidden;
}

/* the custom cursor is also a direct child of body — keep it sharp */
html.is-gated body > *:not(.gate):not(#cursor-dot) {
  filter: blur(9px);
  pointer-events: none;
  user-select: none;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.72);
}

.gate-card {
  width: 100%;
  max-width: 26rem;
  padding: 2.25rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.875rem;
  background: #fff;
  box-shadow: 0 24px 60px -24px rgba(20, 19, 24, 0.28);
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
}

.gate-title {
  margin: 0 0 0.625rem;
  font-family: "Bitter", Georgia, serif;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
  color: #16151a;
}

.gate-note {
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(22, 21, 26, 0.7);
}

.gate-note a {
  color: #d81f45;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gate-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gate-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(22, 21, 26, 0.55);
}

.gate-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #16151a;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gate-input:focus {
  outline: none;
  border-color: #16151a;
  box-shadow: 0 0 0 3px rgba(22, 21, 26, 0.12);
}

.gate-error {
  margin: 0.625rem 0 0;
  font-size: 0.8125rem;
  color: #d81f45;
}

.gate-btn {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 999px;
  background: #16151a;
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  /* the site draws its own dot cursor — don't reintroduce the OS pointer */
  cursor: none;
  transition: background-color 0.2s ease;
}

.gate-btn:hover {
  background: #333138;
}

.gate-back {
  display: block;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 300;
  color: rgba(22, 21, 26, 0.6);
  text-decoration: none;
}

.gate-back:hover {
  color: #16151a;
}

.gate-card.shake {
  animation: gate-shake 0.35s ease;
}

@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

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

.gate-btn-arrow {
  display: inline-block;
}

.gate-btn:hover .gate-btn-arrow {
  animation: gate-arrow-bounce 0.6s ease infinite;
}

@keyframes gate-arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .gate-btn:hover .gate-btn-arrow {
    animation: none;
  }
}

/* "email me" is a copy control styled as the inline link it replaced */
.gate-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: #d81f45;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  vertical-align: baseline;
}

.gate-copy:hover {
  color: #b3163a;
}

.gate-copy:focus-visible {
  outline: 2px solid #d81f45;
  outline-offset: 3px;
  border-radius: 2px;
}

.gate-copy-icon,
.gate-copy-check {
  width: 0.95em;
  height: 0.95em;
  flex: none;
}

.gate-copy-check {
  display: none;
}

.gate-copy.is-copied {
  color: #1f8a4c;
  text-decoration: none;
}

.gate-copy.is-copied .gate-copy-icon {
  display: none;
}

.gate-copy.is-copied .gate-copy-check {
  display: block;
}
