/* ChromoLab design tokens. Shared by the app and the public pages.
   World: a press proof sheet. Ink-navy shell, neutral cool-grey work surface (colour must be judged
   true, so the canvas never tints), process magenta for the one primary action, and the C/M/Y/K
   control strip as the single signature move. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Ink (shell) */
  --ink-950: #0b0c26;
  --ink-900: #101233;
  --ink-800: #171a44;
  --ink-700: #22265a;
  --on-ink: #eef0ff;
  --on-ink-2: #b4b8de;
  --on-ink-3: #9096c8;
  --ink-line: rgba(238, 240, 255, 0.12);

  /* Work surfaces */
  --paper: #f3f4f8;
  --surface: #ffffff;
  --sunken: #eceef4;
  --line: #dcdfea;
  --line-strong: #bfc5d8;

  /* Text */
  --text: #12142b;
  --text-2: #4a4f70;
  --text-3: #636889;

  /* Process colours: one job each */
  --mag: #c4005f; /* primary action, current selection */
  --mag-hover: #a30050;
  --mag-tint: #fde7f1;
  --cyan: #00a8e0;
  --yellow: #ffc71f;
  --key: #12142b;

  /* State */
  --ok: #0b7a5a;
  --ok-bg: #e3f5ee;
  --err: #b8261c;
  --err-bg: #fdebe9;
  --warn: #7a5200;
  --warn-bg: #fff4d6;

  /* Type */
  --font-ui: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-display: "Bricolage Grotesque", "Geist", ui-sans-serif, system-ui, sans-serif;

  --t-xs: 0.75rem;
  --t-sm: 0.8125rem;
  --t-md: 0.9375rem;
  --t-lg: 1.0625rem;
  --t-xl: 1.25rem;
  --t-2xl: 1.5rem;
  --t-3xl: 1.875rem;

  /* Shape and depth */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow-1: 0 1px 2px rgba(16, 18, 51, 0.08), 0 2px 6px rgba(16, 18, 51, 0.05);
  --shadow-2: 0 2px 4px rgba(16, 18, 51, 0.08), 0 12px 32px rgba(16, 18, 51, 0.12);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 160ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--t-md);
  line-height: 1.5;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* Browser surfaces that normally ship unthemed */
::selection { background: var(--mag); color: #fff; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--mag);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.on-ink :focus-visible, .rail :focus-visible, .bar :focus-visible { outline-color: #ff8cc4; }
input, select, textarea { caret-color: var(--mag); accent-color: var(--mag); }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
a { color: var(--mag); text-underline-offset: 3px; }
a:hover { color: var(--mag-hover); }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  left: 12px; top: -64px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--fast) var(--ease);
}
.skip:focus { top: 12px; }

/* Buttons: one vocabulary everywhere */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--t-md);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--mag); color: #fff; }
.btn-primary:hover { background: var(--mag-hover); color: #fff; }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--sunken); color: var(--text); }
.btn-ghost-ink { background: transparent; color: var(--on-ink); border-color: var(--ink-line); }
.btn-ghost-ink:hover { background: rgba(238, 240, 255, 0.08); color: var(--on-ink); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: var(--t-lg); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Brand lockup */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand:hover { color: inherit; }
.brand svg { width: 28px; height: 28px; }
.brand b { font-weight: 700; color: #ff5fae; }

/* The control strip: C M Y K, the signature move */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  height: 8px;
}
.strip i { display: block; border-radius: 2px; opacity: 0.22; transition: opacity 240ms var(--ease); }
.strip i:nth-child(1) { background: var(--cyan); }
.strip i:nth-child(2) { background: var(--mag); }
.strip i:nth-child(3) { background: var(--yellow); }
.strip i:nth-child(4) { background: var(--key); }
.strip.is-done i { opacity: 1; }
.strip.is-error i { opacity: 0.22; }
.strip.is-error i:nth-child(4) { opacity: 1; background: var(--err); }
.strip.is-working i { animation: strip-run 1.2s var(--ease) infinite; }
.strip.is-working i:nth-child(2) { animation-delay: 0.15s; }
.strip.is-working i:nth-child(3) { animation-delay: 0.3s; }
.strip.is-working i:nth-child(4) { animation-delay: 0.45s; }
@keyframes strip-run {
  0%, 100% { opacity: 0.22; }
  40% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .strip.is-working i { opacity: 1; }
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
