/* Equisafe's palette and type, from equisafe-market (packages/ui/src/styles
   theme-light.css, theme-dark.css), shared by the app and the pages the
   Worker renders (sign-in errors, OAuth consent). */

@font-face {
  font-family: 'equisafe-header';
  src: url('/fonts/equisafe-header-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'equisafe-text';
  src: url('/fonts/equisafe-text-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'equisafe-text';
  src: url('/fonts/equisafe-text-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --font-display: 'equisafe-header', 'equisafe-text', system-ui, sans-serif;
  --font-text: 'equisafe-text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;

  --page: #f9f9fb;
  --card: #ffffff;
  --raised: #ffffff;
  --sunken: #eff0f3;
  --hover: rgb(205 206 215 / 25%);
  --line: #e0e1e6;
  --line-strong: #cdced7;
  --ink: #1e1f24;
  --ink-2: #62636c;
  --ink-3: #8b8d98;
  --ink-inverse: #ffffff;
  --button: #080808;
  --button-ink: #ffffff;
  --focus: #674ffc;

  --violet: #674ffc;
  --indigo: #2c27db;
  --sky: #58c5f8;
  --pink: #fbb7f1;
  --coral: #ff3c40;
  --amber: #f6b51e;
  --green: #1daf61;
  --danger: #d02533;

  --accent: linear-gradient(90deg, #2c27db 0%, #58c5f8 50%, #fbb7f1 100%);
  --accent-2: linear-gradient(90deg, #3328a4 0%, #674ffc 50%, #fc9ba0 100%);
  --accent-soft: linear-gradient(120deg, rgb(44 39 219 / 8%), rgb(88 197 248 / 8%) 50%, rgb(251 183 241 / 10%));

  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 2px rgb(30 31 36 / 5%), 0 8px 24px -12px rgb(30 31 36 / 14%);
  --shadow-l: 0 2px 6px rgb(30 31 36 / 6%), 0 24px 60px -20px rgb(30 31 36 / 28%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d0d0d;
    --card: #141415;
    --raised: #1c1c1e;
    --sunken: #08080a;
    --hover: rgb(94 96 106 / 25%);
    --line: #28292d;
    --line-strong: #3a3b41;
    --ink: #eeeef0;
    --ink-2: #b2b3bd;
    --ink-3: #797b86;
    --ink-inverse: #080808;
    --button: #eeeef0;
    --button-ink: #080808;
    --focus: #8a78ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px -12px rgb(0 0 0 / 60%);
    --shadow-l: 0 2px 6px rgb(0 0 0 / 40%), 0 24px 60px -20px rgb(0 0 0 / 70%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--button);
  color: var(--button-ink);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 120ms ease,
    opacity 120ms ease,
    background 120ms ease;
}
.btn:hover {
  opacity: 0.88;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover {
  background: var(--hover);
  opacity: 1;
}
.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--line);
}
.btn.small {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
}

.accent-rule {
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}
