:root {
  color-scheme: dark;
  --bg: #000000;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.58);
  --success: rgba(38, 153, 78, 0.72);
  --error: rgba(163, 31, 31, 0.82);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Times New Roman", Times, serif;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease, background 220ms ease;
}

body.flash-red::after {
  background: var(--error);
  opacity: 0.45;
}

body.flash-green::after {
  background: var(--success);
  opacity: 0.4;
}

.shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.frame {
  position: fixed;
  inset: 0;
}

.step {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
  padding: 24px;
  text-align: center;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 650ms ease,
    transform 650ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 650ms ease;
  visibility: hidden;
}

.step.is-active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.06;
}

.gate-form {
  width: min(100%, 340px);
  display: grid;
  gap: 12px;
}

input,
button {
  width: 100%;
  border: 1px solid #ffffff;
  border-radius: 0;
  background: #000000;
  color: var(--text);
  font: inherit;
}

input {
  min-height: 58px;
  padding: 0 16px;
  text-align: center;
  font-size: 1.05rem;
  transition: background 180ms ease, transform 180ms ease;
}

input:focus {
  outline: none;
  background: #070707;
  transform: translateY(-1px);
}

input[type="date"] {
  color-scheme: dark;
  color: var(--text);
}

input[type="date"]::-webkit-datetime-edit {
  color: var(--text);
}

input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  color: var(--text);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.95;
  cursor: pointer;
}

button {
  min-height: 52px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 1rem;
  text-transform: none;
  transition: background 180ms ease, transform 180ms ease;
}

button:hover,
button:focus-visible {
  background: #111111;
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.58;
  cursor: wait;
  transform: none;
}

.caption {
  margin: 0;
  max-width: 28ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.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;
}

@media (max-width: 640px) {
  .shell {
    padding: 18px;
  }

  h1 {
    max-width: 12ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
