/* autopodbor.in.ua — main stylesheet */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #5b6478;
  --line: #e2e7f1;
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --accent: #6366f1;
  --dark: #0a1128;
  --dark-2: #111b3d;
  --dark-line: rgba(148, 163, 184, .16);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -22px rgba(15, 23, 42, .35);
  --shadow-sm: 0 6px 18px -10px rgba(15, 23, 42, .25);
  --container: 1200px;
  --prose: 780px;
  --header-h: 72px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.75 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.anchor-top { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 10px;
  box-shadow: var(--shadow-sm); transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 17, 40, .88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--dark-line);
}
.site-header__inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.brand__mark { width: 36px; height: 36px; flex: none; }
.brand__text { font-family: var(--font-head); font-weight: 800; font-size: 20px; letter-spacing: -.02em; line-height: 1; }
.brand__tld { color: #7dd3fc; font-weight: 600; }

.main-nav, .footer-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px; border-radius: 999px;
  font: 600 14px/1.2 var(--font-body); color: #e2e8f0; text-decoration: none;
  border: 1px solid rgba(148, 163, 184, .28); background: rgba(255, 255, 255, .04);
  transition: background .2s, border-color .2s, color .2s, transform .2s;
  white-space: nowrap;
}
.nav-btn:hover { color: #fff; background: rgba(99, 102, 241, .25); border-color: rgba(129, 140, 248, .7); transform: translateY(-1px); }

.lang-switch {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(148, 163, 184, .25);
}
.lang-switch a {
  min-width: 44px; padding: 6px 10px; border-radius: 999px; text-align: center;
  font: 700 13px/1.2 var(--font-body); letter-spacing: .04em; color: #cbd5e1; text-decoration: none;
  transition: background .2s, color .2s;
}
.lang-switch a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.lang-switch a.is-active { color: #0a1128; background: linear-gradient(135deg, #67e8f9, #a5b4fc); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(99, 102, 241, .45), transparent 60%),
    radial-gradient(700px 380px at 5% 110%, rgba(6, 182, 212, .32), transparent 60%),
    linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
  padding: 64px 0 150px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.hero__inner { position: relative; max-width: calc(var(--prose) + 48px); }
.hero__kicker {
  display: inline-block; margin-bottom: 18px; padding: 6px 12px; border-radius: 999px;
  font: 700 12px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  color: #a5f3fc; background: rgba(34, 211, 238, .12); border: 1px solid rgba(34, 211, 238, .35);
}
.hero h1 {
  margin: 0 0 22px; font: 800 clamp(30px, 4.6vw, 50px)/1.12 var(--font-head); letter-spacing: -.025em;
  text-wrap: balance;
}
.page-article .hero h1 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.18; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: #cbd5e1; font-size: 15px; }
.meta-item { display: inline-flex; align-items: center; gap: 8px; }
.meta-item svg, .contacts svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: 14px; color: #94a3b8; }
.breadcrumbs a { color: #cbd5e1; text-decoration: none; }
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }

/* ---------- Article ---------- */
.post {
  position: relative; z-index: 2;
  max-width: calc(var(--prose) + 112px); margin: -110px auto 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow); padding: 48px 56px 56px;
}
.prose { max-width: var(--prose); margin: 0 auto; color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.25em; }
.prose h2 {
  margin: 2.1em 0 .7em; font: 800 clamp(24px, 2.6vw, 30px)/1.25 var(--font-head);
  letter-spacing: -.02em; color: var(--ink);
}
.prose h3 { margin: 1.7em 0 .5em; font: 700 21px/1.35 var(--font-head); color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1.4em; padding: 0; list-style: none; }
.prose li { position: relative; padding-left: 34px; margin-bottom: .75em; }
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: .45em; width: 18px; height: 18px; border-radius: 6px;
  background: linear-gradient(135deg, var(--brand-2), var(--accent));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 11-11-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 11-11-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.prose ol { counter-reset: step; }
.prose ol li { counter-increment: step; }
.prose ol li::before {
  content: counter(step); position: absolute; left: 0; top: .2em;
  width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  font: 700 13px/1 var(--font-body); color: #fff; background: linear-gradient(135deg, var(--brand), var(--accent));
}
.prose strong { color: var(--ink); }

.prose blockquote {
  position: relative; margin: 2em 0; padding: 26px 30px 26px 34px;
  border-radius: var(--radius); color: var(--ink);
  background: linear-gradient(135deg, rgba(37, 99, 235, .07), rgba(6, 182, 212, .07));
  border: 1px solid rgba(37, 99, 235, .18);
  font: 600 19px/1.6 var(--font-head);
}
.prose blockquote::before {
  content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--brand-2), var(--accent));
}
.prose blockquote p { margin: 0; }

