/* ============================================================
   Password gate — iOS 4 style.
   Glossy pill input + round glass "Go" button, Helvetica Neue,
   flat white ground. This is a soft, client-side gate: the site
   is static with no server, so the password and gated markup ship
   in the page either way. It keeps casual visitors out; it is not
   real access control. See EDITING.md if you want real protection
   later (Vercel Deployment Protection, once the site has a server).
   ============================================================ */

#gate-screen {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Locked by default -- no flash of the real site while JS boots. */
body:not(.gate-unlocked) > .content {
  visibility: hidden;
  pointer-events: none;
}
body.gate-unlocked #gate-screen {
  display: none;
}

/* Same face, variation axes, and stylistic sets as the h1 "remote"
   wordmark over the video (source/css/site.css, the h1 rule) -- just at
   the gate's own size. */
#gate-wordmark {
  font-family: "Gravity Variable", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-style: normal;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -0.017em;
  color: rgba(0, 0, 0, 0.9);
  font-variation-settings: 'wdth' 80, 'slnt' 0;
  font-feature-settings: "ss03", "ss05", "ss06", "ss07", "ss12";
  margin-bottom: 2.25rem;
  -webkit-font-smoothing: antialiased;
}

#gate-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The pill. Recessed/glassy like the iOS4 Safari address bar. */
#gate-pill {
  position: relative;
  width: 280px;
  height: 44px;
  background: linear-gradient(to bottom, #fbfbfb 0%, #ececee 100%);
  border-radius: 22px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transition: box-shadow 120ms ease;
}
#gate-pill:focus-within {
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 0 0 3px rgba(60, 130, 246, 0.35);
}

#gate-password {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  border-radius: 22px;
  padding: 0 50px 0 18px;
  font-family: inherit;
  font-size: 15px;
  color: #1c1c1e;
  box-sizing: border-box;
}
#gate-password::placeholder {
  color: #9a9a9e;
}

/* The round glossy "Go" button, embedded in the pill's right edge. */
#gate-go {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(15, 55, 130, 0.55);
  border-radius: 50%;
  background: linear-gradient(
    to bottom,
    #6fb1fc 0%,
    #3d7df2 46%,
    #2c63d9 50%,
    #1547b8 100%
  );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.65),
    0 1px 2px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#gate-go:active {
  background: linear-gradient(
    to bottom,
    #5a9ded 0%,
    #316cd6 46%,
    #234fb0 50%,
    #0e3999 100%
  );
}
/* Glass highlight arcing over the top half of the button. */
#gate-go::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;
  right: 3px;
  height: 55%;
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0));
  pointer-events: none;
}
#gate-go svg {
  position: relative;
  width: 14px;
  height: 14px;
  filter: drop-shadow(0 -1px 0.5px rgba(0, 0, 0, 0.35));
}

#gate-error {
  margin-top: 14px;
  font-size: 13px;
  color: #d3382f;
  opacity: 0;
  transition: opacity 150ms ease;
  height: 16px;
}
#gate-error.visible {
  opacity: 1;
}

@keyframes gate-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
#gate-pill.shake {
  animation: gate-shake 420ms ease;
}

@media (max-width: 420px) {
  #gate-wordmark { font-size: 2rem; }
  #gate-pill { width: 240px; }
}
