/* /ru/ only — Bebas Neue (the site's display face) has no Cyrillic glyphs, so Russian
   ALL-CAPS headings and chart labels would fall back to a wide generic sans-serif.
   This face carries the SAME family name and only the Cyrillic range: browsers take
   Latin glyphs from Google's Bebas Neue and Cyrillic glyphs from this condensed
   Oswald 500 (OFL, self-hosted), so every existing rule and inline SVG style keeps
   working unchanged. */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/oswald-500-cyrillic.woff2') format('woff2');
  /* Google Fonts' "cyrillic" subset: the whole Russian alphabet incl. Ё/ё, plus №. */
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Same trick for the italic accent face: Instrument Serif has no Cyrillic either, so Russian
   italics used to fall back to whatever serif the device had (Times New Roman, Noto Serif...).
   Cormorant Garamond Italic (OFL, self-hosted, variable weight 300-700) is the closest narrow
   display italic with Russian letters. Latin text keeps coming from Google's Instrument Serif. */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-italic-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Bebas Neue is a capitals-only face: English text set in it always shows as caps. Oswald has
   lowercase, so Russian text in the same slots is uppercased to keep the look. */
html[lang="ru"] .art-prose h2,
html[lang="ru"] .art-prose ol li::before,
html[lang="ru"] .art-toc a::before,
html[lang="ru"] .age-card h4,
html[lang="ru"] .art-inline-cta h4,
html[lang="ru"] .references h2,
html[lang="ru"] .references li::before,
html[lang="ru"] .ex-section-title,
html[lang="ru"] .display,
html[lang="ru"] .nav-logo,
html[lang="ru"] .mobile-menu a,
html[lang="ru"] .hero-stat-num,
html[lang="ru"] .sec-title,
html[lang="ru"] .about-name,
html[lang="ru"] .method-card h3,
html[lang="ru"] .prog-name,
html[lang="ru"] .prog-price,
html[lang="ru"] .tier-age,
html[lang="ru"] .tier-headline,
html[lang="ru"] .tier-price-old,
html[lang="ru"] .tier-price,
html[lang="ru"] .app-price-block .num,
html[lang="ru"] .result-num,
html[lang="ru"] .testi-avatar,
html[lang="ru"] .final h2,
html[lang="ru"] .marquee-seq,
html[lang="ru"] .trial-h,
html[lang="ru"] .trial-facts b,
html[lang="ru"] .cmp th,
html[lang="ru"] .brand-mark,
html[lang="ru"] .q-title,
html[lang="ru"] .ok-title,
html[lang="ru"] .gift-cover.is-badge,
html[lang="ru"] .gift-name,
html[lang="ru"] .app-name,
html[lang="ru"] .hero-h1,
html[lang="ru"] .showcase-title,
html[lang="ru"] .offer-was,
html[lang="ru"] .offer-now,
html[lang="ru"] .offer-badge b,
html[lang="ru"] .oc-num,
html[lang="ru"] .oc-colon,
html[lang="ru"] .stat-num,
html[lang="ru"] .inside-card h3,
html[lang="ru"] .jb-weeks,
html[lang="ru"] .jb h3,
html[lang="ru"] .ms-wk,
html[lang="ru"] .rday h3,
html[lang="ru"] .skill-n,
html[lang="ru"] .skill h3,
html[lang="ru"] .tcard-avatar,
html[lang="ru"] .rule-n,
html[lang="ru"] .fp-was,
html[lang="ru"] .fp-now,
html[lang="ru"] .footer-brand,
html[lang="ru"] .buybar-price b,
html[lang="ru"] .peek .bg-num,
html[lang="ru"] .peek .ex-idx,
html[lang="ru"] .tl-node b,
html[lang="ru"] .fw-title {
  text-transform: uppercase;
}
/* The italic accent words inside those headings (lowercase Instrument Serif in English) must not
   inherit the capitals. In headings the Cyrillic italic is drawn semi-bold so it holds its own
   next to Oswald; that setting only affects the variable Cormorant file. */
