/* Shared by every Paratone page: the design values, and the few components
   that appear on both the marketing pages (site.css) and the translator
   (styles.css). Load this file first. */

:root {
  color-scheme: light;

  /* Figma variables (Paratone Tokens, Light). Neutral greys and near-black;
     blue marks the one action per screen that starts or commits work, and
     red marks actions that throw work away. */
  --bg-canvas: #f3f3f1;
  --bg-subtle: #f7f7f5;
  --bg-surface: #ffffff;
  --bg-muted: #ededea;
  --border-default: #e5e5e2;
  --border-strong: #d4d4d0;
  --text-primary: #111111;
  --text-secondary: #5e5e5a;
  --text-tertiary: #93938e;
  --icon-default: #3a3a37;
  --badge-unread: #e5484d; /* unread dots: the bell and its rows */
  --accent-solid: #111111;
  --on-accent: #ffffff;
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --danger-solid: #dc2626;
  --danger-text: #b91c1c;
  --danger-border: #f0aaaa;
  --danger-soft: #fef2f2;
  --overlay-scrim: rgba(17, 17, 17, 0.4);
  /* Search matches (⌘K's marks, ⌘F's highlights), and ⌘F's current match. */
  --highlight-match: #fde68a;
  --highlight-current: #fbbf24;

  /* Older names still used in places, mapped onto the palette above. */
  --paper: var(--bg-canvas);
  --sheet: var(--bg-surface);
  --well: var(--bg-muted);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border-default);
  --accent: var(--accent-solid);
  --accent-tint: var(--bg-muted);

  /* The red company seal on sample documents. */
  --seal: #c8281e;

  /* Sentence highlighting: the pair under the pointer, and the selected pair. */
  --hover: #fff1c2;
  --active: #fde68a;
  --active-ring: #d97706;

  --ui-font: 'DM Sans', 'Segoe UI', system-ui, sans-serif;

  --radius: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Motion: hover and focus feedback, and panels sliding open or shut. */
  --motion-fast: 0.15s;
  --motion-slide: 0.2s ease;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.muted {
  color: var(--muted);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 1.3125rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mark {
  width: 26px;
  height: 26px;
  flex: none;
}

/* ---------------------------------------------------------------- buttons */

/* The app's Button (8px corners).
   Secondary (plain .btn): neutral actions, Cancel included.
   Primary (black): Export only.
   Accent (blue): the one start or commit action per screen.
   Danger (solid red): the confirm button in a destructive dialog, never on a screen.
   Danger secondary (red outline): a destructive trigger on a screen (Stop).
   Icons are drawn in currentColor so they take the label's colour, except on
   Secondary, where they use the softer icon grey. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

.btn:hover { background: var(--bg-subtle); color: var(--text-primary); }
.btn:active { transform: translateY(1px); }
.btn .ico { color: var(--icon-default); }
.btn.primary .ico, .btn.accent .ico, .btn.danger .ico, .btn.danger-secondary .ico { color: currentColor; }
.btn.primary { border-color: var(--accent-solid); background: var(--accent-solid); color: var(--on-accent); padding-inline: 14px; }
.btn.primary:hover { border-color: #2b2b29; background: #2b2b29; color: var(--on-accent); }
.btn.accent { border-color: var(--accent-blue); background: var(--accent-blue); color: var(--on-accent); padding-inline: 14px; }
.btn.accent:hover, .btn.accent:active { border-color: var(--accent-blue-hover); background: var(--accent-blue-hover); color: var(--on-accent); }
.btn.danger { border-color: var(--danger-solid); background: var(--danger-solid); color: var(--on-accent); padding-inline: 14px; }
.btn.danger:hover, .btn.danger:active { border-color: var(--danger-text); background: var(--danger-text); color: var(--on-accent); }
.btn.danger-secondary { border-color: var(--danger-border); background: var(--bg-surface); color: var(--danger-text); }
.btn.danger-secondary:hover, .btn.danger-secondary:active { background: var(--danger-soft); color: var(--danger-text); }
.btn.ghost { border-color: transparent; background: none; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

/* ---------------------------------------------------------------- inputs */

input,
textarea,
select {
  width: 100%;
  padding: 0.5em 0.7em;
  border: 1.5px solid color-mix(in srgb, var(--ink) 24%, transparent);
  border-radius: var(--radius);
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

input:hover,
textarea:hover,
select:hover {
  border-color: color-mix(in srgb, var(--ink) 45%, transparent);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--ink);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline-offset: 1px;
  border-radius: var(--radius);
}

input[type='checkbox'],
input[type='radio'] {
  width: auto;
  accent-color: var(--accent);
}

/* Nothing slides or fades. Spinners keep turning, since they say work is
   going on; the pages' decorative loading effects stop in their own files. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after,
  *::backdrop {
    transition: none !important;
  }
}
