/* Trisigma RA — фирменный стиль (дизайн-система «Trisigma RA»).
   Подключается последним и переопределяет цвета, шрифты и компоненты старой темы. */


:root,
[data-theme="light"] {
  --tra-deep: #0664b0;
  --tra-light: #2283c6;
  --tra-ice: #c7e0f3;
  --tra-tint: #e6f1fa;
  --bg-primary: #ffffff;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f4f6f8;
  --bg-card: #ffffff;
  --bg-card-hover: #f4f6f8;
  --bg-glass: rgba(255, 255, 255, .96);
  --border-subtle: #d5d9de;
  --border-strong: #b9c0c8;
  --border-focus: #0664b0;
  --text-main: #000000;
  --text-muted: #595959;
  --text-light: #767d86;
  --accent-gold: #0664b0;
  --accent-gold-light: #c7e0f3;
  --accent-gold-dark: #054f8c;
  --accent-gold-glow: rgba(6, 100, 176, .12);
  --accent-blue: #0664b0;
  --accent-blue-light: #2283c6;
  --accent-blue-dark: #054f8c;
  --accent-blue-glow: rgba(6, 100, 176, .10);
  --accent-emerald: #1e7b4f;
  --accent-red: #b3261e;
  --shadow-sm: none;
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .06);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, .10);
  --shadow-glow: none;
  --font-sans: "IBM Plex Sans", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
  --font-display: "Russo One", "Arial Black", sans-serif;
}

[data-theme="dark"] {
  --bg-primary: #0b0c0e;
  --bg-secondary: #121417;
  --bg-tertiary: #1a1c20;
  --bg-card: #121417;
  --bg-card-hover: #1a1c20;
  --bg-glass: rgba(11, 12, 14, .96);
  --border-subtle: #2b2f35;
  --border-strong: #3d424a;
  --border-focus: #3d95d4;
  --text-main: #f2f4f7;
  --text-muted: #a9b0b8;
  --text-light: #8b929b;
  --accent-gold: #3d95d4;
  --accent-gold-light: #6db3e8;
  --accent-gold-dark: #6db3e8;
  --accent-gold-glow: rgba(61, 149, 212, .14);
  --accent-blue: #3d95d4;
  --accent-blue-light: #6db3e8;
  --accent-blue-dark: #2283c6;
  --accent-blue-glow: rgba(61, 149, 212, .14);
  --accent-emerald: #5fbf8f;
  --accent-red: #f08a83;
  --shadow-sm: none;
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .3);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, .4);
}

