/* =========================================================
   МЭТЧ — landing (design ref 2a "Матчинг-машина")
   Dark, kinetic. Fixed-width design (1440) with adaptive fallbacks.
   ========================================================= */

:root {
  /* backgrounds */
  --bg:            #060a08;
  --panel:         #0b120d;
  /* borders */
  --line-thin:     #131c15;
  --line:          #1c2a20;
  --line-ghost:    #2a3a2e;
  /* brand */
  --accent:        #1fe075;
  --accent-hover:  #7df0ac;
  --on-accent:     #06120a;
  /* text */
  --text:          #eef5ef;
  --text-2:        #8fa695;
  --text-muted:    #7d8f83;
  --text-weak:     #56685c;
  --text-bg:       #2a3b30;
  /* signal */
  --danger:        #e05c5c;

  --pad-x: 56px;

  --font-head: 'Unbounded', sans-serif;
  --font-body: 'Golos Text', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.accent      { color: var(--accent); }
.danger      { color: var(--danger); }
.accent-glow { color: var(--accent); text-shadow: 0 0 60px rgba(31, 224, 117, 0.55); }

/* ============ buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .25s ease, color .25s ease, transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  will-change: transform;
}
.btn--primary { background: var(--accent); color: var(--on-accent); font-size: 14px; padding: 13px 26px; }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn--ghost   { border-color: var(--line-ghost); color: #c7d4ca; font-weight: 600; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--lg { font-size: 16px; padding: 19px 38px; border-radius: 12px; }
.btn--xl { font-size: 17px; padding: 21px 46px; border-radius: 12px; }
.btn--glow { animation: glowPulse 2.6s ease-out infinite; }

/* ============ nav ============ */
.nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--pad-x);
}
.nav__brand { display: flex; align-items: center; gap: 14px; }
.nav__logo  { border-radius: 10px; display: block; }
.nav__wordmark { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: 0.04em; }
.nav__sub   { font-family: var(--font-mono); font-size: 12px; color: var(--text-weak); }
.nav__right { display: flex; align-items: center; gap: 28px; }
.nav__note  { font-family: var(--font-mono); font-size: 13px; color: var(--text-weak); }

/* ============ hero ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px var(--pad-x) 90px;
  margin-top: -84px;          /* let living bg run behind the nav */
  padding-top: 174px;
}
.hero__bg {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 60px;
  opacity: 0.6;
  pointer-events: none;
}
.tick-col { width: 270px; overflow: hidden; }
.tick-col__inner { display: flex; flex-direction: column; will-change: transform; }
.tick-col:nth-child(1) .tick-col__inner { animation: scrollY 36s linear infinite; }
.tick-col:nth-child(2) .tick-col__inner { animation: scrollY 52s linear infinite reverse; }
.tick-col:nth-child(3) .tick-col__inner { animation: scrollY 43s linear infinite; }
.tick-col:nth-child(4) .tick-col__inner { animation: scrollY 58s linear infinite reverse; }
.tick-row {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-bg);
  padding: 16px 0;
  border-bottom: 1px solid #0d1410;
  white-space: nowrap;
}
.hero__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(6,10,8,0.94) 0%, rgba(6,10,8,0.5) 52%, rgba(6,10,8,0.96) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero__overline { margin: 0; font-family: var(--font-mono); font-size: 14px; color: var(--accent); letter-spacing: 0.08em; }
.hero__title {
  margin: 32px 0 0;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 92px;
  line-height: 1.0;
  letter-spacing: -0.02em;
}
.hero__lead { margin: 30px 0 0; max-width: 620px; font-size: 18px; line-height: 1.65; color: var(--text-2); }
.hero__filter {
  margin-top: 44px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(11,18,13,0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 30px;
  font-family: var(--font-mono);
  font-size: 19px;
  box-shadow: 0 0 60px rgba(31,224,117,0.12);
}
.hero__filter-label { color: var(--text-weak); }
.hero__filter-typed { color: var(--text); min-width: 340px; text-align: left; }
.caret {
  display: inline-block;
  width: 11px;
  height: 22px;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
.hero__actions { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; justify-content: center; }
.hero__counter { margin-top: 52px; font-family: var(--font-mono); font-size: 13px; color: var(--text-weak); }

/* ============ ribbons (marquee) ============ */
.ribbon {
  position: relative;
  border-top: 1px solid var(--line-thin);
  border-bottom: 1px solid var(--line-thin);
  overflow: hidden;
}
.conveyor { padding: 20px 0; }
.channels { padding: 18px 0; }
.ribbon__label {
  position: absolute;
  top: -11px;
  left: var(--pad-x);
  z-index: 2;
  background: var(--bg);
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-weak);
  letter-spacing: 0.1em;
}
.marquee { display: flex; overflow: hidden; }
.marquee__track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: marqueeX 38s linear infinite;
}
.channels .marquee__track { gap: 44px; animation-duration: 30s; }
.marquee--reverse .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track { animation-play-state: paused; }

.chip {
  flex: none;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--line);
  color: var(--text-2);
  background: rgba(31,224,117,0.05);
}
.chip--dead {
  border-color: #2a1c1c;
  color: #5c4444;
  background: rgba(150,50,50,0.05);
  text-decoration: line-through;
}
.channel {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-weak);
  white-space: nowrap;
}
.channel__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ============ demo ============ */
.demo { padding: 88px var(--pad-x); }
.demo__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.demo__overline { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; }
.demo__title { margin: 16px 0 0; font-family: var(--font-head); font-weight: 700; font-size: 52px; letter-spacing: -0.01em; }
.demo__readout { font-family: var(--font-mono); font-size: 14px; color: var(--text-weak); text-align: right; line-height: 2; }

