/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #111827;
  line-height: 1.6;
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --violet: #7c3aed;
  --violet-light: #ede9fe;
  --indigo: #4f46e5;
  --indigo-light: #e0e7ff;
  --orange: #ea580c;
  --orange-light: #ffedd5;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.06);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.06);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
}
.fade-in--delay  { transition-delay: .15s; }
.fade-in--delay2 { transition-delay: .3s; }
.fade-in.visible { opacity: 1; transform: none; }

/* ============================================================
   UTILITIES
   ============================================================ */
.gradient-text {
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-box {
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  color: white;
  border-radius: var(--radius-xl);
  padding: 40px;
}
@media (min-width: 768px) { .gradient-box { padding: 48px; } }

.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.badge--orange { background: var(--orange-light); color: var(--orange); }
.badge--violet { background: var(--violet-light); color: var(--violet); }

.section { padding: 80px 0; }
.section--white { background: #fff; }
.section--gray  { background: var(--gray-50); }
.section--cases {
  background: linear-gradient(135deg, var(--gray-50) 0%, #ede9fe22 100%);
}

.section-header { text-align: center; margin-bottom: 56px; }
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
  line-height: 1.2;
}
.section-title--left { text-align: left; }
.section-desc {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 560px;
  margin: 0 auto;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot--violet { background: var(--violet); }
.dot--indigo { background: var(--indigo); }
.dot--orange { background: var(--orange); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s, opacity .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }

.btn--primary {
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  color: white;
}
.btn--primary:hover { box-shadow: 0 8px 20px rgba(124,58,237,.35); }

.btn--outline {
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}
.btn--outline:hover { border-color: var(--violet); color: var(--violet); }

.btn--violet { background: var(--violet); color: white; }
.btn--violet:hover { box-shadow: 0 8px 20px rgba(124,58,237,.35); }

.btn--indigo { background: var(--indigo); color: white; }
.btn--indigo:hover { box-shadow: 0 8px 20px rgba(79,70,229,.35); }

.btn--orange { background: var(--orange); color: white; }
.btn--orange:hover { box-shadow: 0 8px 20px rgba(234,88,12,.35); }

.btn--lg { padding: 14px 28px; font-size: 1.05rem; border-radius: var(--radius); }
.btn--full { width: 100%; }

/* ============================================================
   LOGO
   ============================================================ */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.logo__name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gray-900);
  line-height: 1.2;
}
.logo__domain {
  font-size: .72rem;
  color: var(--gray-500);
}
.logo__domain--gray { color: var(--gray-400); }
.logo--light .logo__name { color: white; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow .3s;
}
.header--scrolled { box-shadow: var(--shadow-lg); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav {
  display: flex;
  gap: 32px;
}
.nav__link {
  font-size: .95rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: color .2s;
}
.nav__link:hover { color: var(--violet); }

.header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.social-links__link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}
.social-links__link:hover {
  background: var(--violet-light);
  color: var(--violet);
}
.social-links__link svg { width: 18px; height: 18px; }

.footer .social-links__link {
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .7);
}
.footer .social-links__link:hover {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.burger--active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger--active span:nth-child(2) { opacity: 0; }
.burger--active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(135deg, #f5f3ff 0%, #fff 50%, #eef2ff 100%);
}
.hero__inner {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 1024px) { .hero__inner { grid-template-columns: 1fr 1fr; } }

.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: 20px;
}
.hero__desc {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 28px;
  max-width: 520px;
}
.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: .875rem;
  color: var(--gray-700);
  font-weight: 500;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__image-wrap { position: relative; }
.hero__image-box {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  position: relative;
}
.hero__image-box img { width: 100%; height: auto; }
.hero__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,.18) 0%, transparent 60%);
}
.hero__stat {
  position: absolute;
  background: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-xl);
}
.hero__stat--bl { bottom: -20px; left: -16px; }
.hero__stat--tr { top: -20px; right: -16px; }
.hero__stat-val {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
}
.hero__stat-val--violet { color: var(--violet); }
.hero__stat-val--orange { color: var(--orange); }
.hero__stat-label { font-size: .8rem; color: var(--gray-500); margin-top: 2px; }

