@font-face {
  font-family: "Nohemi";
  src: url("/fonts/Nohemi-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ink: #171717;
  --muted: #77797d;
  --quiet: #a8aaad;
  --line: #e1e2e5;
  --surface: #ffffff;
  --canvas: #e5e7ea;
  --accent: #ff6437;
  --accent-dark: #e84d21;
  --accent-soft: #fff1ec;
  --danger: #d74236;
  --danger-soft: #fff0ee;
  --shadow: 0 26px 80px rgba(30, 34, 40, .14);
  --shadow-card: 0 12px 32px rgba(25, 27, 31, .07);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--canvas); }
body {
  min-height: 100dvh;
  margin: 0;
  padding: max(24px, calc(24px + env(safe-area-inset-top))) max(20px, calc(20px + env(safe-area-inset-right))) max(24px, calc(24px + env(safe-area-inset-bottom))) max(20px, calc(20px + env(safe-area-inset-left)));
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.login-wrap {
  width: min(100%, 428px);
  margin: auto;
  animation: login-rise 280ms var(--ease-out) both;
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: fit-content;
  margin: 0 auto 20px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 38px;
  padding: 4px;
  border-radius: 14px;
  background: var(--accent-soft);
}
.brand-mark img { display: block; width: 38px; height: 31px; }
.brand-name { font-family: "Nohemi", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; font-size: 24px; font-weight: 700; letter-spacing: -.055em; line-height: 1; }

.login-card {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow), var(--shadow-card);
}
.card-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.kicker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
h1 { margin: 0; color: var(--ink); font-family: "Nohemi", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; font-size: clamp(28px, 7vw, 35px); font-weight: 700; letter-spacing: -.055em; line-height: 1.05; }
.intro { max-width: 34em; margin: 11px 0 28px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.field { margin-bottom: 12px; }
label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
.password-field { position: relative; }
input[type="password"], input[type="text"] {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0 48px 0 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: none;
  color: var(--ink);
  background: rgba(247, 247, 249, .94);
  background: color-mix(in srgb, var(--canvas) 52%, var(--surface));
  font-size: 16px;
  -webkit-appearance: none;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
input::placeholder { color: var(--quiet); }
input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px rgba(255, 100, 55, .16); }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.password-toggle:hover { color: var(--ink); background: var(--canvas); }
.password-toggle:active { transform: translateY(-50%) scale(.96); }
.password-toggle .eye { width: 18px; height: 18px; }
.eye-closed { display: none; }
.password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }

.form-error {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
  line-height: 1.35;
}
.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  padding: 0 18px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: var(--accent);
  font-size: 15px;
  font-weight: 720;
  transition: background-color 160ms ease, transform 160ms ease;
}
.submit-button svg { width: 18px; height: 18px; }
.submit-button:hover { background: var(--accent-dark); }
.submit-button:active { transform: scale(.98); }
.submit-button[aria-busy="true"] { cursor: wait; opacity: .72; }

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 22px 0 0;
  color: var(--quiet);
  font-size: 11px;
}
.security-note svg { width: 14px; height: 14px; }
.login-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 17px 0 0;
  color: var(--quiet);
  font-size: 11px;
}

@keyframes login-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .login-card { padding: 26px 22px 24px; border-radius: 23px; }
  .brand-lockup { margin-bottom: 17px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --quiet: #747479;
    --line: rgba(255, 255, 255, .12);
    --surface: #1a1b1e;
    --canvas: #111214;
    --accent: #ff7047;
    --accent-dark: #ff8c6a;
    --accent-soft: rgba(255, 112, 71, .16);
    --danger: #ff8f87;
    --danger-soft: rgba(255, 59, 48, .14);
    --shadow: 0 28px 90px rgba(0, 0, 0, .46);
    --shadow-card: 0 14px 36px rgba(0, 0, 0, .3);
  }
  html, body { background: var(--canvas); }
  .login-card { border-color: rgba(255, 255, 255, .08); }
  input[type="password"], input[type="text"] { background: #202125; }
  input:focus { background: #242529; }
  .password-toggle:hover { background: #292a2f; }
}

@media (prefers-reduced-motion: reduce) {
  .login-wrap { animation: none; }
  *, *::before, *::after { transition-duration: .001ms !important; }
}
