/*
Theme Name: Импульс
Theme URI: https://impulse.ua
Author: pbn
Description: Чистая карточная сетка — современный минимал, холодный светлый фон, индиго акцент.
Version: 2.0
Text Domain: avto-bento
*/
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap&subset=cyrillic,latin');

/* ===== TOKENS ===== */
:root {
  --bg:       #f7f8fb;
  --surface:  #ffffff;
  --surface2: #eef0f7;
  --ink:      #141726;
  --muted:    #6b7280;
  --accent:   #4f46e5;
  --accent-d: #3730a3;
  --accent-t: rgba(79,70,229,.1);
  --line:     #e2e4ed;

  --head: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;

  --maxw: 1140px;
  --r:    10px;
  --tr:   .22s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--accent-d); }
ul, ol { list-style: none; }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute; left: -999px; top: 6px; z-index: 9999;
  background: var(--accent); color: #fff; padding: 8px 16px;
  font-family: var(--body); font-size: .8rem; border-radius: 4px;
}
.skip-link:focus { left: 8px; }

/* ===== LAYOUT ===== */
.site-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; gap: 24px;
}

/* Logo */
.site-logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; text-decoration: none; color: var(--ink);
}
.site-logo:hover { color: var(--ink); }
.site-logo .logo-mark { display: flex; align-items: center; }
.site-logo .logo-mark svg { display: block; }
.site-logo .logo-word {
  font-family: var(--head);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1;
}

/* Primary nav */
.site-nav {
  display: flex; align-items: center; justify-content: flex-end;
  flex-wrap: wrap; gap: 2px 6px;
  margin-left: auto;
}
.site-nav a {
  font-family: var(--body);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 6px;
  transition: color var(--tr), background var(--tr);
}
.site-nav a:hover { color: var(--ink); background: var(--surface2); }

/* ===== HERO (featured article) ===== */
.hero-section {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px;
}

/* ===== INTRO MANIFESTO ===== */
.intro {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 52px;
}
.intro__inner {
  max-width: 62ch;
}
.intro__rule {
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 22px;
}
.intro__title {
  font-family: var(--head);
  font-size: clamp(1.75rem, 1rem + 2.6vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 16px;
}
.intro__desc {
  font-family: var(--body);
  font-size: 1.3rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 52ch;
}

@media (max-width: 640px) {
  .intro { padding: 36px 0 32px; }
  .intro__rule { margin-bottom: 16px; }
  .intro__desc { font-size: 1.1rem; }
}

.hero-card {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.hero-media {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface2);
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.hero-card:hover .hero-media img { transform: scale(1.03); }
.hero-body {
  padding: 36px 40px 40px;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-chip {
  display: inline-flex; align-items: center;
  font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent);
  background: var(--accent-t);
  padding: 5px 12px; border-radius: 20px;
  margin-bottom: 18px;
  align-self: flex-start;
  transition: background var(--tr), color var(--tr);
}
.hero-chip:hover { background: var(--accent); color: #fff; }
.hero-body h2 {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.2rem);
  line-height: 1.18;
  letter-spacing: -.02em;
  margin-bottom: 14px;
  color: var(--ink);
}
.hero-body h2 a { color: var(--ink); }
.hero-body h2 a:hover { color: var(--accent); }
.hero-lead {
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.65;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; color: var(--muted);
}
.hero-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; opacity: .5;
}

/* ===== SECTION LABEL ===== */
.section-label {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
}
.section-label__text {
  font-family: var(--head);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
}
.section-label__line { flex: 1; height: 1px; background: var(--line); }
.section-label__link {
  font-size: .78rem; font-weight: 600;
  letter-spacing: .04em; color: var(--accent);
  white-space: nowrap;
}
.section-label__link:hover { color: var(--accent-d); }

/* ===== CARD GRID ===== */
.latest-section { padding: 56px 0 0; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--tr), transform var(--tr);
}
.card:hover {
  box-shadow: 0 8px 32px rgba(20,23,38,.08);
  transform: translateY(-2px);
}
.card-thumb {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface2);
  flex-shrink: 0;
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .55s ease;
}
.card:hover .card-thumb img { transform: scale(1.05); }
.card-body {
  padding: 20px 22px 24px;
  display: flex; flex-direction: column; flex: 1;
}
.card-chip {
  display: inline-flex; align-items: center;
  font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent);
  background: var(--accent-t);
  padding: 3px 9px; border-radius: 20px;
  margin-bottom: 10px;
  align-self: flex-start;
  transition: background var(--tr), color var(--tr);
}
.card-chip:hover { background: var(--accent); color: #fff; }
.card-body h3 {
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.28;
  letter-spacing: -.01em;
  margin-bottom: 9px;
  color: var(--ink);
}
.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--accent); }
.card-excerpt {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: .77rem; color: var(--muted);
  margin-top: auto;
}
.card-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; opacity: .5;
}

/* ===== CATEGORY SECTIONS ===== */
.cat-section { padding: 56px 0 0; }
.cat-section--last { padding-bottom: 72px; }

