/*
  PRISRA PATCH 1.1 — CUSTOM CSS
  Tilda: Site Settings → More → Custom CSS
  -----------------------------------------
  Цели: Performance 46→85+, A11y 75→95+, SEO 92→100
  LCP: 10.8s→<2.5s, CLS: 0.175→<0.1
*/


/* ==============================================
   F4: CLS FIXES — Layout shift prevention
   ============================================== */

/* Hero form container — фиксированная высота чтобы не прыгала */
.t-cover__carrier {
  contain: layout style;
}

/* Любые изображения без явных размеров */
img:not([width]):not([height]) {
  aspect-ratio: auto;
}

/* Placeholder контент при загрузке */
.t-cover img,
.t-records__col img,
.t-card__img,
.t-tile__img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  height: auto;
}

/* Video containers */
.t-video,
.t-video__iframe-wrapper,
iframe[src*="youtube"],
iframe[src*="vimeo"] {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}
.t-video__iframe-wrapper iframe,
.t-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Sticky header — prevent reflow */
.t-header {
  contain: layout;
}


/* ==============================================
   F3: IMAGE OPTIMIZATION HELPERS
   ============================================== */

/* Lazy load images below fold — визуальный hint */
.t-records__col img[loading="lazy"],
.t-card__img[loading="lazy"],
.t-tile__img[loading="lazy"] {
  background: #111;
}

/* Prevent service card images from causing reflow */
.t-cards__col .t-card__img-wrapper,
.t-tile__col .t-tile__img-wrapper {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}


/* ==============================================
   F1: RENDER-BLOCKING — non-critical deferral
   NOTE: Tilda's own CSS/JS cannot be deferred
   (platform limitation). Tilda CDN delivers
   resources from edge — cache fix in F2.
   Для кастомных шрифтов через @import:
   ============================================== */

/* Если используется Google Fonts через @import — замените на  в head.html */
/* Этот блок предотвращает FOUT для кириллицы */
:root {
  --font-loaded: 0;
}
html {
  text-rendering: optimizeSpeed;
}


/* ==============================================
   A3: CONTRAST FIXES
   ============================================== */

/* Brass gold: #C9A961 на #000 = 8.1:1 — OK
   Только Tilda-специфичные элементы (НЕ голые p/li/td —
   они ломают белый фон на блог-страницах) */
.t-descr,
.t-text {
  color: rgba(255, 255, 255, 0.87); /* 13.8:1 contrast on #000 */
}

/* Плейсхолдеры форм — мин. 4.5:1 */
input::placeholder,
textarea::placeholder,
select::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Мелкий декоративный текст — не падать ниже 3:1 (large text exception) */
.t-name,
.t-uptitle,
.case-disclaimer {
  color: rgba(255, 255, 255, 0.55);
}

/* Brass на тёмном фоне — усиленный вариант для мелкого текста */
.faq-item summary,
[style*="color:#CDA03C"],
[style*="color: #CDA03C"] {
  color: #D4B570; /* поднять яркость для мелкого текста */
}


/* ==============================================
   A4: FORM LABELS — screen reader accessible
   ============================================== */

/* Visually hidden labels (sr-only pattern) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Увеличить кликабельную область label */
label {
  display: block;
  cursor: pointer;
}


/* ==============================================
   A5: FOCUS STATES
   ============================================== */

/* Global focus-visible для всех интерактивных элементов */
*:focus {
  outline: none; /* убрать дефолтный синий */
}

*:focus-visible {
  outline: 2px solid #C9A961;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Кнопки */
button:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #C9A961;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.25);
}

/* Input fields */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #C9A961;
  outline-offset: 0;
  border-color: #C9A961 !important;
}

