/*
 * The design system's tokens and the handful of components the public
 * Django pages need — the landing page and the three auth screens.
 *
 * These pages are served by Django, not the SPA, so they cannot import
 * `vue/src/styles.css`. The tokens below are copied from it verbatim and
 * must be changed together. Everything past the token block is only what
 * these four pages actually use; the SPA's stylesheet stays the authority
 * on the rest of the system.
 */

:root {
  color-scheme: light;
  --brand: #1f6f4f;
  --brand-strong: #17553c;
  --brand-ink: #0f4130;
  --brand-tint: #e9f1ec;
  --page: #f2f2ec;
  --surface: #ffffff;
  --surface-2: #faf9f4;
  --inset: #f5f4ee;
  --ink: #1a201c;
  --ink-2: #586158;
  --muted: #8b918a;
  --border: #e4e5dd;
  --border-strong: #d5d7cc;
  --shadow-sm: 0 1px 2px rgba(26, 32, 28, 0.06), 0 1px 3px rgba(26, 32, 28, 0.05);
  --shadow-md: 0 6px 18px rgba(26, 32, 28, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --focus: 0 0 0 3px rgba(31, 111, 79, 0.28);
  --good: #0f8a43;
  --good-tint: #e5f3ea;
  --good-ink: #0c6d36;
  --crit: #cf3a3a;
  --crit-tint: #fbe4e2;
  --crit-ink: #9e2222;
  --geo-poly: #1baf7a;
  --geo-line: #eb6834;
  --geo-point: #2a78d6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--brand-ink); }

/* ---- brand mark ---------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-size: 18px;
  font-weight: 850;
}
.brand-copy strong,
.brand-copy span { display: block; }
.brand-copy strong { font-size: 14px; line-height: 1.1; }
.brand-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

/* ---- controls ------------------------------------------------------ */

button, input, select, textarea { font: inherit; }

label { color: var(--ink-2); font-size: 12px; font-weight: 650; }

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  padding: 9px 11px;
  font-size: 13.5px;
}
input:focus,
button:focus-visible,
a:focus-visible {
  outline: 0;
  border-color: var(--brand);
  box-shadow: var(--focus);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  padding: 0 13px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.button:hover { background: var(--brand-strong); }
.button.secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--ink);
}
.button.secondary:hover { background: var(--surface-2); }
.button.auto { width: auto; }

.field { display: grid; gap: 5px; }
.inline-note { color: var(--muted); font-size: 12px; font-weight: 650; }

/* ---- shell A: centred card ----------------------------------------- */

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}
.auth-wrap {
  display: grid;
  gap: 14px;
  justify-items: center;
  width: 100%;
  max-width: 396px;
}
.auth-card {
  display: grid;
  gap: 16px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px;
  box-shadow: var(--shadow-md);
}
.auth-card h1 { font-size: 20px; }
.auth-head { display: grid; gap: 5px; }
.auth-head p { color: var(--ink-2); font-size: 13px; }
.auth-form { display: grid; gap: 14px; }
.auth-alt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}
.auth-alt a { font-weight: 700; }

.auth-alert {
  border: 1px solid var(--crit);
  border-radius: var(--radius-sm);
  background: var(--crit-tint);
  color: var(--crit-ink);
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 650;
}
.auth-alert.good {
  border-color: var(--good);
  background: var(--good-tint);
  color: var(--good-ink);
}

/* ---- landing page -------------------------------------------------- */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 14px 22px;
}
.site-nav .actions { display: flex; align-items: center; gap: 10px; }
.site-nav a.plain {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}
.site-nav a.plain:hover { background: var(--inset); color: var(--ink); }

.site-inner { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

.hero { padding: 68px 0 52px; text-align: center; }
.eyebrow {
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 { font-size: 40px; letter-spacing: -0.025em; }
.hero p {
  max-width: 58ch;
  margin: 16px auto 26px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
}
.hero .actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero .actions .button { width: auto; min-width: 150px; }

.geo-key {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.geo-key span { display: inline-flex; align-items: center; gap: 7px; }
.geo-key i {
  width: 12px;
  height: 12px;
  border: 2px solid;
  border-radius: 3px;
}
.geo-key .poly { border-color: var(--geo-poly); background: rgba(27, 175, 122, 0.22); }
.geo-key .line { border-color: var(--geo-line); background: rgba(235, 104, 52, 0.2); }
.geo-key .point { border-color: var(--geo-point); background: rgba(42, 120, 214, 0.34); border-radius: 50%; }

.panels { border-top: 1px solid var(--border); background: var(--surface-2); padding: 52px 0; }
.panels h2 { margin-bottom: 26px; font-size: 20px; text-align: center; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 12px;
}
.grid article {
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.grid h3 { font-size: 14.5px; }
.grid p { color: var(--ink-2); font-size: 13px; line-height: 1.5; }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

@media (max-width: 560px) {
  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: 30px; }
}