/* ============================================================
   SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  gap: 28px;
}
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.svc-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .3s;
}
.svc-card:hover { box-shadow: var(--shadow-xl); }

.svc-card__img-wrap {
  position: relative;
  height: 190px;
  overflow: hidden;
}
.svc-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.svc-card__img-overlay {
  position: absolute;
  inset: 0;
  opacity: .82;
}
.svc-card__img-overlay--violet { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.svc-card__img-overlay--indigo { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.svc-card__img-overlay--orange { background: linear-gradient(135deg, #ffedd5, #fed7aa); }

.svc-card__icon {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 52px;
  height: 52px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.svc-card__body { padding: 24px; }
.svc-card__title { font-size: 1.3rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.svc-card__sub { font-size: .8rem; font-weight: 600; margin-bottom: 10px; }
.svc-card__sub--violet { color: var(--violet); }
.svc-card__sub--indigo { color: var(--indigo); }
.svc-card__sub--orange { color: var(--orange); }
.svc-card__desc { font-size: .9rem; color: var(--gray-600); margin-bottom: 16px; }
.svc-card__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.svc-card__list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  color: var(--gray-700);
}

/* ============================================================
   YANDEX DETAILS
   ============================================================ */
.yd-intro {
  display: grid;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}
@media (min-width: 1024px) { .yd-intro { grid-template-columns: 1fr 1fr; } }

.yd-intro__lead {
  font-size: 1.15rem;
  color: var(--gray-600);
  margin-bottom: 12px;
}
.yd-intro__body { color: var(--gray-500); }
.yd-intro__img img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
}

.yd-features-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 32px;
}
.yd-features-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 48px;
}
@media (min-width: 640px) { .yd-features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .yd-features-grid { grid-template-columns: repeat(3, 1fr); } }

