/* ============================================================
   ЯДРЁНЫЧ — design system
   Fonts: Unbounded (display) + Onest (UI/body)
   ============================================================ */

@import url('fonts/fonts.css');

:root {
  /* brand */
  --brand:        oklch(0.56 0.165 252);
  --brand-press:  oklch(0.48 0.165 252);
  --brand-soft:   oklch(0.95 0.045 252);
  --brand-ring:   oklch(0.56 0.165 252 / 0.30);
  --cyan:         oklch(0.70 0.12 205);
  --cyan-soft:    oklch(0.95 0.045 205);
  --grad-brand:   linear-gradient(135deg, var(--brand), var(--cyan));
  --grad-bar:     linear-gradient(90deg, var(--brand), var(--cyan));

  /* ai models */
  --alisa:        oklch(0.62 0.205 25);
  --alisa-soft:   oklch(0.955 0.04 25);
  --giga:         oklch(0.60 0.135 162);
  --giga-soft:    oklch(0.955 0.04 162);

  /* light theme surfaces */
  --bg:           oklch(0.985 0.004 250);
  --surface:      oklch(1 0 0);
  --surface-2:    oklch(0.975 0.006 250);
  --surface-3:    oklch(0.955 0.009 250);
  --border:       oklch(0.915 0.009 250);
  --border-strong:oklch(0.86 0.012 250);
  --text:         oklch(0.24 0.022 255);
  --text-muted:   oklch(0.52 0.022 255);
  --text-faint:   oklch(0.66 0.016 255);

  --pos:          oklch(0.60 0.14 150);
  --warn:         oklch(0.70 0.15 70);

  /* radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* shadow */
  --shadow-sm: 0 1px 2px oklch(0.4 0.03 255 / 0.06), 0 1px 3px oklch(0.4 0.03 255 / 0.05);
  --shadow-md: 0 4px 14px oklch(0.4 0.03 255 / 0.07), 0 2px 6px oklch(0.4 0.03 255 / 0.05);
  --shadow-lg: 0 18px 48px oklch(0.4 0.05 255 / 0.12), 0 6px 18px oklch(0.4 0.04 255 / 0.08);
  --shadow-brand: 0 10px 30px var(--brand-ring);

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-ui: 'Onest', system-ui, sans-serif;
}

[data-theme="dark"] {
  --brand:        oklch(0.70 0.15 255);
  --brand-press:  oklch(0.77 0.15 255);
  --brand-soft:   oklch(0.34 0.095 255);
  --brand-ring:   oklch(0.70 0.15 255 / 0.32);
  --cyan:         oklch(0.74 0.11 205);
  --cyan-soft:    oklch(0.34 0.075 205);

  --alisa:        oklch(0.70 0.185 25);
  --alisa-soft:   oklch(0.34 0.10 25);
  --giga:         oklch(0.70 0.13 162);
  --giga-soft:    oklch(0.32 0.07 162);

  --bg:           oklch(0.18 0.018 258);
  --surface:      oklch(0.222 0.022 258);
  --surface-2:    oklch(0.252 0.025 258);
  --surface-3:    oklch(0.29 0.028 258);
  --border:       oklch(0.33 0.028 258);
  --border-strong:oklch(0.41 0.03 258);
  --text:         oklch(0.96 0.008 255);
  --text-muted:   oklch(0.74 0.02 255);
  --text-faint:   oklch(0.58 0.02 255);

  --pos:          oklch(0.72 0.15 150);
  --warn:         oklch(0.78 0.15 70);

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.30);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.36);
  --shadow-lg: 0 22px 54px oklch(0 0 0 / 0.50), 0 6px 18px oklch(0 0 0 / 0.40);
  --shadow-brand: 0 12px 34px oklch(0.70 0.15 255 / 0.30);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .35s ease, color .35s ease;
}

::selection { background: var(--brand-soft); color: var(--brand-press); }

/* scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- typography helpers ---------- */
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.04; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-press); }
[data-theme="dark"] .btn-primary { color: oklch(0.16 0.02 255); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-faint); }
.btn-soft { background: var(--brand-soft); color: var(--brand-press); }
[data-theme="dark"] .btn-soft { color: var(--brand); }
.btn-soft:hover { filter: brightness(0.97); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }
[data-theme="dark"] .btn-outline { color: var(--cyan); border-color: var(--cyan); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-icon {
  width: 38px; height: 38px; padding: 0; justify-content: center;
  border-radius: var(--r-md); background: transparent; color: var(--text-muted);
  border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s;
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 3px 9px; border-radius: var(--r-pill);
}
.badge-brand { background: var(--brand-soft); color: var(--brand-press); }
[data-theme="dark"] .badge-brand { color: var(--brand); }
.badge-alisa { background: var(--alisa-soft); color: var(--alisa); }
.badge-giga  { background: var(--giga-soft);  color: var(--giga); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ---------- inputs ---------- */
.input {
  font-family: var(--font-ui); font-size: 14px;
  width: 100%; padding: 11px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  transition: border-color .18s, box-shadow .18s;
}
.input::placeholder { color: var(--text-faint); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }

/* animations */
@keyframes floatUp { from { transform: translateY(10px); } to { transform: none; } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 var(--brand-ring); } 70% { box-shadow: 0 0 0 14px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes mascotWave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-22deg); } }
@keyframes mascotBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* Visible state is the BASE — opacity is NEVER animated, so a stuck/
   play-pending entrance animation (which can freeze at currentTime:0)
   can never hide content. Only transform is animated, and only when
   motion is welcome. */
.fade-up { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .fade-up { animation: floatUp .5s cubic-bezier(.2,.7,.3,1) both; }
}
