/* ДжетМайндс — SEO-сайт. Токены и паттерны: см. design.md */

@font-face { font-family:'Onest'; font-style:normal; font-weight:100 900; font-display:swap; src:url('fonts/onest-cyrillic.woff2') format('woff2'); unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family:'Onest'; font-style:normal; font-weight:100 900; font-display:swap; src:url('fonts/onest-latin-ext.woff2') format('woff2'); unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family:'Onest'; font-style:normal; font-weight:100 900; font-display:swap; src:url('fonts/onest-latin.woff2') format('woff2'); unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #211044;
  --violet: #5f31aa;
  --blue: #2333c8;
  --blue-hover: #1d2ba8;
  --muted: #6d6480;  /* 5.0:1 на tint — WCAG AA; исходный тильдовский #7a708f не дотягивал */
  --bg: #ffffff;
  --tint: #f1f3f9;
  --lavender: #e5e7fc;
  --line: #ededed;
  --dark: #171b1c;
  --shadow: 0 10px 30px rgba(33,16,68,.08);
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: 'Onest', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; display: block; }
a { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

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

h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
.accent { color: var(--violet); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--blue); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 500;
  padding: 17px 32px; border-radius: 100px; border: 0;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s ease;
}
.btn:hover { background: var(--blue-hover); }
.btn::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; flex: none; }
.btn.light { background: #fff; color: var(--blue); }
.btn.light:hover { background: var(--tint); }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 50; padding: 12px 0; background: var(--tint); }
.top-in {
  max-width: 1060px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  background: #fff; border-radius: 100px; box-shadow: var(--shadow);
  padding: 10px 12px 10px 26px;
}
@media (min-width: 1249px) { .top { padding-left: 24px; padding-right: 24px; } }
@media (max-width: 1248px) { .top-in { margin: 0 24px; } }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.logo img { height: 33px; width: auto; }
.logo small { font-size: 11.5px; line-height: 1.3; color: var(--ink); max-width: 140px; }
.top-nav { display: flex; gap: 24px; margin: 0 auto; font-size: 15px; }
.top-nav a { color: var(--ink); text-decoration: none; }
.top-nav a:hover { color: var(--blue); }
.top-phone { text-align: right; font-size: 14px; font-weight: 500; line-height: 1.3; flex: none; }
.top-in .btn { padding: 15px 28px; font-size: 15px; }
.top-phone a { color: var(--ink); text-decoration: none; }
.top-phone small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
@media (max-width: 980px) { .top-nav, .top-phone { display: none; } .top-in { justify-content: space-between; } }
.btn .btn-short { display: none; }
@media (max-width: 640px) {
  .top { padding: 10px 0; }
  .top-in { gap: 10px; padding: 8px 8px 8px 16px; margin: 0 12px; }
  .logo { gap: 9px; }
  .logo small { font-size: 10px; line-height: 1.25; max-width: 96px; }
  .top-in .btn { padding: 12px 20px; font-size: 14px; }
  .top-in .btn .btn-full { display: none; }
  .top-in .btn .btn-short { display: inline; }
}
@media (max-width: 374px) {
  .logo small { max-width: 80px; font-size: 9.5px; }
  .top-in { gap: 8px; padding-left: 12px; }
  .top-in .btn { padding: 11px 16px; font-size: 13px; gap: 8px; }
}

/* ---------- герой главной ---------- */
.hero { background: var(--tint); padding: 56px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.4vw, 46px); margin: 0 0 24px; }
.hero .sub { font-size: 18px; max-width: 46ch; margin: 0 0 36px; }
.hero-cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-note { font-size: 15px; color: var(--muted); max-width: 24ch; line-height: 1.45; }
.hero-note b { color: var(--ink); font-weight: 500; }

.polaroids { position: relative; height: 440px; }
.polaroid {
  position: absolute; background: #fff; padding: 12px 12px 14px; border-radius: 12px;
  box-shadow: 0 18px 40px rgba(33,16,68,.14);
}
.polaroid img { border-radius: 6px; width: 100%; height: 100%; object-fit: cover; }
.polaroid.p1 { width: 62%; height: 82%; left: 0; top: 4%; transform: rotate(-5deg); z-index: 2; }
.polaroid.p2 { width: 56%; height: 74%; right: 0; bottom: 0; transform: rotate(4deg); z-index: 3; }
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .polaroids { display: none; }
}