/* Ссылки */
a:focus-visible {
  outline: 2px solid #C9A961;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Tilda-specific nav links */
.t-menu__link:focus-visible,
.t-menu__list-item a:focus-visible {
  outline: 2px solid #C9A961;
  outline-offset: 3px;
}

/* Details/summary (FAQ) */
.faq-item summary:focus-visible {
  outline: 2px solid #C9A961;
  outline-offset: 4px;
  border-radius: 4px;
}


/* ==============================================
   SEO2: TAP TARGETS — минимум 48×48px
   ============================================== */

/* Соцсети в шапке */
.t-sociallinks__item,
.t-header .t-sociallinks a,
header [href*="instagram"],
header [href*="facebook"],
header [href*="linkedin"],
header [href*="telegram"] {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Dropdown стрелки в меню */
.t-menu__list-item,
.t-menu__link {
  min-height: 48px;
  display: flex;
  align-items: center;
}

/* Кнопки CTA */
.t-btn,
button[type="submit"],
.btn-primary,
.btn-ghost {
  min-height: 48px;
  min-width: 48px;
}

/* Мобильные иконки */
@media (max-width: 768px) {
  .t-sociallinks__item,
  .t-header a {
    min-width: 48px;
    min-height: 48px;
    padding: 12px;
  }

  /* FAQ — tap targets */
  .faq-item summary {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
}


/* ==============================================
   PATCH 1 CARRY-OVER: Service cards hover
   (уточнённые Tilda-specific селекторы)
   ============================================== */

.t-cards__col .t-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border: 1px solid transparent;
  border-radius: 12px;
  overflow: hidden;
}

.t-cards__col .t-card:hover {
  transform: translateY(-4px);
  border-color: #CDA03C;
  box-shadow: 0 12px 40px rgba(205, 160, 60, 0.12);
}


/* ==============================================
   MOBILE: Responsive fixes
   ============================================== */

@media (max-width: 480px) {
  /* Hero CTA buttons stack vertically */
  .hero-ctas {
    flex-direction: column;
  }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-ghost {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Capabilities band — 2 columns on mobile */
  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* FAQ items */
  .faq-item summary {
    font-size: 0.95rem;
  }
}


/* ==============================================
   BLOG ARTICLES — prisra-article styles
   .t-width_100 = Tilda T123 HTML block
   Стили применяются к ЛЮБОМУ контенту в HTML-блоке
   автоматически — с обёрткой .prisra-article или без.
   ============================================== */

/* Base: works on ANY content inside T123 HTML block */
.t-width_100,
.prisra-article {
  font-family: 'Ubuntu', Arial, sans-serif;
  color: #222;
  line-height: 1.78;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* Lead paragraph */
.prisra-article .lead {
  font-size: 1.15rem;
  color: #444;
  line-height: 1.8;
  border-left: 4px solid #f07820;
  padding-left: 20px;
  margin: 0 0 36px;
}

/* Headings */
.prisra-article h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  color: #111;
  margin: 0 0 24px;
}

.prisra-article h2 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: #111;
  margin: 52px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.prisra-article h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  margin: 32px 0 10px;
}

/* Paragraphs */
.prisra-article p {
  margin: 0 0 18px;
  font-size: 1rem;
}

/* Lists */
.prisra-article ul,
.prisra-article ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.prisra-article li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.prisra-article ul li::marker {
  color: #f07820;
}

/* Strong inside list */
.prisra-article li strong {
  color: #111;
}

/* Tables */
.prisra-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 32px;
  font-size: 0.92rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #e8e8e8;
}

.prisra-article thead {
  background: #111;
  color: #fff;
}

.prisra-article thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.prisra-article tbody tr:nth-child(even) {
  background: #f9f9f9;
}

.prisra-article tbody tr:hover {
  background: #fff5ee;
}

.prisra-article tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

/* Stat / highlight boxes */
.prisra-article .stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 8px 0 36px;
}

.prisra-article .stat-box {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-top: 3px solid #f07820;
  border-radius: 8px;
  padding: 18px 20px;
  text-align: center;
}

.prisra-article .stat-box__num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: #f07820;
  line-height: 1.1;
}

.prisra-article .stat-box__label {
  display: block;
  font-size: 0.82rem;
  color: #666;
  margin-top: 4px;
}

/* Numbered steps */
.prisra-article ol.steps {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
}

.prisra-article ol.steps li {
  counter-increment: step-counter;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 16px 20px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #eee;
}

.prisra-article ol.steps li::before {
  content: counter(step-counter);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: #f07820;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* FAQ accordion */
.prisra-article .faq-block {
  margin-top: 40px;
  border-top: 2px solid #f0f0f0;
  padding-top: 8px;
}

.prisra-article .faq-block details {
  border-bottom: 1px solid #eee;
}

.prisra-article .faq-block details summary {
  padding: 18px 40px 18px 0;
  font-weight: 600;
  font-size: 1rem;
  color: #111;
  cursor: pointer;
  position: relative;
  list-style: none;
}

.prisra-article .faq-block details summary::-webkit-details-marker { display: none; }

.prisra-article .faq-block details summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: #f07820;
  font-weight: 300;
  transition: transform 0.2s;
}

