/* ============================================
   Xterium /mobile — rebuilt from scaffold (mobile.html)
   All classes prefixed: xm-
   @since 2026-05-17 (Phase I scaffold rebuild)
   ============================================ */

/* ===== HERO ===== */
.xm-hero {
  position: relative;
  z-index: 1;
  min-height: 460px;
  padding: 48px 0 64px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.xm-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.xm-hero-bg picture,
.xm-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.xm-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6,10,20,.92) 0%, rgba(6,10,20,.62) 50%, rgba(6,10,20,.32) 100%);
  z-index: 1;
}
.xm-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto;
  padding: 0 var(--xh-container-pad, 32px);
  width: 100%;
  display: flex;
  align-items: center;
  gap: 48px;
}
.xm-hero-content {
  max-width: 540px;
  flex-shrink: 0;
}
.xm-hero-content .xh-breadcrumbs {
  margin-bottom: 16px;
}
.xm-hero-title {
  font-family: var(--xh-font-display, 'Archivo Black'), sans-serif;
  font-size: clamp(32px, 4.4vw, 48px);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1.05;
  margin: 0 0 10px;
  text-wrap: balance;
}
.xm-hero-sub {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--xh-text, #e8ecf2);
  margin: 0 0 12px;
}
.xm-hero-sub em {
  font-style: normal;
  color: var(--xh-orange, #e88420);
}
.xm-hero-desc {
  font-size: 15.5px;
  color: var(--xh-text-secondary, #a4b3c8);
  max-width: 460px;
  margin: 0 0 26px;
  line-height: 1.6;
}
.xm-hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Store badge */
.xm-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid var(--xh-border-light, #1e2d4a);
  border-radius: var(--xh-radius, 6px);
  color: var(--xh-text, #e8ecf2);
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-weight: 600;
  transition: all var(--xh-transition, .3s ease);
  white-space: nowrap;
  background: rgba(255,255,255,.04);
  text-decoration: none;
}
.xm-store-badge:hover {
  border-color: var(--xh-text-secondary, #a4b3c8);
  background: rgba(255,255,255,.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.xm-store-badge svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.xm-store-badge--gp svg { color: #3DDB85; }
.xm-store-badge--as svg { color: #f5f6fa; }
.xm-badge-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.xm-badge-stack strong { font-size: 14px; }
.xm-badge-stack small {
  font-size: 10px;
  color: var(--xh-text-muted, #8a99b0);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Browser link */
.xm-browser-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--xh-text, #e8ecf2);
  padding: 10px 20px;
  border: 1px solid var(--xh-border, #162035);
  border-radius: var(--xh-radius, 6px);
  transition: all var(--xh-transition, .3s ease);
  text-decoration: none;
}
.xm-browser-link svg {
  width: 18px;
  height: 18px;
  color: var(--xh-blue-light, #4a9df5);
}
.xm-browser-link:hover {
  border-color: var(--xh-border-light, #1e2d4a);
  background: rgba(255,255,255,.06);
}

/* Phone mockup placeholder */
.xm-hero-phones {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
  position: relative;
}
.xm-phone-mock {
  width: 210px;
  height: 400px;
  border-radius: 28px;
  border: 2px solid var(--xh-border-light, #1e2d4a);
  background: linear-gradient(180deg, #0d1830 0%, #162040 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 11px;
  color: var(--xh-text-muted, #8a99b0);
  text-align: center;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 40px rgba(42,125,225,.08);
  position: relative;
  overflow: hidden;
}
.xm-phone-mock::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,.08);
}
.xm-phone-mock:nth-child(2) {
  position: absolute;
  left: 55%;
  top: 28px;
  transform: scale(.85) rotate(6deg);
  opacity: .6;
  z-index: -1;
}

/* ===== Shared SECTION TITLE ===== */
.xm-advantages .xh-section-title,
.xm-how .xh-section-title,
.xm-screens .xh-section-title,
.xm-faq .xh-section-title {
  text-align: center;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--xh-text, #e8ecf2);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.xm-advantages .xh-section-title::before,
.xm-advantages .xh-section-title::after,
.xm-how .xh-section-title::before,
.xm-how .xh-section-title::after,
.xm-screens .xh-section-title::before,
.xm-screens .xh-section-title::after,
.xm-faq .xh-section-title::before,
.xm-faq .xh-section-title::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--xh-border-light, #1e2d4a);
}

/* ===== ADVANTAGES (xm-advantages) — 5 colored cards ===== */
.xm-advantages {
  position: relative;
  z-index: 1;
  padding: 72px 0 56px;
  border-top: 1px solid var(--xh-border, #162035);
}
.xm-adv-grid {
  max-width: var(--xh-max-w, 1200px);
  margin: 36px auto 0;
  padding: 0 var(--xh-container-pad, 32px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.xm-adv {
  text-align: center;
  padding: 0 4px;
}
.xm-adv-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--xh-border, #162035);
  background: rgba(255,255,255,.03);
  transition: all var(--xh-transition, .3s ease);
}
.xm-adv:hover .xm-adv-icon {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.xm-adv-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.5;
}
.xm-adv--blue   .xm-adv-icon { color: #4a9df5; border-color: rgba(74,157,245,.32);  background: rgba(74,157,245,.10); }
.xm-adv--teal   .xm-adv-icon { color: #20b0b8; border-color: rgba(32,176,184,.32);  background: rgba(32,176,184,.10); }
.xm-adv--orange .xm-adv-icon { color: #e88420; border-color: rgba(232,132,30,.32);  background: rgba(232,132,30,.10); }
.xm-adv--green  .xm-adv-icon { color: #20a868; border-color: rgba(32,168,104,.32);  background: rgba(32,168,104,.10); }
.xm-adv--purple .xm-adv-icon { color: #6a40b8; border-color: rgba(106,64,184,.32);  background: rgba(106,64,184,.10); }
.xm-adv h3 {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 8px;
  color: #fff;
}
.xm-adv p {
  margin: 0;
  font-size: 13.5px;
  color: var(--xh-text-secondary, #a4b3c8);
  line-height: 1.55;
}

/* ===== HOW IT WORKS (xm-how) — 3 steps ===== */
.xm-how {
  position: relative;
  z-index: 1;
  padding: 64px 0;
  border-top: 1px solid var(--xh-border, #162035);
}
.xm-how-sub {
  text-align: center;
  font-size: 15px;
  color: var(--xh-text-secondary, #a4b3c8);
  margin: 8px 0 40px;
}
.xm-how-grid {
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto;
  padding: 0 var(--xh-container-pad, 32px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.xm-how-step {
  text-align: center;
  padding: 0 8px;
  position: relative;
}
.xm-how-step-img {
  width: 100%;
  height: 200px;
  border-radius: var(--xh-radius-lg, 10px);
  border: 1px solid var(--xh-border, #162035);
  margin-bottom: 20px;
  background: linear-gradient(135deg, #0d1830 0%, #162040 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.xm-how-step-img svg {
  width: 48px;
  height: 48px;
  color: var(--xh-text-muted, #8a99b0);
  opacity: .6;
}
.xm-how-step h3 {
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 8px;
  color: #fff;
}
.xm-how-step p {
  margin: 0;
  font-size: 14px;
  color: var(--xh-text-secondary, #a4b3c8);
  line-height: 1.6;
}

/* ===== SCREENSHOTS (xm-screens) — 6 phone thumbs ===== */
.xm-screens {
  position: relative;
  z-index: 1;
  padding: 64px 0;
  border-top: 1px solid var(--xh-border, #162035);
}
.xm-screens-scroll {
  max-width: var(--xh-max-w, 1200px);
  margin: 36px auto 0;
  padding: 0 var(--xh-container-pad, 32px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* ШИРОКОФОРМАТНЫЕ скрины приложения */
  gap: 18px;
}
.xm-screen-item {
  text-align: center;
}
/* РАМКА УСТРОЙСТВА (ландшафт): тёмный «корпус» с бзелем вокруг широкого экрана.
   Скрины игры горизонтальные → портретный телефон не подходит, делаем планшет/повёрнутый телефон. */
.xm-screen-thumb {
  width: 100%;
  border-radius: 18px;
  border: 1px solid #2a3a55;
  background: #05080f; /* корпус устройства */
  padding: 9px; /* бзель */
  box-shadow: 0 12px 34px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.03);
  overflow: hidden;
  display: block;
  transition: all var(--xh-transition, .3s ease);
  margin-bottom: 10px;
}
.xm-screen-thumb img {
  width: 100%;
  aspect-ratio: 16/9; /* экран — широкий */
  object-fit: cover;
  display: block;
  border-radius: 9px; /* скруглённый «экран» */
}
/* Hero: широкоформатные скрины в ландшафтных рамках устройства, слоями. */
.xm-hero-shot {
  position: absolute;
  width: min(440px, 80%);
  border-radius: 16px;
  border: 1px solid #2a3a55;
  background: #05080f;
  padding: 8px;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
  overflow: hidden;
}
.xm-hero-shot img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; display: block; }
.xm-hero-shot--back { transform: translate(-26px,-44px) rotate(-4deg); opacity: .82; }
.xm-hero-shot--front { transform: translate(34px,32px) rotate(3deg); z-index: 2; }
@media (max-width: 768px) {
  .xm-hero-shot { position: relative; width: 100%; transform: none !important; opacity: 1; margin: 0 auto; }
  .xm-hero-shot--back { display: none; }
}
.xm-screen-thumb__placeholder {
  font-family: monospace;
  font-size: 10px;
  color: var(--xh-text-muted, #8a99b0);
  line-height: 1.4;
  text-align: center;
}
.xm-screen-item:hover .xm-screen-thumb {
  border-color: var(--xh-border-light, #1e2d4a);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.xm-screen-label {
  font-size: 12px;
  color: var(--xh-text-muted, #8a99b0);
  line-height: 1.4;
}

/* ===== FAQ (xm-faq) — 2-col grid using <details> ===== */
.xm-faq {
  position: relative;
  z-index: 1;
  padding: 64px 0;
  border-top: 1px solid var(--xh-border, #162035);
}
.xm-faq-grid {
  max-width: 920px;
  margin: 36px auto 0;
  padding: 0 var(--xh-container-pad, 32px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.xm-faq-grid .xh-faq-item {
  border: 1px solid var(--xh-border, #162035);
  border-radius: var(--xh-radius, 6px);
  background: var(--xh-bg-card, #0c1322);
  overflow: hidden;
  margin: 0;
}
.xm-faq-grid .xh-faq-item[open] {
  border-color: var(--xh-border-light, #1e2d4a);
}
.xm-faq-grid .xh-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-family: var(--xh-font-heading, 'Rajdhani'), sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--xh-text, #e8ecf2);
  cursor: pointer;
  list-style: none;
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
}
.xm-faq-grid .xh-faq-q::-webkit-details-marker { display: none; }
.xm-faq-grid .xh-faq-q svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--xh-text-muted, #8a99b0);
  transition: transform var(--xh-transition, .3s ease);
}
.xm-faq-grid .xh-faq-item[open] .xh-faq-q svg {
  transform: rotate(180deg);
  color: var(--xh-orange, #e88420);
}
.xm-faq-grid .xh-faq-a {
  padding: 0 18px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--xh-text-secondary, #a4b3c8);
}

/* ===== CTA (xm-cta) — gradient banner ===== */
.xm-cta {
  position: relative;
  z-index: 1;
  padding: 56px 0 72px;
}
.xm-cta-inner {
  max-width: var(--xh-max-w, 1200px);
  margin: 0 auto;
  padding: 48px 32px;
  text-align: center;
  border-radius: var(--xh-radius-lg, 10px);
  border: 1px solid var(--xh-border-light, #1e2d4a);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(232,132,30,.10) 0%, rgba(42,125,225,.14) 100%);
}
.xm-cta-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(232,132,30,.10) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(42,125,225,.10) 0%, transparent 60%);
  pointer-events: none;
}
.xm-cta-inner h2 {
  font-family: var(--xh-font-display, 'Archivo Black'), sans-serif;
  font-size: clamp(24px, 3.2vw, 36px);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
}
.xm-cta-inner p {
  font-size: 15.5px;
  color: var(--xh-text-secondary, #a4b3c8);
  margin: 0 auto 28px;
  max-width: 520px;
  position: relative;
  z-index: 1;
}
.xm-cta-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .xm-adv-grid { grid-template-columns: repeat(3, 1fr); }
  .xm-screens-scroll { grid-template-columns: repeat(3, 1fr); }
  .xm-hero-content { max-width: 460px; }
  .xm-phone-mock { width: 180px; height: 340px; }
}
@media (max-width: 768px) {
  .xm-hero { min-height: auto; padding: 32px 0 48px; }
  .xm-hero-inner { flex-direction: column; gap: 32px; }
  .xm-hero-content { max-width: 100%; }
  .xm-hero-phones { min-height: 280px; }
  .xm-adv-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .xm-how-grid { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
  .xm-screens-scroll { grid-template-columns: repeat(3, 1fr); }
  .xm-faq-grid { grid-template-columns: 1fr; max-width: 600px; }
  .xm-cta-inner { padding: 36px 24px; }
  .xm-advantages .xh-section-title, .xm-how .xh-section-title,
  .xm-screens .xh-section-title, .xm-faq .xh-section-title { font-size: 22px; }
}
@media (max-width: 480px) {
  .xm-hero-badges { flex-direction: column; align-items: stretch; }
  .xm-store-badge { justify-content: center; }
  .xm-phone-mock { width: 170px; height: 320px; }
  .xm-phone-mock:nth-child(2) { display: none; }
  .xm-screens-scroll { grid-template-columns: repeat(2, 1fr); }
  .xm-cta-inner { padding: 28px 20px; }
  .xm-cta-badges { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .xm-adv-icon, .xm-store-badge, .xm-screen-thumb, .xm-faq-grid .xh-faq-q svg {
    transition: none;
  }
}
