/* ==========================================================================
   Passcode gate — minimal, no imagery, no site content.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink: #14141a;
  --paper: #f5f1e9;
  --vermilion: #dc3b1e;
  --vermilion-l: #f2724f;
  --stone-ink: #a5a096;
  --line: rgba(245, 241, 233, .18);
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  /* minmax(0, …) stops the input's intrinsic width from widening the track
     on very narrow screens, which would create a horizontal scrollbar. */
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
  align-content: center;
  justify-items: center;
  padding: 28px 20px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.gate {
  width: 100%;
  max-width: 420px;
}

.gate-mark {
  font-family: var(--font-display);
  overflow-wrap: break-word;
  font-weight: 300;
  font-size: clamp(1.5rem, 6vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
  margin: 0 0 10px;
}

.gate-rule {
  width: 46px;
  height: 2px;
  background: var(--vermilion);
  margin-bottom: 34px;
}

.gate-label {
  display: block;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--stone-ink);
  margin-bottom: 12px;
}

.gate-field { position: relative; display: flex; align-items: stretch; }

.gate-input {
  flex: 1 1 auto;
  min-width: 0;
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-right: 0;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: .18em;
  padding: 16px 16px;
  transition: border-color .3s ease;
}
.gate-input::placeholder { color: rgba(245, 241, 233, .32); letter-spacing: .18em; }
.gate-input:focus { outline: 0; border-color: var(--vermilion-l); }
.gate-field:focus-within .gate-submit { border-color: var(--vermilion-l); }

.gate-submit {
  flex: 0 0 auto;
  background: var(--vermilion);
  color: #fff;
  border: 1px solid var(--vermilion);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 0 22px;
  cursor: pointer;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.gate-submit:hover, .gate-submit:focus-visible { background: var(--paper); border-color: var(--paper); color: var(--ink); }

.gate-toggle {
  margin-top: 14px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--stone-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color .3s ease, border-color .3s ease;
}
.gate-toggle:hover, .gate-toggle:focus-visible { color: var(--paper); border-bottom-color: var(--line); }

.gate-msg {
  min-height: 22px;
  margin-top: 18px;
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--vermilion-l);
}

.gate-form.shake { animation: gshake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes gshake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

:focus-visible { outline: 2px solid var(--vermilion-l); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