.prisra-article .faq-block details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.prisra-article .faq-block details p {
  padding: 0 0 20px;
  color: #444;
}

/* CTA block */
.prisra-article .cta-block {
  background: linear-gradient(135deg, #111 0%, #222 100%);
  color: #fff;
  border-radius: 12px;
  padding: 36px 40px;
  margin-top: 52px;
  text-align: center;
}

.prisra-article .cta-block h3 {
  color: #fff;
  font-size: 1.3rem;
  margin: 0 0 10px;
}

.prisra-article .cta-block p {
  color: rgba(255,255,255,0.75);
  margin: 0 0 24px;
  font-size: 0.95rem;
}

.prisra-article .cta-block a.btn {
  display: inline-block;
  background: #f07820;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.prisra-article .cta-block a.btn:hover {
  background: #d9670e;
}

/* Breadcrumb */
.prisra-article .breadcrumb {
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 28px;
}

.prisra-article .breadcrumb a {
  color: #999;
  text-decoration: none;
}

.prisra-article .breadcrumb a:hover {
  color: #f07820;
}

.prisra-article .breadcrumb span {
  margin: 0 6px;
}

/* Article meta */
.prisra-article .article-meta {
  font-size: 0.82rem;
  color: #aaa;
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.prisra-article .article-meta .tag {
  background: #f5f5f5;
  border-radius: 20px;
  padding: 3px 12px;
  color: #555;
}

/* Responsive */
@media (max-width: 600px) {
  .prisra-article {
    padding: 0 16px 48px;
  }
  .prisra-article .cta-block {
    padding: 28px 20px;
  }
  .prisra-article .stat-row {
    grid-template-columns: 1fr 1fr;
  }
  .prisra-article table {
    font-size: 0.82rem;
  }
  .prisra-article thead th,
  .prisra-article tbody td {
    padding: 9px 10px;
  }
}


/* ==============================================
   T123 AUTO-STYLE — applies to ANY HTML block.
   .t-width_100 = actual content wrapper in Tilda T123 block.
   Discovered via curl inspection of live prisra.com HTML.
   ============================================== */

.t-width_100 {
  font-family: 'Ubuntu', Arial, sans-serif !important;
  line-height: 1.78 !important;
  max-width: 780px !important;
  margin: 0 auto !important;
  padding: 90px 24px 60px !important;
  color: #222 !important;
  box-sizing: border-box !important;
}

.t-width_100 h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #111 !important;
  margin: 0 0 24px !important;
}

.t-width_100 h2 {
  font-size: clamp(1.2rem, 3vw, 1.65rem) !important;
  font-weight: 700 !important;
  color: #111 !important;
  margin: 48px 0 16px !important;
  padding-bottom: 10px !important;
  border-bottom: 2px solid #f0f0f0 !important;
}

.t-width_100 h3 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #222 !important;
  margin: 28px 0 10px !important;
}

.t-width_100 p {
  margin: 0 0 18px !important;
  font-size: 1rem !important;
  color: #333 !important;
  line-height: 1.78 !important;
}

.t-width_100 ul,
.t-width_100 ol {
  margin: 0 0 24px !important;
  padding-left: 24px !important;
}

.t-width_100 li {
  margin-bottom: 10px !important;
  line-height: 1.7 !important;
  color: #333 !important;
}

.t-width_100 ul li::marker {
  color: #f07820 !important;
}

.t-width_100 strong {
  color: #111 !important;
  font-weight: 700 !important;
}

.t-width_100 a {
  color: #f07820 !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(240,120,32,0.3) !important;
  transition: border-color 0.2s !important;
}

.t-width_100 a:hover {
  border-bottom-color: #f07820 !important;
}

.t-width_100 table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 8px 0 32px !important;
  font-size: 0.92rem !important;
  overflow: hidden !important;
  box-shadow: 0 0 0 1px #e8e8e8 !important;
  border-radius: 8px !important;
  background: #fff !important;
}

.t-width_100 thead {
  background: #111 !important;
  color: #fff !important;
}

.t-width_100 thead th {
  padding: 12px 16px !important;
  text-align: left !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  letter-spacing: 0.02em !important;
  color: #fff !important;
}