.callout {
  margin: 1.8em 0; padding: 22px 26px; border-radius: var(--radius);
  background: #f8fafc; border: 1px solid var(--line);
}
.callout > :last-child { margin-bottom: 0; }
.callout__title { display: block; margin-bottom: 6px; font: 700 16px/1.4 var(--font-head); color: var(--ink); }

.table-wrap { margin: 1.8em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; min-width: 560px; }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: #f1f5fb; font-weight: 700; color: var(--ink); }
.prose tr:last-child td { border-bottom: 0; }

/* ---------- Image frames ---------- */
.frame {
  margin: 2.2em 0; padding: 10px;
  background: linear-gradient(135deg, #e8eefc, #eef9fc);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.prose > .frame:first-child { margin-top: 0; }
.frame__media {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: calc(var(--radius) - 8px); background: var(--dark);
  display: flex; align-items: center; justify-content: center;
}
.frame__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center center;
}
.frame figcaption { padding: 10px 6px 2px; font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }

/* ---------- FAQ ---------- */
.faq { margin-top: 2.6em; }
.faq__item {
  margin-bottom: 14px; padding: 20px 24px; border-radius: var(--radius-sm);
  background: #f8fafc; border: 1px solid var(--line);
}
.faq__item h3 { margin: 0 0 .4em; font-size: 18px; }
.faq__item p { margin: 0; }

/* ---------- Related cards ---------- */
.related { padding: 88px 0 96px; }
.section-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.section-head h2 { margin: 0 0 10px; font: 800 clamp(26px, 3vw, 36px)/1.2 var(--font-head); letter-spacing: -.02em; }
.section-head p { margin: 0; color: var(--muted); }

.cards { display: grid; gap: 24px; }
.cards--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #c7d2fe; }
.card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card__link:hover { color: inherit; }
.frame--card { margin: 0; padding: 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.frame--card .frame__media { border-radius: 12px; }
.frame--card img { transition: transform .5s; }
.card:hover .frame--card img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 22px; }
.card__date { font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: .02em; }
.card__title { margin: 8px 0 10px; font: 700 17px/1.4 var(--font-head); color: var(--ink); }
.card__excerpt { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.card__more { margin-top: auto; font-size: 14px; font-weight: 700; color: var(--brand); }
.card:hover .card__more { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  color: #cbd5e1;
  background:
    radial-gradient(700px 300px at 90% 0%, rgba(99, 102, 241, .22), transparent 60%),
    var(--dark);
  border-top: 1px solid var(--dark-line);
}
.site-footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1.2fr .9fr; gap: 40px;
  padding-top: 64px; padding-bottom: 48px;
}
.site-footer__about p { margin: 0; font-size: 15px; line-height: 1.75; max-width: 440px; }
.site-footer__about .brand { margin-bottom: 20px; }
.site-footer__title {
  margin: 0 0 16px; font: 700 13px/1.3 var(--font-body); text-transform: uppercase; letter-spacing: .12em; color: #94a3b8;
}
.site-footer__about .site-footer__title { margin-top: 4px; }
.footer-nav { flex-direction: column; align-items: flex-start; }
.contacts { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.contacts li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; line-height: 1.5; }
.contacts svg { margin-top: 2px; color: #67e8f9; }
.contacts a { color: #e2e8f0; text-decoration: none; word-break: break-all; }
.contacts a:hover { color: #67e8f9; text-decoration: underline; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 22px; padding-bottom: 28px; font-size: 13px; color: #94a3b8;
  border-top: 1px solid var(--dark-line);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cards--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 112px; }
  .site-header__inner { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .main-nav { order: 3; width: 100%; flex-wrap: nowrap; }
  .main-nav .nav-btn { flex: 1 1 0; padding: 8px 10px; font-size: 13px; }
  .cards--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post { padding: 36px 32px 40px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 110px; }
  .post { margin-top: -80px; padding: 24px 18px 30px; border-radius: 22px; }
  .prose blockquote { padding: 20px 20px 20px 24px; font-size: 17px; }
  .frame { padding: 6px; border-radius: 16px; }
  .frame__media { border-radius: 11px; }
  .cards--four, .cards--three { grid-template-columns: 1fr; }
  .related { padding: 64px 0 72px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }
  .brand__text { font-size: 18px; }
  .lang-switch a { min-width: 38px; padding: 6px 8px; }
  .main-nav .nav-btn { font-size: 12.5px; padding: 8px 6px; white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
