:root {
  --bg: #704f4f;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.28);
  --line-focus: rgba(255, 255, 255, 0.55);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --danger: #ffb4b4;
  --success: #d4f5d4;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Times New Roman", Times, serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.stack {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand {
  margin: 0 0 3rem;
  user-select: none;
}

.brand__primary {
  margin: 0;
  font-size: clamp(3.5rem, 14vw, 5.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand__secondary {
  margin: 0.35rem 0 0;
  font-size: clamp(1rem, 4.2vw, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.28em;
  line-height: 1;
}

.gate {
  width: auto;
  max-width: none;
}

.gate__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.gate__field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.gate__input {
  width: 7.5rem;
  padding: 0.45rem 0.35rem 0.5rem;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  letter-spacing: 0.28em;
  text-align: center;
  outline: none;
  transition: border-color 0.25s ease, opacity 0.25s ease;
}

.gate__input::placeholder {
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 0.2em;
}

.gate__input:focus {
  border-bottom-color: rgba(255, 255, 255, 0.62);
  background: transparent;
  box-shadow: none;
}

.gate__submit {
  width: auto;
  min-width: 5.5rem;
  margin-top: 0.15rem;
  padding: 0.38rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    opacity 0.25s ease;
}

.gate__submit:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--text);
}

.gate__submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.gate__error,
.form__error {
  min-height: 1.1rem;
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: rgba(255, 180, 180, 0.9);
}

.gate__error:empty,
.form__error:empty {
  display: none;
}

.form {
  width: 100%;
  max-width: 420px;
  text-align: left;
}

.form__group {
  margin-bottom: 1.35rem;
}

.form__label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.form__textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--line-focus);
  background: var(--surface-hover);
}

.form__submit {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.form__submit:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--line-focus);
}

.form__submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.form__success {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(212, 245, 212, 0.35);
  background: rgba(212, 245, 212, 0.08);
  color: var(--success);
  font-size: 0.92rem;
  text-align: center;
}

.form__success[hidden] {
  display: none;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
