/* Counter Service, on the web.
 *
 * These two pages are the only part of Local Haunts a person meets in a
 * browser, and they meet it at an anxious moment: confirming an account or
 * recovering one. So they are deliberately plain — brand colours, the
 * wordmark face, and nothing that needs to load before the page is useful.
 *
 * No build step, no framework, no external requests except the fonts. If
 * Google Fonts is blocked the fallbacks are real stacks and the page still
 * works.
 */

:root {
  --sign-red: #bb2121;
  --deep-teal: #234b4d;
  --amber: #d9861e;
  --cream: #fcf6ea;
  --ink: #2b2623;
  --ink-soft: #6e6357;
  --rule: #e0d6c4;
  --ok: #1f6f4a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: Archivo, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 34px 30px 30px;
  box-shadow: 0 1px 2px rgba(43, 38, 35, 0.05), 0 18px 40px rgba(43, 38, 35, 0.08);
}

.wordmark {
  font-family: "Alfa Slab One", Georgia, serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  color: var(--sign-red);
  margin: 0 0 4px;
}

.motto {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 28px;
}

h1 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 10px;
  text-wrap: balance;
}

p {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

p.tight {
  margin-bottom: 8px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}

.field {
  margin-bottom: 16px;
}

.password-wrap {
  position: relative;
  display: flex;
}

input[type="password"],
input[type="text"] {
  flex: 1;
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16 stops iOS Safari zooming on focus */
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 9px;
  padding: 12px 76px 12px 13px;
}

input:focus-visible {
  outline: 2px solid var(--deep-teal);
  outline-offset: 1px;
  border-color: var(--deep-teal);
}

.reveal {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--deep-teal);
  cursor: pointer;
  border-radius: 6px;
}

.reveal:hover {
  background: #f2efe8;
}

button.primary {
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--cream);
  background: var(--deep-teal);
  border: 0;
  border-radius: 9px;
  padding: 14px;
  cursor: pointer;
}

button.primary:disabled {
  opacity: 0.45;
  cursor: default;
}

button.primary:focus-visible,
.applink:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.applink {
  display: block;
  text-align: center;
  font-weight: 700;
  color: var(--cream);
  background: var(--sign-red);
  border-radius: 9px;
  padding: 14px;
  text-decoration: none;
  margin-bottom: 14px;
}

.hint {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}

.message {
  font-size: 14px;
  border-radius: 9px;
  padding: 12px 14px;
  margin: 0 0 16px;
}

.message.error {
  color: var(--sign-red);
  background: #fdf1ef;
  border: 1px solid #f0d2cd;
}

.message.ok {
  color: var(--ok);
  background: #eff7f2;
  border: 1px solid #cfe6da;
}

.tick {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #eff7f2;
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hidden {
  display: none;
}

@media (prefers-color-scheme: dark) {
  body {
    background: #17130f;
    color: #f0e8da;
  }

  .card {
    background: #241e19;
    border-color: #3b322a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 20px 46px rgba(0, 0, 0, 0.45);
  }

  h1 {
    color: #f0e8da;
  }

  .wordmark {
    color: #e05c56;
  }

  p,
  .motto,
  .hint {
    color: #b6a896;
  }

  label {
    color: #f0e8da;
  }

  input[type="password"],
  input[type="text"] {
    background: #1c1713;
    border-color: #3b322a;
    color: #f0e8da;
  }

  .reveal {
    color: #7fb5a9;
  }

  .reveal:hover {
    background: #2a231d;
  }

  button.primary {
    background: #7fb5a9;
    color: #10201f;
  }

  .applink {
    background: #e05c56;
    color: #2a0f0d;
  }

  .message.error {
    color: #f0a8a3;
    background: #2f1b19;
    border-color: #4a2a26;
  }

  .message.ok,
  .tick {
    color: #8fd4b0;
    background: #16261e;
  }

  .message.ok {
    border-color: #2a4436;
  }
}
