*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 300;
  color: #f4ede0;
  background: #1a1510;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

/* A ~24px-wide copy of the hero photo, scaled up and blurred further. The real
   photo never reaches visitors who haven't entered the code. */
.bg {
  position: fixed;
  inset: -10%;
  background: #1a1510 url('/gate/gate-bg.jpg') center / cover no-repeat;
  filter: blur(40px) saturate(1.1);
  transform: scale(1.1);
}

.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 2, 0.45);
}

.panel {
  position: relative;
  width: 100%;
  max-width: 26rem;
  text-align: center;
  padding: clamp(2rem, 6vw, 3.25rem) clamp(1.5rem, 5vw, 2.75rem);
  background: rgba(20, 14, 8, 0.38);
  border: 1px solid rgba(244, 237, 224, 0.16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

h1 {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.6rem, 11vw, 3.6rem);
  line-height: 1;
}

h1 span { color: #d4a96a; font-style: italic; }

.rule { width: 2rem; height: 1px; margin: 1.6rem auto; background: rgba(212, 169, 106, 0.7); }

.lead {
  margin: 0 0 1.75rem;
  font-size: 0.78rem;
  line-height: 1.9;
  color: rgba(244, 237, 224, 0.75);
}

input {
  width: 100%;
  padding: 0.9rem 1rem;
  font: inherit;
  font-size: 16px; /* no iOS zoom-on-focus */
  letter-spacing: 0.3em;
  text-align: center;
  color: #f4ede0;
  background: rgba(244, 237, 224, 0.08);
  border: 1px solid rgba(244, 237, 224, 0.3);
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
}

input::placeholder { letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.7rem; color: rgba(244, 237, 224, 0.5); }
input:focus { border-color: #d4a96a; }
input.error { border-color: #e08a7a; }

button {
  width: 100%;
  margin-top: 0.9rem;
  padding: 0.95rem 1rem;
  font: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #1a1510;
  background: #f4ede0;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover:not(:disabled) { background: #fff; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

#gate-msg { min-height: 1.4rem; margin: 1rem 0 0; font-size: 0.75rem; color: #f0a898; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
