/* ============================================
   Xterium — Shared scaffold-style для content-only pages
   (about, legal: rules/agreement/privacy/terms, community)
   All classes prefixed: xp-
   Принципы из scaffold-страниц: xg-hero, xg-article-card, xg-cta.
   @since 2026-05-17 (Phase N — scaffold principles propagation)
   ============================================ */

/* ===== HERO ===== */
.xp-hero {
  position: relative;
  z-index: 1;
  padding: 40px 0 56px;
  overflow: hidden;
}
.xp-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.xp-hero-bg picture, .xp-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .35;
}
.xp-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,10,20,.6) 0%, rgba(6,10,20,.88) 55%, var(--xh-bg-deep, var(--xh-bg-primary)) 100%);
}
.xp-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto;
  padding: 0 var(--xh-container-pad, 32px);
}
.xp-hero-inner .xh-breadcrumbs { margin-bottom: 14px; }
.xp-hero-eyebrow {
  display: inline-block;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--xh-orange, var(--xh-orange));
  margin-bottom: 10px;
}
.xp-hero-title {
  font-family: var(--xh-font-display, 'Archivo Black'), sans-serif;
  font-size: clamp(28px, 4.5vw, 48px);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--xh-white);
  line-height: 1.05;
  margin: 0 0 14px;
}
.xp-hero-accent { color: var(--xh-orange, var(--xh-orange)); }
.xp-hero-desc {
  font-size: 15.5px;
  color: var(--xh-text-secondary, var(--xh-text-secondary));
  max-width: 640px;
  margin: 0 0 20px;
  line-height: 1.6;
}
/* Wave J Phase H+ 2026-05-21: hero meta-items как chip'ы с background — было plain text без визуальной структуры. */
.xp-hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.xp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--xh-text-secondary, var(--xh-text-secondary));
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-weight: 600;
  letter-spacing: .02em;
  background: var(--xh-overlay-3);
  border: 1px solid var(--xh-overlay-8);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.xp-meta-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--xh-yellow, var(--xh-gold));
}

/* ===== STATS row (для about/contacts) ===== */
.xp-stats {
  position: relative;
  z-index: 1;
  max-width: var(--xh-max-w, 1200px);
  margin: -20px auto 0;
  padding: 0 var(--xh-container-pad, 32px);
}
.xp-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.xp-stat {
  padding: 20px 18px;
  background: var(--xh-bg-card, var(--xh-bg-card));
  border: 1px solid var(--xh-border-light, var(--xh-border-light));
  border-radius: var(--xh-radius-lg, 10px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform var(--xh-transition, .3s ease);
}
.xp-stat:hover { transform: translateY(-2px); }
.xp-stat__value {
  font-family: var(--xh-font-display, 'Archivo Black'), sans-serif;
  font-size: 30px;
  line-height: 1;
  color: var(--xh-orange, var(--xh-orange));
}
.xp-stat__value sup { font-size: 0.55em; vertical-align: super; opacity: .8; }
.xp-stat__label {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--xh-text-secondary, var(--xh-text-secondary));
}

/* ===== CONTENT LAYOUT (article-card pattern из xg-) ===== */
.xp-layout {
  position: relative;
  z-index: 1;
  padding: 40px 0 56px;
}
.xp-layout-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--xh-container-pad, 32px);
}
.xp-layout-inner--wide {
  max-width: var(--xh-max-w, 1200px);
}
.xp-article {
  background: var(--xh-bg-card, var(--xh-bg-card));
  border: 1px solid var(--xh-border, var(--xh-border));
  border-radius: var(--xh-radius-lg, 10px);
  padding: 36px 40px;
}
.xp-article.xh-prose { color: var(--xh-text-secondary, var(--xh-text-secondary)); }

