/* AIRatings.ru — Main CSS (Tailwind standalone + custom) */

/* ── Tailwind utilities: loaded via <script> in base.html for dev ── */

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: #07080c;
  color: #e5e7ef;
}

/* === Декоративный фон === */
.site-bg {
  background-color: #07080c;
  background-image:
    radial-gradient(900px 520px at 8% -8%, rgba(16, 185, 129, 0.18), transparent 60%),
    radial-gradient(700px 400px at 100% 0%, rgba(245, 158, 11, 0.10), transparent 60%),
    radial-gradient(1000px 600px at 50% 120%, rgba(239, 68, 68, 0.10), transparent 60%);
}

/* === Цвета ink (dark navy) === */
.bg-ink-950\/70 { background-color: rgba(7,8,12,0.70); }
.bg-ink-850\/95 { background-color: rgba(15,18,32,0.95); }
.bg-ink-950\/50 { background-color: rgba(7,8,12,0.50); }

/* === Логотип === */
.logo-gradient {
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 50%, #ef4444 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* === grade_badge === */
.grade-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  flex-shrink: 0;
  --grade-color: #34d399;
  font-size: 0;
}
.grade-badge .gv {
  font-size: 0.82rem; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--grade-color);
  padding-bottom: 2px;
  border-bottom: 2px solid currentColor;
  text-shadow: 0 0 8px currentColor;
}
.grade-badge::after {
  content: "";
  width: 1.1rem; height: 1.1rem;
  background: #fbbf24;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z'/></svg>") center/contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(251,191,36,0.55)) drop-shadow(0 0 2px rgba(251,191,36,0.9));
  flex-shrink: 0;
}
.grade-badge.lg::after { width: 1.55rem; height: 1.55rem; }
.grade-badge.lg .gv { font-size: 1rem; }

