/* blog.vgin.ru — Brand Design System */
/* Based on VGIN brandbook: dark theme, Outfit + Plus Jakarta Sans, emerald/gold accents */

:root {
  /* Color tokens (HSL) */
  --bg: hsl(240 10% 4%);
  --card: hsl(240 10% 8%);
  --foreground: hsl(0 0% 95%);
  --muted: hsl(240 5% 60%);
  --primary: hsl(160 70% 45%);
  --primary-hover: hsl(160 70% 38%);
  --accent: hsl(40 95% 55%);
  --accent-hover: hsl(40 95% 48%);
  --border: hsl(240 10% 18%);
  --destructive: hsl(0 70% 50%);
  --code-bg: hsl(240 10% 14%);

  /* Layout */
  --max-width: 820px;
  --max-width-wide: 1200px;

  /* Shadows */
  --shadow-card: 0 4px 6px -1px hsl(0 0% 0% / 0.4);
  --shadow-gold: 0 0 20px hsl(40 95% 55% / 0.3);
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Base */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--foreground);
  line-height: 1.625;
  font-size: 17px;
}

a {
  color: var(--primary);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s;
}
a:hover {
  text-decoration: underline;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--foreground);
}
.site-header .logo img {
  height: 32px;
  width: auto;
}
.site-header .logo span {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.site-header nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.site-header nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}
.site-header nav a:hover {
  color: var(--foreground);
  text-decoration: none;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 14px;
  color: var(--muted);
}
.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumbs li:not(:last-child)::after {
  content: '›';
  color: var(--border);
}
.breadcrumbs a {
  color: var(--muted);
}
.breadcrumbs a:hover {
  color: var(--primary);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ============================================
   ARTICLE (prose)
   ============================================ */
article {
  color: var(--muted);
  line-height: 1.625;
}

article h1 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--foreground);
  background: linear-gradient(135deg, hsl(160 84% 25%), hsl(40 95% 50%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

article h2 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--foreground);
  margin: 2.5rem 0 1rem;
}

article h3 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--foreground);
  margin: 2rem 0 0.75rem;
}

article h4 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--foreground);
  margin: 1.5rem 0 0.5rem;
}

article p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

article a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
article a:hover {
  text-decoration: underline;
}

article strong {
  color: var(--foreground);
  font-weight: 600;
}

article ul, article ol {
  margin: 0 0 1rem 1.5rem;
}
article ul {
  list-style: disc;
}
article li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}
article li::marker {
  color: var(--primary);
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  display: block;
}

article blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--card);
  border-radius: 0 0.75rem 0.75rem 0;
  color: hsl(0 0% 95% / 0.8);
  font-style: italic;
}

article code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875rem;
}

article pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1rem 0;
}

article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Tables */
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 15px;
}
article th {
  color: var(--foreground);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
article td {
  padding: 10px 16px;
  border-bottom: 1px solid hsl(240 10% 18% / 0.5);
}
article tr:hover td {
  background: hsl(240 10% 8% / 0.5);
}

/* Details/Summary (FAQ) */
article details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  margin: 0.75rem 0;
  overflow: hidden;
}
article summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  color: var(--foreground);
  font-weight: 500;
  transition: background 0.2s;
}
article summary:hover {
  background: hsl(240 10% 12%);
}
article details[open] summary {
  border-bottom: 1px solid var(--border);
}
article details > p,
article details > div {
  padding: 1rem 1.25rem;
}

/* ============================================
   TREND CARD (macro: {{trend:slug}})
   ============================================ */
.trend-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  margin: 1.5rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.trend-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}
.trend-card-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  text-decoration: none !important;
  color: inherit;
}
.trend-card-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 0.75rem;
  flex-shrink: 0;
  margin: 0 !important;
}
.trend-card-body {
  flex: 1;
  min-width: 0;
}
.trend-card-badge {
  display: inline-block;
  background: hsl(40 95% 55% / 0.15);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 8px;
}
.trend-card-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--foreground);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.trend-card-cta {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 480px) {
  .trend-card-link {
    flex-direction: column;
    text-align: center;
  }
  .trend-card-img {
    width: 100%;
    height: 180px;
  }
}

/* ============================================
   GROUP PAGE
   ============================================ */
.group-description {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.articles-list {
  list-style: none;
  padding: 0;
}
.articles-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.articles-list li:first-child {
  padding-top: 0;
}
.articles-list li a {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
  transition: color 0.2s;
}
.articles-list li a:hover {
  color: var(--primary);
  text-decoration: none;
}
.articles-list li p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.5;
}

/* ============================================
   HOME PAGE
   ============================================ */
.home-hero {
  text-align: center;
  padding: 3rem 0 2rem;
}
.home-hero h1 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, hsl(160 84% 25%), hsl(40 95% 50%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}
.home-hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

.groups-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 2rem;
}
.groups-grid li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, transform 0.2s;
}
.groups-grid li:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.groups-grid li a {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--foreground);
  letter-spacing: -0.01em;
}
.groups-grid li a:hover {
  color: var(--primary);
  text-decoration: none;
}
.groups-grid li p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.groups-grid .article-count {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--accent);
  background: hsl(40 95% 55% / 0.1);
  padding: 2px 10px;
  border-radius: 100px;
  font-weight: 600;
}

/* ============================================
   CTA BUTTON (link to vgin.ru)
   ============================================ */
.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), hsl(160 60% 35%));
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none !important;
  transition: opacity 0.2s, transform 0.2s;
}
.cta-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.cta-gold {
  background: linear-gradient(135deg, var(--accent), hsl(40 90% 65%));
  color: #000 !important;
  box-shadow: var(--shadow-gold);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
footer a {
  color: var(--muted);
}
footer a:hover {
  color: var(--primary);
}

/* ============================================
   404 PAGE
   ============================================ */
.error-page {
  text-align: center;
  padding: 100px 24px;
}
.error-page h1 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 6rem;
  font-weight: 700;
  background: linear-gradient(135deg, hsl(160 84% 25%), hsl(40 95% 50%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.error-page p {
  margin: 16px 0 32px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .site-header {
    padding: 16px 20px;
  }
  .site-header nav {
    gap: 16px;
  }
  main {
    padding: 0 20px 40px;
  }
  article h1 {
    font-size: 1.625rem;
  }
  article h2 {
    font-size: 1.25rem;
  }
  .home-hero h1 {
    font-size: 1.75rem;
  }
  .groups-grid {
    grid-template-columns: 1fr;
  }
  footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  article h1 {
    font-size: 1.375rem;
  }
  .breadcrumbs ol {
    font-size: 13px;
    padding: 10px 20px;
  }
}
