/* =========================================================
   Родной — Unified Design System (gb.rodnoy.site)
   В стиле app.rodnoy.site — Avito-blue + белый фон
   ========================================================= */

:root {
  --brand: #00aaff;
  --brand-dark: #0095e6;
  --brand-foreground: #ffffff;
  --brand-muted: rgba(0, 170, 255, 0.10);
  --brand-50: #eff8ff;
  --brand-100: #dbeefe;
  --brand-200: #bfe2fe;
  --brand-500: #00aaff;
  --brand-600: #0095e6;
  --brand-700: #0077b6;

  --background: #f8f8f8;
  --foreground: #222222;
  --card: #ffffff;
  --card-foreground: #222222;
  --muted: #f0f0f0;
  --muted-foreground: #888888;
  --border: #e5e5e5;
  --separator: #e5e5e5;

  --success: #00c853;
  --warning: #ff9500;
  --destructive: #ff3d00;

  --radius: 8px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.10), 0 3px 8px rgba(0,0,0,0.04);

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* =========================================================
   Базовые стили
   ========================================================= */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.text-balance { text-wrap: balance; }

/* =========================================================
   Унифицированные Tailwind-алиасы (через CSS-переменные)
   Эти классы используются в существующем коде страниц
   ========================================================= */
.bg-brand { background-color: var(--brand); }
.bg-brand-500 { background-color: var(--brand-500); }
.bg-brand-600 { background-color: var(--brand-600); }
.bg-brand-dark { background-color: var(--brand-dark); }
.bg-brand-50 { background-color: var(--brand-50); }
.bg-brand-100 { background-color: var(--brand-100); }
.bg-brand-muted { background-color: var(--brand-muted); }

.text-brand { color: var(--brand); }
.text-brand-600 { color: var(--brand-600); }
.text-brand-700 { color: var(--brand-700); }
.text-brand-foreground { color: var(--brand-foreground); }

.border-brand { border-color: var(--brand); }
.border-brand-100 { border-color: var(--brand-100); }
.border-brand-200 { border-color: var(--brand-200); }
.border-brand-500 { border-color: var(--brand-500); }

.hover\:bg-brand:hover { background-color: var(--brand); }
.hover\:bg-brand-600:hover { background-color: var(--brand-600); }
.hover\:bg-brand-dark:hover { background-color: var(--brand-dark); }
.hover\:bg-brand-50:hover { background-color: var(--brand-50); }
.hover\:bg-brand-muted:hover { background-color: var(--brand-muted); }
.hover\:text-brand:hover { color: var(--brand); }
.hover\:text-brand-600:hover { color: var(--brand-600); }
.hover\:text-brand-700:hover { color: var(--brand-700); }
.hover\:border-brand:hover { border-color: var(--brand); }
.hover\:border-brand-200:hover { border-color: var(--brand-200); }

.ring-brand-100 { --tw-ring-color: var(--brand-100); }
.ring-brand-200 { --tw-ring-color: var(--brand-200); }
.from-brand { --tw-gradient-from: var(--brand); }

/* Инь/ян text/border colors */
.text-ink-300 { color: #cccccc; }
.text-ink-500 { color: #888888; }
.text-ink-700 { color: #444444; }
.text-ink-900 { color: var(--foreground); }
.bg-ink-900 { background-color: #1a1a1a; }
.bg-ink-200 { background-color: #e5e5e5; }
.border-ink-200 { border-color: var(--border); }
.border-ink-300 { border-color: #d4d4d4; }

/* muted/secondary */
.text-muted-foreground { color: var(--muted-foreground); }
.bg-muted { background-color: var(--muted); }
.bg-secondary { background-color: var(--muted); }
.bg-secondary\/50 { background-color: rgba(240,240,240,0.5); }
.bg-secondary\/70 { background-color: rgba(240,240,240,0.7); }
.hover\:bg-secondary:hover { background-color: var(--muted); }
.text-secondary-foreground { color: var(--foreground); }

/* card */
.bg-card { background-color: var(--card); }
.bg-background { background-color: var(--background); }
.bg-foreground { background-color: var(--foreground); }
.text-foreground { color: var(--foreground); }
.bg-white\/90 { background-color: rgba(255,255,255,0.9); }

/* =========================================================
   Кнопки
   ========================================================= */
.btn-primary {
  background-color: var(--brand);
  color: var(--brand-foreground);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover { background-color: var(--brand-dark); }

.btn-outline {
  background-color: var(--card);
  color: var(--brand);
  border: 1px solid var(--brand);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn-outline:hover { background-color: var(--brand-muted); }

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover { background-color: var(--muted); }

/* =========================================================
   Карточки
   ========================================================= */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.shadow-card { box-shadow: var(--shadow-card); }
.shadow-card-hover { box-shadow: var(--shadow-card-hover); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-2xl { box-shadow: var(--shadow-lg); }
.shadow-md { box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03); }

.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--brand-200);
}

/* =========================================================
   Навигация (sticky header)
   ========================================================= */
.rodnoy-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.rodnoy-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.rodnoy-header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--foreground);
  flex-shrink: 0;
}
.rodnoy-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background-color: var(--brand);
  color: var(--brand-foreground);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.125rem;
}
.rodnoy-header__logo-text {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
}
.rodnoy-header__logo-sub {
  font-size: 0.625rem;
  color: var(--muted-foreground);
  line-height: 1;
  margin-top: 2px;
}
.rodnoy-header__nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: 1rem;
}
.rodnoy-header__nav a {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  color: var(--foreground);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.rodnoy-header__nav a:hover {
  background-color: var(--brand-muted);
  color: var(--brand);
}
.rodnoy-header__nav a.active {
  background-color: var(--brand-muted);
  color: var(--brand);
  font-weight: 600;
}
.rodnoy-header__cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rodnoy-header__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: var(--radius);
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: var(--foreground);
}
.rodnoy-header__menu-btn:hover { background-color: var(--brand-muted); }

@media (min-width: 1024px) {
  .rodnoy-header__nav { display: flex; }
  .rodnoy-header__menu-btn { display: none; }
}

/* Mobile menu */
.rodnoy-mobile-menu {
  display: none;
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
}
.rodnoy-mobile-menu.open { display: block; }
.rodnoy-mobile-menu a {
  display: block;
  padding: 0.625rem 0.5rem;
  color: var(--foreground);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius);
}
.rodnoy-mobile-menu a:hover,
.rodnoy-mobile-menu a.active {
  background-color: var(--brand-muted);
  color: var(--brand);
}

/* =========================================================
   Footer
   ========================================================= */
.rodnoy-footer {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 2.5rem 1rem 1.5rem;
  margin-top: 4rem;
}
.rodnoy-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
}
.rodnoy-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .rodnoy-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.rodnoy-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}
.rodnoy-footer__brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background-color: var(--brand);
  color: var(--brand-foreground);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.25rem;
}
.rodnoy-footer__brand-name { font-weight: 700; font-size: 1.125rem; }
.rodnoy-footer__desc {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 360px;
}
.rodnoy-footer__col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: #ffffff;
}
.rodnoy-footer__col ul { list-style: none; padding: 0; margin: 0; }
.rodnoy-footer__col li { margin-bottom: 0.5rem; }
.rodnoy-footer__col a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s ease;
}
.rodnoy-footer__col a:hover { color: var(--brand); }
.rodnoy-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.8125rem;
}

