/* =================================================================
   Auth pages (signup.html / login.html)
   Shared design tokens are duplicated here so each page is standalone.
   ================================================================= */

:root {
  --bg:        oklch(0.985 0.006 85);
  --bg-2:      oklch(0.965 0.008 85);
  --bg-3:      oklch(0.945 0.010 85);
  --surface:   oklch(1.000 0 0 / 0.6);
  --ink:       oklch(0.22 0.015 60);
  --ink-2:     oklch(0.42 0.012 60);
  --ink-3:     oklch(0.62 0.010 60);
  --line:      oklch(0.90 0.008 70);
  --line-2:    oklch(0.82 0.010 70);
  --accent:    oklch(0.52 0.07 125);
  --accent-2:  oklch(0.90 0.04 125);
  --accent-ink: oklch(0.30 0.06 125);
  --danger:    oklch(0.55 0.12 30);
  --warn:      oklch(0.70 0.10 75);
  --ok:        oklch(0.58 0.08 150);
  --shadow-sm: 0 1px 0 oklch(0.85 0.008 70 / 0.5);
  --shadow-md: 0 6px 20px -10px oklch(0.30 0.02 60 / 0.18);
  --shadow-lg: 0 30px 60px -30px oklch(0.30 0.02 60 / 0.25), 0 18px 36px -18px oklch(0.30 0.02 60 / 0.18);
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --d-fast: 180ms;
  --d-med: 320ms;
}
[data-theme="dark"] {
  /* Cool-neutral slate - clean editorial dark, not beige, not pure black. */
  --bg:        oklch(0.165 0.006 250);
  --bg-2:      oklch(0.205 0.007 250);
  --bg-3:      oklch(0.250 0.008 250);
  --surface:   oklch(0.220 0.008 250 / 0.68);
  --ink:       oklch(0.965 0.004 250);
  --ink-2:     oklch(0.780 0.005 250);
  --ink-3:     oklch(0.570 0.007 250);
  --line:      oklch(0.295 0.009 250);
  --line-2:    oklch(0.390 0.011 250);
  --accent:    oklch(0.80 0.095 125);
  --accent-2:  oklch(0.32 0.045 125);
  --accent-ink: oklch(0.94 0.07 125);
  --shadow-sm: 0 1px 0 oklch(0 0 0 / 0.4);
  --shadow-md: 0 10px 30px -15px oklch(0 0 0 / 0.7);
  --shadow-lg: 0 30px 60px -30px oklch(0 0 0 / 0.75), 0 18px 36px -18px oklch(0 0 0 / 0.55);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  min-height: 100vh;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
.muted { color: var(--ink-3); }
.col   { display: flex; flex-direction: column; gap: 8px; }

/* ============ Brand wordmark ============ */
.sidebar-brand {
  display: inline-block; text-align: left;
  background: none; border: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.brand-wordmark {
  font-family: var(--font-serif);
  font-style: italic; font-size: 26px; line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: inline-block; position: relative;
  transition: letter-spacing var(--d-med) var(--ease-spring);
}
.brand-letter {
  display: inline-block;
  opacity: 0; transform: translateY(6px);
  animation: brandLetterIn 520ms var(--ease-out) both;
}
.brand-dot {
  display: inline-block;
  color: var(--accent);
  margin-left: 1px;
  transform-origin: 50% 90%;
  animation:
    brandLetterIn 520ms var(--ease-out) 480ms both,
    brandDotPulse 2.6s ease-in-out 1.4s infinite;
}
.sidebar-brand:hover .brand-wordmark { letter-spacing: -0.005em; }
.sidebar-brand:hover .brand-dot { transform: scale(1.18); }
@keyframes brandLetterIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes brandDotPulse {
  0%, 60%, 100% { opacity: 1; transform: scale(1); }
  72% { opacity: 0.25; transform: scale(0.6); }
  86% { opacity: 1; transform: scale(1.15); }
}

/* ============ Buttons + inputs ============ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  transition: all var(--d-fast) var(--ease-out);
}
.btn:hover { background: var(--bg-3); border-color: var(--line-2); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); transform: translateY(-1px); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); padding: 6px 10px; }
.btn-ghost:hover { background: var(--bg-3); color: var(--ink); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 22px; font-size: 14px; border-radius: 12px; gap: 8px; }
.btn:disabled { opacity: 0.6; pointer-events: none; }
.btn .arrow { display: inline-block; transition: transform var(--d-fast) var(--ease-spring); }
.btn:hover .arrow { transform: translateX(3px); }

.input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color var(--d-fast), box-shadow var(--d-med);
}
.input:focus {
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}
.lbl {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 6px;
  font-weight: 500;
}
.link-inline {
  background: none; border: 0; padding: 0;
  color: var(--accent); font-size: inherit; font-family: inherit;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.link-inline:hover { text-decoration: none; }

.spinner {
  width: 14px; height: 14px;
  border: 2px solid color-mix(in oklab, var(--bg) 60%, transparent);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Cursor dots canvas ============ */
.cursor-dots {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ============ Auth layout ============ */
.auth-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 36px;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
}
.auth-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  /* equal top and bottom, or the card sits 20px below the true center */
  padding: 100px 24px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 36px 30px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: cardIn 700ms var(--ease-out) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); font-weight: 500;
  margin-bottom: 12px;
}
.auth-title {
  font-style: italic; font-weight: 400;
  font-size: 38px; line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.auth-title .brand-dot {
  color: var(--accent);
  display: inline-block;
  animation: brandDotPulse 2.6s ease-in-out infinite;
  margin-left: 1px;
}
.auth-sub {
  color: var(--ink-2);
  font-size: 13.5px; line-height: 1.55;
  margin: 0 0 8px;
}
.auth-err {
  background: color-mix(in oklab, var(--danger) 10%, var(--bg));
  border: 1px solid color-mix(in oklab, var(--danger) 30%, var(--line));
  color: var(--danger);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.45;
}
.auth-ok {
  background: color-mix(in oklab, var(--ok) 12%, var(--bg));
  border: 1px solid color-mix(in oklab, var(--ok) 30%, var(--line));
  color: var(--ok);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.45;
}

/* ============ Responsive ============ */
@media (max-width: 560px) {
  .auth-nav { padding: 14px 20px; }
  .auth-main { padding: 90px 16px 40px; }
  .auth-card { padding: 28px 22px 24px; border-radius: 16px; }
  .auth-title { font-size: 30px; }
}