/* ===== ARCHIVE ===== */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 52px 24px 40px;
  text-align: center;
}
.arch-kicker {
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .2em;
  color: var(--accent); margin-bottom: 12px; display: block;
}
.page-header h1 {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(1.8rem, 1rem + 2.5vw, 3rem);
  letter-spacing: -.02em; line-height: 1.12;
  color: var(--ink); margin-bottom: 10px;
}
.page-header .arch-desc { color: var(--muted); font-size: .92rem; }
.arch-grid-wrap { padding: 48px 0 64px; }
.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.pager { text-align: center; padding: 8px 0 64px; }
.pager .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px;
  font-size: .875rem; font-weight: 500;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line);
  margin: 0 3px; transition: all var(--tr);
}
.pager .page-numbers:hover,
.pager .page-numbers.current {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.pager .page-numbers.dots {
  border: none; background: none;
}

/* ===== SINGLE POST ===== */
.post-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.post-header__inner {
  max-width: 760px; margin: 0 auto;
  padding: 52px 24px 40px;
}
.post-chip {
  display: inline-flex; align-items: center;
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent); background: var(--accent-t);
  padding: 5px 12px; border-radius: 20px;
  margin-bottom: 20px;
  transition: background var(--tr), color var(--tr);
}
.post-chip:hover { background: var(--accent); color: #fff; }
.post-header h1 {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(1.85rem, 1rem + 2.8vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -.025em;
  color: var(--ink);
  margin-bottom: 24px;
}
.post-byline {
  display: flex; align-items: center; gap: 12px;
  font-size: .84rem; color: var(--muted);
}
.post-byline b { color: var(--ink); font-weight: 600; }
.post-byline .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.post-byline .av { border-radius: 50%; overflow: hidden; flex-shrink: 0; }

/* Featured image (after header) */
.post-featured {
  max-width: 960px; margin: 0 auto;
  padding: 36px 24px 0;
}
.post-featured img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--r);
}

/* Prose */
.prose {
  max-width: 700px; margin: 44px auto 64px;
  padding: 0 24px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink);
}
.prose p { margin-bottom: 1.4em; }
.prose h2 {
  font-family: var(--head);
  font-weight: 700; font-size: 1.5rem;
  letter-spacing: -.015em; line-height: 1.2;
  margin: 2.2em 0 .6em; color: var(--ink);
}
.prose h3 {
  font-family: var(--head);
  font-weight: 600; font-size: 1.18rem;
  margin: 1.8em 0 .5em; color: var(--ink);
}
.prose a { color: var(--accent); border-bottom: 1px solid rgba(79,70,229,.3); }
.prose a:hover { color: var(--accent-d); }
.prose blockquote {
  margin: 1.8em 0; padding: 20px 26px;
  border-left: 4px solid var(--accent);
  background: var(--accent-t);
  border-radius: 0 8px 8px 0;
  font-size: 1.08rem; line-height: 1.6;
}
.prose ul { list-style: disc; padding-left: 1.5em; margin-bottom: 1.4em; }
.prose ol { list-style: decimal; padding-left: 1.5em; margin-bottom: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose figure { margin: 2em 0; }
.prose figure img { border-radius: 8px; width: 100%; }
.prose figure figcaption {
  font-size: .82rem; color: var(--muted);
  text-align: center; margin-top: 8px;
}
.prose img { border-radius: 8px; }

/* Related posts */
.related {
  max-width: var(--maxw); margin: 0 auto 72px;
  padding: 40px 24px 0;
  border-top: 1px solid var(--line);
}
.related-title {
  font-family: var(--head);
  font-weight: 700; font-size: 1.25rem;
  letter-spacing: -.01em; margin-bottom: 26px;
  color: var(--ink);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* gap between last section and footer */
#content { padding-bottom: 64px; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.6);
  margin-top: auto;
}
.site-footer__top {
  max-width: var(--maxw); margin: 0 auto;
  padding: 52px 24px 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 40px;
}
.f-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.f-brand .logo-mark svg { display: block; }
.f-brand .logo-word {
  font-family: var(--head);
  font-size: 1.1rem; font-weight: 700;
  color: #fff; letter-spacing: -.01em;
}
.f-tagline {
  font-size: .86rem; color: rgba(255,255,255,.45);
  max-width: 38ch; line-height: 1.6;
}
.f-nav-col {
  display: flex; flex-direction: column;
  gap: 10px; align-items: flex-end;
}
.f-nav-col a {
  font-size: .82rem; font-weight: 500;
  color: rgba(255,255,255,.52);
  transition: color var(--tr);
}
.f-nav-col a:hover { color: #fff; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center; padding: 16px 24px;
  font-size: .77rem; color: rgba(255,255,255,.35);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16/9; }
  .hero-body { padding: 28px 28px 32px; }
}
@media (max-width: 900px) {
  .card-grid, .arch-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer__top { grid-template-columns: 1fr; gap: 24px; }
  .f-nav-col { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }
}
@media (max-width: 640px) {
  .site-header__inner { gap: 10px; }
  .site-nav a { padding: 6px 9px; font-size: .75rem; }
  .hero-body { padding: 22px 20px 28px; }
  .card-grid, .arch-grid, .related-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 28px 16px; }
  .latest-section, .cat-section { padding-top: 36px; }
  .wrap { padding: 0 16px; }
  .page-header { padding: 36px 16px 28px; }
  .post-featured { padding: 24px 16px 0; }
  .prose { margin-top: 32px; }
}

/* ===== HEADER LAYOUT HARD-FIX ===== */
.skip-link{display:none!important}
.site-header__inner{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:16px 24px!important;min-height:64px!important;height:auto!important;padding:12px 24px!important}
.site-logo{display:inline-flex!important;align-items:center!important;gap:10px!important;flex:0 0 auto!important}
.site-logo .logo-word{color:#141726!important;font-family:'Space Grotesk',sans-serif!important;font-weight:700!important;font-size:1.2rem!important;line-height:1!important}
.site-logo .logo-mark svg{width:34px!important;height:34px!important;display:block!important}
.site-nav{display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-end!important;gap:2px 6px!important;margin-left:auto!important;overflow:visible!important}
.site-nav a{padding:8px 12px!important;color:#5a5f78!important;white-space:nowrap!important;text-transform:uppercase!important;letter-spacing:.06em!important;font-size:.75rem!important}
.site-nav a:hover{color:#4f46e5!important;background:#eef0f7!important}
