/* Публичные страницы FlexGram: лендинг (/welcome) и вход (/login).
   Свой лёгкий набор стилей: эти страницы открываются в обычном браузере,
   без Telegram и без каркаса кабинета. */

:root {
    --s-blue: #2f7bff;
    --s-blue-2: #1fb6ff;
    --s-violet: #7b5cff;
    --s-ink: #0d1530;
    --s-ink-2: #3b4566;
    --s-muted: #6b7493;
    --s-line: rgba(15, 30, 80, 0.09);
    --s-bg: #f6f8ff;
    --s-card: #ffffff;
    --s-grad: linear-gradient(120deg, #1fb6ff 0%, #2f7bff 45%, #7b5cff 100%);
    --s-grad-soft: linear-gradient(135deg, #eaf4ff 0%, #f1eeff 100%);
    --s-shadow: 0 20px 50px rgba(30, 60, 160, 0.12), 0 4px 14px rgba(30, 60, 160, 0.06);
    --s-radius: 24px;
    --s-font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.site {
    margin: 0;
    font-family: var(--s-font);
    color: var(--s-ink);
    background: var(--s-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.site a { color: inherit; }
.site img { max-width: 100%; }

.s-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Кнопки */
.s-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 16px;
    font: inherit;
    font-size: 16px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, background .2s;
    -webkit-tap-highlight-color: transparent;
}

.s-btn:active { transform: scale(.97); }

.s-btn--primary,
.site a.s-btn--primary {
    color: #fff;
    background: var(--s-grad);
    box-shadow: 0 12px 28px rgba(47, 123, 255, 0.38);
    overflow: hidden;
}

.s-btn--primary::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 45%;
    left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    animation: s-shine 3.4s ease-in-out infinite;
}

@keyframes s-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }

.s-btn--primary:hover { box-shadow: 0 16px 34px rgba(47, 123, 255, 0.48); }

.s-btn--ghost,
.site a.s-btn--ghost {
    color: var(--s-ink);
    background: rgba(255, 255, 255, .8);
    border: 1px solid var(--s-line);
    box-shadow: 0 4px 14px rgba(30, 60, 160, 0.06);
}

.s-btn--ghost:hover { background: #fff; }
.s-btn[disabled] { opacity: .6; cursor: default; }
.s-btn[disabled]::after { display: none; }

.s-btn svg { width: 18px; height: 18px; }

/* Логотип */
.s-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.3px;
    text-decoration: none;
    color: var(--s-ink);
}

.s-logo-mark { position: relative; width: 30px; height: 30px; flex: none; }
.s-logo-mark i { position: absolute; width: 14px; height: 14px; border-radius: 5px; }
.s-logo-mark i:nth-child(1) { left: 0; top: 0; background: #1fb6ff; }
.s-logo-mark i:nth-child(2) { right: 0; top: 0; background: #2f7bff; }
.s-logo-mark i:nth-child(3) { left: 8px; bottom: 0; background: #7b5cff; }

/* Поля */
.s-field { display: block; margin-top: 14px; }
.s-field span { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 700; color: var(--s-ink-2); }

.s-input-wrap { position: relative; }

.s-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1.5px solid rgba(15, 30, 80, 0.12);
    background: #f8faff;
    font: inherit;
    font-size: 16px;
    color: var(--s-ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.s-input:focus { border-color: var(--s-blue); background: #fff; box-shadow: 0 0 0 4px rgba(47, 123, 255, .14); }
.s-input.is-error { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .12); }

.s-eye {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--s-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.s-eye:hover { background: rgba(47, 123, 255, .08); color: var(--s-blue); }
.s-eye svg { width: 20px; height: 20px; }

.s-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--s-muted);
    cursor: pointer;
}

.s-check input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--s-blue); flex: none; }
.s-check a { color: var(--s-blue); text-decoration: none; font-weight: 600; }

.s-error {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

@media (prefers-reduced-motion: reduce) {
    .s-btn--primary::after { animation: none; }
    html { scroll-behavior: auto; }
}