.feat-card {
  padding: 24px;
  background: linear-gradient(135deg, #f5f3ff 0%, #fff 100%);
  border: 1px solid #ede9fe;
  border-radius: var(--radius-lg);
  transition: box-shadow .3s;
}
.feat-card:hover { box-shadow: var(--shadow-lg); }
.feat-card__icon { margin-bottom: 16px; }
.feat-card h4 { font-size: 1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.feat-card p { font-size: .875rem; color: var(--gray-600); line-height: 1.6; }

.yd-cta h3 { font-size: 1.6rem; font-weight: 700; margin-bottom: 28px; }
.yd-cta__grid {
  display: grid;
  gap: 24px;
  margin-bottom: 28px;
}
@media (min-width: 768px) { .yd-cta__grid { grid-template-columns: repeat(3, 1fr); } }

.yd-cta__item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.yd-cta__item-head strong { font-size: 1.05rem; }
.yd-cta__item p { color: rgba(255,255,255,.8); font-size: .9rem; }

.yd-cta__note {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.yd-cta__note strong { display: block; margin-bottom: 8px; font-size: 1rem; }
.yd-cta__note p { color: rgba(255,255,255,.8); font-size: .9rem; }

/* ============================================================
   CASES
   ============================================================ */
.cases-list { display: flex; flex-direction: column; gap: 24px; }

.case-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .3s;
}
.case-card:hover { box-shadow: var(--shadow-xl); }

.case-card__top { height: 5px; }
.case-card__top--violet { background: linear-gradient(90deg, var(--violet), #6d28d9); }
.case-card__top--indigo { background: linear-gradient(90deg, var(--indigo), #4338ca); }
.case-card__top--orange { background: linear-gradient(90deg, var(--orange), #dc2626); }

.case-card__body {
  display: grid;
  gap: 32px;
  padding: 32px;
}
@media (min-width: 1024px) { .case-card__body { grid-template-columns: 2fr 1fr; } }

.case-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.case-card__head h3 { font-size: 1.35rem; font-weight: 700; color: var(--gray-900); }
.case-tag {
  padding: 4px 12px;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
}
.case-card__block { margin-bottom: 16px; }
.case-card__block strong { color: var(--gray-700); font-size: .9rem; display: block; margin-bottom: 4px; }
.case-card__block p { color: var(--gray-600); font-size: .95rem; }
.case-card__result { font-size: 1rem; color: var(--gray-900); font-weight: 500; }

.case-card__metrics {
  display: flex;
  gap: 12px;
}
@media (min-width: 1024px) { .case-card__metrics { flex-direction: column; } }

.metric {
  flex: 1;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
}
.metric__val { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); margin: 6px 0 4px; }
.metric__label { font-size: .78rem; color: var(--gray-500); }

.cases-footer {
  margin-top: 40px;
  text-align: center;
}
.cases-footer p {
  color: var(--gray-500);
  font-size: .875rem;
  margin-bottom: 20px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.contact-info > p {
  color: rgba(255,255,255,.82);
  margin-bottom: 32px;
  font-size: 1rem;
}

.contact-links { display: flex; flex-direction: column; gap: 20px; }
.contact-link {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.contact-link__icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-link__label {
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  margin-bottom: 2px;
}
.contact-link a,
.contact-link span {
  color: rgba(255,255,255,.9);
  font-size: .95rem;
  transition: color .2s;
}
.contact-link a:hover { color: white; }

.contact-form-wrap {
  background: var(--gray-50);
  border-radius: var(--radius-xl);
  padding: 36px;
}
.contact-form-wrap h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 24px;
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  color: var(--gray-900);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}
.form-group textarea { resize: none; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--gray-400); }

.form-note {
  margin-top: 12px;
  font-size: .78rem;
  color: var(--gray-400);
  text-align: center;
}

.form-success {
  text-align: center;
  padding: 48px 24px;
}
.form-success svg { margin: 0 auto 16px; }
.form-success h3 { font-size: 1.35rem; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.form-success p { color: var(--gray-600); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #111827;
  color: white;
  padding: 56px 0 0;
}
.footer__grid {
  display: grid;
  gap: 32px;
  margin-bottom: 40px;
}
@media (min-width: 640px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer__brand p {
  color: #6b7280;
  font-size: .875rem;
  margin-top: 14px;
  max-width: 280px;
  line-height: 1.7;
}
.footer__brand .logo { margin-bottom: 4px; }

.footer__col h4 {
  font-size: .95rem;
  font-weight: 600;
  color: white;
  margin-bottom: 16px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col li a {
  font-size: .875rem;
  color: #6b7280;
  transition: color .2s;
}
.footer__col li a:hover { color: white; }

.footer__bottom {
  border-top: 1px solid #1f2937;
  padding: 20px 0;
  text-align: center;
  color: #6b7280;
  font-size: .825rem;
}

/* ============================================================
   MOBILE NAV
   ============================================================ */
@media (max-width: 767px) {
  .nav {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    gap: 0;
  }
  .nav--open { display: flex; }
  .nav__link {
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 1rem;
  }
  .nav__link:last-child { border-bottom: none; }
  .burger { display: flex; }
  .header__right .btn--primary { display: none; }
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 640px) {
  .hero { padding: 100px 0 60px; }
  .hero__stat--bl { bottom: -16px; left: 8px; padding: 12px 16px; }
  .hero__stat--tr { top: -16px; right: 8px; padding: 12px 16px; }
  .hero__stat-val { font-size: 1.4rem; }
  .gradient-box { padding: 28px 20px; }
  .contact-form-wrap { padding: 24px; }
  .case-card__body { padding: 20px; }
  .case-card__metrics { flex-direction: row; flex-wrap: wrap; }
}

/* ============================================================
   BLOG
   ============================================================ */
.r-dir    { --c1:#7c3aed; --c2:#5b21b6; --lt:#ede9fe; --tx:#6d28d9; }
.r-tg     { --c1:#0ea5e9; --c2:#0369a1; --lt:#e0f2fe; --tx:#0369a1; }
.r-indoor { --c1:#f97316; --c2:#c2410c; --lt:#ffedd5; --tx:#c2410c; }
.r-prod   { --c1:#ec4899; --c2:#be185d; --lt:#fce7f3; --tx:#be185d; }
.r-strat  { --c1:#10b981; --c2:#047857; --lt:#d1fae5; --tx:#047857; }

.rubric {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: .75rem; font-weight: 600; color: var(--tx); background: var(--lt);
  padding: 4px 10px; border-radius: 999px;
}
.rubric::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c1); }

.posts { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.posts--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .posts--3 { grid-template-columns: 1fr; } }

.post-card {
  display: flex; flex-direction: column; background: #fff; color: inherit;
  border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: var(--shadow-xl); transform: translateY(-3px); }
.post-card__stripe { height: 5px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.post-card__img {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--gray-100);
  border-bottom: 5px solid var(--c1);
}
.post-card__img-bg {
  position: absolute; inset: -24px; background-size: cover; background-position: center;
  filter: blur(22px) saturate(1.2); transform: scale(1.1); opacity: .9;
}
.post-card__img::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.12); }
.post-card__img img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
.post-card--photo .post-card__ex { -webkit-line-clamp: 2; }
.post-card__body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .8125rem; color: var(--gray-500); }
.post-card__title { font-size: 1.125rem; font-weight: 700; line-height: 1.35; color: var(--gray-900); letter-spacing: -.01em; }
.post-card__ex {
  font-size: .9375rem; color: var(--gray-600); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card__more { margin-top: auto; padding-top: 6px; font-size: .875rem; font-weight: 600; color: var(--violet); }

.posts--feat .post-card:first-child { grid-column: 1 / -1; }
.posts--feat .post-card--photo:first-child { flex-direction: row; }
.posts--feat .post-card--photo:first-child .post-card__img { flex: 0 0 46%; aspect-ratio: auto; min-height: 300px; border-bottom: 0; border-right: 5px solid var(--c1); }
@media (max-width: 860px) {
  .posts--feat .post-card--photo:first-child { flex-direction: column; }
  .posts--feat .post-card--photo:first-child .post-card__img { flex: none; aspect-ratio: 16 / 9; min-height: 0; border-right: 0; border-bottom: 5px solid var(--c1); }
}
.posts--feat .post-card:first-child .post-card__body { padding: 32px 40px 36px; }
.posts--feat .post-card:first-child .post-card__title { font-size: 1.75rem; line-height: 1.25; }
.posts--feat .post-card:first-child .post-card__ex { -webkit-line-clamp: 4; font-size: 1.0625rem; max-width: 820px; }
@media (max-width: 640px) {
  .posts--feat .post-card:first-child .post-card__body { padding: 22px 24px 24px; }
  .posts--feat .post-card:first-child .post-card__title { font-size: 1.25rem; }
}

/* блок на главной */
.home-blog__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.home-blog__head .section-title { margin-bottom: 8px; }
.home-blog__head p { color: var(--gray-600); font-size: 1.0625rem; }

/* шапка нав: активный пункт */
.nav__link--active { color: var(--violet); }

/* лента /blog/ */
.blog-crumbs { font-size: .875rem; color: var(--gray-500); margin-bottom: 16px; }
.blog-crumbs a:hover { color: var(--violet); }
.blog-hero { padding: 120px 0 8px; }
.blog-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 12px; }
.blog-hero p { font-size: 1.125rem; color: var(--gray-600); max-width: 640px; }
.blog-hero__tg { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-weight: 600; color: var(--violet); }
.blog-hero__tg:hover { text-decoration: underline; }
.blog-list { padding-bottom: 80px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 32px 0; }
.filter {
  font-size: .875rem; font-weight: 600; padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid var(--gray-200); color: var(--gray-700); background: #fff; transition: all .15s;
}
.filter:hover { border-color: var(--gray-400); }
.filter.on { background: var(--gray-900); border-color: var(--gray-900); color: #fff; }
.filter .n { opacity: .5; margin-left: 5px; font-weight: 500; }
.pager { display: flex; justify-content: center; margin-top: 48px; }
.blog-empty { color: var(--gray-500); padding: 40px 0; }

/* страница поста */
.article-head { max-width: 800px; margin: 0 auto; padding: 120px 24px 0; }
.article-head h1 { font-size: clamp(1.875rem, 4.5vw, 2.75rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: 18px 0 16px; color: var(--gray-900); }
.article-meta { font-size: .9375rem; color: var(--gray-500); padding-bottom: 28px; border-bottom: 1px solid var(--gray-200); }
.article-head .rubric:hover { filter: brightness(.96); }
.article { max-width: 800px; margin: 0 auto; padding: 36px 24px 24px; font-size: 1.125rem; line-height: 1.75; color: var(--gray-700); }
.article p { margin-bottom: 1.15em; }
.article b { color: var(--gray-900); }
.article a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.article code { font-size: .9em; background: var(--gray-100); padding: 2px 6px; border-radius: 6px; }
.article ul, .article ol { margin: 0 0 1.3em; display: flex; flex-direction: column; gap: 10px; }
.article ul li { position: relative; padding-left: 28px; }
.article ul li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 10px; height: 10px; border-radius: 50%; background: var(--c1); }
.article ol { list-style: decimal; padding-left: 1.4em; }
.article ol li::marker { color: var(--c1); font-weight: 700; }
.article .lead-out { font-size: 1.1875rem; font-weight: 600; color: var(--gray-900); border-left: 4px solid var(--c1); padding: 4px 0 4px 20px; margin: 28px 0; }
.article .sign { font-size: .9375rem; font-style: italic; color: var(--gray-500); }
.article-media-note { font-size: .9375rem; color: var(--gray-500); }
.article-photos { display: grid; gap: 8px; margin-bottom: 28px; border-radius: var(--radius-lg); overflow: hidden; }
.article-photos img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.article-photos--1 img { height: auto; max-height: 560px; object-fit: contain; background: var(--gray-100); }
.article-photos--2 { grid-template-columns: 1fr 1fr; }
.article-photos--3 { grid-template-columns: repeat(3, 1fr); }
.article-photos--3 img:first-child { grid-column: 1 / -1; }
.article-cta { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.article-cta__box {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px 28px;
}
.article-cta__box p { font-size: .9375rem; color: var(--gray-600); }
.article-cta__box b { display: block; color: var(--gray-900); font-size: 1.0625rem; margin-bottom: 2px; }
.article-cta__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.related { padding: 64px 0 80px; }
.related h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 24px; }
@media (max-width: 640px) {
  .article { font-size: 1.0625rem; }
  .blog-hero, .article-head { padding-top: 100px; }
}
.article .article-sub { font-size: 1.25rem; font-weight: 700; color: var(--gray-900); line-height: 1.35; margin: 32px 0 12px; }

/* лайтбокс и предпросмотр */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(11,10,20,.92); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox__x { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox__x:hover { background: rgba(255,255,255,.26); }
.preview-bar { position: sticky; top: 72px; z-index: 50; background: #fef3c7; color: #92400e; border-bottom: 1px solid #fde68a; text-align: center; padding: 10px 16px; font-size: .9rem; font-weight: 500; }
.preview-bar a { color: #92400e; text-decoration: underline; }

/* ============================================================
   ЖУРНАЛ — спокойная палитра: серый + один фирменный акцент
   (цвета рубрик не используются; рубрика = хэштег)
   ============================================================ */
.rubric { background: none; padding: 0; color: var(--gray-500); font-size: .8125rem; font-weight: 500; gap: 0; }
.rubric::before { content: '#'; width: auto; height: auto; border-radius: 0; background: none; color: var(--violet); margin-right: 1px; font-weight: 600; }
.post-card__stripe { display: none; }
.post-card { box-shadow: none; }
.post-card:hover { border-color: var(--gray-400); box-shadow: 0 10px 28px -14px rgba(17,24,39,.22); transform: none; }
.post-card:hover .post-card__title { color: var(--violet); }
.post-card__img { border-bottom: 0; }
.posts--feat .post-card--photo:first-child .post-card__img { border-right: 0; }
.post-card__meta { gap: 14px; }
.post-card__title .em, .article-head h1 .em { display: none; }
.filter { font-weight: 500; }
.filter:not(:first-child)::before { content: '#'; color: var(--violet); margin-right: 1px; font-weight: 600; }
.filter.on:not(:first-child)::before { color: #c4b5fd; }
.article ul li::before { background: var(--gray-400); width: 7px; height: 7px; top: .72em; }
.article ol li::marker { color: var(--gray-500); }
.article .lead-out { border-left-color: var(--violet); }
.article-head .rubric:hover { color: var(--violet); filter: none; }
