:root {
  --ink: #171713;
  --paper: #f1eee5;
  --orange: #ff5a1f;
  --orange-dark: #dd3e08;
  --muted: #746f64;
  --line: rgba(23, 23, 19, 0.18);
  --error: #a8321a;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--ink); color: var(--ink); font-family: "Avenir Next", "PingFang SC", sans-serif; }
button, input { font: inherit; }

.login-shell {
  min-height: 100vh;
  padding: 32px;
  display: grid;
  place-items: center;
  background-color: var(--ink);
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 64px 64px;
}

.login-card {
  width: min(440px, 100%);
  padding: clamp(32px, 5vw, 52px);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(0,0,0,.32);
}

.brand-lockup { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.brand-mark { width: 26px; height: 20px; display: flex; align-items: center; justify-content: center; gap: 3px; }
.brand-mark i { display: block; width: 3px; height: 8px; background: var(--orange); }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 13px; }
.brand-mark i:nth-child(4) { height: 5px; }

h1 { margin: 48px 0 34px; font-family: "Songti SC", STSong, serif; font-size: clamp(48px, 8vw, 68px); letter-spacing: -.045em; line-height: 1; }
#loginForm { display: grid; gap: 20px; }
.field { display: grid; gap: 9px; }
.field > span:first-child { font-size: 12px; font-weight: 750; }
input { width: 100%; height: 54px; padding: 0 15px; border: 1px solid var(--line); border-radius: 3px; outline: none; background: rgba(255,255,255,.48); color: var(--ink); transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
input:hover { border-color: rgba(23,23,19,.4); }
input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,90,31,.13); background: white; }
input::placeholder { color: #aaa498; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 68px; }
.reveal-button { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; }
.reveal-button:hover, .reveal-button:focus-visible { color: var(--orange-dark); }
.login-error { margin: -4px 0 0; color: var(--error); font-size: 13px; line-height: 1.5; }

.login-button { min-height: 56px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 3px; background: var(--orange); color: white; cursor: pointer; font-size: 14px; font-weight: 750; transition: transform 180ms var(--ease), background 160ms ease; }
.login-button:hover { transform: translateY(-2px); background: var(--orange-dark); }
.login-button:active { transform: translateY(0); }
.login-button:focus-visible { outline: 3px solid rgba(255,90,31,.25); outline-offset: 3px; }
.login-button:disabled { cursor: wait; opacity: .65; transform: none; }
.register-button { width: 100%; min-height: 52px; margin-top: 14px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border: 1px dashed rgba(23,23,19,.24); border-radius: 3px; background: transparent; color: #979186; cursor: not-allowed; }
.register-button small { padding: 4px 7px; border: 1px solid rgba(23,23,19,.13); border-radius: 99px; font-size: 9px; letter-spacing: .06em; }

@media (max-width: 520px) {
  .login-shell { padding: 18px; }
  .login-card { padding: 30px 24px; }
  h1 { margin: 38px 0 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
