/* ──────────────── SuperBot (סופרבוט) Brand Tokens ──────────────── */
/* Single source of truth for colors, type, spacing, shadows, radii.
   Decision: see docs/DECISIONS.md ADR-007.
   NEVER hardcode a colour outside this file — every page uses these variables.

   Palette: classic SuperBot blue.
     light surfaces  --paper / --white      text --ink / --ink-2 / --muted
     primary         --royal  (--grad-royal)  selected/hover --sky   hairlines --line
     dark bands      --grad-blue with --on-ink (hero, app topbar, footer)
     accent          --gold, tiny doses only (one badge, one highlight)
   Type: headings 'Noto Sans Hebrew' · body 'Heebo' (Google Fonts, see inc/head.php) */

:root {
  /* classic SuperBot aliases (single source of truth for every page) */
  --navy: #161f3c; --navy-2: #212e59; --royal: #044084; --royal-2: #0b57b8; --sky: #e8f0fb; --white: #ffffff; --paper: #f5f7f9; --gold: #eeb91b;
  --grad-blue: linear-gradient(135deg, #161f3c 0%, #212e59 55%, #044084 100%); --grad-royal: linear-gradient(135deg, #044084, #0b57b8); --shadow-lux: 0 12px 40px rgba(20,28,54,.12);

  /* Surfaces (light UI on a warm off-white; ink is reserved for hero/footers/topbars) */
  --bg: #f5f7f9;
  --bg-2: #ffffff;
  --bg-canvas: #eef2f7;
  --ink-bg: #161f3c;              /* brand dark base — footers, app topbars, hero band */
  --ink-bg-2: #212e59;

  /* Type */
  --ink: #141c36;
  --ink-2: #3a4560;
  --muted: #6b7590;
  --on-ink: #ffffff;              /* text on --ink-bg */

  /* Lines & dividers */
  --line: #e3e8f0;
  --line-strong: #c9d3e2;

  /* Brand */
  --accent: #044084;              /* = --royal, the primary */
  --accent-dark: #033569;
  --accent-2: #0b57b8;            /* lighter end of the royal gradient */
  --accent-soft: #e8f0fb;
  --accent-glow: rgba(4, 64, 132, 0.28);
  --brand-2: #2f7ff5;             /* secondary blue — highlights, agent "online" dots */
  --brand-2-soft: #e8f0fb;

  --gradient: linear-gradient(135deg, #044084 0%, #0b57b8 100%);
  --gradient-soft: linear-gradient(135deg, rgba(4, 64, 132, 0.08) 0%, rgba(11, 87, 184, 0.08) 100%);

  /* Semantic */
  --success: #10b981;
  --success-soft: #d1fae5;
  --warn: #f59e0b;
  --warn-soft: #fef3c7;
  --error: #ef4444;
  --error-soft: #fee2e2;
  --info: #3b82f6;
  --info-soft: #dbeafe;

  /* Type families */
  --font-head: 'Noto Sans Hebrew', 'Heebo', sans-serif;
  --font-body: 'Heebo', 'Noto Sans Hebrew', sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(20, 28, 54, 0.05);
  --shadow: 0 12px 40px rgba(20, 28, 54, 0.10);
  --shadow-lg: 0 24px 80px rgba(4, 64, 132, 0.16);
  --shadow-xl: 0 32px 100px rgba(22, 31, 60, 0.22);

  /* Radii */
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-pill: 999px;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Motion */
  --easing: cubic-bezier(0.4, 0, 0.2, 1);
  --easing-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --sidebar-w: 80px;
  --rail-w: 320px;
  --topbar-h: 56px;

  /* Scrollbar — use throughout app */
  --scroll-thumb: rgba(20, 28, 54, 0.22);
  --scroll-thumb-hover: var(--royal);
}

/* Headings use the display face everywhere */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); }

/* Universal scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 6px; transition: background 0.15s var(--easing); }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }
::-webkit-scrollbar-corner { background: transparent; }

/* Logo class — drop in anywhere. (.artify-logo kept as an alias: it is still
   referenced from a few legacy templates; renaming every one is not worth the churn.) */
.superbot-logo,
.artify-logo {
  font-family: var(--font-head);
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
  user-select: none;
}

/* Buttons (universal pill) */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-weight: 600; font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.18s var(--easing), border-color 0.18s var(--easing), color 0.18s var(--easing), box-shadow 0.18s var(--easing), transform 0.18s var(--easing);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-royal);
  color: var(--on-ink);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:visited { color: var(--on-ink); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px var(--accent-glow); }
.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--royal); color: var(--accent-dark); background: var(--sky); }
.btn-ghost { color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn-danger { background: var(--error); color: var(--on-ink); }
.btn-danger:hover { background: #dc2626; }
.btn-lg { padding: 16px 32px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: all 0.25s var(--easing);
}
.card:hover { box-shadow: var(--shadow); }

/* Inputs */
.input {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s var(--easing), box-shadow 0.15s var(--easing);
}
.input:focus {
  border-color: var(--royal);
  box-shadow: 0 0 0 3px var(--sky);
}
.input::placeholder { color: var(--muted); opacity: 1; }

/* Status badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600;
}
.badge-success { background: var(--success-soft); color: #047857; }
.badge-warn { background: var(--warn-soft); color: #b45309; }
.badge-error { background: var(--error-soft); color: #b91c1c; }
.badge-info { background: var(--info-soft); color: #1d4ed8; }
.badge-accent { background: var(--accent-soft); color: var(--accent-dark); }
.badge-gold { background: #fdf3d6; color: #8a6708; }

/* Focus ring — one ring for the whole product */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--royal);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Motion: calm, and off entirely when the viewer asks for that */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
