/* ==========================================================================
   TRIDE · Июльский апдейт — статья
   Тёмная редакционная тема, брендовые акценты (красный/золото), Montserrat.
   ========================================================================== */
@font-face { font-family: 'Mont'; src: url('assets/fonts/mont-300.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Mont'; src: url('assets/fonts/mont-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Mont'; src: url('assets/fonts/mont-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Mont'; src: url('assets/fonts/mont-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --bg: #0a0b0e;
  --bg-2: #0e1014;
  --surface: #14171d;
  --surface-2: #1a1e26;
  --surface-3: #222732;
  --border: #262b36;
  --border-soft: #1c212b;
  --text: #eceef2;
  --text-2: #aab0bd;
  --text-3: #767d8b;
  --red: #ef3340;
  --red-soft: #ff5b66;
  --gold: #e9b949;
  --gold-soft: #f4cf74;
  --green: #46c26a;
  --blue: #5b8bf0;
  --z1: #3aa0ff; --z2: #35c07a; --z3: #e8c93f; --z4: #f0902f; --z5: #ec4b3f; --z6: #b23bd6;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px -18px rgba(0,0,0,.75);
  --shadow-soft: 0 10px 30px -14px rgba(0,0,0,.6);
  --maxw: 1120px;
  --measure: 70ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Mont', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Фоновая атмосфера */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 600px at 78% -8%, rgba(239,51,64,.13), transparent 60%),
    radial-gradient(1000px 620px at 10% 4%, rgba(233,185,73,.08), transparent 58%),
    linear-gradient(180deg, #0b0d11, #08090c 60%);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ============================ HERO ============================ */
.hero {
  position: relative;
  padding: clamp(64px, 12vw, 130px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; color: var(--gold-soft);
  padding: 7px 15px; border: 1px solid rgba(233,185,73,.28);
  border-radius: 999px; background: rgba(233,185,73,.06);
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red); }
.hero h1 {
  font-weight: 600; letter-spacing: -.02em; line-height: 1.04;
  font-size: clamp(38px, 7.2vw, 82px);
  margin: 26px 0 0; max-width: 15ch;
}
.hero h1 .hl { color: transparent; background: linear-gradient(100deg, var(--red-soft), var(--gold-soft)); -webkit-background-clip: text; background-clip: text; }
.hero .sub {
  font-size: clamp(18px, 2.4vw, 25px); color: var(--text-2); font-weight: 300;
  margin: 26px 0 0; max-width: 46ch; line-height: 1.5;
}
.hero .lead { margin: 30px 0 0; max-width: var(--measure); color: var(--text-2); }
.hero .lead p { margin: 0 0 14px; }
.hero-media {
  margin-top: 46px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  position: relative; background: #000; aspect-ratio: 16/9;
}
.hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media .tag {
  position: absolute; left: 16px; bottom: 14px; z-index: 3;
  font-size: 12.5px; color: var(--text-2); background: rgba(10,11,14,.6);
  border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* ============================ NAV ============================ */
.tocbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(9,10,13,.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.tocbar .wrap { display: flex; align-items: center; gap: 16px; height: 58px; }
.tocbar .brand { font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.tocbar .brand .dot { width: 10px; height: 10px; background: var(--red); border-radius: 3px; box-shadow: 0 0 10px rgba(239,51,64,.7); transform: rotate(45deg); }
.toc { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.toc::-webkit-scrollbar { display: none; }
.toc a {
  font-size: 13px; color: var(--text-3); white-space: nowrap;
  padding: 7px 12px; border-radius: 999px; transition: .18s;
}
.toc a:hover { color: var(--text); background: var(--surface-2); }

/* ============================ SECTION ============================ */
.section { padding: clamp(52px, 8vw, 92px) 0; border-top: 1px solid var(--border-soft); }
.section:first-of-type { border-top: none; }
.kicker {
  display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; padding: 6px 13px; border-radius: 999px;
  color: var(--red-soft); background: rgba(239,51,64,.09); border: 1px solid rgba(239,51,64,.22);
}
.kicker[data-group='ИИ'] { color: var(--blue); background: rgba(91,139,240,.1); border-color: rgba(91,139,240,.26); }
.kicker[data-group='Мотивация'] { color: var(--gold-soft); background: rgba(233,185,73,.1); border-color: rgba(233,185,73,.28); }
.kicker[data-group='Коммуникации'] { color: #63d6a6; background: rgba(70,194,106,.1); border-color: rgba(70,194,106,.26); }
.kicker[data-group='Автоматика'] { color: #8ab4ff; background: rgba(91,139,240,.09); border-color: rgba(91,139,240,.22); }
.section h2 {
  font-weight: 600; letter-spacing: -.015em; line-height: 1.1;
  font-size: clamp(27px, 4vw, 45px); margin: 18px 0 0; max-width: 20ch;
}
.section .dek { font-size: clamp(17px, 2vw, 21px); color: var(--text-2); font-weight: 300; margin: 16px 0 0; max-width: 52ch; }
.prose { margin: 26px 0 0; max-width: var(--measure); }
.prose p { margin: 0 0 18px; color: #ced3dc; font-size: 17px; }
.prose p:last-child { margin-bottom: 0; }

.pullquote {
  margin: 34px 0 6px; padding: 4px 0 4px 26px; border-left: 3px solid var(--red);
  font-size: clamp(20px, 2.6vw, 27px); font-weight: 300; line-height: 1.4;
  color: var(--gold-soft); max-width: 30ch;
}

/* ============================ VISUALS ============================ */
.visual { margin-top: 40px; }
.visual .vtitle { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin: 0 0 16px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery.g-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.shot {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; cursor: zoom-in;
}
.shot:hover { transform: translateY(-4px); border-color: var(--surface-3); box-shadow: var(--shadow-soft); }
.shot .frame { aspect-ratio: 16/9; background: #000; overflow: hidden; }
.shot .frame img { width: 100%; height: 100%; object-fit: cover; }
.shot .cap { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shot .cap .name { font-weight: 500; font-size: 14.5px; }
.shot .cap .hint { font-size: 12px; color: var(--text-3); }

.videoblock {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow); background: #000; position: relative; aspect-ratio: 16/9;
}
.videoblock video { width: 100%; height: 100%; object-fit: cover; }
.vcaption { margin: 14px 2px 0; font-size: 14px; color: var(--text-3); }

.bigshot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #000; cursor: zoom-in; }
.bigshot img { width: 100%; }

/* Шаги (авто-показатели) */
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
}
.step .frame { aspect-ratio: 16/9; background: #000; }
.step .frame img { width: 100%; height: 100%; object-fit: cover; }
.step .lbl { padding: 12px 14px; font-size: 14px; color: var(--text-2); display: flex; gap: 10px; align-items: baseline; }
.step .lbl .n { font-weight: 600; color: var(--red-soft); font-size: 13px; }

/* Медальоны */
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 18px; }
.medal { text-align: center; }
.medal .art { width: 100%; aspect-ratio: 1; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); transition: transform .2s; }
.medal:hover .art { transform: translateY(-4px) scale(1.03); }
.medal .art svg { width: 100%; height: 100%; }
.medal .mname { font-size: 13px; font-weight: 500; margin-top: 10px; line-height: 1.3; }
.medal .mrar { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; color: var(--text-3); }
.medal .mrar[data-r='rare'] { color: var(--z1); }
.medal .mrar[data-r='epic'] { color: var(--z6); }
.medal .mrar[data-r='legendary'] { color: var(--gold); }
.medal .mrar[data-r='uncommon'] { color: var(--green); }

/* Мокапы коммуникаций */
.mock { display: grid; gap: 18px; }
.phone {
  max-width: 340px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 30px; padding: 16px 14px 20px; box-shadow: var(--shadow);
}
.phone .notch { width: 120px; height: 6px; border-radius: 999px; background: var(--surface-3); margin: 2px auto 16px; }
.bubble { padding: 12px 15px; border-radius: 16px; margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; max-width: 85%; }
.bubble.bot { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.bubble.me { background: linear-gradient(120deg, var(--red), #c9202c); margin-left: auto; border-bottom-right-radius: 5px; color: #fff; }
.bubble .who { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-soft); margin-bottom: 5px; font-weight: 600; }

.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.flow .node {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; position: relative;
}
.flow .node .t { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 600; }
.flow .node .v { font-size: 15px; margin-top: 8px; color: var(--text); font-weight: 500; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font-size: 13px; padding: 7px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.chip.on { background: rgba(70,194,106,.12); border-color: rgba(70,194,106,.3); color: #74d6a2; }

.chatwidget {
  max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  overflow: hidden; box-shadow: var(--shadow); margin: 0 auto;
}
.chatwidget .top { background: linear-gradient(120deg, #16181e, #1d2028); padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.chatwidget .top .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--red), var(--gold)); }
.chatwidget .top .nm { font-weight: 600; font-size: 15px; }
.chatwidget .top .st { font-size: 12px; color: var(--green); }
.chatwidget .body { padding: 16px; }
.chatwidget .card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 13px; }
.chatwidget .card .row { display: flex; justify-content: space-between; margin: 3px 0; color: var(--text-2); }
.chatwidget .card .row b { color: var(--text); font-weight: 500; }

/* ============================ OUTRO / FOOTER ============================ */
.outro { padding: clamp(56px, 9vw, 104px) 0; text-align: center; border-top: 1px solid var(--border-soft); }
.outro h2 { font-weight: 600; font-size: clamp(28px, 4.5vw, 48px); letter-spacing: -.015em; margin: 0 auto; max-width: 18ch; }
.outro .prose { margin: 24px auto 0; text-align: left; }
.outro .prose p { text-align: center; color: var(--text-2); font-size: 18px; }
.footer { padding: 40px 0 64px; text-align: center; color: var(--text-3); font-size: 13px; border-top: 1px solid var(--border-soft); }
.footer .dot { width: 9px; height: 9px; background: var(--red); border-radius: 2px; display: inline-block; transform: rotate(45deg); margin-right: 8px; }

/* ============================ LIGHTBOX ============================ */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(5,6,8,.94); display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lb.open { display: flex; }
.lb img { max-width: 100%; max-height: 92vh; border-radius: 12px; box-shadow: var(--shadow); }

/* ============================ REVEAL ============================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .tocbar .brand span { display: none; }
  .prose p { font-size: 16px; }
}
