/* =====================================================================
   Вишлист — дизайн-система (общая для лендинга, входа и приложения)
   ===================================================================== */
@import url('/fonts/fonts.css');

:root {
  /* бренд */
  --rasp: #f2385f;           /* малиновый — главный акцент */
  --rasp-ink: #c41745;
  --plum: #24163a;           /* глубокий сливовый — тёмные блоки */
  --plum-2: #3a2560;
  --butter: #ffd166;
  --mint: #2fc48d;
  --lilac: #b7a2ff;
  --sky: #8ec5ff;
  --peach: #ffb38a;

  --accent: var(--rasp);     /* меняется в настройках приложения */

  /* поверхности (светлая тема) */
  --bg: #faf6f1;
  --bg-2: #f3ece4;
  --surface: #ffffff;
  --surface-2: #f7f2ec;
  --ink: #1b1424;
  --ink-2: #5f5669;
  --ink-3: #958c9e;
  --line: #ebe3da;
  --line-2: #ddd3c8;
  --focus: color-mix(in srgb, var(--accent) 28%, transparent);

  /* пастели для карточек */
  --p1: #ffe1e7; --p2: #ece6ff; --p3: #fff1c9; --p4: #d9f5e8; --p5: #ddeeff; --p6: #ffe6d6;

  --r-sm: 12px; --r: 18px; --r-lg: 26px; --r-xl: 36px;
  --sh-1: 0 1px 2px rgba(36,22,58,.05), 0 2px 6px rgba(36,22,58,.04);
  --sh-2: 0 2px 4px rgba(36,22,58,.04), 0 12px 32px -6px rgba(36,22,58,.12);
  --sh-3: 0 4px 10px rgba(36,22,58,.06), 0 30px 70px -12px rgba(36,22,58,.25);

  --font: "Onest", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --display: "Unbounded", "Onest", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #120e17;
  --bg-2: #19141f;
  --surface: #1d1824;
  --surface-2: #251f2d;
  --ink: #f6f1ec;
  --ink-2: #b5abbe;
  --ink-3: #82798b;
  --line: #2e2737;
  --line-2: #3b3346;
  --p1: #3a1f2a; --p2: #2a2442; --p3: #3a3120; --p4: #1c3329; --p5: #1d2c3e; --p6: #3a2820;
  --sh-1: 0 1px 2px rgba(0,0,0,.3);
  --sh-2: 0 2px 4px rgba(0,0,0,.25), 0 12px 32px -6px rgba(0,0,0,.5);
  --sh-3: 0 4px 10px rgba(0,0,0,.3), 0 30px 70px -12px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .3s, color .3s;
}
/* лёгкое «бумажное» зерно */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.14 0 0 0 0 0.09 0 0 0 0 0.23 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .25; }
body > * { position: relative; z-index: 1; }
body > dialog { position: fixed; } /* модальные окна всегда поверх экрана, даже при прокрутке */

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

.display { font-family: var(--display); letter-spacing: -.02em; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- логотип ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.03em; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; transition: transform .5s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-10deg) scale(1.06); }

/* ---------- кнопки ---------- */
.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; user-select: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, border-color .2s, color .2s, filter .2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink-3); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.lg { height: 56px; padding: 0 28px; font-size: 17px; }
.btn.xl { height: 64px; padding: 0 34px; font-size: 18px; }
.btn.icon { width: 44px; padding: 0; }
.btn.icon.sm { width: 36px; }
.btn.ink { --b-bg: var(--ink); --b-fg: var(--bg); --b-bd: var(--ink); box-shadow: 0 6px 18px -6px rgba(27,20,36,.5); }
.btn.ink:hover { box-shadow: 0 12px 26px -8px rgba(27,20,36,.55); }
.btn.accent { --b-bg: var(--accent); --b-fg: #fff; --b-bd: var(--accent); box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn.accent:hover { filter: brightness(1.06); box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn.ghost { --b-bg: transparent; --b-bd: transparent; }
.btn.ghost:hover { --b-bg: var(--surface-2); }
.btn.white { --b-bg: #fff; --b-fg: var(--plum); --b-bd: #fff; }
.btn.glass { --b-bg: rgba(255,255,255,.16); --b-fg: #fff; --b-bd: rgba(255,255,255,.28); backdrop-filter: blur(10px); }
.btn.glass:hover { --b-bg: rgba(255,255,255,.26); border-color: rgba(255,255,255,.5); }
.btn.danger { --b-fg: #d92d4b; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- поля ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .field input:not([type=checkbox]):not([type=file]), .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  outline: none; transition: border-color .2s, box-shadow .2s, background-color .2s; font-size: 15px;
}
.field textarea { resize: vertical; min-height: 88px; line-height: 1.45; }
.input:hover, .field input:hover, .field textarea:hover, .field select:hover { border-color: var(--line-2); }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.check input { appearance: none; width: 40px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .25s; margin: 0; flex-shrink: 0; }
.check input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .3s var(--spring); }
.check input:checked { background: var(--accent); }
.check input:checked::after { transform: translateX(16px); }

/* ---------- мелочи ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; transition: .2s var(--ease); white-space: nowrap; }
.chip:hover { border-color: var(--ink-3); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip small { opacity: .55; font-weight: 600; }

.sticker { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .01em; background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); white-space: nowrap; }

@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes fade-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
