/* ═══ DESIGN TOKENS + REUSABLE COMPONENTS ═══
   Всё апрувленное. Подключается в каждый компонент.
   Решения из: 01-nav, 02-hero, 03-pain
*/

/* ══════════════════════════════════════════════
   1. VARIABLES
══════════════════════════════════════════════ */
:root {
  --bg-primary:    #0d1117;
  --bg-secondary:  #161b22;
  --bg-elevated:   #21262d;
  --bg-card:       #1c2028;
  --accent-blue:   #58a6ff;
  --accent-cyan:   #39d0d8;
  --accent-purple: #bc8cff;
  --accent-green:  #3fb950;
  --accent-amber:  #e3b341;
  --accent-rose:   #f778ba;
  --accent-emerald:#34d399;
  --gradient-live: linear-gradient(135deg, #58a6ff 0%, #39d0d8 45%, #bc8cff 100%);
  --text-primary:  #f0f3f6;
  --text-secondary:#9da5ae;
  --text-muted:    #545d68;
  --border-subtle: rgba(240,246,252,0.08);
  --border-mid:    rgba(240,246,252,0.14);
  --border-active: rgba(88,166,255,0.35);
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-xl:   40px;
  --radius-pill: 100px;
}

/* ══════════════════════════════════════════════
   2. RESET
══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 60px; }
body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg-primary); color: var(--text-primary);
  font-size: 16px; line-height: 1.6; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }

/* ══════════════════════════════════════════════
   3. EMOJI (Google Noto via Twemoji parser)
══════════════════════════════════════════════ */
img.emoji { height: 1.2em; width: 1.2em; vertical-align: -0.15em; display: inline; pointer-events: none; }
.emoji-xl img.emoji { width: 52px; height: 52px; vertical-align: bottom; }
.emoji-lg img.emoji { width: 44px; height: 44px; vertical-align: bottom; }
.emoji-md img.emoji { width: 38px; height: 38px; vertical-align: bottom; }
.emoji-sm img.emoji { width: 20px; height: 20px; vertical-align: -0.15em; }

/* ══════════════════════════════════════════════
   4. LAYOUT
══════════════════════════════════════════════ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { padding: 100px 0; }

/* ══════════════════════════════════════════════
   5. TYPOGRAPHY
══════════════════════════════════════════════ */
h2 {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700; letter-spacing: -1.5px; line-height: 1.1;
  margin-bottom: 16px;
}
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--accent-blue);
  margin-bottom: 12px; display: block;
}
.sub {
  font-size: 18px; color: var(--text-secondary);
  max-width: 560px; margin-bottom: 56px; line-height: 1.65;
}
.sec-emoji { font-size: 52px; line-height: 1; margin-bottom: 16px; display: block; user-select: none; }

/* ── Gradient text (shimmer) ── */
.gt {
  background: var(--gradient-live); background-size: 200% 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

/* ── Gradient text + white underline (for headings) ── */
.gu {
  position: relative;
  background: var(--gradient-live); background-size: 200% 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: shimmer 4s ease-in-out infinite;
}
.gu::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, rgba(240,243,246,.55), rgba(240,243,246,.12));
  border-radius: 2px;
}

/* ══════════════════════════════════════════════
   6. UNDERLINE — APPROVED: white 70%, skip-ink auto, 2px
   Use on secondary-color text to highlight key phrases
   Current: gradient. To switch to white: change background-image to rgba(240,243,246,.7)
══════════════════════════════════════════════ */
.u {
  display: inline;
  background-image: var(--gradient-live);
  background-size: 100% 2px;
  background-position: 0 calc(100% - 1px);
  background-repeat: no-repeat;
  padding-bottom: 1px;
}

/* ══════════════════════════════════════════════
   7. BUTTONS — APPROVED: gradient border, no fill, glow on hover
══════════════════════════════════════════════ */
/* Primary CTA (hero size) */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 36px; border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
              var(--gradient-live) border-box;
  font-size: 16px; font-weight: 700; color: var(--text-primary);
  cursor: pointer; transition: all .25s; font-family: 'Inter', sans-serif;
}
.btn-primary:hover {
  box-shadow: 0 0 24px rgba(88,166,255,.2), 0 0 6px rgba(57,208,216,.15);
  color: var(--accent-cyan);
}
.btn-primary img.emoji { width: 22px; height: 22px; vertical-align: -0.15em; }

