/* Duelo — базовая дизайн-система: токены, типографика, кнопки, поля, стекло. */
@font-face { font-family: 'Onest'; src: url('/assets/fonts/onest-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; src: url('/assets/fonts/onest-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lora'; font-style: italic; src: url('/assets/fonts/lora-cyrillic-wght-italic.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Lora'; font-style: italic; src: url('/assets/fonts/lora-latin-wght-italic.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Caveat'; src: url('/assets/fonts/caveat-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Caveat'; src: url('/assets/fonts/caveat-latin-wght-normal.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  color-scheme: light;
  --bg: #fff7f4;
  --bg-2: #fff0f4;
  --surface: rgba(255, 255, 255, .58);
  --surface-strong: rgba(255, 255, 255, .86);
  --surface-solid: #ffffff;
  --glass-border: rgba(255, 255, 255, .8);
  --line: rgba(122, 38, 70, .1);
  --line-strong: rgba(122, 38, 70, .18);
  --text: #2a1720;
  --text-2: #4c3540;
  --muted: #86707a;
  --primary: #ff4f84;
  --primary-ink: #e23a6e;
  --primary-soft: rgba(255, 79, 132, .1);
  --peach: #ff9a62;
  --lavender: #a982ff;
  --success: #17a673;
  --danger: #e5484d;
  --warning: #e99a1d;
  --grad: linear-gradient(135deg, #ff4f84 0%, #ff7470 52%, #ffa35e 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 79, 132, .14), rgba(169, 130, 255, .14));
  --shadow-sm: 0 1px 2px rgba(80, 20, 40, .05), 0 2px 8px rgba(80, 20, 40, .04);
  --shadow: 0 18px 50px -20px rgba(226, 58, 110, .28), 0 4px 14px rgba(80, 20, 40, .06);
  --shadow-lg: 0 40px 90px -30px rgba(226, 58, 110, .38), 0 10px 30px rgba(80, 20, 40, .08);
  --ring: 0 0 0 4px rgba(255, 79, 132, .2);
  --blob-1: rgba(255, 128, 170, .45);
  --blob-2: rgba(255, 186, 140, .45);
  --blob-3: rgba(184, 150, 255, .38);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --font: 'Onest', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --hand: 'Caveat', 'Comic Sans MS', cursive;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #140a12;
  --bg-2: #1b0f19;
  --surface: rgba(255, 255, 255, .055);
  --surface-strong: rgba(36, 20, 32, .82);
  --surface-solid: #221420;
  --glass-border: rgba(255, 255, 255, .1);
  --line: rgba(255, 220, 235, .09);
  --line-strong: rgba(255, 220, 235, .16);
  --text: #fcf0f5;
  --text-2: #e5d1da;
  --muted: #b294a3;
  --primary: #ff6a98;
  --primary-ink: #ff86ab;
  --primary-soft: rgba(255, 106, 152, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .02);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, .8);
  --ring: 0 0 0 4px rgba(255, 106, 152, .25);
  --blob-1: rgba(255, 70, 130, .22);
  --blob-2: rgba(255, 140, 90, .14);
  --blob-3: rgba(150, 100, 255, .22);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; font-family: var(--font); font-size: 16px; line-height: 1.55;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.02em; font-weight: 800; text-wrap: balance; }
p, li { margin: 0 0 1em; text-wrap: pretty; }
li { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }
::selection { background: rgba(255, 79, 132, .22); }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -.01em; }
.hand { font-family: var(--hand); font-weight: 600; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-ink); font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Фон: мягкие цветные пятна под стеклом */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-blobs span { position: absolute; border-radius: 50%; filter: blur(70px); animation: blob 26s var(--ease) infinite alternate; }
.bg-blobs span:nth-child(1) { width: 520px; height: 520px; background: var(--blob-1); top: -160px; right: -120px; }
.bg-blobs span:nth-child(2) { width: 460px; height: 460px; background: var(--blob-2); bottom: -180px; left: -140px; animation-delay: -8s; }
.bg-blobs span:nth-child(3) { width: 380px; height: 380px; background: var(--blob-3); top: 40%; left: 45%; animation-delay: -15s; }
@keyframes blob { to { transform: translate(-60px, 50px) scale(1.12); } }

/* Иконки из спрайта */
.ic { width: 20px; height: 20px; flex: none; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 26px; height: 26px; }

/* Стекло */
.card, .glass {
  background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
}
.card { padding: 28px; }

/* Кнопки */
.btn {
  --h: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h); padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, opacity .2s; text-decoration: none !important;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -10px rgba(255, 79, 132, .65), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-primary:hover { box-shadow: 0 16px 36px -10px rgba(255, 79, 132, .8), inset 0 1px 0 rgba(255, 255, 255, .3); transform: translateY(-1px); }
.btn-ghost { background: var(--surface-strong); color: var(--text); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-solid); }
.btn-soft { background: var(--primary-soft); color: var(--primary-ink); }
.btn-soft:hover { background: rgba(255, 79, 132, .16); }
.btn-danger { background: rgba(229, 72, 77, .1); color: var(--danger); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn-xs { --h: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-lg { --h: 56px; padding: 0 30px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-strong); color: var(--text); transition: background .2s, transform .2s;
}
.icon-btn:hover { background: var(--surface-solid); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .ic { width: 18px; height: 18px; }

/* Поля */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.hint { font-size: 13px; color: var(--muted); margin: -4px 0 12px; }
.input {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--surface-strong); color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--muted); opacity: .8; }
.input:focus { border-color: var(--primary); box-shadow: var(--ring); background: var(--surface-solid); }
textarea.input { min-height: 84px; resize: vertical; line-height: 1.45; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Чипы и сегменты */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface-strong); color: var(--text); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .18s var(--ease); text-decoration: none !important;
}
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed='true'], .chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-ink); }
.chip .ic { width: 16px; height: 16px; }

/* Тосты */
.toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; display: grid; gap: 8px; pointer-events: none; }
.toast {
  width: max-content; max-width: min(92vw, 440px); padding: 12px 18px; border-radius: 16px;
  background: var(--surface-strong); color: var(--text); border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font-weight: 600; font-size: 14px;
  line-height: 1.35; text-wrap: pretty; animation: toast-in .35s var(--ease); display: flex; gap: 10px; align-items: center;
}
.toast .ic { flex: none; }
.toast.error { color: var(--danger); }
.toast.success .ic { color: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* Шапка */
.topbar { position: sticky; top: 0; z-index: 50; padding: 14px 0; transition: background .3s, box-shadow .3s, backdrop-filter .3s; }
.topbar.scrolled { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.topbar-in { display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: -.03em; color: var(--text); text-decoration: none !important; }
.brand img { width: 34px; height: 34px; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topnav .link { color: var(--text-2); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.topnav .link:hover { background: var(--primary-soft); text-decoration: none; color: var(--primary-ink); }

/* Подвал */
.site-foot { padding: 48px 0 40px; margin-top: 60px; border-top: 1px solid var(--line); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 18px; }
.foot-links a { color: var(--text-2); font-size: 14px; font-weight: 600; }
.foot-fine { font-size: 13px; color: var(--muted); margin: 0 0 6px; }

/* Модальное окно */
.modal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 20px; background: rgba(30, 10, 22, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s; }
.modal-card { width: min(460px, 100%); background: var(--surface-strong); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-lg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); animation: pop .35s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .card { padding: 22px; border-radius: 24px; }
  .row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