html[lang="ru"] :is(
  .art-prose h2,
  .age-card h4,
  .art-inline-cta h4,
  .references h2,
  .ex-section-title,
  .display,
  .nav-logo,
  .mobile-menu a,
  .hero-stat-num,
  .sec-title,
  .about-name,
  .method-card h3,
  .prog-name,
  .prog-price,
  .tier-age,
  .tier-headline,
  .tier-price-old,
  .tier-price,
  .app-price-block .num,
  .result-num,
  .testi-avatar,
  .final h2,
  .marquee-seq,
  .trial-h,
  .trial-facts b,
  .cmp th,
  .brand-mark,
  .q-title,
  .ok-title,
  .gift-cover.is-badge,
  .gift-name,
  .app-name,
  .hero-h1,
  .showcase-title,
  .offer-was,
  .offer-now,
  .offer-badge b,
  .oc-num,
  .oc-colon,
  .stat-num,
  .inside-card h3,
  .jb-weeks,
  .jb h3,
  .ms-wk,
  .rday h3,
  .skill-n,
  .skill h3,
  .tcard-avatar,
  .rule-n,
  .fp-was,
  .fp-now,
  .footer-brand,
  .buybar-price b,
  .peek .bg-num,
  .peek .ex-idx,
  .tl-node b,
  .fw-title
) :is(em, .serif) {
  text-transform: none;
  font-variation-settings: 'wght' 600;
}


/* Russian words are longer than the English ones these slots were sized for. Where a single
   word ran past its card or the edge of the screen, the size follows the screen width instead. */
@media (max-width: 779px) {
  /* App landing page hero ("ПРИЛОЖЕНИЕ", "ТРЕНИРОВОК,") */
  html[lang="ru"] .hero-h1 { font-size: clamp(40px, calc((100vw - 48px) / 6.3), 104px); }
}
/* Program pages, warm-up cards ("МОБИЛИЗАЦИЯ") */
html[lang="ru"] .rp-h .display {
  font-size: clamp(15px, calc((100vw - 241px) / 7), 26px);
  min-width: 0;
  overflow-wrap: anywhere;
}
/* App landing page, "how it works" cards: three narrow columns from 720px ("ТРЕНИРУЙСЯ") */
@media (min-width: 720px) and (max-width: 1199px) {
  html[lang="ru"] section.method .method-grid .method-card h3 {
    font-size: clamp(22px, calc((100vw / 3 - 104px) / 5.6), 32px);
  }
}
/* App landing page, age cards: as narrow as 210px ("ДОМИНИРОВАНИЕ") */
html[lang="ru"] .ages-grid .method-card h3 { font-size: 21px; }
@media (max-width: 480px) {
  html[lang="ru"] .ages-grid .method-card h3 { font-size: 28px; }
}
/* Home page, method cards: three columns start at 820px ("ИССЛЕДОВАНИЯ") */
@media (min-width: 820px) and (max-width: 999px) {
  html[lang="ru"] .sec-tight .method-grid .method-card h3 {
    font-size: clamp(24px, calc((100vw / 3 - 90px) / 7.2), 30px);
  }
}
/* Articles hub title ("ТВОЙ" + "Плейбук." is one unbreakable line) and library title
   ("упражнений.") on narrow phones */
@media (max-width: 420px) {
  html[lang="ru"] .hub-title { font-size: calc((100vw - 48px) / 6.25); }
}
@media (max-width: 359px) {
  html[lang="ru"] .lib-title:not(.hub-title) { font-size: calc((100vw - 48px) / 5); }
}
/* Home hero buttons: the two Russian labels are ~600px side by side. Keep them stacked full
   width (as on phones) until they fit in a row, and tighten them a little where the hero is
   two columns and the text column is still narrow. */
@media (min-width: 560px) and (max-width: 679px) {
  html[lang="ru"] .hero-ctas { flex-direction: column; align-items: stretch; }
  html[lang="ru"] .hero-ctas .btn { width: 100%; }
}
@media (min-width: 1024px) and (max-width: 1219px) {
  html[lang="ru"] .hero-ctas { gap: 10px; }
  html[lang="ru"] .hero-ctas .btn { padding-left: 22px; padding-right: 22px; font-size: 16px; }
}
@media (min-width: 1024px) and (max-width: 1119px) {
  html[lang="ru"] .hero-ctas .btn { padding-left: 16px; padding-right: 16px; font-size: 15.5px; }
}