/* =========================================================
   Hero (для главной)
   ========================================================= */
.rodnoy-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: var(--brand-foreground);
  padding: 3rem 1rem;
}
.rodnoy-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
}
.rodnoy-hero__title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
@media (min-width: 768px) {
  .rodnoy-hero__title { font-size: 3.5rem; }
}
.rodnoy-hero__subtitle {
  font-size: 1.125rem;
  opacity: 0.95;
  max-width: 720px;
  margin: 0 0 2rem;
  line-height: 1.5;
}
.rodnoy-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.rodnoy-hero__btn-white {
  background-color: #ffffff;
  color: var(--brand);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease;
}
.rodnoy-hero__btn-white:hover { background-color: rgba(255,255,255,0.9); }
.rodnoy-hero__btn-ghost {
  background-color: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease;
}
.rodnoy-hero__btn-ghost:hover { background-color: rgba(255,255,255,0.25); }
.rodnoy-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 720px;
}
@media (min-width: 768px) {
  .rodnoy-hero__stats { grid-template-columns: repeat(4, 1fr); }
}
.rodnoy-hero__stat {
  background-color: rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.rodnoy-hero__stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1;
}
.rodnoy-hero__stat-label {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

/* =========================================================
   Утилиты и переопределения для согласованности
   ========================================================= */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.glass {
  background-color: rgba(255,255,255,0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .chevron { transform: rotate(180deg); }
.chevron { transition: transform 0.2s ease; }

/* Анимации появления */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Container */
.container-max {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.container-narrow {
  max-width: 896px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Картинки и медиа */
img { max-width: 100%; height: auto; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--muted); }
::-webkit-scrollbar-thumb { background: #cccccc; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* Tables */
table { border-collapse: collapse; width: 100%; }
th, td { padding: 0.625rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; background-color: var(--muted); }

/* Код-блоки */
pre {
  background-color: #1a1a1a;
  color: #f0f0f0;
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* Убираем оранжевые/красные градиенты из существующих стилей */
.from-brand-500 { --tw-gradient-from: var(--brand) !important; }
.to-gold-500 { --tw-gradient-to: #ffc107 !important; }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to)); }

/* Override legacy color classes */
.bg-\[\#FF4356\] { background-color: var(--brand) !important; }
.text-\[\#FF4356\] { color: var(--brand) !important; }
.bg-\[\#241F20\] { background-color: #1a1a1a !important; }
.text-\[\#241F20\] { color: #1a1a1a !important; }
.bg-\[\#FFDE00\] { background-color: #ffc107 !important; }
.border-\[\#FF4356\] { border-color: var(--brand) !important; }
.from-brand-500 { --tw-gradient-from: var(--brand); }
.to-orange-500 { --tw-gradient-to: #ff9500; }

/* Legacy palette cleanup */
.bg-orange-50 { background-color: #fff7ed; }
.text-orange-600 { color: #ea580c; }
.text-orange-700 { color: #c2410c; }
.border-orange-200 { border-color: #fed7aa; }
.bg-gold-50 { background-color: #fffbeb; }
.bg-gold-500 { background-color: #ffc107; }
.text-gold-500 { color: #ffc107; }
.text-gold-700 { color: #b45309; }
.border-gold-100 { border-color: #fef3c7; }
.border-gold-200 { border-color: #fde68a; }
.border-gold-300 { border-color: #fcd34d; }
.border-gold-400 { border-color: #fbbf24; }
.bg-gold-500\/20 { background-color: rgba(255, 193, 7, 0.2); }
.bg-gold-400\/40 { border-color: rgba(251, 191, 36, 0.4); }
