/* Shared by the landing, sign-in and gallery pages. Colors come from the favicon. */
:root {
  --paper: #f6f5ff;
  --surface: #ffffff;
  --sunk: #eeecfb;
  --ink: #1a1433;
  --muted: #645e88;
  --line: #e2dff3;
  --grape: #5b3df5;
  --grape-soft: #ece8ff;
  --on-grape: #ffffff;
  --magenta: #c93bc2;
  --sun: #ffd45c;
  --on-sun: #2b1d00;
  --danger: #d1304a;
  --shadow: 0 1px 2px rgb(26 20 51 / 6%), 0 8px 24px -12px rgb(26 20 51 / 18%);

  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #100d22;
    --surface: #18142e;
    --sunk: #211c3c;
    --ink: #eeeaff;
    --muted: #a19bc5;
    --line: #2d2750;
    --grape: #8f7bff;
    --grape-soft: #251f4a;
    --on-grape: #120e26;
    --magenta: #ea6fe2;
    --danger: #ff6b81;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px -16px rgb(0 0 0 / 60%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--sun); color: var(--on-sun); }
:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; border-radius: 6px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--font);
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--grape); border-color: var(--grape); color: var(--on-grape); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-small { font-size: 13px; padding: 8px 12px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }
.btn-icon svg { width: 16px; height: 16px; }
.btn-google svg { width: 18px; height: 18px; flex: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--grape); }
  .btn-primary:hover { box-shadow: 0 6px 20px -8px var(--grape); }
  .btn-ghost:hover { background: var(--sunk); border-color: transparent; }
  .btn-danger:hover { color: var(--danger); border-color: var(--danger); }
}

/* Fields */
.field {
  width: 100%;
  font: 400 16px/1.3 var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field::placeholder { color: var(--muted); }
.field:focus { outline: none; border-color: var(--grape); box-shadow: 0 0 0 4px var(--grape-soft); }

/* Toast: enters and leaves from the bottom */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transform: translate(-50%, 16px) scale(0.96);
  transition: opacity 220ms var(--ease-out), transform 320ms var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.copied { background: var(--sun); color: var(--on-sun); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-property: opacity, background-color, border-color, color !important; animation: none !important; }
}