/* Цветовая шкала оценок */
.grade-1 .gv, .grade-2 .gv { color: #dc2626 !important; --grade-color: #dc2626; }
.grade-3 .gv               { color: #dc2626 !important; --grade-color: #dc2626; }
.grade-4 .gv               { color: #ea580c !important; --grade-color: #ea580c; }
.grade-5 .gv               { color: #ea580c !important; --grade-color: #ea580c; }
.grade-6 .gv               { color: #ca8a04 !important; --grade-color: #ca8a04; }
.grade-7 .gv               { color: #84cc16 !important; --grade-color: #84cc16; }
.grade-8 .gv               { color: #65a30d !important; --grade-color: #65a30d; }
.grade-9 .gv               { color: #16a34a !important; --grade-color: #16a34a; }
.grade-10 .gv              { color: #15803d !important; --grade-color: #15803d; }

/* star-stack */
.star-stack {
  display: inline-flex; flex-direction: column; align-items: center;
  gap: 0.15rem; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.star-stack svg { width: 1.75rem; height: 1.75rem; fill: #fbbf24; filter: drop-shadow(0 0 8px rgba(251,191,36,0.45)); }
.star-stack span { font-size: 0.75rem; font-weight: 700; color: #fbbf24; line-height: 1; padding-bottom: 2px; border-bottom: 2px solid currentColor; text-shadow: 0 0 8px currentColor; }
.star-stack[data-grade="1"] span, .star-stack[data-grade="2"] span { color: #f87171; }
.star-stack[data-grade="3"] span { color: #fb7185; }
.star-stack[data-grade="4"] span { color: #fb923c; }
.star-stack[data-grade="5"] span { color: #fbbf24; }
.star-stack[data-grade="6"] span { color: #eab308; }
.star-stack[data-grade="7"] span { color: #a3e635; }
.star-stack[data-grade="8"] span { color: #4ade80; }
.star-stack[data-grade="9"] span { color: #34d399; }
.star-stack[data-grade="10"] span { color: #10b981; }

/* === Cards === */
.card {
  background-color: rgba(20, 23, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 220ms ease, background-color 180ms ease;
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.45);
  background-color: rgba(22, 32, 28, 0.85);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 40px -20px rgba(16,185,129,0.45), 0 8px 20px -12px rgba(245,158,11,0.15);
}

.row { transition: background-color 150ms ease, transform 150ms ease; border-radius: 0.625rem; }
.row:hover { background-color: rgba(16, 185, 129, 0.10); transform: translateX(2px); }

.link-accent { color: #34d399; transition: color 150ms ease; }
.link-accent:hover { color: #6ee7b7; text-decoration: underline; text-underline-offset: 3px; }

/* === svc-avatar === */
.svc-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 0.5rem;
  color: #fff; font-weight: 700; font-size: 0.75rem; flex-shrink: 0;
  box-shadow: 0 4px 10px -4px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.svc-avatar.lg { width: 3rem; height: 3rem; font-size: 1rem; border-radius: 0.75rem; }

/* === emoji-tile === */
.emoji-tile {
  width: 3rem; height: 3rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; border-radius: 0.875rem;
  background: linear-gradient(135deg, rgba(16,185,129,0.22) 0%, rgba(245,158,11,0.14) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover .emoji-tile { transform: scale(1.05) rotate(-3deg); box-shadow: 0 8px 24px -8px rgba(16,185,129,0.55); }

/* === Buttons === */
.btn-primary {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 160% at 50% 0%, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 45%), linear-gradient(180deg, #34d399 0%, #10b981 45%, #059669 100%);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,40,20,0.25);
  box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 -1px 0 rgba(0,50,30,0.25) inset, 0 10px 22px -8px rgba(16,185,129,0.55), 0 4px 12px -4px rgba(16,185,129,0.35);
  transition: transform 180ms cubic-bezier(.2,.9,.3,1.2), box-shadow 250ms ease, filter 150ms ease;
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.45) 48%, rgba(255,255,255,0.15) 52%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 700ms cubic-bezier(.2,.8,.25,1);
  pointer-events: none;
}
.btn-primary:hover { transform: translateY(-2px); filter: saturate(1.15) brightness(1.04); box-shadow: 0 1px 0 rgba(255,255,255,0.45) inset, 0 22px 38px -12px rgba(16,185,129,0.75), 0 0 0 6px rgba(52,211,153,0.12); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:active { transform: translateY(0) scale(0.98); filter: brightness(0.96); }

.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(16,185,129,0.45); color: #d1fae5; }

/* === Navigation links === */
.nav-link { position: relative; color: rgb(203,213,225); transition: color 150ms ease; }
.nav-link:hover { color: #fff; }
.nav-link::after { content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.4rem; height: 1px; background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444); transform: scaleX(0); transform-origin: left; transition: transform 200ms ease; }
.nav-link:hover::after { transform: scaleX(1); }

/* === Stat cards === */
.stat-card {
  position: relative; padding: 1.5rem 1rem; border-radius: 1rem;
  background: rgba(17,20,40,0.6); border: 1px solid rgba(255,255,255,0.07);
  text-align: center; text-decoration: none; display: block; cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}
.stat-card:hover { transform: translateY(-2px); border-color: rgba(16,185,129,0.45); background: rgba(20,32,26,0.85); box-shadow: 0 16px 30px -16px rgba(16,185,129,0.45); }
.stat-num { display: block; font-size: clamp(1.875rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: #34d399; line-height: 1; }
.stat-lbl { margin-top: 0.5rem; font-size: 0.8125rem; color: rgb(148,163,184); font-weight: 500; }

/* === Hero === */
.hero-h1 { text-wrap: pretty; font-size: clamp(2.25rem, 4vw, 3.75rem); letter-spacing: -0.025em; }
.hero-glow::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(600px 300px at 20% 40%, rgba(16,185,129,0.35), transparent 60%), radial-gradient(500px 280px at 80% 60%, rgba(239,68,68,0.18), transparent 60%); filter: blur(20px); pointer-events: none; }

/* === Misc === */
.pill-free { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.55rem; background: rgba(16,185,129,0.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.25); border-radius: 999px; font-size: 0.7rem; font-weight: 600; }
.hairline { border-color: rgba(255,255,255,0.06); }
.img-placeholder { background-image: linear-gradient(135deg, rgba(16,185,129,0.10) 0%, rgba(16,185,129,0.10) 50%, rgba(239,68,68,0.08) 50%, rgba(239,68,68,0.08) 100%); background-size: 16px 16px; background-color: #0f1220; }

/* === Footer grid (categories col ~10% wider) === */
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 768px)  { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-cols { grid-template-columns: 1.1fr 1fr 1fr 1fr; } }

/* === accent-bar === */
.accent-bar { display: block; width: 3rem; height: 0.25rem; border-radius: 999px; background: linear-gradient(90deg, #10b981 0%, #f59e0b 50%, #ef4444 100%); margin-bottom: 1rem; box-shadow: 0 0 20px rgba(16,185,129,0.45); }

/* === stars (10-звёздочная шкала для отзывов) === */
.stars { display: inline-flex; align-items: center; gap: 0.15rem; line-height: 1; }
.stars::after { content: attr(data-rate) "/10"; margin-left: 0.4rem; font-size: 0.75rem; font-weight: 700; color: #fbbf24; font-variant-numeric: tabular-nums; }
.stars i { display: inline-block; width: 0.85rem; height: 0.85rem; background: rgba(255,255,255,0.12); -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z'/></svg>") center/contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z'/></svg>") center/contain no-repeat; }
.stars i.on { background: #fbbf24; filter: drop-shadow(0 0 3px rgba(251,191,36,0.5)); }

/* === Compare table === */
.row-compare:hover { background-color: rgba(16,185,129,0.05); }
.row-active { background-color: rgba(99,102,241,0.10) !important; }
.card-active { border-color: rgba(99,102,241,0.5) !important; background-color: rgba(36,32,70,0.75) !important; }

/* Custom checkbox */
.ck { width: 1.1rem; height: 1.1rem; border-radius: 0.35rem; border: 1.5px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.03); display: inline-flex; align-items: center; justify-content: center; transition: all 150ms ease; flex-shrink: 0; }
label:hover .ck { border-color: rgba(16,185,129,0.6); }
input:checked + .ck { background: linear-gradient(180deg, #34d399, #10b981); border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.18), 0 2px 6px rgba(16,185,129,0.4); }
input:checked + .ck::after { content: ""; width: 0.4rem; height: 0.65rem; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) translate(-1px, -1px); }
input:disabled + .ck { opacity: 0.3; cursor: not-allowed; }

/* btn-try — compact emerald outline */
.btn-try { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.35); color: #6ee7b7; transition: all 160ms ease; }
.btn-try:hover { background: linear-gradient(180deg, #34d399, #10b981); border-color: #10b981; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 14px -4px rgba(16,185,129,0.5); }

/* Line clamp */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* === Alpine cloak === */
[x-cloak] { display: none !important; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #07080c; }
::-webkit-scrollbar-thumb { background: #252a46; border-radius: 10px; border: 2px solid #07080c; }
::-webkit-scrollbar-thumb:hover { background: #3b4170; }

/* === UGC Form === */
.form-card {
  background: linear-gradient(180deg, rgba(20,23,38,0.82) 0%, rgba(15,18,32,0.75) 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 1.25rem;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 30px 60px -30px rgba(16,185,129,0.25), 0 18px 40px -24px rgba(0,0,0,0.55);
}
.field-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8125rem; font-weight: 600; color: #e5e7ef; margin-bottom: 0.45rem; }
.field-label .req { color: #f87171; font-weight: 700; }
.field-label .opt { font-weight: 500; color: #64748b; font-size: 0.7rem; padding: 1px 6px; border: 1px solid rgba(255,255,255,0.08); border-radius: 999px; background: rgba(255,255,255,0.02); }
.field-hint { margin-top: 0.4rem; font-size: 0.74rem; color: #64748b; line-height: 1.45; }
.field-hint a { color: #6ee7b7; }
.field-error { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.4rem; font-size: 0.74rem; color: #fca5a5; font-weight: 500; }
.inp, .txt {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
  color: #e5e7ef;
  font-size: 0.925rem;
  font-family: inherit;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.inp::placeholder, .txt::placeholder { color: #64748b; }
.inp:hover, .txt:hover { border-color: rgba(16,185,129,0.28); }
.inp:focus, .txt:focus { outline: none; border-color: rgba(16,185,129,0.55); background: rgba(16,185,129,0.05); box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.txt { resize: vertical; min-height: 160px; line-height: 1.55; }
.inp.err, .txt.err { border-color: rgba(248,113,113,0.55); background: rgba(248,113,113,0.05); box-shadow: 0 0 0 3px rgba(248,113,113,0.08); }
.tabgroup { display: inline-flex; padding: 4px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 0.75rem; }
.tabgroup button { position: relative; padding: 0.55rem 1.25rem; border-radius: 0.55rem; font-size: 0.875rem; font-weight: 600; color: #94a3b8; display: inline-flex; align-items: center; gap: 0.45rem; transition: color 150ms ease, background 150ms ease; }
.tabgroup button:hover { color: #e5e7ef; }
.tabgroup button.active { color: #07080c; background: linear-gradient(180deg, #34d399 0%, #10b981 100%); box-shadow: 0 6px 14px -6px rgba(16,185,129,0.55), 0 1px 0 rgba(255,255,255,0.4) inset; }
.rate-stars { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.5rem 0.25rem; }
.rate-stars button { width: 2.1rem; height: 2.1rem; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 0.55rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all 140ms ease; }
.rate-stars button svg { width: 1.1rem; height: 1.1rem; fill: rgba(255,255,255,0.18); transition: fill 140ms ease, filter 140ms ease; }
.rate-stars button.on { background: rgba(251,191,36,0.14); border-color: rgba(251,191,36,0.45); }
.rate-stars button.on svg { fill: #fbbf24; filter: drop-shadow(0 0 6px rgba(251,191,36,0.55)); }
.rate-stars button:hover { transform: translateY(-1px); border-color: rgba(251,191,36,0.5); }

/* Отступ ~20px между абзацами в prose-блоках на всех страницах с длинным
   контентом (обзор, отзыв, кейс, гайд, пост блога). Tailwind Play CDN
   подключён без @tailwindcss/typography плагина, поэтому prose-p:mb-5
   не срабатывает — даём явное правило здесь. */
.prose p { margin-bottom: 1.25rem; }
.prose p:last-child { margin-bottom: 0; }

/* Tooltip в стиле сайта. Применяется как:
       <span class="tip" data-tip="…длинный текст…">короткий ярлык</span>
   Подсказка всплывает над элементом при наведении мышью или фокусе. */
.tip { position: relative; cursor: help; }
.tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  white-space: normal;
  width: max-content;
  max-width: 280px;
  padding: 0.5rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  color: #e2e8f0;
  background: #11141f;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.04) inset;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 50;
}
.tip:hover::after, .tip:focus-visible::after { opacity: 1; }
.tip[data-tip=""]::after, .tip:not([data-tip])::after { display: none; }
