@font-face {
  font-family: Manrope;
  src: url('/assets/manrope/Manrope-Variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #18181a;
  --muted: #56565b;
  --paper: #fff;
  --surface: #f6f6f7;
  --recess: inset 0 1px 3px #19191d14, inset 0 -1px 0 #fff;
  --raised: inset 0 1px 0 #fff, 0 1px 2px #19191d14, 0 3px 6px #19191d0b;
  font: 16px/1.5 Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, p { margin: 0; }
[hidden] { display: none !important; }
input, button { font: inherit; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100dvh;
}
.login-brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding: clamp(2rem, 7vw, 7rem);
  color: var(--ink);
  background: linear-gradient(140deg, #fbfbfc, #eeeef1);
}
.login-brand::before, .login-brand::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: clamp(29rem, 47vw, 57rem);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 1px 2px 5px #19191d17, 0 1px 1px #fff;
  pointer-events: none;
}
.login-brand::before { bottom: -24%; left: 30%; }
.login-brand::after { bottom: -31%; left: 36%; }
.wordmark {
  justify-self: start;
  font-size: 2.3rem;
  font-weight: 790;
  letter-spacing: -.085em;
  text-decoration: none;
}
.wordmark > span:first-child { display: none; }
.brand-heading {
  max-width: 11em;
  font-size: clamp(2.25rem, 4.1vw, 4.1rem);
  font-weight: 670;
  letter-spacing: -.076em;
  line-height: 1.045;
}
.brand-heading em { font-style: normal; }

.login-side { display: grid; align-items: center; justify-items: center; padding: clamp(1rem, 4vw, 3rem); }
.login-panel {
  width: min(100%, 30rem);
  padding: clamp(1.5rem, 4vw, 3rem);
}
.login-panel h1 { font-size: clamp(2rem, 4vw, 3.05rem); font-weight: 690; letter-spacing: -.067em; line-height: 1.14; }
.login-panel > p { margin-top: .6rem; color: var(--muted); }
.login-panel form { display: grid; gap: 1rem; margin-top: 1.6rem; }
.login-field { display: grid; gap: .33rem; }
.login-field label { font-weight: 670; font-size: .92rem; }
.login-field input {
  width: 100%;
  min-width: 0;
  height: 3.2rem;
  padding: .55rem 1rem;
  border: 0;
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--recess);
  color: var(--ink);
}
.password-field { position: relative; }
.password-field:has(.password-toggle:not([hidden])) input { padding-right: 5rem; }
.password-toggle {
  position: absolute;
  inset: .3rem .35rem .3rem auto;
  padding-inline: .45rem;
  border: 0;
  border-radius: .65rem;
  background: transparent;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 650;
  cursor: pointer;
}
.password-toggle:hover { color: var(--ink); background: #e9e9ec; }
.login-submit {
  min-height: 3.2rem;
  margin-top: .35rem;
  border: 0;
  border-radius: 100vmax;
  background: var(--paper);
  box-shadow: var(--raised);
  color: var(--ink);
  font-weight: 760;
  cursor: pointer;
}
.login-submit:hover { background: var(--surface); }
.login-error { padding: .65rem .8rem; border-radius: .45rem; background: #fff1f0; color: #8e322e; font-size: .92rem; }
.login-panel .registration-success { padding: .75rem .85rem; border-radius: .45rem; background: #edf7ef; color: #20553a; }
.back-link { display: inline-block; margin-top: 1.35rem; color: var(--muted); font-size: .91rem; font-weight: 600; }
.back-link:hover { color: var(--ink); }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .login-submit { transition: background-color 180ms ease, box-shadow 220ms ease, transform 220ms ease; }
  .login-submit:hover { transform: translateY(-3px); box-shadow: 0 3px 8px #19191d12, 0 8px 20px #19191d14; }
  .login-submit:active { transform: translateY(1px); box-shadow: var(--recess); }
}

@media (max-width: 48rem) {
  .login-screen { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .login-brand { gap: .8rem; padding: clamp(1.25rem, 5vw, 2.5rem); }
  .wordmark { font-size: 1.7rem; }
  .brand-heading { max-width: 15em; font-size: clamp(1.5rem, 5.8vw, 2.55rem); }
  .login-side { align-items: start; padding: .35rem 0 1rem; }
  .login-panel { padding-block: 1.8rem; }
}
