/* homepage.css — EloStore главная, premium-полировка
   2026-05-25 — header glass on scroll, section dividers, skeleton, body smoothing.
   Подключается ПОСЛЕДНИМ в index.html (после styles.css/modules.css). */

/* ===== 1. Глобальная типографика — антиалиасинг + LCD =====
   премиум-деталь: на 4К/Retina текст становится "вырезанным", а не "размазанным" */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  font-feature-settings: "ss01" on, "cv11" on;
}

/* ===== 2. HEADER — glass-on-scroll =====
   при скролле header становится gallassy + появляется тонкая золотая нить снизу */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky, 50);
  transition:
    background var(--t-base, .22s ease),
    border-color var(--t-base, .22s ease),
    box-shadow var(--t-base, .22s ease),
    backdrop-filter var(--t-base, .22s ease);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(7, 11, 22, .72);
  border-bottom-color: var(--b-gold, rgba(243,210,152,.34));
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    0 8px 32px -12px rgba(0,0,0,.45),
    0 1px 0 rgba(243,210,152,.08);
}
.header__nav a {
  position: relative;
  transition: color var(--t-fast, .15s ease);
}
.header__nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: var(--r-pill, 999px);
  background: linear-gradient(90deg, var(--gold-200, #f0c67f), var(--gold-400, #c8a15a));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-base, .22s ease);
}
.header__nav a:hover {
  color: var(--text-100, #f7f9fd);
}
.header__nav a:hover::after,
.header__nav a:focus-visible::after {
  transform: scaleX(1);
}

/* ===== 3. SECTION DIVIDERS =====
   тонкая золотая нить между секциями — фирменная деталь, ощущается как "разворот журнала" */
.section + .section {
  position: relative;
}
.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 60%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--b-gold, rgba(243,210,152,.34)), transparent);
  opacity: .65;
  pointer-events: none;
}

/* ===== 4. SKELETON — shimmer animation =====
   используется в livefeed/reviews пока подгружаются данные */
@keyframes elo-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.elo-skeleton {
  position: relative;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.04) 0%,
      rgba(243,210,152,.08) 50%,
      rgba(255,255,255,.04) 100%
    );
  background-size: 200% 100%;
  animation: elo-shimmer 1.8s ease-in-out infinite;
  border-radius: var(--r-sm, 10px);
  color: transparent !important;
  user-select: none;
  pointer-events: none;
}

/* ===== 4a. LIVEFEED — премиум skeleton ===== */
.livefeed-loading {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: 240px;
  gap: var(--s-3, 12px);
  padding: var(--s-3, 12px) 0;
  overflow: hidden;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}
.livefeed-loading::before,
.livefeed-loading::after {
  content: '';
  display: block;
  height: 56px;
  border-radius: var(--r-md, 14px);
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.04) 0%,
      rgba(243,210,152,.08) 50%,
      rgba(255,255,255,.04) 100%
    );
  background-size: 200% 100%;
  animation: elo-shimmer 1.8s ease-in-out infinite;
  border: 1px solid var(--b-soft, rgba(255,255,255,.06));
}

/* ===== 4b. REVIEWS — премиум skeleton-карточки ===== */
.review-card--placeholder {
  position: relative;
  min-height: 180px;
  padding: var(--s-5, 20px);
  border-radius: var(--r-lg, 18px);
  background:
    linear-gradient(180deg, rgba(20,28,48,.45) 0%, rgba(11,18,36,.25) 100%);
  border: 1px solid var(--b-soft, rgba(255,255,255,.06));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.review-card--placeholder strong,
.review-card--placeholder p {
  color: transparent !important;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.05) 0%,
      rgba(243,210,152,.10) 50%,
      rgba(255,255,255,.05) 100%
    );
  background-size: 200% 100%;
  animation: elo-shimmer 1.8s ease-in-out infinite;
  border-radius: var(--r-sm, 10px);
  user-select: none;
  pointer-events: none;
  display: block;
}
.review-card--placeholder strong {
  height: 18px;
  width: 65%;
  margin-bottom: var(--s-3, 12px);
}
.review-card--placeholder p {
  height: 12px;
  margin: 0 0 var(--s-2, 8px);
}
.review-card--placeholder p:last-child {
  width: 50%;
  margin: 0;
}

/* ===== 5. SECTIONS — единый ритм =====
   подтянуть spacing к 8px grid через токены */
.section {
  padding-top: var(--s-10, 72px);
  padding-bottom: var(--s-10, 72px);
}
@media (max-width: 768px) {
  .section {
    padding-top: var(--s-8, 40px);
    padding-bottom: var(--s-8, 40px);
  }
}

/* ===== 6. HERO STATS — фикс начального состояния =====
   убираем "0+ 0% 0.0" с первого рендера, цифры финальные сразу */
.hero-stat-card__value {
  font-variant-numeric: tabular-nums;
}

/* ===== 7. SECTION LABEL — золотой eyebrow ===== */
.section-label {
  display: inline-flex !important;
  align-items: center;
  gap: 0 !important;
  font: 700 var(--fs-xs, 11px)/1 var(--ff, 'Inter', system-ui, sans-serif);
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--gold-200, #f0c67f);
  padding: 7px 14px;
  border-radius: var(--r-pill, 999px);
  background: rgba(243,210,152,.06);
  border: 1px solid var(--b-gold, rgba(243,210,152,.26));
  margin-bottom: var(--s-3, 12px);
}
/* старая орarнджевая линия из styles.css — выключаем, она ломала ритм чипа */
.section-label::before {
  display: none !important;
  content: none !important;
}

/* ===== 8. BUTTONS — premium polish ===== */
.btn--primary {
  position: relative;
  overflow: hidden;
}
.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,.22) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.btn--primary:hover::before {
  transform: translateX(100%);
}

/* ===== 9. CTA BIG — единый радиус ===== */
.btn--big {
  border-radius: var(--r-md, 14px) !important;
}

/* ===== 10. FOCUS-VISIBLE ===== */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: var(--e-focus, 0 0 0 3px rgba(243,210,152,.32));
}

/* ===== 11. SECTION HEADING — типографика ===== */
.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -.028em;
  margin: 0;
}

/* ===== 12. SCROLLBAR — премиум деталь ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--ink-900, #040812);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-400, #c8a15a), var(--gold-500, #b48a44));
  border-radius: var(--r-pill, 999px);
  border: 2px solid var(--ink-900, #040812);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--gold-300, #d4af6e), var(--gold-400, #c8a15a));
}

/* ===== 13. SELECTION ===== */
::selection {
  background: rgba(243,210,152,.32);
  color: var(--text-100, #f7f9fd);
}
