/* xk-id pages: sign-in, sign-up, forgot password, reset password, verify email.
   A night-sky picture behind everything, the logo, one white card with a blue header. */

/* Open Sans: the free font AWS's design system uses (Amazon Ember itself is Amazon's own). One file, every weight. */
@font-face {
  font-family: "Open Sans";
  src: url("open-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --ink: #1f2633;          /* text on the card */
  --muted: #6b7486;
  --fill: #eef2fb;         /* inside of a field */
  --line: #d6dcea;
  --blue: #1f6fe5;         /* links, focus */
  --blue-1: #3d8bff;       /* header and button: top of the gradient */
  --blue-2: #1749c9;       /*                    bottom */
  --danger: #c62828;
  --ok: #1b7f4a;
  --font: "Open Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased;
  background: #070b1f url("bg.svg") center / cover no-repeat fixed;
}
a { color: var(--blue); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Top: the logo, centred ---------- */
.top { display: flex; justify-content: center; padding: 40px 16px 8px; }
.logo { display: inline-flex; }
.logo:hover { text-decoration: none; }
.logo__img { display: block; height: 34px; width: auto; }

/* ---------- The card ---------- */
main { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 36px 16px 48px; }
.card {
  width: 456px; max-width: 100%;
  background: #fff; border-radius: 14px;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .55);
  animation: rise .5s cubic-bezier(.22, 1, .36, 1) both;
}
/* The blue header sits over the top edge of the card. */
.card__head {
  margin: -24px 16px 0;
  padding: 26px 20px 24px;
  border-radius: 10px;
  background: linear-gradient(195deg, var(--blue-1), var(--blue-2));
  box-shadow: 0 8px 20px -6px rgba(23, 73, 201, .55);
  color: #fff; text-align: center;
}
.card__head h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 700; }
.card__head p { margin: 8px 0 0; font-size: 15px; color: rgba(255, 255, 255, .85); }
.card__head b { color: #fff; }
.card__body { padding: 28px 24px 26px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Fields: the label sits on the field's border ---------- */
.field { position: relative; }
.field + .field, .note + .field, .hint + .field, .chosen + div .field { margin-top: 20px; }
.field > label {
  position: absolute; left: 12px; top: -9px; z-index: 1;
  padding: 0 5px; font-size: 12px; font-weight: 600; color: var(--muted);
  background: linear-gradient(#fff 50%, var(--fill) 50%);
  border-radius: 3px;
}
.control { position: relative; }
.input {
  display: block; width: 100%; height: 48px; padding: 8px 46px 0 16px;
  font-size: 16px; /* 16px so phones don't zoom in on focus */
  color: var(--ink); background: var(--fill);
  border: 1px solid var(--line); border-radius: 8px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #9aa3b5; }
.input:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 111, 229, .18); }
.field:focus-within > label { color: var(--blue); }

/* Show / hide password. */
.reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
}
.reveal svg { width: 18px; height: 18px; }
.reveal:focus-visible { outline: 2px solid var(--blue); }

/* After "Continue": the email shows as text with a way to change it. */
.chosen { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.chosen span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.chosen button { border: 0; background: none; padding: 4px; color: var(--blue); cursor: pointer; font-weight: 600; }

.hint { margin: 8px 0 0 4px; font-size: 13px; color: var(--muted); }

/* ---------- Button ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 46px; margin-top: 26px;
  border: 0; border-radius: 8px; cursor: pointer;
  background: linear-gradient(195deg, var(--blue-1), var(--blue-2)); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 6px 14px -6px rgba(23, 73, 201, .6);
  transition: filter .15s, box-shadow .15s;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 10px 18px -6px rgba(23, 73, 201, .65); }
.btn:focus-visible { outline: 3px solid rgba(31, 111, 229, .4); outline-offset: 3px; }
.btn[disabled] { opacity: .7; cursor: default; filter: none; }
a.btn { text-decoration: none; }

/* ---------- Messages ---------- */
.note { margin-bottom: 18px; padding: 12px 14px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.note.error { background: #fdecea; color: var(--danger); }
.note.ok { background: #e7f6ee; color: var(--ok); }
.message { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); text-align: center; }
.fine { margin: 20px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); text-align: center; }

/* ---------- Links under the form ---------- */
.links { margin-top: 26px; text-align: center; font-size: 14px; color: var(--muted); }
.links p { margin: 0; }
.links p + p { margin-top: 12px; }

/* ---------- Bottom ---------- */
footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px;
  padding: 20px max(32px, env(safe-area-inset-right)) 24px max(32px, env(safe-area-inset-left));
  font-size: 14px; color: rgba(255, 255, 255, .8);
}
footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
footer a { color: #fff; font-weight: 500; }

@media (max-width: 520px) {
  .top { padding-top: 28px; }
  main { padding-top: 28px; }
  .card__head { margin: -20px 12px 0; padding: 22px 16px 20px; }
  .card__head h1 { font-size: 21px; }
  .card__body { padding: 24px 18px 22px; }
  footer { justify-content: center; text-align: center; padding-left: 16px; padding-right: 16px; }
  footer nav { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }
