/* v948: one typography contract for RU / EN / ES.
   Uses a privacy-safe local/system stack; every interactive control inherits it.
   Standard named weights replace the previous mix of synthetic 650/730/780/850 values
   in the most visible site/assistant surfaces so Cyrillic, Latin and Spanish render
   with the same visual hierarchy. */
:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Arial, sans-serif;
  --type-regular: 400;
  --type-medium: 500;
  --type-semibold: 600;
  --type-bold: 700;
  --type-extrabold: 800;
}

html,
body {
  font-family: var(--font-sans) !important;
  font-synthesis: none;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea,
option {
  font-family: inherit !important;
}

/* Shared navigation and primary interface hierarchy. */
.main-nav,
.header-links,
.language-switch,
.btn,
.menu-toggle,
.skip-link {
  font-family: inherit !important;
}
.main-nav { font-weight: var(--type-bold) !important; }
.language-switch :is(a, button) { font-weight: var(--type-bold) !important; }
.btn { font-weight: var(--type-bold) !important; }

/* Hero and section hierarchy: identical numeric weights in all locales. */
.hero h1 {
  font-weight: var(--type-bold) !important;
  letter-spacing: -.04em !important;
}
.hero-subtitle-main { font-weight: var(--type-bold) !important; }
.hero-subtitle-sub { font-weight: var(--type-semibold) !important; }
.hero-summary-list span { font-weight: var(--type-semibold) !important; }

h2,
.section-heading h2,
.about-process-heading h2,
.process-principles-copy h3,
.early-start-copy h2,
.process .early-start-copy h2 {
  font-weight: var(--type-bold) !important;
}

.info-card h3,
.service-card h3,
.price-card h3,
.step-card h3,
.faq-accordion summary,
.contact-form label,
.contact-link b,
.credential-item b {
  font-weight: var(--type-bold) !important;
}

/* Supporting copy should not acquire pseudo-bold from fractional weights. */
.hero-summary-list span,
.fact-item span,
.credential-item span,
.human-check span,
.contact-form label {
  font-weight: var(--type-semibold) !important;
}

/* Pills/chips use one semibold contract. */
.hero-tags span,
.price-addons-list span,
.early-start-item,
.contact-prepared-link,
.contact-prepared-share {
  font-weight: var(--type-semibold) !important;
}

/* Assistant is part of the same design system, not a separate font stack. */
.ai-widget,
.ai-panel,
.ai-toggle,
.ai-panel button,
.ai-panel input,
.ai-panel textarea,
.ai-panel select {
  font-family: inherit !important;
}
.ai-toggle,
.ai-panel-title strong,
.ai-close {
  font-weight: var(--type-bold) !important;
}
.ai-quick-actions button,
.ai-context-actions button,
.ai-speech-toggle,
.ai-voice,
.ai-dialog-mode,
.ai-voice-choice-buttons button,
.ai-translate-actions button,
.ai-translation-note {
  font-weight: var(--type-semibold) !important;
}
.ai-bubble,
.ai-disclaimer,
.ai-input-row textarea {
  font-weight: var(--type-regular) !important;
}

/* Standalone service/resource/legal pages share the same typography foundation. */
.legal-page,
.service-page,
.resources-page {
  font-family: inherit !important;
}
.legal-page h1,
.resources-page .resource-list-content h1,
.service-page h1,
.legal-page h2,
.resources-page .legal-section h2,
.service-page h2 {
  font-weight: var(--type-bold) !important;
}

/* Locale text length may differ, but the typographic contract must not. */
html[lang="ru"] .hero h1,
html[lang="en"] .hero h1,
html[lang="es"] .hero h1 {
  font-family: inherit !important;
  font-weight: var(--type-bold) !important;
}

/* Responsive/header overrides elsewhere use very high synthetic weights. */
.header-links a,
html.mobile-ai-panel-open .header-links a,
.legal-page .header-links a {
  font-weight: var(--type-bold) !important;
}
.language-switch :is(a, button),
.language-switch-mobile :is(a, button),
.legal-page .language-switch :is(a, button) {
  font-weight: var(--type-bold) !important;
}
.resource-card small,
.legal-page .section-kicker,
.section-kicker,
.eyebrow {
  font-weight: var(--type-bold) !important;
}
.ai-onboarding-hint,
.ai-rail-handle {
  font-family: inherit !important;
  font-weight: var(--type-bold) !important;
}

/* v950: keep full localized Hero wording, but group the actual copy with a
   natural reading rhythm. The trust badges remain anchored to the bottom of
   the copy column, while H1, subtitle, feature list and CTA no longer share
   the column's leftover height through space-between. */
@media (min-width: 821px) {
  #home .hero-copy {
    justify-content: flex-start !important;
    align-self: stretch !important;
    box-sizing: border-box;
    padding-top: clamp(22px, 3.2vh, 32px) !important;
  }

  #home .hero-trust-badges {
    margin-top: auto !important;
  }
}

@media (min-width: 821px) and (max-width: 1399px) {
  #home h1 {
    font-size: clamp(50px, 3.95vw, 54px) !important;
    line-height: 1.06 !important;
  }
}

@media (min-width: 1400px) {
  #home h1 {
    font-size: 54px !important;
    line-height: 1.06 !important;
  }
  #home .hero-card,
  html.ai-rail-enabled #home .hero-card,
  html.ai-rail-collapsed #home .hero-card {
    min-height: 690px !important;
  }
}

/* At wide desktop widths the AI rail narrows the copy column enough for the
   full Russian heading/supporting content to wrap one additional line. Reserve
   the same card height for every locale so only internal spacing adapts. */
@media (min-width: 1600px) {
  #home .hero-card,
  html.ai-rail-enabled #home .hero-card,
  html.ai-rail-collapsed #home .hero-card {
    min-height: 715px !important;
  }
}