/* ---------- статистика ---------- */
.stats { background: var(--tint); padding: 0 0 64px; }
.stats .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { background: #fff; border-radius: 15px; padding: 26px 28px; display: grid; gap: 8px; align-content: start; }
.stat b { font-size: 21px; font-weight: 600; color: var(--blue); line-height: 1.25; }
.stat span { font-size: 15px; line-height: 1.5; color: var(--muted); }
@media (max-width: 900px) { .stats .wrap { grid-template-columns: 1fr; } }

/* ---------- секции ---------- */
.section { padding: 80px 0; }
.section.tinted { background: var(--tint); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 34px); }
.section-head p { color: var(--muted); margin: 16px 0 0; max-width: 52ch; margin-left: auto; margin-right: auto; }

/* ---------- каталог стран (аккордеон) ---------- */
.country-acc { border: 1px solid var(--line); border-radius: 15px; background: #fff; scroll-margin-top: 84px; }
.country-acc + .country-acc { margin-top: 14px; }
.country-acc summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px; font-size: 21px; font-weight: 600; letter-spacing: -0.01em;
  border-radius: 15px; transition: color .15s ease;
}
.country-acc summary::-webkit-details-marker { display: none; }
.country-acc summary:hover { color: var(--blue); }
.country-acc .chev { color: var(--muted); transition: transform .2s ease; flex: none; }
.country-acc[open] .chev { transform: rotate(180deg); color: var(--blue); }
.country-acc[open] { box-shadow: var(--shadow); border-color: transparent; }
.country-acc .country-block { padding: 0 20px 20px; }

.country-block { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 900px) {
  .country-block { grid-template-columns: 1fr; }
  /* карточки уже фото страны — читаются отдельным списком статей, а не продолжением блока */
  .country-block .article-cards { margin: 0 14px; }
}

.country-photo {
  position: relative; border-radius: 20px; overflow: hidden; min-height: 220px; height: 100%;
}
.country-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.country-photo b {
  position: absolute; left: 16px; bottom: 16px; background: #fff; color: var(--ink);
  font-size: 16px; font-weight: 500; padding: 10px 20px; border-radius: 100px;
}
.country-photo.noimg { background: var(--lavender); }
.country-photo.noimg::before {
  content: ''; position: absolute; inset: 0;
  background: url('img/c4.jpg') center/cover; opacity: .12;
}

