/* Sign-in page. Self-contained: it's served before you're signed in, when nothing else is (only
   /fonts/, /brand/, /art/ and /vendor/ are open to signed-out visitors). The look of the default theme:
   Oak (skins/skins.css), or Walnut on a device set to dark mode, as the site itself picks. */
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f2ece2;
  --paper: #fbf8f3;
  --field: #fffdf8;
  --ink: #3a332b;
  --muted: #7d7161;
  --accent: #5e7d5b;
  --shadow: #dcc7a6;
  --bad: #b9483a;
  --display: "Instrument Serif", Georgia, serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #17120e;
    --paper: #211a14;
    --field: #1a140f;
    --ink: #e8dcc8;
    --muted: #a89580;
    --accent: #c9a063;
    --shadow: #0a0705;
    --bad: #d9634c;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
}
.login {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
  gap: 48px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 28px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
}
.login-eyebrow { font: 700 11px/1.2 var(--font); letter-spacing: 0.14em; text-transform: uppercase; }
.login-title {
  margin: 18px 0 0;
  font: 400 clamp(56px, 9vw, 116px)/0.92 var(--display);
  letter-spacing: -0.01em;
}
.login-title span { color: var(--accent); }
/* the whole set as a halftone still life (art/halftone.js draws it) */
.login-art { display: block; width: 100%; height: clamp(280px, 44vh, 440px); margin-top: 24px; }
.login-card {
  width: 100%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: 10px 10px 0 var(--shadow);
  padding: 32px 28px 26px;
}
h1 {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 6px -8px;
  font: 400 40px/1 var(--display);
  letter-spacing: -0.01em;
}
h1 .brand-mark { display: block; width: auto; height: 44px; }
.login-sub { color: var(--muted); font-size: 15px; margin: 0 0 26px; }
label { display: block; font: 700 11px var(--font); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; }
input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* 16px keeps iOS from zooming in on focus */
}
input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
button {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: 600 16px var(--font);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
button::after { content: " ↗"; }
button:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--shadow); }
button:disabled { opacity: 0.6; cursor: default; }
input + label, #row-again { margin-top: 16px; }
/* Sign in / Create account: a two-way switch above the form */
.login-modes { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 22px; box-shadow: inset 0 0 0 1.5px var(--ink); }
.login-modes button {
  margin: 0;
  min-height: 40px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}
.login-modes button::after { content: none; }
.login-modes button:hover:not(:disabled) { transform: none; box-shadow: none; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.login-modes button.on { background: var(--ink); color: var(--paper); }
.login-error { color: var(--bad); font-size: 14px; margin: 12px 0 0; }
.login-note { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }

@media (max-width: 760px) {
  .login { grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start; padding-top: 32px; }
  .login-title { font-size: clamp(44px, 14vw, 72px); }
  .login-art { display: none; }
}
[hidden] { display: none !important; }