/* Nav CTA (smaller) */
.btn-nav {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 8px 20px; border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
              var(--gradient-live) border-box;
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  cursor: pointer; transition: all .25s;
}
.btn-nav:hover {
  box-shadow: 0 0 16px rgba(88,166,255,.2), 0 0 4px rgba(57,208,216,.15);
  color: var(--accent-cyan);
}
.btn-arrow { transition: transform .2s; display: inline-block; }
.btn-nav:hover .btn-arrow,
.btn-primary:hover .btn-arrow { transform: translateX(3px); }

/* ══════════════════════════════════════════════
   8. BADGES — inline with buttons
══════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
}
.badge-blue   { background: rgba(88,166,255,.06); border: 1px solid rgba(88,166,255,.15); color: var(--accent-blue); }
.badge-cyan   { background: rgba(57,208,216,.06); border: 1px solid rgba(57,208,216,.15); color: var(--accent-cyan); }
.badge-green  { background: rgba(63,185,80,.06); border: 1px solid rgba(63,185,80,.15); color: var(--accent-green); }
.badge-purple { background: rgba(188,140,255,.06); border: 1px solid rgba(188,140,255,.15); color: var(--accent-purple); }
.badge-amber  { background: rgba(227,179,65,.06); border: 1px solid rgba(227,179,65,.15); color: var(--accent-amber); }
.badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-blue); box-shadow: 0 0 5px rgba(88,166,255,.5);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(.8)} }

/* ══════════════════════════════════════════════
   9. CHIPS — APPROVED: pill 2px border, gradient-border + white underline active
══════════════════════════════════════════════ */
.chip {
  padding: 10px 22px; border-radius: var(--radius-pill);
  border: 2px solid var(--border-mid); background: transparent;
  color: var(--text-secondary); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s; font-family: 'Inter', sans-serif;
}
.chip:hover { border-color: var(--border-active); color: var(--text-primary); }
.chip.on {
  border-color: transparent;
  background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
              var(--gradient-live) border-box;
  color: var(--text-primary);
}
.chip.on .chip-text {
  text-decoration: underline; text-decoration-skip-ink: auto;
  text-underline-offset: 2px; text-decoration-thickness: 1px;
  text-decoration-color: rgba(240,243,246,.7);
}

/* ══════════════════════════════════════════════
   10. CARDS — APPROVED: gradient ring, no color top
══════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: none; border-radius: var(--radius-lg);
  padding: 26px; position: relative; overflow: hidden;
  transition: all .25s;
}
/* Gradient ring — always visible, brighter on hover */
.card::before {
  content: ''; position: absolute; inset: 0;
  border-radius: var(--radius-lg); padding: 1.5px;
  background: linear-gradient(135deg, rgba(88,166,255,.25), rgba(57,208,216,.12), rgba(188,140,255,.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; transition: all .3s;
}
.card:hover::before {
  background: linear-gradient(135deg, rgba(88,166,255,.5), rgba(57,208,216,.3), rgba(188,140,255,.5));
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.4); }

/* Card internals */
.card h3 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px; font-weight: 700; letter-spacing: -.3px;
  margin-bottom: 8px; color: var(--text-primary);
}
.card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.card-emoji { font-size: 40px; line-height: 1; flex-shrink: 0; }
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }

/* Ghost number */
.card-ghost {
  font-family: 'Inter Tight', sans-serif; font-size: 80px;
  font-weight: 800; letter-spacing: -3px; line-height: .85;
  color: rgba(240,243,246,.06);
  position: absolute; top: 12px; right: 18px;
  pointer-events: none; user-select: none;
}

/* ══════════════════════════════════════════════
   11. TAGS — on cards
══════════════════════════════════════════════ */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600;
  background: rgba(240,243,246,.06); border: 1px solid rgba(240,243,246,.12);
  color: var(--text-secondary);
}