/* Шрифты: Russo One — один заголовок на странице, IBM Plex Sans — текст, IBM Plex Mono — цифры */
body { font-family: var(--font-sans); letter-spacing: 0; }
h1, .hero-title, .release-hero h1, .page-hero h1 { font-family: var(--font-display); font-weight: 400 !important; letter-spacing: 0 !important; }
h2, h3, h4, h5, .section-title, .card-title { font-family: var(--font-sans); letter-spacing: -.005em; }
.section-tag { text-transform: uppercase; letter-spacing: .32em !important; }
.demo-pill { text-transform: uppercase; letter-spacing: .14em !important; }
h1, h2, h3, h4 { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; word-break: normal; text-wrap: balance; }
body, p, li, td { hyphens: manual; -webkit-hyphens: manual; }
.ticker-tag { letter-spacing: .14em; }
.ticker-bar { overflow: hidden; }
::selection { color: #fff; background: var(--tra-deep, #0664b0); }

/* Логотип: два варианта — для светлой и тёмной темы */
.logo-img { height: 46px; width: auto; }
.logo-img.on-dark { display: none; }
[data-theme="dark"] .logo-img.on-light { display: none; }
[data-theme="dark"] .logo-img.on-dark { display: inline-block; }
.site-footer .footer-brand img { height: 40px !important; width: auto; }

/* Верхняя полоса, шапка, кнопки */
.ticker-bar { background: #0664b0; color: #c7e0f3; }
.ticker-tag { color: #c7e0f3; }
.ticker-value { color: #ffffff; }
.site-header { box-shadow: none; border-bottom: 1px solid var(--border-subtle); }
.nav-link.active::after { background: var(--accent-blue); }
.btn { border-radius: 8px; }
.btn-primary, .btn-primary:hover { color: #ffffff; background: #0664b0; border-color: #0664b0; box-shadow: none; }
.btn-primary:hover { background: #054f8c; border-color: #054f8c; }
[data-theme="dark"] .btn-primary:hover { background: #0a74cc; border-color: #0a74cc; }
.btn-outline:hover { border-color: var(--accent-blue); }
.card, .card:hover { box-shadow: none; border-radius: 12px; }
.card:hover { border-color: var(--border-strong); }

/* Секции и плашки */
.section-alt { background: #f4f6f8; border-color: var(--border-subtle); }
[data-theme="dark"] .section-alt { background: #121417; }
.demo-strip { color: #054f8c; background: #e6f1fa; border-bottom: 1px solid #c7e0f3; }
.demo-strip-mark { background: #0664b0; }
[data-theme="dark"] .demo-strip { color: #c7e0f3; background: #0f1c2a; border-color: #1d3550; }
.demo-callout { color: #054f8c; background: #e6f1fa; border-color: #c7e0f3; }
.demo-callout strong { color: #003b6b; }
[data-theme="dark"] .demo-callout { color: #c7e0f3; background: #0f1c2a; border-color: #1d3550; }
[data-theme="dark"] .demo-callout strong { color: #ffffff; }
.demo-pill { color: #054f8c; background: #e6f1fa; border-color: #c7e0f3; }
[data-theme="dark"] .demo-pill { color: #c7e0f3; background: #0f1c2a; border-color: #1d3550; }
.methodology-disclosure { border-left-color: #0664b0; background: var(--bg-tertiary); }
.placeholder { color: #0664b0; }
[data-theme="dark"] .placeholder { color: #6db3e8; }

/* Главный экран: сплошной brand-deep, без градиентов */
.hero-section { color: #ffffff; background: #0664b0; border-bottom: 0; }
.hero-section::before { border-color: rgba(199, 224, 243, .18); box-shadow: 0 0 0 58px rgba(199,224,243,.05), 0 0 0 116px rgba(199,224,243,.035), 0 0 0 174px rgba(199,224,243,.02); }
.hero-section::after { opacity: .12; }
.hero-badge { color: #ffffff; background: rgba(255,255,255,.08); border-color: rgba(199,224,243,.35); }
.badge-pulse { background: #c7e0f3; }
.hero-title span.highlight-gold, .hero-title span.highlight-blue { color: #c7e0f3; -webkit-text-fill-color: #c7e0f3; }
.hero-desc, .hero-search-hint, .stat-item .stat-label, .prototype-note { color: #dbeaf6; }
.hero-search { background: rgba(255,255,255,.08); border-color: rgba(199,224,243,.35); }
.hero-search svg, .hero-search input::placeholder { color: #c7e0f3; }
.hero-search button, .hero-search button:hover { color: #0664b0; background: #ffffff; }
.hero-actions .btn-primary { color: #0664b0; background: #ffffff; border-color: #ffffff; }
.hero-actions .btn-outline { color: #ffffff; border-color: rgba(255,255,255,.5); }
.stat-item .stat-num { color: #ffffff !important; font-family: var(--font-mono); }
.hero-card { background: #054f8c; border-color: rgba(199,224,243,.25); box-shadow: none; }
.hero-card::before { display: none; }
.hero-card .live-badge, .hero-card .demo-pill { color: #ffffff; background: rgba(255,255,255,.08); border-color: rgba(199,224,243,.3); }
.mini-rating-info p { color: #c7e0f3; }
.hero-card a { color: #ffffff !important; }
.tech-banner, .dgx-banner { background: #0664b0; border-color: #0664b0; }

/* Страница пресс-релизов */
.release-hero { background: var(--bg-tertiary) !important; }
.release-hero-mark { border-color: #c7e0f3; color: #0664b0; box-shadow: none; }
.release-disclosure-banner { border-color: #c7e0f3; background: #e6f1fa; }
[data-theme="dark"] .release-disclosure-banner { border-color: #1d3550; background: #0f1c2a; }
.release-details[open] .release-summary { background: var(--bg-tertiary); }
.commentary-panel { border-color: #c7e0f3; background: #e6f1fa; }
[data-theme="dark"] .commentary-panel { border-color: #1d3550; background: #0f1c2a; }
.commentary-icon { background: #c7e0f3; color: #0664b0; }

/* Рейтинговые плашки по дизайн-системе */
.rating-badge { font-family: var(--font-display); font-weight: 400; border-radius: 6px; letter-spacing: .02em; }
.badge-aaa, .badge-aa { color: #ffffff; background: #0664b0; border: 1px solid #0664b0; }
.badge-a, .badge-bbb { color: #0664b0; background: #c7e0f3; border: 1px solid #c7e0f3; }
.badge-bb, .badge-b { color: #8a4b00; background: #fdf0dc; border: 1px solid #f3d9b0; }
.badge-c { color: #b3261e; background: #fbe6e4; border: 1px solid #f2c4bf; }
.badge-d { color: #ffffff; background: #000000; border: 1px solid #000000; }

/* Подвал: brand-deep */
.site-footer { color: #c7e0f3; background: #0664b0; border-top: 0; }
.footer-col h5 { color: #ffffff; }
.footer-links a { color: #dbeaf6; }
.footer-links a:hover { color: #ffffff; }
.footer-bottom { border-color: rgba(199,224,243,.3); }
.footer-bottom a { color: #dbeaf6; }
.site-footer .footer-brand p, .site-footer .footer-col div { color: #dbeaf6 !important; }
.footer-disclaimer { color: #dbeaf6; background: rgba(255,255,255,.06); border-color: rgba(199,224,243,.25); }
[data-theme="dark"] .site-footer { background: #0b0c0e; border-top: 1px solid #2b2f35; }

/* Новые страницы */
.step::before { background: #0664b0; }
.weight-bar i { background: #2283c6; }
.metric b { color: var(--accent-blue); }
.check-list li::before { width: 14px; height: 3px; top: 11px; border-radius: 2px; background: #0664b0; box-shadow: 3px -5px 0 #2283c6; }

/* Technology banner: readable on brand blue */
.dgx-banner { color: #ffffff; }
.dgx-banner .section-tag { color: #c7e0f3 !important; }
.dgx-banner h2 { color: #ffffff !important; }
#technology .dgx-banner > p { color: #e6f1fa !important; }
.dgx-banner .dgx-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.dgx-banner .dgx-step-card { background: #ffffff; color: #000000; border: 1px solid #d5d9de !important; border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.dgx-banner .dgx-step-num { font-family: 'IBM Plex Mono', monospace; font-size: .78rem; letter-spacing: .08em; color: #0664b0 !important; font-weight: 600; }
.dgx-banner .dgx-step-card h4 { margin: 0; font-size: 1.05rem; font-weight: 600; color: #0664b0; }
.dgx-banner .dgx-step-card p { margin: 0; font-size: .92rem; line-height: 1.55; color: #333333; }
.dgx-banner .dgx-step-card:last-child { background: #c7e0f3; border-color: #c7e0f3 !important; }
@media (max-width: 960px) { .dgx-banner .dgx-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .dgx-banner .dgx-flow { grid-template-columns: 1fr; } }

/* Narrow phones: shrink headings so long words fit without hyphenation */
@media (max-width: 420px) {
  h1 { font-size: clamp(28px, 8.6vw, 40px) !important; line-height: 1.15 !important; }
  h2 { font-size: clamp(21px, 6.4vw, 30px) !important; line-height: 1.2 !important; }
}
@media (max-width: 380px) {
  h1 { font-size: clamp(22px, 7vw, 28px) !important; }
}
