/* Sign-in: the night-sky hero from alexroper.dev under a navy wash, the AR.
   monogram and wordmark top-left, the form on a dark glass plate. */

:root {
  --night: #04060b;
  --cream: #f3efe6;
  --cream-ink: #101522;
  --accent: #6ea8fe;
  --danger: #f87171;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --on-night-soft: rgba(214, 228, 255, 0.74);
  --on-night-muted: rgba(214, 228, 255, 0.55);
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --pad: clamp(18px, 4vw, 44px);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.login {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

/* backdrop ---------------------------------------------------------- */

.login__bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--night);
}

.login__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.login__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(54% 46% at 84% 2%, rgba(47, 111, 228, 0.4), transparent 70%),
    radial-gradient(120% 100% at 44% 46%, rgba(4, 6, 11, 0.1) 0%, rgba(4, 6, 11, 0.44) 62%, rgba(4, 6, 11, 0.88) 100%),
    linear-gradient(180deg, rgba(4, 6, 11, 0.7) 0%, rgba(4, 6, 11, 0.22) 34%, rgba(4, 6, 11, 0.78) 100%);
}

/* top bar ----------------------------------------------------------- */

.login__top {
  display: flex;
  align-items: center;
  padding: clamp(20px, 3.2vw, 32px) var(--pad) 0;
}

.login__brand {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 16px);
}

.login__mark {
  display: block;
  height: clamp(26px, 2.8vw, 34px);
  width: auto;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.55));
}

.login__lockup {
  display: grid;
  gap: 5px;
  padding-left: clamp(12px, 1.6vw, 16px);
  border-left: 1px solid rgba(255, 255, 255, 0.32);
}

.login__wordmark {
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.login__wordmark span {
  color: rgba(242, 245, 252, 0.62);
}

.login__product {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

/* card -------------------------------------------------------------- */

.login__main {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3.5vh, 40px) var(--pad) clamp(16px, 3vh, 34px);
}

.login__card {
  width: min(392px, 100%);
  padding: clamp(22px, 3.2vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 2px solid var(--accent);
  border-radius: 10px;
  background: rgba(9, 14, 25, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

.login__title {
  margin: 0 0 clamp(16px, 2.4vw, 22px);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

/* form -------------------------------------------------------------- */

.login__form {
  display: grid;
  gap: clamp(12px, 2vw, 15px);
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  color: var(--on-night-soft);
  font-size: 12.5px;
  font-weight: 500;
}

.field__input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(6, 10, 20, 0.72);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}

.field__input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(6, 10, 20, 0.9);
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--on-night-soft);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.check input[type='checkbox'] {
  appearance: none;
  display: grid;
  place-content: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(6, 10, 20, 0.72);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.check input[type='checkbox']::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--cream-ink);
  border-bottom: 2px solid var(--cream-ink);
  transform: rotate(-45deg) translate(0, -1px) scale(0);
  transition: transform 0.12s;
}

.check input[type='checkbox']:checked {
  border-color: var(--cream);
  background: var(--cream);
}

.check input[type='checkbox']:checked::after {
  transform: rotate(-45deg) translate(0, -1px) scale(1);
}

/* the site's primary button: a cream plate with dark ink */
.login__submit {
  height: 42px;
  margin-top: 4px;
  border: 1px solid var(--cream);
  border-radius: 6px;
  background: var(--cream);
  color: var(--cream-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.login__submit:hover {
  background: #ffffff;
  border-color: #ffffff;
}

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

.login__error {
  margin: 0 0 16px;
  padding: 9px 11px;
  border: 1px solid rgba(248, 113, 113, 0.5);
  border-radius: 6px;
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  font-size: 13px;
}

/* footer ------------------------------------------------------------ */

.login__foot {
  display: flex;
  padding: 14px var(--pad) 18px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(4, 6, 11, 0.85));
  color: var(--on-night-muted);
  font-size: 11.5px;
}

/* phones ------------------------------------------------------------ */

@media (max-width: 560px) {
  .login__bg img {
    object-position: center 26%;
  }

  .login__bg::after {
    background:
      radial-gradient(90% 50% at 86% 0%, rgba(47, 111, 228, 0.36), transparent 70%),
      linear-gradient(180deg, rgba(4, 6, 11, 0.82) 0%, rgba(4, 6, 11, 0.32) 28%, rgba(4, 6, 11, 0.86) 82%);
  }

  .login__main {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: clamp(18px, 3.4vh, 30px);
  }

  .login__card {
    width: 100%;
    padding: 20px 18px;
    background: rgba(9, 14, 25, 0.88);
  }

  .login__mark {
    height: 26px;
  }

  .login__wordmark {
    font-size: 13px;
    letter-spacing: 0.16em;
  }

  .login__product {
    font-size: 8px;
  }
}