/* ══════════════════════════════════════════════
   12. METRIC — white numbers + gradient suffix
══════════════════════════════════════════════ */
.metric {
  font-family: 'Inter Tight', sans-serif;
  font-size: 22px; font-weight: 800; letter-spacing: -.5px;
  margin-top: 12px; color: var(--text-primary);
}
.metric-k {
  background: var(--gradient-live);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.metric-arrow { color: var(--accent-green); margin: 0 4px; }

/* ══════════════════════════════════════════════
   12b. RESULT BADGE — soft gradient ring, К gradient (APPROVED from stories)
══════════════════════════════════════════════ */
.bx {
  display: inline-flex; align-items: center;
  padding: 5px 14px; border-radius: var(--radius-pill);
  font-family: 'Inter Tight', sans-serif; font-weight: 800;
  letter-spacing: -.3px; color: var(--text-primary);
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, rgba(88,166,255,.25), rgba(57,208,216,.12), rgba(188,140,255,.25)) border-box;
}
.bx .k {
  background: var(--gradient-live);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════
   12c. QUOTE — big open " (APPROVED from stories)
══════════════════════════════════════════════ */
.qt { position: relative; padding-left: 40px; }
.qt::before {
  content: '"'; position: absolute; left: 0; top: -8px;
  font-family: 'Inter Tight', sans-serif; font-size: 56px;
  font-weight: 800; line-height: 1;
  color: rgba(88,166,255,.15);
}

/* ══════════════════════════════════════════════
   13. SCROLL-HIJACK CAROUSEL
══════════════════════════════════════════════ */
.hijack-wrapper { position: relative; }
.hijack-sticky {
  position: sticky; top: 44px; height: calc(100vh - 44px);
  display: flex; flex-direction: column; justify-content: center;
  overflow: visible;
}
.hijack-header { padding: 0 24px; margin-bottom: 40px; }
.hijack-viewport { overflow: hidden; position: relative; }
.hijack-viewport::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 160px;
  background: linear-gradient(to left, var(--bg-primary) 35%, transparent);
  z-index: 2; pointer-events: none;
}
.hijack-viewport::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 60px;
  background: linear-gradient(to right, var(--bg-primary) 15%, transparent);
  z-index: 2; pointer-events: none;
}
.hijack-track { display: flex; gap: 20px; padding: 16px 40px; will-change: transform; }
.hijack-progress { margin: 20px 24px 0; height: 2px; background: var(--border-subtle); border-radius: 1px; overflow: hidden; }
.hijack-progress-fill { height: 100%; width: 0%; background: var(--gradient-live); border-radius: 1px; }

/* ══════════════════════════════════════════════
   14. STANDARD CAROUSEL (drag-scroll)
══════════════════════════════════════════════ */
.carousel-outer { position: relative; }
.carousel-outer::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 160px;
  background: linear-gradient(to left, var(--carousel-bg, var(--bg-primary)) 35%, transparent);
  pointer-events: none; z-index: 2;
}
.carousel-outer::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 60px;
  background: linear-gradient(to right, var(--carousel-bg, var(--bg-primary)) 15%, transparent);
  pointer-events: none; z-index: 2;
}
.carousel-track {
  display: flex; gap: 16px;
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  cursor: grab; padding: 8px 40px 32px; margin: 0 -24px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:active { cursor: grabbing; }
.carousel-track > * { scroll-snap-align: start; }
.carousel-track::after { content: ''; flex: 0 0 120px; }

/* ══════════════════════════════════════════════
   15. SCROLL ANIMATIONS
══════════════════════════════════════════════ */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.stagger.visible > * { opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger.visible > *:nth-child(2) { transition-delay: .08s; }
.stagger.visible > *:nth-child(3) { transition-delay: .16s; }
.stagger.visible > *:nth-child(4) { transition-delay: .24s; }
.stagger.visible > *:nth-child(5) { transition-delay: .32s; }
.stagger.visible > *:nth-child(6) { transition-delay: .4s; }
.stagger.visible > *:nth-child(7) { transition-delay: .48s; }

.count-flash { animation: flash .4s ease; }
@keyframes flash { 0%{color:var(--accent-green);transform:scale(1.1)} 100%{color:inherit;transform:scale(1)} }

/* ══════════════════════════════════════════════
   16. PROGRESS BAR
══════════════════════════════════════════════ */
#progress-bar {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: var(--gradient-live);
  z-index: 1000; transition: width .08s linear;
}

/* ══════════════════════════════════════════════
   17. RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 960px) {
  .concept-grid { grid-template-columns: 1fr; gap: 48px; }
  .inside-featured { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  section { padding: 72px 0; }
  nav { padding: 10px 16px; }
  .nav-live { display: none; }
  .container { padding: 0 16px; }
  h1 { letter-spacing: -1.5px; }
  h2 { letter-spacing: -.8px; }
  .who-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .inside-featured { padding: 28px; }
  .carousel-outer::after { width: 60px; }
  .hijack-viewport::after { width: 80px; }
}
