:root {
  --gate-bg: oklch(0.952 0 0);
  --gate-card: oklch(1 0 0);
  --gate-muted: oklch(0.931 0 0);
  --gate-text: oklch(0.297 0 0);
  --gate-muted-text: oklch(0.528 0 0);
  --gate-accent: oklch(0.626 0.179 40.9);
  --gate-accent-hover: oklch(0.58 0.179 40.9);
  --gate-border: oklch(0.87 0 0);
  --gate-input-bg: oklch(1 0 0);
  --gate-error: oklch(0.626 0.179 40.9);
  --gate-radius: 0.625rem;
  --gate-font: "Segoe UI", Roboto, system-ui, sans-serif;
}

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

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

body {
  font-family: var(--gate-font);
  color: var(--gate-text);
  background: var(--gate-bg);
}

.gate {
  display: flex;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 1rem 1rem 2rem;
}

.gate__card {
  width: min(100%, 24rem);
  margin: auto;
  overflow: hidden;
  background: var(--gate-muted);
  border: 1px solid var(--gate-border);
  border-radius: calc(var(--gate-radius) + 0.125rem);
  box-shadow:
    0 1px 3px rgb(24 24 27 / 5%),
    0 4px 16px rgb(24 24 27 / 6%);
}

.gate__body {
  margin: -1px;
  padding: 2rem 2rem 1.5rem;
  background: var(--gate-card);
  border: 1px solid var(--gate-border);
  border-radius: calc(var(--gate-radius) + 0.125rem);
}

.gate__header {
  text-align: center;
}

.gate__logo {
  display: block;
  margin: 0 auto;
}

.gate__title {
  margin: 1rem 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.gate__lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  text-wrap: pretty;
  color: var(--gate-text);
}

.gate__fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.gate__label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--gate-text);
}

.gate__input {
  width: 100%;
  height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-family: ui-monospace, "Cascadia Code", monospace;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  color: var(--gate-text);
  background: var(--gate-input-bg);
  border: 1px solid var(--gate-border);
  border-radius: var(--gate-radius);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.gate__input::placeholder {
  letter-spacing: 0.35em;
  color: var(--gate-muted-text);
  text-transform: none;
}

.gate__input:focus {
  outline: none;
  border-color: var(--gate-accent);
  box-shadow: 0 0 0 3px oklch(0.626 0.179 40.9 / 50%);
}

.gate__error {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
  color: var(--gate-error);
}

.gate__error[hidden] {
  display: none;
}

.gate__submit {
  height: 2.75rem;
  margin-top: 0.25rem;
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  color: oklch(1 0 0);
  cursor: pointer;
  background: var(--gate-accent);
  border: none;
  border-radius: var(--gate-radius);
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.gate__submit:hover {
  background: var(--gate-accent-hover);
}

.gate__submit:active {
  transform: scale(0.98);
}

.gate__submit:focus-visible {
  outline: 2px solid var(--gate-accent);
  outline-offset: 2px;
}

.gate__footer {
  padding: 0.75rem;
}

.gate__footer-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
  color: oklch(0.27 0.038 227.5);
}

.gate__link {
  margin-left: 0.125rem;
  font-weight: 500;
  color: var(--gate-accent);
  text-decoration: none;
}

.gate__link:hover {
  text-decoration: underline;
}

.gate__link:focus-visible {
  outline: 2px solid var(--gate-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