.article-cards { display: grid; gap: 14px; }
.acard {
  background: var(--tint); border-radius: 15px;
  padding: 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px;
  align-items: center; text-decoration: none; color: var(--ink);
  transition: box-shadow .15s ease, transform .15s ease;
}
a.acard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.acard h3 { font-size: 19px; margin: 0 0 6px; }
.acard p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; max-width: 62ch; }
.chip {
  font-size: 13px; font-weight: 500; padding: 9px 18px; border-radius: 100px; white-space: nowrap;
}
.chip.read { background: var(--blue); color: #fff; }
.chip.soon { background: var(--lavender); color: var(--violet); }
.acard.soon h3 { font-weight: 500; color: #574b73; }
.acard.soon p { color: var(--muted); }
@media (max-width: 600px) {
  .acard { grid-template-columns: 1fr; gap: 14px; padding: 20px 22px; }
  .acard .chip { justify-self: start; }
}

/* ---------- экспертный блок ---------- */
.expert { max-width: 720px; margin: 0 auto; text-align: center; }
.expert h2 { font-size: clamp(28px, 3.4vw, 34px); margin-bottom: 24px; }
.expert p { margin: 0 0 18px; font-size: 18px; }
.expert .note { color: var(--muted); font-size: 16px; max-width: 58ch; margin-left: auto; margin-right: auto; }
.expert-link {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 10px;
  color: var(--blue); font-size: 17px; font-weight: 500; text-decoration: none;
}
.expert-link:hover { color: var(--blue-hover); }
.expert-link svg { transition: transform .15s ease; }
.expert-link:hover svg { transform: translateY(3px); }

/* ---------- CTA-баннер ---------- */
.cta-banner {
  border-radius: 30px; padding: 56px 56px; color: #fff;
  background: var(--blue) url('img/c4.jpg') center/cover;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center;
}
.cta-banner h2 { font-size: clamp(26px, 3vw, 32px); margin-bottom: 12px; }
.cta-banner > p { margin: 0; max-width: 46ch; font-size: 20px; line-height: 1.55; font-weight: 500; }
@media (max-width: 900px) { .cta-banner { grid-template-columns: 1fr; padding: 40px 32px; } }

/* ---------- футер ---------- */
.foot { background: var(--dark); color: #fff; padding: 56px 0 36px; margin-top: 80px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 1fr auto; gap: 40px; align-items: start; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }
.foot .fmark { font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.foot .fdesc { font-size: 14px; color: rgba(255,255,255,.65); max-width: 30ch; line-height: 1.55; }
.foot .fh { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.5); margin: 0 0 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px; color: rgba(255,255,255,.5);
  display: flex; flex-wrap: wrap; gap: 8px 32px;
}

/* ---------- страница статьи ---------- */
.article-hero { background: var(--tint); padding: 40px 0 48px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.article-hero h1 { font-size: clamp(30px, 4vw, 42px); max-width: 22ch; margin-bottom: 20px; color: var(--blue); }
.byline { display: flex; flex-wrap: wrap; gap: 10px; }
.byline span { background: #fff; border-radius: 100px; padding: 8px 18px; font-size: 13.5px; color: var(--muted); }
.byline b { color: var(--ink); font-weight: 500; }

.article-layout {
  display: grid; grid-template-columns: minmax(0, 720px) 300px;
  gap: 64px; padding: 56px 0 0; justify-content: center; align-items: start;
}
@media (max-width: 1080px) { .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; } }

.toc { position: sticky; top: 96px; background: var(--tint); border-radius: 15px; padding: 26px 28px; }
@media (max-width: 1080px) { .toc { display: none; } }
.toc .th { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 16px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: toc; }
.toc a { display: block; font-size: 14.5px; line-height: 1.45; color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--blue); }
.toc a.active { color: var(--blue); font-weight: 500; }
.toc .toc-cta { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(33,16,68,.1); }
.toc .toc-cta a { color: var(--blue); font-weight: 500; font-size: 14.5px; text-decoration: none; }

.prose { font-size: 17px; }
.prose > p:first-child { font-size: 19px; color: var(--muted); }
.prose h2 {
  font-size: clamp(22px, 2.6vw, 26px); margin: 48px 0 18px; scroll-margin-top: 96px;
  color: var(--blue);
}
.prose h3 { color: var(--blue); margin: 32px 0 14px; font-size: 20px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin-bottom: 10px; }
.prose li::marker { color: var(--violet); }
.prose strong { font-weight: 600; }
.prose a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* таблицы: на узком экране скроллятся внутри себя, страницу не распирают */
.prose table { width: 100%; max-width: 100%; display: block; overflow-x: auto; border-collapse: collapse; margin: 0 0 20px; font-size: 15.5px; line-height: 1.55; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 500; white-space: nowrap; }

.article-cta { margin: 56px 0 0; }
.article-cta .cta-banner { grid-template-columns: 1fr; gap: 24px; padding: 44px 44px; }
.article-cta ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.article-cta li { position: relative; padding-left: 20px; }
.article-cta li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }

.related { padding: 72px 0 0; max-width: 1084px; margin: 0 auto; }
.related h2 { font-size: 26px; margin-bottom: 24px; }

/* ---------- мобильный ритм (≤640px) ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  .hero { padding: 40px 0 48px; }
  .hero .wrap { gap: 36px; }
  .hero h1 { font-size: 30px; margin-bottom: 18px; }
  .hero .sub { font-size: 16px; color: var(--muted); margin-bottom: 28px; }
  /* полароиды возвращаются компактной связкой — дают герою структуру */
  .polaroids { display: block; height: 230px; }
  .polaroid.p1 { width: 60%; height: 86%; }
  .polaroid.p2 { width: 55%; height: 74%; }
  .stats { padding-bottom: 48px; }
  .country-acc summary { padding: 18px 20px; font-size: 18px; }
  .country-acc .country-block { padding: 0 12px 12px; }
  .country-photo { min-height: 180px; }
  .country-photo b { display: none; } /* страну уже называет заголовок аккордеона */
  .expert p { font-size: 17px; }
  .cta-banner { padding: 32px 22px; border-radius: 20px; }
  .cta-banner > p { font-size: 18px; }
  .article-hero { padding: 28px 0 36px; }
  .article-layout { padding-top: 36px; }
  .article-cta .cta-banner { padding: 32px 22px; }
  .related { padding-top: 56px; }
  .foot { margin-top: 56px; padding: 44px 0 28px; }
}

/* --- служебные страницы (404, политика) --- */
.doc{max-width:62ch;margin:0 auto;overflow-wrap:break-word}
.doc h1{font-size:clamp(1.45rem,6.5vw,2rem);font-weight:500;color:#2333c8;margin:0 0 .6em;line-height:1.2;hyphens:auto}
.doc h2{font-size:1.25rem;font-weight:500;color:#211044;margin:1.6em 0 .5em}
.doc p{color:#211044;line-height:1.7;margin:0 0 1em}
.doc a{color:#2333c8}
.doc .doc-date{color:#6d6480;font-size:.95rem;margin-top:-.4em}
.doc .btn{margin-top:.6em}