.filter-panel {
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 36px;
  background: rgba(11,18,13,0.5);
  position: relative;
}
.filter-panel__label {
  position: absolute;
  top: -11px;
  left: 28px;
  background: var(--bg);
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.filter-panel__rows { display: flex; flex-direction: column; gap: 18px; }
.filter-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.filter-row__label { width: 90px; font-family: var(--font-mono); font-size: 12px; color: var(--text-weak); }
.tags { display: flex; gap: 14px; flex-wrap: wrap; }

.tag {
  padding: 12px 22px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 400;
  user-select: none;
  font-family: var(--font-mono);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  transition: all .25s ease;
}
.tag:hover { border-color: var(--line-ghost); color: #c7d4ca; }
.tag--active {
  font-weight: 700;
  border-color: var(--accent);
  background: rgba(31,224,117,0.14);
  color: var(--accent);
  box-shadow: 0 0 26px rgba(31,224,117,0.28), inset 0 0 14px rgba(31,224,117,0.12);
}

/* ============ results ============ */
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }

.job {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  will-change: transform, opacity;
}
.job:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 12px 40px rgba(31,224,117,0.15); }
.job__top { display: flex; align-items: center; justify-content: space-between; }
.job__level {
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}
.job__time { font-family: var(--font-mono); font-size: 11px; color: var(--text-weak); }
.job__title { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.35; }
.job__line { font-size: 13px; color: var(--text-muted); }
.job__bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-thin);
}
.job__salary { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--accent); }
.job__ch { font-family: var(--font-mono); font-size: 12px; color: var(--text-weak); }

.empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-ghost);
  border-radius: 16px;
  padding: 70px 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-weak);
}

/* card entrance animation, restarted each filter change */
.job--enter { animation: popIn .5s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ============ steps ============ */
.steps { padding: 88px var(--pad-x); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
  transition: border-color .3s ease, background .3s ease, transform .3s ease;
}
.step-card:hover { border-color: var(--accent); background: rgba(31,224,117,0.04); transform: translateY(-4px); }
.step-card__num { font-family: var(--font-head); font-weight: 900; font-size: 44px; color: var(--accent); }
.step-card__title { margin: 18px 0 0; font-size: 19px; font-weight: 700; }
.step-card__text { margin: 10px 0 0; font-size: 14px; line-height: 1.7; color: var(--text-muted); }

/* ============ footer ============ */
.footer {
  position: relative;
  overflow: hidden;
  padding: 110px var(--pad-x);
  text-align: center;
  border-top: 1px solid var(--line-thin);
}
.footer__logo {
  display: block;
  margin: 0 auto;
  border-radius: 36px;
  box-shadow: 0 30px 80px rgba(31,224,117,0.35);
  animation: floatM 6s ease-in-out infinite;
}
.footer__title { margin: 48px 0 0; font-family: var(--font-head); font-weight: 900; font-size: 64px; letter-spacing: -0.02em; line-height: 1.05; }
.footer__note { margin: 22px 0 0; font-family: var(--font-mono); font-size: 15px; color: var(--text-weak); }
.footer .btn { margin-top: 40px; }

/* =========================================================
   Reveal-on-scroll (enhanced entrance)
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(0.22, 1, 0.36, 1), transform .7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }
[data-reveal-delay="5"] { transition-delay: .40s; }

/* =========================================================
   Keyframes
   ========================================================= */
@keyframes blink     { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes scrollY   { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes marqueeX  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes popIn     { from { opacity: 0; transform: translateY(28px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31,224,117,0.5); } 50% { box-shadow: 0 0 0 20px rgba(31,224,117,0); } }
@keyframes floatM    { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-5deg) translateY(-16px); } }

/* =========================================================
   Responsive (design is 1440; graceful below)
   ========================================================= */
@media (max-width: 1200px) {
  .results { grid-template-columns: repeat(2, 1fr); }
  .hero__title { font-size: 72px; }
}
@media (max-width: 960px) {
  :root { --pad-x: 32px; }
  .hero__title { font-size: 56px; }
  .demo__title { font-size: 40px; }
  .footer__title { font-size: 48px; }
  .steps { grid-template-columns: 1fr; }
  .tick-col:nth-child(3), .tick-col:nth-child(4) { display: none; }
}
@media (max-width: 640px) {
  :root { --pad-x: 20px; }
  .nav__note { display: none; }
  .hero { padding-top: 140px; }
  .hero__title { font-size: 40px; }
  .hero__lead { font-size: 16px; }
  .hero__filter { font-size: 15px; padding: 16px 20px; }
  .hero__filter-typed { min-width: 0; }
  .demo__title { font-size: 32px; }
  .demo__head { align-items: flex-start; }
  .demo__readout { text-align: left; }
  .results { grid-template-columns: 1fr; }
  .footer__title { font-size: 36px; }
  .tick-col:nth-child(2) { display: none; }
  .btn--lg, .hero__actions .btn { width: 100%; }
}

/* =========================================================
   Reduced motion: kill kinetic bg, keep content readable
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tick-col__inner,
  .marquee__track,
  .btn--glow,
  .footer__logo,
  .caret { animation: none !important; }
  .footer__logo { transform: rotate(-6deg); }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .job--enter { animation: none !important; }
  .caret { opacity: 1; }
}