.t-width_100 tbody tr:nth-child(even) {
  background: #f9f9f9 !important;
}

.t-width_100 tbody tr:hover {
  background: #fff5ee !important;
}

.t-width_100 tbody td {
  padding: 11px 16px !important;
  border-bottom: 1px solid #eee !important;
  vertical-align: top !important;
  color: #333 !important;
}

.t-width_100 details {
  border-bottom: 1px solid #eee !important;
}

.t-width_100 details summary {
  padding: 18px 40px 18px 0 !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  color: #111 !important;
  cursor: pointer !important;
  position: relative !important;
  list-style: none !important;
}

.t-width_100 details summary::-webkit-details-marker { display: none; }

.t-width_100 details summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: #f07820;
  font-weight: 300;
  transition: transform 0.2s;
}

.t-width_100 details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

/* CTA block inside HTML blocks */
.t-width_100 .cta-block {
  background: linear-gradient(135deg, #111 0%, #2a2a2a 100%) !important;
  border-radius: 12px !important;
  padding: 36px 40px !important;
  margin-top: 52px !important;
  text-align: center !important;
}

.t-width_100 .cta-block h3 {
  color: #fff !important;
  font-size: 1.3rem !important;
  margin: 0 0 10px !important;
  border-bottom: none !important;
}

.t-width_100 .cta-block p {
  color: rgba(255,255,255,0.75) !important;
  margin: 0 0 24px !important;
}

.t-width_100 .cta-block a.btn {
  display: inline-block !important;
  background: #f07820 !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 14px 32px !important;
  border-radius: 6px !important;
  border-bottom: none !important;
}

/* Stat boxes */
.t-width_100 .stat-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 16px !important;
  margin: 8px 0 36px !important;
}

.t-width_100 .stat-box {
  background: #f9f9f9 !important;
  border: 1px solid #eee !important;
  border-top: 3px solid #f07820 !important;
  border-radius: 8px !important;
  padding: 18px 20px !important;
  text-align: center !important;
}

.t-width_100 .stat-box__num {
  display: block !important;
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  color: #f07820 !important;
  line-height: 1.1 !important;
}

.t-width_100 .stat-box__label {
  display: block !important;
  font-size: 0.82rem !important;
  color: #666 !important;
  margin-top: 4px !important;
}

/* Lead paragraph */
.t-width_100 .lead {
  font-size: 1.15rem !important;
  color: #444 !important;
  border-left: 4px solid #f07820 !important;
  padding-left: 20px !important;
  margin: 0 0 36px !important;
}

/* Breadcrumb */
.t-width_100 .breadcrumb {
  font-size: 0.82rem !important;
  color: #999 !important;
  margin-bottom: 28px !important;
}

.t-width_100 .breadcrumb a {
  color: #999 !important;
  border-bottom: none !important;
}

/* Article meta tags */
.t-width_100 .article-meta {
  font-size: 0.82rem !important;
  color: #aaa !important;
  margin-bottom: 32px !important;
  display: flex !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

.t-width_100 .article-meta .tag {
  background: #f5f5f5 !important;
  border-radius: 20px !important;
  padding: 3px 12px !important;
  color: #555 !important;
}

/* Numbered steps ol.steps */
.t-width_100 ol.steps {
  list-style: none !important;
  padding: 0 !important;
  counter-reset: step-counter !important;
}

.t-width_100 ol.steps li {
  counter-increment: step-counter;
  display: flex !important;
  gap: 16px !important;
  align-items: flex-start !important;
  margin-bottom: 16px !important;
  padding: 14px 18px !important;
  background: #fafafa !important;
  border-radius: 8px !important;
  border: 1px solid #eee !important;
}

.t-width_100 ol.steps li::before {
  content: counter(step-counter) !important;
  flex-shrink: 0 !important;
  width: 30px !important;
  height: 30px !important;
  background: #f07820 !important;
  color: #fff !important;
  border-radius: 50% !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 600px) {
  .t-width_100 {
    padding: 70px 16px 48px !important;
  }
  .t-width_100 table {
    font-size: 0.8rem !important;
  }
  .t-width_100 thead th,
  .t-width_100 tbody td {
    padding: 8px 10px !important;
  }
  .t-width_100 .cta-block {
    padding: 24px 20px !important;
  }
  .t-width_100 .stat-row {
    grid-template-columns: 1fr 1fr !important;
  }
}