/* ===== CARDS GRID (для contacts, community: 2-3 cards с icons) ===== */
.xp-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 0 0 28px;
}
.xp-card {
  padding: 24px;
  background: var(--xh-bg-card, var(--xh-bg-card));
  border: 1px solid var(--xh-border, var(--xh-border));
  border-radius: var(--xh-radius-lg, 10px);
  transition: all var(--xh-transition, .3s ease);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.xp-card:hover {
  border-color: var(--xh-border-light, var(--xh-border-light));
  transform: translateY(-3px);
  box-shadow: 0 8px 28px var(--xh-shadow-soft);
}
.xp-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--xh-orange-a08);
  border: 1px solid var(--xh-orange-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.xp-card__icon svg {
  width: 20px;
  height: 20px;
  color: var(--xh-orange, var(--xh-orange));
}
.xp-card__icon--blue   { background: rgba(42,125,225,.08);  border-color: rgba(42,125,225,.25); }
.xp-card__icon--blue svg { color: var(--xh-blue-light, var(--xh-blue-light)); }
.xp-card__icon--teal   { background: rgba(32,176,184,.08);  border-color: rgba(32,176,184,.25); }
.xp-card__icon--teal svg { color: var(--xh-teal, var(--xh-teal)); }
.xp-card__icon--green  { background: rgba(32,168,104,.08);  border-color: rgba(32,168,104,.25); }
.xp-card__icon--green svg { color: var(--xh-green, var(--xh-green)); }
.xp-card__icon--purple { background: rgba(106,64,184,.08);  border-color: rgba(106,64,184,.25); }
.xp-card__icon--purple svg { color: var(--xh-purple, var(--xh-purple)); }
.xp-card h3 {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--xh-text, var(--xh-text));
  margin: 0;
}
.xp-card p {
  margin: 0;
  font-size: 14px;
  color: var(--xh-text-secondary, var(--xh-text-secondary));
  line-height: 1.55;
}
.xp-card__cta {
  margin-top: auto;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--xh-orange, var(--xh-orange));
  display: flex;
  align-items: center;
  gap: 6px;
}
.xp-card__cta svg { width: 14px; height: 14px; }

/* ===== Section title (между блоками внутри страницы) ===== */
.xp-section-title {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--xh-white);
  margin: 32px 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.xp-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--xh-border-light, var(--xh-border-light));
}

/* ===== CTA banner (общий xp-cta) ===== */
.xp-cta {
  position: relative;
  z-index: 1;
  padding: 0 0 56px;
}
.xp-cta-wrap {
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto;
  padding: 0 var(--xh-container-pad, 32px);
}
.xp-cta-inner {
  padding: 44px 48px;
  border-radius: var(--xh-radius-lg, 10px);
  border: 1px solid var(--xh-border-light, var(--xh-border-light));
  position: relative;
  overflow: hidden;
  text-align: center;
}
.xp-cta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.xp-cta-bg picture, .xp-cta-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xp-cta-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(8,12,22,.92) 0%, rgba(8,12,22,.78) 50%, rgba(8,12,22,.62) 100%);
}
.xp-cta-content {
  position: relative;
  z-index: 1;
}
.xp-cta-content h2 {
  font-family: var(--xh-font-display, 'Archivo Black'), sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--xh-white);
  margin: 0 0 12px;
}
.xp-cta-content p {
  font-size: 15px;
  color: var(--xh-text-secondary, var(--xh-text-secondary));
  margin: 0 auto 22px;
  max-width: 480px;
}
.xp-cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .xp-hero { padding: 32px 0 40px; }
  .xp-article { padding: 24px 22px; }
  .xp-cta-inner { padding: 32px 24px; }
  .xp-section-title { font-size: 18px; letter-spacing: 1.5px; }
}
@media (max-width: 480px) {
  .xp-stat__value { font-size: 24px; }
}

/* ===== Accent-tile system (.xtc-*) — единый источник 2026-07-17 =====
   Раньше жил инлайн в pages/tools/index.php; вынесен сюда, чтобы страница калькуляторов
   И пресс-кит (/press) использовали ОДИН стиль (owner: пресс-кит в цветовом стиле калькуляторов).
   Акцент на плитку задаётся инлайн через --tc (токен --xh-*). */
.xtc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 16px; max-width: 980px; margin: 0 auto; }
.xtc-tile { position: relative; display: block; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px; padding: 20px; text-decoration: none; color: inherit; overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s; }
.xtc-tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--tc); opacity: 0; transition: opacity .15s; }
.xtc-tile:hover { transform: translateY(-3px); border-color: var(--tc); box-shadow: 0 18px 40px -26px var(--tc); }
.xtc-tile:hover::before { opacity: .9; }
.xtc-ic { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tc) 16%, transparent); color: var(--tc); margin-bottom: 13px; }
.xtc-ic svg { width: 23px; height: 23px; }
.xtc-tile h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 700; }
.xtc-tile p { margin: 0; opacity: .72; font-size: 13.5px; line-height: 1.5; }
.xtc-tile p a { color: var(--tc); text-decoration: none; word-break: break-word; }
.xtc-tile p a:hover { text-decoration: underline; }
.xtc-sec-h { max-width: 980px; margin: 34px auto 14px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; opacity: .6; }
.xtc-sec-h:first-of-type { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .xp-stat, .xp-card { transition: none; }
  .xtc-tile { transition: border-color .15s, box-shadow .15s; }
  .xtc-tile:hover { transform: none; }
}
