/* Ynamly Connect — общий стиль «Aurora Glass»: светлый фон с медленно плывущими пастельными свечениями,
   матовое стекло, неон (синий MPower → фиолетовый → циан, красный MPower — для «сейчас» и тревог).
   Используется админкой и публичными страницами (скачивание, приглашение). Текст всегда тёмный и контрастный. */

@font-face { font-family: "Manrope"; src: url("/fonts/manrope.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains_mono.ttf") format("truetype"); font-weight: 100 800; font-display: swap; }

:root {
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --bg: #EEF2F8; --ink: #0A1A3F; --ink2: #2B3550; --muted: #475066;
  --brand: #1747C9; --a1: #0EA5E9; --a2: #F97316; --red: #EA3A26;
  --ok: #10B981; --ok-ink: #0B7A53; --warn: #F5A524; --warn-ink: #8A5300; --err: #EA3A26; --err-ink: #B42318;
  --glass: rgba(255,255,255,.66); --glass-hi: rgba(255,255,255,.82); --line: rgba(23,71,201,.12);
  --grad: linear-gradient(110deg, #1747C9, #F97316 55%, #0EA5E9);
  --shadow: 0 10px 30px rgba(23,71,201,.08);
  color-scheme: light;
}

/* ── аврора: три пастельных свечения + сетка, медленно плывут ── */
.ag-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); pointer-events: none; }
.ag-bg i { position: absolute; border-radius: 50%; filter: blur(60px); }
.ag-bg i:nth-child(1) { width: 62vmax; height: 62vmax; left: -18vmax; top: -24vmax; background: radial-gradient(circle, rgba(14,165,233,.36), transparent 65%); animation: ag-d1 22s ease-in-out infinite alternate; }
.ag-bg i:nth-child(2) { width: 56vmax; height: 56vmax; right: -16vmax; top: 10vmax; background: radial-gradient(circle, rgba(249,115,22,.28), transparent 65%); animation: ag-d2 26s ease-in-out infinite alternate; }
.ag-bg i:nth-child(3) { width: 50vmax; height: 50vmax; left: 34%; bottom: -28vmax; background: radial-gradient(circle, rgba(249,115,22,.20), transparent 65%); animation: ag-d1 30s ease-in-out infinite alternate-reverse; }
.ag-bg::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(23,71,201,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(23,71,201,.05) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 50% 15%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse at 50% 15%, #000 30%, transparent 80%); }
@keyframes ag-d1 { to { transform: translate(12vmax, 8vmax) scale(1.12); } }
@keyframes ag-d2 { to { transform: translate(-11vmax, 6vmax) scale(1.08); } }

/* ── стеклянный виджет: светлая кромка, при наведении — подъём и неоновый ореол ── */
.glass { position: relative; border-radius: 28px; background: var(--glass); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.25) 40%, rgba(249,115,22,.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.glass.lift:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(23,71,201,.14), 0 0 0 1px rgba(249,115,22,.25), 0 0 28px rgba(14,165,233,.18); }

/* градиентный текст и кнопка */
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-btn { color: #fff; background: var(--grad); box-shadow: 0 8px 22px rgba(249,115,22,.35); transition: transform .15s, box-shadow .3s; }
.grad-btn:hover { color: #fff; box-shadow: 0 10px 28px rgba(249,115,22,.45), 0 0 22px rgba(14,165,233,.35); }
.grad-btn:active { transform: scale(.97); }

/* ── анимации ── */
.fx-rise { animation: fx-rise .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes fx-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.fx-ping { position: relative; }
.fx-ping::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: fx-ping 1.8s ease-out infinite; }
@keyframes fx-ping { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }
.fx-shine { position: relative; overflow: hidden; }
.fx-shine::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: fx-shine 3.4s ease-in-out infinite; }
@keyframes fx-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.fx-chev path { animation: fx-chev 1.6s ease-in-out infinite; }
.fx-chev path:nth-child(2) { animation-delay: .2s; } .fx-chev path:nth-child(3) { animation-delay: .4s; }
@keyframes fx-chev { 0%, 100% { opacity: .45; } 40% { opacity: 1; } }
.fx-spin { animation: fx-spin 18s linear infinite; transform-origin: 50% 50%; }
.fx-spin-r { animation: fx-spin 26s linear infinite reverse; transform-origin: 50% 50%; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
.fx-breath { animation: fx-breath 3s ease-in-out infinite; }
@keyframes fx-breath { 50% { transform: scale(1.06); opacity: .75; } }
.fx-draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: fx-draw 2.2s cubic-bezier(.4,0,.2,1) .2s forwards; }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }
.fx-fade { opacity: 0; animation: fx-fadein 1s ease 1s forwards; }
@keyframes fx-fadein { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .ag-bg i, .fx-rise, .fx-ping::after, .fx-shine::after, .fx-chev path, .fx-spin, .fx-spin-r, .fx-breath { animation: none !important; }
  .fx-draw { stroke-dashoffset: 0; animation: none; } .fx-fade { opacity: 1; animation: none; }
}
